通过nbviwer在线分享python notebook

在数据科学计算中,jupyter-notebook是一个很得力的助手,但是Notebook写完之后如何与他人分享呢?我们可以使用nbviwer.
具体思路:

具体的方法如下:

  1. 本地编写ipython notebook , 点击File->Download as -> IPython Notebook (.ipynb)
  2. 打开保存的文件.将内容发布到 https://gist.github.com 中. 发布成功后, 查看浏览器的地址栏, 拿到git number
    https://gist.github.com/sgopalan/d03d731bed56778517a9f6f7d61f18ff
    gist number就是最后一串字符 -> d03d731bed56778517a9f6f7d61f18ff
    

也可以将代码发布到github上,粘贴github repo的地址

  1. 打开http://nbviewer.jupyter.org
    下方有一个对话框,贴入gist number 或者github地址 点击go ,就可以看到web展示的内容了。

    gist分享的地址:

    http://nbviewer.jupyter.org/gist/sgopalan/d03d731bed56778517a9f6f7d61f18ff
    

    github分享的地址:

    http://nbviewer.jupyter.org/github/julienr/ipynb_playground/blob/master/keras/learning_cosine.ipynb
    
  2. 如果想要交互式的生成notebook
    https://mybinder.org

posted @ 2018-11-08 17:17  bingo彬哥  阅读(1006)  评论(0编辑  收藏  举报
本站总访问量