Numpy quick start - advanced array operation
1, Change the shape of the array
functioneffectnp.reshape(a, newshape)a is an array and newshape is an integer tuple; Returns an array of newshape shapesnp.ravel(a)Flatten into a one-dimensional array; Equivalent to NP reshape(a, -1)np.flatten(a)The effect is the same as that of t ravel, but flatten is more recommended
1.1 np.reshape()
A ...
Posted by n_wattam on Tue, 08 Feb 2022 16:45:31 +0100
Python foundation 6 -- class 1 (static class and dynamic class)
catalogue
1, Static class
2, Dynamic class
Classes are divided into static classes and dynamic classes. Static classes can be understood as a collection of functions with the same characteristics into one class. Dynamic classes are simply understood as instantiated classes. The key difference is that static classes do not have self keyword ...
Posted by tommyboy123x on Tue, 08 Feb 2022 16:15:03 +0100
Using selenium python to realize basic automatic testing
Installing selenium
Open the command control character input: pip install -U selenium
Firefox browser installation firebug: www.firebug.com COM, debug all website languages and debug functions
Selenium IDE is a plug-in embedded in Firefox browser to realize the recording and playback function of simple browser operation. The script recorded ...
Posted by olly79 on Tue, 08 Feb 2022 14:15:43 +0100
Python project alien invasion: Aliens
Python project alien invasion (II): Aliens
In this chapter, we mainly complete the following functions. First, add an alien at the edge of the screen, and then try to generate a group of aliens. We make these aliens move like two hundred years and below, and delete the aliens hit by the bullet. Finally, we show the number of ships the play ...
Posted by Sgarissta on Tue, 08 Feb 2022 13:44:58 +0100
Opencv Python learns the basic processing and geometric transformation of pictures
1, Basic image processing -- operation
All the following functions are omitted cv2.
1.1.1 addition operation
As has been said before, for a computer, an image is just a matrix.
The addition of images is the addition of matrices.
We use the add(a, b) function to realize the image addition operation.
Note: when a + B < = 255, a+b = a+b; ...
Posted by versatilewt on Tue, 08 Feb 2022 10:58:28 +0100
Depth first search pruning (jisuanke - Lanqiao cup national competition training camp)
Depth first search pruning
We have learned that the search process will eventually generate a search tree. Pruning, as the name suggests, is to cut down unnecessary subtrees on the search tree through some judgment. Sometimes, we will find that the state of the subtree corresponding to a node is not the result we want, so we don't need to ...
Posted by dch27 on Tue, 08 Feb 2022 10:16:39 +0100
Research Report reproduction series [Everbright Securities] volume is just when entering the market: a preliminary study on the timing of trading volume
preface
We are students of domestic colleges and universities and beginners of quantitative investment. Our school is not reopened in northern Qing Dynasty, nor does it have a financial engineering laboratory. At the same time, it is located in a third tier town. Therefore, it is difficult for us to obtain quantitative internship opportunities ...
Posted by fean0r on Tue, 08 Feb 2022 09:43:25 +0100
10 minutes to make open source pip package
1, Understanding PyPI
It can be understood that it is a package management platform. All packages we commonly use will be hosted on this platform. Through pip install xx, we will find this package in PyPI and download it to our computer.
2, Process analysis
For module developers, there are essentially three things to do:
Open the refrig ...
Posted by 5kyy8lu3 on Tue, 08 Feb 2022 06:32:56 +0100
Redis operation Python series, redis basic command set ๏ฝ CSDN creation punch in
Reading guide
Set type is a set of string type, which is characterized by disordered and non repetitive set elements. Each set can store 232 - 1 elements (more than 4 billion) at most. Set type mainly has the following application scenarios.
1. Collection of friends / followers / fans / interested people
The unique feature of set typ ...
Posted by mclamais on Tue, 08 Feb 2022 00:31:28 +0100
Naive Bayes of sklearn machine learning
๐ Last time we talked about the decision tree algorithm, which is based on sklearn. This time, we want to learn about naive Bayes, what is "naive". The meaning of simplicity is that the features are independent of each other and have no correlation. Small partners interested in previous content can refer to the following content ๐: ...
Posted by mitsubishi2002 on Mon, 07 Feb 2022 22:22:01 +0100