useful plugin
install plugin
1.pip direct installation
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
2. If method 1 is unsuccessful, use anoconda installation
to open Anaconda Prompt and enter the installation command
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
After the installation is successful, open jupyter, and a plug-in window will appear on the page.
If conda has been installed but failed, uninstall and reinstall:
conda remove jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextensions_configurator enable --user
code auto-completion
Hinterland Code Completion: Automatically complete code.
variable view highlighting
Select Nbextensions and check Highlight selected word.
code folding
Codefolding in Editor: Add the function of folding code,
and you can also fold by title: Collapsible headings
show line number
Menu bar View------Toggle Line Numbers
can also use plug-ins: Toggle all line numbers to display code line numbers.
execution time
Execute time displays the execution time
multiline print
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
Canonical code
PEP8 specification code optimization: Code prettify
follows the PEP8 Python coding specification: link: "PEP 8 – Style Guide for Python Code" beautifies the code, relying on the YAPF module developed by Google.
Module quick access
Quick access to Document:
Quickly add python, examples of common modules, documents, etc. in the Snippets menu.
Install the package in jupyter notebook
To install the package in jupyter notebook, add "!" in front of the installation command.
! pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pygtrans
hot key
Reference link: https://zhuanlan.zhihu.com/p/346703253