Python magic method

Refer to the official documents of python3.7 Basic method __class__ See__ name__ __name__ 1) Current module name, of the directly running module__ name__ Is'__ main__‘, Other modules are 'module name' or 'package name. Module name' # tmpPkg.tmp.py print(f'tmp.py {__name__}') # main.py import tmpPkg ...

Posted by TubeRev on Wed, 10 Aug 2022 21:40:11 +0300

Creation of NumPy array

1, NumPy create array In addition to using the underlying ndarray constructor, the ndarray array can also be created in the following ways. 1.numpy.empty numpy. The empty method is used to create an uninitialized array with a specified shape and data type: numpy.empty(shape, dtype = float, order = 'C')   shape Array shape dtype Data type ...

Posted by lutzlutz896 on Sun, 31 Jul 2022 21:39:53 +0300

Automatic recognition of nucleic acid detection time by software using OpenCV

Question introduction In the program engineering training course, a problem occurred: Mobile phone screenshot nucleic acid detection report, using OpenCV software to automatically identify whether the time for nucleic acid detection is within 72 hours. I. Preparations Software needed to accomplish this task: - Python3.x - OpenCV-Py ...

Posted by fitzromeo on Sat, 02 Jul 2022 22:04:45 +0300

python based integrated student information management system for teachers and students -- python final design!!!

System introduction The system uses python language for program design. The main contents of the design can be summarized as follows: the teacher-student integrated student information management system, first of all, the administrator (teacher) adds, deletes, modifies, finds and exports student information (in the form of excel form), and the ...

Posted by narch31 on Fri, 01 Jul 2022 21:35:10 +0300

day8 - sets and strings

aggregate A collection is a container data type; Take {} as the flag of the container, and multiple elements are separated by commas: {element 1, element 2...} the set is variable and unordered Element: immutable and unique Empty set: x = {} is a dictionary ​ y = set() is an empty set The collection has its own de duplication function set3 ...

Posted by dave_2008 on Wed, 25 May 2022 21:05:39 +0300

How does the automated test parse the excel file?

foreword In automated testing, we store data nothing more than using files or databases, so the files can be csv, xlsx, xml, or even txt files. Usually, excel files are often our first choice. Whether it is writing test cases or storing test data, excel is Very convenient. So today, we will summarize the methods of processing excel files in dif ...

Posted by raven_web on Wed, 25 May 2022 15:58:56 +0300

Heap and heap sorting

Heap and heap sorting Definition of heap The heap is a complete binary tree: except for the last layer, the other layers must be full at several points, and the nodes of the last layer must be filled gradually from left to right The value of each parent node in the heap must be greater than or equal to (or less than or equal to) the value of ...

Posted by activeradio on Wed, 25 May 2022 13:10:30 +0300

Simple while loop exercise (python)

Record simple while loop exercises Topic 1: Use the while loop to output 1 2 3 4 5 6 8 9 10 count = 0 while count < 10: count+=1 if(count != 7): ​ print(count) Problem solving ideas: This question is relatively simple, that is, print the number of 1-10 except 7 Let's make it a little simpler and print out 1-10 in a cycle count ...

Posted by veryconscious on Wed, 25 May 2022 11:47:58 +0300

Explain the custom functions in Python with the story of "restaurant packaging"

Note: The blogger is not a Python professional programmer. He is 12 years old and Python is less than 1 year old. 😃 Hope to help some Python novices through this column! Hi~ Hello everyone! As we said in the last blog post, if there are some functions that can only be implemented with tens of thousands of lines without a library, you can only ...

Posted by dkode on Wed, 25 May 2022 08:36:48 +0300

Crawling pictures with Python, the content is too real!

foreword Sometimes, we like to go to the website to browse some beautiful pictures, or we need some good-looking pictures as materials in our daily work and study, or we want to pass the time and relax when we are bored. Click on the links one by one to browse? I think in this era of data explosion, is it a bit time-consuming to do this, let's ...

Posted by psychotomus on Tue, 24 May 2022 22:50:47 +0300