<jupyter_start><jupyter_text>Abstract - Goal: Learn python basics on Jupyter notebook.- Ref:     - Python crash course (Google for it)    - the [naming section](https://github.com/google/styleguide/blob/gh-pages/pyguide.md316-naming) of Google's python style guide  Python on Jupyter notebook - ColabPython on Jupyter notebook allows one to perform a great deal of data analysis and statistical validation. cell by cell in a interactive way. A good online platform is colab, powered by google. Another good cloud platform is azure notebook, powered by microsoft. One can also install anaconda with python 3 on local computer to run Jupyter notebook.- open a new python3 notebook by visiting  https://colab.research.google.com/- As you can see, each cell can be chosen either code or text from its top menu.- A code cell will be evaluated when you press play, or when you press the shortcut, shift-enter.<jupyter_code>2 + 2 #Executing a Command<jupyter_output><empty_output><jupyter_text>Importing LibrariesThe vast majority of the time, you'll want to use functions from pre-built libraries. You can't import every library each time, but you can import most of the common scientific ones. Here I import numpy, pandas, and matplotlib, the most common and useful libraries. Notice that you can rename libraries to whatever you want after importing. The `as` statement allows this. Here we use `np` and `pd` as aliases for `numpy` and `pandas`. This is a very common aliasing and will be found in most code snippets around the web. The point behind this is to allow you to type fewer characters when you are frequently accessing these libraries.<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Using numpy and matplotlib: A sampling example Let's use numpy to select 100 standard normal radom variables, and make a plot.<jupyter_code>X = np.random.normal(0, 1, 100)

plt.plot(X);
plt.xlabel('Time') 
plt.ylabel('Returns')
plt.show()<jupyter_output><empty_output><jupyter_text>Let's use `numpy` to take some simple statistics.<jupyter_code>np.mean(X)
np.std(X)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0697459584295612, 'fraction_numerical': 0.006928406466512702, 'mean_word_length': 5.067226890756302, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '3530', 'license': 'MIT', 'n_tokens_mistral': 633, 'n_tokens_neox': 601, 'n_words': 286, 'path': 'other/python_notebook.ipynb', 'repo_name': 'nickwotton/MQP2019', 'size': '2165'}