Jupyter Notebook In Docker for Server

生成jupyter配置文件,这个会生成配置文件.~/.jupyter/jupyter_notebook_config.py

jupyter notebook --allow-root --generate-config

使用ipython生成密码

In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password: 
Verify password: 
Out[2]: 'sha1:XXX'

去配置文件.~/.jupyter/jupyter_notebook_config.py中修改以下参数

c.NotebookApp.ip='*'                          #绑定所有地址
c.NotebookApp.password = u'sha1:XXX'
c.NotebookApp.open_browser = False            #启动后是否在浏览器中自动打开

c.NotebookApp.port = 8888                      #指定一个访问端口,默认8888,注意和映射的docker端口对应

start jupyter notebook --allow-root

浏览器打开

https://xxx.xxx.xxx.xxx:8888/

recent article

read .PFM images

matlab codefunction D = pfmread(filename_pfm) fid = fopen(filename_pfm); fscanf(fid,'%c',[1,3]);cols = fscanf(fid,'%f',1);rows = fscanf(fid,'%f',1);fscanf(fid,'%f',1);fscanf(fid,'%c',1);D = fread(fid,[cols,rows],'single');D(D == Inf) = 0;D = rot90...…

computer science deep learning matlab blogread
previous article

image visualization

a code exampleimport cPickleimport numpy as npimport matplotlib.pyplot as pltfrom matplotlib.patches import Rectangle#from src import api as vgfrom PIL import Image as PIL_Imageimport requestsfrom StringIO import StringIOobj = [] # 201rel = [] #...…

computer science deep learning python blogread