上一页 1 2 3 4 5 6 ··· 36 下一页

SQLAlchemy 多表关系

摘要: 在 SQLAlchemy 中,可以使用外键(Foreign Key)和关系(Relationship)来在两个表之间建立关联关系。主要方法有两种: ​ 1. 使用 ForeignKey(在表中建立外键字段) ​ 2. 使用 relationship(在 ORM 层面建立 Python 对象关系) 示 阅读全文
posted @ 2025-03-10 14:30 朝朝暮Mu 阅读(114) 评论(0) 推荐(0)

Jupyter Notebook 转 py 文件

摘要: 在 Jupyter Notebook 中,你可以使用 nbconvert 工具快速将 .ipynb 文件转换为 .py 文件。以下是几种方法: 方法 1:使用命令行 如果你已经安装了 nbconvert,可以在终端(或 Jupyter Notebook 的 ! 运行 Shell 命令)执行: jup 阅读全文
posted @ 2025-03-09 19:26 朝朝暮Mu 阅读(1188) 评论(0) 推荐(0)

Chocolatey 使用教程

摘要: Chocolatey 是 Windows 上比较流行的包管理工具,类似于 Linux 上的 apt 或 macOS 上的 brew,能极大减轻软件管理工作,尤其是对于需要部署 Windows Server 的用户来说,解决了很大问题。 Chocolatey 介绍 Chocolatey 通过命令行的方 阅读全文
posted @ 2025-03-08 13:32 朝朝暮Mu 阅读(1470) 评论(0) 推荐(0)

通过SSH远程登录Windows Server

摘要: 通过 SSH 密钥远程登录 Windows Server,通常需要先确保 Windows Server 上的 OpenSSH 服务器正确配置,并且客户端已经生成并配置好密钥。以下是完整的步骤: 1. 在客户端生成 SSH 密钥 如果你尚未生成 SSH 密钥,可以在 macOS 或 Linux 终端执 阅读全文
posted @ 2025-03-08 10:48 朝朝暮Mu 阅读(326) 评论(0) 推荐(0)

自定义json序列化器

摘要: import json from datetime import date, datetime class DateEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return obj. 阅读全文
posted @ 2025-02-26 10:05 朝朝暮Mu 阅读(11) 评论(0) 推荐(0)

SSH相关

摘要: 配置云服务器登陆信息,可快速登陆,不用每次手动输入IP地址和密码 Host server1 HostName xxx.xxx.xxx.xxx User root IdentityFile ~/.ssh/id_rsa Host server2 HostName xxx.xxx.xxx.xxx User 阅读全文
posted @ 2025-02-23 22:23 朝朝暮Mu 阅读(7) 评论(0) 推荐(0)

ES聚合查询

摘要: Elasticsearch 聚合分析(Aggregations) Elasticsearch 聚合(Aggregations) 是一种强大的数据分析功能,类似于 SQL 的 GROUP BY,可以用于 统计、分组、计算平均值、最大值、最小值、直方图分析 等。 🔹 1. 聚合查询的基本结构 GET 阅读全文
posted @ 2025-02-20 22:58 朝朝暮Mu 阅读(105) 评论(0) 推荐(0)

MacOS安装Minio

摘要: 1. 安装 1.1 通过homebrew安装 推荐使用 homebrew工具进行安装,简单又快捷 brew install minio 通过以上工具安装后,运行文件默认路径为:/opt/homebrew/bin 可以通过brew --prefix快速定位到安装目录 1.2 通过Docker安装 拉取 阅读全文
posted @ 2025-02-17 16:23 朝朝暮Mu 阅读(931) 评论(0) 推荐(0)

集成qxb

摘要: def index(): key=b"key" iv=b"iv" # 创建 AES 加密实例 cipher = AES.new(key, AES.MODE_CBC, iv) tenant = "tenant" account = "account" # 前端获取的子账号唯一标识,不可写死,不可为中文 阅读全文
posted @ 2025-02-13 21:45 朝朝暮Mu 阅读(9) 评论(0) 推荐(0)

Jupyter Notebook 创建新的kernel

摘要: 在 macOS 上创建新的 Jupyter Notebook 内核(Kernel)并进行配置,一般需要使用 conda 或 virtualenv 创建一个新的 Python 环境,然后注册为 Jupyter 内核。以下是详细步骤: 1. 安装 Jupyter Notebook(如果尚未安装) 如果你 阅读全文
posted @ 2025-02-12 21:25 朝朝暮Mu 阅读(360) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 36 下一页