Shark Deng

Interactive Designer @Shanju Design in Shanghai

touched caffe / mxnet / python / wordpress / bootstrap / Arduino / Raspberry Pi / webgl / three.js / PIXI / 3dMax



Jupiter notebook

2020-07-06 03:32:33

on command line:

jupiter notebook 

start fun!


convert .ipynb to python

jupiter nbconvert –to python a.ipynb


convert python to .ipynb 

# convert python to jupyter notebook 
import nbformat
import sys
from nbformat.v4 import new_notebook, new_code_cell

nb = new_notebook()
with open(sys.argv[1]) as f:
    code =

filename = sys.argv[1].split('.')
nbformat.write(nb, filename[0]+'.ipynb')



——By SharkDeng

Leave a Reply

Your email address will not be published. Required fields are marked *