上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页
摘要: pip install pyyaml def save_dict_to_yaml(dict_value: dict, save_path: str): """dict保存为yaml""" with open(save_path, 'w') as file: file.write(yaml.dump( 阅读全文
posted @ 2023-03-17 10:36 3ξ 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 读取文件方法: def read_file(file_name, chunk_size=512): with open(file_name, "rb") as f: while True: c = f.read(chunk_size) if c: yield c else: break View C 阅读全文
posted @ 2023-03-16 19:11 3ξ 阅读(235) 评论(0) 推荐(0) 编辑
摘要: # pip install xlrd==1.2.0 """ 1.高版本的包不支持xlsx格式的文件, 2.如果想操作xlsx请安装低版本的包 这边 索引是从0开始的 """ import xlrd xls_file_src = "xls_demo.xls" xlsx_file_src = "xlsx 阅读全文
posted @ 2023-03-15 17:12 3ξ 阅读(56) 评论(0) 推荐(0) 编辑
摘要: # pip install openpyxl """ 1.警告:openpyxl只可以操作xlsx格式的文件,如果想操作xls请使用xlrd 这边 索引是从1开始的 更离谱的是 创建sheet页面的索引竟然是从0开始的 # 然后还有一点,就是读取值的时候 如果是公式会读出来None,这会在windo 阅读全文
posted @ 2023-03-15 17:11 3ξ 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #vim替换命令1.如果替换与被替换的没有/:%s/old_str/new_str/g:%s/csjs_dev/csjs2_server_dev/g2.如果替换与被替换的有/:%s#old_str#new_str#g:%s#Etc/GMT-8#Etc/GMT-9#g 阅读全文
posted @ 2023-02-24 15:11 3ξ 阅读(36) 评论(0) 推荐(0) 编辑
摘要: @classmethoddef get_obj_by_primary_value(cls, primary_value=None): primary_key = None fields = cls._meta.get_fields() for obj in fields: if obj.primar 阅读全文
posted @ 2023-02-21 17:55 3ξ 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1.rsync安装yum -y install rsync2.基本用法都是-avzp3.1将本地的文件同步到远端服务器rsync -avzp source/ username@remote_host:destination3.2将远端服务器文件同步到本地rsync -avzp username@re 阅读全文
posted @ 2023-02-21 16:59 3ξ 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-02-20 10:50 3ξ 阅读(8) 评论(0) 推荐(0) 编辑
摘要: try: server_id = _create(area_id=area_id, server_id=server_id, config_list=config_list)except Exception as e: msg = traceback.format_exc() print(msg) 阅读全文
posted @ 2023-02-09 10:07 3ξ 阅读(17) 评论(0) 推荐(0) 编辑
摘要: nssm使用说明1.下载还是去阿里云盘下载吧2.安装待定3.使用说明 nssm install nssm start xxx nssm stop xxx nssm restart xxx nssm get xxx AppDirectory # 获取程序目录 将python程序注册到服务里遇到的问题 阅读全文
posted @ 2023-01-29 15:18 3ξ 阅读(22) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页