摘要: import requestsdef download_file(url,data,file_name,)headers={"token":"0b9f05084c26df3f02a9d8fa1de45cd3"}r = requests.get(url,params=data,headers=head 阅读全文
posted @ 2021-07-31 17:35 fyangq 阅读(1726) 评论(0) 推荐(0) 编辑
摘要: import sockettarget_host = "xxxxx"target_port = 7777# 建立一个socket对象def send_udp(data): # 建立一个socket对象 client = socket.socket(socket.AF_INET, socket.SOC 阅读全文
posted @ 2021-07-31 17:33 fyangq 阅读(492) 评论(0) 推荐(0) 编辑
摘要: import osimport xlwtimport pymysqlimport datetimefrom do_config import cfgclass MysqlToExcel: def __init__(self,file_name,sql): self.host = cfg.get_va 阅读全文
posted @ 2021-02-07 15:08 fyangq 阅读(369) 评论(0) 推荐(0) 编辑
摘要: import codesimport jsondef write_json(self,result,json_name): with codecs.open(json_name, "w", "utf-8") as f: j = json.dumps(result, indent=4, ensure_ 阅读全文
posted @ 2021-01-18 10:50 fyangq 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 1.将数据从现有表复制到新的数据,例如备份数据和复制生产数据进行测试。我们要想将数据从旧表复制到新表,那我们需要使用的sql案例如下: CREATE TABLE new_table SELECT col, col2, col3 FROM existing_table; 首先使用create tabl 阅读全文
posted @ 2021-01-16 15:42 fyangq 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 1、安装 想要postman连接mysql,需要安装xmysql,启动该服务,然后才可以调用。 预置条件:完成nodejs和npm的安装 安装时要注意版本的匹配问题,用法和注意事项可查看https://github.com/o1lab/xmysql#xmysql--one-command-to-ge 阅读全文
posted @ 2021-01-13 15:29 fyangq 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 查看现有环境语言 locale 如果没有en_US.UTF-8 则安装 locale-gen en_US.UTF-8 可用语言 locale -a 阅读全文
posted @ 2020-12-24 17:45 fyangq 阅读(437) 评论(0) 推荐(0) 编辑
摘要: import osfilePath = 'E:\\python\\merge_json\\DATA\\'# for root,dirs,files in os.listdir(filePath):# print(root,dirs)# print(files)#root当前目录路径#dirs 当前路 阅读全文
posted @ 2020-11-23 15:08 fyangq 阅读(78) 评论(0) 推荐(0) 编辑
摘要: def check_key_list(dict1): """ 找出字典中值不为空的key :param dict1: :return: """ key_list=[] for k,v in dict1.items(): if v==None or v=='': pass else: key_list 阅读全文
posted @ 2020-10-28 09:38 fyangq 阅读(604) 评论(0) 推荐(0) 编辑
摘要: import xlrdapply_dic = []def get_excel(excel_path): with xlrd.open_workbook(excel_path) as workbook : name_sheets = workbook.sheet_names() #获取Excel的sh 阅读全文
posted @ 2020-09-24 10:13 fyangq 阅读(515) 评论(0) 推荐(0) 编辑