摘要: 1. 通过 AsyncResult获取任务结果对象 from celery.result import AsyncResult import pytz from datetime import datetime # 根据任务ID获取任务结果对象 result = AsyncResult(task_i 阅读全文
posted @ 2024-01-18 14:42 是阿杰呀 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 安装了Ubuntu20.04, 安装了ssh:sudo apt-get install ssh 想用Xshell通过SSH连接,结果报错:“服务器发送了一个意外的数据包”,如下图所示: ①在/etc/ssh/sshd_config配置文件最后面添加下面一行: KexAlgorithms curve2 阅读全文
posted @ 2024-01-02 09:40 是阿杰呀 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 1. 使用 from cryptography.fernet import Fernet 第三方库 pip3 install cryptography 2. Fernet的使用 from cryptography.fernet import Fernet # 生成加密密钥 key = Fernet. 阅读全文
posted @ 2023-12-21 12:24 是阿杰呀 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 判断密码长度最少8位, 且应为数字、字母和特殊符号中至少2类的组合 import re def check_password_func(password): # 长度至少为8位,且应为数字、字母和特殊符号中至少2类的组合 match1 = bool(re.search(r'\d+', passwor 阅读全文
posted @ 2023-12-19 16:19 是阿杰呀 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1. 渲染多级菜单, 并调整数据 # 生成 菜单树状目录 class MenuTreeView(APIView): # 多层级 生成树状目录 def generate_menu_tree(self, parent_menu): temp_menu_list = [] sub_menus = mode 阅读全文
posted @ 2023-11-23 17:38 是阿杰呀 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 转载地址 https://blog.csdn.net/ProceduralMan/article/details/128682590 阅读全文
posted @ 2023-11-22 16:29 是阿杰呀 阅读(209) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd from pathlib import Path def backwardtrace(file: str): if not Path(file).is_file(): raise ValueError('File does not exist!') else: 阅读全文
posted @ 2023-11-21 14:59 是阿杰呀 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 1. 读取 shp/geojson 边界文件 import geopandas as gpd file = 'media/abc.geojson' gdf = gpd.read_file(file) # 将 GeoDataFrame 转换为 GeoJSON 字符串 geojson = json.lo 阅读全文
posted @ 2023-11-21 14:57 是阿杰呀 阅读(827) 评论(0) 推荐(0) 编辑
摘要: 1. Django3.2版本升级后的一些报错, 导致项目运行失败 1.1 site-packages/rest_framework/serializers.py from django.db.models.fields import FieldDoesNotExist ImportError: ca 阅读全文
posted @ 2023-10-30 10:52 是阿杰呀 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 文件可执行权限 读(4)、写(2)和执行(1)的权限 chmod 755 file_name 阅读全文
posted @ 2023-10-30 10:32 是阿杰呀 阅读(54) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示