jupyter使用小结
文章目录
jupyter(之前的ipython notebook
)于我的最大意义在于,让学习进程和探索进程变得可累积,正如它的原先名字中的notebook
所暗示的那样,作为学习的记录者,方便你随时捡起学习的进度,增量式地前进
李笑来在《把时间当做朋友》里说
相信积累的力量,本质上就是相信复利的力量
每天进步一点,一年下来,最终的收获就是365点,这是莎士比亚的算法–以为应该用简单加法计算;
实际上,如若真的每天进步一点点,一年下来,你的收获最终很可能是S = P*(1 + i)^365
,看你每天进步的是多少(i)(如果i变化你应该用∑求和),看你起步时的实力如何(P)–这是夏洛克的算法,那可是指数级增长。
而我们知道,技术和知识的增长曲线往往以指数形式。所有已掌握的知识/技术都将帮助你探索新的知识。这便是经济学上复利玩的魔法
所以常常,我们看到巨人随手扔下的鹅软石都是巨石,此处可以弹幕飘过一串名字:John McCarthy、Kenneth Lane Thompson、Linus Torvalds
一以当千的一群人
#介绍 * IPython Notebook: 交互计算新时代 * 交互笔记:共享你的思想 一种新软件有望成为科学数据分享新利器
#安装 pip install jupyter
如果在windows下直接装anaconda吧!不想折腾的你在任何平台下都可以装anaconda
#使用
1 2 3 4 5 6 7 8 |
:::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
1 2 3 4 |
:::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
1 2 |
# The directory to use for notebooks.这决定了jupyter启动目录 c.NotebookApp.notebook_dir = u'/path/to/your/notebooks' |
#文档 * Jupyter Documentation
#ipynb * pelican-ipynb * github直接支持ipynb文件预览 * http://www.datahub.top/
#使用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 * IPython kernels for other languages
实验特性:jupyterlab
增强jupyter的编辑能力(强烈推荐!),使jupyter如IDE一般强大
- pip install jupyterlab
- jupyter serverextension enable –py jupyterlab
- jupyter lab –notebook-dir=“.”
###我关注的 * igo : 会报错 * bash_kernel * hy_kernel * ijavascript * 同时支持pyhton2,python3 * source ~/py3/bin/activate.fish * pip3 install jupyter” * ipython3 kernelspec install-self
#资源汇总 * A gallery of interesting IPython Notebooks * python minibooks:书籍
###我喜欢的
* Pandas for data analysis
* log_analysis_with_pandas
* Apache log analysis with Pandas
* http://nbviewer.jupyter.org/github/rasbt/python_reference/blob/master/tutorials/key_differences_between_python_2_and_3.ipynb
* A collection of not-so-obvious Python stuff you should know!
* How do I add python3 kernel to jupyter (Ipython)
* 在python2的虚拟环境张执行:python3 -m pip install ipykernel & python3 -m ipykernel install --user
* !python3 -m pip freeze
* Make your slides with IPython
* hack it
* Importing IPython Notebooks as Modules
* Computer Science with Python as Tel-Aviv University
* Data-Science-45min-Intros
坑
zmq相关问题
sudo pip install pyzmq –upgrade
文章作者 种瓜
上次更新 2016-02-26