zoukankan      html  css  js  c++  java
  • jupyter c++/python/js/ts

    jupyter notebook和juypter lab 对windows c++ kernel都支持的不好:

    https://github.com/jupyter/jupyter/wiki/Jupyter-kernels

    如果要用(cling 或者xeus-cling),只能选中*nix平台, 测试windows wsl也可以,步骤如下

    1.安装wsl

    2.装miniconda,不要装anaconda(里面的zmq会和cling冲突)

    3.安装python包

    conda install     -c conda-forge    jupyterlab
    conda install     -c conda-forge    xeus-cling
    conda install     -c conda-forge    boost
    

    4.配置jupyter lab

    jupyter  lab     --generate-config

    jupyter_lab_config.py 内容:(密码abc123)

    c.NotebookApp.notebook_dir = '/mnt/d/jupyter'
    c.NotebookApp.ip = '0.0.0.0'
    c.NotebookApp.password = 'sha1:9fb88efadb70:8cb38c269297edbbc6a02f5b11ad8d346e2b9fdd'
    c.NotebookApp.open_browser = False
    c.NotebookApp.port = 33333
    c.NotebookApp.allow_remote_access = True
    
    5.如果有权限问题:
    chmod 777 /home/wyt/.jupyter/jupyter_lab_config.py
    chmod 777 /home/wyt/.condarc
     
    6.重启一下wsl(wsl -t debian),不会的话重启电脑
     
    7.运行:jupyter-lab
     
    8.几个测试代码
    #include <stdio.h>
    printf("hello, world.
    ");
    
    #include <boost/format.hpp>
    #include <boost/tokenizer.hpp>
    #include <boost/algorithm/string.hpp>
    #include <boost/algorithm/string/join.hpp>
    
    std::vector<std::string> cmdarray;
    boost::split(cmdarray, "abc def.123;456", boost::is_any_of(" .,:;"), boost::token_compress_on);
    std::cout << "output size: " << cmdarray.size() << std::endl;
    
     
  • 相关阅读:
    纯JavaScripst的全选、全不选、反选 【转】
    Java 文件和byte数组转换
    nc命令使用详解
    mtr 命令详解
    Nginx主动检测方案---Tengine
    Apache相关安全设置
    tomcat APR的配置
    Vsftpd 配置详解
    FTP主动模式和被动模式的区别
    iptables配置详解
  • 原文地址:https://www.cnblogs.com/wjx0912/p/14608103.html
Copyright © 2011-2022 走看看