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

     

     

     

     

     
  • 相关阅读:
    mybatis 动态sql
    linux shell 之 crontab(定时任务)详解
    FTP定时批量下载文件(SHELL脚本及使用方法 )
    腾讯云数据库团队:MySQL5.7 JSON实现简单介绍
    Chisel Tutorial(七)——模块
    大数问题解决模板
    可靠的功能測试--Espresso和Dagger2
    hdoj 1698 Just a Hook 【线段树 区间更新】
    平衡二叉树
    WPF中DependencyObject与DependencyProperty的源代码简单剖析
  • 原文地址:https://www.cnblogs.com/greentomlee/p/6498403.html
Copyright © 2011-2022 走看看