pip install -U pip
pip install jupyter
jupyter-notebook
run the Jupyter.
% jupyter-notebook
[I 19:21:07.376 NotebookApp] Serving notebooks from local directory: /Users/atlex/nlp
[I 19:21:07.376 NotebookApp] The Jupyter Notebook is running at:
[I 19:21:07.376 NotebookApp] http://localhost:8888/?token=8637cf3f5b526b4ac33e93964844ecf7626ccd7be92616a2
[I 19:21:07.376 NotebookApp] or http://127.0.0.1:8888/?token=8637cf3f5b526b4ac33e93964844ecf7626ccd7be92616a2
[I 19:21:07.376 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 19:21:07.381 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/atlex/Library/Jupyter/runtime/nbserver-15083-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=8637cf3f5b526b4ac33e93964844ecf7626ccd7be92616a2
or http://127.0.0.1:8888/?token=8637cf3f5b526b4ac33e93964844ecf7626ccd7be92616a2
The root directory showing on the browser is the directory where you run the command.
In the web page, click New -> Notebook:Python 3
.
A new tab will open at the browser and you can write your Python code!
green - edit mode blue - command mode
commandmode + d*2 -> delete the cell (like a vim)
commandmode + a -> new cell above
commandmode + b -> new cell below
https://stackoverflow.com/questions/32267540/ipython-jupyter-can-we-program-a-run-all-cell-above
from IPython.core.display import display, HTML
HTML('''<script> </script> <form action="javascript:IPython.notebook.execute_cells_above()"><input type="submit" id="toggleButton" value="Run all"></form>''')
At production in place
https://stackoverflow.com/questions/43893457/understanding-inplace-true
Dev can do without inplace it fast
https://stackoverflow.com/questions/1541797/how-do-i-check-if-there-are-duplicates-in-a-flat-list
len(your_list) != len(set(your_list))
jupyter-notebook list