Learning
Nginx Configuration Problem Record
· β˜• 1 min read
1. server_name Has No Effect Symptom: Nginx reverse-proxies two applications, and the configuration details are as follows. It turned out that requests to b.chenshaowen.com and a.chenshaowen.com both returned responses from service A. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 server

An Introduction to Various Python Environment Isolation Tools
· β˜• 3 min read
1. Non-standard Library 1.1 virtualenv virtualenv is a very popular tool for creating isolated python libraries environments. I strongly recommend you learn about it, because it is very practical and widely used; many people use it to set up python development environments. The other tools below are mainly compared against virtualenv to illustrate the differences.

How to Use Docker to Develop Personal Projects
· β˜• 2 min read
1. About Personal Projects Why emphasize that they are personal projects? Commercial projects have lengthy processes around code hosting, development, operations, and deployment. For an individual developer, such processes are too expensive and work against rapid project iteration. A personal project might be a Demo for learning. Building a Demo

Python2 Source Code Study: Dictionary and List Implementation
· β˜• 5 min read
1. Why Dictionary Lookups Are Faster Than List Lookups First, take a look at the following piece of code. 1 2 3 4 5 6 7 8 9 10 11 12 13 from time import time t = time() data = [chr(i) for i in range(97, 123)] # data =

Python2 VS Python3
· β˜• 1 min read
1. Differences Between Python 2 and 3 Feature \ Version Python 2 Python 3 print as a function print"abc" print(“abc”) Unified class Old-style and new-style classes New-style classes only Floating-point division 1/2=0 1/2=0.5 String formatting %, Format Format,% xrange replaces range xrange range long renamed to int Long,int Int Package imports Relative imports Absolute imports Source file encoding Ascii utf8 The official Python recommendation is strongly in favor of learning Python 3 directly, since Python 2 is only maintained through 2020.