摘要: ## plotly坐标轴截断混合设置且指定设置截断时间的时候需要注意先后顺序 - 大范围的时间要在小范围的时间前设置,比如日内时间的截断要设置在日期截断的后面 - 同范围的规则截断要在指定截断前设置,对日期的截断,规则系截断最好在指定截断前设置,六日截断规则在指定日期截断前 以上两条为测试出来的规律 阅读全文
posted @ 2023-05-08 21:55 meizhengchao 阅读(285) 评论(0) 推荐(0) 编辑
摘要: """ 压缩指定文件夹 排除指定格式的文件 """ import zipfile from pathlib import Path path = './aaa.zip' # 压缩文件路径 path = Path(path) xya_file = Path('./test') # 需压缩文件夹 f = 阅读全文
posted @ 2023-02-16 23:46 meizhengchao 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 1. 函数递归 xya_file = Path('./test') def get_file_list(path:Path,data = []): for i in path.glob('*.*'): if i.is_dir(): data.extend(file_list(path=i,data= 阅读全文
posted @ 2023-02-16 23:35 meizhengchao 阅读(328) 评论(0) 推荐(0) 编辑
摘要: PyQt5 创建下拉复选框 总体目录结构 要先自定义下拉复选框类 参考:自定义实现 PyQt5 下拉复选框 ComboCheckBox # 下拉复选框测试/combocheckbox.py from PyQt5.QtWidgets import QComboBox, QLineEdit, QList 阅读全文
posted @ 2023-02-16 14:11 meizhengchao 阅读(622) 评论(0) 推荐(0) 编辑
摘要: class FctpItem(scrapy.Item): # define the fields for your item here like: image_urls = scrapy.Field() images = scrapy.Field() from scrapy.pipelines.im 阅读全文
posted @ 2023-02-12 15:59 meizhengchao 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 看小说消磨时间,但是广告太多了,且大多都是不健康的广告, 本着无聊练手的想法写了个小说爬虫,可以爬取小说并按小说名章节目录存储 网站是众多盗版网站中的一个 爬取效果如下 # xs_spider\xs_spider\spiders\sx_spider_01.py import scrapy from 阅读全文
posted @ 2023-02-02 14:46 meizhengchao 阅读(671) 评论(0) 推荐(0) 编辑
摘要: 如题 服务器系统由windows换为linux后 阿里云的个人服务器报警性能受限 但是服务器上运行的程序仅有数据采集,windows服务器上运行绰绰有余 按理来说linux上会更轻松才对 检查一番后发现使用nohup运行的python脚本中有input,导致cpu使用率居高不下 运行测试验证一下 运 阅读全文
posted @ 2022-12-30 12:45 meizhengchao 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Spider spider中setting配置的获取 self.settings.get('QLPQMS') #不能__init__中获取setting配置,setting配置要大写字母 请求与响应之间通过meta传参 yield scrapy.http.Request(url, callback= 阅读全文
posted @ 2022-12-16 17:33 meizhengchao 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 数据库维护之时,报错1292 sql如下 update 表1 left join 表2 on 表1.关联字段 = 表2.关联字段 set 表1.更新字段 = 表2.字段 where 表2.字段 != '' and 表2.字段 !='#VALUE!' and 表2.字段 != 0 and 表2.字段 阅读全文
posted @ 2022-11-23 10:39 meizhengchao 阅读(2245) 评论(0) 推荐(0) 编辑
摘要: 数据库200多万条数据,整表关联更新耗时8个小时没有结果 索性尝试了一下储存过程划分数据循环更新,耗时453秒,真香 delimiter // # 定义//为一句sql的结束标志,取消;的所代表的意义 drop procedure if exists test; # 如果存在名字为test的proc 阅读全文
posted @ 2022-11-22 13:10 meizhengchao 阅读(506) 评论(0) 推荐(0) 编辑