Python web crawler notes (3): Download blog garden essay to Word document

(1) Description 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

Put a mask on your goddess in Python ~

Preface The new pneumonia epidemic that began to spread at the end of 2019 has affected people's hearts. As an individual, what we can do is to stay at home as little as possible. Seeing that some friends ask design students to help them put on masks for their heads, as technicians, I think there must be more people with such demands. It's bett ...

Posted by AbiusX on Mon, 23 Mar 2020 01:56:23 -0700

Thread & coordination & asynchrony of crawler

Thread pool from multiprocessing.dummy import Pool The callback function asynchronously performs some operation on the elements in the iteratable object Note: callback must have one parameter and only one parameter Asynchronous is mainly used in time-consuming operations from multiprocessing.dummy import Pool pool = Pool(3) # Instantiat ...

Posted by Mirkules on Fri, 20 Mar 2020 10:32:57 -0700

Asynchronous crawlers are too troublesome to write?Try Trio!

Personal Blog Visit http://www.x0100.top  Trio, translated as Trio, provides easier asynchronous programming and is a more advanced encapsulation of asyncio. It attempts to simplify complex asyncio modules.Simpler to use than asyncio and Twisted, but equally powerful.The project is still young and ...

Posted by MattMan on Mon, 09 Mar 2020 19:12:11 -0700

[artificial intelligence notes] section 9: compiling python OpenCV 4.2.0 under Windows, SIFT feature extraction, and perspective transformation to correct object direction

Compile and install OpenCV 0-1. Uninstall opencv and opencv_contrib installed by pip or conda before installation: pip uninstall opencv-contrib-python pip uninstall opencv-python 0-2.install NumPY in Python environment first pip install numpy 1. Download OpenCV source code: https://github.com/o ...

Posted by baitubai on Fri, 06 Mar 2020 21:34:14 -0800

Django+Nginx+UWSGI deployment project

For projects written locally, the running results can only be viewed by ourselves and cannot be used by others. If you want to go online, you can deploy the project on the cloud server through Django+Nginx+UWSGI. At this time, other users only need to enter the URL address to use the project. Pre depl ...

Posted by pinxxx on Fri, 06 Mar 2020 01:05:24 -0800

"Python drawing sharp tool": Matplotlib tutorial

Article directory 1. Preface 2. Introduction to Matplotlib 3. installation 4. Drawing basis 4.1 plot() function 4.1.1 Chinese display 4.1.2 text display 5. Drawing of common charts 5.1 histogram 5.1.1 simple example 5.1.2 function definition 5.1.3 histogram of normal distribution 5.2 pie chart ...

Posted by BLaZuRE on Thu, 05 Mar 2020 19:40:13 -0800

Detailed tutorial of python nss module

I usually like making python modules. Recently, I made a module "nss" (which is used for database) and I uploaded it to pypi. ... First, you can download this module with 'pip install nss'. Because the size of the module itself is relatively small and the download is relatively fast, it can be ...

Posted by ckdoublenecks on Fri, 28 Feb 2020 03:47:14 -0800

On the compilation and decompilation of Python

On the compilation and decompilation of pyyinstaller It is very convenient to write scripts in Python, but it needs a specific Python environment to run. Therefore, if you want to run it on other computers, there will be many problems. Even if Python has been installed, the version may vary greatly, a ...

Posted by ak_mypayday on Wed, 26 Feb 2020 01:26:29 -0800

NVIDIA rapids cuGraph model

The RAPIDS cuGraph library is a set of graph analysis used to process data in GPU data frames - see cuDF. cuGraph is designed to provide NetworkX like API s that are familiar to data scientists, so they can now build GPU accelerated workflows more easily Official documents:rapidsai/cugraphcuGraph API Re ...

Posted by florida_guy99 on Tue, 25 Feb 2020 06:53:28 -0800