<jupyter_start><jupyter_text>Jupyter Notebook tips and tricksIn this notebook, we'll see a few cool tricks in Jupyter Notebook. I'll update this notebook every now and then. So please come back to see more examples.  LaTeX in Jupyter NotebookDo you know it is possible to write and embed complex mathematical functions within a `Jupyter Notebook` using $LaTeX$? Here's an example: $$e^x=\sum_{i=0}^\infty \frac{1}{i!}x^i$$Or a more complex one like this:\begin{equation*}\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}{1+\frac{e^{-8\pi}} {1+\ldots} } } }\end{equation*}ain't it cool, buddy?You can find [More Examples here](https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Typesetting%20Equations.html)  Installing modules within nbIf you want to install a new module, you can do it directly from within jupyter notebook. Here is how you do it.<jupyter_code># Install a pip package in the current Jupyter kernel
import sys
!{sys.executable} -m pip install pandas<jupyter_output>Collecting pandas
  Downloading https://files.pythonhosted.org/packages/bb/71/8f53bdbcbc67c912b888b40def255767e475402e9df64050019149b1a943/pandas-1.0.3-cp36-cp36m-manylinux1_x86_64.whl (10.0MB)
[K    100% |████████████████████████████████| 10.0MB 146kB/s ta 0:00:01
[?25hCollecting pytz>=2017.2 (from pandas)
  Using cached https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl
Collecting numpy>=1.13.3 (from pandas)
  Downloading https://files.pythonhosted.org/packages/07/08/a549ba8b061005bb629b76adc000f3caaaf881028b963c2e18f811c6edc1/numpy-1.18.2-cp36-cp36m-manylinux1_x86_64.whl (20.2MB)
[K    100% |████████████████████████████████| 20.2MB 72kB/s eta 0:00:011
[?25hCollecting python-dateutil>=2.6.1 (from pandas)
  Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting six>=1.5 (from [...]<jupyter_text>Run a terminal commandYou can run a terminal command inside a `notebook` by preceding the command with a `!`.<jupyter_code>!echo $PATH
!ls
John = {"ELIT": [22,76,44,68,76], "EL": [44,61,38,58,59], "KA": [19,29,26,51,11], "HI": [30,59,35,53,59],\
        "MA": [24,74,38,78,83], "PHY": [36,72,42,68,82], "CHE": [30,89,34,80,88], "BIO": [46,88,43,87,89],\
        "HC": [28,94,47,90,95], "GEO": [36,88,47,79,87], "CS": [41,76,34,80,740]}
John["PHY"]
sum(John["PHY"])
def normalize(marks):
    new_marks = []
    for mark in marks:
        if marks.index(mark)==0 or marks.index(mark)==2:
            new_marks.append(mark*2)
        else:
            new_marks.append(mark)
    return new_marks
jn = {}
for k,v in John.items():
    jn[k] = normalize(v)
jn
print(sum(jn['MA']))
(44+76+88+68+76)/5
(803-(11+59))/900
(76.5+77.8+82.6+88.6)/4
(74+83)/2<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1867205931917762, 'fraction_numerical': 0.14290529154027637, 'mean_word_length': 5.183333333333334, 'pattern_counts': {'":': 11, '<': 8, '<?xml version=': 0, '>': 12, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '332057', 'license': 'MIT', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1227, 'n_words': 238, 'path': 'experiments/Jupyter - Tips and Tricks.ipynb', 'repo_name': 'beniza/learn-python', 'size': '2967'}