Python3 Standard Library: concurrent.futures manages concurrent task pools

1. Conurrent.futures manages concurrent task pools The concurrent.futures module provides an interface for running tasks using worker threads or process pools.Threads and process pools have the same API, so applications can switch smoothly between processes with minimal modifications. This module provides two types of classes to interact with t ...

Posted on Fri, 03 Apr 2020 22:10:39 -0700 by whit555

040 synchronization condition event

Condition synchronization and condition variable synchronization have the same meaning, but less lock function, because condition synchronization is designed in the condition environment without access to shared resources, event=threading.Event(): condition environment object, initial value is Falseevent.isSet(): returns the status value of eve ...

Posted on Fri, 03 Apr 2020 18:09:58 -0700 by intergroove

Python uses Tesseract library to identify and verify (24)

(1) About Tesseract Tesseract is an OCR Library (OCR is the abbreviation of Optical Character Recognition in English). It is used to scan the text data, and then analyze and process the image file to obtain the text and layout information. Tesseract is currently recognized as the best and relatively accurate OCR library. (2) ...

Posted on Fri, 03 Apr 2020 08:58:10 -0700 by wiggst3r

Python implements block chain simulation from zero [with source code]

Python is not the mainstream development language in the area of block chains or digital currency.But if your goal is to study the principles of block chain technology, or if you need to simulate a block chain network on your own notebook and do some research experiments, such as completing your own graduation design project or scientific resea ...

Posted on Fri, 03 Apr 2020 06:25:12 -0700 by mblack0508

Tool recommendation - precise positioning of latitude and longitude based on IP address (permanent free)

Today, Xiao Zhang needs to accurately locate the user's country, city, longitude, latitude and other information according to the user's access ip, search from the Internet, and find many websites, but there are almost no fully compliant ones, and some of them need to spend money. As you know, now is the era of information sharing, is there rea ...

Posted on Thu, 02 Apr 2020 20:08:55 -0700 by bigscanner

Java - this keyword summary

1, Use of this keyword 1. When the same type of objects a and b call the same method (), in order to distinguish whether the method is called by a or b In the following code: class Banana { void method(int i) { /* ... */ } } Banana a = new Banana(), b = new Banana(); a.method(1); b.method(2); Internal process during compilation: 1 Banana.met ...

Posted on Thu, 02 Apr 2020 15:40:49 -0700 by disenopop

web development based on hi nginx (python part) -- router decorator

Now, with the basic understanding of the beginning, we need a simple and easy-to-use routing function that can be comparable to flask or robot, and can map URLs to code arbitrarily with decorator writing method. This is not difficult. First of all, let's have a module called hi: hi.py: 1 import re 2 3 class hi: 4 def __init__(self): ...

Posted on Thu, 02 Apr 2020 15:39:18 -0700 by PTS

Basic operation of Python database

Recently, some important data of a project has been lost and not stored in the database due to version reasons. These data need to be counted from the online fault log, and the statistical results should be output and compensated to the database. At the beginning, I was not very proficient in python. First, I used grep|awk a ...

Posted on Thu, 02 Apr 2020 04:08:06 -0700 by inferium

About Douban login and the method of input verification code

Recently, I want to learn the knowledge of analog login, so I have a simple login of Douban account. Here is the code: # -*- coding:utf-8 -*- '''Douban simulated landing, and achieved a state of hair''' import requests session = requests.session() header = {"Host": "www.douban.com", "Referer": "https://www.douban.com/", ...

Posted on Wed, 01 Apr 2020 21:17:46 -0700 by zTagged

Django REST framework+Vue to create fresh supermarket (3)

xadmin background management 3.6.xadmin add rich text plug-in (1) New file ueeditor.py under xadmin/plugins folder The code is as follows: # xadmin/plugins/ueditor.py import xadmin from xadmin.views import BaseAdminPlugin, CreateAdminView, ModelFormAdminView, UpdateAdminView from DjangoUeditor.models import UEditorField from DjangoU ...

Posted on Wed, 01 Apr 2020 19:20:09 -0700 by loony383