zoukankan      html  css  js  c++  java
  • iPython与notebook的基本用法


     

    1 Ipython 安装

          pip install ipython

    2 Notebooke 基本用法

         启动ipython使用ipython

         启动notebook 使用 ipython notebook

    3 远程使用Ipython notebook 的配置方法

         3.0 创建远程服务

                     语法:  ipython profile create <你要创建的服务器名>

                     e.g.:

                             ipython profile create myserver

                  此时终端会输出 生成的文件位置, 请记住这个位置

         3.1 配置openssl 认证

                       openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

    此时会输出生成的sha 的值, 请记住输出

                   为了方便今后的使用: 此时可以将 mycert.pem 证书移到 ipython notebook的文件夹,将相关的东西放在一起。

           mv mycert.pem .ipython

         3.2  修改配置文件

    c = get_config()
    
    # Kernel config
    c.IPKernelApp.pylab = 'inline'  # if you want plotting support always
    
    # Notebook config
    c.NotebookApp.certfile = u'/home/XXX/.ipython/mycert.pem' ##认证的位置
    c.NotebookApp.ip = '*'
    c.NotebookApp.open_browser = False
    c.NotebookApp.password = u'sha1:XXXX' ## 认证输出的sha值
    # It's a good idea to put it on a known, fixed port
    c.NotebookApp.port = 9999
     
     
     

          3.3 重新启动ubuntu, 并且启动ipython notebook 服务器

           ipython notebook --profile=nbserver

          3.4 远程连接Ipython NoteBook

          打开本地浏览器访问远程noteBook 地址就行,记住端口号是9999

     

     

     

     

     
  • 相关阅读:
    ACM: HDU 2544 最短路-Dijkstra算法
    ACM: HDU 1874 畅通工程续-Dijkstra算法
    ACM: SGU 101 Domino- 欧拉回路-并查集
    ACM: HDU 1285 确定比赛名次
    ACM: hdu 2647 Reward -拓扑排序
    ACM: hdu 1811 Rank of Tetris
    ACM: poj 1094 Sorting It All Out
    ACM: hihicoder #1174 : 拓扑排序·一 STL- queue
    ACM: CodeForces 140A New Year Table-数学几何
    POJ 3122 Pie 二分枚举
  • 原文地址:https://www.cnblogs.com/greentomlee/p/6498403.html
Copyright © 2011-2022 走看看