摘要: 报错的代码在vnpy_ctp/gateway/ctp_gateway.py path: Path = get_folder_path(self.gateway_name.lower()) self.createFtdcTraderApi((str(path) + "\\Td").encode("GB 阅读全文
posted @ 2024-05-22 13:03 meizhengchao 阅读(150) 评论(0) 推荐(0) 编辑
摘要: ## dash 构建多页面应用一种方案 本方案对[dash官网多页面案例](https://dash.plotly.com/urls)使用[`dash_bootstrap_components`案例](https://dash-bootstrap-components.opensource.facu 阅读全文
posted @ 2023-07-17 13:22 meizhengchao 阅读(668) 评论(0) 推荐(0) 编辑
摘要: ## plotly坐标轴截断混合设置且指定设置截断时间的时候需要注意先后顺序 - 大范围的时间要在小范围的时间前设置,比如日内时间的截断要设置在日期截断的后面 - 同范围的规则截断要在指定截断前设置,对日期的截断,规则系截断最好在指定截断前设置,六日截断规则在指定日期截断前 以上两条为测试出来的规律 阅读全文
posted @ 2023-05-08 21:55 meizhengchao 阅读(501) 评论(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 阅读(100) 评论(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 阅读(510) 评论(0) 推荐(0) 编辑
摘要: PyQt5 创建下拉复选框 总体目录结构 要先自定义下拉复选框类 参考:自定义实现 PyQt5 下拉复选框 ComboCheckBox # 下拉复选框测试/combocheckbox.py from PyQt5.QtWidgets import QComboBox, QLineEdit, QList 阅读全文
posted @ 2023-02-16 14:11 meizhengchao 阅读(847) 评论(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 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 看小说消磨时间,但是广告太多了,且大多都是不健康的广告, 本着无聊练手的想法写了个小说爬虫,可以爬取小说并按小说名章节目录存储 网站是众多盗版网站中的一个 爬取效果如下 # xs_spider\xs_spider\spiders\sx_spider_01.py import scrapy from 阅读全文
posted @ 2023-02-02 14:46 meizhengchao 阅读(794) 评论(0) 推荐(0) 编辑
摘要: 如题 服务器系统由windows换为linux后 阿里云的个人服务器报警性能受限 但是服务器上运行的程序仅有数据采集,windows服务器上运行绰绰有余 按理来说linux上会更轻松才对 检查一番后发现使用nohup运行的python脚本中有input,导致cpu使用率居高不下 运行测试验证一下 运 阅读全文
posted @ 2022-12-30 12:45 meizhengchao 阅读(212) 评论(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 阅读(32) 评论(0) 推荐(0) 编辑