Here is a list of several useful coding tips.

Jupyter Notebook

.jupyter/ and .jupyter/jupyter_notebook_config.json are two configuration files, the latter one has higher priority.

jupyter notebook password

will generate password in .json file.

If you want to use password, use the code above. If you want to use no token no password, clear the password in .json file and add jupyter_notebook_token = ""in .py file.


ssh-key is used to provide security. SSH is like a column of boxes. We can apply for one of them. At first, we will have password to login, but for more security, we can buy a pair of key (private key) and lock (public key), we send the lock on the box (We need to add it into authorized _keys) and preserve the key in our .ssh directory locally. The config file is another way to log into ssh without password, which can use the arbitrary id_rsa file (private key) for authentication.


the gateway is the switcher (交换机), which always set it IP as For example, the NAT mode for virtual machine in vmware: we set the vmenet8 (virtual network adapter 虚拟网卡) for the host (宿主) IP as, and the gateway IP as, and the virtual machine IP as Then the virtual machine can reach the internet directly. And it can also be reached from internet by port forwarding on host port.