摘要: 使用pandas读取csv数据,然后将其转化为字典,再写入到数据库的时候,数据库总是报错类型错误,于是转为orm之前,统一转化一下类型 from sqlalchemy import DECIMAL, Index, String, Date, Integer, Text, CHAR, SmallInt 阅读全文
posted @ 2024-07-14 22:16 meizhengchao 阅读(1) 评论(0) 推荐(0) 编辑
摘要: ubuntu桌面版办公环境,不能用office,使用wps_linux表格处理数据,大量数据写入的时候,python特别慢,需要表格连接数据库读写数据 安装sqlite odbc 首先安装sqlite的odbc sudo apt-get update sudo apt-get install uni 阅读全文
posted @ 2024-06-24 00:53 meizhengchao 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 根据数据的内容自动创建数据库表结构 from sqlalchemy import create_engine, Column, Integer, String, Float, Boolean from sqlalchemy.ext.declarative import declarative_bas 阅读全文
posted @ 2024-06-21 15:52 meizhengchao 阅读(8) 评论(0) 推荐(0) 编辑
摘要: from sqlalchemy import String, TypeDecorator # 自定义类型 class DateTimeTZString(TypeDecorator): """指定函数名称""" impl = String def process_bind_param(self, va 阅读全文
posted @ 2024-06-05 10:48 meizhengchao 阅读(1) 评论(0) 推荐(0) 编辑
摘要: class DataBase: """ """ def __init__(self, setting: Dict = None): """ """ self.process_count = 0 @staticmethod def counter_decorator(func: Callable) - 阅读全文
posted @ 2024-05-27 16:08 meizhengchao 阅读(4) 评论(0) 推荐(0) 编辑
摘要: from sqlalchemy import DECIMAL, Index, String, Date, Integer, Text, CHAR, SmallInteger, Float, Time, case, and_, extract, Boolean, Enum, TypeDecorator 阅读全文
posted @ 2024-05-25 23:09 meizhengchao 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #查看限制结果 ulimit -a # 修改配置 # 删除最后一行 echo -e "# add_config" | sudo tee -a /etc/security/limits.conf # 加上文本 echo -e "\n" | sudo tee -a /etc/security/limit 阅读全文
posted @ 2024-05-22 22:43 meizhengchao 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 报错的代码在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 阅读(17) 评论(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 阅读(356) 评论(0) 推荐(0) 编辑