Created
May 10, 2022 09:27
-
-
Save michaeldorner/8bac48a4592d99438ecf366889fd1ee0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count_ipynb_loc(ipynb_file): | |
with open(ipynb_file) as file: | |
content = json.load(file) | |
cells = content['cells'] | |
loc = sum(len(c['source']) for c in cells if c['cell_type'] == 'code') | |
return loc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment