Skip to content

Instantly share code, notes, and snippets.

@sai10
Created July 15, 2018 23:09
Show Gist options
  • Save sai10/2e9678c38f3da19799e1d9f865ec3d57 to your computer and use it in GitHub Desktop.
Save sai10/2e9678c38f3da19799e1d9f865ec3d57 to your computer and use it in GitHub Desktop.
import IPython.nbformat.current as nbf
nb = nbf.read(open('test.py', 'r'), 'py')
nbf.write(nb, open('test.ipynb', 'w'), 'ipynb')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment