会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
katsute_不语
博客园
首页
新随笔
联系
订阅
管理
2025年2月15日
clash for linux
摘要: 下载 clash 官网:https://doreamon-design.github.io/clash/zh_CN/ clash git hub https://github.com/doreamon-design/clash Country.mmdb github 内搜索 Country.mmdb
阅读全文
posted @ 2025-02-15 03:48 katsute_不语
阅读(1)
评论(0)
推荐(0)
2023年7月10日
Python 实现 ThreadLocal
摘要: ```python import threading from threading import get_ident import time class Context: def __init__(self): object.__setattr__(self, '__global_context__
阅读全文
posted @ 2023-07-10 15:30 katsute_不语
阅读(70)
评论(0)
推荐(0)
2023年7月1日
Hyper-V 虚拟机 Ubuntu 配置静态 IP
摘要: 一、新建虚拟交换机 1.Hyper-V 管理器->虚拟交换机管理->新建虚拟交换机 2.选择【内部】->创建虚拟交换机 3.自定义名称->应用 4.控制面板->网络和Internet->网络和共享中心 5.点击刚刚创建的虚拟交换机 点击 Internet 协议版本(TCP/IPv4) 配置 ip 和
阅读全文
posted @ 2023-07-01 01:09 katsute_不语
阅读(1740)
评论(0)
推荐(1)
Win 终端 SSH 免密登录 Linux
摘要: 1. qweqw 2. QEWQW 3. QWEWQ ## 一、生成密钥 #### 执行命令 ```shell cd ~/.ssh ssh-keygen ``` #### 会让你输入密钥文件名,公私钥密码啥的,直接三个回车,跳过 
评论(0)
推荐(0)
2023年6月20日
Python logging 通用模板
摘要: ```python # logger.py import logging import socket import threading import uuid from logging.config import dictConfig local = threading.local() # 定义一个
阅读全文
posted @ 2023-06-20 10:17 katsute_不语
阅读(108)
评论(0)
推荐(0)
2023年6月9日
Python 协程池,异步IO非阻塞式,http 请求
摘要: ## 先写个 Flask demo ```python import time from flask import Flask app = Flask(__name__) @app.route('/') def hello(id): time.sleep(2) return 'Hello, Worl
阅读全文
posted @ 2023-06-09 10:24 katsute_不语
阅读(29)
评论(0)
推荐(0)
2023年5月21日
Python 设计模式-观察者模式
摘要: 观察者模式是一种行为设计模式,它允许你定义一种订阅机制,可以在对象事件发生时通知多个观察者对象。下面是一个简单的Python观察者模式代码示例: ```python class Subject: """ 被观察者类,维护观察者列表,并在状态发生改变时通知观察者 """ def __init__(se
阅读全文
posted @ 2023-05-21 17:56 katsute_不语
阅读(124)
评论(0)
推荐(0)
Python 设计模式-单例模式
摘要: Python中有多种实现单例模式的方式,以下是其中的几种: 1. 基础单例模式 ```python class Singleton(object): __instance = None def __new__(cls, *args, **kwargs): if not cls.__instance:
阅读全文
posted @ 2023-05-21 17:36 katsute_不语
阅读(12)
评论(0)
推荐(0)
2021年5月15日
Python marshmallow 序列化和反序列化
摘要: 安装 marshmallow pip install marshmallow 基本使用 demo.py """ # python 序列化 - 序列化:对象转化为字典 - 反序列化: 字典转化为对象 """ from marshmallow import fields, post_load, Sche
阅读全文
posted @ 2021-05-15 23:36 katsute_不语
阅读(182)
评论(0)
推荐(0)
MySQL 初步学习
摘要: 准备数据 创建表 -- 创建数据库 create database test charset=utf8; -- 使用数据库 use test; -- students表 create table students( id int unsigned primary key auto_increment
阅读全文
posted @ 2021-05-15 23:08 katsute_不语
阅读(45)
评论(0)
推荐(0)
下一页
公告