![](https://img-blog.csdnimg.cn/20191109113019609.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
python
python资料
唯尔默
高龄码农
展开
-
树莓派PI3、PI4安装opencv
1.修改更新源 sudo vi /etc/apt/sources.list 科大源: deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contri...原创 2019-11-20 14:48:37 · 391 阅读 · 0 评论 -
python MySQL数据库封装
import MySQLdb # 打开数据库连接 database = MySQLdb.connect("127.0.0.1", "username", "password", "dbname", charset='utf8' ) # 使用cursor()方法获取操作游标 cursor = database.cursor() # 数据库操作类 class db(): # 获取一条数...原创 2019-11-09 11:39:06 · 174 阅读 · 0 评论 -
python log日志封装
1.在utils目录下新建log.py import logging logger = logging.getLogger(__name__) logger.setLevel(level=logging.DEBUG) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') ...原创 2019-11-09 11:22:37 · 590 阅读 · 0 评论