Blog / Python
45 Posts

Python
Python-OpenStack

# OpenStack API `

查看全文
Python
Scrape images from a certain website

Crawl a picture website Preface First, let's take a look at the quality of the pictures on this website. It's really good. Downloading them one by one is too troublesome, so I'll use Python to download all of them. The website should have about 2000 pictures in total; I'll crawl them all down. Note that this website uses IP anti-crawling, so an IP pool is needed. Otherwise, the IP will be banned after downloading a few pictures. Let's get coding!!! Libraries used first: ```python import os.path import random import requests import re from lxml import ```

查看全文
Python
Optimization of Python Scheduled Tasks

To optimize the code and reduce CPU usage, use Python's schedule library to implement scheduled tasks.

查看全文
Python
Record the execution of a py script using the nohup command

Sure, please provide the content you would like translated to English.

查看全文
Python
Common Methods of Numpy and Pandas

Introduction to Numpy Installation and import methods `pip install numpy` `import numpy as np` Usage demonstration (including random usage) `random.uniform(param1, param2)` Generates a floating-point number between 1 and 2 `random.uniform(100.0, 200.0)` Randomly generates a floating-point number between 100 and 200 `random.randint(param1, param2)` Randomly generates an integer between 1 and 2 `np.array(list)`

查看全文