Python Basics - super detailed introduction to the parameters of functions
Today's test
1,Write code to realize function tail -f access.log
f.seek()
Application (file object)/File handle (1) Application (file object)/File handle (2)
Operating system (real file) a.txt z
Hard disk (computer space)
2,Two ways to modify code display files
Mode 1:
with open('source file',mode='r') as src_ ...
Added by cavolks on Thu, 24 Feb 2022 13:16:43 +0200
FastAPI day 4 - database and modular management
FastAPI day 4
1. Multi application management
When we develop, a large number of routes are often involved. If all routes are written in one file, it is not conducive to us to modify a route and its processing function, and it is not conducive to the later maintenance and upgrading of the whole project. Moreover, the number of code lines ...
Added by webstyler on Thu, 24 Feb 2022 11:32:44 +0200
Use Python to visually analyze the data of tens of thousands of games of Jedi survival, and teach you to make the strongest chicken eating strategy~
Introduction
Good luck, eat chicken tonight ~ today, I played with my friends to eat chicken and experienced various death methods. I was also ridiculed that there are 100 death methods for girls to eat chicken, such as being swung to death by fist, parachuting to the edge of the roof, playing chicken as a flying car, being killed by car skill ...
Added by daneilair on Thu, 24 Feb 2022 11:01:52 +0200
Machine learning practice -- K-nearest neighbor algorithm
K-nearest neighbor algorithm
K-nearest neighbor algorithm (KNN) is a basic classification and regression method proposed in 1967. The working principle is: there is a sample data set, also known as the training sample set, and each data in the sample set has a label, that is, we know the corresponding relationship between each data in the samp ...
Added by kazer on Thu, 24 Feb 2022 10:39:15 +0200
Common probability density images in Statistics
Common probability density images in Statistics
Reviewing probability theory and mathematical statistics today, I saw several common distributions and suddenly became interested, so I tried to write about them matlab Draw several common probability density images (Note: some are collected and sorted from the Internet)
Binomial:
Binomial dist ...
Added by yashvant on Thu, 24 Feb 2022 09:23:12 +0200
Leetcode322: medium, BFS
catalogue
1. Title Description
2. Problem solving analysis
3. Code implementation
1. Title Description
Give you an integer array of coins to represent coins of different denominations; And an integer amount, representing the total amount. Calculate and return the minimum number of coins required to make up the total amount. If no combin ...
Added by marco75 on Thu, 24 Feb 2022 03:59:29 +0200
day8 dictionary summary and homework
day8 dictionary summary and homework
1, Cognitive dictionary
Dictionary and list selection:
When you need to save multiple data at the same time, use the list if the meaning of multiple data is the same (there is no need to distinguish); If multiple data have different meanings, use a dictionary
Cognitive Dictionary (dict)
1) Is a containe ...
Added by tcl4p on Wed, 23 Feb 2022 18:16:15 +0200
Dynamic pointer clock: use pyqt5 to make pointer clock to display real-time time time
[read the full text]At the end of the paper, a complete source code implementation process is attachedWant to realize such a function, and then pyqt5 there is no ready-made component to use, so I think it can only be realized by drawing. When it comes to drawing, the turtle framework is undoubtedly the most common choice, but it can also be imp ...
Added by wsantos on Wed, 23 Feb 2022 17:32:58 +0200
Two methods: building neural network eight strand six step method
The difference between the two methods: Sequential network building method. The upper output is the Sequential network structure of the lower input, but it is impossible to write some non Sequential network structures with hops. At this time, we can choose to use class to build a neural network structure, and class can be used to encapsulate a ...
Added by nepton on Wed, 23 Feb 2022 16:42:38 +0200
python closures and decorators
python closures and decorators
1, What is a closure?
1. Scope of function
First of all, let's understand the scope of a variable in python. python has its namespace for each variable. A function can only call the global global variable or its own local variable. With this in mind, what is a closure.
2. What is a closure?
Simply put, a ...
Added by alapimba on Wed, 23 Feb 2022 16:31:02 +0200