摘要: import time class LocalStrategy: def execute(self): print("this is a local 104 execute") class SaasStrategy: def execute(self): print("this is a saas 阅读全文
posted @ 2024-02-28 19:57 干炸小黄鱼 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import time class Observer: def __init__(self, name) -> None: self.name = name def update(self, message): print("name %s received message: %s" % (self 阅读全文
posted @ 2024-02-28 19:57 干炸小黄鱼 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 启动测试应用时, 有时需要自己配置证书签名: 1 使用系统自带openssl openssl req \ > -x509 \ > -nodes \ > -days 365 \ > -newkey rsa:2048 \ > -keyout example.key \ > -out example.cr 阅读全文
posted @ 2024-02-23 11:09 干炸小黄鱼 阅读(239) 评论(0) 推荐(0) 编辑
摘要: iptables -A INPUT -p tcp -s {src_ip} --dport 80 -j ACCEPT iptables -A INPUT -p tcp -s {src_ip} --dport 443 -j ACCEPT iptables -A INPUT -p tcp -s {src_ 阅读全文
posted @ 2023-12-20 16:39 干炸小黄鱼 阅读(6) 评论(0) 推荐(0) 编辑
摘要: FROM python:3.8.10-slim RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \ apt-get update && \ apt-get install -y 阅读全文
posted @ 2023-12-15 18:00 干炸小黄鱼 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 最近由pycharm切到VScode, 记录一下项目的通用配置; 在项目目录建一个.vscode的文件夹分别创建三个文件 lunch.json python运行配置 settings.json vscode配置 包括代码校验; sftp.json 文件服务器配置, 直接右键上传到服务器 lunch. 阅读全文
posted @ 2023-12-08 19:32 干炸小黄鱼 阅读(107) 评论(0) 推荐(0) 编辑
摘要: ` import jieba from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity templates = [ "分析一下攻 阅读全文
posted @ 2023-11-27 18:52 干炸小黄鱼 阅读(23) 评论(0) 推荐(0) 编辑
摘要: pip3安装时提示 ERROR: Could not build wheels for python-ldap, uWSGI, M2Crypto, which is required to install pyproject.toml-based projects ERROR: Could not 阅读全文
posted @ 2023-09-12 16:07 干炸小黄鱼 阅读(1389) 评论(0) 推荐(0) 编辑
摘要: wsl 运行一段时间后执行没有反应, 需要重启LxssManager 管理员模式打开 powshell 找到pid, 结束pid ``` >tasklist /svc /fi "services eq LxssManager" 映像名称 PID 服务 svchost.exe 20572 LxssMa 阅读全文
posted @ 2023-09-07 09:45 干炸小黄鱼 阅读(1220) 评论(0) 推荐(0) 编辑
摘要: ``` $ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak $ sudo sed -i 's/security.ubuntu/mirrors.aliyun/g' /etc/apt/sources.list $ sudo sed -i ' 阅读全文
posted @ 2023-09-06 20:06 干炸小黄鱼 阅读(288) 评论(0) 推荐(0) 编辑