Django template language
cycle
Each time this tag is encountered, a parameter is generated. The first encounter generates the first parameter, the second encounter generates the second parameter, and so on. Once all parameters are exhausted, the tag loops to the first parameter and generates it again.
def variable_dict(request):
var_dict = {'var1': ['var0', 'var1 ...
Added by ChaosKnight on Sun, 20 Feb 2022 12:49:28 +0200
GEE dataset: ERA5 daily summary - the latest climate reanalysis dataset produced by ECMWF / Copernicus Climate Change Service
1. Data set introduction
ERA5 Daily Aggregates - Latest Climate Reanalysis Produced by ECMWF / Copernicus Climate Change Service
ERA5 daily summary - latest climate reanalysis produced by ECMWF / Copernicus Climate Change Service
ERA5 is the fifth generation ECMWF atmospheric reanalysis of global climate. Reanalysis combines model data wit ...
Added by buddhi225 on Sun, 20 Feb 2022 12:00:30 +0200
[actual combat] valid parentheses of LeetCode illustrated by ACM players
Hello, everyone. I'm handsome.
Today, let's judge whether the brackets are valid.
I don't know what to say. Let's start the whole thing.
LeetCode 20: valid parentheses
meaning of the title
Given a string s that only includes' (',') ',' {','} ',' [','] ', judge whether the string is valid.
Examples
Input: s = "() [] {}"
Outpu ...
Added by ccx004 on Sun, 20 Feb 2022 09:42:30 +0200
python+appium automation
1. Download Android SDK( https://www.androiddevtools.cn/ )If you want to try Android development, you can download Android studio. If you want to be concise, you can download SDK tools. Download the Windows version of the official installer_r24.4.1-windows.exe. After installation, there will be two startup items: AVD manager and SDK manager. 2. ...
Added by renno on Sun, 20 Feb 2022 07:03:21 +0200
k-nearest neighbor method -- python code implementation and kd tree construction search
Algorithm Introduction
k-nearest neighbor method belongs to supervised learning and does not need training model (lazy learning). Algorithm flow: for the test samples, find k training samples from the given training set according to some distance measurement (Minkowski distance, Euclidean distance, Manhattan distance, Chebyshev distance, e ...
Added by R4000 on Sun, 20 Feb 2022 06:39:08 +0200
About my understanding of iteratable objects, iterators, generators
Iteratable object:
An object that can return an iterator can be called an iteratable object. In essence, with__ iter__ Method is an iteratable object. In python, we can judge whether an object is an iteratable object through isinstance(). Common iteratable objects are: list, set, dict, tuple, str.
In [1]: from collections import Iterable
In ...
Added by ndorfnz on Sun, 20 Feb 2022 02:59:36 +0200
I'd like to call Python the strongest. Python automation can make money easily
ps: This article is only for technical exchange and should not be used for other purposes.
preparation
Before writing code, you need to do the following preparations:
1. Configure Android ADB development environment
2. Installing pocoui dependency libraries in Python virtual environment
3. APK application of operating shear board
Write ...
Added by hostcord on Sun, 20 Feb 2022 01:51:21 +0200
Information collection and Python script writing
In the penetration test, information collection is particularly important. In the information collection stage, the penetration test team can use various methods to obtain information about the topology and system configuration of the target network. Whether the information is perfect or not will seriously affect the speed and depth of subseque ...
Added by why not on Sun, 20 Feb 2022 01:38:58 +0200
[module usage] use of turtle library and example demonstration
1. turtle Library - concept
1.1 turtle Library - definition of turtle Library
1.1.1 turtle Library - what is a turtle library?
Professional Edition: the turtle library is a third-party module of Python language. It is a simple and easy-to-use programming language developed by Wally Feurzig and Seymour Papert in 1966. Now it has become ...
Added by champbronc2 on Sun, 20 Feb 2022 00:11:36 +0200
Opencv Python learning notes: basic operation of images
Get and modify pixel values
For color images, the value of a pixel in opencv represents the values of B, G and R of this pixel.
Get pixel value
import cv2
import numpy as np
# Read picture
img = cv2.imread("../data/image/1.jpeg",cv2.IMREAD_COLOR)
#Get the pixel value (B,G,R) of row 100 and column 100
px = img[100,100]
print(px)
#Get the ...
Added by sb on Sun, 20 Feb 2022 00:03:49 +0200