python's experience of writing wechat to automatically grab files

python's experience of writing wechat to automatically grab files background Early stage Write code & Pit background Recently, the epidemic is rampant. All the teachers are teaching online. There are a lot of messy documents in wechat group. I'm tired of my baby. I have to read them every ti ...

Posted by ricroma on Sun, 09 Feb 2020 04:58:00 -0800

django creates the first project

django creates the first project, using pycharm, and the virtual machine uses ubantu Create command (if Django is installed) Have a project and a virtual environment awareness. You can install Django in the virtual environment if you don't install it Virtual environment construction pip install vi ...

Posted by hypuk on Sat, 08 Feb 2020 01:07:17 -0800

Download files in Python

Prerequisite The requests module needs to be installed in advance: pip install requests Put it in code. import requests url = 'XXX' #File download source URL filename = '' #New file name after downloading to local r = requests.get(url) with open(filename, "wb") as code: code.write(r.content) combat exercise with ammunition From target URL ...

Posted by realnsleo on Fri, 07 Feb 2020 08:06:43 -0800

python less than 100 lines of code to complete face recognition

1. Preparation environment python 3.5 opencv 2. Configuration environment pip install opencv-python pip install numpy pip install opencv-contrib-python 3. Prepare training data 20 photos of Tong Liya, stored under folder 0 20 photos of Dong Xuan, stored under folder 1 4. Prepare test data ...

Posted by phence on Mon, 03 Feb 2020 09:58:46 -0800

21 - URL crawling, Python asynchronous, Supervisor installation and configuration, etc

1. summary Pseudo code can be referred to "Twenty climbing URL and initial assumption of participle sentiment analysis" , only to find that this can be done for a whole day, but most of the time is used to deploy the server. Code placed in Large same-sex dating websites In fact, it's very si ...

Posted by vinny69 on Mon, 03 Feb 2020 01:10:29 -0800

Solve the problem that the installed module cannot be import ed

System: windows 10 Tools: python 3.7, pycharm, anaconda Problem: numpy cannot import First, check where the environment corresponding to your pycharm s interpreter is and whether there is any numpy package installed in it. Here I am in the base environment. In the anaconda prompt window, enter ...

Posted by enoyhs on Sun, 02 Feb 2020 22:45:58 -0800

Record the decompilation process of Python 3.7 once

Record the decompilation process of Python 3.7 once 1. Convert exe file to pyc file 2. Repair pyc file 3. How to get magic number 4. Add magic number 5. Decompile pyc files Found an exe compiled by Python 3.7, but did not find the source code. Record the decompilation process 1. Convert exe file ...

Posted by pulsedriver on Sun, 02 Feb 2020 06:48:07 -0800

Deploy docker private warehouse Harbor

1, Environmental description Operating system: CentOS 7.5 Software version: harbor 1.5.0 2, Software installation 1. Preparation before installation # systemctl disable firewalld.service # systemctl stop firewalld.service # sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config # setenforce 0 # hostnamectl --st ...

Posted by moonie on Fri, 31 Jan 2020 04:34:23 -0800

Docker build container build acceleration strategy

It takes a lot of time to download many kinds of software when building containers. hub.docker.com is slow in nature, especially when it encounters modules stored on gcr.io/aws and so on. pip installation of python module is also slow, and the download of conda is like a snail. There are several ways to speed up the download of container const ...

Posted by safrica on Thu, 30 Jan 2020 07:19:13 -0800

Is Python an ordered set?

Python has a An orderly dictionary . How about an orderly set? #1 building For many purposes, just calling sorted is enough. for example >>> s = set([0, 1, 2, 99, 4, 40, 3, 20, 24, 100, 60]) >>> sorted(s) [0, 1, 2, 3, 4, 20, 24, 40, 60, 99, 100] If you want to reuse this feature, calling the sorted function incur ...

Posted by ctoshack on Wed, 29 Jan 2020 22:53:59 -0800