Jupyter Magic Memory

  1. %: line magic, %%cell magic
  2. Repeat Command:
  3. Write cell content into a file:
    %%writefile file.py
  4. To autoreload your pyfile:
    %load_ext autoreload
    %autoreload 2
    from yourfile import yourFunction
  5. Use R in jupyter
    %load_ext rpy2.ipythonR magic in cell
    %%Rcode in line

    Move variable between R and python
    %Rpush, %Rpull
    R magic tutorial: https://blog.dominodatalab.com/lesser-known-ways-of-using-notebooks/
    R magic: https://ipython.org/ipython-doc/2/config/extensions/rmagic.html
    rpy2: http://rpy2.readthedocs.io/en/version_2.8.x/index.html
    Problem in rmagic: https://stackoverflow.com/questions/25829963/r-magic-for-ipython-notebook-runtime-error-turning-off-device-on-new-server-inst

  6. %store
    store variable between different ipython notebook

Written by connygy. Posted in python

Trackback from your site.

Leave a comment