1. 程式人生 > >Jupyter notebook用法

Jupyter notebook用法

參考官網文件:https://jupyter-notebook.readthedocs.io/en/stable/public_server.html

0.介紹jupyter notebook

(此前被稱為 IPython notebook)是一個互動式筆記本,支援執行 40 多種程式語言。

Jupyter Notebook 的本質是一個 Web 應用程式,便於建立和共享文學化程式文件,支援實時程式碼,數學方程,視覺化和 markdown。 用途包括:資料清理和轉換,數值模擬,統計建模,機器學習等等。

他的一個很大優點就是可以把程式碼、執行結果儲存在一個notebook中,這對於學習演算法比較重要,因為以後看程式碼的時候,可以很明確程式碼執行結果(尤其是在影象處理方面)。

1.安裝jupyter notebook

檢查是否有安裝jupyter notebook,終端輸入jupyter notebook,如果報錯就是沒有啦,那麼就要用下面命令安裝。

$sudo pip install pyzmq
$sudo pip install tornado
$sudo pip install jinja2
$sudo pip install jsonschema
$sudo pip install jupyter

2.生成配置檔案

$jupyter notebook --generate-config

啟動

$jupyter notebook

生成金鑰,密碼為admin

3.修改預設配置檔案

$vim ~/.jupyter/jupyter_notebook_config.py

進行如下修改(這裡可以自行配置):

c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:784e14cad32b:1d768f3613ae1a8ff7d74ca34b741591d6656767'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888 #隨便指定一個埠
c.IPKernelApp.pylab = 'inline'

4.啟動Jupter notebook

$jupyter notebook

或啟動Jupter notebook並指定埠

$jupyter notebook --no-browser --port=8889

5.訪問WEB頁面

http://localhost:9999/

6.create a new notebook with python3新建檔案

內容:

%matplotlib inline

import numpy as np
import matplotlib.pyplot as plt

x=np.arange(9)
y=np.sin(x)
plt.plot(x,y)
plt.show()

7.安裝python庫

$ pip install matplotlib

8.筆記效果

%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np

x = np.arange(20)
y = x**2

plt.plot(x, y)

相關推薦

jupyter notebook用法積累(快捷鍵)

開啟Anaconda promt,如果想把代打都存在H:\python\py, 則輸入命令 h: 回車進入h盤, 再輸入 cd python\py回車就進入這個H:\python\py目錄下 再輸入jupter notebook 回車就打開了瀏覽器 ctrl+回車 可以當前塊執行,

Jupyter notebook用法

參考官網文件:https://jupyter-notebook.readthedocs.io/en/stable/public_server.html 0.介紹jupyter notebook (此前被稱為 IPython notebook)是一個互動式筆記本,支援執行 40 多種程式語言。 Jupyter

Jupyter notebook教程系列(二)Jupyter notebook的基本用法

Jupyter notebook的基本使用   一. 主頁面 如圖1-1 我們先介紹一下主頁面上的內容: 1.Files頁面是用於管理建立檔案相關類目的。 2.Running頁面主要展示的是當前正在運行當中的終端和“ipynb”格式的notebook

jupyter notebook用法

輸入單詞以後按下tab鍵以後 出現提示 a是個矩陣或者陣列,a.flatten()就是把a降到一維,預設是按橫的方向降>>> a = np.array([[1,2], [3,4]])>>> a.flatten()array([1, 2, 3, 4])>>>

jupyter notebook 各種用法記錄(陸續更新)

Jupyter notebook )前身為IPython Notebook,學習時,可以找兩者的教程 Jupyter安裝 先決條件:已經安裝了Python(python 2.7 或者是python3.3) 安裝:  官方建議利用Anaconda安裝Jupy

jupyter notebook

登錄密碼 gen onf word jupyter notebook str -- -c 生成配置文件jupyter_notebook_config.py(~/.jupyter下) jupyter notebook --generate-config IP綁

jupyter notebook 的快捷鍵【轉】

details 允許 space -s 標題 log 命令模式 綠色 ebo Jupyter Notebook 有兩種鍵盤輸入模式。編輯模式,允許你往單元中鍵入代碼或文本;這時的單元框線是綠色的。命令模式,鍵盤輸入運行程序命令;這時的單元框線是灰色。 命令模式

初學者需要IPython 與 Jupyter Notebook 嗎?

寫代碼 註釋 使用 多功能 寫博客 初學 教程 運行 穩定 ipython 是 jupyter notebook的前身並擁有ipython的全部功能 jupyter擁有 cell, markdown 整合的功能, 能同時運行代碼, 而且是多組的. 同時也可以插入mark

windows遠程訪問ubuntu下的jupyter notebook必要配置

src d3d 默認 from alt .cn onf generate ebo 0.生成配置文件(一般采用默認) jupyter notebook --generate-config 1.打開ipython, 創建一個密文密碼 In [1]: from notebo

Linux Ubuntu下Jupyter Notebook的安裝

log all 編寫 note 編程語言 python logs ipython 筆記 Jupyter Notebook, 以前又稱為IPython notebook,是一個交互式筆記本, 支持運行40+種編程語言. 可以用來編寫漂亮的交互式文檔. 安裝步驟: pi

Jupyter Notebook 快捷鍵

分割 strong delet 啟動 -h 剪切 幫助 style 編輯 Jupyter Notebook 的快捷鍵 Jupyter Notebook 有兩種鍵盤輸入模式。編輯模式,允許你往單元中鍵入代碼或文本;這時的單元框線是綠色的。命令模式,鍵盤輸入運行程序命令;這時的

2、Jupyter Notebook 快速入門

style 獲得 名稱 有趣的 pri 16px move 連接 res Jupyter Notebook(此前被稱為 IPython notebook)是一個交互式筆記本,支持運行 40 多種編程語言。這裏,我們將介紹 Jupyter notebook 的主要特性

jupyter notebook在網頁上顯示作圖

jupyter notebook matplotlib 今天嘗試使用jupyter notebook作圖像展示工具時,發現用matplotlib所作的圖像會自動啟動一個圖像展示窗口,無法顯示在網頁上,而我的初衷是使用jupyter notebook做圖像即時呈現及存儲(有點類似PPT作圖)

jupyter notebook在Mac上安裝

jupyter notebook安裝 mac 在mac上安裝jupyter notebook還算順利,主要是借鑒了mybefly的分享文檔,這裏講安裝過程使用到的步驟做一個記錄: 1.升級pip:sudo python -m pip install --upgrade --force pip

windows10 下安裝tensorflow 並且在jupyter notebook 上使用tensorflow

回車 電腦 con 支持 連接 span python cond tps 1.安裝jupyter notebook並配置環境 首先建議大家安裝anaconda,最新版本請到官網下載(點擊下載連接),沒錯,直接點擊下載python3.6版本的(當然選擇做自己電腦相應的

安裝python的jupyter notebook工具

結果 .cn com note -- 分享 工具 .com nbsp jupyter notebook是一個通過網頁運行python的工具 支持分段的python運行,並能直觀的查看結果 支持多python環境運行,需要加裝(conda) 安裝步驟 1.安裝pyt

Cheat sheet for Jupyter Notebook

cdi ref ax1 cdc rec 公眾 str 部分 ros 近期,DataCamp發布了jupyter notebook的 cheat sheet,【Python數據之道】第一時間與大家一起來分享下該cheat sheet的內容。 以下是該cheat

Jupyter-NoteBook工具介紹(網頁版編輯器)

命名 編輯 notebook 分享 安裝完成 cond height 編輯器 con 1.Jupyter-NoteBook位置   在安裝完anaconda後,這個工具已經被安裝完成。    2.打開       3.功能講解    4.其余的功能   可以對文

jupyter notebook 設置默認目錄

config div 文件 images 啟動 jupyter .com 分享 自己 1、打開 cmd 輸入命令 jupyter notebook --generate-config 可以看到生成文件的路徑,這個就是生成的配置文件jupyter_notebook_conf

Jupyter Notebook的魔法

bubuko class 選中 定義 合並 ebo 光標 分享圖片 鍵盤輸入 在騰訊雲上搭建了一個Jupyter Notebook 還是很好用的, 這裏總結了一些看到的小技巧及快捷鍵使得我們更加快捷的完成工作。 Notebook 與 Vim 有些類似,有兩種鍵盤輸入模式,即