Nginx + tornado + supervisor deployment
Reference link: supervisor + Tornado + Nginx usage details, Using tornado, supervisor, nginx website, Official documents of tornado
https://blog.csdn.net/tengzhaorong/article/details/12833157
Project document tree:
.
├── chnservices
│ └── channels.py
├── etc
│ ├── chnservices.conf
│ ├── nginx
│ │ └── nginx.conf
│ ├── supervis ...
Posted by quercus on Tue, 05 May 2020 07:25:07 -0700
else statement is related to with statement
Notes:
reference resources: http://blog.csdn.net/junwei0206/article/details/45065491
1. Use of else statement:
1) Match with if statement
2) In the while and for loops, execute only after the loop is completed. If break is used in the loop, else does not execute.
#*************************************************# ...
Posted by Andrew B on Tue, 05 May 2020 03:09:57 -0700
python learning 3--python complex data types
1 piles
A heap is a binary tree in which the value of each parent node is less than or equal to that of all its children, and the smallest element is always at the root of the binary tree.
Heap creation
import heapq
import random
data = range(10)
random.shuffle(data) #Disorder order
heap = []
for n in data:
heapq.heappush(heap,n)
print ...
Posted by Waire on Tue, 05 May 2020 02:21:30 -0700
MySQL command auto completion tool -- mycli installation
1. Install pip based on python
[root@mysql ~]# yum -y install python-pip python-devel
[root@mysql ~]# crul https://bootstrap.pypa.io/get-pip.py -o get-pip.py
[root@mysql ~]# python get-pip.py # Don't worry if yellow words or similar words appear in this command. It's not an error. It's just a warning that Python version is lower than ...
Posted by drak on Tue, 05 May 2020 00:43:02 -0700
Convolution kernel weight of self defined neural network in Python
1. Convolution kernel weight of self defined neural network
Neural network is deeply loved by deep learners. One of the reasons is the convenience of neural network. Users only need to build neural network framework like building blocks according to their own needs. In the process of building, we only need to consider the size of convolution co ...
Posted by geoffism on Mon, 04 May 2020 22:12:44 -0700
Python script implementation source installation python2/3
1. Why python is selected for scripting:
python has a large number of third-party libraries, which is very convenient to call
python language is simple and clear
Think about it: the comparison shows why large-scale enterprises prefer python to shell
The syntax of shell implementation is too cumbersome and the amount of code is large
...
Posted by exa_bit on Mon, 04 May 2020 19:29:47 -0700
Web static server
Web static server
Programming micro
Web static server-1-display fixed page
#coding=utf-8
import socket
def handle_client(client_socket):
"Serving a client"
recv_data = client_socket.recv(1024).decode("utf-8")
request_header_lines = recv_data.splitlines()
for line in request_header_lines:
print(line)
# Organize corr ...
Posted by magaly on Mon, 04 May 2020 18:50:22 -0700
Offline data migration DataX3 initial use
DataX3 is still very convenient to use. Here are some official things
GitHub address of DataX3 https://github.com/alibaba/DataX , which contains the introduction of DataX3 and download link.
How to use DataX3 https://github.com/alibaba/DataX/wiki/Quick-Start
Configuration parameters of various reader s and writer s https://github.com/alibab ...
Posted by phpwolf on Mon, 04 May 2020 13:12:47 -0700
Python - modules and packages (common modules)
Modular
In Python, a. py file is called a module
Greatly improves code maintainability
You don't have to start from scratch to write code. When a module is written, it can be referenced elsewhere
vim mymod.py
import mymod
mymod.hello()
mymod.world()
package
What if different people write the same module name? ...
Posted by luke101 on Mon, 04 May 2020 09:22:38 -0700
Upgrade of python script -- nail group chat robot
A small script (for work) The script of monitoring written in this article is the email used when sending monitoring. In fact, it is inconvenient to check the email, so it is upgraded,
In our work, we often use nails. If we can use nails, we can send them directly to our nails after our monitoring is successful. It's simple and convenient
The ...
Posted by mosherben on Mon, 04 May 2020 04:44:32 -0700