From 6f70f4f0df0e04e0cdfa696d97c0b5012ac02e50 Mon Sep 17 00:00:00 2001 From: 01Petard <1520394133@qq.com> Date: Tue, 11 Feb 2025 16:11:56 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E5=A4=87=E4=BB=BD=E6=96=87=E7=AB=A0?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config.mts | 2 +- "docs/\346\235\202\350\260\210/index.md" | 2 +- .../\345\205\263\344\272\216yt-dlp.md" | 47 --- ...57\345\244\207\345\277\230\345\275\225.md" | 274 ++++++++++++++++++ ...70\345\205\263\345\221\275\344\273\244.md" | 8 + 5 files changed, 284 insertions(+), 49 deletions(-) delete mode 100644 "docs/\346\235\202\350\260\210/\345\205\263\344\272\216yt-dlp.md" create mode 100644 "docs/\346\235\202\350\260\210/\345\274\200\345\217\221\344\277\241\346\201\257\345\244\207\345\277\230\345\275\225.md" diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 79dcda8..bcb94e8 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -236,7 +236,7 @@ export default defineConfig({ text: "杂谈", items: [ // {text: "16形人格测试+政治倾向测试", link: "/杂谈/16形人格测试+政治倾向测试"}, - {text: "关于yt-dlp", link: "/杂谈/关于yt-dlp"}, + {text: "开发信息备忘录", link: "/杂谈/开发信息备忘录"}, {text: "设计模式的荼毒体现在哪?", link: "/杂谈/设计模式的荼毒体现在哪"}, {text: "对于大模型绘制UML图的调研", link: "/杂谈/对于大模型绘制UML图的调研"}, {text: "2024年常见Ollama大模型对比", link: "/杂谈/2024年常见Ollama大模型对比"}, diff --git "a/docs/\346\235\202\350\260\210/index.md" "b/docs/\346\235\202\350\260\210/index.md" index 7d840fa..4d8c19f 100644 --- "a/docs/\346\235\202\350\260\210/index.md" +++ "b/docs/\346\235\202\350\260\210/index.md" @@ -10,7 +10,7 @@ _这就没必要搞个目录了吧?_ [//]: # (0. [16形人格测试+政治倾向测试](./16形人格测试+政治倾向测试.md)) -1. [关于yt-dlp](./关于yt-dlp.md) +1. [开发信息备忘录](./开发信息备忘录.md) 2. [设计模式的荼毒体现在哪?](./设计模式的荼毒体现在哪.md) 3. [对于大模型绘制UML图的调研](./对于大模型绘制UML图的调研.md) 4. [2024年常见Ollama大模型对比](./2024年常见Ollama大模型对比.md) diff --git "a/docs/\346\235\202\350\260\210/\345\205\263\344\272\216yt-dlp.md" "b/docs/\346\235\202\350\260\210/\345\205\263\344\272\216yt-dlp.md" deleted file mode 100644 index 95afbf9..0000000 --- "a/docs/\346\235\202\350\260\210/\345\205\263\344\272\216yt-dlp.md" +++ /dev/null @@ -1,47 +0,0 @@ -# yt-dlp——强大的视频下载工具 - -> 项目Git地址:[yt-dlp/yt-dlp: A feature-rich command-line audio/video downloader](https://github.com/yt-dlp/yt-dlp) - -提取这个地址的视频:`https://www.bilibili.com/BV1j6DYYpExQ` - -`-o '~/%(title)s.%(ext)s'`表示将视频文件放到用户桌面,文件名是视频名称 - -```shell -yt-dlp --cookies cookies.txt -o '~/Desktop/%(title)s.%(ext)s' 'https://www.bilibili.com/BV1j6DYYpExQ' -``` - -# 使用git时,去除".idea"、“.vscode”文件夹中的文件 - -```shell -git rm --cached -r ..idea\ -``` - -# EasyConnect - -代理服务器:`https://sslvpn.zjut.edu.cn/` - -用户名:`学号` - -密码:`密码` - -# 手动给视频超分辨率 - -1. 用`ffmpeg`截取帧 - - ```shell - ffmpeg -i .\tmp.mp4 -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 .\tmp_in_1440\frame%08d.jpg - ``` - -2. 用超分工具超分,我常用的是cugan和esrgan - - ```shell - .\realesrgan-ncnn-vulkan.exe -i tmp_in_1080 -o tmp_out_1080 -n realesr-animevideov3 -s 2 -f jpg - ``` - -3. 用`ffmpeg`合并帧 - - ```shell - ffmpeg -i .\tmp_out_1080\frame%08d.jpg -i .\1080.mp4 -map 0:v:0 -map 1:a:0 -c:a copy -c:v libx264 -r 24 -pix_fmt yuv420p output_w_audio.mp4 - ``` - - diff --git "a/docs/\346\235\202\350\260\210/\345\274\200\345\217\221\344\277\241\346\201\257\345\244\207\345\277\230\345\275\225.md" "b/docs/\346\235\202\350\260\210/\345\274\200\345\217\221\344\277\241\346\201\257\345\244\207\345\277\230\345\275\225.md" new file mode 100644 index 0000000..79a5133 --- /dev/null +++ "b/docs/\346\235\202\350\260\210/\345\274\200\345\217\221\344\277\241\346\201\257\345\244\207\345\277\230\345\275\225.md" @@ -0,0 +1,274 @@ +# 工具类 + +## yt-dlp——强大的视频下载工具 + +> 项目Git地址:[yt-dlp/yt-dlp: A feature-rich command-line audio/video downloader](https://github.com/yt-dlp/yt-dlp) + +提取这个地址的视频:`https://www.bilibili.com/BV1j6DYYpExQ` + +`-o '~/%(title)s.%(ext)s'`表示将视频文件放到用户桌面,文件名是视频名称 + +```shell +yt-dlp --cookies cookies.txt -o '~/Desktop/%(title)s.%(ext)s' 'https://www.bilibili.com/BV1j6DYYpExQ' +``` + +## 使用git时,去除".idea"、“.vscode”文件夹中的文件 + +```shell +git rm --cached -r ..idea\ +``` + +## EasyConnect + +> 代理服务器:`https://sslvpn.zjut.edu.cn/` +> +> 用户名:`学号` +> +> 密码:`密码` + +## 手动给视频超分辨率 + +1. 用`ffmpeg`截取帧 + + ```shell + ffmpeg -i .\tmp.mp4 -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 .\tmp_in_1440\frame%08d.jpg + ``` + +2. 用超分工具超分,我常用的是cugan和esrgan + + ```shell + .\realesrgan-ncnn-vulkan.exe -i tmp_in_1080 -o tmp_out_1080 -n realesr-animevideov3 -s 2 -f jpg + ``` + +3. 用`ffmpeg`合并帧 + + ```shell + ffmpeg -i .\tmp_out_1080\frame%08d.jpg -i .\1080.mp4 -map 0:v:0 -map 1:a:0 -c:a copy -c:v libx264 -r 24 -pix_fmt yuv420p output_w_audio.mp4 + ``` + + +# 舜宇贝尔 + +## 公司网络 + +``` +WiFi名:Sunny-Guest +密码:1234567890 + +网络认证用户名:sunnybaer +密码:1234567890 +``` + +## 个人账号 + +``` +zexiao.huang@sunny-baer.com +密码dddd +abc123! +Sunnybaer111! +``` + +## 连接服务器 + +```shell +ssh text@10.0.0.93 +abcd123! +``` + +## 数据库 + +```shell +10.0.0.93:3306 +root +m5Jwk.JR*Uxpbt^9f8jp +``` + +## 后端项目维护脚本(参考) + +```shell +git pull +``` + +```shell +mvn clean package -Ptest +``` + +```shell +nohup java -Xmx3g -Xms3g -XX:+UseG1GC -jar /var/www/wms-pro/target/wms-1.0.jar > /dev/null 2>&1 & +``` + +```shell +ps -ef | grep java | grep wms | grep -v grep | awk '{print $2}' | xargs kill -15 +``` + +## baer-tools在线工具箱 + +前端仓库:http://10.0.0.177/informatization/front/bear-tools-web + +后端仓库:http://10.0.0.177/informatization/backend/baer-tools + +> 上线页面:http://10.0.0.93:3000/#/ + +## 精工仓库管理系统 + +前端仓库:http://10.0.0.177/informatization/front/wms-pro-web + +后端仓库:http://10.0.0.177/informatization/backend/wms-pro + +> 上线页面:http://10.0.0.93:9528 +> +> 用户:`shenzhuo` +> +> 密码:`acbd@1234` + +## 精工生产日计划看板大屏 + +前台前端仓库:http://10.0.0.177/informatization/front/production-web + +后台前端仓库:http://10.0.0.177/informatization/front/production + +服务端仓库:http://10.0.0.177/informatization/backend/manufacturing_systems + +> 前台页面:http://10.0.0.93:9528 +> +> 后台页面:http://10.0.0.49:3142/dashboard/index +> +> 用户:`admin` +> +> 密码:`111111` + +## 培训管理系统 + +前端仓库:http://10.0.0.177/informatization/front/tms-web + +后端仓库:http://10.0.0.177/informatization/backend/train-system + +> 用户页面:http://10.0.0.49:8065/frontDeskindex/homePage +> +> 后台页面:http://10.0.0.49:8065/index +> +> 用户:`test01` +> +> 密码:`Aa@000000` + +## 延锋座椅数字化管理系统 + +前端仓库:http://10.0.0.177/informatization/front/yanfeng-admin + +后端仓库:http://10.0.0.177/informatization/backend/data-agv-yanfeng + +> 上线页面:`http://10.0.0.93:9000/` +> +> 用户:`admin` +> +> 密码:`acbd@1234` + +## (undo)一站式采销平台 + +前端仓库:http://10.0.0.177/informatization/front/market-platform + +后端仓库:http://10.0.0.177/informatization/backend/market-platform-server + +## AI调研相关 + +API key + +``` +sk-cd1266cc951d4d7fbfee56f42b4d3d35 +``` + +``` +curl https://api.deepseek.com/chat/completions \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer sk-cd1266cc951d4d7fbfee56f42b4d3d35" \ + -d '{ + "model": "deepseek-chat", + "messages": [ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Hello!"} + ], + "stream": false + }' +``` + +百炼key + +``` +sk-9fe2e1b0fd60405393c4195a0761044f +``` + +``` +curl -X POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \ +-H "Authorization: Bearer sk-9fe2e1b0fd60405393c4195a0761044f" \ +-H "Content-Type: application/json" \ +-d '{ + "model": "deepseek-r1-distill-qwen-7b", + "messages": [ + { + "role": "user", + "content": "9.9和9.11谁大" + } + ] +}' +``` + +``` +curl --location 'https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions' \ +--header "Authorization: Bearer sk-9fe2e1b0fd60405393c4195a0761044f" \ +--header 'Content-Type: application/json' \ +--data '{ + "model": "qwen-plus", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "用萝卜、土豆、茄子做饭,给我个菜谱" + } + ] +}' + +``` + +```shell +ollama run deepseek-r1:1.5b +``` + +```shell +ollama run lrs33/bce-embedding-base_v1 +``` + +> 这些环境变量提供了对 Ollama 服务器的各种配置选项,可以帮助优化性能、调试和管理模型加载等任务。 +> +> - **OLLAMA_DEBUG**:显示额外的调试信息(例如,设置 `OLLAMA_DEBUG=1`)。 +> - **OLLAMA_HOST**:设置 Ollama 服务器的 IP 地址(默认是 `127.0.0.1:11434`)。 +> - **OLLAMA_KEEP_ALIVE**:模型在内存中保持加载的时长(默认是 `"5m"`)。 +> - **OLLAMA_MAX_LOADED_MODELS**:每个 GPU 上加载的最大模型数量。 +> - **OLLAMA_MAX_QUEUE**:请求队列的最大数量。 +> - **OLLAMA_MODELS**:模型目录的路径。 +> - **OLLAMA_NUM_PARALLEL**:允许的最大并行请求数量。 +> - **OLLAMA_NOPRUNE**:启动时不修剪模型的二进制数据。 +> - **OLLAMA_ORIGINS**:允许的来源列表,使用逗号分隔。 +> - **OLLAMA_SCHED_SPREAD**:始终将模型调度到所有 GPU 上。 +> - **OLLAMA_FLASH_ATTENTION**:启用闪电注意力(Flash Attention)。 +> - **OLLAMA_KV_CACHE_TYPE**:K/V 缓存的量化类型(默认是 `f16`)。 +> - **OLLAMA_LLM_LIBRARY**:设置 LLM 库,以绕过自动检测。 +> - **OLLAMA_GPU_OVERHEAD**:每个 GPU 保留的 VRAM(显存)部分(以字节为单位)。 +> - **OLLAMA_LOAD_TIMEOUT**:在放弃加载模型之前,允许的最大加载停滞时间(默认是 `"5m"`)。 +> +> + +```shell +curl -X POST http://localhost:11434/api/generate -H "Content-Type: application/json" -d '{"model":"deepseek-r1:1.5b","prompt":"写一首关于秋天的诗","max_tokens":50}' +``` + +```shell +ollama serve OLLAMA_MODELS="C:\Users\15203\.ollama\models\manifests\registry.ollama.ai\library\deepseek-r1" +``` + +```shell +curl -X POST http://localhost:11435/v1/execute -H "Content-Type: application/json" -d '{"model": "lrs33/bce-embedding-base_v1:latest","input": "这是一段需要生成嵌入的文本"}' +``` + diff --git "a/docs/\350\275\257\344\273\266/nodejs\347\233\270\345\205\263\345\221\275\344\273\244.md" "b/docs/\350\275\257\344\273\266/nodejs\347\233\270\345\205\263\345\221\275\344\273\244.md" index af11476..46177b8 100644 --- "a/docs/\350\275\257\344\273\266/nodejs\347\233\270\345\205\263\345\221\275\344\273\244.md" +++ "b/docs/\350\275\257\344\273\266/nodejs\347\233\270\345\205\263\345\221\275\344\273\244.md" @@ -106,6 +106,14 @@ node -v npm -v ``` +## 安装pnpm + +> pnpm需要node18及以上版本 + +```shell +npm install pnpm -g +``` + ## 安装hexo 安装hexo