Compile and install vim8 under centos7, and support python3

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

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

python learning note 4

Chat 6 set a = set([1, 2, 3, 1]) a = {1, 2, 3, 4} b = {3, 4, 5, 6} # Create set a.union(b) a | b a.intersection(b) a & b a.difference(b) a - b a.symmetric_difference(b) a ^ b a = {1, 2, 3} b = {1, 2} b.issubset(a) b <= a a.issuperset(b) a >= b # In fact, there are > < symbols to use here Relative to list, append is used to add, ...

Posted by contex on Mon, 30 Mar 2020 23:21:35 -0700

Python3 Standard Library: Multprocessing manages processes like threads

1. Multprocessing manages processes like threads The multiprocessing module contains an API that is based on the threading API and divides work into multiple processes.In some cases, multiprocessing can replace threading as a temporary replacement to utilize multiple CPU cores, thereby avoiding computing bottlenecks caused by Python global inte ...

Posted by laurton on Mon, 30 Mar 2020 18:55:34 -0700

vnpy source reading learning: about app

About app In the entry program, we see gateways, apps, and various types of engines added to mainEngine.It is not difficult to guess that gateway mainly deals with external situations, interface code in all aspects, and it is not difficult to see that Engine is the core of vnpy through other people's articles, and can handle all aspects such as ...

Posted by _spaz on Sun, 29 Mar 2020 21:24:55 -0700

Python3 Standard Library: Managing concurrent operations in threading processes

1. Manage concurrent operations in threading processes The threading module provides an API to manage the execution of multiple threads, allowing programs to run multiple operations concurrently in the same process space. 1.1 Thread object The easiest way to use Thread is to instantiate a Thread object with a target function and call start() to ...

Posted by j.smith1981 on Sun, 29 Mar 2020 18:54:15 -0700

Python learning - shopping cart program

Procedure: shopping cart procedure Demand: After starting the program, let the user enter the salary, and then print the list of products Allow users to purchase products according to the product number After the user selects the goods, check whether the balance is enough, deduct the money directly if it is enough, and remind if it is not enou ...

Posted by timbuckthree on Sun, 29 Mar 2020 08:45:56 -0700

Basic technology of machine vision implemented by python+opencv (edge extraction, image filtering, edge detection operator, projection, license plate character segmentation)

Catalog 1: Edge extraction 1. Threshold segmentation and color reversal of image 2. Edge extraction 2: Image filtering 1. Read the original drawing 2. Mean filtering 3. Median filtering 4. Gaussian filtering 5. Gaussian edge detection 3: Edge detection operator 1. Display the original drawing 2. Reverse the image 3. Image edge detec ...

Posted by kliopa10 on Sun, 29 Mar 2020 05:47:54 -0700

OpenCV-Python uses OCR handwriting data set to run SVM | fifty-six

target In this chapter, we will recognize the handwritten dataset again, but use SVM instead of kNN. Recognize handwritten numbers In kNN, we directly use pixel intensity as feature vector. This time we will use the directional gradient histogram (HOG) as the feature vector. Here, we use the second-order moment to correct the skew of the image ...

Posted by gurjit on Sun, 29 Mar 2020 00:05:02 -0700

Simple mahjong ai algorithm

Simple mahjong ai algorithm Write a mahjong game, need to automatically play ai algorithm, do it yourself, although not very smart, but surprised by its simplicity, just record it. Implemented in python. First, summarize the rules of mahjong. The seemingly complex rules of mahjong can be expressed by a formula. Hu = AA and (AAA or AAAA or ABC) ...

Posted by daneilair on Sat, 28 Mar 2020 10:11:27 -0700