<jupyter_start><jupyter_text>Introductory MaterialRun this introductory IPython Notebook into your [Colaborotory](https://colab.research.google.com).This is a 'Markdown' or 'Text' cell where notes can be made to help you remember what you were doing.<jupyter_code># This is a code cell where you can run Python code on the local machine
import tensorflow as tf
print(f'tensorflow version: {tf.__version__}')
# when you're done typing you hit <shift>+<enter> and the cell is executed in the Python Interpreter<jupyter_output>tensorflow version: 1.13.1<jupyter_text>You can also run bash shell commands using `!`<jupyter_code>!echo Hello World
!ls<jupyter_output>LICENSE                 [34msess1_supervised[m[m        [34msess5_ensemble[m[m
README.md               [34msess2_timeseries[m[m        [34msess6_reinforcement[m[m
[34mREADME_imgs[m[m             [34msess3_unsupervised[m[m
introduction.ipynb      [34msess4_generative_models[m[m<jupyter_text>Let's checkout the AI4ScienceTutorial to our local Colaboratory Virtual Machine:<jupyter_code>!git clone https://github.com/argonne-lcf/AI4ScienceTutorial.git repo
!ls repo<jupyter_output>LICENSE                 [34msess1_supervised[m[m        [34msess5_ensemble[m[m
README.md               [34msess2_timeseries[m[m        [34msess6_reinforcement[m[m
[34mREADME_imgs[m[m             [34msess3_unsupervised[m[m
introduction.ipynb      [34msess4_generative_models[m[m<jupyter_text>Notebook RuntimesWhile running a notebook, you must consider that the Python Interpreter is running in the background and will retain all previous executed codes. Mean variables persist until the runtime is killed or reset. This can be done from the 'Kernel' or 'Runtime' menu above. Let's see how this works.<jupyter_code>x = 42
print(x)<jupyter_output>42<jupyter_text>Now reset/restart the runtime via the menu and run the following:<jupyter_code># This will cause 'NameError' exception since the variable does not exist.
print(x)<jupyter_output><empty_output><jupyter_text>One Colaboratory there is another level of restart/reset called 'Reset all runtimes...' which not only restarts the Python interpreter, but reboots your VM causing all local files to be lost. For example, run the following command:<jupyter_code># list the repo we cloned from git
!ls repo<jupyter_output>LICENSE                 [34msess1_supervised[m[m        [34msess5_ensemble[m[m
README.md               [34msess2_timeseries[m[m        [34msess6_reinforcement[m[m
[34mREADME_imgs[m[m             [34msess3_unsupervised[m[m
introduction.ipynb      [34msess4_generative_models[m[m<jupyter_text>Now run 'Reset all runtimes...' from the menu and then run this command<jupyter_code># this will throw an error since there is no longer a file
!ls repo
# recheck out the repo, we want to use this later in our jobs
!git clone https://github.com/argonne-lcf/AI4ScienceTutorial.git repo<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09471218206157965, 'fraction_numerical': 0.023761713520749666, 'mean_word_length': 4.759152215799615, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 3, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '83807', 'license': 'MIT', 'n_tokens_mistral': 1075, 'n_tokens_neox': 940, 'n_words': 280, 'path': 'introduction.ipynb', 'repo_name': 'argonne-lcf/AI4ScienceTutorial', 'size': '2988'}