摘要: 醉来不知天在水 满船清梦压星河 MySQL9.0+之后,gtid_mode无法直接从ON改为OFF,需要先经过ON_PERMISSIVE和OFF_PERMISSIVE 该脚本使用tortoise-orm==0.25.1读取环境变量TORTOISE_MYSQL_PASS作为数据库密码,然后关闭enfo 阅读全文
posted @ 2025-11-22 22:32 waketzheng 阅读(4) 评论(0) 推荐(0)
摘要: 何当共剪西窗烛 却话巴山夜雨时 使用Docker来启动fastapi项目: # 第一阶段:安装必要的软件 FROM python:3.12-slim as BASE ENV DEBIAN_FRONTEND=noninteractive \ PYTHONUNBUFFERED=1 \ PIP_DEFAU 阅读全文
posted @ 2025-11-22 17:27 waketzheng 阅读(6) 评论(0) 推荐(0)
摘要: 巴山楚水凄凉地 二十四桥明月夜 查看apt速度,如果慢的话,手动给它换源 sudo apt update 更新系统软件包,过程中有需要选择的,直接回车就行 sudo apt upgrade -y && sudo apt autoremove -y 查看Python版本 python3 -V pyth 阅读全文
posted @ 2025-11-19 23:45 waketzheng 阅读(5) 评论(0) 推荐(0)
摘要: 但使龙城飞将在 不教胡马渡阴山 Code: #!/usr/bin/env python import re # pip install httpx orjson loguru sanic gunicorn 'uvicorn[standard]' from httpx import AsyncClie 阅读全文
posted @ 2025-08-20 18:03 waketzheng 阅读(6) 评论(0) 推荐(0)
摘要: 齐鲁青未了 造化钟神秀 阴阳割昏晓 Set mirror for pip mkdir ~/archives cd ~/archives git clone https://github.com/waketzheng/carstino cd carstino python pip_conf.py -- 阅读全文
posted @ 2025-08-15 15:59 waketzheng 阅读(23) 评论(0) 推荐(0)
摘要: 岱宗夫如何 千山鸟飞绝 万径人踪灭 问了DeepSeek,然后优化了一下,适用于不方便安装requests和httpx的情况: from typing import Any, Self from urllib.error import HTTPError, URLError from urllib. 阅读全文
posted @ 2025-08-10 20:13 waketzheng 阅读(21) 评论(0) 推荐(0)
摘要: 问渠哪得清如许 白云深处有人家 cat gui.py from __future__ import annotations import sys import tkinter as tk class TkGui: @classmethod def input(cls, prompt: str = " 阅读全文
posted @ 2025-08-08 23:17 waketzheng 阅读(13) 评论(0) 推荐(0)
摘要: 但愿人长久 千里共婵娟 $ cat main.py from __future__ import annotations import re from pathlib import Path import typer __version__ = "0.1.2" cli = typer.Typer() 阅读全文
posted @ 2025-08-07 10:43 waketzheng 阅读(7) 评论(0) 推荐(0)
摘要: 江山如此多娇 玉人何处教吹箫 Updated At 2025-11-30 Would rather to use justfile instead: #!/usr/bin/env -S just --justfile # ^ A shebang isn't required, but allows 阅读全文
posted @ 2025-08-04 22:59 waketzheng 阅读(9) 评论(0) 推荐(0)
摘要: 草长莺飞二月天 天街小雨润如酥 This is a python script that start a frontend server and auto open browser (requires Python3.8+): #!/usr/bin/env python3 """前端服务启动脚本(会 阅读全文
posted @ 2025-08-04 22:24 waketzheng 阅读(5) 评论(0) 推荐(0)