python
超级大蚂蚁
这个作者很懒,什么都没留下…
展开
-
2020 Python 3.8 操作 redis 实战
#!/usr/bin/python# -*- coding: UTF-8 -*-import redisclass RedisBase: def __new__(cls, *args, **kwargs): """单例模式""" if not hasattr(cls, "instance"): cls.instance ...原创 2020-05-07 11:36:28 · 719 阅读 · 0 评论 -
Python3.8 OpenCV 人脸识别入门级demo
#!/usr/bin/python# -*- coding: UTF-8 -*-import cv2#加载OpenCV 自带人脸特征模型defStr = r'D:\Program Files\Python\Python37-32\Lib\site-packages\cv2\data\haarcascade_frontalface_default.xml'#输入识别的图片地...原创 2020-04-10 17:10:58 · 1341 阅读 · 0 评论 -
2020 最新 Python3.8 + Mysql 爬取国家统计局区域代码,省、市、区 街道乡镇区域代码
#coding=utf-8#-*- coding: utf-8 -*-import urllib.requestimport timefrom bs4 import BeautifulSoupimport pymysql#当成是mysqldb一样使用,当然也可以不写这句,那就按照pymysql的方式pymysql.install_as_MySQLdb()use...原创 2020-04-04 22:52:28 · 1221 阅读 · 1 评论 -
2020 最新 Python3.8 爬国家统计局区域、省、市、区,街道乡镇代码
import urllib.requestimport timefrom bs4 import BeautifulSoupindexs = 'index.html'url = 'http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2019/'txt = urllib.request.urlopen(url + indexs...原创 2020-04-03 18:58:38 · 1352 阅读 · 0 评论