0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Jupyter Notebook使用技巧

Posted at

Jupyter生成ppt

安装完jupyter,打开后,建立新.ipynb文件。

点击view ------ cell toolbar ------slideshow。此时每个cell右上角会出现slide type,点击下拉,出现5种选项,意思如下:

Slide:主页面,通过按左右方向键进行切换。
Sub-Slide:副页面,通过按上下方向键进行切换。
Fragment:一开始是隐藏的,按空格键或方向键后显示,实现动态效果。
Skip:在幻灯片中不显示的单元。
Notes:作为演讲者的备忘笔记,也不在幻灯片中显

Matplotlib 在 Jupyter Notebook 上面输出矢量图

import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = 'svg'

只显示markdown和图表

想没有想过一个场景,你的jupyter notebook是导出一个报告给业务人员看的,他们不想看到那些密密麻麻的代码,只想留下markdown和图表,在jupyter notebook加入下面这段代码就好

import IPython.core.display as di

di.display_html('<script><jQuery(function() {if (jQuery("body.notebook_app").length == 0) { jQuery(".input_area").toggle(); jQuery(".prompt").toggle();}});</script>',raw=True)

Jupyter kernels

Jupyter不但可以运行python,还可以运行很多其他语言,
比如Ruby Julia Golang R

Jupyter kernels 列出了不同语言的 Jupyter kernels

2019-04-04

%matplotlib inline

jupyter nbconvert *.ipynb --to slides 
jupyter notebook --ip=0.0.0.0 --allow-root
iruby notebook --ip=0.0.0.0 --allow-root


参考:
https://www.jianshu.com/p/7cac2e5ec35b
https://github.com/SciRuby/iruby
https://github.com/dunovank/jupyter-themes
https://www.dataquest.io/blog/advanced-jupyter-notebooks-tutorial/
https://towardsdatascience.com/speed-up-jupyter-notebooks-20716cbe2025
https://zhuanlan.zhihu.com/p/37590039
https://www.zhihu.com/question/59392251/answer/177708041
https://github.com/jupyter/dashboards
https://github.com/damianavila/RISE

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?