摘要: 一。思路:python 内置了两个网络库 urlib和urlib2,但是这两个库使用起来不是很方便,所以这里使用广受好评的第三库requests。 (基本思路使用requests获取页面信息,使用正则表达式解析页面,为了更加迅速的爬取数据,使用multiprocessing实现多进程抓取。下一篇文章 阅读全文
posted @ 2017-06-30 17:09 绵绵01 阅读(6103) 评论(0) 推荐(0) 编辑
摘要: 数据恢复和分区:DiskGenius 阅读全文
posted @ 2023-09-30 20:55 绵绵01 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 解决编译的时候找不到头文件 现象: In file included from dpcmd.c:7: usbdriver.h:6:10: fatal error: libusb.h: 没有那个文件或目录 6 | #include <libusb.h> root cause: 打开Makefile,可 阅读全文
posted @ 2021-10-28 15:37 绵绵01 阅读(206) 评论(0) 推荐(0) 编辑
摘要: setuptools 官方文档 1.setup.py 编写 目录格式如下: mypkg/ foo/ pkg1/*.py pkg2/*.py *.py bar/ *.py setup.cfg #or setup.py setup.py : from setuptools import setup fr 阅读全文
posted @ 2021-09-27 15:46 绵绵01 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-09-08 23:07 绵绵01 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 参考文件 1.ubuntu下为usb绑定固定的设备名 2.建立USB串口别名,创建udev规则 3. UDEV命令(中文翻译) 查找 usb设备和camera # 查看 video 设备 ls /dev/video* #查看usb 设备 ls /dev/ttyUSB* #查看端口地址 yan@yan 阅读全文
posted @ 2021-09-08 16:31 绵绵01 阅读(1482) 评论(0) 推荐(0) 编辑
摘要: 通过装饰器处理每个步骤的结果 #autotest.py import threading import time def stepresult(step_number,expect=""): def wrapper(fun): def inner(*args,**kwargs): step={} r 阅读全文
posted @ 2021-09-04 16:34 绵绵01 阅读(63) 评论(0) 推荐(0) 编辑
摘要: python 单例模式 import threading import time class Singleton(object): _instance_lock = threading.Lock() init=False def __init__(self,a): if Singleton.init 阅读全文
posted @ 2021-09-04 14:40 绵绵01 阅读(30) 评论(0) 推荐(0) 编辑
摘要: git api 官方文档 1.通过python 下载仓库代码 curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.com/api/v4/projects/<project_id>/repository/archive? 阅读全文
posted @ 2021-06-17 22:30 绵绵01 阅读(322) 评论(0) 推荐(0) 编辑
摘要: VSCode docs 1. ctrl+shift+p ,输入setting ,选择 preferences:open settings(json) vscode配置 yapf ,格式化代码, 添加自动补全 { // 设置Python的路径, "python.pythonPath": "D:\\pr 阅读全文
posted @ 2021-06-11 09:04 绵绵01 阅读(1024) 评论(0) 推荐(0) 编辑
摘要: 1.单向流:服务端向客户端流传输 创建一个protobuf 文件: hello_world.proto // 定义一个服务的框架,服务名和服务下的函数名,以及函数下的request 和response, // 和resquest 和response 对应的参数 //使用哪种protobuf 协议 s 阅读全文
posted @ 2021-06-06 17:03 绵绵01 阅读(1370) 评论(0) 推荐(0) 编辑
levels of contents