First, the first application of this module
Here is a simple code to understand
# Instantiate an ssh client object
ssh = paramiko.SSHClient()
# Automatically add the machine you want to connect to in know_host, ignore this verification, and pay attention to the passed parameter paramiko.AutoAddPolicy()
Posted by huszi001 on Tue, 31 Mar 2020 22:12:49 -0700
Function: a function is an organized, reusable code segment used to implement a single or associated function.
Function can improve the modularity of application and the reuse rate of code. Python provides many built-in functions, such as print(). You can create your own functions, which are called user-defined functions.
Posted by Wardy7 on Tue, 31 Mar 2020 21:54:52 -0700
Through the use of data-driven testing, the input value and expected results can be parameterized. (for example: input data and expected results can directly read the data of Excel document)
The ddt library can parameterize the variables in the test. When using ddt, use @ ddt decorator on the test class and @ data decorator ...
Posted by viko20 on Tue, 31 Mar 2020 17:41:15 -0700
50% of algorithm problems can be solved by recursion, which is not to say how powerful recursion itself is, but to say that recursion makes many complex problems simple! Why? People who understand data structure know that tree structure itself is defined by recursion
What is tail recursion?
As we all know, recursion will record ...
Posted by redsox8185 on Tue, 31 Mar 2020 17:15:08 -0700
Append and expand
list.append() appends a new object to the end of the list
1 >>> dir(list) #Dirfunctions for viewing lists
2 ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__delslice__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getslice__', '__gt__', ...
Posted by TheWart on Tue, 31 Mar 2020 13:48:32 -0700
Functions are organized, reusable code snippets that implement a single, or associated function.
1. Definition of function
def test(): #function
print("in the test")
def test1(): #process
print("in the test1")
2. Significance of using ...
Posted by owned on Tue, 31 Mar 2020 11:13:47 -0700
Related use of requests Library
More dry cargo
Distributed Combat (dry goods)
spring cloud combat (dry goods)
mybatis combat (dry goods)
spring boot combat (dry goods)
React introduction actual combat (dry goods)
Building a small and medium-sized Internet enterprise structure (dry goods)
python learning continuous update
Posted by aron on Tue, 31 Mar 2020 10:35:58 -0700
Continue with the algorithm of linked list:
Delete duplicate elements in sorted list
Given a sort list, delete all duplicate elements so that only one is left for each element.
Given 1 - > 1 - > 2, return to 1 - > 2
Given 1 - > 1 - > 2 - > 3 - > 3, return to 1 - > 2 - > 3
This problem is v ...
Posted by jspodisus on Tue, 31 Mar 2020 10:06:24 -0700
1. Install python3
vim7.4 and python2.7 are installed by default in CentOS 7. Now we want to install vim8 and make it support python3.
First of all, you need to install python3 in the system. For specific installation steps, please refer to my previous blog: https://blog.csdn.net/geerniya/article/details/79263846
2. Compile ...
Posted by ltd on Tue, 31 Mar 2020 05:04:47 -0700
Based on the previous one, we use lxml to extract the body content of blog garden essay and save it in Word document.
The following modules are used to operate Word documents:
pip install python-docx
Modified code (mainly added the following paragraph in the while loop of link_crawler())
1 tree = lxml.html.fromstring(h ...
Posted by phpDVWeaver on Tue, 31 Mar 2020 01:56:38 -0700