2021-10-15 python from introduction to mastery -- Chapter 18 processes and threads

Using processes and threads process Create process Creating a process using the multiprocessing module Process([group [, target [, name [, args [, kwargs]]]]]) group: the parameter is not used, and the value is never None target: indicates the callable object executed when the current process starts name: indicates the alias of the curren ...

Posted by Thrakorzog on Sun, 17 Oct 2021 22:29:20 -0700

Reptile actual combat | python draw the distribution map of hongxingerke stores in China. Is your city the most?

Recently, Hongxing Erke has been frequently searched Today, let's use python crawler to see how many hongxingerke stores there are in the country First, we open the map and search for 'Hongxing Erke' F12 open the browser developer mode and find the following link. Copy the link to the browser and find that it is a data set in js ...

Posted by Amitk on Sun, 17 Oct 2021 16:33:45 -0700

python learning records - tuples and sets

1. Tuples What is tuple Tuple: One of Python's built-in data structures is an immutable sequence Example: t = ( 'python' , 'hello' , 90 ) Variable and Invariant Sequences Invariant sequence: string, tuple No add, delete, change operations for immutable sequences Variable sequence: list, bullet, set Variable sequences c ...

Posted by crwtrue on Sun, 17 Oct 2021 10:31:10 -0700

2021-10-14 Swordfinger offer 2:37~48 Topics + Thoughts + Multiple Solutions

Write before This article uses python as the programming language and the author practices it by himself. The list of topics is: Swordfinger Offer (2nd Edition) ""Swordfinger Offer (2nd Edition)"passes through the world's classic secrets for programmer interviews. Analyse typical programming interviews, collate the basic kno ...

Posted by Journey44 on Sun, 17 Oct 2021 09:42:20 -0700

Mountain vertex extraction (ArcPy implementation)

1. Background Mountain vertices refer to areas within a specific neighborhood analysis range where the point is higher than the surrounding points. Mountain vertices are important features of the terrain, and their distribution and density reflect the characteristics of the development of the landform, but also restrict the development of the ...

Posted by dragin33 on Sun, 17 Oct 2021 09:23:15 -0700

OpenCV_Image Processing

Grayscale Grayscale import cv2 #opencv reads in BGR format img=cv2.imread('cat.jpg') img_gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) img_gray.shape cv2.imshow("img_gray", img_gray) cv2.waitKey(0) cv2.destroyAllWindows() HSV H - Tone (main wavelength). S-Saturation (shadows of purity/color). V value (intensity) cv2.imshow("hsv", ...

Posted by babybird11 on Sat, 16 Oct 2021 09:22:06 -0700

Python handles Excel and learns these 14 methods to reduce the workload by more than half!

In the age of python, you have to learn some Python in finance, personnel, administration and other posts, which is easy and brain-saving! All operations are automatically implemented in Python, overtime? It doesn't exist! In fact, excel and python are both tools. We don't need to compare them and study which is easy to use. excel, as the most ...

Posted by z1haze on Sat, 16 Oct 2021 00:05:59 -0700

Introduction to python for beginners - functions, classes, modules, packages

14. Function def calc(a ,b):'''establish''' c=a-b return c; calc1 = calc(10, 20)'''call''' calc2 =calc(b=50,a=60) print(calc1) print(calc2) In the process of function call, parameters are passed If it is an immutable object, the modification of the function body will not affect the value of the argument. The modification of a ...

Posted by markmusicman on Fri, 15 Oct 2021 20:48:19 -0700

Python file operation

1, Create and open files open() method The open() method is used to open a file and return the file object. This function is required during file processing. If the file cannot be opened, OSError will be thrown. Note: when using the open() method, be sure to close the file object, that is, call the close() method. The common form of the open() ...

Posted by kellydigital on Fri, 15 Oct 2021 19:42:33 -0700

Union index (leftmost prefix principle)

1) What is a federated index? A federated index refers to indexing multiple columns in a table. In other words, multiple columns on the table add up to form an index for fast query. 2) How do I use federated indexes? First, add an index to the table Add to table when creating table: CREATE TABLE t( a int, b int, primary key(a), ...

Posted by Bit343 on Fri, 15 Oct 2021 14:42:37 -0700