上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: from base64 import b64encode, b64decode from binascii import a2b_hex, b2a_hex from Crypto.Cipher import AES def aes_encrypt(key: str, data: str): """ 阅读全文
posted @ 2022-11-24 17:15 二二二狗子 阅读(56) 评论(0) 推荐(0)
摘要: 1. json格式 服务端 from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str pri 阅读全文
posted @ 2022-11-17 19:44 二二二狗子 阅读(41) 评论(0) 推荐(0)
摘要: def decorator(func): def wrapper_decorator(*args, **kwargs): #调用前操作 ret_val = func(*args, **kwargs) #调用后操作 return ret_val return wrapper_decorator 转载: 阅读全文
posted @ 2022-07-29 10:16 二二二狗子 阅读(24) 评论(0) 推荐(0)
摘要: import tqdm import time for info in tqdm.tqdm( range(10), total=10, ncols=80 ): time.sleep(2) 阅读全文
posted @ 2022-07-12 15:19 二二二狗子 阅读(59) 评论(0) 推荐(0)
摘要: import re text = '张三电话:15089169311,账号221508916931154' phone = re.findall(r'(?:\D|^)(1[3456789]\d{9})(?:\D|$)', text) print(phone) # 更详细的限制号码 phone_s = 阅读全文
posted @ 2022-06-08 15:27 二二二狗子 阅读(235) 评论(0) 推荐(0)
摘要: # https://kekee000.github.io/fonteditor/ import re import requests from io import BytesIO import base64 from fontTools.ttLib import TTFont from lxml i 阅读全文
posted @ 2022-06-01 09:49 二二二狗子 阅读(210) 评论(0) 推荐(0)
摘要: 在线字体工具:https://font.qqe2.com/ import re import requests from io import BytesIO import base64 from fontTools.ttLib import TTFont from hashlib import md 阅读全文
posted @ 2022-05-31 17:26 二二二狗子 阅读(225) 评论(0) 推荐(0)
摘要: import base64 from Crypto.Cipher import DES def aes_encrypt(key, text): """ DES加密 """ bs = DES.block_size pad_text = text + (bs - len(text) % bs) * ch 阅读全文
posted @ 2022-05-25 11:12 二二二狗子 阅读(37) 评论(0) 推荐(0)
摘要: import os current_dir = os.path.dirname(os.path.abspath(__file__)) 阅读全文
posted @ 2022-05-18 10:15 二二二狗子 阅读(45) 评论(0) 推荐(0)
摘要: 1.协程 协程函数: 定义形式为 async def 的函数; 协程对象: 调用 协程函数 所返回的对象。 2.创建任务 asyncio.create_task(coro, *, name=None) 将 coro 协程 封装为一个 Task 并调度其执行。返回 Task 对象。 3.并发运行任务 阅读全文
posted @ 2022-05-05 20:42 二二二狗子 阅读(68) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 8 下一页