<jupyter_start><jupyter_text><jupyter_code>from google.colab import drive
drive.mount('/gdrive')
%cd /gdrive
#export
TEST = 'test'<jupyter_output><empty_output><jupyter_text>Export<jupyter_code>pwd
cd /gdrive/My Drive/course-v3/nbs/dl2
ls
!pip install fire
!python notebook2script.py 00_exports.ipynb<jupyter_output>Converted 00_exports.ipynb to exp/nb_00.py<jupyter_text>How it works:<jupyter_code>import json
d = json.load(open('00_exports.ipynb','r'))['cells']
d[0]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13855421686746988, 'fraction_numerical': 0.024096385542168676, 'mean_word_length': 9.395833333333334, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '357411', 'license': 'Apache-2.0', 'n_tokens_mistral': 217, 'n_tokens_neox': 208, 'n_words': 29, 'path': '00_exports.ipynb', 'repo_name': 'davidurpani/fastai', 'size': '498'}