[+] Java path

This commit is contained in:
Azalea (on HyDEV-Daisy)
2022-08-17 12:23:02 -04:00
parent bdb7f78c4e
commit 4fd1700414
2 changed files with 26 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env python
from json import load
from sys import argv
def loc(nb):
cells = load(open(nb))['cells']
return sum(len(c['source']) for c in cells if c['cell_type'] == 'code')
def run(ipynb_files):
return sum(loc(nb) for nb in ipynb_files)
if __name__ == '__main__':
print(run(argv[1:]))