python is a magical language. The magical place is that everything is an object, so if you don't have an object, you should be able to find true love here.
What is all objects? What is an object? What does it have to do with class?
In python, when we define classes, we often
class A(object):
pass
We all know that this object is a paren ...
Posted by Stickdragon on Fri, 20 May 2022 02:57:07 +0300
preface
I Xiaobai, the blog is only for recording my following learning process and results, for your reference only. Welcome to exchange and correct.
1, What is the Traci interface
TraCI is the Traffic Control Interface of micro traffic flow simulation software, The full name is "Traffic Control Interface" ". SUMO its ...
Posted by SetToLoki on Thu, 19 May 2022 22:20:49 +0300
1. Relationship between program processes and threads
Program: An application is a program, such as: qq, crawler
Process: The smallest unit of resource allocation a program runs.
Many people learn python and don't know where to start.Many people learn python, learn the basic grammar, and don't know where to start looking for cases.Many people w ...
Posted by Mortier on Thu, 19 May 2022 19:39:47 +0300
Station P crawler, the analysis process crawls the original drawing in batches png
Website link of P station
1. If you want to crawl the original image in batches, you must first be able to find the download url of the original image. You can't eat a fat man in one bite.
Select the picture review element to find the address of the picture
T ...
Posted by le007 on Thu, 19 May 2022 17:47:59 +0300
I still have the possibility of change
At the thought of this
My heart surged
1, Line detection
The premise of using Hough line transform for line detection is that the edge detection has been completed
# Standard Hough line transformation
cv2.HoughLines(image, rho, theta, threshold, lines=None, srn=None, stn=None, min_theta=None, max_theta= ...
Posted by truCido on Thu, 19 May 2022 11:01:44 +0300
Lock
When reading and writing data globally, if atomic operations cannot be guaranteed, it is easy to pollute the data.
Such as:
import threading
import time
from threading import Lock
l = [0]
def func():
num = l[0]
time.sleep(0.001)
l[0] = num + 1
threads = []
if __name__ == '__main__':
for i in range(100):
...
Posted by Wynder on Thu, 19 May 2022 05:28:58 +0300
In actual development, a large project often needs to use hundreds of Python modules. If these modules are stacked together, it is bound to be difficult to manage.
Moreover, using modules can effectively avoid conflicts caused by duplicate variable names or function names, but what if the module names are repeated?
Therefore, Python proposes th ...
Flask is a Web application development framework based on Python. It is very small but has rich functions. Because it is designed as an extensible framework from the beginning of development, it only has a robust core containing basic services, and other functions can be realized through extension.
The two main dependencies of Flask are: rou ...
Posted by mikejohnston on Thu, 19 May 2022 02:40:12 +0300
I finally wrote the last article, two days later than I said before. This series lasted about 23 days (not counting today). On average, except for this one, it basically conforms to the Flag I set up at the beginning. Although the actual learning time is less than half, such learning efficiency is still too low. My overall course progres ...
Posted by svan_rv on Wed, 18 May 2022 17:11:54 +0300
Topic description
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Now given an array of n integers, look for three numbers that add up to 0. Find all the different groups, each group consists of three numbers, and the sum of the t ...
Posted by BlueSkyIS on Wed, 18 May 2022 09:50:36 +0300