惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
N
News and Events Feed by Topic
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
The Cloudflare Blog
H
Heimdal Security Blog
Schneier on Security
Schneier on Security
Engineering at Meta
Engineering at Meta
Google Online Security Blog
Google Online Security Blog
宝玉的分享
宝玉的分享
AI
AI
The GitHub Blog
The GitHub Blog
MongoDB | Blog
MongoDB | Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
The Last Watchdog
The Last Watchdog
T
Troy Hunt's Blog
S
Security @ Cisco Blogs
H
Hacker News: Front Page
F
Fortinet All Blogs
博客园_首页
S
Secure Thoughts
N
News and Events Feed by Topic
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
Spread Privacy
Spread Privacy
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Hugging Face - Blog
Hugging Face - Blog
Hacker News: Ask HN
Hacker News: Ask HN
C
CXSECURITY Database RSS Feed - CXSecurity.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
L
LINUX DO - 最新话题
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Schneier on Security
Know Your Adversary
Know Your Adversary
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Scott Helme
Scott Helme
P
Privacy & Cybersecurity Law Blog
S
Securelist
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
O
OpenAI News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
PCI Perspectives
PCI Perspectives
L
LangChain Blog
雷峰网
雷峰网
Security Archives - TechRepublic
Security Archives - TechRepublic
V2EX - 技术
V2EX - 技术

FrWalker Blog

求职-LeetCode热题100刷题记录 新机迁移-hexo\vscode\便携git\miniconda\i卡环境配置 通用印刷电路板全自动布线算法 基于元器件手册的智能建库算法 博客语法记录 柔性电路板FPC自动布线 拓竹P1S初体验 cdn加速hexo博客_2次开发hexo-cdn-jsdelivr 不更换插件解决Hexo博客Latex公式的渲染问题 修改博客加密插件hexo-blog-encrypt 3.1.9,适配移动端 强化学习-1-多臂老虎机 强化学习-2-马尔可夫决策过程 强化学习-3-动态规划 强化学习-4-时序差分 强化学习-5-Dyna-Q算法 强化学习-6-DQN算法 2024华为软件精英挑战赛-智慧港口 3.liunx shell及其脚本理解 2.linux文件系统及用户管理
代码开发与环境管理工具汇总
FrWalker · 2025-04-26 · via FrWalker Blog

代码开发与环境管理工具汇总

发表于更新于

字数总计:781阅读时长:2分钟 新加坡

环境配置环境管理

代码开发与环境管理工具汇总

在其他配置相关的文章中使用过的工具不再重复记录,这里记录一些新使用的工具,后续相关信息都在此处汇总

vscode相关

命令面板

vscode的命令面板可以快速执行一些常用的操作,按下ctrl+shift+P调出命令面板,输入相关命令即可。常用命令如下:
1.直接搜索相关文件或文件夹:ctrl+p
2.默认输入>搜索并运行各种命令:ctrl+shift+P
3.输入@或者输入ctrl+shift+.搜索当前文件符号,标题层级
4.ctrl+t或输入#在整个项目中搜索相关的符号、接口或者标题
5.ctrl+shift±>逐单词选中,ctrl+shift+<-逐单词取消选中,ctrl+shift+up/down逐行选中,ctrl+shift+k删除当前行
6.ctrl+D选中相同的词,ctrl+shift+L选中相同的行进行同步修改,ctrl+c/x/v复制/剪切/粘贴选中部分或者当前行
7.alt+up/down移动当前行到上/下一行,alt+shift+up/down移动复制当前行到上/下一段

python相关

uv

uv官方文档
相比conda、pip,uv的优势在于使用rust开发,配置包时速度更快。常见用法记录如下:

  1. 安装uv并配置环境变量
1
2
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
set PATH=%PATH%;%USERPROFILE%\.uv\bin
  1. 初始化当前项目用uv init,新项目用uv init project_name,会自动创建pyproject.toml和git管理项目:
1
2
3
4
5
.
├── .python-version
├── README.md
├── main.py
└── pyproject.toml
  1. 第一次运行uv run, uv sync, or uv lock等命令时会自动生成:
1
2
3
4
5
6
7
8
9
10
.
├── .venv
│   ├── bin
│   ├── lib
│   └── pyvenv.cfg
├── .python-version
├── README.md
├── main.py
├── pyproject.toml
└── uv.lock

source .venv\Scripts\activate激活虚拟环境
4. 安装依赖包uv add package_name,更新依赖包uv update package_name,删除依赖包uv remove package_name,使用此种方式安装包会自动更新uv.lock和pyproject.toml文件
5. 使用uv sync会自动同步pyproject.toml、uv.lock文件中的依赖包版本到虚拟环境,并删除不相干的依赖包,pyproject.toml文件中的依赖包支持手动更改。
6. 使用uv run python_file.py运行python文件,会自动调用相关环境。
7. 使用uv builduv publish发布项目,会自动生成wheel包,上传到pypi或其他镜像源。
相关命令和其他用法具体参考官方文档:https://docs.astral.sh/uv/

ruff

ruff官方文档
ruff 是一个可用来格式化python文件的工具,可以自动格式化包导入、格式化代码、修复代码、检查代码规范等,也是rust开发,速度快、易用。
在vscode中安装ruff插件,并在settings.json中配置ruff:

1
2
3
4
5
6
7
8
9
"[python]": {
"editor.formatOnType": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit",
}

},

上述配置会在保存时自动格式化代码,ctrl+shift+P调出命令面板,使用ruff fix命令自动修复代码,使用ruff imports命令自动格式化包导入,使用ruff documen命令格式化整个文档。

头像头像

FrWalker

a blog for sharing my thoughts and experiences

本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 FrWalker Blog