QA Official

python's sys.argv gets command line arguments

https://qaofficial.com/post/2019/04/22/68426-pythonamp#x27s-sys.argv-gets-command-line-arguments.html 2019-04-22
1. ProblemsExecute python file, how do we get the input parameters at the terminal, we can use sys.argv, not unfamiliar before 2, code#!/usr/bin/python import sys if __name__ == '__main__': first = sys.argv[0:] print first second = sys.argv[1:] print second name = sys.argv[1] age = sys.argv[2] print "name is:" + name print "age is:"+ age 要记得导入sys哈 3, operation effect./test.py chenzixuan 2 ['./test.py', 'chenzixuan',

softmax function

https://qaofficial.com/post/2019/04/22/32932-softmax-function.html 2019-04-22
is summarized as: a group of numbers are converted into a soft normalization result with a sum of 1 and each number between 0 and 1. ========================================================= on softmax function in logistic regression is used to soften the output value and reduce the difference between the values. is used to normalize a group of values to 0 ~ 1, and the sum is 1. Steps are:

sys.argv personal notes

https://qaofficial.com/post/2019/04/22/68408-sys.argv-personal-notes.html 2019-04-22
using sys.argv in pycharm is to get the parameters input by the terminal. sys.argv is a list of data, and like the list [ 0 ], [ 1 ] respectively obtains the first and second parameters entered in the terminal For example: Run manage.py in the terminal -> python 3 manage.py hello sys.argv[0] --> manage.py sys.argv [ 1 ]-> hello   ps: Some online said sys.argv[0] is the path, others said it is all the data, actually run it is not ah

Analysis of Usage Examples of sys.argv Parameter in python

https://qaofficial.com/post/2019/04/22/68421-analysis-of-usage-examples-of-sys.argv-parameter-in-python.html 2019-04-22
This article mainly introduces the usage of sys.argv parameter in python, and analyzes the function, definition and use skills of sys.argv parameter in python with examples. For friends who need it, please refer to the following: This article gives an example of the usage of sys.argv parameter in python.I would like to share it with you for your reference.The specific analysis is as follows: In the process of learning python, I have been unable to understand the meaning of sys.

Batch Execution of python Program Files

https://qaofficial.com/post/2019/04/22/68487-batch-execution-of-python-program-files.html 2019-04-22
If you want to execute N files (you don't need to run one by one), you can put the files to be executed in the same folder, and then enter the following script in one file. import os lst = os.listdir(os.getcwd()) # 获取当前目录下所有的文件名 for c in lst: if os.path.isfile(c) and c.endswith('.py') and c.find("run")== -1: #判断文

Batch Processing and python Programming Method

https://qaofficial.com/post/2019/04/22/68505-batch-processing-and-python-programming-method.html 2019-04-22
Batch processing can be used with many programming languages, which can not only supplement the effect of programming languages, but also improve the programming efficiency. Batch processing can also be used with python, and python does not criticize file suffixes. As long as the program contains correct python code, it can be interpreted and executed by Python interpreter! Batch and python are programmed with the file name py.bat and the code is as follows:

Data Augmentation Method for Pictures

https://qaofficial.com/post/2019/04/22/68461-data-augmentation-method-for-pictures.html 2019-04-22
In depth learning, in order to avoid Overfitting, we usually need to input enough data. If the data ratio is small, we can carry out geometric transformation on the original image data, change the position of image pixels and ensure that the features remain unchanged. Rotation/reflection: randomly rotate the image by a certain angle;Changing the orientation of image content; flip: Flip the image horizontally or vertically; zoom: Enlarges or reduces the image according to a certain proportion; shift: shift the image in a certain way on the image plane;

Features of Block, Inline and Inline Block Elements in HTML

https://qaofficial.com/post/2019/04/22/68401-features-of-block-inline-and-inline-block-elements-in-html.html 2019-04-22
element classification and characteristics: 1. Block level elements: in html < div >, < p >, < h1 >, < form >, < ul > and < li > are block-level elements.Setting display:block is to display elements as block-level elements.Characteristics of block-level elements: (1) Each block-level element starts from a new row, and the following elements also start from another row;(A block-level element has an exclusive row) (2), element height, width, row height and top and bottom margin can be set;

Label Weight

https://qaofficial.com/post/2019/04/22/68403-label-weight.html 2019-04-22
1. The tag has a weight of 1, the class selector has a weight of 10, and the ID selector has a weight of up to 100. p{color:red;} /*权值为1*/ p span{color:green;} /*权值为1+1=2*/ p span.warning{color:purple;} /*权值为1+1+10=12*/ #footer .note

Normalized Cross-Correlation Matching Algorithm in Image Registration

https://qaofficial.com/post/2019/04/22/68482-normalized-cross-correlation-matching-algorithm-in-image-registration.html 2019-04-22
Original Address: http://blog.csdn.net/fengbingchun/article/details/5857810 After Harris operator is used to extract corner points from the images, the number of corner points obtained from the two images may not be equal. At this time, they must be processed first to obtain one-to-one corresponding corner point pairs.  Normalized Cross Correlation Method (NCC) matching algorithm is a classical statistical matching algorithm. The matching degree is determined by calculating the cross correlation value of template image and matching image.