2

jupyter使用小结

 2 years ago
source link: http://wwj718.github.io/post/%E5%B7%A5%E5%85%B7/jupyter-summary/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

jupyter使用小结

2016-02-26

jupyter(之前的ipython notebook)于我的最大意义在于,让学习进程和探索进程变得可累积,正如它的原先名字中的notebook所暗示的那样,作为学习的记录者,方便你随时捡起学习的进度,增量式地前进

李笑来在《把时间当做朋友》里说

相信积累的力量,本质上就是相信复利的力量

每天进步一点,一年下来,最终的收获就是365点,这是莎士比亚的算法–以为应该用简单加法计算;
实际上,如若真的每天进步一点点,一年下来,你的收获最终很可能是S = P*(1 + i)^365,看你每天进步的是多少(i)(如果i变化你应该用∑求和),看你起步时的实力如何(P)–这是夏洛克的算法,那可是指数级增长。

而我们知道,技术和知识的增长曲线往往以指数形式。所有已掌握的知识/技术都将帮助你探索新的知识。这便是经济学上复利玩的魔法

所以常常,我们看到巨人随手扔下的鹅软石都是巨石,此处可以弹幕飘过一串名字:John McCarthy、Kenneth Lane Thompson、Linus Torvalds

一以当千的一群人

#安装 pip install jupyter

如果在windows下直接装anaconda吧!不想折腾的你在任何平台下都可以装anaconda

:::text
jupyter notebook 
jupyter notebook --no-browser
jupyter notebook --port 9999
jupyter notebook --help
jupyter notebook --ip=0.0.0.0 #外部访问

#常用:jupyter notebook --no-browser --port 5000 --ip=0.0.0.0 

###rich output

:::text
from IPython.display import HTML, Image, YouTubeVideo
from IPython.display import Image
Image(url='http://python.org/images/python-logo.gif')

在jupyter中写markdown,支持mathjax,$$e=mc^2$$

###书签 %bookmark -l #结合cd使用,方便切换目录

  • ipython locate : 查看配置
  • jupyter notebook –generate-config : 如果没有~/.jupyter/jupyter_notebook_config.py,则执行这条命令,之后在此做配置

vim ~/.jupyter/jupyter_notebook_config.py

# The directory to use for notebooks.这决定了jupyter启动目录
c.NotebookApp.notebook_dir = u'/path/to/your/notebooks'

#ipynb

#使用jupyter写ppt jupyter-nbconvert --to slides How-to.ipynb --reveal-prefix '//cdn.bootcss.com/reveal.js/3.2.0' --output slides

参考how-to

这是我用jupyter写的ppt:presentation-edx (Open edX Beijing meetup上的一个分享)

#IPython kernels for other languages

实验特性:jupyterlab

增强jupyter的编辑能力(强烈推荐!),使jupyter如IDE一般强大

  • pip install jupyterlab
  • jupyter serverextension enable –py jupyterlab
  • jupyter lab –notebook-dir="."

###我关注的

#资源汇总

###我喜欢的

zmq相关问题

sudo pip install pyzmq –upgrade


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK