Install jupyter and set anti substitution

  1. install
python -m pip install jupyter
  1. to configure

2.1 generate configuration file

jupyter notebook --generate-config

2.2 generate login password

python3 -c 'from notebook.auth import passwd; print(passwd("usepassword"));'

2.3 modifying configuration files

vim ~/.jupyter/

2.4 contents of configuration file

c.NotebookApp.allow_origin = '*'
c.NotebookApp.allow_remote_access = True
c.NotebookApp.base_url = '/'
#Set IP access to allow any IP access
c.NotebookApp.ip = '*'
c.NotebookApp.local_hostnames = ['*']
#Set the working path of jupyter
c.NotebookApp.notebook_dir = '/home/ifan/workspace/jupyter'
#Do not open browser
c.NotebookApp.open_browser = False
#The port used for access can be set as an unused port
c.NotebookApp.port = 8888
#Set the login password and replace the content just copied with XXX here
c.NotebookApp.password = ''
#If you add this, you can use token directly or connect directly (you can add it using pycharm)
c.NotebookApp.token ='123456'
  1. If a file does not have permission
export XDG_RUNTIME_DIR="~/workspace/jupyter/data"
  1. start-up
 jupyter notebook
  1. Nginx configuration
server {
    listen          80;
    return 301 https://$server_name$request_uri;

server {
    listen           443 ssl;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;
    ssl_ certificate       fullchain.pem;  #  Certificate path
    ssl_ certificate_ key   privkey.pem;    #  Certificate path
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;preload" always;
    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    add_header X-Xss-Protection 1;

    location / {
        proxy_http_version 1.1;
        proxy_set_header Accept-Encoding gzip;
        # WebSocket support
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_read_timeout 120s;
        proxy_next_upstream error;

        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_connect_timeout 3s;
        proxy_pass         http://localhost:8888;

Recommended Today

Beautify your code VB (VBS) code formatting implementation code

However, does have many new functions that VB6 does not have. The automatic typesetting of code is one, which is the function we want to realize today – VB code formatting.Let’s look at the effect: Before formatting: Copy codeThe code is as follows: For i = 0 To WebBrowser1.Document.All.length – 1 If WebBrowser1.Document.All(i).tagName = […]