Archive for June, 2017

Jun
06

Make string to a command in python

https://pypi.python.org/pypi/fmt

Jun
06

Use GO in Jupyter

https://github.com/gopherdata/gophernotes

Jun
01

Jupyter Magic Memory

  1. %: line magic, %%cell magic
  2. Repeat Command:
    %recall
  3. Write cell content into a file:
    %%writefile file.py
  4. To autoreload your pyfile:
    %load_ext autoreload
    %autoreload 2
    from yourfile import yourFunction
    https://ipython.org/ipython-doc/3/config/extensions/autoreload.html
  5. Use R in jupyter
    %load_ext rpy2.ipythonR magic in cell
    %%Rcode in line
    %R

    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