Showing posts with label jupyter. Show all posts
Showing posts with label jupyter. Show all posts

Monday, June 5, 2017

Jupyter Notebook Tricks

Some cool Jupyter notebook tricks from Alex Rogozhnikov. Here are some that I did not know:
  • %run can execute python code from .py files and also execute other jupyter notebooks, which can quite useful. (this is different from %load which imports external python code
  • The %store command lets you pass variables between two different notebooks.
  • %%writefile magic saves the contents of that cell to an external file.
  • %pycat does the opposite, and shows you (in a popup) the syntax highlighted contents of an external file.
  • #19  on using different kernels in the same notebook, and #22 on writing fortran code inside the notebook




Saturday, April 2, 2016

Jupyter Tricks

I recently learned a useful trick: use %matplotlib notebook instead of %matplotlib inline for interactive plots.

That led me to look for more Jupyter tricks, and I found two useful sites