From a27304126f15e0c050a659ab25c6bedb0afa417b Mon Sep 17 00:00:00 2001 From: Estom Date: Sun, 21 Jan 2024 19:38:01 +0800 Subject: [PATCH 01/10] Create call_remote_api.yml --- .github/workflows/call_remote_api.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/call_remote_api.yml diff --git a/.github/workflows/call_remote_api.yml b/.github/workflows/call_remote_api.yml new file mode 100644 index 00000000..8009db47 --- /dev/null +++ b/.github/workflows/call_remote_api.yml @@ -0,0 +1,22 @@ +# .github/workflows/call_remote_api.yml + +name: Call Remote API on Push + +on: + push: + branches: + - main # 可以指定分支名称,这里以main分支为例,也可以使用'*'匹配所有分支 + +jobs: + call-api: + runs-on: ubuntu-latest # 指定运行环境,这里是最新Ubuntu + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Call Remote API + run: | + curl -X GET http://8.141.4.34/#/ + # curl -X POST -H "Content-Type: application/json" -d '{"key": "value"}' https://your-api-url.com/endpoint + # 替换上述命令中的URL和数据为你的实际API信息 From 55d00bf48fbe2cf0080c3d38acedd89f07b4d976 Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 19:39:56 +0800 Subject: [PATCH 02/10] dd --- Python/readme.md | 29 ++--------------- 操作系统/Readme.md | 80 ++++++++++++++++++++++------------------------ 2 files changed, 41 insertions(+), 68 deletions(-) diff --git a/Python/readme.md b/Python/readme.md index 79b20c76..a0c86791 100644 --- a/Python/readme.md +++ b/Python/readme.md @@ -1,27 +1,4 @@ -## python3 - -1. 提供了基础语法 - -## numpy - - -1. 提供了numpyarray多维数组对象。 -2. 提供了在多维数组对象上的基本运算和基础操作(加减乘除,数组变化) - -## scipy - -> 内容涉及大量的数学知识,不应该代码驱动学习,应该在学习或者使用相关的数学知识的时候,进行代码实现。 - -1. 提供了基于numpyarray的科学计算。包括傅里叶变换、科学函数等。 - -## matplotlib - -1. 提供了基于numpyarray的数学图像可视化。 -2. 是matlab的数学图像替代。 - - -## pandas - -1. 提供了基于Numpyarray的数据分析。包括排序、添加删除、函数处理等。 -2. 是excel的Python替代。 +## Python +- [Python文件理解](Python/Python文件理解.md) +- [abc实现多态](Python/abc实现多态.md) diff --git a/操作系统/Readme.md b/操作系统/Readme.md index 130b7cd8..ba305e63 100644 --- a/操作系统/Readme.md +++ b/操作系统/Readme.md @@ -1,43 +1,39 @@ -# 同步异步 +## 操作系统 -> 经过长久的观察发现。同步异步,是一个跨越所有领域的知识的共同点。 - -> 发现,这一系列同步异步相关内容。可以抽象成一些共通的模型和方式。这些模型和方式,应该是凌驾于语言和应用场景之上的。 - - -> 而我要做的是,对这一系列的同步异步场景,抽象出共通的模式模型,然后针对每一种模式模型,总结相关的场景和操作。对相关内容进行跨领域跨语言各个场景的总结。 - - -## 本质原理 -### 相关领域 - - -1. 操作系统的进程线程协程之间可以同步异步(Linux并发编程) -2. IO也可以同步异步(LinuxIO编程) -3. 计算机网络通信可以是同步异步(Linux网络编程) - -4. 设计模式中可能包含同步异步的模式(reactor、Proactor)、 - -5. 数据库中的数据读取可以是同步异步、 -6. C++中的多线程同步异步和异步IO、 -7. Python的多线程和协程asyncio的实现、 -8. go的channel并发机制、 -9. nodejs的单线程并发、 -10. java的多线程同步io和异步io - - -### 该领域相关的问题或者说概念名词 - - -* 并发与并行 - * 单线程并发 - * 多线程并发(并行) -* 机制: - * 事件响应机制(event handler) - * 消息传递机制(消息队列IPC) - * 回调机制(call back) -* IO - * IO多路复用Poll、epoll、select - * 异步?非阻塞。 - * 同步?阻塞 - * 同步?轮询 \ No newline at end of file +- [0 概述](操作系统/0%20概述.md) +- [1 操作系统引论](操作系统/1%20操作系统引论.md) +- [2 进程管理](操作系统/2%20进程管理.md) +- [2.1 进程的基本概念](操作系统/2.1%20进程的基本概念.md) +- [2.2 进程控制](操作系统/2.2%20进程控制.md) +- [2.3 进程同步](操作系统/2.3%20进程同步.md) +- [2.4 进程通信](操作系统/2.4%20进程通信.md) +- [2.5 进程与线程](操作系统/2.5%20进程与线程.md) +- [2.6 协程](操作系统/2.6%20协程.md) +- [3 处理机管理](操作系统/3%20处理机管理.md) +- [4 内存管理](操作系统/4%20内存管理.md) +- [4.1 层次结构与装入链接](操作系统/4.1%20层次结构与装入链接.md) +- [4.2 连续存储管理](操作系统/4.2%20连续存储管理.md) +- [4.3 分页存储管理](操作系统/4.3%20分页存储管理.md) +- [4.4 分段存储管理](操作系统/4.4%20分段存储管理.md) +- [4.5 虚拟存储器](操作系统/4.5%20虚拟存储器.md) +- [5 设备IO管理](操作系统/5%20设备IO管理.md) +- [5.1 Linux IO模型](操作系统/5.1%20Linux%20IO模型.md) +- [5.2 Windows IO模型](操作系统/5.2%20Windows%20IO模型.md) +- [5.3 IO多路复用模型](操作系统/5.3%20IO多路复用模型.md) +- [5.4 IO多路复用与线程进程](操作系统/5.4%20IO多路复用与线程进程.md) +- [5.5 IO多路复用与回调函数](操作系统/5.5%20IO多路复用与回调函数.md) +- [6 文件系统](操作系统/6%20文件系统.md) +- [7 操作系统接口](操作系统/7%20操作系统接口.md) +- [附录1 课后习题答案](操作系统/附录1%20课后习题答案.md) +- [附录10 动态内存的原理](操作系统/附录10%20动态内存的原理.md) +- [附录12 并发编程](操作系统/附录12%20并发编程.md) +- [附录13 网络编程](操作系统/附录13%20网络编程.md) +- [附录2 操作系统总结](操作系统/附录2%20操作系统总结.md) +- [附录3 互斥量、信号量、条件变量](操作系统/附录3%20互斥量、信号量、条件变量.md) +- [附录4 寄存器](操作系统/附录4%20寄存器.md) +- [附录5 协程](操作系统/附录5%20协程.md) +- [附录6 中断](操作系统/附录6%20中断.md) +- [附录7 模式切换与进程切换](操作系统/附录7%20模式切换与进程切换.md) +- [附录8 同步异步、阻塞非阻塞](操作系统/附录8%20同步异步、阻塞非阻塞.md) +- [附录9 网络编程和web开发](操作系统/附录9%20网络编程和web开发.md) +- [面试问题整理](操作系统/面试问题整理.md) From 82d52d00f5785e19ccb9bc4e89af750951d8e0f4 Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 19:43:22 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=B5=8B=E8=AF=95github=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1dc06d6..a1dedb58 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ### 简介 -一个码农的毕生所学。 +一个码农的毕生所学 ### 语言篇 From 7604f0e21c59f1788a88768b2ee4f5d6699cba26 Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 19:44:34 +0800 Subject: [PATCH 04/10] github actions test --- .github/workflows/call_remote_api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call_remote_api.yml b/.github/workflows/call_remote_api.yml index 8009db47..02018023 100644 --- a/.github/workflows/call_remote_api.yml +++ b/.github/workflows/call_remote_api.yml @@ -5,7 +5,7 @@ name: Call Remote API on Push on: push: branches: - - main # 可以指定分支名称,这里以main分支为例,也可以使用'*'匹配所有分支 + - '*' # 可以指定分支名称,这里以main分支为例,也可以使用'*'匹配所有分支 jobs: call-api: From adc19182bada8f1201d17ac14b094a1ac0f63d43 Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 19:45:03 +0800 Subject: [PATCH 05/10] test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a1dedb58..645372da 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ### 简介 -一个码农的毕生所学 +一个码农的毕生所学. ### 语言篇 From 8f271448daf4e5326ba4c30d2d5c1b9255979c63 Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 19:58:15 +0800 Subject: [PATCH 06/10] test actions --- .github/workflows/call_remote_api.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/call_remote_api.yml b/.github/workflows/call_remote_api.yml index 02018023..5b32d5f0 100644 --- a/.github/workflows/call_remote_api.yml +++ b/.github/workflows/call_remote_api.yml @@ -15,6 +15,28 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + + # - name: Install Python dependencies (if any) + # run: | + # pip install --upgrade pip + # pip install -r requirements.txt # 如果有依赖,请替换为实际的依赖安装命令 + + - name: Generate files with Python script + run: python ./notes/blog/docsify/build_sidebar.py # 替换为你的Python脚本路径 + + - name: Commit generated files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + git commit -m "Automatically update generated files" || echo "No changes to commit" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: main + - name: Call Remote API run: | curl -X GET http://8.141.4.34/#/ From bf0ac0a244fe28d07eaef152b8f7459b7a79e39b Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 20:09:01 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E8=A7=A6=E5=8F=91=E5=8D=9A=E5=AE=A2?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=B5=81=E6=B0=B4=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/call_remote_api.yml | 6 ++++-- blog/docsify/build_sidebar.py | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call_remote_api.yml b/.github/workflows/call_remote_api.yml index 5b32d5f0..e1ee76b8 100644 --- a/.github/workflows/call_remote_api.yml +++ b/.github/workflows/call_remote_api.yml @@ -22,7 +22,9 @@ jobs: # pip install -r requirements.txt # 如果有依赖,请替换为实际的依赖安装命令 - name: Generate files with Python script - run: python ./notes/blog/docsify/build_sidebar.py # 替换为你的Python脚本路径 + run: | + root_dir = $(pwd) + python ./blog/docsify/build_sidebar.py root_dir # 替换为你的Python脚本路径 - name: Commit generated files run: | @@ -36,7 +38,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: main - + - name: Call Remote API run: | curl -X GET http://8.141.4.34/#/ diff --git a/blog/docsify/build_sidebar.py b/blog/docsify/build_sidebar.py index c4299cfa..13cd6bfd 100644 --- a/blog/docsify/build_sidebar.py +++ b/blog/docsify/build_sidebar.py @@ -2,8 +2,10 @@ from configparser import ConfigParser from os.path import splitext, basename, join, isdir, relpath, abspath from os import listdir import os +import sys # docsify根目录 +# root_dir='/root/gitee/notes' root_dir='/root/gitee/notes' # 要处理的文件或文件夹 exclude_start_with=['_','*','.'] @@ -172,4 +174,7 @@ if __name__ == "__main__": 第n-1层会生成n层目录的_sidebar 第n层生成之后所有目录的_sidebar ''' + if len(sys.argv) > 1: + root_dir = sys.argv[1] + print("root_dir is:", root_dir) layer_traverse(root_dir,0,create_depth) From d1f8c855ed71d208b5c3d0ef43173fb104fc33fb Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 20:10:30 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=E6=A0=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/call_remote_api.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/call_remote_api.yml b/.github/workflows/call_remote_api.yml index e1ee76b8..f25ae117 100644 --- a/.github/workflows/call_remote_api.yml +++ b/.github/workflows/call_remote_api.yml @@ -23,7 +23,8 @@ jobs: - name: Generate files with Python script run: | - root_dir = $(pwd) + root_dir=$(pwd) + echo root_dir python ./blog/docsify/build_sidebar.py root_dir # 替换为你的Python脚本路径 - name: Commit generated files From 82b6914aff86d4f296f6bfa8435f660aaaf75d56 Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 20:15:13 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=A0=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/call_remote_api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call_remote_api.yml b/.github/workflows/call_remote_api.yml index f25ae117..adfcb66d 100644 --- a/.github/workflows/call_remote_api.yml +++ b/.github/workflows/call_remote_api.yml @@ -24,8 +24,8 @@ jobs: - name: Generate files with Python script run: | root_dir=$(pwd) - echo root_dir - python ./blog/docsify/build_sidebar.py root_dir # 替换为你的Python脚本路径 + echo ${root_dir} + python ./blog/docsify/build_sidebar.py ${root_dir} # 替换为你的Python脚本路径 - name: Commit generated files run: | From e18e924a6a92f475ac9718d4318ee9eedc50c3d4 Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 21 Jan 2024 20:20:56 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/call_remote_api.yml | 2 +- blog/hexo/创建博客.md | 0 blog/hexo/部署博客.md | 0 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 blog/hexo/创建博客.md delete mode 100644 blog/hexo/部署博客.md diff --git a/.github/workflows/call_remote_api.yml b/.github/workflows/call_remote_api.yml index adfcb66d..c407c48c 100644 --- a/.github/workflows/call_remote_api.yml +++ b/.github/workflows/call_remote_api.yml @@ -38,7 +38,7 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - branch: main + branch: master - name: Call Remote API run: | diff --git a/blog/hexo/创建博客.md b/blog/hexo/创建博客.md deleted file mode 100644 index e69de29b..00000000 diff --git a/blog/hexo/部署博客.md b/blog/hexo/部署博客.md deleted file mode 100644 index e69de29b..00000000