Python learning list, for loop, slice, tuple
Python learning (2)
list
The list consists of a series of elements arranged in a specific order. The list can store almost all elements such as letters, numbers and strings. There is no relationship between the elements. The list is somewhat similar to a one-dimensional array.
In Python, lists are represented by square brackets [] and el ...
Posted by Michael on Fri, 11 Feb 2022 21:32:54 +0100
Unexpectedly, Python can also make Web visualization pages!
When it comes to Web pages, you may first think of HTML, CSS or JavaScript.
This time I'll introduce you how to make a data visualization web page with Python, using the Streamlit library.
Easily convert an Excel data file into a Web page for everyone to view online.
Whenever you save changes to Excel files, Web pages can be updated in ...
Posted by kaos057 on Fri, 11 Feb 2022 20:47:55 +0100
Python implementation of genetic algorithm (solving function extremum problem)
Problem description
f(x)=x*sin(x)+1, x belongs to [0,2 π]. Taking solving the maximum and minimum value of f(x) as an example, a genetic algorithm program for f(x) is designed, and then run to solve it (1) Determine the basic functions: this experiment is to solve the maximum and minimum values of f (x). (2) Encoding f(x): a chromosome ...
Posted by HairBomb on Fri, 11 Feb 2022 18:25:17 +0100
Operation of reading Python source code Python list
Introduction:
In the last article, I briefly understood the expression form of python list. Today, I'll briefly understand some operations on list. The following is in Listobject Some methods declared in the H header file, where PyList_New,PyList_SetItem was briefly read in the previous article, pylist_ I won't say more about the size method t ...
Posted by weyes1 on Fri, 11 Feb 2022 18:08:36 +0100
Python - play with data - Download Middleware of scratch
1, Explain
Download Middleware is a hook framework for scripy's request / response processing. It is a lightweight low-level system used to globally change the request and response of scripy. It is often used to add agents, add cookie s, reissue requests after failure, and so on.
2, Activate Download Middleware
To activate Download Middlewar ...
Posted by digitalflash on Fri, 11 Feb 2022 17:16:25 +0100
Reading notes of Python deep learning: Chapter 2 mathematical basis of neural network
catalogue
Chapter 2 mathematical basis of neural network
2.1 initial knowledge of neural network
2.2 data representation of neural network
2.2.1 scalar (0D tensor)
2.2.2 vector (1D tensor)
2.2.3 matrix (2D tensor)
2.2.4 3D tensor and higher dimensional tensor
2.2.5 key attributes
2.2.6 manipulating tensors in Numpy
2.2.7 concept of da ...
Posted by hcdarkmage on Fri, 11 Feb 2022 16:36:04 +0100
ML (machine learning) neural network, step function, sigmoid activation function
In the last article, we said that single-layer perceptron realizes simple logic circuit and multi-layer perceptron realizes XOR gate circuit. Threshold is introduced θ, Offset b. Now, according to the expression in the previous article, the reality activation function.
The expression of our previous perceptron is as follows:
y = { x1w1 ...
Posted by ashu.khetan on Fri, 11 Feb 2022 13:34:17 +0100
[Django] design of Django framework based on Python web to realize daily fresh system -5 database operation
Database operation
First, enter the command at the terminal:
python manage.py shell
The display interface is shown in the following figure:
At this point, enter the shell, where we can CRUD the data in the database in an object-oriented way
1 insert operation
In Django, we can operate the data in the database without writing a single li ...
Posted by theslinky on Fri, 11 Feb 2022 12:37:01 +0100
The same tiktok system named PyQt5 is very simple.
Tiktok found a teacher's classroom roll call system. With PyQt5 to achieve the same paragraph, import the student name, test the perfect operation.[read the full text]Operation effect display:The complete source code block is still placed at the end of the article. If you need to run directly to the end of the article to obtain the download met ...
Posted by thebighere on Fri, 11 Feb 2022 12:29:39 +0100
Python group of the 11th Blue Bridge Cup provincial competition in 2020 (real topic + analysis + code): Crop hybridization
1 true question
Title Description
Crop hybridization is an important step in crop cultivation. There are known n crops (No. 1 to n), and the time from sowing to maturity of the ith crop is Ti. Crops can be hybridized in pairs, and the longer of the two kinds of time is taken as the hybridization time. If the planting time of crop A is 5 ...
Posted by curmudgeon42 on Fri, 11 Feb 2022 11:59:35 +0100