当前位置: 首页 > 软件库 > 神经网络/人工智能 > >

jupyter-tips-and-tricks

Using Project Jupyter for data science.
授权协议 MIT License
开发语言 Python
所属分类 神经网络/人工智能
软件类型 开源软件
地区 不详
投 递 者 邹海荣
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Jupyter Notebook Tips and Tricks

A few (hopefully) useful tips and tricks to using the Jupyter Notebook with an eye to pragmatic usage. This is not, in any way, an exhaustive demonstration of the features of the Jupyter notebook. Further, you can go through these notebooks on your own, but I usually demonstrate using them and give lots of information verbally.

If you have any suggestions, edits, or corrections, please open an issue or let me know some other way. Best of luck!

Assuming you are on a Mac

Install Miniconda (if you haven't already)

cd ~/Downloads
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh
# go through the licensing and accept the defaults
source ~/.bashrc
conda update conda

Create a new conda environments

The following commands are how I set up both my conda config and the enviroments that I use.

Add conda-forge to your automatic channels, and the second line makes it so that you don't have to confirm that you want to install when you do things like conda install numpy.

conda config --add channels conda-forge
conda config --set always_yes yes

This following block is bash -- I recommend pasting in the commands one at a time to see what's happening.

# set the environment name here

envname='dspy3'

packages='
altair
anaconda-client
black
bqplot
ipyvolume
ipywebrtc
ipywidgets
jupyter
jupyter_contrib_nbextensions
jupyterlab
matplotlib
mkl
mpld3
notebook
numpy
pandas
pip
pivottablejs
pyparsing
pyscaffold
qgrid
scikit-learn
scipy
seaborn
sphinx
statsmodels
vaex
vega
vega_datasets
xlrd
yapf
'

conda create -n $envname python=3.8 $packages
conda activate $envname

# Pause here, double check that this pip is the correct one
type pip

# the correct one will say something like... 
# $ type pip
# pip is /Users/jonathan/miniconda3/envs/dspy3/bin/pip

python -m pip install pyhive sql_magic SQLAlchemy nbdime papermill nbdev

# lets the notebook extension (like ToC2) be enabled.
# Might not be needed!
# jupyter nbextension enable --py --sys-prefix widgetsnbextension

# This sets the name of the kernel that you want to select from the Kernel menu
python -m ipykernel install --user --name $envname --display-name "$envname"


# jupyterlab widgets
# conda install -c conda-forge nodejs  
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install ipyvolume jupyter-threejs @jupyterlab/toc
jupyter labextension install jupyter-threejs bqplot nbgather qgrid

Troubleshooting

If you see an error message that says something about the iopub_data_rate_limit when you're trying to plot, try starting the notebook/lab with the following modified commands:

# Run to get a notebook
jupyter notebook --NotebookApp.iopub_data_rate_limit=10000000

# Run to get lab
jupyter lab --NotebookApp.iopub_data_rate_limit=10000000

Extra ideas

# create environment
conda env export -n dspy3 -f environment.lock.yaml
# load
conda env update --file environment.yaml

# to create new python package I did this from root directory of this repo
putup insight
cd insight/
python setup.py develop
  • 1. 在Windows下安装Jupyter Notebook 设置为后台启动,将以下代码保存为jupyter.vbs文件 Dim oShell Set oShell = WScript.CreateObject ("WScript.Shell") oShell.run "C:\Windows\jupyter.exe notebook --no-browser --ip=localhost

  • 原标题:Python编程神器Jupyter Notebook使用的28个秘诀 导读:最近做实验一直是用Jupyter Notebook编程,有一种打草稿的便捷感,在dataquest上看到一篇博客总结了28种Jupyter Notebook的使用技巧。为了方便大家理解,对原文一个简略的地方进行了适当的解释和扩充。希望大家在用Jupyter Notebook编程时可以更加爽快。 作者:李中梁

 相关资料
  • Tips and Tricks for Writing Scientific Papers Table of contents Tips and Tricks for Writing Scientific Papers Table of contents What is this? Typesetting your paper One sentence per line Capitalizatio

  • PyCharm在启动过程中包含各种提示,帮助用户了解其功能和操作。 它还包括一些必须理解的快捷方式。 在本章中,您将看到一些重要的PyCharm技巧。 将文件更改为特定的更改列表 本技巧说明如何根据用户的选择将文件更改为特定的更改列表。 这有助于根据版本控制系统设置管理存储库。 请观察以下屏幕截图以便更好地理解 - 显示class中所有用法的列表 此函数显示项目中特定类,方法或变量中包含的所有用法

  • Handsontable performs multiple calculations to display the grid properly. The most demanding actions are performed on load, change and scroll events. Every single operation decreases the performance,

  • 基本准则 在shouldComponentUpdate中避免不必要的检查. 使用不可变数据类型(Immutable). 编写针对产品环境的打包配置(Production Build). 通过Chrome Timeline来记录组件所耗费的资源. 在componentWillMount或者componentDidMount里面通过setTimeOut或者requestAnimationFram来延迟

  • Tips 在使用生态云某个区域的应用引擎部署应用之前,需要给用户组添加对应的Space的SpaceDeveloper权限。下图是一个示例。 在使用用户画像和用户画像+之前,需要给用户组添加BIGDATA的ACCESS_ALLOW权限,如下图所示。

  • 《PHPer、Gopher成长之路》V1.10 「全原创系列」 记录我在成为一名PHPer、Gopher路上的学习过程 English Version 版权申明 未经版权所有者明确授权,禁止发行本手册及其被实质上修改的版本。 未经版权所有者事先授权,禁止将此作品及其衍生作品以标准(纸质)书籍形式发行。 前言 基础不牢,地动山摇,谨以此句提醒自己。 备注 状态 含义 ��️ 当前未开始总结 �� 总