Python/Jupyter: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 12: Line 12:


== Config ==
== Config ==
* full width: ~/.jupyter/custom/custom.css
* full width:  
**~/.jupyter/custom/custom.css
<blockquote>
<blockquote>
<pre>
<pre>

Revision as of 09:28, 23 November 2017

Installation

  • apt install python3-pip
  • pip3 install --upgrade pip
  • pip3 install jupyter

Magic Functions

  • %timeit (time line)
  • %%timeit (time block in lines below, same line = not timed setup)



Config

  • full width:
    • ~/.jupyter/custom/custom.css
.container { width:100% !important; }
  • autostart from rc.local
sudo -u pi /usr/local/bin/jupyter-notebook --config=/home/pi/.jupyter/jupyter_notebook_config.py


  • insecure access without token/password (/home/pi/.jupyter/jupyter_notebook_config.py)
c.NotebookApp.ip = '*'
c.NotebookApp.notebook_dir = '/srv/Python'
c.NotebookApp.open_browser = False
c.NotebookApp.password = ''
c.NotebookApp.token = ''