Jupyter Snippet

持久配置信息

1. 使用tqdm

# 安装tqdm
pip install tqdm
# 安装jupyter notebook
pip install notebook
# 安装插件
pip install ipywidgets
# 启用插件
jupyter nbextension enable --py widgetsnbextension
# 启动笔记本
jupyter notebook &
from tqdm import tqdm_notebook
import time

for i in tqdm_notebook(range(100),desc='demo:'):
    time.sleep(0.01)

临时设置

显示每个变量

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

你可能感兴趣的:(Jupyter Snippet)