0%

Jupyter-Notebook-Tutorial

简介

The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.[1]

Jupyter Notebook 可以很方便的共享自己的成果。

安装

1
pip install jupyter

启动

进入 notebook 目录,执行以下脚本(可选:https,root权限)

1
2
#! /bin/bash
jupyter notebook --certfile /etc/nginx/ssl/example.com.cer --keyfile /etc/nginx/ssl/example.com.key --allow-root > note.log 2>&1 &

停止

1
jupyter notebook stop

或者

1
2
3
4
5
#! /bin/bash
pid=`ps -ef | grep 'jupyter-notebook' | grep -v 'grep' | awk '{print $2}'`
if [[ -n $pid ]]; then
kill -9 $pid
fi

修改密码

1
jupyter notebook password

参考