Python 3.x install HTMLTestRunner and use

Author: Wind complains about Jiangnan origin: https://www.cnblogs.com/mengjinxiang The author is original, the article is welcome to reprint, if you like, please comment + attention, thank you for your support!   Foreword: Recently I have been writing Python related technical blogs on other blog Forums - > https://blog.csdn.net/JackMengJin P ...

Added by DarkArchon on Tue, 07 Apr 2020 20:10:34 +0300

Python learning dictionary exercise: simple address book

Functional requirements: Query the contact person, input the name, you can query the contact information in the current address book, if the contact person exists, output the contact information, if not, inform Insert a contact, and you can create a new contact in the address book. If the contact already exists, ask if you want to modify the c ...

Added by pugs1501 on Sun, 05 Apr 2020 00:53:11 +0300

Python learning - using Python to crawl popular comments on Eason Chan's new song "we"

It has been several days since "later we" was released. I haven't been to see it. There was a ticket refund incident a few days ago. The theme song of the movie was sung by Eason Chan. I specially looked for the MV of the theme song "we" and watched it. It's still that feeling. That day, I saw an official account of the Pyth ...

Added by harinath on Thu, 26 Mar 2020 20:07:24 +0200

Python crawler notes -- crawling for the new fun Pavilion

Preliminary preparation: (1) Install requests (get HTML information for the entire web page) In cmd, use the following command to install requests: pip install requests (2) Install beautiful soup4 (parse HTML information and extract what we need) In cmd, use the following command to install requests: p ...

Added by manichean on Tue, 03 Mar 2020 09:51:48 +0200

Collation of python basic data types

1, Data type (1) , tips 1. PyCharm: select multiple lines and press Ctrl + / "to comment them out in batch (2) , string 1,startswith(str,[,start][,end]) #Determine whether the string starts with str s = 'lichuanlei' print(s.startswith('le',7,9)) Instance output result: True 2,replace(str_old,str_new[,num]) #Replace string s = 'lichuanlei' ...

Added by danger2oo6 on Tue, 18 Feb 2020 07:00:52 +0200

Use of 56 crawler ip agent

IP proxy can be used to prevent IP from being blocked by server due to frequent access. Using the method, add a proxies parameter to the functions of requests: page_text = requests.get(url=url, headers=headers, proxies={'http': '60.167.132.19:9999'} ) The free IP proxy that can be used can be obta ...

Added by ereptur on Sat, 08 Feb 2020 16:40:07 +0200

Pyspark learning -- 2. Try to run pyspark

pyspark learning -- 2. pyspark's running method attempt and various sample code attempts Operation method Pycharmrun spark operation in the system: spark submit Start spark task run Sample code Streaming text processing streaming context Stream text word count Error reporting summary Operati ...

Added by lemming_ie on Sat, 08 Feb 2020 10:38:57 +0200

How to match strings in 9python

Title Description: Given the main string s and pattern string P, determine whether P is a substring of S. if so, find out the subscript of P in s for the first time. Method: Direct calculation method KMP 1. Direct calculation method Suppose the main string S = "S0S1S2 Sm ", mode string P = ...

Added by fr8 on Wed, 05 Feb 2020 07:07:03 +0200

C code and Python code: student achievement management program

Catalog I. conclusion 2, C code 3, Python code I. conclusion I haven't written the code for a long time. I read the python list and dictionary again About the chain list of C: The nodes of linked list can be realized by nesting lists and dictionaries About sorting: sorted() is a python function, ...

Added by amal.barman on Mon, 03 Feb 2020 17:45:59 +0200

On Mac, kill the process regularly according to the process name / restart the process by the way of Daemons

Reference blogger article https://blog.csdn.net/u010976445/article/details/50819287 To kill and restart pycharm program under Mac as an example to write script, using Python 3.6 environment 1, Kill process ps -ef | grep pycharm | awk '{print $2}' | xargs kill -9  # After ps -ef | grep pycharm | awk '{print }' | xargs is exe ...

Added by weedo on Mon, 06 Jan 2020 19:23:08 +0200