★★ | MySQL | how to filter out duplicate data for mass insertion?

        There are six tables in the online library with duplicate data, two of which are relatively large, one 960000 + and one 300000 +. Because the same problem has been handled before, we directly brought the last Python de duplication script. The script is very simple, that is, connect to the database, find out the dupli ...

Posted by durahman on Sun, 28 Nov 2021 13:09:09 -0800

[opencv] image processing: boundary filling, image fusion, image threshold, numerical calculation

The main contents are: boundary filling cv2.copyMakeBorder(), numerical calculation   cv2.add(), change size   cv2.resize(), image fusion   cv2.addWeighted(), image threshold   cv2.threshold() Before we start, let's import the images, which we need in the img. An image display function is defined to facilitate the next dra ...

Posted by hybmg57 on Sun, 28 Nov 2021 12:41:50 -0800

python exception handling

1. Exception handling The difference between Error and Exception: Error is a system error that programmers cannot change or handle, such as a system crash, insufficient memory, method call stack overflow, etc. In the event of such an error, it is recommended that the program be terminated. Exception indicates an exception that the progra ...

Posted by rofl90 on Sun, 28 Nov 2021 11:24:00 -0800

Python climbed to the top 500 of the cool dog hot list

1. Using beautiful soup First, import the requests module and the beautiful soup module. Click on the lower left corner. Open the interpreter settings and search for the module you want to import. [the external chain image transfer fails. The source station may have an anti-theft chain mechanism. It is recommended to save the image and upload ...

Posted by TheChief on Sun, 28 Nov 2021 08:36:38 -0800

Pytest framework and Application

2.9.1 PO design mode Before talking about Pytest, let's take a look at what is the PO (Page Object) design pattern. Why reference PO design patterns? PO provides a mode of separating business process from page element operation, which makes the test code clearer. PO (Page Object) Page Object model is a design pattern used to manage and maintai ...

Posted by mverrier on Sun, 28 Nov 2021 07:14:29 -0800

Explain multithreading and multiprocessing in detail. After reading it, you will understand

What are Python's support modules for concurrent programming? Module nameeffectthreadingRealize multithreading, and make use of the principle that the computer CPU and IO can execute at the same time, so that the CPU can access another task during the computer IO operation.multprocessingmultprocessingasyncioRealize asynchronous IO, and realize ...

Posted by gillypogi on Sun, 28 Nov 2021 07:02:26 -0800

Using the zipfile module of python to solve the problem of word batch generation

Platform: windows10Interpreter: Python 3.7 Task requirements There is an existing excel document containing target data. You need to replace the corresponding content of each line of data in the specified word and save it one by one. Task Disassembly First, check the word document format. You can see that the file suffix is. doc. What n ...

Posted by Pellefant on Sun, 28 Nov 2021 00:31:55 -0800

Educoder Linux and Python Programming 2021 (sequence and selection structure)

Note: all topics are in one blog hey 😎 Level 1: sequential structure Task description The most basic structure of the program is the sequential structure. The sequential structure is that the program executes each statement from top to bottom according to the statement order. This level requires learners to understand the sequential struc ...

Posted by swamp on Sun, 28 Nov 2021 00:18:53 -0800

Here are 73 examples. Thoroughly master the usage of f-string!

Original text: https://jishuin.proginn.com/p/763bfbd32655 In this article, I'll show you some of the techniques I think are most important for Python to format string f-string. You will learn a variety of ways to format strings through various examples. Overall, you'll see 73 examples of how to use f-string perfectly.   List of contents   1. Wh ...

Posted by LuiePL on Sat, 27 Nov 2021 23:50:33 -0800

Crawler: introduction to basic parsing library urllib

catalogue 1. Send request     data parameter   timeout parameter Other parameters     Comparison between urlopen and Request Use Request for flexible configuration Advanced Usage Password verification Use of agents Cookie processing In Python 2, there are urllib and urllib libraries to send requests. In ...

Posted by feri_soft on Sat, 27 Nov 2021 23:32:30 -0800