JUPYTER NOTEBOOKS

View

Make cells full width

import IPython.core.display
IPython.core.display.display(IPython.core.display.HTML("<style>.container { width:100% !important; }</style>"))

Customize image size

import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (20,10)

TODO Plugins

Export

Converting notebook into hugo post

From Greg Hilston

  1. For the cells you want to convert to markdown, click the wrench on the side “Notebook Tools” and select a different “Raw NBConvert Format”
  2. At the end of the notebook, call the following command to convert the notebook to markdown !jupyter nbconvert --to markdown Untitled.ipynb
  3. (This step may be skipped if you have no figures) Move the files directory that is created, which holds images, so the Hugo blog post can render the images using this command
!mv Untitled.md path/to/content/directory/Untitled.md
!cp -r Untitled_files path/to/static/directory

TODO Export as PDF

TODO Book format