五大Jupyter Notebook 扩展工具(非常实用)Top 5 Best Jupyter Notebook Extensions

Top 5 Best Jupyter Notebook Extensions

Notebook extensions are plug-ins that you can easily add to your Jupyter notebooks. The best way to install them is to use Jupyter NbExtensions Configurator. It will add a tab to let you enable/disable extensions:

Screenshot of NbExtensions Configurator

Screenshot of NbExtensions Configurator

Installation

Installation with conda:

conda install -c conda-forge jupyter_contrib_nbextensions
conda install -c conda-forge jupyter_nbextensions_configurator

Or with pip:

pip install jupyter_nbextensions_configurator jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextensions_configurator enable --user

Find more info about installation here

1 - Collapsible headings

Very useful when dealing with large notebooks, collapsible headings allow you to collapse some parts of the notebooks.

Using collapsible headings

Using collapsible headings

2 - Notify

For long running task, the notify extension sends a notification when the notebook becomes idle.

Using notify

Using notify

To use it, enable the extension and then enable it in the button bar. The number you select is the minimum time the notebook has to run for you to get a notification (Note that you have to keep the notebook open in the browser for the notification to work)

3 - Code folding

Using code folding

Using code folding

4 - tqdm_notebook

This one is not really an notebook extension. TQDM is a progress bar library. But it sometimes fails to work properly on Jupyter Notebooks. Thanks to Randy Olson for the tip:

Randy Olson @randal_olson

TIL: tqdm (the #Python progress bar library) has a specialized "tqdm_notebook" function for use in Jupyter Notebooks.

No more messed up progress bars in my notebooks - hooray!https://pypi.python.org/pypi/tqdm 

  • 185
  • 66 personnes parlent à ce sujet

5 - %debug

Not a notebook extension but an IPython magic command. For a great explanation, I suggest reading the full twitter thread from Radek Osmulski

Radek @radekosmulski

Favorite recent jupyter notebook discovery - the %debug magic:

1. Get an exception.
2. Insert a new cell, type %debug and run it.

An interactive debugger will open bringing you to where the exception occurred and allowing you to look around!

  • 602
  • 221 personnes parlent à ce sujet

6 - Smaller extensions and other tips

  • %lsmagic: Run this in a cell to list all available IPython magics
  • Zen mode extension: removes the menus for less distractions
  • Execute time extension: shows how long a cell took to run
  • autoreload: Autoreloads external files without having to restart the notebook. To enable it:

    %load_ext autoreload
    %autoreload 2
    

You know a must-have notebook extension ? Hit me on twitter or make a pull request on this blog post !

Edit on Wed, Mar 7, 2018:

Some people on Reddit suggested a few more:

  • Variable inspector: displays all variables in a floating window
  • CodeMirror Keymap: lets you choose between key bindings, such as vim
  • Scratchpad: executes code against the current kernel without modifying the notebook document
  • Splitcells: splits cells vertically


From: https://ndres.me/post/best-jupyter-notebook-extensions/

  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值