Introduction to producer consumer model
1. Why the producer consumer model is needed
Producer refers to the task of production data, and consumer refers to the task of consumption data.
When the producer's production capacity is far greater than the consumer's consumption capacity, the producer needs to wait for the consumer to consume before c ...
Posted by Spaceboy on Fri, 08 May 2020 12:27:28 +0200
There are at least two types of errors in Python: syntax errors and exceptions.
Syntax errors are also called parsing errors:
>>> while True print('Hello world')
File "<stdin>", line 1
while True print('Hello world')
SyntaxError: invalid syntax
The parser indicates the error line ...
Posted by bigger on Thu, 07 May 2020 10:12:10 +0200
We can get the json file to be parsed and convert it to json for saving by using Charles to grab the package and transfer the interface automation test case. So let's read it.
First of all, let's look at the last document,
"name": "testcase description",
Posted by saami123 on Wed, 06 May 2020 16:46:24 +0200
Python Basic Tutorial
Configuring the Python environment in SublimeEditor
Add comments to Python code
Use of variables in Python
Data types in Python
Keyword in Python
Python string operations
list operation in Python
Tuple operation in Python
Pythonmax() and min() - Find the maximum and minimum values in a list or array
Python finds the large ...
Posted by smallflower on Wed, 06 May 2020 03:17:12 +0200
cookie usage for urlib:
If you already know the cookie, or the cookie you obtained through packet grabbing, you can log in directly in the header's information;
The cookie information on the website of Jingdong is different from that on the website of Jingdong,
You can log in to JD, grab the cookie information, and t ...
Posted by clanstyles on Wed, 06 May 2020 02:06:44 +0200
9. Three classes (December 20)
17.3 / 17.4 cellery multi instance
Multiple worker s, multiple queues
[root@localhost celery]# cat tasks.py
#-*- coding:utf-8 -*-
from celery import Celery
app = Celery()
return x + y
Posted by neostrife on Tue, 05 May 2020 21:39:28 +0200
Reading notes: Both repr and str are used for display. str is user oriented, while repr is programmer oriented.
repr means representation and description.
To display objects using print(Object), you need to refactor str. To directly input class objects for printing, you need to refactor the repr.
In python, str is us ...
Posted by wing_zero on Tue, 05 May 2020 08:20:42 +0200
LeetCode -- longest substring without duplicate characters
The information in this article comes from the Internet and personal summary, which is intended to summarize personal learning and experience. If there is any infringement, please contact me to delete it. Thank you!
leetcode Question, Interview 48
The longest ...
Posted by calevans on Sun, 03 May 2020 05:39:23 +0200
Installation environment: CentOS release 6.5 (Final) 64 bit
1. Install Python
Python 2.6 comes with CentOS, but pip does not support this version. You need to upgrade Python to 2.7 first, and python 2.6 is required for yum, so Python needs to coexist with 2.6 and 2.7
# Install compilation tools and dependency Librari ...
Posted by free2code on Sat, 02 May 2020 08:38:18 +0200
[notice: All Rights Reserved. Please reprint. Do not use for commercial purposes. Contact email: firstname.lastname@example.org]
Because there are not many opportunities to write multiple processes, we do not pay much attention to this aspect. Therefore, the multi process code has not been mastered. In fact, from the bottom of my heart, I know that mu ...
Posted by gabereiser on Sat, 02 May 2020 05:18:09 +0200