├── .github └── workflows │ └── mkdocs-deploy.yml ├── .gitignore ├── README.md ├── build └── lib │ └── mkdocs_bi_directional_links │ ├── __init__.py │ ├── link_processor.py │ ├── plugin.py │ ├── search_integration.py │ └── utils.py ├── docs ├── AI │ ├── CS231n │ │ ├── CS231n_notes.md │ │ ├── Image Classification-Data-driven Approach, k-Nearest Neighbor, train_val_test splits.md │ │ ├── Linear classification-Support Vector Machine, Softmax.md │ │ └── Numpy.md │ ├── Dive_into_Deep_Learning.md │ ├── EECS 498-007 │ │ ├── KNN.md │ │ ├── Pytorch.md │ │ └── linear_classifer.md │ ├── FFB6D │ │ ├── FFB6D_Conda.md │ │ └── FFB6D_Docker.md │ ├── SLAM14.md │ ├── index.md │ └── 统计学习方法.md ├── Blogs │ ├── archives.md │ ├── index.md │ └── posts │ │ ├── 24-12-29.md │ │ ├── 24-12-30.md │ │ ├── 25-01-20.md │ │ ├── Agent 的一些资源汇总.md │ │ ├── Foundational Models for 3D Point Clouds A Survey and Outlook.md │ │ ├── FreeSplatter 代码解读.md │ │ ├── Gaussian_Splatting_Code.md │ │ ├── Gaussian_Splatting_复现.md │ │ ├── OCRN.md │ │ ├── ULIP-2.md │ │ ├── notes_software.md │ │ ├── openManus.md │ │ └── 用AI后的问题.md ├── CS_Basic │ ├── 15-213 │ │ └── CSAPP.md │ ├── C++ │ │ ├── Accelerated C++.md │ │ └── C++ Basic.md │ ├── CS61A │ │ ├── CS61A.md │ │ └── Composing_Programs.md │ ├── CS61C │ │ └── 计算机组成与设计硬件软件接口.md │ ├── Network │ │ └── Security.md │ └── index.md ├── Links.md ├── Robot │ ├── calibration.md │ ├── index.md │ ├── kalman.md │ └── pnp.md ├── Summaries │ ├── 2024 │ │ └── weekly │ │ │ ├── 2024-W51-12.md │ │ │ └── 2024-W52-12.md │ ├── 2025 │ │ └── weekly │ │ │ ├── 2025-W01-12.md │ │ │ ├── 2025-W02-01.md │ │ │ ├── 2025-W03-01.md │ │ │ ├── 2025-W04-01.md │ │ │ ├── 2025-W05-01.md │ │ │ ├── 2025-W08-02.md │ │ │ ├── 2025-W10-03.md │ │ │ └── 2025-W11-03.md │ ├── Semesters │ │ ├── 2024summer_vacation.md │ │ └── 2025winter_vacation.md │ └── index.md ├── Tags │ └── index.md ├── Tools │ ├── AI │ │ ├── prompt.md │ │ └── prompt_writing.md │ ├── Blog │ │ └── Mkdocs_Material.md │ ├── Cheat Sheet │ │ ├── Cheat Sheet.md │ │ ├── System │ │ │ └── Arch Cheat Sheet.md │ │ ├── Tools 待整理.md │ │ ├── editors │ │ │ ├── VScode Cheat Sheet.md │ │ │ ├── cursor Cheat Sheet.md │ │ │ ├── emacs Cheat Sheet.md │ │ │ ├── nano Cheat Sheet.md │ │ │ ├── nvim Cheat Sheet.md │ │ │ ├── org Cheat Sheet.md │ │ │ └── vim Cheat Sheet.md │ │ ├── languages │ │ │ ├── Go Cheat Sheet.md │ │ │ ├── javascript Cheat Sheet.md │ │ │ ├── markdown Cheat Sheet.md │ │ │ ├── python Cheat Sheet.md │ │ │ ├── typst Cheat Sheet.md │ │ │ └── vimscript Cheat Sheet.md │ │ ├── tools │ │ │ ├── Docker Cheat Sheet.md │ │ │ ├── KDE Cheat Sheet.md │ │ │ ├── Makeflie Cheat Sheet.md │ │ │ ├── adb Cheat Sheet.md │ │ │ ├── bash Cheat Sheet.md │ │ │ ├── chezmoi Cheat Sheet.md │ │ │ ├── ffmpeg Cheat Sheet.md │ │ │ ├── gdb Cheat Sheet.md │ │ │ ├── git Cheat Sheet.md │ │ │ ├── ip Cheat Sheet.md │ │ │ ├── mkdocs Cheat Sheet.md │ │ │ ├── network Cheat Sheet.md │ │ │ ├── ssh Cheat Sheet.md │ │ │ ├── tabby Cheat Sheet.md │ │ │ ├── tmux Cheat Sheet.md │ │ │ ├── wandb Cheat Sheet.md │ │ │ ├── zotero Cheat Sheet.md │ │ │ ├── 小鹤双拼 Cheat Sheet.md │ │ │ └── 远程连接 Cheat Sheet.md │ │ ├── 常用命令.md │ │ └── 常用配置文件.md │ ├── Environment │ │ ├── Arch_setup.md │ │ ├── Ubuntu_setup.md │ │ ├── environment.md │ │ └── obsidian_setup.md │ ├── Make │ │ ├── CMake.md │ │ └── Makeflie.md │ ├── Others │ │ ├── Chezmoi.md │ │ ├── SSH.md │ │ └── zotero_使用指南.md │ ├── Terminal │ │ └── Tabby_Zsh.md │ └── index.md ├── about.md ├── assets │ ├── github │ │ ├── github-dark.png │ │ └── github-light.png │ └── images │ │ ├── WeChat.jpg │ │ ├── avatar.png │ │ ├── avatar_old.jpg │ │ ├── home │ │ ├── dark.jpg │ │ └── light.jpg │ │ ├── pdf.svg │ │ └── qq.jpg ├── css │ ├── card.css │ ├── cards │ │ ├── base.css │ │ └── cards.css │ ├── changelog_extra.css │ ├── custom.css │ ├── extra.css │ ├── flink.css │ ├── fold_toc.css │ ├── giscus.css │ ├── grid cards.css │ └── tasklist.css ├── index.md └── js │ ├── katex.js │ ├── mathjax.js │ ├── scheme.js │ ├── tablesort.js │ └── toc.js ├── environment.yml ├── mkdocs.yml ├── overrides ├── main.html └── partials │ ├── comments.html │ ├── content.html │ └── copyright.html └── requirements.txt /.github/workflows/mkdocs-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy MkDocs to GitHub Pages 2 | on: 3 | push: 4 | branches: 5 | - main 6 | permissions: 7 | contents: write 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | with: 14 | fetch-depth: 0 15 | - name: Configure Git Credentials 16 | run: | 17 | git config user.name github-actions[bot] 18 | git config user.email 41898282+github-actions[bot]@users.noreply.github.com 19 | - uses: actions/setup-python@v4 20 | with: 21 | python-version: 3.x 22 | - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV 23 | - uses: actions/cache@v3 24 | with: 25 | key: mkdocs-material-${{ env.cache_id }} 26 | path: .cache 27 | restore-keys: | 28 | mkdocs-material- 29 | - run: pip install -r requirements.txt 30 | - name: Install plugins from TonyCrane 31 | run: | 32 | git clone https://github.com/TonyCrane/mkdocs-toolchain 33 | pip install mkdocs-toolchain/mkdocs-toc-plugin 34 | rm -rf mkdocs-toolchain 35 | - name: Install modified mkdocs-statistics-plugin 36 | run: | 37 | git clone https://github.com/KinnariyaMamaTanha/mkdocs-statistics-plugin 38 | pip install ./mkdocs-statistics-plugin 39 | rm -rf mkdocs-statistics-plugin 40 | - run: pip cache purge 41 | - run: mkdocs gh-deploy --force 42 | # - name: Build site 43 | # run: mkdocs build 44 | # - name: Deploy to GitHub Pages 45 | # uses: peaceiris/actions-gh-pages@v3 46 | # if: github.ref == 'refs/heads/main' 47 | # with: 48 | # github_token: ${{ secrets.GITHUB_TOKEN }} 49 | # publish_dir: ./site 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | site/ 2 | 3 | blog_venv/ 4 | venv/ 5 | env/ 6 | .venv/ 7 | 8 | # Python 字节码 9 | __pycache__/ 10 | *.py[cod] 11 | 12 | # 操作系统生成的文件 13 | .DS_Store 14 | Thumbs.db 15 | 16 | # 编辑器/IDE 配置文件 17 | .vscode/ 18 | .idea/ 19 | 20 | # 日志文件 21 | *.log 22 | 23 | # 环境变量文件(如果你使用的话) 24 | .env 25 | 26 | docs/Summaries/2024/weekly/2024-W44-10.md 27 | docs/Summaries/2024/weekly/2024-W45-11.md 28 | docs/Summaries/2024/weekly/2024-W46-11.md 29 | docs/Summaries/2024/weekly/2024-W47-11.md 30 | docs/Summaries/2024/weekly/2024-W48-11.md 31 | docs/Summaries/2024/weekly/2024-W49-12.md 32 | docs/Summaries/2024/weekly/2024-W50-12.md 33 | docs/Summaries/Semesters/2024_1_1.md 34 | docs/Summaries/Semesters/202409-10.md 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This is wnc's notes. 2 | 3 | ## Install 4 | 5 | ```shell 6 | conda create -f environment.yml 7 | 8 | git clone https://github.com/TonyCrane/mkdocs-toolchain 9 | pip install mkdocs-toolchain/mkdocs-toc-plugin 10 | rm -rf mkdocs-toolchain 11 | 12 | git clone https://github.com/KinnariyaMamaTanha/mkdocs-statistics-plugin 13 | pip install ./mkdocs-statistics-plugin 14 | rm -rf mkdocs-statistics-plugin 15 | 16 | pip cache purge 17 | ``` -------------------------------------------------------------------------------- /build/lib/mkdocs_bi_directional_links/__init__.py: -------------------------------------------------------------------------------- 1 | # 插件入口文件,定义插件的版本和导出内容 2 | __version__ = "0.1.0" 3 | from .plugin import BiDirectionalLinksPlugin 4 | 5 | __all__ = ["BiDirectionalLinksPlugin"] -------------------------------------------------------------------------------- /build/lib/mkdocs_bi_directional_links/link_processor.py: -------------------------------------------------------------------------------- 1 | import re 2 | import logging 3 | from pathlib import Path 4 | 5 | class LinkProcessor: 6 | def __init__(self): 7 | self.includes = [".md", ".png", ".jpg", ".mp4", ".mp3"] # 支持的文件扩展名 8 | 9 | def process_markdown(self, markdown, page, config, files, search_integration): 10 | """ 11 | 处理 Markdown 中的双向链接语法,生成相应的 HTML 标签。 12 | """ 13 | 14 | def replace_bi_directional_link(match): 15 | """ 16 | 替换双向链接语法为 HTML 标签。 17 | """ 18 | file_ref = match.group(1).strip() # 获取文件引用 19 | text = match.group(3).strip() if match.group(3) else file_ref # 获取自定义文本 20 | 21 | # 如果文件引用没有扩展名,默认添加 .md 22 | if not any(file_ref.endswith(ext) for ext in self.includes): 23 | file_ref += ".md" 24 | 25 | # 获取当前文件的路径 26 | from_file = page.file.src_path 27 | 28 | # 使用 SearchIntegration 查找文件路径 29 | file_path = search_integration.find_file(from_file, file_ref) 30 | if not file_path: 31 | logging.warning(f"未找到匹配的文件:'{file_ref}'。") 32 | return match.group(0) # 如果未找到文件,返回原始文本 33 | else: 34 | logging.debug(f"找到文件:'{file_ref}' -> '{file_path}'。") # 添加调试日志 35 | 36 | # 统一路径分隔符为正斜杠 37 | file_path = file_path.replace("\\", "/") 38 | 39 | # 获取 site_url 的第二个路径段 40 | site_url = config.get("site_url", "") 41 | base_path = "" 42 | if site_url: 43 | # 使用正则表达式提取第二个路径段 44 | match = re.match(r"https?://[^/]+/([^/]+)/?", site_url) 45 | if match: 46 | base_path = match.group(1) # 提取第二个路径段 47 | if base_path: 48 | base_path = f"/{base_path}" 49 | 50 | # 根据文件类型生成 HTML 标签 51 | if file_path.endswith(".md"): 52 | file_path = file_path[:-3] # 去除 .md 扩展名 53 | return f'{text}' # Markdown 文件生成链接 54 | elif any(file_path.endswith(ext) for ext in [".png", ".jpg", ".gif"]): 55 | return f'{text}' # 图片文件生成图片标签 56 | elif any(file_path.endswith(ext) for ext in [".mp4", ".webm"]): 57 | return f'' # 视频文件生成视频标签 58 | elif any(file_path.endswith(ext) for ext in [".mp3", ".wav"]): 59 | return f'' # 音频文件生成音频标签 60 | else: 61 | return match.group(0) # 其他文件类型返回原始文本 62 | 63 | # 使用正则表达式匹配 [[file]] 和 [[file|text]] 语法 64 | markdown = re.sub(r'!?\[\[([^|\]\n]+)(\|([^\]\n]+))?\]\]', replace_bi_directional_link, markdown) 65 | return markdown -------------------------------------------------------------------------------- /build/lib/mkdocs_bi_directional_links/plugin.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from mkdocs.plugins import BasePlugin 3 | from .search_integration import SearchIntegration 4 | from .link_processor import LinkProcessor 5 | 6 | class BiDirectionalLinksPlugin(BasePlugin): 7 | def __init__(self): 8 | self.debug = False # 是否启用调试模式 9 | self.search_integration = SearchIntegration() # Search 插件集成模块 10 | self.link_processor = LinkProcessor() # 双向链接处理模块 11 | 12 | def on_config(self, config): 13 | """ 14 | 在 MkDocs 加载配置时调用,初始化插件配置。 15 | """ 16 | # print("加载配置") 17 | if "bi_directional_links" in config.get("plugins", {}): 18 | plugin_config = config["plugins"]["bi_directional_links"] 19 | if isinstance(plugin_config, dict): # 确保 plugin_config 是字典 20 | self.debug = plugin_config.get("debug", False) 21 | else: 22 | self.debug = False 23 | else: 24 | self.debug = False 25 | 26 | # 初始化 SearchIntegration 27 | self.search_integration.load_config(config) 28 | return config 29 | 30 | def on_files(self, files, config): 31 | """ 32 | 在 MkDocs 加载文件列表时调用,初始化文件缓存。 33 | """ 34 | # print("加载文件列表") 35 | self.search_integration.load_files(files) 36 | 37 | def on_page_markdown(self, markdown, page, config, files): 38 | """ 39 | 在解析 Markdown 文件时调用,处理双向链接语法。 40 | """ 41 | return self.link_processor.process_markdown(markdown, page, config, files, self.search_integration) -------------------------------------------------------------------------------- /build/lib/mkdocs_bi_directional_links/search_integration.py: -------------------------------------------------------------------------------- 1 | import os 2 | import logging 3 | from typing import List, Optional 4 | 5 | class SearchIntegration: 6 | def __init__(self): 7 | self.docs_dir = "" 8 | self.file_cache = {} # 文件名到路径的映射 9 | 10 | def load_config(self, config): 11 | """ 12 | 加载 MkDocs 配置,初始化 Search 插件。 13 | """ 14 | self.docs_dir = config["docs_dir"] 15 | 16 | def load_files(self, files): 17 | """ 18 | 加载文件列表,初始化文件缓存。 19 | """ 20 | self._build_file_cache(files) 21 | 22 | def _build_file_cache(self, files): 23 | """ 24 | 构建文件缓存。 25 | """ 26 | for file in files: 27 | file_path = file.src_path.replace("\\", "/") 28 | file_name = os.path.basename(file_path) 29 | 30 | # 缓存文件名到路径的映射 31 | if file_name not in self.file_cache: 32 | self.file_cache[file_name] = [file_path] 33 | else: 34 | self.file_cache[file_name].append(file_path) 35 | 36 | # self.print_cache() 37 | 38 | def find_file(self, from_file: str, file_ref: str) -> Optional[str]: 39 | """ 40 | 查找文件路径。 41 | """ 42 | from_file = from_file.replace("\\", "/") 43 | # print(f"查找文件:from_file={from_file}, file_ref={file_ref}") # 输出当前查找的文件 44 | 45 | # 处理绝对路径 46 | # if file_ref.startswith("/"): 47 | # abs_path = os.path.join(self.docs_dir, file_ref[1:]) 48 | # abs_path = abs_path.replace("\\", "/") 49 | # print(f"处理绝对路径:abs_path={abs_path}") # 输出绝对路径 50 | # if os.path.isfile(abs_path): 51 | # return abs_path.replace("\\", "/") 52 | # return None 53 | 54 | # 处理直接链接(相对路径) 55 | # from_dir = os.path.dirname(from_file) 56 | # abs_path = os.path.join(from_dir, file_ref) 57 | # abs_path = abs_path.replace("\\", "/") 58 | # print(f"处理相对路径:from_dir={from_dir}, abs_path={abs_path}") # 输出相对路径 59 | # if os.path.isfile(abs_path): 60 | # return abs_path.replace("\\", "/") 61 | 62 | # 处理 EzLink(需要搜索的链接) 63 | file_name = os.path.basename(file_ref) 64 | # print(f"处理 EzLink:file_name={file_name}") # 输出文件名 65 | 66 | # 1. 快速文件缓存查找 67 | if file_name in self.file_cache: 68 | # print(f"快速文件缓存查找:file_name={file_name}, 缓存={self.file_cache[file_name]}") # 输出缓存内容 69 | # 如果有多个匹配项,直接返回第一个 70 | return self.file_cache[file_name][0] 71 | 72 | # 2. 如果未找到文件,返回 None 73 | return None 74 | 75 | def print_cache(self): 76 | """ 77 | 打印缓存内容。 78 | """ 79 | print("文件名到路径的映射:") 80 | for file_name, paths in self.file_cache.items(): 81 | print(f"{file_name}: {paths}") -------------------------------------------------------------------------------- /build/lib/mkdocs_bi_directional_links/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def resolve_file_path(file_ref, current_file_path, base_dir): 4 | """ 5 | 解析文件路径,支持相对路径和绝对路径。 6 | """ 7 | # 解析相对路径 8 | current_dir = os.path.dirname(os.path.join(base_dir, current_file_path)) 9 | file_path = os.path.normpath(os.path.join(current_dir, file_ref)) 10 | 11 | # 检查文件是否存在 12 | if os.path.isfile(file_path): 13 | return file_path 14 | 15 | # 回退到基础目录 16 | file_path = os.path.normpath(os.path.join(base_dir, file_ref)) 17 | if os.path.isfile(file_path): 18 | return file_path 19 | 20 | return None # 如果未找到文件,返回 None -------------------------------------------------------------------------------- /docs/AI/CS231n/Image Classification-Data-driven Approach, k-Nearest Neighbor, train_val_test splits.md: -------------------------------------------------------------------------------- 1 | # Image Classification-Data-driven Approach, k-Nearest Neighbor, train_val_test splits 2 | 3 | ## image classification 4 | 5 | - challenges 6 | - viewpoint variation 7 | - scale variation 8 | - deformation 9 | - occlusion 10 | - illumination conditions 11 | - background clutter 12 | - intra-class variation 13 | - data-driven approach 14 | - the image classification pipeline 15 | - input 16 | - learning 17 | - training a classifier 18 | - learning a model 19 | - evaluation 20 | 21 | ## Nearest Neighbor Classifier 22 | 23 | $$ 24 | d_1 (I_1, I_2) = \sum_{p} \left| I^p_1 - I^p_2 \right| 25 | $$ 26 | 27 | ```python 28 | import numpy as np 29 | 30 | class NearestNeighbor(object): 31 | def **init**(self): 32 | pass 33 | 34 | def train(self, X, y): 35 | """ X is N x D where each row is an example. Y is 1-dimension of size N """ 36 | # the nearest neighbor classifier simply remembers all the training data 37 | self.Xtr = X 38 | self.ytr = y 39 | 40 | def predict(self, X): 41 | """ X is N x D where each row is an example we wish to predict label for """ 42 | num_test = X.shape[0] 43 | # lets make sure that the output type matches the input type 44 | Ypred = np.zeros(num_test, dtype = self.ytr.dtype) 45 | 46 | # loop over all test rows 47 | for i in range(num_test): 48 | # find the nearest training image to the i'th test image 49 | # using the L1 distance (sum of absolute value differences) 50 | distances = np.sum(np.abs(self.Xtr - X[i,:]), axis = 1) 51 | min_index = np.argmin(distances) # get the index with smallest distance 52 | Ypred[i] = self.ytr[min_index] # predict the label of the nearest example 53 | 54 | return Ypred 55 | ``` 56 | 57 | $$ 58 | d_2 (I_1, I_2) = \sqrt{\sum_{p} \left( I^p_1 - I^p_2 \right)^2} 59 | $$ 60 | 61 | ```python 62 | distances = np.sqrt(np.sum(np.square(self.Xtr - X[i,:]), axis = 1)) 63 | ``` 64 | 65 | ## k - Nearest Neighbor Classifier 66 | 67 | ![[Pasted image 20241031202452.jpg]] 68 | 69 | ## Validation sets for Hyperparameter tuning 70 | 71 | > Evaluate on the test only a single time, at the very end 72 | 73 | >Split your training set into training set and a validation set. Use validation set to tune all hyperparameters. At the end run a single time on the test set and report performance. 74 | 75 | - cross-validation 76 | - single calidation split 77 | ![[Pasted image 20241031202849.png]] 78 | 79 | ## Pros and Cons of Nearest Neighbor classifier 80 | 81 | - simple to implement and understand 82 | - take no time to train 83 | - however, pay a cost at test time 84 | 85 | >As an aside, the computational complexity of the Nearest Neighbor classifier is an active area of research, and several **Approximate Nearest Neighbor** (ANN) algorithms and libraries exist that can accelerate the nearest neighbor lookup in a dataset (e.g. [FLANN](https://github.com/mariusmuja/flann)). These algorithms allow one to trade off the correctness of the nearest neighbor retrieval with its space/time complexity during retrieval, and usually rely on a pre-processing/indexing stage that involves building a kdtree, or running the k-means algorithm. 86 | 87 | - $\displaystyle L_{2}$ isn't enough sensitive 88 | 89 | >In particular, note that images that are nearby each other are much more a function of the general color distribution of the images, or the type of background rather than their semantic identity. 90 | 91 | > [!note]+ Applying kNN in practice 92 | > 1. Preprocess your data: Normalize the features in your data (e.g. one pixel in images) to have zero mean and unit variance. We will cover this in more detail in later sections, and chose not to cover data normalization in this section because pixels in images are usually homogeneous and do not exhibit widely different distributions, alleviating the need for data normalization. 93 | > 2. If your data is very high-dimensional, consider using a dimensionality reduction technique such as PCA ([wiki ref](https://en.wikipedia.org/wiki/Principal_component_analysis), [CS229ref](http://cs229.stanford.edu/notes/cs229-notes10.pdf), [blog ref](https://web.archive.org/web/20150503165118/http://www.bigdataexaminer.com:80/understanding-dimensionality-reduction-principal-component-analysis-and-singular-value-decomposition/)), NCA ([wiki ref](https://en.wikipedia.org/wiki/Neighbourhood_components_analysis), [blog ref](https://kevinzakka.github.io/2020/02/10/nca/)), or even [Random Projections](https://scikit-learn.org/stable/modules/random_projection.html). 94 | > 3. Split your training data randomly into train/val splits. As a rule of thumb, between 70-90% of your data usually goes to the train split. This setting depends on how many hyperparameters you have and how much of an influence you expect them to have. If there are many hyperparameters to estimate, you should err on the side of having larger validation set to estimate them effectively. If you are concerned about the size of your validation data, it is best to split the training data into folds and perform cross-validation. If you can afford the computational budget it is always safer to go with cross-validation (the more folds the better, but more expensive). 95 | > 4. Train and evaluate the kNN classifier on the validation data (for all folds, if doing cross-validation) for many choices of **k** (e.g. the more the better) and across different distance types (L1 and L2 are good candidates) 96 | > 5. If your kNN classifier is running too long, consider using an Approximate Nearest Neighbor library (e.g. [FLANN](https://github.com/mariusmuja/flann)) to accelerate the retrieval (at cost of some accuracy). 97 | > 6. Take note of the hyperparameters that gave the best results. There is a question of whether you should use the full training set with the best hyperparameters, since the optimal hyperparameters might change if you were to fold the validation data into your training set (since the size of the data would be larger). In practice it is cleaner to not use the validation data in the final classifier and consider it to be _burned_ on estimating the hyperparameters. Evaluate the best model on the test set. Report the test set accuracy and declare the result to be the performance of the kNN classifier on your data. 98 | 99 | [[more about Machine Learing]] 100 | -------------------------------------------------------------------------------- /docs/AI/CS231n/Linear classification-Support Vector Machine, Softmax.md: -------------------------------------------------------------------------------- 1 | # Linear classification-Support Vector Machine, Softmax 2 | 3 | ## Linear Classifiaction 4 | 5 | $$ 6 | L_i = \sum_{j\neq y_i} \max(0, s_j - s_{y_i} + \Delta) 7 | $$ 8 | 9 | $$ 10 | L = \frac{1}{N} \sum_i \sum_{j\neq y_i} \left[ \max(0, f(x_i; W)_j - f(x_i; W)_{y_i} + \Delta) \right] + \lambda \sum_k\sum_l W_{k,l}^2 11 | $$ 12 | 13 | $$ 14 | L_i = -\log\left(\frac{e^{f_{y_i}}}{ \sum_j e^{f_j} }\right) \hspace{0.5in} \text{or equivalently} \hspace{0.5in} L_i = -f_{y_i} + \log\sum_j e^{f_j} 15 | $$ 16 | 17 | $$ 18 | \frac{e^{f_{y_i}}}{\sum_j e^{f_j}} 19 | = \frac{Ce^{f_{y_i}}}{C\sum_j e^{f_j}} 20 | = \frac{e^{f_{y_i} + \log C}}{\sum_j e^{f_j + \log C}} 21 | $$ 22 | 23 | ![[Pasted image 20241031210509.png]] 24 | -------------------------------------------------------------------------------- /docs/AI/CS231n/Numpy.md: -------------------------------------------------------------------------------- 1 | ## Python 2 | 3 | ### string 4 | 5 | ```python 6 | s = "hello" 7 | print(s.capitalize()) # Capitalize a string; prints "Hello" 8 | print(s.upper()) # Convert a string to uppercase; prints "HELLO" 9 | print(s.rjust(7)) # Right-justify a string, padding with spaces; prints " hello" 10 | print(s.center(7)) # Center a string, padding with spaces; prints " hello " 11 | print(s.replace('l', '(ell)')) # Replace all instances of one substring with another; 12 | # prints "he(ell)(ell)o" 13 | print(' world '.strip()) # Strip leading and trailing whitespace; prints "world" 14 | ``` 15 | 16 | ### Containers 17 | 18 | ```python 19 | animals = ['cat', 'dog', 'monkey'] 20 | for idx, animal in enumerate(animals): 21 | print('#%d: %s' % (idx + 1, animal)) 22 | # Prints "#1: cat", "#2: dog", "#3: monkey", each on its own line 23 | ``` 24 | 25 | 列表推导式 26 | 27 | ```python 28 | nums = [0, 1, 2, 3, 4] 29 | even_squares = [x ** 2 for x in nums if x % 2 == 0] 30 | print(even_squares) # Prints "[0, 4, 16]" 31 | ``` 32 | 33 | 同样也有字典推导式 34 | 35 | Tuples 可以用作字典中的键和集合的元素,但是 lists 不能 36 | 37 | ## Numpy 38 | 39 | ```python 40 | import numpy as np 41 | 42 | # Create a new array from which we will select elements 43 | a = np.array([[1,2,3], [4,5,6], [7,8,9], [10, 11, 12]]) 44 | 45 | print(a) # prints "array([[ 1, 2, 3], 46 | # [ 4, 5, 6], 47 | # [ 7, 8, 9], 48 | # [10, 11, 12]])" 49 | 50 | # Create an array of indices 51 | b = np.array([0, 2, 0, 1]) 52 | 53 | # Select one element from each row of a using the indices in b 54 | print(a[np.arange(4), b]) # Prints "[ 1 6 7 11]" 55 | 56 | # Mutate one element from each row of a using the indices in b 57 | a[np.arange(4), b] += 10 58 | 59 | print(a) # prints "array([[11, 2, 3], 60 | # [ 4, 5, 16], 61 | # [17, 8, 9], 62 | # [10, 21, 12]]) 63 | ``` 64 | 65 | ```python 66 | import numpy as np 67 | 68 | a = np.array([[1,2], [3, 4], [5, 6]]) 69 | 70 | bool_idx = (a > 2) # Find the elements of a that are bigger than 2; 71 | # this returns a numpy array of Booleans of the same 72 | # shape as a, where each slot of bool_idx tells 73 | # whether that element of a is > 2. 74 | 75 | print(bool_idx) # Prints "[[False False] 76 | # [ True True] 77 | # [ True True]]" 78 | 79 | # We use boolean array indexing to construct a rank 1 array 80 | # consisting of the elements of a corresponding to the True values 81 | # of bool_idx 82 | print(a[bool_idx]) # Prints "[3 4 5 6]" 83 | 84 | # We can do all of the above in a single concise statement: 85 | print(a[a > 2]) # Prints "[3 4 5 6]" 86 | ``` 87 | 88 | ```python 89 | x = np.array([1, 2], dtype=np.int64) # Force a particular datatype 90 | print(x.dtype) # Prints "int64" 91 | ``` 92 | 93 | ```python 94 | import numpy as np 95 | 96 | x = np.array([[1,2],[3,4]], dtype=np.float64) 97 | y = np.array([[5,6],[7,8]], dtype=np.float64) 98 | 99 | # Elementwise sum; both produce the array 100 | # [[ 6.0 8.0] 101 | # [10.0 12.0]] 102 | print(x + y) 103 | print(np.add(x, y)) 104 | 105 | # Elementwise difference; both produce the array 106 | # [[-4.0 -4.0] 107 | # [-4.0 -4.0]] 108 | print(x - y) 109 | print(np.subtract(x, y)) 110 | 111 | # Elementwise product; both produce the array 112 | # [[ 5.0 12.0] 113 | # [21.0 32.0]] 114 | print(x * y) 115 | print(np.multiply(x, y)) 116 | 117 | # Elementwise division; both produce the array 118 | # [[ 0.2 0.33333333] 119 | # [ 0.42857143 0.5 ]] 120 | print(x / y) 121 | print(np.divide(x, y)) 122 | 123 | # Elementwise square root; produces the array 124 | # [[ 1. 1.41421356] 125 | # [ 1.73205081 2. ]] 126 | print(np.sqrt(x)) 127 | ``` 128 | 129 | 广播可以避免循环 130 | 131 | ```python 132 | import numpy as np 133 | 134 | # We will add the vector v to each row of the matrix x, 135 | # storing the result in the matrix y 136 | x = np.array([[1,2,3], [4,5,6], [7,8,9], [10, 11, 12]]) 137 | v = np.array([1, 0, 1]) 138 | y = x + v # Add v to each row of x using broadcasting 139 | print(y) # Prints "[[ 2 2 4] 140 | # [ 5 5 7] 141 | # [ 8 8 10] 142 | # [11 11 13]]" 143 | ``` 144 | 145 | ## SciPy 146 | 147 | ## Matplotlib 148 | -------------------------------------------------------------------------------- /docs/AI/EECS 498-007/KNN.md: -------------------------------------------------------------------------------- 1 | 对于一个待分类的样本,找到训练数据集中与其最接近的K个样本(即最近邻),然后根据这K个样本的类别来决定待分类样本的类别。 2 | 3 | ## 数学推导 4 | 5 | 假设我们有一个训练数据集 $T = \{(x_1, y_1), (x_2, y_2), \ldots, (x_N, y_N)\}$,其中 $x_i$ 是特征向量, $y_i$ 是对应的类别标签。对于一个新的待分类样本 x,KNN算法的目标是预测其类别 $y$ 。 6 | 7 | 1. **距离度量**:首先,我们需要一个距离度量来计算待分类样本 $x$ 与训练集中每个样本 $x_i$ 之间的距离。常用的距离度量包括欧氏距离(Euclidean distance)、曼哈顿距离(Manhattan distance)和闵可夫斯基距离(Minkowski distance)。以欧氏距离为例,两个样本 $x$ 和 $x_i$ 之间的距离定义为: 8 | 9 | $$ 10 | d(x, x_i) = \sqrt{\sum_{j=1}^{d} (x_j - x_{i,j})^2} 11 | $$ 12 | 13 | 其中, $d$ 是特征的维度。 14 | 15 | 2. **寻找最近邻**:然后,我们根据计算出的距离,选择距离最近的K个样本,构成待分类样本的邻域 $N_k(x)$。 16 | 3. **决策规则**:最后,根据邻域 \( N_k(x) \) 中的样本类别,通过多数投票的方式来决定待分类样本的类别。即: 17 | 18 | $$ 19 | y = \arg\max_{c_j} \sum_{x_i \in N_k(x)} I(y_i = c_j) 20 | $$ 21 | 22 | 其中, $I$ 是指示函数,当 $y_i = c_j$ 时取值为1,否则为0。 23 | 24 | ## 作业中的实现 25 | 26 | ```python 27 | import torch 28 | 29 | def compute_distances_two_loops(x_train, x_test): 30 | num_train = x_train.shape[0] 31 | num_test = x_test.shape[0] 32 | dists = x_train.new_zeros(num_train, num_test) 33 | 34 | for i in range(num_train): 35 | for j in range(num_test): 36 | dists[i,j] = ((x_train[i] - x_test[j]) ** 2).sum() ** (1/2) 37 | 38 | return dists 39 | 40 | def compute_distances_one_loop(x_train, x_test): 41 | num_train = x_train.shape[0] 42 | num_test = x_test.shape[0] 43 | dists = x_train.new_zeros(num_train, num_test) 44 | 45 | for i in range(num_train): 46 | dists[i] = ((x_train[i] - x_test) ** 2).sum(dim=(1,2,3)) ** (1/2) 47 | 48 | return dists 49 | 50 | def compute_distances_no_loops(x_train, x_test): 51 | num_train = x_train.shape[0] 52 | num_test = x_test.shape[0] 53 | dists = x_train.new_zeros(num_train, num_test) 54 | 55 | A = x_train.reshape(num_train, -1) 56 | B = x_test.reshape(num_test, -1) 57 | AB2 = A.mm(B.T) * 2 58 | dists = ((A ** 2).sum(dim=1).reshape(-1, 1) - AB2 + (B ** 2).sum(dim=1).reshape(1, -1)) ** (1/2) 59 | 60 | return dists 61 | 62 | def predict_labels(dists, y_train, k=1): 63 | num_train, num_test = dists.shape 64 | y_pred = torch.zeros(num_test, dtype=torch.int64) 65 | 66 | values, indices = torch.topk(dists, k, dim=0, largest=False) 67 | for i in range(indices.shape[1]): 68 | _, idx = torch.max(y_train[indices[:, i]].bincount(), dim=0) 69 | y_pred[i] = idx 70 | 71 | return y_pred 72 | 73 | class KnnClassifier: 74 | def __init__(self, x_train, y_train): 75 | self.x_train = x_train 76 | self.y_train = y_train 77 | 78 | def predict(self, x_test, k=1): 79 | dists = compute_distances_no_loops(self.x_train, x_test) 80 | y_test_pred = predict_labels(dists, self.y_train, k) 81 | return y_test_pred 82 | 83 | def check_accuracy(self, x_test, y_test, k=1, quiet=False): 84 | y_test_pred = self.predict(x_test, k=k) 85 | num_samples = x_test.shape[0] 86 | num_correct = (y_test == y_test_pred).sum().item() 87 | accuracy = 100.0 * num_correct / num_samples 88 | msg = (f'Got {num_correct} / {num_samples} correct; accuracy is {accuracy:.2f}%') 89 | if not quiet: 90 | print(msg) 91 | return accuracy 92 | 93 | def knn_cross_validate(x_train, y_train, num_folds=5, k_choices=None): 94 | if k_choices is None: 95 | k_choices = [1, 3, 5, 8, 10, 12, 15, 20, 50, 100] 96 | 97 | x_train_folds = torch.chunk(x_train, num_folds, dim=0) 98 | y_train_folds = torch.chunk(y_train, num_folds, dim=0) 99 | 100 | k_to_accuracies = {} 101 | 102 | for k in k_choices: 103 | list_of_acc = [] 104 | for num_fold in range(num_folds): 105 | x_train_folds_local = [x for x in x_train_folds] 106 | y_train_folds_local = [x for x in y_train_folds] 107 | x_test = x_train_folds_local[num_fold] 108 | y_test = y_train_folds_local[num_fold] 109 | del x_train_folds_local[num_fold] 110 | del y_train_folds_local[num_fold] 111 | x_train = torch.cat(x_train_folds_local, dim=0) 112 | y_train = torch.cat(y_train_folds_local, dim=0) 113 | classifier = KnnClassifier(x_train, y_train) 114 | list_of_acc.append(classifier.check_accuracy(x_test, y_test, k)) 115 | k_to_accuracies[k] = list_of_acc 116 | 117 | return k_to_accuracies 118 | 119 | def knn_get_best_k(k_to_accuracies): 120 | best_k = 0 121 | new_dict = {} 122 | for k, accs in sorted(k_to_accuracies.items()): 123 | new_dict[k] = sum(accs) / len(accs) 124 | max_value = max(new_dict.values()) 125 | best_k = [k for k, v in new_dict.items() if v == max_value][0] 126 | return best_k 127 | ``` 128 | -------------------------------------------------------------------------------- /docs/AI/EECS 498-007/Pytorch.md: -------------------------------------------------------------------------------- 1 | # pytorch 的基本使用 2 | 3 | ```python 4 | # Create a rank 1 tensor from a Python list 5 | a = torch.tensor([[1, 2, 3], [4, 5, 6]]) 6 | print('Here is a:') 7 | print(a) 8 | print('type(a): ', type(a)) 9 | print('rank of a: ', a.dim()) 10 | print('a.shape: ', a.shape) 11 | 12 | torch.zeros(2, 3) 13 | torch.ones(2, 3) 14 | torch.eye(3) 15 | torch.rand(2, 3) 16 | torch.full((M, N), 3.14) 17 | 18 | y2 = torch.tensor([1, 2], dtype=torch.int64) 19 | print(y2.dtype) 20 | 21 | x3 = x0.to(torch.float32) 22 | 23 | x0 = torch.eye(3, dtype=torch.float64)  # Shape (3, 3), dtype torch.float64 24 | x1 = torch.zeros_like(x0)               # Shape (3, 3), dtype torch.float64 25 | x2 = x0.new_zeros(4, 5)                 # Shape (4, 5), dtype torch.float64 26 | x3 = torch.ones(6, 7).to(x0)            # Shape (6, 7), dtype torch.float64 27 | ``` 28 | 29 | Even though PyTorch provides a large number of numeric datatypes, the most commonly used datatypes are: 30 | 31 | - `torch.float32`: Standard floating-point type; used to store learnable parameters, network activations, etc. Nearly all arithmetic is done using this type. 32 | - `torch.int64`: Typically used to store indices 33 | - `torch.bool`: Stores boolean values: 0 is false and 1 is true 34 | - `torch.float16`: Used for mixed-precision arithmetic, usually on NVIDIA GPUs with [tensor cores](https://www.nvidia.com/en-us/data-center/tensorcore/). You won't need to worry about this datatype in this course. 35 | - 注意 `a[:, 1]` 和 `a[:, 1:2]` 的区别,后者会保留的多一点 36 | - `clone()` 以后的变量跟原变量是独立的,但是等号直接赋值的是同一个指针 37 | 38 | ```python 39 | mask = (a > 3) 40 | print('\nMask tensor:') 41 | print(mask) 42 | # Mask tensor: tensor([[False, False], [False, True], [ True, True]]) 43 | ``` 44 | 45 | - As its name implies, a tensor returned by `.view()` shares the same data as the input, so changes to one will affect the other. 46 | 47 | ??? reshape和view的区别 note 48 | 1. **内存连续性**: 49 | - `view` 要求原始张量和目标张量在内存中是连续的。如果原始张量不是连续的, `view` 会首先调用 `contiguous` 方法使其连续,然后改变形状。如果张量已经是连续的, `view` 操作不会复制数据。 50 | - `reshape`不要求原始张量是连续的。如果原始张量不是连续的,`reshape`会创建一个新的张量并复制数据,以确保新张量是连续的。 51 | 2. **返回值** 52 | - `view`返回一个新的张量,它与原始张量共享相同的数据,但是有不同的形状。如果原始张量不是连续的,`view`会返回一个副本。 53 | - `reshape`也返回一个新的张量,但总是创建数据的副本,即使原始张量是连续的。 54 | 3. **使用场景**: 55 | - 当你确定原始张量是连续的,并且你想要避免不必要的数据复制时,可以使用`view`。 56 | - 当你不确定原始张量是否连续,或者你想要确保操作不会因非连续性而失败时,可以使用`reshape`。 57 | 4. **参数**: 58 | - `view`的参数是目标形状的维度。 59 | - `reshape`的参数也是目标形状的维度,但它可以接受一个额外的参数`inplace`,如果设置为`True`,则会在原地修改张量的形状。 60 | 61 | - `torch.sin(x)` 和 `x.sin()` 是等价的 62 | 63 | ```python 64 | x = torch.tensor([[1, 2, 3], 65 |                   [4, 5, 6]], dtype=torch.float32) 66 | print('Original tensor:') 67 | print(x) 68 | 69 | print('\nSum over entire tensor:') 70 | print(torch.sum(x)) 71 | print(x.sum()) 72 | 73 | # We can sum over each row: 74 | print('\nSum of each row:') 75 | print(torch.sum(x, dim=0)) 76 | print(x.sum(dim=0)) 77 | 78 | # Sum over each column: 79 | print('\nSum of each column:') 80 | print(torch.sum(x, dim=1)) 81 | print(x.sum(dim=1)) 82 | ``` 83 | 84 | - [`torch.dot`](https://pytorch.org/docs/stable/generated/torch.dot.html#torch.dot): Computes inner product of vectors 85 | - [`torch.mm`](https://pytorch.org/docs/stable/generated/torch.mm.html#torch.mm): Computes matrix-matrix products 86 | - [`torch.mv`](https://pytorch.org/docs/stable/generated/torch.mv.html#torch.mv): Computes matrix-vector products 87 | - [`torch.addmm`](https://pytorch.org/docs/stable/generated/torch.addmm.html#torch.addmm) / [`torch.addmv`](https://pytorch.org/docs/stable/generated/torch.addmv.html#torch.addmv): Computes matrix-matrix and matrix-vector multiplications plus a bias 88 | - [`torch.bmm`](https://pytorch.org/docs/stable/generated/torch.bmm.html#torch.bmm) / [`torch.baddmm`](https://pytorch.org/docs/stable/generated/torch.baddbmm.html#torch.baddbmm): Batched versions of `torch.mm` and `torch.addmm`, respectively 89 | - [`torch.matmul`](https://pytorch.org/docs/stable/generated/torch.matmul.html#torch.matmul): General matrix product that performs different operations depending on the rank of the inputs. Confusingly, this is similar to `np.dot` in numpy. -------------------------------------------------------------------------------- /docs/AI/FFB6D/FFB6D_Conda.md: -------------------------------------------------------------------------------- 1 | # FFB6D环境配置指南:原生系统安装 2 | 3 | ## 1. 系统要求 4 | 5 | - Ubuntu 20.04/22.04/24.04 6 | - NVIDIA GPU(支持CUDA) 7 | - 至少8GB内存 8 | - 至少30GB磁盘空间 9 | 10 | ## 2. 基础环境配置 11 | 12 | ### 2.1 安装NVIDIA驱动 13 | 14 | ```bash 15 | # 添加NVIDIA包仓库 16 | sudo add-apt-repository ppa:graphics-drivers/ppa 17 | sudo apt-get update 18 | 19 | # 安装NVIDIA驱动 20 | sudo apt-get install -y nvidia-driver-535 # 根据需要选择版本 21 | 22 | # 重启系统 23 | sudo reboot 24 | 25 | # 验证安装 26 | nvidia-smi 27 | ``` 28 | 29 | ### 2.2 安装CUDA和cuDNN 30 | 31 | ```bash 32 | # 下载并安装CUDA 11.0 33 | wget https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run 34 | sudo sh cuda_11.0.3_450.51.06_linux.run 35 | 36 | # 配置环境变量 37 | echo 'export PATH=/usr/local/cuda-11.0/bin:$PATH' >> ~/.bashrc 38 | echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.0/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc 39 | source ~/.bashrc 40 | 41 | # 下载并安装cuDNN 8.0 42 | # 注:需要从NVIDIA开发者网站下载cuDNN v8.0,解压后: 43 | sudo cp cuda/include/cudnn*.h /usr/local/cuda/include 44 | sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64 45 | sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn* 46 | ``` 47 | 48 | ### 2.3 安装系统依赖 49 | 50 | ```bash 51 | sudo apt-get update 52 | sudo apt-get install -y \ 53 | python3.6 \ 54 | python3.6-dev \ 55 | python3-pip \ 56 | git \ 57 | cmake \ 58 | build-essential \ 59 | libopencv-dev \ 60 | libglib2.0-0 \ 61 | libsm6 \ 62 | libxext6 \ 63 | libxrender-dev \ 64 | libboost-all-dev \ 65 | libeigen3-dev 66 | ``` 67 | 68 | ### 2.4 配置Python环境 69 | 70 | ```bash 71 | # 设置Python 3.6为默认版本 72 | sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 73 | sudo update-alternatives --set python3 /usr/bin/python3.6 74 | 75 | # 配置pip镜像源 76 | pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 77 | 78 | # 升级pip 79 | python3 -m pip install --upgrade pip 80 | ``` 81 | 82 | ## 3. 安装PyTorch和依赖包 83 | 84 | ### 3.1 安装PyTorch 85 | 86 | ```bash 87 | pip3 install torch==1.10.2+cu113 torchvision==0.11.3+cu113 -f https://download.pytorch.org/whl/torch_stable.html 88 | ``` 89 | 90 | ### 3.2 安装项目依赖 91 | 92 | 创建requirements.txt并安装依赖: 93 | 94 | ```bash 95 | pip3 install -r requirements.txt 96 | ``` 97 | 98 | requirements.txt内容: 99 | ``` 100 | h5py 101 | numpy 102 | pyyaml==5.4.1 103 | enum34 104 | future 105 | scipy==1.4.1 106 | opencv_contrib_python==3.4.2.16 107 | transforms3d==0.3.1 108 | scikit_image==0.13.1 109 | lmdb==0.94 110 | setuptools==41.0.0 111 | cffi==1.11.5 112 | easydict==1.7 113 | plyfile==0.6 114 | pillow==8.2.0 115 | dataclasses 116 | glumpy 117 | tqdm 118 | tensorboardX 119 | pandas 120 | scikit-learn 121 | scipy 122 | termcolor 123 | pybind11 124 | ``` 125 | 126 | ## 4. 编译和安装特殊组件 127 | 128 | ### 4.1 编译apex 129 | 130 | ```bash 131 | git clone https://github.com/NVIDIA/apex 132 | cd apex 133 | export TORCH_CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.5" 134 | python setup.py install -v 135 | cd .. 136 | ``` 137 | 138 | ### 4.2 安装和编译normalspeed 139 | 140 | ```bash 141 | # 1. 准备OpenCV环境 142 | pip uninstall opencv-python opencv-python-headless -y 143 | pip install opencv-python==4.5.3.56 144 | 145 | # 2. 克隆并安装normalspeed 146 | git clone https://github.com/hfutcgncas/normalspeed.git 147 | cd normalspeed/normalSpeed 148 | 149 | # 安装编译依赖 150 | sudo apt-get install python3-pybind11 151 | pip3 install Cython==0.29.15 152 | 153 | # 清理并重新安装 154 | rm -rf build/ dist/ *.egg-info/ 155 | python3 setup.py install --user 156 | cd ../.. 157 | ``` 158 | 159 | ## 5. 克隆和配置FFB6D 160 | 161 | ```bash 162 | # 克隆代码 163 | git clone https://github.com/ethnhe/FFB6D.git 164 | cd FFB6D 165 | 166 | # 创建必要的目录 167 | mkdir -p datasets models train_log 168 | 169 | # 配置环境变量 170 | export PYTHONPATH=$PYTHONPATH:$(pwd) 171 | ``` 172 | 173 | ## 6. 验证安装 174 | 175 | ```bash 176 | # 验证CUDA支持 177 | python3 -c "import torch; print('CUDA available:', torch.cuda.is_available())" 178 | 179 | # 验证apex安装 180 | python3 -c "from apex import amp; print('APEX installed')" 181 | 182 | # 验证normalspeed安装 183 | python3 -c "import normalSpeed; print('normalspeed installed')" 184 | ``` 185 | 186 | ## 7. 常见问题 187 | 188 | ### 7.1 网络问题 189 | 190 | ```bash 191 | # 使用代理(如需要) 192 | export http_proxy="http://proxy:port" 193 | export https_proxy="http://proxy:port" 194 | 195 | # 或使用国内镜像源 196 | pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 197 | ``` 198 | 199 | ### 7.2 版本兼容性问题 200 | 201 | - 确保NVIDIA驱动版本支持CUDA 11.0 202 | - 确保Python包版本相互兼容 203 | - 检查CUDA版本与PyTorch版本的匹配 204 | 205 | ### 7.3 编译错误 206 | 207 | - 确保已安装所有必要的编译工具 208 | - 检查CUDA路径配置是否正确 209 | - 确认系统库版本是否满足要求 210 | 211 | ## 8. 训练 212 | 213 | 按照官方文档配置LineMOD数据集并开始训练。 214 | 215 | ## 参考资料 216 | 217 | 1. [FFB6D项目](https://github.com/ethnhe/FFB6D) 218 | 2. [CUDA安装指南](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) 219 | 3. [PyTorch安装指南](https://pytorch.org/get-started/locally/) 220 | 4. [【论文笔记】FFB6D | 马浩飞丨博客](https://www.mahaofei.com/post/d027527.html) -------------------------------------------------------------------------------- /docs/AI/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: /material/book 3 | nostatistics: true 4 | comments: false 5 | --- 6 | 7 | # Artificial Intelligence 8 | 9 | !!! note "Abstract" 10 | 11 | 本部分内容(除特别声明外)采用 [**署名-非商业性使用-保持一致 4.0 国际 (CC BY-NC-SA 4.0)**](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议进行许可。 12 | 13 | 14 | {{ BEGIN_TOC }} 15 | - "FFB6D 复现": 16 | - "Docker": FFB6D/FFB6D_Docker 17 | - "Conda": FFB6D/FFB6D_Conda 18 | - "EECS 498-007": 19 | - "KNN": EECS 498-007/KNN 20 | - "Linear Classifer": EECS 498-007/Linear_Classifer 21 | - "Pytorch": EECS 498-007/Pytorch 22 | - "CS231n": 23 | - "Notes": CS231n/CS231n_notes 24 | - "Numpy": CS231n/Numpy 25 | - "机器学习": 26 | - "《统计学习方法》笔记": 统计学习方法 27 | - "深度学习": 28 | - "Dive into Deep Learning": Dive_into_Deep_Learning 29 | - "SLAM": 30 | - "视觉 SLAM 十四讲": SLAM14 31 | {{ END_TOC }} 32 | -------------------------------------------------------------------------------- /docs/Blogs/archives.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: material/archive 3 | nostatistics: true 4 | comments: false 5 | --- 6 | 7 | # Archives 8 | 9 | {{ blog_content }} 10 | -------------------------------------------------------------------------------- /docs/Blogs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: fontawesome/solid/blog 3 | nostatistics: true 4 | comments: false 5 | --- 6 | # Blogs ✍ 7 | 8 | !!! note "Abstract" 9 | 个人博客 10 | 11 | 本部分内容(除特别声明外)采用 [**署名-非商业性使用-保持一致 4.0 国际 (CC BY-NC-SA 4.0)**](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议进行许可。 12 | 13 | ## Selected Blogs 14 | 15 | {{ BEGIN_TOC }} 16 | - "论文笔记": 17 | - ULIP-2 : posts/ULIP-2 18 | - OCRN : posts/OCRN 19 | - Foundational Models for 3DPC : posts/Foundational Models for 3D Point Clouds A Survey and Outlook 20 | - "3D重建": 21 | - 3DGS 复现 : posts/Gaussian_Splatting_复现 22 | - 3DGS 代码解读 : posts/Gaussian_Splatting_Code 23 | - FreeSplatter 代码解读 : posts/FreeSplatter 代码解读 24 | - "项目解读": 25 | - OpenManus : posts/openManus 26 | - "Agent": 27 | - "Agent 资源汇总" : posts/Agent 的一些资源汇总 28 | - "其他": 29 | - 笔记软件 : posts/notes_software 30 | {{ END_TOC }} 31 | -------------------------------------------------------------------------------- /docs/Blogs/posts/24-12-29.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 工作规律 3 | tags: 4 | - Blog 5 | categories: 6 | date: 2024-12-29T14:35:33+08:00 7 | modify: 2024-12-29T14:35:33+08:00 8 | dir: 9 | share: false 10 | cdate: 2024-12-29 11 | mdate: 2024-12-29 12 | --- 13 | 14 | # 工作规律 15 | 16 | 之前的一些感想续写: 17 | 18 | > [!quote]- 19 | > - ![fe238b55f8adaa08733176daf03bc331.png](https://raw.githubusercontent.com/WncFht/picture/main/fe238b55f8adaa08733176daf03bc331.png) 20 | > - 感觉高中之所以效率高就是这个原因,娱乐有什么吗?读闲书,去踢球,睡觉,聊天,写日记,练字。那么自然而然就会陷入一种反思的状态,然后就回去学习,或者安排接下来的事情。 21 | > - 但是等上了大学了,有手机了,闲下来就会去看各种视频,追求各种强刺激:打游戏,看剧,看短视频。然后就会恶性循环,也不会有退出机制。 22 | > - 第二个原因是,即使高中你第一天摆烂了,他会有强制性的作息来让你第二天从头开始,但是到了大学甚至很多时候会通宵或者晚睡晚起,因为各种原因(写 lab, surfing,打游戏等等) 23 | > - 第三个原因是,高中会有 interaction, 但是到了大学可能就很多时候都是自己一个人,然后生活就如一滩死水,会更容易陷入死循环。 24 | > - 第四个原因是(其实我觉得并不是那么的重要),高中会有定时的检测机制:like 周考,小测,月考,平时的每一次作业,或者可能会有默写。会不停的有老师来催促你,有同学在跟你比较。但是到了大学,你的选择是多样的,可能你根本不知道你在那一条路上,或者即使你确定了你的道路,但是你也很难量化你的进程,你未来的道路没有人能够为你担保。 25 | > 26 | > 那么如果想要提高效率的对策: 27 | > 1. 强制性的规律的作息,比如:晚上 11:30 睡觉,早上 7:40 起床,三餐固定。 28 | > 2. 拒绝一切可能的,没有意义的事情。这个因人而异,但是一般来说,通过自制力来控制自己偶尔去玩是不太有用的(我个人反正如此)。 29 | > 3. 定时的反思和自我检测。前者只要通过日记 + 周结的形式就可以完成,而后者,要么通过公开课可能自带的考试,要么通过你自己的输出,当然这很难,因为不是所有的事情都是应试那一套可以解决的。我目前的想法是,你学的东西评价要求就是以后面试的时候或者做项目的时候,能够了然于心,那么就算学会了。 30 | > 4. 多 interaction, 不要担心自己内向或者什么的。跟别人聊聊未来规划或者别的,提高自己的曝光度会让自己的生活迭代的更快。 31 | 32 | ## 基本特点 33 | 34 | 我想一个合理的生活作息应该有一下特点: 35 | 36 | - 可持续 37 | - 精神 38 | - 身体 39 | - 高效 40 | - 灵活 41 | 42 | ## 规律 43 | 44 | 1. 合理的睡眠,运动,饮食 45 | 2. 学累了就休息,休息够了就学习的进程切换 46 | 3. 定期反思 47 | 48 | ## 具体实践 49 | 50 | 工具: obsidian,时间日志,博客 51 | 52 | 1. 每天写日记,每周写周结(随时可以写,不一定是要一天的结束。纯粹记录零碎的想法和一些系统的反思。) 53 | 2. 通过时间日志来记录生活 54 | - 可以复盘自己的生活,在一周或者更长的时间内回看。 55 | - 在记录时间的时候,可以有一个后撤的姿态来反思当下的处境,即‘我在干什么’,‘我要干什么’。 56 | 3. 通过发博客或者其他平台来和他人交流,获取外界信息。 57 | 4. 按时睡觉,按时锻炼,按时吃饭 58 | 59 | ## 更加具体的,个人化的安排 60 | 61 | 1. 以一个小项目为单位来安排以天为颗粒度的计划,而不是只有 `累了就休息,休息完了就工作` 的进程转换机制。 62 | - 不然容易陷入,什么都不相干,但其实并不是累了的情况。 63 | 2. 最好不要一直干一些完全不相干的事情,不然难以产生联系的工作很难维持下去。 64 | -------------------------------------------------------------------------------- /docs/Blogs/posts/24-12-30.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 信息 3 | tags: 4 | - Blog 5 | categories: 6 | date: 2024-12-21T17:21:30+08:00 7 | modify: 2024-12-21T17:21:30+08:00 8 | dir: 9 | share: true 10 | cdate: 2024-12-21 11 | mdate: 2024-12-21 12 | --- 13 | 14 | # 信息 15 | 16 | 最近的一些关于信息的想法。 17 | 18 | 下面我先举两个例子。 19 | 20 | ## 勇敢去做 21 | 22 | 我觉得我一直都是很直接的人。 23 | 举个例子,高三升大一的暑假,我在考虑要不要转专业。于是看遍了水源所有相关的帖子,问了很多学长学姐,整理了很多路径,知道了转专业要: 24 | 25 | 1. 很高的学积分 26 | 2. SE 看项目,CS 看学积分看国奖 27 | 3. 可以去打美赛,做 prp,写项目,刷课 28 | 29 | 也认识了很多厉害的人: xlb, 星爷,cl,Kinnari,鱼鱼。 30 | 知道了很多条路,刷课,进组,打 ACM,做开源,直博,转专业。 31 | 32 | 但是,再后来我便不想转专业了(不想上工科平台的金课)。虽然到头来还是没有转专业,但是却收获了不少。 33 | 34 | ## 多交流 35 | 36 | 一直感觉国内的教育不支持合作,强烈的竞争关系难以形成利益共同体。 37 | 38 | 但是,最近才发现,正是那些你去帮助的过程中的交流,才能够让你更好的反思,产生新的想法。 39 | 40 | 比如在这个系列的文章中, [Open and open again--如何有极强的执行力?](https://zhuanlan.zhihu.com/p/13821739749),所谓的 open (作者意思应该是和他人交流)也只是摄入信息的一种。而正是因为与人交流往往会获得比较高质量的信息,所以呈现出来交流有很多 advantages。但实际上,是**优质的信息在发挥作用**。 41 | 42 | 于是迅速和 [@Kinnari](https://github.com/kinnariyaMamaTanha/) 一起组建了一个社群,希望能够让大家一起讨论想法,迭代自己的工作流程,减小信息差。 43 | 44 | > [!important]- 这里是群二维码 45 | > ![qrcode.jpg](https://raw.githubusercontent.com/WncFht/picture/main/picture/qrcode.jpg) 46 | 47 | > [!important]- 这里是群规则 48 | > - Background and Purpose: 49 | > - 减小信息差,相互督促,促进反思 50 | > - 让个体能够更好规划自己的路径,更及时地对大环境做出更合理的选择 51 | > 1. 邀请制 52 | > 1. 想要来的可以加我好友。 53 | > 2. 群内要求成员定期在群内发布个人想法,以达到交流的目的。 54 | > 1. **希望你进群就能提供一份内容,并填到文档中,如果一天内未填写,我们将会把你踢出群** 55 | > 3. 发布要求 56 | > 1. 平台:个人博客,小红书,知乎,B 站 57 | > 1. 在群里发布链接 + 简介 58 | > 2. 类型: 59 | > 1. 方法论 60 | > 1. [工程思维和流式规划 - Kinnari's Site](https://kinnariyamamatanha.github.io/blogs/posts/project-thinking-and-stream-planing/) 61 | > 2. 论文阅读 62 | > 1. [OneLLM: One Framework to Align All Modalities with Language - Kinnari's Site](https://kinnariyamamatanha.github.io/blogs/posts/OneLLM/) 63 | > 3. 学习心得 64 | > 1. [CS61A 结课笔记、感想以及资源 - 哔哩哔哩](https://www.bilibili.com/opus/695384621485916166/?from=readlist) 65 | > 4. 每周/月总结复盘 66 | > 1. [2024-W49-12 - wnc 的咖啡馆](https://wncfht.github.io/notes/Summaries/2024/weekly/2024-W49-12/) 67 | > 5. 笔记 68 | > 1. [ICS hw10 - 东川路第一伊蕾娜](https://zhuanlan.zhihu.com/p/12724025910) 69 | > 3. 原创,有自己的想法。 70 | > 4. 提醒机制 71 | > 1. 一个半月内不发布内容,提醒一次 72 | > 2. 两个月内不发布,踢出 73 | > 5. 群内规范: 74 | > 1. 可以适度水群但不建议, 水多了禁言, 类似 abc 群的程度。 75 | > 1. 可以回答问题 76 | > 2. 分享自己看到的资料 77 | > 6. 用在线文档来记录。 78 | 79 | ## 关于信息 80 | 81 | 实际上,上水源搜索,去跟他人交流都是信息输入的一环。 82 | 83 | ### 信息的质量 84 | 85 | 现代社会不缺优质信息,缺的是如何找到优质信息 86 | 87 | ![image.png](https://raw.githubusercontent.com/WncFht/picture/main/20241230121524499.png) 88 | 89 | 如何远离低质量信息?我的一些通用的原则是: 90 | 91 | - **越是大众的渠道信息噪音越高,信息质量越低,而小众的渠道或圈子质量比较高;** 92 | - 忽略那些没有基本科学素养的人提供的信息,可以用一些基本的常识来测试某个人是否可信; 93 | - 高质量的信息很多都不是免费的,为知识付费是一种科学的行为; 94 | - 谨慎追热点,热点信息里包含了太多低质量的信息; 95 | 96 | ### 信息的获取方式 97 | 98 | #### 主动 99 | 100 | - 搜索引擎:Google 或者 Bing。 101 | - AI: 使用 ChatGpt 进行搜索,或者提出 idea。 102 | - 订阅:订阅最重要的是找到你认可的作者,然后订阅他们的公众号、邮件列表或频道(杂志、专栏或视频)。我的订阅策略是通过一些搜索渠道或他人推荐的方式先找到一批种子订阅号,之后通过这些号的推荐找到更多的作者。 103 | 104 | #### 被动 105 | 106 | - 算法推荐:现代互联网通过古老的机器学习算法构建了以短视频和推荐信息流为主的信息产品,这类产品类似于减肥药,吃多了容易反弹。推荐算法一个很大的问题会制造出围绕使用者的信息茧房,也就是用户最终看到的都是自己喜欢看到的信息,信息单一化让使用者看到的都是片面的信息,这对提升认知来说是个灾难。 107 | - 社交信息流:社交是古老的被动获取信息的方式,比如你在朋友圈子或社交媒体上看到一些八卦的信息。这种信息获取方式最大的问题在于封闭的圈子,如何破圈是关键。举例来说,你是一个程序员,你周围的人大多也是程序员,由于共同的思维方式,你得到的信息也大多是同一类,信息在平流层流动。如果你想了解一些投资的知识,很难找到金融圈的从业人员。我的解决方法是通过不断学习不同领域的知识来认识一些我重点关注领域的人,比如我在学习金融知识的时候会考取一些投资资格证,以及写一些和金融相关的文章,看起来是种很慢的方式,但效果却不错。另外写作是破圈的利器,作者很容易通过一篇文章破圈。 108 | 109 | > [!note]+ 写作的好处 110 | > - 写作是深度终身学习:当你阅读时,你是被动接受作者的观点,你的大脑并未全面调动起来去分析问题。而一篇文章,需要你耗费很多时间查阅资料,甚至数年的经验总结。当文章发表后,可以与读者互动而相互学习,这种学习是一种深度学习; 111 | > - 写作是高质量的社交:什么叫无效社交?在群里灌水很难让别人信任你。而一篇好的文章会让读者与作者建立更深度的连接。作者可以通过文章去影响别人,如果这种影响是积极的,那这篇文章就很有价值与影响力; 112 | > - 写作能创造新的机会:在我写作的一些文章里,有一篇文章让我找到一个新领域的工作机会,有一篇文章让更有经验的人与我合作,有一些文章让别人信任我并给我推荐新的合作机会,有一些文章让我认识更多全国各地的朋友,这些都是无法用流量 (阅读量) 价值来衡量; 113 | 114 | ### 学习与信息的关系 115 | 116 | 学习某一领域知识时遵循 `自低向上` 的过程: 117 | 118 | 1. 因为一开始在该领域并不认识有该领域经验的人,也不知道读啥书比较合适,所以会先主动搜索该领域的一些文章先建立对该领域的 `轮廓认识`。 119 | 2. 之后会关注一些该领域的公众号/知乎大V/邮件列表,甚至是看有没有Youtube相关的频道。 120 | 3. 待感觉对该领域有了一个 `比较全面的基本认识` 后,我会找一些相关书籍去系统性的学习该领域的理论知识。 121 | 4. 理论知识学完后找个场景去应用,去输出一些我自己内化该领域知识的文章,通过这些文章认识对该领域有更深入认识的人。 122 | 5. 之后与这些人建立联系(包括平台私信、微信与邮件联系) ,做1对1的沟通,解决我在学习实践过程中遇到的一些难以解决的困惑。 123 | 6. 不断的重复该过程,可以加深我对该领域的认知。 124 | 125 | ## 一些由此引发出来的话题 126 | 127 | ### 不要焦虑 128 | 129 | 我觉得焦虑应该是信息摄入的问题,主要还是要想清楚自己要什么。 130 | 131 | 其实我是一直不怎么焦虑的人。但是,总是会遇到朋友来哭诉他们的焦虑。我是认为焦虑无用所以不焦虑,认为现状肯定有对应的原因,只要把对应的原因解决了就不会焦虑了。 132 | 133 | ### 定时反思 134 | 135 | 这个应该是信息输入以后的工作了。 136 | 137 | 在我看来,反思迭代是最为重要的技能之一。 138 | 139 | 但是具体的可能以后会另写一篇文章,不过在 [[24-12-29]] 这篇文章中也有提及。 140 | 141 | ## Reference 142 | 143 | 1. [构建终身学习体系进行自我提升 · BMPI](https://www.bmpi.dev/self/build-personal-knowledge-system/) 144 | -------------------------------------------------------------------------------- /docs/Blogs/posts/25-01-20.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 近期的一些想法 3 | tags: 4 | - Blog 5 | categories: 6 | date: 2025-01-20T10:34:44+08:00 7 | modify: 2025-01-20T10:34:44+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-01-20 11 | mdate: 2025-01-20 12 | --- 13 | 14 | # 近期的一些想法 15 | 16 | ## 规划 17 | 18 | 我发现自己往往只关注到了做比较短期的规划,而导致没有中期的规划。具体来说就是:我会做日记 / 周记,但是并没有说会有一个项目一个项目的规划,或者一个月 / 一个季度 / 一个学期 / 一年如此的规划。 19 | 20 | - 总结原因 21 | - 首先大概是自己逃避做比较长期的规划。拿梯度下降做个类比,大概是自己不喜欢做 learning rate 比较大的学习(哈哈哈,其实就是静不下心?比较贪心?)However, 局部最优(贪心)肯定不会(个人感觉概率上来说)是全局最优,更何况 loss 在人生的不同阶段时刻都发生着变化。 22 | - 所以说人生就是在以 loss 为目标,然后不断优化 loss 的旅程? 23 | - (那么以前的一个想法翻译过来可能就是,以优化 loss 为 loss 本身?即,人生的意义在于追寻意义本身)倒颇有种防止过拟合的味道。 24 | - 其次可能是,自己对于项目本身其实不会有很强的掌控度。 25 | - 即学习一样东西之前,你不会知道自己需要花费多少时间、这样东西的重要程度以及其他的重要完善的信息。 26 | - 那么在做规划的时候,往往就会有所偏颇。 27 | - 我想这当然是不可避免的,但是反思下来。做一样事情是肯定少不了规划这一步的,无非是有意识、无意识的去做。很多事情开头最难,因为你没有做过,等你真正上手了反而会心里有底。比如说,进入心流 / 学习良性循环 / 习惯养成之类的。 28 | - 那么如果把 Task 分成 Plan 和 Complete 两个部分,我想我们以前往往执着于提高 Complete 的效率,但是现在也可以去有意识的指定 Plan,整体应该会得到更大的提高,而不是盲目的去做。(一些表现就是:“我期末考前努力学肯定可以获得好成绩 / 我假期一定好好努力,弯道超车”等一些心理。这实际上就是没有做 Plan 的表现。) 29 | - 反正就是自己会去逃避做一些大跨度的规划,当然这里需要分类讨论 30 | - 我认为相当跨度的规划确实是不太需要多少细致的,即细致到写出来的程度:like 五年规划?年度规划?毕竟这些规划也只能提供一些大方向,而思索这些方向才是占据了规划的大头。 31 | - 然后就是一个月 / 一个项目如此的规划,感觉还是很有必要去做的。 32 | - 好处可能是 33 | 1. 学习路线更加明晰 34 | 2. 更强的正反馈,which 不会让整个项目过早的放弃 35 | 3. 个人认为,人的高效是不能持续的。即只有一段一段的高效,而如果想要总体效率高。最好的办法就是不断重复高效。即可以维持做一件事情(几个小时)的高效,两三天的高效(突击一门课),但是很难做到一整个月的高效(这实际上并不是一整个月的高效,实际上是很多段高效拼接以后的时长达到一个月。) 36 | - 举个例子: 37 | - 期末复习,或者高中阶段的时候会安排的对某一门学科的查漏补缺之类的。 38 | - 我们往往会去指定一个复习计划,which 往往会让我们的效率得到很大的提升。 39 | - 那么我们来讲讲怎么做? 40 | - 方法论感觉很多方法都能提炼到这里 41 | - 比如:如何快速入门一个新领域,如何快速学会使用一个工具,如何学习一门课程 42 | - 第一步应该是先了解自己的 Task 是什么 43 | - 比如:看前人的刷课经验,看论文综述,询问学长学姐这条路应该怎么走、需要注意什么 44 | - 第二步是根据自己的时间、状态,规划出自己的合适路线 45 | - 比如:有些东西没有用的可能不需要了解,就不放在学习计划之中。第一步是一个搜集的过程,而第二步是一个去除 / 排序的过程。 46 | - 更细致一点: 47 | - 有的时候不需要搞懂工具的原理,只需要知道工具怎么用就可以了 48 | - 有的时候不需要知道相当完备的统计学知识,只需要知道深度学习怎么反向传播就可以了 49 | - 有的时候不需要知道整个公理化集合论,积分能用就行了 50 | - 以及其他很多 51 | - 我们搞清楚 Task 的目的就是:提供一个评价体系,分清楚什么是我需要的,什么是不需要的。从而警惕一切都想要在这段时间内学习的心理(like 我想要先打好基础再来学习这个部分) 52 | - 第三步就是根据自己的实际 Complete 情况,时刻调整自己的 Plan 53 | - 这一步也是很重要,为了防止整个项目崩盘,你基本上是需要去调整 Plan 的。 54 | - 比如:在复习的时候有所侧重,在学习的时候才发现这一块知识好像不是那么有用。 55 | - 当然这一步由于很多时候,会有老师引领你,导致你完全依赖老师而没有自己的思考。但实际上,老师也没有全局的信息,你应该自己在整个计划上微调而不是彻底依赖于 backbone。 56 | 57 | 之前觉得周结对自己有一些帮助,所以每周都写。但是又感觉帮助不是很大,我觉得原因就在这里。 58 | 周结只能部分提供不是那么明晰的 Plan,我们更需要的是针对项目,针对每一个任务的 Plan。而不是寄希望于周结。 59 | 60 | ## 作息 61 | 62 | 其实这个是老生常谈的一个问题了。 63 | 64 | 不过上个星期基本每天都去运动,倒是突然意识到一些事情。 65 | 66 | - 运动的时候整个人脑子都是放空的,会想一些平时不会想到的事情。类似于睡前躺在床上想事情(当然由于现在有了手机,很多人都是直接玩累了就睡着了,这个部分的时间就缺失了)。所以运动有一个让整个人重启的感觉,我想也有一部分原因来自于此。(平时如果你一直处在一种工作/娱乐无缝切换的情况下,大概是不会有机会得到放空的。所以我想这也是为什么线下面对面聊天有时候会比网络聊天更让人放松。) 67 | - 作息,早睡早起实际上是一种为效率保底的行为。不过这里应该要把被奶头乐接管的时间也放到睡觉之中。高中的时候的硬性作息 + 硬性排课 + 统一考试实际上是一种尝试为所有人兜底的机制。(当然有方便执行的成分) 68 | - 这部分以后再写 69 | 70 | ## 一些更加宏大的事 71 | 72 | > [!quote]+ 73 | > 就我观察本科或更早同学来说,当下没走到100分、走到90 85分的同学,比如保送、就读学校好坏,在六七年后,可能走到了100分,比当初那些同学的分数还要高。贪心算法往往不是全局最优解。 74 | > 75 | > 而且,其实家境比较优越,每次选择都是同龄人中较优秀的那一批,就差不多能让自己在85分以上。 76 | > 77 | > 做的选择,未来可能后悔,也可能没有。但未来这些,就是我们这种人性的必然要进入的修行了,避不过去的。可能也不必太担心。 78 | 79 | 引用源友的话,欸,从上大学就开始思考这个问题了。 80 | 81 | 我个人的阅历是暂时不足以支撑我想清楚这些的,暂时只能多想,常常回看来时路。 82 | 83 | > [!quote]+ 84 | > 长者教导过我们,人这一生固然要靠自己的奋斗,但也要考虑历史的进程。实际上以当前的历史进程来看,你选什么学校意义都不大。问出题目这个问题、关注这个问题的,多半是高考刚结束或低年级本科生,能看到的还是眼下的一亩三分地。目光放长远一点,学校的光环也就那样,不能说没用,聊胜于无吧。这个世界很大、很深,你引以为傲的很多东西都会被稀释成尘埃。别说C9了,哪怕清北,哈耶普,对中产阶级的提升也是非常有限的(我斗胆认为我所接触的名校毕业生的数量,包括海外的,可以构成一个具有统计意义的样本了)。我的统计结论是:专业方向的选择比学校的选择更重要,父母的奋斗比子女的奋斗更重要。后者属于投胎问题,姑且按下不表。但是对于前者的战略考虑,比较遗憾的是,人往往不会为了未来的更大收益而放弃眼下的收益,遑论这未来的收益也是有风险的。比如我们经常能听到选冷门专业捡漏上档的,而降档读 CS 则比较少见,尽管时至今日CS依然是出路最好的选择之一。 85 | > 86 | > 择业问题和择校问题是绑定的,只谈学校不谈专业,只能得到一些not even mistakes的回答;而谈了专业又不谈人生愿景,那很多出谋划策都将南辕北辙。但是,要问一个高中毕业生:你想成为怎样一个人,你想怎样过完一生?这样的问题实在是强人所难。绝大多数情况下只能得到一个trivial solution,那就是赚钱。以为财务自由之后,可以过上自己想过的人生。这种想法跟打游戏开作弊码一样,非常幼稚无趣,因为它本质上放弃了对人生战略的深入思考,并且逃避困难——这个困难并不是未来任何潜在的挑战,而是回答“你想成为一个怎样的人”这一问题本身。 87 | > 88 | > 眼下,你固然可以玩这场学校斗兽棋,分个三六九等出来,但等你毕业了才会发现,这种游戏是多么苍白。依我看,真正需要严肃思考的是:你想如何过完你这一生,你想成为怎样的人。当然,这样一来,这个问题就回到我开头说的“人生体验”上了。我知道你可能不在乎这个,但这个才是真正重要的问题。 89 | -------------------------------------------------------------------------------- /docs/Blogs/posts/Foundational Models for 3D Point Clouds A Survey and Outlook.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Foundational Models for 3D Point Clouds A Survey and Outlook 3 | tags: 4 | - 论文阅读 5 | categories: 6 | date: 2025-03-12T02:40:47+08:00 7 | modify: 2025-03-12T02:40:47+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-03-12 11 | mdate: 2025-03-12 12 | --- 13 | 14 | # Foundational Models for 3D Point Clouds A Survey and Outlook 15 | 16 | FM: Foundational Models 17 | 18 | - 提取其他模态的特征来弥补 3D 数据的理解 19 | - 不进行大量数据采集->弥合数据缺少的差距 20 | ![QQ_1741719016030.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741719016030.png) 21 | 1. 用 2DFMs -> 3DFMs 22 | 2. 使用 2DFMs 来完成任务:点云分类 23 | 3. LLM + CV 来对齐 24 | 25 | ## Contributions 26 | 27 | - 全面背景说明 28 | - 结构化分类 29 | 30 | ![QQ_1741719313847.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741719313847.png) 31 | 32 | ## Background 33 | 34 | - object-level 35 | - 数据合成 36 | - ShapeNet 51300 37 | - ModelNet40 12311 38 | - 3D-FUTURE 39 | - 多视图 40 | - DTU 41 | - BlenderMVS 42 | - 扫描的 43 | - ScanObjectNN 15000 44 | - GSO 45 | - AKB-48 46 | - CO3D 47 | - colmap 生成+视频 48 | - OmniObject3D 49 | - 6000 个,啥都有 50 | - scene-level 51 | - Matterport3D 52 | - RealEstate10k 53 | - ARKitScenes 54 | - ScanNet 55 | - ScanNet200 56 | - ScanNet++ 57 | - 户外 58 | - SemanticKITTI 59 | - Paris-CARLA3D 60 | - nuScenes 61 | - extensions for 3D language understanging tasks 62 | - Single Modality 63 | - CV 64 | - Vision Transformer 65 | - MAE 66 | - DINOv1/v2 67 | - NLP 68 | - BERT 69 | - GPT1/2/3 70 | - LLaMA 71 | - Multi Modality 72 | - CLIP 73 | - BLIP 74 | - Flamingo 75 | - SAM 76 | - PEFT 77 | - LoRA 78 | - prompt-tuning 79 | - QLorA 80 | 81 | ## Building 3DFMs 82 | 83 | ![QQ_1741720091048.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741720091048.png) 84 | - ConvNet 85 | - PointContrast 86 | - OcCo 87 | - DepthContrast 88 | - Transformer 89 | - Point-BERT 90 | - Point-MAE 91 | - Voxel-MAE 92 | - SimIP 93 | - 他们没有用 2DFM -> 3DfM, 这里不讨论 94 | 95 | ![QQ_1741720432166.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741720432166.png) 96 | 分三类: 97 | 98 | - 2DFM 作为 FM 99 | - Image2Point 100 | - 2D Kernel -> 3D Kernel 101 | - Pix4Point -> 也就是把 3D point 进行 tokenization 102 | - PCExpert -> 让 PC encoder 来学 Image encoder 的内容 103 | - PointCLIP v1/v2 点云投影 -> CLIP 104 | - DiffCLIP -> ControlNet 扩散模型 RGBD -> RGB 105 | - Dual Encoder 106 | - PPKT -> 用上采样层解决缺乏像素级分辨率的问题 -> 用 2DFMs 训练 3DFMs 107 | - CrossPoint -> 点云增强 + 对比学习,具体不是很了解 108 | - CLIP2Point -> 3D PC -> RGBD <-> CLIP 视觉对齐 NT-Xent + InfoNCE 109 | - PointCLIPKD -> 图像加上 ClipCap 点云用 PC Token + Concept query 然后蒸馏。不是很懂 110 | - Bridge3D -> 2D FM + MAE -> 关注前景 111 | - I2P-MAE 112 | - Triplet Alignment 113 | - ULIP 114 | - ULIP-2 BLIP-2 115 | - CG3D -> learnable prompt + extra parameters 116 | - CLIP2Scene -> SCR SCTR 117 | - Text4Point -> Text 2D 3D 118 | - CLIP^2 -> text 2D 3D 119 | - OpenShape -> larger dataset + 改进 text 120 | - Multi-CLIP -> 3D 2D Text QA 上测评不错 121 | - Uni3D -> 变大! 122 | - JM3D -> 层次文本树 123 | - JM3D-LLM 124 | 125 | ## 特定领域的模型 126 | 127 | ### 2DFMs 分类 3D 128 | 129 | ![QQ_1741751195449.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741751195449.png) 130 | - CALIP 131 | - non-parametric 132 | - Bidirectional modifications 133 | - P2P 134 | - VPT 启发 135 | - MvNet 136 | - 多视图投影 -> 注意力机制 -> 视图融合 137 | - InvJoint 138 | - 混淆矩阵 -> 解决投影可能的问题 139 | 140 | ### 2DFMs 分割 3D 141 | 142 | #### 3D part Segmentation 143 | 144 | ![QQ_1741752159131.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741752159131.png) 145 | 146 | - PointCLIP V2 147 | - PartSLIP (GLIP + free-form text + 3D voting and grouping -> 2D bounding box -> 3D bounding box) 148 | - ZeroPS 149 | - 改进投票机制 150 | - 提出合并 part 算法 151 | - 找到 2D box 和 3D box 的最佳匹配 152 | - PartDistill 153 | - 蒸馏 154 | 155 | ![QQ_1741752172129.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741752172129.png) 156 | 157 | - SAM3D 158 | - multi view -> SAM -> 搞回去 159 | - SAM-Graph 160 | - 感觉挺有意思的,有空去看看 161 | - SAI3D 162 | - SAMPro3D 163 | - PointSeg 164 | 165 | ### Open-Vocabulary Segmentation 166 | 167 | ![QQ_1741752560759.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741752560759.png) 168 | ![QQ_1741752596490.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741752596490.png) 169 | 170 | ### 2DFMs for 3D obj detection 171 | 172 | - SAM3D 173 | - VFMM3D 174 | - FM-OV3D 175 | 176 | ## 2DFMs + LLMs for 3D Tasks 177 | 178 | ### Object Level 179 | 180 | - Cap3D 181 | - 3D assets -> 2D image -> BLIP2 generate -> CLIP filter -> GPT4 182 | - XinstructBLIP 183 | - Qformers 184 | - Linear Projection 185 | - 指令集稀缺 -> based on retrieval data enhancement 186 | - GPT4Point 187 | - ShapeLLM 188 | - 多级形状理解 189 | - Recon -> Recon++ 190 | - MiniGPT-3D 191 | - MoE + LoRA + norm tuning 192 | - GreenPLM 193 | - LLaNA 194 | - NeRF + LLM 195 | 196 | ### Scene Level 197 | 198 | ![QQ_1741754063864.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1741754063864.png) 199 | 200 | ### 直接场景编码 201 | 202 | - LL3DA 203 | - SIG3D 204 | 205 | ### 基于 2 维先验 206 | 207 | - RegionBLIP 208 | - 3D-LLMs 209 | - LEO 210 | - 看起来挺有意思的 211 | - SpatialRGPT 212 | - 2D image -> 3D scene graph 213 | - 重点关注开放词汇检测和分割、度量深度估计和相机标定以生成准确的空间表示 214 | 215 | ### 点云分解 216 | 217 | - Uni3D-LLM 218 | - LLaVA-3D 219 | -------------------------------------------------------------------------------- /docs/Blogs/posts/Gaussian_Splatting_Code.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Gaussian_Splatting_Code 3 | tags: 4 | - 科研 5 | - 复现 6 | - 三维重建 7 | categories: 8 | date: 2025-01-01T12:11:48+08:00 9 | modify: 2025-01-01T12:11:48+08:00 10 | dir: 11 | share: false 12 | cdate: 2025-01-01 13 | mdate: 2025-01-01 14 | --- 15 | 16 | # Gaussian_Splatting_Code 17 | 18 | 主要有 colmap 和 blender 两种数据类型。 19 | 20 | --- 21 | 22 | ## **1. Colmap 数据集加载过程** 23 | 24 | ### **1.1 加载函数** 25 | 26 | - 主函数为 `readColmapSceneInfo`,调用了一系列子函数以加载相机参数、点云和相关文件。 27 | - 数据来源路径为 `sparse/` 文件夹,包含相机参数文件、点云文件等。 28 | 29 | --- 30 | 31 | ### **1.2 加载的主要步骤** 32 | 33 | #### **步骤 1:加载相机外参** 34 | 35 | 代码如下: 36 | 37 | ```python 38 | cameras_extrinsic_file = os.path.join(path, "sparse/0", "images.bin") 39 | cam_extrinsics = read_extrinsics_binary(cameras_extrinsic_file) 40 | ``` 41 | 42 | - 如果 `images.bin` 文件不存在,则加载 `images.txt`: 43 | 44 | ```python 45 | cameras_extrinsic_file = os.path.join(path, "sparse/0", "images.txt") 46 | cam_extrinsics = read_extrinsics_text(cameras_extrinsic_file) 47 | ``` 48 | 49 | - 外参包括: 50 | - 相机旋转矩阵 (`R`)。 51 | - 平移向量 (`T`)。 52 | - 图像名称,用于匹配图像文件。 53 | 54 | #### **步骤 2:加载相机内参** 55 | 56 | 代码如下: 57 | 58 | ```python 59 | cameras_intrinsic_file = os.path.join(path, "sparse/0", "cameras.bin") 60 | cam_intrinsics = read_intrinsics_binary(cameras_intrinsic_file) 61 | ``` 62 | 63 | - 如果 `cameras.bin` 文件不存在,则加载 `cameras.txt`: 64 | 65 | ```python 66 | cameras_intrinsic_file = os.path.join(path, "sparse/0", "cameras.txt") 67 | cam_intrinsics = read_intrinsics_text(cameras_intrinsic_file) 68 | ``` 69 | 70 | - 内参包括: 71 | - 焦距(`focal length`)。 72 | - 主点坐标(`principal point`)。 73 | - 图像分辨率(`width` 和 `height`)。 74 | 75 | #### **步骤 3:加载点云** 76 | 77 | 代码如下: 78 | 79 | ```python 80 | ply_path = os.path.join(path, "sparse/0/points3D.ply") 81 | bin_path = os.path.join(path, "sparse/0/points3D.bin") 82 | txt_path = os.path.join(path, "sparse/0/points3D.txt") 83 | 84 | if not os.path.exists(ply_path): 85 | print("Converting point3d.bin to .ply, will happen only the first time you open the scene.") 86 | xyz, rgb, _ = read_points3D_binary(bin_path) 87 | storePly(ply_path, xyz, rgb) 88 | pcd = fetchPly(ply_path) 89 | ``` 90 | 91 | - 点云文件的来源可以是: 92 | - `points3D.bin` 93 | - `points3D.txt` 94 | - `points3D.ply`(如果存在则直接加载,否则从 `bin` 或 `txt` 转换为 `.ply`) 95 | 96 | #### **步骤 4:训练/测试集划分** 97 | 98 | 代码如下: 99 | 100 | ```python 101 | if eval: 102 | cam_names = [cam_extrinsics[cam_id].name for cam_id in cam_extrinsics] 103 | cam_names = sorted(cam_names) 104 | test_cam_names_list = [name for idx, name in enumerate(cam_names) if idx % llffhold == 0] 105 | else: 106 | test_cam_names_list = [] 107 | ``` 108 | 109 | - 测试集可以通过 `eval` 参数启用。 110 | - 默认每 8 个视角(`llffhold=8`)选取一个作为测试集。 111 | 112 | #### **步骤 5:场景归一化** 113 | 114 | 代码如下: 115 | 116 | ```python 117 | nerf_normalization = getNerfppNorm(train_cam_infos) 118 | ``` 119 | 120 | - 通过计算训练相机的中心和对角线长度,确定场景中心 (`translate`) 和半径 (`radius`)。 121 | 122 | --- 123 | 124 | ### **1.3 返回数据结构** 125 | 126 | 函数返回一个 `SceneInfo` 数据结构: 127 | 128 | - `point_cloud`:点云数据。 129 | - `train_cameras`:训练相机列表。 130 | - `test_cameras`:测试相机列表。 131 | - `nerf_normalization`:场景归一化参数。 132 | - `ply_path`:点云文件路径。 133 | 134 | --- 135 | 136 | ## **2. Blender 数据集加载过程** 137 | 138 | ### **2.1 加载函数** 139 | 140 | - 主函数为 `readNerfSyntheticInfo`,从 Blender 导出的 JSON 文件加载相机和图像信息。 141 | 142 | --- 143 | 144 | ### **2.2 加载的主要步骤** 145 | 146 | #### **步骤 1:加载训练和测试相机** 147 | 148 | 代码如下: 149 | 150 | ```python 151 | train_cam_infos = readCamerasFromTransforms(path, "transforms_train.json", depths_folder, white_background, False, extension) 152 | test_cam_infos = readCamerasFromTransforms(path, "transforms_test.json", depths_folder, white_background, True, extension) 153 | ``` 154 | 155 | - 每个相机的数据来源于 `transforms_train.json` 和 `transforms_test.json`。 156 | - **`transforms_train.json`**: 157 | - 用于描述训练集中相机的位置信息(外参)、相机的内参(水平视角)以及对应的图像路径。 158 | - 每个相机视角都会有一条记录。 159 | - 相机参数包含: 160 | - `transform_matrix`(相机到世界的变换矩阵)。 161 | - 水平视角 (`camera_angle_x`) 用于计算焦距。 162 | 163 | #### **步骤 2:生成点云** 164 | 165 | 代码如下: 166 | 167 | ```python 168 | if not os.path.exists(ply_path): 169 | num_pts = 100_000 170 | print(f"Generating random point cloud ({num_pts})...") 171 | xyz = np.random.random((num_pts, 3)) * 2.6 - 1.3 172 | shs = np.random.random((num_pts, 3)) / 255.0 173 | storePly(ply_path, xyz, SH2RGB(shs) * 255) 174 | pcd = fetchPly(ply_path) 175 | ``` 176 | 177 | - Blender 数据集没有点云文件,因此随机生成 10 万个点: 178 | - 点的位置范围为 `[-1.3, 1.3]`。 179 | - 点的颜色通过球谐函数 (SH) 随机生成。 180 | 181 | #### **步骤 3:场景归一化** 182 | 183 | 代码如下: 184 | 185 | ```python 186 | nerf_normalization = getNerfppNorm(train_cam_infos) 187 | ``` 188 | 189 | - 与 Colmap 类似,计算场景的中心 (`translate`) 和半径 (`radius`)。 190 | 191 | --- 192 | 193 | ### **2.3 返回数据结构** 194 | 195 | 函数返回一个 `SceneInfo` 数据结构: 196 | 197 | - `point_cloud`:生成的点云。 198 | - `train_cameras`:训练相机列表。 199 | - `test_cameras`:测试相机列表。 200 | - `nerf_normalization`:场景归一化参数。 201 | - `ply_path`:点云文件路径。 202 | 203 | --- 204 | 205 | ## **3. 总结对比** 206 | 207 | | **特性** | **Colmap 数据集** | **Blender 数据集** | 208 | | -------------- | ------------------------------------------------- | ----------------------------------------- | 209 | | **相机参数** | 从 `images.bin` 和 `cameras.bin` 中加载外参和内参 | 从 `transforms_train.json` 中加载变换矩阵 | 210 | | **点云** | 从 `points3D.bin` 或 `points3D.txt` 加载 | 随机生成 10 万个点 | 211 | | **图像数据** | 存储在 `images/` 文件夹 | 路径由 JSON 文件指定 | 212 | | **深度图** | 可选,需 `depth_params.json` 定义 | 可选,需提供深度图文件夹 | 213 | | **归一化** | 基于相机位置计算场景中心和半径 | 同上 | 214 | | **测试集划分** | 每 8 个视角划分一个到测试集,或读取 `test.txt` | 测试集通过 `transforms_test.json` 指定 | 215 | | **背景颜色** | 无 | 可选白色或黑色背景 | 216 | 217 | --- 218 | 219 | ## **4. 所需准备的文件** 220 | 221 | ### **Colmap 数据集** 222 | 223 | 1. 相机外参:`sparse/0/images.bin` 或 `images.txt`。 224 | 2. 相机内参:`sparse/0/cameras.bin` 或 `cameras.txt`。 225 | 3. 点云文件:`sparse/0/points3D.bin` 或 `points3D.txt`。 226 | 4. 图像文件夹:通常为 `images/`。 227 | 5. 可选文件: 228 | - `sparse/0/depth_params.json`(深度参数)。 229 | - `sparse/0/test.txt`(测试集划分文件)。 230 | 231 | --- 232 | 233 | ### **Blender 数据集** 234 | 235 | 1. 训练相机文件:`transforms_train.json`。 236 | 2. 测试相机文件:`transforms_test.json`。 237 | 3. 图像文件路径:由 JSON 文件指定。 238 | 4. 可选文件: 239 | - 深度图文件夹。 240 | - 背景颜色参数(`white_background`)。 241 | 242 | ## Blender 243 | 244 | [Random Point Initialization · Issue #39 · graphdeco-inria/gaussian-splatting · GitHub](https://github.com/graphdeco-inria/gaussian-splatting/issues/39) 245 | -------------------------------------------------------------------------------- /docs/Blogs/posts/OCRN.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Beyond Object Recognition: A New Benchmark towards Object Concept Learning" 3 | tags: 4 | - 科研 5 | categories: 6 | date: 2024-12-24T21:04:22+08:00 7 | modify: 2024-12-24T21:04:22+08:00 8 | dir: 9 | share: false 10 | cdate: 2024-12-24 11 | mdate: 2024-12-24 12 | --- 13 | 14 | # Beyond Object Recognition: A New Benchmark towards Object Concept Learning 15 | 16 | > [!info]+ 文章信息 17 | > - 文章题目: Beyond Object Recognition: A New Benchmark towards Object Concept Learning 18 | > - 作者:[Yong-Lu Li](https://arxiv.org/search/cs?searchtype=author&query=Li,+Y), [Yue Xu](https://arxiv.org/search/cs?searchtype=author&query=Xu,+Y), [Xinyu Xu](https://arxiv.org/search/cs?searchtype=author&query=Xu,+X), [Xiaohan Mao](https://arxiv.org/search/cs?searchtype=author&query=Mao,+X), [Yuan Yao](https://arxiv.org/search/cs?searchtype=author&query=Yao,+Y), [Siqi Liu](https://arxiv.org/search/cs?searchtype=author&query=Liu,+S), [Cewu Lu](https://arxiv.org/search/cs?searchtype=author&query=Lu,+C) 19 | > - arXiv:[\[2212.02710\] Beyond Object Recognition: A New Benchmark towards Object Concept Learning](https://arxiv.org/abs/2212.02710) 20 | > - 代码:[GitHub - silicx/ObjectConceptLearning: This the official repository of OCL (ICCV 2023).](https://github.com/silicx/ObjectConceptLearning) 21 | 22 | > [!abstract]- Abstract 23 | > Understanding objects is a central building block of AI, especially for embodied AI. Even though object recognition excels with deep learning, current machines struggle to learn higher-level knowledge, e.g., what attributes an object has, and what we can do with it. Here, we propose a challenging Object Concept Learning (OCL) task to push the envelope of object understanding. It requires machines to reason out affordances and simultaneously give the reason: what attributes make an object possess these affordances. To support OCL, we build a densely annotated knowledge base including extensive annotations for three levels of object concept (category, attribute, affordance), and the clear causal relations of three levels. By analyzing the causal structure of OCL, we present a baseline, Object Concept Reasoning Network (OCRN). It leverages concept instantiation and causal intervention to infer the three levels. In experiments, OCRN effectively infers the object knowledge while following the causalities well. Our data and code are available at https://mvig-rhos.com/ocl. 24 | 25 | > [!note]- Conclusion 26 | > In this work, we introduce object concept learning (OCL) expecting machines to infer affordances and explain what attributes enable an object to possess them. Accordingly, we build an extensive dataset and present OCRN based on casual intervention and instantiation. OCRN achieves decent performance and follows the causalities well. However, OCL remains challenging and would inspire a line of studies on reasoning-based object understanding. 27 | 28 | ## Model 29 | 30 | - 通过 attribute 来预测 affordance,并推断是那些 attribute 起到了主要作用。 31 | 32 | > [!example]- 33 | > ![image.png](https://raw.githubusercontent.com/WncFht/picture/main/20241225134159699.png) 34 | 35 | - 通过 casual intervetion 来避免 object category bias 36 | - model implement 看的还是有点模糊,以后再来补充 37 | -------------------------------------------------------------------------------- /docs/Blogs/posts/用AI后的问题.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 一些 AI 与个人学习的思考 3 | tags: 4 | - Blog 5 | categories: 6 | date: 2025-01-02T14:43:02+08:00 7 | modify: 2025-01-02T14:43:02+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-01-02 11 | mdate: 2025-01-02 12 | --- 13 | 14 | # 一些 AI 与个人学习的思考 15 | 16 | ## 个人使用情况 17 | 18 | - 写代码: Claude + GPT 4o 19 | - 数学 / 化学 / 一些偏逻辑推理的问题: GPT o1 20 | - 写文档 21 | - 英文: GPT / Claude 22 | - 中文: 豆包 / kimi 23 | 24 | ## prompt 25 | 26 | - 曾经一段时间,我致力于为很多工作调出一个‘强’的 prompt,可以看博客中 prompt 相关的文章。 27 | - 但是后来发现很多时候,由于对话过长或者 AI 分析能力过弱或者我难以给出很有效的上下文信息,经常解决不了问题,而此时又常常陷入我自己难以读懂代码/修改琐碎,故常常要重新开始。 28 | - 数次之后,我慢慢发现 AI 很难给我 insight 或者甚至很难让他总结的时候发现显而易见的规律。而我的过分依赖 AI 终将导致我推翻重来,白白浪费时间。 29 | 30 | ## 常见问题 31 | 32 | 让我们来细化一下这个问题,一般来说,我会有以下几种情况: 33 | 34 | - AI 写出了我不会的代码,但是由于我个人对项目框架的不理解,它会自我发挥或者根本达不到目的。 35 | 36 | > 依赖 LLM,但是要意识到它的局限性,错误的对话历史会让它越错越远,你要知道适时的重启对话来避免“降智”。 37 | 38 | 比如我曾经尝试这个使用技巧,但是很难达到比较好的效果。 39 | 40 | - AI 在配环境方面只会分析表层报错,**没有历史经验**。 41 | - 这个还是挺有意思的,之前有一段时间用过 docker 配环境,但是 AI 基本上很难解决问题,很多问题最终还是通过上网关键词搜索得到解决。 42 | - AI 更擅长的似乎是 Linux 终端命令,和帮你分析一些较为浅层的问题。 43 | - 尝试让 AI 教题目,或者知识。 44 | - 难以生成足够深入,系统,逻辑串联的信息。 45 | 46 | ## 解决方案 47 | 48 | - 最近正好看到[这篇文章](https://zhuanlan.zhihu.com/p/15876528874?utm_psn=1858160039874920448),但是作者在文中仅归结为思想的懒惰和克制 GPT 的使用感觉较为不妥。 49 | - 个人认为,只是 AI 的时候方法不妥当。我们致力于发挥 AI 的实力来减轻我们的工作压力,而忽视了 AI 并非无所不能(实际上,它很多都不行)。那么,我们更应该发挥它的长处,而不要尝试让它取代一切内容,即,我们需要对整体有掌控感,知道 AI 是否能够完成此项任务,何时应该使用 AI,合适应该自己做。 50 | 51 | 引用别人的总结来说: 52 | 53 | > 一、LLM 上下文是受限的,且上下文越多,它越难捕获到你的意图。 54 | > 二、LLM 输出是**严重**受限的,目前常用的最多为 8192 Tokens。 55 | > 三、无论是Cursor、Windsurf、Copilot还是Cline,它们都只是你的助手,**请全程参与并把握主导权和决策权**。 56 | 57 | 比方说: 58 | - 我们应该让 AI 帮助我们读代码,从而**知道**自己应该如何改代码。 59 | - 而不是让它给我们直接修改代码。 60 | - 我们应该让 AI 给我们解释知识点,举例子,从而让**我们**更加快速的吸收知识。 61 | - 而不是让它给我们生成笔记,取代自己学习的过程。 62 | 63 | 用一个更加全面的例子来说,如果我们想要构建一个网站,下面是一些最佳实践。 64 | 65 | ### 2.1. 明确定位 66 | 67 | 一开始我就明确了自己的角色定位:产品经理。我不懂编程语言和代码实现,我的职责就是设计指导 LLM 实现项目,在过程中通过咨询细节再调整具体的实现步骤。 68 | 69 | 在问答的过程中,一定要当一个好奇宝宝,不停的问怎么做和为什么,你跟 LLM 客气什么?不懂就问,哪里不会问哪里! 70 | 71 | 我一开始就是什么都不懂,然后再和 LLM 的交流基础上,以它的回答作为阶梯一步步优化提问内容。 72 | 下面是我的第一次做网站的对话过程: 73 | 74 | - 怎么实现网站? 75 | - 我想请求 API,想用 Vercel 部署,用 nextjs 还是 vue 更合适? 76 | - 怎么构建 nextjs 项目? 77 | - 从 npx 开始给出构建命令 78 | - 这些选项都是什么意思?应该选哪个? 79 | 80 | 至此,我就完成了 Next. js 项目的创建,十分钟前我一窍不通,十分钟后我觉得我已经了解了一个产品经理需要掌握的内容。 81 | 82 | ### 2.2. 项目规划 83 | 84 | 在实现项目前期就一定要做好规划,这是与 LLM 配合顺利的基础。为了不重蹈项目混乱,无法调整,心烦意乱的覆辙,在任何项目开始前,最好都要根据实现难度,花上一定时间去和 LLM 好好梳理项目结构,让它不要给出具体代码而是给出项目的目录结构,这样你心里就有数,之后如果出现错漏,你也能根据这个结构单独向 LLM 询问具体细节。 85 | 86 | 项目规划就通过 README 来编写,一般情况下需要有: 87 | 88 | - 项目介绍 89 | - 技术栈 90 | - 项目功能 91 | - 目录结构 92 | 93 | 之后就围绕 README 去实现就心里有底了。 94 | 95 | `目录结构` 之后基本都是要改变的,只是作为参考,不用过于关注。 96 | 大部分时候我一直修改的是 `项目功能` ,我会使用 `- []` 清单来管理功能实现列表,避免遗漏和关注点偏移,因为 LLM 很轻易的就能写出让你觉得贼牛逼的代码,但是切忌自我感动,在项目基础功能实现前,不要让 LLM 自我发挥,先把 Demo 完成再说其他。 97 | 98 | ### 2.3. 与 git 配合 99 | 100 | 一定要使用 git 管理代码,编程习惯决定了实现效率。我的经验就是:**多暂存、勤提交、控版本** 101 | 102 | 在规划好项目系统架构后,让 LLM 实现一个基础的网站框架,我就会 commit 第一个版本,在这个基础上进行增删改查。因为使用 LLM 编写代码,最忌讳一口气用 LLM 实现太多功能,导致出现问题了积重难返身心俱疲。 103 | 104 | 每次在进行大规模改动或者是调整功能之前,一定要去使用 `Stage All Changes` 暂存改动,避免影响了本来已经实现的代码。 105 | 106 | 并且一定要做好功能拆分,克制克制再克制,只要实现一个功能就提交,不然牵一发而动全身,越改越乱。我已经在这上面吃亏太多次了。 107 | 108 | ### 2.3. 拆分模块 109 | 110 | 拿网站来举例,拆分模块就是抽样代码功能,比如在 page 中有两个部分:顶栏和内容区域,那么我们最好拆分出 `HeadBar.tsx` 专门负责顶栏的逻辑;然后在顶栏中有头像、主页按钮、logo 三部分,那么我就拆分出: `Avatar.tsx` 、 `HomeButton.tsx` 、 `Logo.tsx` ,分别负责自己组件的功能。 111 | 112 | 按照这个思路,还可以拆分功能逻辑,比如创建网络请求组件、路由调用切片、工厂模式组件等,不要看名字高大上听不懂,实际上这些都是 LLM 会在实现过程中自然呈现的逻辑,目的就是为了抽样代码,避免重复实现和方便统一管理。 113 | 114 | 尽可能保证每个文件只负责单独的模块功能,代码行数控制在 200 行以内。 115 | 116 | 不要嫌麻烦,创建文件不需要自己动手,直接让 LLM 帮你拆分实现,你点击 `Apply` 按钮它就会自动创建并填入代码。 117 | 118 | 这是一个非常重要的习惯,先执行,等回过头来你自然会意识到它的价值。 119 | 120 | ### 2.4. 创建新对话,精简上下文 121 | 122 | 上下文长度直接决定了 LLM 回答的质量。 123 | 124 | 为了最好的回答效果,我会尽可能的避免过长的对话内容,并且保证一次对话只解决一个问题,之后还可以通过回看对话历史来查缺补漏。 125 | 126 | 上面拆分模块也能极大的减少上下文,你只需要添加相关的代码,对话即可解决需求,而不需要每次携带多余的代码进行提问。 127 | 128 | 如果在一次对话中,一直没有解决问题,最好创建新对话,退后一步,让 LLM 从更多的角度去思考问题出现在哪,然后你再根据它的回答,依次提问尝试解决。 129 | 130 | 我在实现 telegram bot 的时候就遇到过无法启动机器人的情况,LLM 一直执着于解决时延和时序问题,但是在一次回答中它提到了可能是代理设置错误,我捕捉到了这个答案,并且马上尝试,果然解决了问题。 131 | 132 | ## 总结 133 | 134 | 不应该不使用 AI,而是不要让它代替你的思考过程。对于项目 / 任务 / 问题,你需要自己掌控,即,你要知道 AI 给你的回答正确与否而不是任由它生成。 135 | 136 | ## Reference 137 | 138 | - [我的Cursor使用心得——项目实现 - 开发调优 - LINUX DO](https://linux.do/t/topic/309516) 139 | - [2024科研反思](https://zhuanlan.zhihu.com/p/15876528874?utm_psn=1858160039874920448) 140 | -------------------------------------------------------------------------------- /docs/CS_Basic/15-213/CSAPP.md: -------------------------------------------------------------------------------- 1 | # 深入理解计算机系统 2 | 3 | ## 1 计算机系统漫游 4 | 5 | ## 2 信息的表示和处理 6 | 7 | - 把位组合再一起,再加上 interpretation 8 | - 三种重要的数字表示 9 | - unsigned 10 | - two's-complement 11 | - floating-point 12 | - overflow 13 | - 浮点数是近似的 14 | 15 | ### 2.1 信息存储 16 | 17 | - 1 byte = 8 bits 18 | - virtual memory 19 | - address 20 | - virtual address space 21 | - 讲存储器空间划分为更可管理的单元,来存放不同的 program object 22 | 23 | #### 2.1.1 十六进制表示法 24 | 25 | - 0x... 26 | 27 | #### 2.1.2 字数据大小 28 | 29 | - word size 30 | - nominal size 31 | - 字长决定的最重要的系统参数就是虚拟地址空间的最大大小 32 | - 字长为 $\displaystyle \omega$ 为的机器,虚拟地址的范围为 $\displaystyle 0\sim2^{\omega} - 1$ 33 | - 大多数 64 位机器可以运行 32 位机器编译的程序,即向后兼容 34 | ![QQ_1726230175376.png](https://cdn.jsdelivr.net/gh/WncFht/picture/202409132022695.png) 35 | - 为了避免大小和不同编译器设置带来的奇怪行为,我们有了 int 32_t 和 int 64_t 36 | - C 语言对声明的关键词顺序不敏感 37 | 38 | #### 2.1.3 寻址和字节顺序 39 | 40 | - [[计算机组成与设计硬件软件接口#^da8be4|小端编址]] 41 | - 就是右边放小的,要从右往左读 42 | - 字节顺序变得重要的三种情况 43 | - 网络应用程序的代码编写必须遵守已建立的关于字节顺序的规则 44 | - disassembler 45 | - 编写规避正常的类型系统的程序 46 | - cast or union in C 47 | - 对应用编程不推荐,但是对系统级编程是必需的 48 | 49 | ```C 50 | #include 51 | 52 | 53 | 54 | typedef unsigned char *byte_pointer; 55 | 56 | void show_bytes(byte_pointer start, size_t len) { 57 |   size_t i; 58 |   for (i = 0; i < len; i++) 59 |     printf(" %.2x", start[i]); 60 |   printf("\n"); 61 | } 62 | 63 | void show_int(int x) { show_bytes((byte_pointer)&x, sizeof(int)); } 64 | 65 | void show_float(float x) { show_bytes((byte_pointer)&x, sizeof(float)); } 66 | 67 | void show_pointer(void *x) { show_bytes((byte_pointer)&x, sizeof(void *)); } 68 | 69 | void test_show_bytes(int val) { 70 |   int ival = val; 71 |   float fval = (float)ival; 72 |   int *pval = &ival; 73 |   show_int(ival); 74 |   show_float(fval); 75 |   show_pointer(pval); 76 | } 77 | 78 | int main() { 79 |   int val = 12345; 80 |   test_show_bytes(val); 81 |   return 0; 82 | } 83 | ``` 84 | 85 | ```out 86 | 39 30 00 00 //小端法 87 | 00 e4 40 46 88 | 8c f6 bf ef b4 00 00 00 89 | ``` 90 | 91 | ![QQ_1727334977541.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727334977541.png) 92 | ![QQ_1727335105541.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727335105541.png) 93 | 94 | #### 2.1.4 表示字符串 95 | 96 | #### 2.1.5 表示代码 97 | 98 | - 二进制代码很少能在不同机器和操作系统组合之间移植 99 | 100 | #### 2.1.6 布尔代数简介 101 | 102 | ![QQ_1727335437470.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727335437470.png) 103 | 104 | - 可以扩展到位向量的运算 105 | - 布尔代数 106 | - Boolean ring 107 | - additive inverse 108 | - 和集合的对应 109 | 110 | #### 2.1.7 C 语言中的位级运算 111 | 112 | ![QQ_1727335854372.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727335854372.png) 113 | 114 | - 掩码运算 115 | 116 | #### 2.1.8 C 语言中的逻辑运算 117 | 118 | #### 2.1.9 C 语言中的移位运算 119 | 120 | - 逻辑右移 121 | - 算数右移 122 | - 实际上,几乎所有的编译器都对有符号数使用算术右移,而对于无符号数,右移必须是逻辑的(C 语言) 123 | - 而对于 Java `x>>k` 是算数右移, `x>>>k` 是逻辑右移 124 | - 对于 C 语言,移动 $\displaystyle k \text{ mod } \omega$ 125 | - 加减的优先级比移位算法要搞 126 | 127 | ### 2.2 整数表示 128 | 129 | ![QQ_1727336650579.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727336650579.png) 130 | 131 | #### 2.2.1 整型数据类型 132 | 133 | - 64 位和 32 位是不一样的 134 | ![QQ_1727336750563.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727336750563.png) 135 | ![](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727336774195.png) 136 | - 取值范围不是对称的 137 | ![QQ_1727336880439.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727336880439.png) 138 | - Java 只支持有符号数 139 | 140 | #### 2.2.2 无符号数的编码 141 | 142 | - 把向量写成二进制表示的数,就得到了无符号表示 143 | 144 | $$ 145 | B2U_w(\vec{x})\doteq\sum_{i=0}^{u-1}x_i2^i 146 | $$ 147 | 148 | $$ 149 | B2U_w:\{0, 1\}^w\to\{0, \cdots,2^w-1\} 150 | $$ 151 | 152 | - 无符号数编码的唯一性 153 | - $\displaystyle 函数B2U_w是一个双射。$ 154 | 155 | #### 2.2.3 补码编码 156 | 157 | - two's-complement 158 | - negative weight 159 | 160 | $$ 161 | B2T_w(\vec{x})\doteq- x_{w-1}2^{w-1}+\sum_{i=0}^{w-2}x_i2^i 162 | $$ 163 | 164 | $$ 165 | B2T_{w}\colon \{0, 1\}^{w}\to\langle TMin_{w}, \cdots, TMax_{w} \rangle 166 | $$ 167 | 168 | - 补码编码的唯一性 169 | - $\displaystyle 函数B2T_w是一个双射。$ 170 | ![QQ_1727337657191.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727337657191.png) 171 | 172 | - 反码 173 | 174 | $$ 175 | B2O_w(\vec{x})\doteq-x_{w-1}(2^{w-1}-1)+\sum_{i=0}^{w-2}x_i2^i 176 | $$ 177 | 178 | - 原码 179 | 180 | $$ 181 | B2S_w(\vec{x})\doteq(-1)^{x_{w-1}}\cdot\bigl(\sum_{i=0}^{w-2}x_i2^i\bigr) 182 | $$ 183 | 184 | - 对于数字 0 有两种不同的编码方式 185 | 186 | #### 2.2.4 有符号数和无符号数之间的转换 187 | 188 | - 保持位值不变,改变解释方式 189 | 190 | $$ 191 | T2U_{_w}(x)\doteq B2U_{_w}( T2B_{_w}(x) ) 192 | $$ 193 | 194 | - 补码转换为无符号数 195 | 196 | $$ 197 | T2U_w(x)=\begin{cases}x+2^w,&x<0\\x,&x\geqslant0\end{cases} 198 | $$ 199 | 200 | - 无符号数转换为补码 201 | 202 | $$ 203 | U2T_w(u)=\begin{cases}u ,&u\leqslant TMax_w\\u-2^w ,&u>TMax_w\end{cases} 204 | $$ 205 | 206 | ![QQ_1727339220305.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727339220305.png) 207 | 208 | #### 2.2.5 C 语言中的有符号数与无符号数 209 | 210 | - 一个运算符是有符号的而另一个是无符号的,那 C 程序会把有符号的转换为无符号的。 211 | ![QQ_1727339576272.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727339576272.png) 212 | 213 | #### 2.2.6 扩展一个数字的位表示 214 | 215 | - 无符号数的 zero extension 216 | - 补码数的符号扩展 217 | 218 | #### 2.2.7 截断数字 219 | 220 | #### 2.2.8 关于有符号数与无符号数的建议 221 | 222 | ### 2.3 整数运算 223 | 224 | #### 2.3.1 无符号加法 225 | 226 | - Lisp 支持无限精度的运算 227 | 228 | $$ 229 | x+_w^uy=\begin{cases}x+y,&x+y<2^w&\text{正常}\\x+y-2^w,&2^w\leqslant x+y<2^{w+1}&\text{溢出}\end{cases} 230 | $$ 231 | 232 | ![QQ_1727345703939.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727345703939.png) 233 | ![QQ_1727345777057.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727345777057.png) 234 | 235 | ## 3 程序的机器级表示 236 | 237 | ## 4 处理器体系结构 238 | 239 | ## 5 优化程序性能 240 | 241 | ## 6 存储器层次结构 242 | 243 | ## 7 链接 244 | 245 | ## 8 异常控制流 246 | 247 | ## 9 虚拟内存 248 | 249 | ## 10 系统级 I/O 250 | 251 | ## 11 网络编程 252 | 253 | ## 12 并发编程 254 | -------------------------------------------------------------------------------- /docs/CS_Basic/CS61A/CS61A.md: -------------------------------------------------------------------------------- 1 | # CS61A 2 | 3 | * [他人总结](https://github.com/ZlatanCN/UCB-CS61A-Fall-2020?tab=readme-ov-file) 4 | * https://github.com/HobbitQia/CS61A-Fall-2020/tree/main 5 | * [教材翻译版](https://composingprograms.netlify.app/) 6 | * [原教材](https://www.composingprograms.com/) 7 | * [课程网站存档](https://github.com/leejianping/cs61A-Spring2024) 8 | * https://github.com/shuo-liu16/CS61A 9 | * [scheme手册](https://wizardforcel.gitbooks.io/teach-yourself-scheme/content/index.html) -------------------------------------------------------------------------------- /docs/CS_Basic/Network/Security.md: -------------------------------------------------------------------------------- 1 | ## 常见的密码算法 2 | 3 | - 哈希算法(如MD5,SHA256) 4 | - 对称加密算法 (如AES,DES) 5 | - 非对称加密算法 (如RSA) 6 | 7 | [[加密原理]] 8 | 9 | ## 弱口令 10 | 11 | 1. 较短的密码 12 | 2. 易被猜测或信道攻击的密码 13 | - 风险 14 | - ssh中如果设置了password认证且设置弱口令,将会导致服务器被未经授权登录,且攻击者可以进行与你同权限的任意操作 15 | - 无线局域网中如果设置了弱口令被猜测成功后,攻击者将可以进入局域网中对局域网其他设备进行攻击 16 | - 防范方式 17 | - 采用其他更为安全的身份认证方法(如ssh中采用publickey认证) 18 | - 设置随机字符串作为密码,并且长度超过8位 19 | 20 | ## 公网 IP 21 | 22 | - 我们希望从任意接入互联网的地方使用ssh连接到服务器,一个简单的方法是让服务器拥有一个公网IP并运行sshd服务。 23 | - 常见的攻击方式 24 | 1. 扫描开放端口信息,并确定端口上运行的服务 25 | 2. 对可能存在的服务进行攻击,尝试利用服务的漏洞(如弱口令)获取服务器的访问权限 26 | - 常见的防范方式 27 | - 使用防火墙。配置防火墙规则,仅允许必要的服务和端口对外开放。 28 | - 审查开放的服务的安全性。确保当前主机开放的所有服务均是安全的。 29 | -------------------------------------------------------------------------------- /docs/CS_Basic/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: /material/book 3 | nostatistics: true 4 | comments: false 5 | --- 6 | 7 | # Computer Science Basic 8 | 9 | !!! note "Abstract" 10 | 11 | 本部分内容(除特别声明外)采用 [**署名-非商业性使用-保持一致 4.0 国际 (CC BY-NC-SA 4.0)**](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议进行许可。 12 | 13 | {{ BEGIN_TOC }} 14 | - "CS61A": 15 | - "Experience": CS61A/Exp 16 | - "Composing Programs": CS61A/Composing_Programs 17 | - "CS61C": 18 | - "计算机组成与设计硬件软件接口": CS61C/计算机组成与设计硬件软件接口 19 | - "Network": 20 | - "Security Basic": Network/Security 21 | - "15-213": 22 | - "CSAPP": 15-213/CSAPP 23 | - "C++": 24 | - "Accelerated C++": C++/Accelerated C++ 25 | - "C++ Basic": C++/C++ Basic 26 | {{ END_TOC }} -------------------------------------------------------------------------------- /docs/Links.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: /octicons/link-24 3 | comment: True 4 | glightbox: False 5 | nostatistics: true 6 | comments: false 7 | --- 8 | 9 | # 友链 10 | 11 | !!! abstract 12 | My friends! 13 | 14 | -------------------------------------------------------------------------------- /docs/Robot/calibration.md: -------------------------------------------------------------------------------- 1 | # Calibration 2 | 3 | - [GitHub - SHU-FLYMAN/CalibCamera: 基于张正友标定法的单目相机标定理论到实践](https://github.com/SHU-FLYMAN/CalibCamera/tree/master?tab=readme-ov-file) 4 | - [一文吃透相机标定(Camera calibration)-CSDN博客](https://blog.csdn.net/m0_60763146/article/details/139042404#:~:text=%E7%9B%B8%E6%9C%BA%E6%A0%87%E5%AE%9A%E6%96%B9%E6%B3%95%E6%9C%89%EF%BC%9A%E4%BC%A0%E7%BB%9F) 5 | - [最详细、最完整的相机标定讲解-CSDN博客](https://blog.csdn.net/a083614/article/details/78579163) 6 | - [相机标定(Camera calibration)原理、步骤\_视觉相机 示教目的-CSDN博客](https://blog.csdn.net/baidu_38172402/article/details/81949447) 7 | ![QQ_1727828014037.png](https://raw.githubusercontent.com/WncFht/picture/main/picture/QQ_1727828014037.png) 8 | 9 | [[2024_1_1]] -------------------------------------------------------------------------------- /docs/Robot/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: /material/book 3 | nostatistics: true 4 | comments: false 5 | --- 6 | 7 | # Robot 8 | 9 | !!! note "Abstract" 10 | 11 | 本部分内容(除特别声明外)采用 [**署名-非商业性使用-保持一致 4.0 国际 (CC BY-NC-SA 4.0)**](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议进行许可。 12 | 13 | {{ BEGIN_TOC }} 14 | - "软件": 15 | - 相机标定: calibration 16 | - 卡尔曼滤波: kalman 17 | - PnP 算法: pnp 18 | {{ END_TOC }} -------------------------------------------------------------------------------- /docs/Robot/kalman.md: -------------------------------------------------------------------------------- 1 | # 卡尔曼滤波 2 | 3 | ## 1 Why 4 | 5 | - 差分 6 | - 受噪声干扰大 7 | - 有延迟 8 | - 速度不连续(不能得到瞬时速度) 9 | 10 | ## 2 How 11 | 12 | ### 2.1 卡尔曼滤波 13 | 14 | - 合理地根据误差来推导,而不是直接忽视影响最终量 15 | - [无人驾驶技术入门(十三)| 手把手教你写卡尔曼滤波器 - 知乎](https://zhuanlan.zhihu.com/p/45238681) 16 | 17 | $$ 18 | \begin{array}{|c|}\hline\textbf{Prediction}\\\hline x^{'}=Ax+u\\P^{'}=APA^{T}+R\\\hline\textbf{Measurement update}\\\hline y=z-Cx^{'}\\S=CPC^{T}+Q\\K=PC^{T}S^{-1}\\x=x^{'}+Ky\\P=(I-KC)P\\\hline\end{array} 19 | $$ 20 | 21 | ```C++ 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | using namespace std; 33 | using namespace cv; 34 | using namespace Eigen; 35 | 36 | int main() { 37 | srand((unsigned int) time(NULL)); 38 | // generate data with noise 39 | const int N = 20; 40 | const double k = 2.5; 41 | Matrix noise = Matrix::Random(); 42 | Matrix data = Matrix::LinSpaced(0, k * (N - 1)); 43 | data += noise; 44 | std::cout << data << std::endl; 45 | // calculate speed 46 | const int Z_N = 1, X_N = 2; 47 | Matrix X; 48 | Matrix A; 49 | Matrix P; 50 | Matrix R; 51 | Matrix K; 52 | Matrix C; 53 | Matrix Q; 54 | 55 | X << data[0], 0; 56 | A << 1, 1, 0, 1; 57 | C << 1, 0; 58 | R << 2, 0, 0, 2; 59 | Q << 10; 60 | for (int i = 1; i < N; i++) { 61 | // 更新预测 62 | Matrix X_k = A * X; 63 | P = A * P * A.transpose() + R; 64 | // 更新观测 65 | K = P * C.transpose() * (C * P * C.transpose() + Q).inverse(); 66 | Matrix Z{data[i]}; 67 | X = X_k + K * (Z - C * X_k); 68 | P = (Matrix::Identity() - K * C) * P; 69 | std::cout << "step " << i << ": " << X[1] << std::endl; 70 | } 71 | std:cout << "final speed: " << X[1] << std::endl; 72 | return 0; 73 | } 74 | ``` 75 | 76 | ### 2.2 EKF 算法的实现 77 | 78 | ```C++ 79 | #include 80 | #include 81 | 82 | template 83 | class AdaptiveEKF { 84 | using MatrixXX = Eigen::Matrix; 85 | using MatrixYX = Eigen::Matrix; 86 | using MatrixXY = Eigen::Matrix; 87 | using MatrixYY = Eigen::Matrix; 88 | using VectorX = Eigen::Matrix; 89 | using VectorY = Eigen::Matrix; 90 | 91 | public: 92 | explicit AdaptiveEKF(const VectorX &X0 = VectorX::Zero()) 93 | : Xe(X0), P(MatrixXX::Identity()), Q(MatrixXX::Identity()), R(MatrixYY::Identity()) {} 94 | 95 | // 预测函数 96 | template 97 | VectorX predict(Func &&func) { 98 | calculateJacobian(Xe, func, Xp, F); 99 | P = F * P * F.transpose() + Q; 100 | return Xp; 101 | } 102 | 103 | // 更新函数 104 | template 105 | VectorX update(Func &&func, const VectorY &Y) { 106 | calculateJacobian(Xp, func, Yp, H); 107 | MatrixYY S = H * P * H.transpose() + R; // 创新协方差 108 | K = P * H.transpose() * S.inverse(); // 卡尔曼增益 109 | Xe = Xp + K * (Y - Yp); // 更新状态估计 110 | P = (MatrixXX::Identity() - K * H) * P; // 更新状态协方差 111 | return Xe; 112 | } 113 | 114 | private: 115 | // 计算雅克比矩阵的辅助函数 116 | template 117 | void calculateJacobian(const Eigen::Matrix &input, Func &&func, Eigen::Matrix &output, Eigen::Matrix &jacobian) { 118 | ceres::Jet input_auto_jet[N_IN]; 119 | for (int i = 0; i < N_IN; i++) { 120 | input_auto_jet[i].a = input[i]; 121 | input_auto_jet[i].v[i] = 1; 122 | } 123 | ceres::Jet output_auto_jet[N_OUT]; 124 | func(input_auto_jet, output_auto_jet); 125 | for (int i = 0; i < N_OUT; i++) { 126 | output[i] = output_auto_jet[i].a; 127 | jacobian.block(i, 0, 1, N_IN) = output_auto_jet[i].v.transpose(); 128 | } 129 | } 130 | 131 | public: 132 | VectorX Xe; // 估计状态变量 133 | VectorX Xp; // 预测状态变量 134 | MatrixXX F; // 预测雅克比矩阵 135 | MatrixYX H; // 观测雅克比矩阵 136 | MatrixXX P; // 状态协方差 137 | MatrixXX Q; // 预测过程协方差 138 | MatrixYY R; // 观测过程协方差 139 | MatrixXY K; // 卡尔曼增益 140 | VectorY Yp; // 预测观测量 141 | }; 142 | ``` 143 | 144 | ### 2.3 非线性优化 145 | 146 | TODO 147 | 148 | ## 一些资料 149 | 150 | - [zhuanlan.zhihu.com/p/45238681](https://zhuanlan.zhihu.com/p/45238681) 151 | - [卡尔曼滤波(Kalman Filter)概念介绍及详细公式推导-CSDN博客](https://blog.csdn.net/qq_37214693/article/details/130927283) 152 | - 调节误差矩阵的实际意义 153 | - 非线性拓展 154 | - 自适应优化 155 | - 作业中有一个天体运动的例子 156 | -------------------------------------------------------------------------------- /docs/Robot/pnp.md: -------------------------------------------------------------------------------- 1 | # pnp 2 | 3 | - 已知 4 | - 目标物体特定点的像素坐标 5 | - 目标物体特定点的真实尺寸 6 | - 相机内参 7 | - 求 8 | - 目标物体在相机坐标系下的 6d pose 9 | 10 | 像素坐标和物体坐标的对点 11 | 但是一般只用 t, 因为 R 的精度不够高 12 | [Fetching Title#g70i](https://docs.opencv.org/3.4/d5/d1f/calib3d_solvePnP.html) 13 | 14 | ![[Pasted image 20241008201602.png]] 15 | 16 | ```C++ 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | using namespace cv; 23 | 24 | bool findCorners(const cv::Mat &src, std::vector &corners) { 25 | std::vector pts; 26 | corners.clear(); 27 | bool flag = cv::findChessboardCorners(src, {9, 6}, pts); 28 | if (!flag) 29 | return false; 30 | corners.push_back(pts[0]); 31 | corners.push_back(pts[9 - 1]); 32 | corners.push_back(pts[pts.size() - 9]); 33 | corners.push_back(pts[pts.size() - 1]); 34 | return true; 35 | } 36 | 37 | int main() { 38 | cv::Mat src; 39 | cv::Mat camera_matrix; 40 | cv::Mat distort_matrix; 41 | cv::FileStorage reader(PROJECT_DIR"/parameter.txt", cv::FileStorage::READ); 42 | reader["C"] >> camera_matrix; 43 | reader["D"] >> distort_matrix; 44 | 45 | for (int i = 0; i <= 40; i++) { 46 | src = imread(std::__cxx11::to_string(i).append(".jpg")); 47 | std::vector corners; 48 | bool flag = findCorners(src, corners); 49 | imshow("Opencv Demo", src); 50 | cv::waitKey(100); 51 | if (flag == false) { 52 | std::cout << "failed to find all corners\n"; 53 | continue; 54 | } 55 | std::vector dst; 56 | dst.push_back({0, 0, 0}); 57 | dst.push_back({8 * 1, 0, 0}); 58 | dst.push_back({0, 5 * 1, 0}); 59 | dst.push_back({8 * 1, 5 * 1, 0}); 60 | cv::Mat rvec, tvec; 61 | cv::solvePnP(dst, corners, camera_matrix, distort_matrix, rvec, tvec); 62 | std::cout << "t:" << std::endl << -tvec << std::endl << std::endl; 63 | cv::Mat drawer; 64 | drawer = src.clone(); 65 | for (int j = 0; j < 4; j++) 66 | cv::circle(drawer, corners[j], 2, {0, 255, 0}, 2); 67 | cv::imshow("corners", drawer); 68 | cv::waitKey(5); 69 | } 70 | return 0; 71 | } 72 | ``` 73 | -------------------------------------------------------------------------------- /docs/Summaries/2024/weekly/2024-W51-12.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2024-W51-12 3 | tags: 4 | - 周记 5 | categories: dairy 6 | date: 2024-12-16T12:06:32+08:00 7 | modify: 2024-12-16T12:06:32+08:00 8 | dir: dairy 9 | share: false 10 | cdate: 2024-12-16 11 | mdate: 2024-12-16 12 | --- 13 | 14 | # 2024-W51-12 15 | 16 | ## Review 17 | 18 | - 期末周,考了高数,化学,近现代史,计算机导论。 19 | - 一天学一门速通。说实话这个学期没去上过课,作业也没写过(高数 + 化学),平时 RC 也不看。全靠期末一天/半天补天,速刷 Big RC 然后有题做题,没题看 Regular RC,再看看 sample exam。 20 | - 考出来结果感觉还行,但是可能有两门要卡绩了。希望都能给我到 A 吧。 21 | - 虽然但是,感觉大家确实都挺 curve 的。本来以为可能 A 还是没有很大的问题,但是现在可能要有两门 A- 了,也是有点难受。 22 | - 大概原因是,一点作业没做,期末冲刺的时候不够认真。同时忘记复习期中之前的知识了,导致错了好一些。 23 | - 第二个原因是,虽然很多确实会算,但是完成度没有那么高,以及自己懒的去算,导致考试的时候就没有算对了。 24 | - 第三个原因是,就是很摆烂啊,考试周了还不想复习。 25 | - 不过也还行,没有花很多时间在卷绩点上面,下个学期打算平时再少一点,然后复习的时候更有针对性一点。努力提升提升绩点,以免以后要用的时候没有。 26 | - 读论文 27 | - [\[2103.00020\] Learning Transferable Visual Models From Natural Language Supervision](https://ar5iv.labs.arxiv.org/html/2103.00020?_immersive_translate_auto_translate=1) 28 | - [\[2212.02710\] Beyond Object Recognition: A New Benchmark towards Object Concept Learning](https://ar5iv.labs.arxiv.org/html/2212.02710?_immersive_translate_auto_translate=1) 29 | - [\[2303.15343\] Sigmoid Loss for Language Image Pre-Training](https://arxiv.org/abs/2303.15343) 30 | - 有意思,但是感觉自己读的慢慢的,而且相关知识似乎不太多。而且 transformer 之后的模型不是很熟悉,打算把李沐的读论文那个系列都去看看,多读读论文。 31 | - 配了配环境,稍微写了一些代码,但是感觉调试应该还要好几天才能完成。 32 | - 完善了 obsidian 的配置文章,[在这里](https://wncfht.github.io/notes/Environment/obsidian_setup/) 33 | - 顺便用 tag 重构了 obsidian,放弃了树状文件夹的方案。 34 | - 写了写寒假计划 35 | - 配置了一点 zotero,但是还是不太会用现在,慢慢熟练吧。 36 | - 建了一个分享交流的群, QQ 群号是:1011394397,欢迎加入。 37 | 38 | ## Next Week Plan 39 | 40 | - [ ] 完成推理实验 41 | - [ ] 看点论文(不过这个也太模糊了) 42 | - [ ] 学完 CS61C 43 | - [ ] 做 6.s081 的规划 44 | - [ ] 学会使用 zotero 45 | 46 | ## Time Line 47 | 48 | - 无,以后用时间日志做了,不用 Day Planner 49 | 50 | ## THOUGHTS 51 | 52 | - 还是很难 balance 很多事情,选择性放弃吧,更何况我还菜菜的,平时肯定会摆摆烂。 53 | -------------------------------------------------------------------------------- /docs/Summaries/2024/weekly/2024-W52-12.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2024-W52-12 3 | tags: 4 | - 周记 5 | categories: dairy 6 | date: 2024-12-23T12:06:20+08:00 7 | modify: 2024-12-23T12:06:20+08:00 8 | dir: dairy 9 | share: false 10 | cdate: 2024-12-23 11 | mdate: 2024-12-23 12 | --- 13 | 14 | # 2024-W52-12 15 | 16 | ## Review 17 | 18 | ### Completed 19 | 20 | - [x] 完成推理实验 21 | - 终于搞完 cs231n,然后做了个[小任务](https://github.com/WncFht/OCL_lab),就开始帮学长干活了。 22 | - [x] 学会使用 [[zotero_使用指南]] 23 | - [x] 联系高中老师 24 | - 把之前高中学习经验的东西从博客中移出了,另外建了一个[网站](https://wncfht.github.io/SurviveTYGXManual/)。 25 | - 顺便邀请了一些高中同学分享分享经验 26 | - 之后大概会返校宣讲,分享一些学习经验 / 三一啊啥的。🤔,~~我也成学长了~~。 27 | - [x] 读论文,建立了一些基本概念 28 | - 写了一些笔记,比如 29 | - [[ULIP-2]] 30 | - [[CLIP]] 31 | - [OCRN](../../../Blogs/posts/OCRN.md) 32 | - [[SigLIP]] 33 | - 看了一下李沐读论文的系列 34 | - 包括 Transformer, CLIP, CLIP 之后的工作串讲上下,多模态串讲上下 35 | - 看了一部分的 GAMES 003,讲的很不错 36 | - [x] 稍微运营了一下交流群 37 | - [x] 修复了一下博客 38 | - 现在博客可以完整地支持 obsidian 的双链和 callout 了 39 | 40 | ### Uncompleted 41 | 42 | - [ ] 学完 CS61C 43 | - 忙不过来,甚至都还没捡起来 44 | - [ ] 规划 6.s081 学习 45 | - 忙不过来捏,而且感觉最近的重心在科研上,打算把领域内的论文看的差不多了,再来打系统方面的基础。 46 | 47 | ## Next Week Plan 48 | 49 | - [ ] 学习 CS61C,目前是学到第 6 个 lab,希望一个星期能学完剩下的。 50 | - [ ] 看完李沐读论文的系列,然后下载论文做笔记,串联自己的知识图谱。 51 | - [ ] 着手实验室工作。 52 | 53 | ## THOUGHTS 54 | 55 | - 感觉自己的大一上还是处在东玩玩西玩玩的状态,弄了不少跟以后方向不太有关的东西。趁寒假有空,早点想清楚想干什么吧。 56 | - 欸,还是引用一段话来的贴切 57 | 58 | > [!quote]+ 59 | > 其实归根结底,问题还是大多数人(包括我自己),最初根本想不清楚自己最后要干啥,做了好多无意义的事情。比如选一些无意义但难的课,(比如数分系列,如果不是真心喜欢数学千万别选),大创,学一些非 cs 的选修课,给一些水实验室打工等。刚上大学,都觉得自己有无穷的可能性,不屑于在写代码这一条路上吊死。诚然,有些人啥都搞还啥都能搞好,但是作为一个普通人,还是要认清自己能力的范围和最后的目标。看别人去社团,自己也想去凑凑,看别人做科研,自己也想搞搞;可是这样搞来搞去,发现曾经不屑于干的事情,现在连干的资格都没有,这时再后悔已经为时已晚。将来发展的方向还是越早想明白越好。 60 | 61 | - 我想我自己绝对称不上努力,甚至很难说在追逐喜欢的东西,只不过感觉‘欸,干这个也还不错,那就这样吧’。最近确实认识到很多优秀的学长,他们要么是去 MSRA 实习,然后在科研的道路上越走越远;要么是一手抓后端,一手抓系统,去了量化赚米。 62 | 63 | > [!failure] 64 | > 也许,我真的是缺乏 all in 的勇气吧。 65 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W01-12.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W01-12 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: "2024-12-30T13:07:32+08:00" 7 | modify: "2024-12-30T13:07:32+08:00" 8 | dir: dairy 9 | share: false 10 | cdate: "2024-12-30" 11 | mdate: " 2024-12-30 " 12 | --- 13 | 14 | # 2025-W01-12 15 | 16 | ## Review 17 | 18 | ### Completed 19 | 20 | - [x] 着手实验室工作。 21 | - [x] 形策考试 22 | - [x] 读三维重建方向的论文 + 复现。 23 | - 大概复现代码了的有 FreeSplatter,3DGS,2DGS, TrimGS, GOF, QGS 等。 24 | - 发布了一些复现经历在博客,更多的内容和复现过程搭建的 utils + 注意点上传到了 GitHub。 25 | - 读了 3DGS 的代码框架,搞清楚了 colmap blender 等数据集,然后就是一直跑训练。 26 | - 大致复现完了 3DGS 在小规模物体重建 + 导出格式为 mesh 这个领域的所有文章。 27 | - 倒是给一个刚 push 的仓库提了个 PR,不知道能不能被 merge ( 28 | - [x] 有意思的是,星期天又去复现了一下 [GitHub - IDEA-Research/Grounded-SAM-2: Grounded SAM 2: Ground and Track Anything in Videos with Grounding DINO, Florence-2 and SAM 2](https://github.com/IDEA-Research/Grounded-SAM-2) 的代码,基于它搭建了一个自动分割预处理数据的 pipeline。 29 | - [x] 第一次开组会。 30 | - [x] 配置了 roo cline + Deepseek v3 api 的工具链,比 web 的 ai 确实要强大很多,价格也便宜。 31 | - [x] 形策考试 32 | - [x] 查了下 GPA,貌似排名十几名。难崩的学术写作,卡绩到 A。 33 | - [x] 熟练使用了时间日志,日均睡眠 9h+,学习 9h+。 34 | 35 | ### Uncompleted 36 | 37 | - [ ] 学习 CS61C,目前是学到第 6 个 lab,希望一个星期能学完剩下的。 38 | - 完全没有学习,重新安排了学习的内容,打算先把 AI 领域的基础学的差不多,在学 Infra 相关的。 39 | - [ ] 看完李沐读论文的系列,然后下载论文做笔记,串联自己的知识图谱。 40 | - 看了 GPT 系列,剩下的还没看,用到了再去看。 41 | 42 | ## Next Week Plan 43 | 44 | - [ ] 读论文。 45 | - [ ] 做实验室的工作,规范实验流程。 46 | - [ ] 调整作息,脱离使用时间日志。 47 | - [ ] 学习使用 notion,which 貌似比 obsidian 更适合用来记录实验数据一些内容。 48 | - [ ] 学习 NLP 领域相关基础知识,继续去复现一些代码和结构。 49 | - [ ] 搭建 AI 领域的大致框架(框定学习的计划) 50 | 51 | ## THOUGHTS 52 | 53 | - 这周倒也算是科研初体验了,几乎一直都在复现论文 <-> 找论文的循环中。然后复现过程中难免遇到 bug,就在 issues / google / chatgpt 之间反复。虽然写了读了不少代码,但是并没有感觉到很多的提升,不过倒是进一步提升了配环境的能力(bushi)。 54 | - 感觉自己还是不太会读论文(很难一下子抓住重点),感觉有些不看代码,就不知道它的具体情况。毕竟这个星期也没有读很多论文,以后要加强这一块。 55 | - 突然有点不太想读博(笑死了,晚上 12 点学长还在回消息)。 56 | - 有点累,但是静心工作可以抛去很多不想管的事情,放平心态。Anyway,新年快乐。 57 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W02-01.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W02-01 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: 2025-01-06T18:04:24+08:00 7 | modify: 2025-01-06T18:04:24+08:00 8 | dir: dairy 9 | share: false 10 | cdate: 2025-01-06 11 | mdate: " 2025-01-06 " 12 | --- 13 | 14 | # 2025-W02-01 15 | 16 | ## Review 17 | 18 | ### Completed 19 | 20 | - [x] 实验室打工 21 | - 换了 pipeline 中的一个步骤,效果变好了很多,然后就造了几天的数据。 22 | - 感觉一小部分的工作差不多,然后要开始训练了? 23 | - [x] 学了点 RL 24 | - 其实感觉还是挺有意思的,多臂老虎机,MCTS 搜索,然后看着别人的仓库写了个 [alpha zero](https://github.com/WncFht/alpha_zero)。 25 | - 去了解了一下 DPO, 看了点视频,也挺有意思的。 26 | - [x] 捡起来 CS61C 27 | - 星期六心情不好,然后 emo 了一整天,晚上想了想,感觉还是要把基础的学了,就回去继续做 CS61C 了。 28 | - 还是挺有意思的,看了 4 个 lecture,做了 2 个 lab,把 proj3 做了。 29 | - proj3 造了个基于 RISC-V 的 cpu,最后写了个二级流水线,就处理了一下跳转语句的 hazard(还是最 low 的,就搞点 bubble 就好了。本来还以为会有 forwarding 之类的)。但是确实,搭线累的一批,对指令也是熟悉了一点。 30 | - 几个 lab 就是主要是为 proj 铺垫的一些用来熟悉 logisim 的,和一些关于 cache 的知识:block_size,TIOl,LRU,associativity 之类的,不得不说 61C 老师是真有激情。中间去听了 15-213 的讲 cache 的,直接就把这些概念扔出来了,感觉不如 61C 讲得好。 31 | - [x] 跟着 Andrej Karpathy 写了个 mirograd 32 | - 大概就是写个 mini pytorch,不过只能支持一些四则运算/指数啥的,主要就是 chain rule 的运用。 33 | - 但是讲得真好啊,一层一层展开,他的代码能力也是很强,信手拈来很多实现。感觉对代码实现的理解更细致了一些。 34 | 35 | ### Uncompleted 36 | 37 | - [ ] 调整作息 38 | - 基本每天还是睡的晚,焦虑,迷茫。 39 | - [ ] 看论文 40 | - 没怎么看,主要是没有方向。最近还是先学学传统 CS 吧。 41 | 42 | ## Next Week Plan 43 | 44 | - [ ] 也许继续学 CS61C,也许学 15-213, 也许去看 OSTEP 然后开 081 了。没想好。 45 | - [ ] 写个简单的 GPT2 ?主要是整理以前学过的知识。 46 | - [ ] 继续学 RL,然后读读 RLHF 的工作,看看 DPO 具体实现。 47 | - [ ] 实验室打工,估计下个星期工作量不会小。 48 | - [ ] 回高中宣讲。 49 | 50 | ## THOUGHTS 51 | 52 | - emo,感觉那条路都不好走。想到如果要做大模型就要有卡,然后就要去实习。然后 GPA 就不保,学校这里没用的课还好多,还要签到。 53 | - 感觉基本一直都是一个人在路上,东搞搞西搞搞。🤣,大概我太封闭了。 54 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W03-01.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W03-01 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: "2025-01-13T18:41:02+08:00" 7 | modify: "2025-01-13T18:41:02+08:00" 8 | dir: dairy 9 | share: false 10 | cdate: "2025-01-13" 11 | mdate: " 2025-01-13 " 12 | --- 13 | 14 | # 2025-W03-01 15 | 16 | ## Review 17 | 18 | ### Completed 19 | 20 | - [x] 回高中宣讲 21 | - 高中真是乌托邦。 22 | - [x] survey 了一下触觉模态相关的论文,有点意思,不过感觉除了几个造传感器的,剩下的论文都挺水的,拿网络来数据上跑几个结果,然后对齐一下模态就结束了。 23 | - 有篇 NeRF + Tactile 的倒有点意思 24 | - [\[2405.04534\] Tactile-Augmented Radiance Fields](https://arxiv.org/abs/2405.04534) 25 | - [x] 实验室打工 26 | - 这周前几天琢磨怎么写标定工具,看了一圈感觉没有现成的可以用。然后写了个还不能用的,不过有点思路。下周继续搞。顺便看了看对标论文的代码,还算简单,明天估计写个代码分析。不过数据集下载很困难,dropbox 速度贼慢,网上查了一圈也没有好办法。 27 | - [x] 学了点 OS 28 | - 其实就是看 OSTEP,把虚拟化部分 (PART1) 看完了,有点意思吧。 29 | - 不过这周实在比较摆烂,所以只是配好了 6.s081 的环境,还没开始做 lab。 30 | - 顺便把 Ubuntu 修了修。 31 | - [x] 整理了一下 LLM 岗位需要的技术栈,但是还没有开始学。 32 | - ~~顺便混了几个社群~~ 33 | - 打算寒假剩下来的时间把 081 写完,然后兼顾实验室的工作,继续学点 LLM 技术。 34 | - [x] 美化 Obsidian, Vscode, Pwsh 35 | - 不务正业,其实只是有一天心情不好,然后把工作流都美化了个遍,好看,贴几张图片。 36 | - ![QQ_1737284019307.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1737284019307.png) 37 | - ![QQ_1737284153204.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1737284153204.png) 38 | - ![QQ_1737284225870.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1737284225870.png) 39 | - ![QQ_1737284264050.png](https://raw.githubusercontent.com/WncFht/picture/main/QQ_1737284264050.png) 40 | - [x] 顺便清理了一下电脑,把 solidwork, Keil 啥的都删了。 41 | - 原来我大一上都在搞这些( 42 | - [x] 不过倒是天天去打乒乓球了,感觉身体好了不少 43 | 44 | ### Uncompleted 45 | 46 | - [ ] 没有来得及复现 GPT2 呢 47 | - 其实还是挺想做这个的,但是这周心情不好,本来又懒,就没有动。下周一定。 48 | - [ ] 没做 081 49 | - 上面说过了 50 | - [ ] 实质性的知识没学多少,这周主要还是在了解信息。 51 | 52 | ## Next Week Plan 53 | 54 | - [ ] 实验室打工,跑完实验,做完标注工具。 55 | - [ ] 貌似要美赛了。 56 | - [ ] 学 OS !爽学! 57 | - 看 OSTEP,做 081 58 | - [ ] 学 LLM !爽学! 59 | - 照着面经学,看看能不能搞个项目做做。GPT2 肯定写掉。 60 | - [ ] 继续搜集信息,看看要不要出国,想好路怎么走。 61 | - [ ] 运动运动,调整作息。 62 | 63 | ## THOUGHTS 64 | 65 | - 欸,回高中是真物是人非。不过看这下一届,感觉也不像高考能考好的样子(。珍惜最后的高中时光吧。 66 | - 感觉自己还是不够 self-motivated,每天都摆烂,迷茫。感觉一直给自己找借口不学习,明明不是说觉得没有意思。可能是没有一个粒度比较大的规划(比如一个星期 / 半个月这种长度的)。日记最近写的也少。 67 | - 所以,出国的利弊是什么呢。 68 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W04-01.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W04-01 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: "2025-01-20T18:38:46+08:00" 7 | modify: "2025-01-20T18:38:46+08:00" 8 | dir: dairy 9 | share: false 10 | cdate: "2025-01-20" 11 | mdate: " 2025-01-20 " 12 | --- 13 | 14 | # 2025-W04-01 15 | 16 | ## Review 17 | 18 | ### Completed 19 | 20 | - [x] 用 gradio 写了个标注工具,不过感觉 gradio 的自带加载点云的组件有点垃圾,点云一多就加载不出来了。 21 | - [x] 跟着 Andrej Karpathy 复现了 GPT2。 22 | - 讲的很好,范围很广,从如何并行到如何优化、如何评测都有讲 23 | - [x] 看 jyy os,看到了并行的一半 24 | - 我看公开课以来感觉看到最有意思的课程。 25 | - jyy 从数学 / PL / 软工的角度讲 OS,整个流程都是贯通的。每个部分都有可以运行的小代码。 26 | - [x] 美赛 27 | - 感觉在吃屎,不过倒是过了一遍一堆乱七八糟的机器学习方法和一些统计学的东西。 28 | - [x] 写了一个 mkdocs 支持双链的插件,并发布了。~~欢迎 star~~ 29 | - [GitHub - WncFht/mkdocs-bi-directional-links](https://github.com/WncFht/mkdocs-bi-directional-links) 30 | - [x] 确定了不再转专业 31 | - 认识了一些其他专业的同学。 32 | - [x] 尝试其他笔记软件(飞书,notion,思源笔记) 33 | - 飞书和 notion 都感觉卡顿,比不上 obsidian 的编辑体验。 34 | - 感觉思源笔记做的还不错?但是有点过于臃肿了。(貌似还是学长写的) 35 | 36 | ### Uncompleted 37 | 38 | - [ ] 还没开始做 081 39 | - [ ] 还没怎么学 LLM,打算还是先学点基础课程比较好。 40 | 41 | ## Next Week Plan 42 | 43 | - [ ] 看 OSTEP 和 jyy os,做 081 44 | - [ ] 实验室处理数据,跑基础实验 45 | - [ ] 过大年 46 | - [ ] 调整作息,回归学习状态 47 | 48 | ## THOUGHTS 49 | 50 | - 读书还是能够让自己提升的道路之一,虽然在学校里学不到大厂中的工作流程,但是在大厂做了几年以后到了上限就要跳槽了。读博可能可以在经济下行的这段时间当作保价和相对稳定的道路。 51 | - 还是开心就好,做自己想做的事情往往是在自己的评价体系中的最优解。 52 | - 还是很难接触到很多领域 / 不同年龄的人,可能要主动 reach out。 53 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W05-01.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W05-01 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: "2025-01-27T20:19:54+08:00" 7 | modify: "2025-01-27T20:19:54+08:00" 8 | dir: dairy 9 | share: false 10 | cdate: "2025-01-27" 11 | mdate: " 2025-01-27 " 12 | --- 13 | 14 | # 2025-W05-01 15 | 16 | ## Review 17 | 18 | ### Completed 19 | 20 | - [x] 切换了输入法,用小鹤双拼。有点不太熟练,但是确实少了击键次数。 21 | - [x] 看完了 jyy OS 并行的部分 22 | - [x] 写了 cs6.s081 的 util 和 syscall lab 23 | - 熟练了 `gdb` , `vim` 的使用 24 | - [x] 彻底切换到 Ubuntu 25 | - 配环境 26 | - zsh 27 | - neovim 28 | - terminal 29 | - vpn 30 | - picgo 31 | - 把桌面换成了 KDE, 顺便美化了一下。 32 | - [x] 重新使用时间日志,加强对时间管理的掌控。 33 | - [x] 过年,🐖,休息,玩。 34 | - [x] 写了篇关于笔记软件的文章 35 | - [[notes_software]] 36 | - [x] 每天运动 😼 37 | 38 | ``` 39 | # 测试一下 icon 40 |  build  docs  overrides  environment.yml  mkdocs.yml  README.md  requirements.txt 41 | ``` 42 | 43 | ### Uncompleted 44 | 45 | - [ ] OS 推进太慢了,马上都要开学了 46 | 47 | ## Next Week Plan 48 | 49 | - [ ] 把 jyy OS + OSTEP 看完 50 | - [ ] 再写 4 ~ 5 个 lab 51 | - [ ] 调整作息 😾 这三个星期效率都很低 52 | 53 | ## THOUGHTS 54 | 55 | - 学!不能再摆烂了。 56 | - 记录过程。 57 | - 打好基础。 58 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W08-02.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W08-02 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: "2025-02-17T23:47:59+08:00" 7 | modify: "2025-02-17T23:47:59+08:00" 8 | dir: dairy 9 | share: false 10 | cdate: "2025-02-17" 11 | mdate: " 2025-02-17 " 12 | --- 13 | 14 | # 2025-W08-02 15 | 16 | ## Review 17 | 18 | #### Part Segmentation 19 | 20 | - 复现了 Part123, SAMPart3D。 21 | 22 | #### ImagetoPoint Registration and 6Dpose 23 | 24 | - 复现了 Freereg 25 | - 感觉这方面工作真少,都数的过来 26 | - CorrI2P 27 | - DeepI2P 28 | - FreeReg 29 | - Colmap PCD 30 | 31 | #### Point Cloud Classification 32 | 33 | - 复现了 Ulip, PointBert, PointGST。 34 | 35 | #### OS 36 | 37 | - jyy OS 终于看完了。不过,25 年的又出了,打算二刷。 38 | - 做了 081 syscall lab, 卡在 pgtb lab。打算周末写一个 xv6 源码分析。 39 | - 看了看 xv6 book 40 | 41 | #### 杂活 42 | 43 | - 给笔记本装了 arch, 发了个 [[Arch_setup]] 的文章 44 | 45 | #### 上课 46 | 47 | - 上鸡毛。没平衡好,天天上课。 48 | 49 | ## Next Week Plan 50 | 51 | - 全力 081,写完 lab。 52 | - 开始看 CS168 的视频,每天看一两个。 53 | - 学一些 generation 方面的东西,详细读读 part segmentation 的代码,看看怎么拿过来改编。 54 | - 规律作息。 55 | 56 | ## THOUGHTS 57 | 58 | - 由于学校天天上没用的东西,导致到晚上的负罪感爆棚,然后就开始爽写代码,但是整体的效率和产出仍然不能维持在预期水平。 59 | - 同时,由于晚上的晚睡,导致早上的晚起。估计一下,其实总体的睡眠时间是不太变的。所以之后还是固定时间睡觉,固定时间吃饭比较好。一方面身体健康,另一方面,不用花更多的精力在思考什么时候去干这些事上面。 60 | - 还是不要焦虑,一步一步来,该学明白的还是要学明白。比如说,OS, compiler, Network, Distributed, Database, 软件分析。要说多,也不多。经典的东西都沉淀那么久了,学一学也很难被迭代。反而感觉最近做的一些复现的东西,不太具有长远的价值。 61 | - 另外就是,要想想怎么实现对每一步的记录,方便后续复盘和回顾。包括但不限于 62 | - 日常的时间管理 63 | - 实验和学习的记录 64 | - 笔记的整理 65 | - 接触到信息的收纳 66 | - 期望达到的目标是能够在做一门课之前就 plan 好时间且与实际没有大差别 67 | - 能够定时完成 plan 的东西且有良好的记录 68 | - 能够形成不断可被完善的笔记体系和知识图谱,可以不断的迭代更新补充 69 | - 可以不断认识自己的能力界限,知道自己的长处,知道自己什么不会,什么会,程度。对现状和问题有更强的掌控。比如说:我知道我现在不清楚 Deepseek 的细节,但是我知道一个下午就能看明白论文这个程度。 70 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W10-03.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W10-03 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: "2025-03-03T16:10:52+08:00" 7 | modify: "2025-03-03T16:10:52+08:00" 8 | dir: dairy 9 | share: false 10 | cdate: "2025-03-03" 11 | mdate: " 2025-03-03 " 12 | --- 13 | 14 | # 2025-W10-03 15 | 16 | ## Review 17 | 18 | - 入门了 Agent/RAG,读了 smolagent 和 openmanus 的源码。 19 | - 读了 LangChain 的博客和一些文档 20 | - 重构实验室的代码,已经一个文件 1000+ 行,不是很好维护了。 21 | - 搭建了 [[cursor Cheat Sheet]],尝试大量使用 agent 进行工作。帮助同学几个小时内从零搭出一个可用的 RAG based on LLM。 22 | - 尝试用 Lagrange.onebot 搭建一个 QQ bot, 但是失败了。不是很懂 go / Java / C# 这边的东西,也许之后有空去学学框架。 23 | - 使用了 [[zotero Cheat Sheet]],很好的同步。 24 | - 尝试使用之前放弃的 RSS,筛选信息输入,防止信息过载。 25 | - 看了一段时间的面经,东西很多,很多不会的。 26 | - 接下来打算学学 RL 方面的东西 27 | - 大概会先看一些技术文章 28 | - 读 openRLHF 源码 29 | - 复现一个 reasoning model 30 | - 自己实现 LLM 全流程 dataset preprocess -> pretrain -> posttrain -> application 31 | - 总结自己的知识体系,学习各大模型的区别和技术文档,GPT / Bert -> Qwen / LLaMA / Coder -> DeepSeek V3 -> DeepSeek R1 / o1 32 | - 学习量化等 infra 方面的东西,先了解了解。 33 | - 优先级比较低的: 34 | - 总结 RAG / Agent 方向资料,写一些教程,出一个项目。 35 | - 总结实现过的小玩意,写点文档进行封装。 36 | - 公开课没怎么看,之前本来要刷的 net 和 DB 更是一点没时间推进。 37 | 38 | ## Next Week Plan 39 | 40 | - 上课 / 实验室 / 其他 41 | - 好像要写个 GSoC 的 proposal,再看看再说。 42 | - 继续读读 smolagent 源码,提取优点,同时自己做一些优化和想法试验 43 | - 读 agent / RAG 论文 44 | - 熟悉 claude / openai api 调用 45 | 46 | ## THOUGHTS 47 | 48 | - 自己最近还是太摆烂了。被学校的东西拖的没时间搞自己的东西。总的来说还是自己难以 plan -> do。比如说学术写作,自己就一直拖着不想去做,然后又不怎么去干别的事情。一方面实验室这边确实感觉做的活不是很 solid,提不起兴趣,另一方面最近作息也不是很好->便很多时候难以利用所有时间。当然不是说要分毫必争, 只是说这样就会觉得自己状态不好,然后整体利用率就一直下滑。根本原因还是作息的问题。 49 | - 虽然确实有很多很多没学的,但自己也一点危机感没有,平日里搞搞这个,看看那个。在过一个多月这个学期就结束了,总不能什么都没干吧。最好等 summer 之前能抽空把 hot 100 写了。 50 | - 真有那么多时间吗?🤕 51 | - Agent 估计 25 年还是可以发展不少的。 52 | - 小模型的逐渐成熟,使得调用成本下降。 -> 试错成本下降 53 | - 基本的 reasoning 功能逐渐成熟 -> planning 54 | - MCP 协议逐渐普及 -> tool calling 逐渐强大,其实主要也就是 database / web server / terminal 55 | - 不过感觉 memory 还有待做文章,现在的 long-term memory 和 shot-term memory 感觉并不是那么好。 56 | - 以及很多用户体验上都需要改进,fallback,幻觉如何解决,主动向用户提问以获得更多信息,web server 时候的技巧,防止 RAG retrieval 得到 shit data 污染对话,传统的关键词索引和 embedding 的平衡,定期自动任务实现(不依赖硬编码 workflow) 57 | -------------------------------------------------------------------------------- /docs/Summaries/2025/weekly/2025-W11-03.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025-W11-03 3 | tags: 4 | - "周记" 5 | categories: dairy 6 | date: "2025-03-10T22:21:40+08:00" 7 | modify: "2025-03-10T22:21:40+08:00" 8 | dir: dairy 9 | share: false 10 | cdate: "2025-03-10" 11 | mdate: " 2025-03-10 " 12 | --- 13 | 14 | # 2025-W11-03 15 | 16 | ## Review 17 | 18 | - 周末写了一个 RSS + RAG 的小 bot 玩玩。 19 | - 周中写了一个 QQ bot(总算是成功了,换了一套技术栈,用自己熟悉语言 NcatBot + NapCatQQ 作为 api 接口) 20 | - [GitHub - WncFht/QQ-Agent](https://github.com/WncFht/QQ-Agent) 21 | - 把别人的 bot 抄了几个功能过来 22 | - 然后用 Deepseek V3 的接口做了个总结 bot,效果还行。 23 | - 还接了个 RAG,后续打算把自己的项目接上去。 24 | - 拿和朋友的聊天记录微调了一下 GLM-4,玩了玩 LoRA & p-tuning v2 等 PEFT 方案,不过效果不是很好。对于 9B 模型来说我的卡和数据量都不太够。而且我也懒得进行数据预处理,导致模型总是摆烂发表情。 25 | - 看完了 smolagent 的代码,然后被 Mentor 订了个 meeting 的时间,火速看 agent memory 的论文。不过感觉现在的论文很多都水啊。 26 | - 重构了标注软件的代码,进行了封装,感觉用 cursor 写代码写多了,就总是关注架构层面的东西。 27 | - 调研了一下现在的 AI 落地应用和所有 agent 相关的论文,下周再好好研究一下。 28 | - 自己提的方案感觉还不错 29 | - 开了个仓库,用来放各种 AI 使用的技巧。 30 | - [GitHub - WncFht/Awesome-AI-Usage: A repo contains several best practice of AI tools, including cursor, relfy, chat model, agent.](https://github.com/WncFht/Awesome-AI-Usage) 31 | - 看了看 lerobot 的代码,去实验室玩了玩遥操作,有点意思,但是也太敏感了点。 32 | - 用了一下 refly,确实很不错。感觉自己以前一直觉得 canvas 这种形式是给零基础的人群使用的,现在看来自己还是不愿意接收新事物。 33 | - 整理开源了 obsidian 配置 34 | - [GitHub - WncFht/.obsidian](https://github.com/WncFht/.obsidian) 35 | 36 | ## Next Week Plan 37 | 38 | - 完善方案调研,并实现基本的 demo。 39 | - 了解搜广推技术栈,大规模学习相关知识。 40 | - 了解 RL 相关知识,梳理近期 LLM 相关论文。 41 | - 去看看 transformer 之前的东西,尝试找点灵感。 42 | - 也许 43 | - 实现一个最简单的 code autocomplete,我还是比较好奇这里的性能优化的 44 | - 用 discourse 搭建一个论坛 45 | - 完善 QQ bot,尝试让它拥有 long-term memory,在和群友交流的过程中学习 46 | - 看看 15445,了解一下数据库,用来完善现在的方案 47 | - 去学一点独立开发的技能。前端大概是:Nextjs。不过这个再说吧,有点忙不过来。 48 | 49 | ## THOUGHTS 50 | 51 | - 我还挺喜欢现在在做的东西的,比挤着去发论文有意思多了。 52 | - 输出才能让自己的知识学习有导向,有清晰的结构和框架。 53 | -------------------------------------------------------------------------------- /docs/Summaries/Semesters/2024summer_vacation.md: -------------------------------------------------------------------------------- 1 | --- 2 | statistics: True 3 | --- 4 | 5 | # 2024年高三-大一暑假总结 6 | 我的暑假大概是从 24.7.10 开始的,到那时才尘埃落定。但又来回摇摆,想着未来的出路(出国?保研?工作?转专业?)。所以大概到 8 月才开始学习。 7 | 8 | - 计算机 9 | - [crash course computer](https://www.bilibili.com/video/BV1EW411u7th) 看了前 20 讲,后来因为懒得看了就摆烂了 10 | - cs 61 A 11 | - 看了前 10 讲的 lecture,但是没做笔记 12 | - 看了 composing programs 前三章 13 | - 做完了 4 个 proj,但是没有做 hw 和 lab 14 | - cs 61 C 15 | - 看了前 10 讲的 slide 16 | - 做了前两个 proj 和前六个 lab 17 | - 看计算机组成与设计硬件软件接口前两章 18 | - csapp 19 | - 书看了前三章 20 | - 九曲阑干看了前 4 章 21 | - Dive into Deep Learning 22 | - 看了前两章并做了笔记,但感觉一下子跳过太多前置知识很难感受到美感便先放放。 23 | - games 101 24 | - 几乎看完了所有的 lecture (但是后面几讲不是很认真),但是没有做笔记 25 | - 代码随想录 26 | - 做到回溯了,但是打算之后不会很经常做(等到要用了再说) 27 | - 用 mkdocs 搭建了自己的 blog 28 | - C++ 29 | - 看了菜鸟教程上的相关内容,没做笔记 30 | - 看了[浙大的 C++课](https://www.bilibili.com/video/BV1YT411r7mF),没做笔记,也没看完() 31 | - 看了 accelerated C++,做了笔记 32 | - 看了浙大的实用技能拾遗 33 | - 复习了 Markdown 和 Latex 语法,学习了如何使用 git,学习了最基础的 shell,vim。 34 | - 视觉 slam 十四讲 35 | - 看完了前 7 讲(即理论部分),做了笔记,但是没有跑代码 (环境太难配了) 36 | - 配置环境 37 | - wsl 2 , git,vmware,vscode 38 | - 配置了 obsidian,装了好多插件,现在用起来是很舒服了 39 | - 运动 40 | - 每天做做俯卧撑,感觉还不错 41 | - 大概 7 月份的时候每天下午会出去骑车(city cycling?) 42 | - 其他 43 | - 家教 44 | - 学了驾照 45 | - 买了一个键盘和显示器, 重装了电脑 46 | - 和朋友旅游,去泉州+福州 47 | - 给高中的学弟学妹写了经验分享(数学+英语+物理+技术) 48 | - 看了不少电影 49 | -------------------------------------------------------------------------------- /docs/Summaries/Semesters/2025winter_vacation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2025年寒假总结 3 | tags: 4 | - 总结 5 | categories: 6 | date: 2025-02-15T23:15:09+08:00 7 | modify: 2025-02-15T23:15:09+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-15 11 | mdate: 2025-02-15 12 | --- 13 | 14 | # 2025年寒假总结 15 | 16 | 也许是应该写个总结,毕竟 2 个月的寒假不是年年有的(~~不过 1 个月的暑假应该也不是年年有的~~) 17 | 18 | 我想大一下应该会跟寒假的基调比较相似: 19 | 20 | - 探索兴趣 21 | - 科研推进 22 | 23 | 首先来点俗套的干了什么的环节 24 | 25 | ## What Has Been Done 26 | 27 | ### LLM 28 | 29 | - 由于上个学期很摆烂,所以在寒假开头想要好好利用寒假的时间入门一下科研。于是火急火燎地刷了 CS 231n。 30 | - 然后把李沐读论文的系列看了看,部分讲得还不错(串讲那几个)。 31 | - 做完了学长的小任务(写个 dataloader,搭个 pipeline,测几个指标),就开始科研了。 32 | 33 | #### 科研 34 | 35 | 这部分实际上就全是 dirty work 了。 36 | 37 | - 把 Gaussian Splatting 的工作基本复现了一遍,搞了几个能用的搭了个 pipeline 造点云。 38 | - 写了个标注工具,重构重构,顺便写了点 test。 39 | - 跑实验,顺便写了个自动挂脚本的脚本。 40 | - 包括但不限于一些多模态的 benchmark。 41 | 42 | #### 自己玩玩 43 | 44 | - 看了 Andrej Karpathy 的 micrograd、GPT2 和一些其他的视频。感觉是 AI 方面的 3B1B。讲得极好。 45 | - 学了点 RL, 主要是看了看交大的《动手学强化学习》。 46 | - 复现了一个 alpha zero。 47 | - 了解一下 DPO。 48 | - 去看了看面经,了解了 LLM 的全过程,想要之后去搞个实习,能多用点卡。😢 49 | 50 | ## 系统 51 | 52 | - 想着做点系统方面的东西,其实寒假刚开始是想去做 6.s081 的。 53 | - 于是,把暑假没学完的 CS61C 做完了 CPU project,造了个 2 级流水线,然后写了写 cache 的 lab 就去看 OS 了。 54 | - 结果一整个寒假效率低下,081 只做了 2 个 lab。 55 | 56 | ### jyy OS 57 | 58 | - 讲得极好 59 | - 反复强调了一些基本思想: 60 | - shell 的基本思想:把小工具做精然后组合使用 61 | - 使用 GPT 学习 62 | - 做一个最小的** 63 | - 计算机是执行指令的机器 / 没有魔法 64 | - 如果你想要一个功能,别人很可能已经实现好了。 65 | - 迭代工具来长期节约时间。 66 | - 一些理想,勇气和创新。 67 | - 剩下虚拟化没看完,估计做 lab 的时候会二周目。 68 | - 然后下学期应该也会把 PA 做了,也很好的实验,做了 PA 1。NJU 太先进了😢 69 | - 其他就是看看 OSTEP 和 xv6 book,没什么好说的。 70 | 71 | ## 折腾 72 | 73 | - 给 mkdocs 写了个插件,用于处理 wiki link 74 | - 最近顺便看了点 markdown parser 的代码,想要更彻底地完善一些功能,顺便了解了解设计模式和一般的开发流程。 75 | - 装了 arch,全面切换到 linux 环境,玩了各种小工具,美化。 76 | - 学习了小鹤双拼 77 | - 继续优化了笔记系统,尝试了很多其他的笔记软件,发了篇笔记相关的文章。 78 | - 学了学 6.102(软件工程)中感兴趣的地方,感觉还是挺有意思的。 79 | 80 | ## 不满意的地方 81 | 82 | - 美赛 83 | - 不喜欢。 84 | - 不过最近越来越感觉 ~~科研只不过是更大的美赛~~ 85 | - 效率 86 | - 感觉每天效率有点低下,作息问题也有,不想学习也有,缺乏交流也有。 87 | - 自己确实没什么 plan,想学什么就学什么,导致进度一言难尽。同龄朋友 OS,计网都学完了属实给我不小的 peer pressure。 88 | - 不过大一用来东看看西看看应该不会最后找不到工作吧(于是便又开始摆烂了。 89 | - 来回徘徊 90 | - 一直纠结要不要出国,要不要读博,要不要转专业等问题。诶,大环境确实日新月异,不能保证读研出来 LLM 还是如日中天。更不能保证等我申请北美直博的时候,还能卷到一两个 offer, 目前看来感觉 AI 方向是要被卷死节奏。 91 | - 诶,反正卷不过别人,还不如干点自己觉得有意思的事情。 92 | - 也不是所有人都能遇到很好的学长手把手教你入门的,直接带你发论文的,弯路是不得不走的。 93 | 94 | ## 下个学期的计划 95 | 96 | - 先把 6.s081 写完,看完 jyy OS 97 | - 然后可能去学学 CS 168 98 | - 之后可能去学学 6.824 99 | - 交叉的可能会写点 PA / jyy OS 100 | - 继续完善完善 LLM 的知识,还有很多没学的,同时学一些 Mlsys 的东西,暂时没想好怎么入门,很可能是先去看点知乎,然后做几个 toy project。 101 | - 科研就是把实验室的活干了,先干完手上这篇文章吧。 102 | - 提升提升效率吧,寒假可太摆烂了。 103 | 104 | 最后引用一段话吧 105 | 106 | > [!cite]+ 107 | > 但在一个污浊的社会,谁能够靠品格而不靠钻营取巧有所成就?古人说:有其人,亡其世,虽贤弗行矣。我们是生活在这样一个社会吗?我不敢引用狄更斯的那句名言,说什么我们的时代是最坏的时代也是最好的时代,我只敢说,不管好坏,你生存的社会就是这个样子,你要是有心好好生活下去,就得在这个社会现实里建设你自己的良好生活——毫无疑问,这种建设包括批判与改造。不过,我们仍应留意,不要让批判流于抱怨,尤不要因习于抱怨而放松自己、放纵自己。说到底,并没有谁应许过送给你一个良好的社会环境。要是有人应许过而你年幼无知相信了,你长这么大了还继续相信就是你自己的不是了。—— 《何为良好生活》 108 | -------------------------------------------------------------------------------- /docs/Summaries/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: material/calendar-week 3 | nostatistics: true 4 | comments: false 5 | --- 6 | 7 | # Summaries 8 | 9 | !!! note "Abstract" 10 | 11 | 本部分内容(除特别声明外)采用 [**署名-非商业性使用-保持一致 4.0 国际 (CC BY-NC-SA 4.0)**](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议进行许可。 12 | 13 | {{ BEGIN_TOC }} 14 | - "学期总结 & 其他": 15 | - "高三至大一暑假总结": Semesters/2024summer_vacation 16 | - "2025 年寒假总结": Semesters/2025winter_vacation 17 | - "2025 年周结": 18 | - "第 1 周": 2025/weekly/2025-W01-12 19 | - "第 2 周": 2025/weekly/2025-W02-01 20 | - "第 3 周": 2025/weekly/2025-W03-01 21 | - "第 4 周": 2025/weekly/2025-W04-01 22 | - "第 5 周": 2025/weekly/2025-W05-01 23 | - "第 8 周": 2025/weekly/2025-W08-02 24 | - "第 10 周": 2025/weekly/2025-W10-03 25 | - "第 11 周": 2025/weekly/2025-W11-03 26 | - "2024 年周结": 27 | - "第 51 周": 2024/weekly/2024-W51-12 28 | - "第 52 周": 2024/weekly/2024-W52-12 29 | {{ END_TOC }} -------------------------------------------------------------------------------- /docs/Tags/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: material/tag 3 | nostatistics: true 4 | comments: false 5 | --- 6 | 7 | # Tags 8 | 9 | {{ tag_content }} 10 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-01T14:22:36+08:00 7 | modify: 2025-02-01T14:22:36+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-01 11 | mdate: 2025-02-01 12 | --- 13 | 14 | # Cheat Sheet 15 | 16 | ## ⚡内容索引 17 | 18 | ### 📃编程语言 19 | 20 | - [[bash Cheat Sheet]] 21 | - [[javascript Cheat Sheet]] 22 | - [[cheatsheets/languages/python Cheat Sheet]] 23 | - [[vimscript Cheat Sheet]] 24 | 25 | ### 🔧开发工具 26 | 27 | - [[gdb Cheat Sheet]] 28 | - [[ip Cheat Sheet]] 29 | - [[tmux Cheat Sheet]] 30 | - [[git Cheat Sheet]] 31 | - [[ffmpeg Cheat Sheet]] 32 | - [[adb Cheat Sheet]] 33 | - [[network Cheat Sheet]] 34 | - [[wandb Cheat Sheet]] 35 | 36 | ### 📝文本编辑 37 | 38 | - [[vim Cheat Sheet]] 39 | - [[nano Cheat Sheet]] 40 | - [[org Cheat Sheet]] 41 | - [[emacs Cheat Sheet]] 42 | - [[nvim Cheat Sheet]] 43 | 44 | ## Reference 45 | 46 | - [ ] [思考&自省 \| 🌟🌟🌟🌟🌟](https://think.leftshadow.com/) 47 | - [ ] [终端配置 – YEWPO的博客](https://www.yewpo.top/6/) 48 | - [ ] [[Tools 待整理]] 49 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/editors/VScode Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: VScode 3 | tags: 4 | - Toolsl 5 | - CheatSheet 6 | categories: 7 | date: 2025-02-22T20:29:00+08:00 8 | modify: 2025-02-22T20:29:00+08:00 9 | dir: 10 | share: false 11 | cdate: 2025-02-22 12 | mdate: 2025-02-22 13 | --- 14 | 15 | # VScode 16 | 17 | - [vscode 快捷键](https://ppambler.github.io/time-geekbang/01-VS-Code/07-%E5%A6%82%E4%BD%95%E5%BF%AB%E9%80%9F%E5%9C%A8%E6%96%87%E4%BB%B6%E3%80%81%E7%AC%A6%E5%8F%B7%E3%80%81%E4%BB%A3%E7%A0%81%E4%B9%8B%E9%97%B4%E8%B7%B3%E8%BD%AC.html) 18 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/editors/emacs Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: emacs Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-01T14:22:36+08:00 7 | modify: 2025-02-01T14:22:36+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-01 11 | mdate: 2025-02-01 12 | --- 13 | 14 | # emacs Cheat Sheet 15 | 16 | ``` 17 | ############################################################################## 18 | # EMACS CHEATSHEET (中文速查表) - by skywind (created on 2018/3/9) 19 | # Version: 3, Last Modified: 2018/03/09 18:26 20 | # https://github.com/skywind3000/awesome-cheatsheets 21 | ############################################################################## 22 | 23 | 24 | ############################################################################## 25 | # 按键简称 26 | ############################################################################## 27 | 28 | C 以前的 Control 键,现代对应 CTRL 键 29 | C-x 同时按下 CTRL-x (先按住 CTRL键不放再按下 x 键,然后都放开) 30 | M 以前的 Meta 键,现代对应 ALT 键 31 | M-x 同时按下 ALT-x,也可以先按一下 ESC 再按下 x 键 32 | S Shift 键 33 | Del BackSpace 键,很久以前有些电脑的 BackSpace 叫做 Delete 34 | RET 回车键 35 | C-x C-c 先按 CTRL-x,再按 CTRL-c 36 | 37 | 38 | ############################################################################## 39 | # 光标移动 40 | ############################################################################## 41 | 42 | C-b 光标左移,同 键 43 | C-f 光标右移,同 键 44 | C-p 光标上移,同 键 45 | C-n 光标下移,同 键 46 | C-a 移动到行首,同 键 47 | C-e 移动到行末,同 键 48 | M-a 句首 49 | M-e 句尾 50 | M-{ 段首 51 | M-} 段尾 52 | M-b 左移一个单词,同 CTRL+ 53 | M-f 右移一个单词,同 CTRL+ 54 | C-v 下翻一屏,同 键 55 | M-v 上翻一屏,同 键 56 | C-x < 向左水平滚动 57 | C-x > 向右水平滚动 58 | C-x [ 上一页,和 M-v 不同,这个页是由分页符确定 59 | C-x ] 下一页,和 C-v 不同,这个页是由分页符确定 60 | M-< 文件开头,同 CTRL+ 61 | M-> 文件结尾,同 CTRL+ 62 | M-g M-g 跳到指定行号,连续按两次 ALT-g 63 | C-M-a 上一个函数,同时按下 CTRL-ALT-a 64 | C-M-e 下一个函数,同时按下 CTRL-ALT-e 65 | 66 | 67 | ############################################################################## 68 | # 删除 69 | ############################################################################## 70 | 71 | C-d 向前(右) 删除字符,同 PC 的 键 72 | DEL 向后(左) 删除字符(即 PC 的 键) 73 | M-d 向前(右) 删除单词 74 | M-DEL 向后(左) 删除单词 75 | C-k 向前(右) 删除行 76 | M-0 C-k 向后(左) 删除行 77 | M-k 向前(右) 删除句子 78 | C-x DEL 向后(左) 删除句子 79 | C-S-DEL 删除当前行(很多终端不支持) 80 | C-w 删除选中区域 81 | M-w 复制区域到删除环 82 | C-y 从删除环中拉回内容 83 | M-y 从删除环中拉回更早期内容 84 | 85 | 86 | ############################################################################## 87 | # 搜索替换 88 | ############################################################################## 89 | 90 | C-s 搜索,出现 minibuffer 输入要查找的东西 91 | C-s 搜索模式下向前搜索 92 | C-r 搜索模式下向后搜索 93 | RET 退出搜索模式 94 | C-g 退出搜索模式 95 | M-s w RET 向前搜索单词(空格和标点分隔) 96 | M-s w C-r RET 向后搜索单词(空格和标点分隔) 97 | 98 | 99 | 100 | ############################################################################## 101 | # 获取帮助 102 | ############################################################################## 103 | 104 | C-h t 快速指南 105 | C-h k 按键帮助 106 | C-h f 函数帮助 107 | C-h v 变量帮助 108 | C-h r Emacs 手册 109 | 110 | 111 | ############################################################################## 112 | # References 113 | ############################################################################## 114 | 115 | http://blog.csdn.net/garfielder007/article/details/49557441 116 | http://blog.csdn.net/ryuali2010/article/details/7887776 117 | https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf 118 | https://www.gnu.org/software/emacs/refcards/pdf/survival.pdf 119 | 120 | 121 | 122 | ``` 123 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/editors/nano Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: nano Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-01T14:22:36+08:00 7 | modify: 2025-02-01T14:22:36+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-01 11 | mdate: 2025-02-01 12 | --- 13 | 14 | # nano Cheat Sheet 15 | 16 | ## 文件操作 17 | 18 | ``` 19 | CTRL-o 保存文件 20 | CTRL-r ALT-f 在 Nano 中打开新文件 21 | CTRL-r CTRL-t 使用文件管理器寻找并打开文件 22 | CTRL-r ALT-f CTRL-t 使用文件管理器寻找并打开到新文件 23 | ALT-< 切换到前一个文件,同 ALT-, 24 | ALT-> 切换到后一个文件,同 ALT-. 25 | CTRL-x 退出 Nano (或者关闭当前文件,多个的话) 26 | CTRL-g 显示帮助 27 | ``` 28 | 29 | ## 光标移动 30 | 31 | ``` 32 | CTRL-b 向左移动,同 33 | CTRL-f 向右移动,同 34 | CTRL-p 向上移动,同 35 | CTRL-n 向下移动,同 36 | CTRL-a 移动到行首,同 37 | CTRL-e 移动到行末,同 38 | CTRL-v 下翻页,同 39 | CTRL-y 上翻页,同 40 | ALT-\ 跳到文件开头 41 | ALT-/ 跳到文件末尾 42 | ALT-g 跳到指定行号 43 | ALT-] 跳到匹配的括号或者 tag 44 | ALT-a ALT-} 选择一个块并缩进 45 | ALT-a ALT-{ 选择一个块并反缩进 46 | ALT-( 跳转到上一个段落 47 | ALT-) 跳转到下一个段落 48 | CTRL-d 删除光标下字符 49 | CTRL-h 删除光标左边字符 50 | CTRL-j 调整段落 51 | CTRL-Left 向左跳一个单词(v2.7.4 至少) 52 | CTRL-Right 向右跳一个单词(v2.7.4 至少) 53 | ``` 54 | 55 | ## 复制粘贴 56 | 57 | ``` 58 | ALT-a 开始选择文本用于复制或剪贴,再次按 ALT-a 会取消选择 59 | CTRL-^ 开始选择文本用于复制或剪贴,同 ALT-a,CTRL 和 6一起按下 60 | ALT-a ALT-^ 复制高亮的选中文本到剪贴板,ALT 同 6 一起按 61 | ALT-a CTRL-k 剪贴高亮的选中文本到剪贴板 62 | ALT-^ 复制当前行到剪贴板 63 | CTRL-k 剪贴从光标处到行末的文本 64 | CTRL-u 粘贴剪贴板里的文本到光标处 65 | SHIFT-方向键 另外一种标记法(v2.7.4) 66 | ``` 67 | 68 | ## 搜索替换 69 | 70 | ``` 71 | CTRL-w 查找字符串 72 | ALT-w 重复上次查找 73 | CTRL-\ 查找替换 74 | ALT-r 查找替换,同 CTRL-\ 75 | ``` 76 | 77 | ## 撤销重复 78 | 79 | ``` 80 | ALT-u 撤销 81 | ALT-e 重复 82 | ``` 83 | 84 | ## 状态切换 85 | 86 | ``` 87 | ALT-x 是否允许显示底部帮助信息 88 | ALT-c 是否显示光标位置 89 | ALT-o 是否允许多行编辑 90 | ALT-s 是否允许平滑卷屏 91 | ALT-$ 是否允许自动换行 92 | ALT-p 是否显示空格和制表符 93 | ALT-y 是否允许语法高亮 94 | ALT-h 是否允许智能 Home 键 95 | ALT-i 是否允许自动缩进 96 | ALT-k 是否允许剪贴到行末 97 | ALT-l 是否允许硬性自动换行 98 | ALT-q 是否允许展开制表符为空格 99 | ALT-b 是否允许备份文件 100 | ALT-f 是否允许加载文件到新的缓存 101 | ALT-m 是否允许鼠标 102 | ALT-# 是否显示行号(需要较新版本) 103 | ``` 104 | 105 | ## 配置:~/. nanorc, /etc/nanorc 106 | 107 | ``` 108 | set tabsize 4 设置制表符宽度 109 | set autoindent 允许自动缩进 110 | set cut 设置 CTRL-K 可以剪贴到行末(only for nano 2.x) 111 | set noconvert 不要转换 DOS/UNIX 换行符(一般不设置) 112 | set nowrap 不要自动换行 113 | set nohelp 不显示下面两行帮助(不熟练别设置) 114 | set morespace 隐藏标题下的空白行,换取更多编辑空间(only for 2.x) 115 | set smooth 平滑卷屏(新版本已经移除) 116 | set suspend 允许 ctrl-z 将 nano 置于后台(仅老版本有效) 117 | set smarthome 第一次 Home 跳到行首非空字符,第二次到行首 118 | set tabstospaces 展开制表符为空格(如果需要的话) 119 | set mouse 允许鼠标 120 | set linenumbers 显示行号(可以在编辑时 ALT-# 切换) 121 | set backupdir path 设置备份路径 122 | set backup 允许保存备份 123 | set casesensitive 搜索使用大小写敏感 124 | set multibuffer 使用 CTRL-r 读取文件时,默认读取到新缓存 125 | set nonewlines 不在文件末尾添加新行 126 | set numbercolor a,b 设置行号颜色,a 为文字颜色,b 为背景 (版本 5.4+) 127 | set titlecolor a,b 设置标题颜色,a 为文字颜色,b 为背景 (版本 5.4+) 128 | include 加载额外配置,通常是 /usr/share/nano 下的各种语法文件 129 | ``` 130 | 131 | ## 网络资源 132 | 133 | ``` 134 | 最新下载 https://www.nano-editor.org/ 135 | 官方手册 https://www.nano-editor.org/dist/v2.9/nano.html 136 | 配置帮助 https://www.nano-editor.org/dist/latest/nanorc.5.html 137 | nano-win https://github.com/lhmouse/nano-win 138 | 中文帮助 http://blog.sina.com.cn/s/blog_5d9f545101010b1y.html 139 | 正确设置 ALT 键 http://www.skywind.me/blog/archives/2021 140 | ``` 141 | 142 | ## References 143 | 144 | - https://www.cheatography.com/bipinthite/cheat-sheets/nano-editor/ 145 | - http://www.codexpedia.com/text-editor/nano-text-editor-command-cheatsheet/ 146 | - https://thecustomizewindows.com/2015/02/nano-text-editor-tips-tricks/ 147 | - https://www.lifewire.com/beginners-guide-to-nano-editor-3859002 148 | - https://www.geoffreybrown.com/blog/nano-keystroke-configuration/ 149 | - https://www.linux.org/threads/how-to-change-the-colors-of-nano.40658/ 150 | - https://www.nano-editor.org/dist/latest/cheatsheet.html 151 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/editors/nvim Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: nvim 3 | tags: 4 | - nvim 5 | - Tools 6 | - CheatSheet 7 | categories: 8 | date: 2025-02-05T10:43:16+08:00 9 | modify: 2025-02-05T10:43:16+08:00 10 | dir: 11 | share: false 12 | cdate: 2025-02-05 13 | mdate: 2025-02-05 14 | --- 15 | 16 | # nvim 17 | 18 | - [GitHub - ayamir/nvimdots: A well configured and structured Neovim.](https://github.com/ayamir/nvimdots) 19 | - 现在主要用的是这个 20 | - [ ] [Fetching Title#gouo](https://innei.in/posts/Z-Turn/nvim-lua-config-init) 21 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/languages/Go Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Go Cheat Sheet 3 | tags: 4 | - Go 5 | - CheatSheet 6 | categories: 7 | date: 2024-12-07 05:33:15 8 | modify: 2024-12-07 14:04:23 9 | dir: 10 | share: false 11 | --- 12 | 13 | # Go Cheat Sheet 14 | 15 | ## 一些笔记 16 | 17 | - [[go学习指引|go学习指引]] 18 | - [ ] [快学 Go 语言 - 知乎](https://www.zhihu.com/column/quickgo) 19 | 20 | ## 项目 21 | 22 | - [ ] [极客兔兔](https://geektutu.com/) 23 | - [ ] [零基础Go+Gin+Gorm+Vue3+Redis+MySQL快速上手实战教程\[全栈实战\|Go Web开发\|前后端综合开发\]\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV1BY4UefEkM) 24 | - [ ] [GoWeb进阶—两周开发一个基于vue+go+gin+mysql+redis的博客论坛web项目!!!从零到部署上线\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV1Fb4y14747) 25 | - [ ] [go-admin/README.Zh-cn.md at master · go-admin-team/go-admin · GitHub](https://github.com/go-admin-team/go-admin/blob/master/README.Zh-cn.md) 26 | - [ ] [后端开发大师课程 \[Golang + Postgres +Docker\] (中文字幕)\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV1dy4y1u7Sq) 27 | 28 | ## `array` 和 `slice` 的区别 29 | 30 | - [【Go】深入剖析slice和array \| thinkeridea博客](https://blog.thinkeridea.com/201901/go/shen_ru_pou_xi_slice_he_array.html) 31 | 32 | ## 并发编程 33 | 34 | - 用户空间 35 | - 代码段 36 | - 数据段 37 | - BSS 段 38 | - 堆 heap 39 | - 栈 stack 40 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/languages/markdown Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: markdown Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-01-30T17:35:52+08:00 7 | modify: 2025-01-30T17:35:52+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-01-30 11 | mdate: 2025-01-30 12 | --- 13 | 14 | # markdown Cheat Sheet 15 | 16 | - 使用双链 17 | - 使用 callouts 18 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/languages/python Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Python Numpy 3 | tags: 4 | - Python 5 | categories: graph 6 | date: 2024-10-30T15:14:03+0800 7 | modify: 2024-12-06T00:13:42+0800 8 | dir: Obsidian 9 | share: false 10 | --- 11 | 12 | # Python Numpy 13 | 14 | ## Python 15 | 16 | ### string 17 | 18 | ```python 19 | s = "hello" 20 | print(s.capitalize()) # Capitalize a string; prints "Hello" 21 | print(s.upper()) # Convert a string to uppercase; prints "HELLO" 22 | print(s.rjust(7)) # Right-justify a string, padding with spaces; prints " hello" 23 | print(s.center(7)) # Center a string, padding with spaces; prints " hello " 24 | print(s.replace('l', '(ell)')) # Replace all instances of one substring with another; 25 | # prints "he(ell)(ell)o" 26 | print(' world '.strip()) # Strip leading and trailing whitespace; prints "world" 27 | ``` 28 | 29 | ### Containers 30 | 31 | ```python 32 | animals = ['cat', 'dog', 'monkey'] 33 | for idx, animal in enumerate(animals): 34 | print('#%d: %s' % (idx + 1, animal)) 35 | # Prints "#1: cat", "#2: dog", "#3: monkey", each on its own line 36 | ``` 37 | 38 | 列表推导式 39 | 40 | ```python 41 | nums = [0, 1, 2, 3, 4] 42 | even_squares = [x ** 2 for x in nums if x % 2 == 0] 43 | print(even_squares) # Prints "[0, 4, 16]" 44 | ``` 45 | 46 | 同样也有字典推导式 47 | 48 | Tuples 可以用作字典中的键和集合的元素,但是 lists 不能 49 | 50 | ## Numpy 51 | 52 | ```python 53 | import numpy as np 54 | 55 | # Create a new array from which we will select elements 56 | a = np.array([[1,2,3], [4,5,6], [7,8,9], [10, 11, 12]]) 57 | 58 | print(a) # prints "array([[ 1, 2, 3], 59 | # [ 4, 5, 6], 60 | # [ 7, 8, 9], 61 | # [10, 11, 12]])" 62 | 63 | # Create an array of indices 64 | b = np.array([0, 2, 0, 1]) 65 | 66 | # Select one element from each row of a using the indices in b 67 | print(a[np.arange(4), b]) # Prints "[ 1 6 7 11]" 68 | 69 | # Mutate one element from each row of a using the indices in b 70 | a[np.arange(4), b] += 10 71 | 72 | print(a) # prints "array([[11, 2, 3], 73 | # [ 4, 5, 16], 74 | # [17, 8, 9], 75 | # [10, 21, 12]]) 76 | ``` 77 | 78 | ```python 79 | import numpy as np 80 | 81 | a = np.array([[1,2], [3, 4], [5, 6]]) 82 | 83 | bool_idx = (a > 2) # Find the elements of a that are bigger than 2; 84 | # this returns a numpy array of Booleans of the same 85 | # shape as a, where each slot of bool_idx tells 86 | # whether that element of a is > 2. 87 | 88 | print(bool_idx) # Prints "[[False False] 89 | # [ True True] 90 | # [ True True]]" 91 | 92 | # We use boolean array indexing to construct a rank 1 array 93 | # consisting of the elements of a corresponding to the True values 94 | # of bool_idx 95 | print(a[bool_idx]) # Prints "[3 4 5 6]" 96 | 97 | # We can do all of the above in a single concise statement: 98 | print(a[a > 2]) # Prints "[3 4 5 6]" 99 | ``` 100 | 101 | ```python 102 | x = np.array([1, 2], dtype=np.int64) # Force a particular datatype 103 | print(x.dtype) # Prints "int64" 104 | ``` 105 | 106 | ```python 107 | import numpy as np 108 | 109 | x = np.array([[1,2],[3,4]], dtype=np.float64) 110 | y = np.array([[5,6],[7,8]], dtype=np.float64) 111 | 112 | # Elementwise sum; both produce the array 113 | # [[ 6.0 8.0] 114 | # [10.0 12.0]] 115 | print(x + y) 116 | print(np.add(x, y)) 117 | 118 | # Elementwise difference; both produce the array 119 | # [[-4.0 -4.0] 120 | # [-4.0 -4.0]] 121 | print(x - y) 122 | print(np.subtract(x, y)) 123 | 124 | # Elementwise product; both produce the array 125 | # [[ 5.0 12.0] 126 | # [21.0 32.0]] 127 | print(x * y) 128 | print(np.multiply(x, y)) 129 | 130 | # Elementwise division; both produce the array 131 | # [[ 0.2 0.33333333] 132 | # [ 0.42857143 0.5 ]] 133 | print(x / y) 134 | print(np.divide(x, y)) 135 | 136 | # Elementwise square root; produces the array 137 | # [[ 1. 1.41421356] 138 | # [ 1.73205081 2. ]] 139 | print(np.sqrt(x)) 140 | ``` 141 | 142 | 广播可以避免循环 143 | 144 | ```python 145 | import numpy as np 146 | 147 | # We will add the vector v to each row of the matrix x, 148 | # storing the result in the matrix y 149 | x = np.array([[1,2,3], [4,5,6], [7,8,9], [10, 11, 12]]) 150 | v = np.array([1, 0, 1]) 151 | y = x + v # Add v to each row of x using broadcasting 152 | print(y) # Prints "[[ 2 2 4] 153 | # [ 5 5 7] 154 | # [ 8 8 10] 155 | # [11 11 13]]" 156 | ``` 157 | 158 | ## 高级主题 159 | ### 生成器和迭代器 160 | 161 | - [python中生成器与迭代器到底有什么区别?](https://blog.csdn.net/weixin_44706915/article/details/116702292) 162 | 163 | ### 装饰器 164 | 165 | 166 | ### 面向对象编程 167 | 168 | - 继承和多态 169 | - 魔术方法 170 | 171 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/languages/typst Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: typst Cheat Sheet 3 | tags: 4 | - Tools 5 | - CheatSheet 6 | categories: graph 7 | date: 2024-10-12T13:01:56+0800 8 | modify: 2024-12-06T00:14:04+0800 9 | dir: Obsidian 10 | share: false 11 | --- 12 | 13 | # typst Cheat Sheet 14 | 15 | - [脚本 – Typst 中文文档](https://typst-doc-cn.github.io/docs/reference/scripting) 16 | - [搭建舒适的typst写作环境](https://zhuanlan.zhihu.com/p/642509853) 17 | - [typst-doc-cn.github.io](https://typst-doc-cn.github.io/) 18 | - [Typst: Compose papers faster](https://typst.app/) 19 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/languages/vimscript Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: VimScript Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-01T14:22:36+08:00 7 | modify: 2025-02-01T14:22:36+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-01 11 | mdate: 2025-02-01 12 | --- 13 | 14 | # VimScript Cheat Sheet 15 | 16 | 译注:折腾 Vim 当然要能看懂和改写相关脚本,而中文资料匮乏,缺一个提纲挈领的教程。本文翻译自 Andrew Scala 的 《[Five Minute Vimscript](http://andrewscala.com/vimscript/)》,立足于让你用最短的时间掌握 VimScript 的基础和要点,你可以把它看成一份语言速查表。 17 | 18 | Vim有着丰富的内建文档系统,使用 `:h <关键词>` 就可以阅读,如果你想在方便的尝试各种 vimscript ,你可以通过 NORMAL 模式下使用 `gQ` 命令进入 VimScript 的交互式环境调试命令。 19 | 20 | 注意:下面的例子中会包含一些形如 `<符号>` 的符号,意味着正式使用时应该被完全替换成真实的东西,包括左右两边的尖括号。而单独的 `<` 和 `>` 在 VimScript 中被用作比较符号。 21 | 22 | ## 变量 23 | 24 | - `let` 命令用来对变量进行初始化或者赋值。 25 | - `unlet` 命令用来删除一个变量。 26 | - `unlet!` 命令同样可以用来删除变量,但是会忽略诸如变量不存在的错误提示。 27 | 28 | 默认情况下,如果一个变量在函数体以外初始化的,那么它的作用域是全局变量;而如果它是在函数体以内初始化的,那它的作用于是局部变量。同时你可以通过变量名称前加冒号前缀明确的指明变量的作用域: 29 | 30 | ```text 31 | g:var - 全局 32 | a:var - 函数参数 33 | l:var - 函数局部变量 34 | b:var - buffer 局部变量 35 | w:var - window 局部变量 36 | t:var - tab 局部变量 37 | s:var - 当前脚本内可见的局部变量 38 | v:var - Vim 预定义的内部变量 39 | ``` 40 | 41 | 你可以通过 $name 的模式读取或者改写环境变量,同时可以用 &option 的方式来读写 vim 内部的设置值。 42 | 43 | ## 数据类型 44 | 45 | **Number**:32 位有符号整数 46 | 47 | ```VimL 48 | -123 49 | 0x10 50 | 0177 51 | ``` 52 | 53 | **Float**: 浮点数,需要编译 Vim 的时候,有 `+float` 特性支持 54 | 55 | ```VimL 56 | 123.456 57 | 1.15e-6 58 | -1.1e3 59 | ``` 60 | 61 | **String**: NULL 结尾的 8位无符号字符串 62 | 63 | ```VimL 64 | "ab\txx\"--" 65 | 'x-z''a,c' 66 | ``` 67 | 68 | **Funcref**: 函数引用,函数引用类型的变量名必须以大写字母开头 69 | 70 | ```VimL 71 | :let Myfunc = function("strlen") 72 | :echo Myfunc('foobar') " Call strlen on 'foobar'. 73 | 6 74 | ``` 75 | 76 | **List**: 有序列表 77 | 78 | ```VimL 79 | :let mylist = [1, 2, ['a', 'b']] 80 | :echo mylist[0] 81 | 1 82 | :echo mylist[2][0] 83 | a 84 | :echo mylist[-2] 85 | 2 86 | :echo mylist[999] 87 | E684: list index out of range: 999 88 | :echo get(mylist, 999, "THERE IS NO 1000th ELEMENT") 89 | THERE IS NO 1000th ELEMENT 90 | ``` 91 | 92 | **Dictionary**: 无序的 Key/Value 容器 93 | 94 | ```VimL 95 | :let mydict = {'blue': "#0000ff", 'foo': {999: "baz"}} 96 | :echo mydict["blue"] 97 | #0000ff 98 | :echo mydict.foo 99 | {999: "baz"} 100 | :echo mydict.foo.999 101 | baz 102 | :let mydict.blue = "BLUE" 103 | :echo mydict.blue 104 | BLUE 105 | ``` 106 | 107 | 没有布尔类型,整数 0 被当作假,其他被当作真。字符串在比较真假前会被转换成整数,大部分字符串都会被转化为 0,除非以非零开头的字符串才会转化成非零。 108 | 109 | (译注:可以调用 type(varname) 来取得变量的类型,最新版 Vim 8.1 中已经包含 Boolean 类型,并且有 v:true, v:false 两个值) 110 | 111 | VimScript 的变量属于动态弱类型。 112 | 113 | ```VimL 114 | :echo 1 . "foo" 115 | 1foo 116 | :echo 1 + "1" 117 | 2 118 | 119 | :function! TrueFalse(arg) 120 | : return a:arg? "true" : "false" 121 | :endfunction 122 | 123 | :echo TrueFalse("foobar") 124 | false 125 | :echo TrueFalse("1000") 126 | true 127 | :echo TrueFalse("x1000") 128 | false 129 | :echo TrueFalse("1000x") 130 | true 131 | :echo TrueFalse("0") 132 | false 133 | ``` 134 | 135 | ## 字符串比较 136 | 137 | - `` == ``: 字符串相等 138 | - `` != ``: 字符串不等 139 | - `` =~ ``: 匹配 pattern 140 | - `` !~ ``: 不匹配 pattern 141 | - `#`: 匹配大小写 142 | - `?`: 不匹配大小写 143 | 144 | 注意:设置选项 `ignorecase` 会影响 == 和 != 的默认比较结果,可以在比较符号添加 ? 或者 # 来明确指定大小写是否忽略。 145 | 146 | `` . ``: 字符串链接 147 | 148 | ```VimL 149 | :function! TrueFalse(arg) 150 | : return a:arg? "true" : "false" 151 | :endfunction 152 | 153 | :echo TrueFalse("X start" =~ 'X$') 154 | false 155 | :echo TrueFalse("end X" =~ 'X$') 156 | true 157 | :echo TrueFalse("end x" =~# 'X$') 158 | false 159 | ``` 160 | 161 | ## If, For, While, and Try/Catch 162 | 163 | 条件判断: 164 | 165 | ```VimL 166 | if 167 | ... 168 | elseif 169 | ... 170 | else 171 | ... 172 | endif 173 | ``` 174 | 175 | 循环: 176 | 177 | ```VimL 178 | for in 179 | continue 180 | break 181 | endfor 182 | ``` 183 | 184 | 复杂循环: 185 | 186 | ```VimL 187 | for [var1, var2] in [[1, 2], [3, 4]] 188 | " on 1st loop, var1 = 1 and var2 = 2 189 | " on 2nd loop, var1 = 3 and var2 = 4 190 | endfor 191 | ``` 192 | 193 | While 循环: 194 | 195 | ```VimL 196 | while 197 | endwhile 198 | ``` 199 | 200 | 异常捕获: 201 | 202 | ```VimL 203 | try 204 | ... 205 | catch 206 | " HIGHLY recommended to catch specific error. 207 | finally 208 | ... 209 | endtry 210 | ``` 211 | 212 | ## 函数 213 | 214 | 使用 `function` 关键字定义一个函数,使用 `function!` 覆盖一个函数的定义,函数和变量一样也有作用范围的约束。需要注意函数名必须以大写字母开头。 215 | 216 | ```VimL 217 | function! (arg1, arg2, etc) 218 | 219 | endfunction 220 | ``` 221 | 222 | `delfunction ` 删除一个函数 223 | 224 | `call ` 调用一个函数,函数调用前的 call 语句是必须的,除非在一个表达式里。 225 | 226 | 例如:强制创建一个全局函数(使用感叹号),参数使用 `...` 这种不定长的参数形式时,a:1 表示 `...` 部分的第一个参数,a:2 表示第二个,如此类推,a:0 用来表示 `...` 部分一共有多少个参数。 227 | 228 | ```VimL 229 | function! g:Foobar(arg1, arg2, ...) 230 | let first_argument = a:arg1 231 | let index = 1 232 | let variable_arg_1 = a:{index} " same as a:1 233 | return variable_arg_1 234 | endfunction 235 | ``` 236 | 237 | 有一种特殊的调用函数的方式,可以指明该函数作用的文本区域是从当前缓冲区的第几行到第几行,按照 `1,3call Foobar()` 的格式调用一个函数的话,该函数会在当前文件的第一行到第三行每一行执行一遍,再这个例子中,该函数总共被执行了三次。 238 | 239 | 如果你在函数声明的参数列表后添加一个 `range` 关键字,那函数就只会被调用一次,这时两个名为 `a:firstline` 和 `a:lastline` 的特殊变量可以用在该函数内部使用。 240 | 241 | 例如:强制创建一个名为 `RangeSize` 的函数,用来显示被调用时候的文本范围: 242 | 243 | ```VimL 244 | function! b:RangeSize() range 245 | echo a:lastline - a:firstline 246 | endfunction 247 | ``` 248 | 249 | ## 面向对象 250 | 251 | Vim 没有原生的类的支持,但是你可以用字典模拟基本的类。为了定义一个类的方法,可以在函数声明时使用 `dict` 关键字来将内部字典暴露为 `self` 关键字: 252 | 253 | ```VimL 254 | let MyClass = {"foo": "Foo"} 255 | function MyClass.printFoo() dict 256 | echo self.foo 257 | endfunction 258 | ``` 259 | 260 | 类的实现更类似于 singleton,为了在 VimScript 中创建类的实例,我们对字典使用 `deepcopy()` 方法进行拷贝: 261 | 262 | ```VimL 263 | :let myinstance = deepcopy(MyClass) 264 | :call myinstance.printFoo() 265 | Foo 266 | :let myinstance.foo = "Bar" 267 | :call myinstance.printFoo() 268 | Bar 269 | ``` 270 | 271 | ## 接下来做什么? 272 | 273 | 现在既然你已经知道了大致原理,下面给你推荐一些好的资源 274 | 275 | 教程: 276 | 277 | - [Vim 中文帮助文档(usr_41) - 编写 Vim 脚本和 API 列表](http://vimcdoc.sourceforge.net/doc/usr_41.html) 278 | - [Vim 脚本指北](https://github.com/lymslive/vimllearn) 279 | - [Vim 脚本开发规范](https://github.com/vim-china/vim-script-style-guide) 280 | 281 | 其他: 282 | 283 | - [知乎:Vim 专栏](https://zhuanlan.zhihu.com/vimrc) 284 | 285 | ## 感谢 286 | 287 | 希望你觉得本文对你有用,感谢阅读。 288 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/Docker Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Docker Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-09T21:16:43+08:00 7 | modify: 2025-02-09T21:16:43+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-09 11 | mdate: 2025-02-09 12 | --- 13 | 14 | # Docker Cheat Sheet 15 | 16 | ## 安装 17 | 18 | - `curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun` 19 | 20 | ```bash 21 | sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 22 | ``` 23 | 24 | - `sudo chmod +x /usr/local/bin/docker-compose` 25 | 26 | ## docker 命令 27 | 28 | ### 镜像相关 29 | 30 | - `docker images` 列出本地镜像 31 | - `docker search ` 搜索镜像 32 | - `docker pull ` 拉取镜像 33 | - `docker rmi ` 删除镜像 34 | - `docker build -t .` 从 Dockerfile 构建镜像,并打上 tag `` 35 | - `docker export > .tar` 保存镜像为 tar 包 36 | - `docker import .tar ` 从 tar 包导入镜像 37 | - `docker tag :` 给镜像打 tag(重命名) 38 | 39 | ### 容器相关 40 | 41 | - `docker ps -a` 列出正在运行的容器 42 | - `docker run -it ` 运行镜像 43 | - `-d` 后台运行 44 | - `-p :` 端口映射 45 | - `-v :` 目录映射 46 | - `-e =` 环境变量 47 | - `--name ` 容器名 48 | - `--rm` 运行完后自动删除容器 49 | - `--network ` 指定网络 50 | - `docker start ` 启动容器 51 | - `docker restart ` 重启容器 52 | - `docker stop ` 停止容器 53 | - `docker rm ` 删除容器 54 | - `docker exec -it /bin/bash` 进入容器 55 | - `docker cp ... ...` 在本地和容器之间复制文件(用法类似 scp) 56 | 57 | ### 网络相关 58 | 59 | - `docker network ls` 列出网络 60 | - `docker network create ` 创建网络 61 | - `docker network connect ` 将容器连接到网络 62 | - `docker network inspect ` 查看网络信息 63 | - `docker network rm ` 删除网络 64 | 65 | ### 仓库相关 66 | 67 | - `docker login ` 连接 registry 68 | - `docker login` 连接到 Docker Hub 69 | - `docker login ghcr.io` 连接到 GitHub 的仓库,用户名是 GitHub 用户名,密码是 GitHub 生成的 token(ghp\_ 开头) 70 | - `docker logout ` 断开 registry 71 | - `docker push ` 推送镜像到 registry(会根据前缀自动选择 registry) 72 | - `docker pull ` 从 registry 拉取镜像 73 | 74 | #### registry 镜像 75 | 76 | 可以利用 registry 镜像来自建私有 registry 77 | 78 | - `docker pull registry:2` 拉取 registry 镜像 79 | - 需要挂载的目录 80 | - `./auth:/auth`:用户名和密码。在本地 auth 目录下执行 `docker run --entrypoint htpasswd registry:2.7.0 -Bbn > htpasswd` 生成文件 81 | - `./certs:/certs`:SSL 证书,可以用 acme.sh 来签 82 | - `./registry:/var/lib/registry`:registry 数据 83 | - 启动 registry: 84 | 85 | ```bash 86 | docker run -itd -p 5000:5000 --restart=always --name registry \ 87 | -v ./certs:/certs \ 88 | -v ./auth:/auth \ 89 | -v ./registry:/var/lib/registry \ 90 | -e "REGISTRY_HTTP_TLS_CERTIFICATE=/certs/fullchain.cer" \ 91 | -e "REGISTRY_HTTP_TLS_KEY=/certs/.key" \ 92 | -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \ 93 | -e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd" \ 94 | registry:2 95 | 96 | ``` 97 | 98 | - `docker login ` 登录 registry 99 | - `docker tag /` 给镜像打上 registry 的 tag 100 | - `docker push /` 推送镜像到 registry 101 | 102 | ## Dockerfile 103 | 104 | ### 常用换源 105 | 106 | #### Ubuntu 软件源 107 | 108 | ```plain text 109 | RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list 110 | RUN sed -i s@/archive.ubuntu.com/@/<...>/@g /etc/apt/sources.listRUN apt-get clean 111 | RUN apt-get update 112 | ``` 113 | 114 | #### Debian 软件源 115 | 116 | ```plain text 117 | RUN sed -i s/deb.debian.org/mirrors.aliyun.com/g /etc/apt/sources.list && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone 118 | RUN apt-get update 119 | ``` 120 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/KDE Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: KDE 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-01-28T22:58:21+08:00 7 | modify: 2025-01-28T22:58:21+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-01-28 11 | mdate: 2025-01-28 12 | --- 13 | 14 | # KDE 15 | 16 | ## Reference 17 | 18 | - [KDE终极美化指南 \| Jiekang Hu's Blog](https://hujiekang.top/posts/kde-customization/) 19 | - [KDE桌面美化指南 Part 1 \| Yaojie's Site](https://acherstyx.github.io/post/KDE%E6%A1%8C%E9%9D%A2%E7%BE%8E%E5%8C%96%E6%8C%87%E5%8D%97/) 20 | - [欢迎 - Linux 银河漫游指南](https://libhitchhiker.eu.org/) 21 | 22 | ```zsh 23 | sudo apt purge gnome gnome-shell 24 | ``` 25 | 26 | 记录一下配置了一些什么: 27 | - KDE 美化:主要是用了 McMojave 这个主题,然后用了 Kvantum manager 28 | - 没有使用 `Latte Dock` 和过多的插件 29 | - 终端: 30 | - 用 KDE 自带的 konsole 和自己配置的 zsh。经典配置: `oh-my-zsh ` + ` powerlevel10k ` 和一些其他的插件。 31 | - 浏览器用 edge + 登陆同步 32 | - vscode + 登陆同步 33 | - 下载字体主要是 `JetBrains Mono` 和 `LXGW Mono` 34 | - 笔记软件是 Obsidian + GitHub 同步 35 | - 顺便配置了 Ubuntu 下的图床,仍旧是 PicGo + GitHub。有一些问题要看 issues。 36 | - 安装了一下 notion,好像官方没有提供 Linux 版本。 37 | - 安装 OCS 38 | - 输入法加强 39 | - [GitHub - Reverier-Xu/Ori-fcitx5](https://github.com/Reverier-Xu/Ori-Fcitx5) 40 | - [kancloud.cn/xhyx/xhyx/1917919](https://www.kancloud.cn/xhyx/xhyx/1917919) 41 | - [GitHub - cubercsl/rime-flypy: 小鹤音形 Rime 挂接 / Fcitx5 码表 For Linux & Android](https://github.com/cubercsl/rime-flypy) 42 | - [双拼练习 - 打字练习 - 在线打字练习(dazi.91xjr.com)](https://dazi.91xjr.com/typing/train/shuang.html) 43 | - 后来还是用了双拼而不是音形,感觉音形太复杂了。 44 | - 双拼直接在 fcitx5 中就有内置的,记得要去设置一下使用哪个方案,以及要开启云拼音 45 | 46 | ```zsh 47 | sudo apt install bat 48 | sudo apt install fd-find 49 | ``` 50 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/Makeflie Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Makeflie 3 | tags: 4 | - Tools 5 | - CheatSheet 6 | categories: graph 7 | date: 2024-10-12T13:01:56+0800 8 | modify: 2024-12-06T00:13:29+0800 9 | dir: Obsidian 10 | share: false 11 | --- 12 | 13 | # Makeflie Cheat Sheet 14 | 15 | ## Make 基础 16 | 17 | ### 什么是 Make 18 | 19 | Make 是一个自动化构建工具,使用 Makefile 文件来定义如何编译和链接程序。它通过检查文件的时间戳来决定哪些文件需要重新编译。 20 | 21 | ### Makefile 的基本结构 22 | 23 | Makefile 的基本结构由目标、依赖和命令组成,通常形式为: 24 | 25 | ``` 26 | target: dependencies 27 | command 28 | ``` 29 | 30 | ### Makefile 示例 31 | 32 | 让我们考虑一个简单的 C 语言项目,该示例将展示如何使用 Makefile 来编译一个具有多个源文件和头文件的程序,并展示 Makefile 相比手动命令行编译的优势。 33 | [编译进阶 - HPC入门指南](https://hpc-sjtu.github.io/HPC_Start_Guide/%E7%BC%96%E8%AF%91/complex/#makefile_1) 34 | 35 | ### Make 的常用命令 36 | 37 | - `make`:执行默认目标,与`make all`等效。 38 | - `make `:执行定义的``目标,如果没有这个目标将返回错误信息。 39 | - `make -j`:并行执行构建,使用本机的全部线程 40 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/adb Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: adb Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-01T14:22:36+08:00 7 | modify: 2025-02-01T14:22:36+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-01 11 | mdate: 2025-02-01 12 | --- 13 | 14 | # adb Cheat Sheet 15 | 16 | ``` 17 | ############################################################################## 18 | # ADB CHEATSHEET (中文速查表) - by baiguangan (created on 2018/03/2) 19 | # Version: 1, Last Modified: 2018/03/2 9:13 20 | # https://github.com/skywind3000/awesome-cheatsheets 21 | ############################################################################## 22 | 23 | 24 | ############################################################################## 25 | # 常用命令 26 | ############################################################################## 27 | 28 | devices # 查看已连接的设备 29 | start-server # 启动 adb server 30 | kill-server # 停止 adb server 31 | logcat # 查看日志 32 | install # 安装一个apk 33 | uninstall # 卸载一个apk 34 | shell # 进入终端 35 | 36 | ############################################################################## 37 | # 其他命令 38 | ############################################################################## 39 | 40 | help # 查看帮助信息 41 | version # 查看版本 42 | devices # 查看已连接的设备 43 | forward # 端口转发 44 | reverse # 反向端口转发 45 | bugreport # 生成adb出错报告 46 | install # 安装一个apk 47 | uninstall # 卸载一个apk 48 | disconnect # 断开设备 49 | tcpip # 侦听端口 50 | connect # 连接设备 51 | start-server # 启动 adb server 52 | kill-server # 停止 adb server 53 | logcat # 查看日志 54 | reboot # 重启 55 | push # 上传 56 | pull # 下载 57 | root # 以root权限重启adbd 58 | disable-verity # 禁用dm-verity以使/system分区可被修改 59 | remount # 以rw权限重新挂载/system分区 60 | get-serialno # 获取序列号 61 | shell # 进入终端 62 | shell screencap # 屏幕截图 63 | shell screenrecord # 录制视频 64 | shell pm list packages # 列出手机装的所有app的包名 65 | shell pm list packages -s # 列出系统应用的所有包名 66 | shell pm list packages -3 # 列出第三方应用的所有包名 67 | shell pm clear # 清除应用数据与缓存 68 | shell am start -n # 启动应用 69 | shell am force-stop # 停止应用 70 | shell am force-stop # 强制停止应用 71 | shell wm size # 查看屏幕分辨率 72 | shell wm density # 查看屏幕密度 73 | 74 | ############################################################################## 75 | # References 76 | ############################################################################## 77 | https://developer.android.google.cn/studio/command-line/adb.html 78 | 79 | 80 | ``` 81 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/ffmpeg Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ffmpeg Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-01T14:22:36+08:00 7 | modify: 2025-02-01T14:22:36+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-01 11 | mdate: 2025-02-01 12 | --- 13 | 14 | # ffmpeg Cheat Sheet 15 | 16 | ``` 17 | ############################################################################## 18 | # FFMPEG CHEATSHEET (中文速查表) - by skywind (created on 2020/09/20) 19 | # Version: 3, Last Modified: 2020/09/21 14:37 20 | # https://github.com/skywind3000/awesome-cheatsheets 21 | ############################################################################## 22 | 23 | 24 | ############################################################################## 25 | # 基础参数 26 | ############################################################################## 27 | 28 | -codecs # 列出可用编码 29 | -formats # 列出支持的格式 30 | -protocols # 列出支持的协议 31 | -i input.mp4 # 指定输入文件 32 | -c:v libx264 # 指定视频编码 33 | -c:a aac # 指定音频编码 34 | -vcodec libx264 # 旧写法 35 | -acodec aac # 旧写法 36 | -fs SIZE # 指定文件大小 37 | 38 | 39 | ############################################################################## 40 | # 音频参数 41 | ############################################################################## 42 | 43 | -aq QUALITY # 音频质量,编码器相关 44 | -ar 44100 # 音频采样率 45 | -ac 1 # 音频声道数量 46 | -an # 禁止音频 47 | -vol 512 # 改变音量为 200% 48 | 49 | 50 | ############################################################################## 51 | # 视频参数 52 | ############################################################################## 53 | 54 | -aspect RATIO # 长宽比 4:3, 16:9 55 | -r RATE # 每秒帧率 56 | -s WIDTHxHEIGHT # 视频尺寸:640x480 57 | -vn # 禁用视频 58 | 59 | 60 | ############################################################################## 61 | # 码率设置 62 | ############################################################################## 63 | 64 | -b:v 1M # 设置视频码率 1mbps/s 65 | -b:a 1M # 设置音频码率 1mbps/s 66 | 67 | 68 | ############################################################################## 69 | # 视频转码 70 | ############################################################################## 71 | 72 | ffmpeg -i input.mov output.mp4 # 转码为 MP4 73 | ffmpeg -i input.mp4 -vn -c:a copy output.aac # 提取音频 74 | ffmpeg -i input.mp4 -vn -c:a mp3 output.mp3 # 提取音频并转码 75 | ffmpeg -i input.mov -c:v libx264 -c:a aac -2 out.mp4 # 指定编码参数 76 | ffmpeg -i input.mov -c:v libvpx -c:a libvorbis out.webm # 转换 webm 77 | ffmpeg -i input.mp4 -ab 56 -ar 44100 -b 200 -f flv out.flv # 转换 flv 78 | ffmpeg -i input.mp4 -an animated.gif # 转换 GIF 79 | 80 | 81 | ############################################################################## 82 | # 切分视频 83 | ############################################################################## 84 | 85 | ffmpeg -i input.mp4 -ss 0 -t 60 first-1-min.mp4 # 切割开头一分钟 86 | ffmpeg -i input.mp4 -ss 60 -t 60 second-1-min.mp4 # 一分钟到两分钟 87 | ffmpeg -i input.mp4 -ss 00:01:23.000 -t 60 first-1-min.mp4 # 另一种时间格式 88 | 89 | 90 | ############################################################################## 91 | # 视频尺寸 92 | ############################################################################## 93 | 94 | ffmpeg -i input.mp4 -vf "scale=640:320" output.mp4 # 视频尺寸缩放 95 | ffmpeg -i input.mp4 -vf "crop=400:300:10:10" output.mp4 # 视频尺寸裁剪 96 | 97 | 98 | ############################################################################## 99 | # 其他用法 100 | ############################################################################## 101 | 102 | ffmpeg -i sub.srt sub.ass # 字幕格式转换 103 | ffmpeg -i input.mp4 -vf ass=sub.ass out.mp4 # 烧录字幕进视频 104 | ffmpeg -i "" out.mp4 # 下载视频 105 | 106 | 107 | ############################################################################## 108 | # 组合用法 109 | ############################################################################## 110 | 111 | # 给 gif 加上静音音轨并转换成 mp4 112 | ffmpeg -f lavfi -i anullsrc -i in.gif -c:v libx264 -c:a aac -shortest out.mp4 113 | 114 | # 给 gif 加上静音音轨并转换成 mp4,兼容手机播放 115 | ffmpeg -f lavfi -i anullsrc -i in.gif -c:v libx264 -c:a aac -shortest \ 116 | -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4 117 | 118 | 119 | ############################################################################## 120 | # 相关资源 121 | ############################################################################## 122 | 123 | https://cheatography.com/thetartankilt/cheat-sheets/ffmpeg/ 124 | http://qwinff.github.io/ 125 | 126 | 127 | 128 | ``` 129 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/mkdocs Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: mkdocs Cheat Sheet 3 | tags: 4 | - Mkdocs 5 | - 静态网站 6 | categories: 7 | date: 2025-02-19T14:16:57+08:00 8 | modify: 2025-02-19T14:16:57+08:00 9 | dir: 10 | share: false 11 | cdate: 2025-02-19 12 | mdate: 2025-02-19 13 | --- 14 | 15 | # mkdocs Cheat Sheet 16 | 17 | - [CDN + http2](https://zhuanlan.zhihu.com/p/675908515) 18 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/tmux Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: tmux Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-01T14:22:36+08:00 7 | modify: 2025-02-01T14:22:36+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-01 11 | mdate: 2025-02-01 12 | --- 13 | 14 | # tmux Cheat Sheet 15 | 16 | ## session 17 | 18 | ``` 19 | tmux # 创建新的 session 20 | tmux new -S name # 创建新的 session 并指定一个name 21 | tmux ls # 查看多少个后台工作的 session 22 | tmux a/at/attach # 重新连接 session 23 | tmux a/at/attach -t num # 如果有多个 session, 指定 session num 连接 24 | tmux kill-ses -t myses # kill 某个 session 25 | tmux kill-ses -a # kill 所有 session, 除了当前的 session 26 | tmux kill-ses -a -t myses # kill 所有 session, 除了 myses 27 | ``` 28 | 29 | ## 操作方式 30 | 31 | ``` 32 | + key # 默认为 ctrl + b 33 | + c # 表示先按 ctrl + b 再按 c 键 34 | ``` 35 | 36 | ## 帮助信息 37 | 38 | ``` 39 | + ? # 查看所有的 key map 40 | ``` 41 | 42 | ## window 操作 43 | 44 | ``` 45 | + c # 新建一个 window 46 | + n # 下一个 window 47 | + p # 上一个 window 48 | + w # 列出 window 49 | + & # 关闭当前 window 50 | + num[1-9] # 选定特定 num 的 window 51 | + f # 查找 window 52 | + , # 重命名 window 53 | + . # 移动 window 54 | ``` 55 | 56 | ## pane 操作 57 | 58 | ``` 59 | + % # 横向分裂 60 | + " # 纵向分裂 61 | + 方向键 # 在一个 window 中切换 pane 62 | + ctrl-方向键 # 调整 pane 大小 63 | + z # 全屏化当前 pane, 再次执行退出全屏 64 | + x # 关闭当前 pane 65 | + q # 显示 pane 编号 66 | + o # 跳到下一个 pane 67 | + { # 跟前一个编号的 pane 交换 68 | + } # 跟后一个编号的 pane 交换 69 | + ; # 跳转到上一个活跃的 pane 70 | + ! # 将 pane 转化为 window 71 | + # 改变 pane 的布局 72 | ``` 73 | 74 | ## session 75 | 76 | ``` 77 | + d # detach 整个session, 后续可以重新连接 78 | + s # 列出 session 79 | + $ # 重命名 session 80 | + ( # 跳到上一个 seesion 81 | + ) # 跳到下一个 seesion 82 | ``` 83 | 84 | ## Misc 85 | 86 | ``` 87 | + t # 显示时钟 88 | + : # 命令行 89 | ``` 90 | 91 | ## pane 同步 92 | 93 | ``` 94 | :setw synchronize-panes # 打开(关闭) pane 同步模式, 发送命令到所有的 pane 中 95 | # 只影响当前 window 的 pane 96 | ``` 97 | 98 | ## 复制模式 (copy-mode) 99 | 100 | 添加下面一行到 $HOME/.tmux.conf, 通过 vim 的快捷键实现浏览, 复制等操作; 101 | 102 | `setw -g mode-keys vi` 103 | 104 | 更多 vim 快捷键可参考 ../editors/vim.txt, 以下列出一些常用快捷键. 105 | 106 | ``` 107 | + [ # 进入 copy mode 108 | 109 | vi emacs 功能 110 | ^ M-m # 跳转到一行开头 111 | Escape C-g # 放弃选择 112 | k Up # 上移 113 | j Down # 下移 114 | h Left # 左移 115 | l Right # 右移 116 | L # 最后一行 117 | M M-r # 中间一行 118 | H M-R # 第一行 119 | $ C-e # 跳转到行尾 120 | : g # 跳转至某一行 121 | C-d M-Down # 下翻半页 122 | C-u M-Up # 上翻半页 123 | C-f Page down # 下翻一页 124 | C-b Page up # 上翻一页 125 | w M-f # 下一个字符 126 | b M-b # 前一个字符 127 | q Escape # 退出 128 | ? C-r # 往上查找 129 | / C-s # 往下查找 130 | n n # 查找下一个 131 | 132 | Space C-Space # 进入选择模式 133 | Enter M-w # 确认选择内容, 并退出 134 | 135 | + ] # 粘贴选择内容(粘贴 buffer_0 的内容) 136 | 137 | :show-buffer # 显示 buffer_0 的内容 138 | :capture-buffer # 复制整个能见的内容到当前的 buffer 139 | :list-buffers # 列出所有的 buffer 140 | :choose-buffer # 列出所有的 buffer, 并选择用于粘贴的 buffer 141 | :save-buffer buf.txt # 将 buffer 的内容复制到 buf.txt 142 | :delete-buffer -b 1 # 删除 buffer_1 143 | ``` 144 | 145 | ## mouse-mode 146 | 147 | ``` 148 | :set -g mouse on # 打开鼠标模式 149 | ``` 150 | 151 | ## References 152 | 153 | - https://gist.github.com/MohamedAlaa/2961058 154 | - https://tmuxcheatsheet.com/ 155 | - 所有的快捷键都有对应的 command, 参考: 156 | - http://man.openbsd.org/OpenBSD-current/man1/tmux.1 157 | - 可以通过 $HOME/.tmux.conf 更改配置, 参考一些比较好的 tmux 配置: 158 | - https://github.com/gpakosz/.tmux 159 | - [Tmux 配置:打造最适合自己的终端复用工具 - zuorn - 博客园](https://www.cnblogs.com/zuoruining/p/11074367.html) 160 | 161 | ## 配置文件 162 | 163 | ```.tmux.conf 164 | # 设置前缀键为 Ctrl+a 165 | set-option -g set-titles-string '#h - tmux (#S)' 166 | 167 | # 状态栏内容 168 | set-option -g status-left '[#S]' 169 | set-option -g status-right '[#I:#P] | %a %Y-%m-%d %H:%M' 170 | 171 | # 设置默认命令为 zsh 172 | set-option -g default-command "zsh" 173 | 174 | # 更换左右窗口快捷键 175 | bind-key -r h select-pane -L 176 | bind-key -r j select-pane -D 177 | bind-key -r k select-pane -U 178 | bind-key -r l select-pane -R 179 | 180 | # 快速切换窗口 181 | bind -r C-h select-window -p 182 | bind -r C-l select-window -n 183 | 184 | # 分离 / 重新连接会话 185 | bind d detach 186 | bind C-r source-file ~/.tmux.conf \; display "配置已重新加载!" 187 | 188 | # 连接已有会话 189 | bind C-c new-window -c '#{pane_current_path}' 190 | 191 | # 切换分屏 192 | bind \\ split-window -v 193 | bind-key v split-window -h 194 | bind-key s split-window -v 195 | 196 | # 复制模式 197 | bind-key [ copy-mode 198 | bind-key ] paste-buffer 199 | 200 | # 设置默认分屏的方向 201 | bind-key '"' split-window -h 202 | bind-key % split-window -v 203 | 204 | # 设置默认的窗口标题 205 | set-option -g set-titles on 206 | 207 | # 窗口永久关闭 208 | bind-key & confirm-before -p "是否杀死窗口 #W? (y/n)" kill-window 209 | 210 | # 复制模式下方便的选词选段 211 | bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard" 212 | unbind -T copy-mode-vi Enter 213 | bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard" 214 | 215 | # 设置其他快捷键 216 | bind-key M-1 select-window -t :1 217 | bind-key M-2 select-window -t :2 218 | bind-key M-3 select-window -t :3 219 | bind-key M-4 select-window -t :4 220 | bind-key M-5 select-window -t :5 221 | bind-key M-6 select-window -t :6 222 | bind-key M-7 select-window -t :7 223 | bind-key M-8 select-window -t :8 224 | bind-key M-9 select-window -t :9 225 | bind-key M-0 select-window -t :10 226 | 227 | # 禁用警告音 228 | set -g bell-action none 229 | ``` 230 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/wandb Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: wandb Cheat Sheet 3 | tags: 4 | - CheatSheet 5 | categories: 6 | date: 2025-02-07T11:22:35+08:00 7 | modify: 2025-02-07T11:22:35+08:00 8 | dir: 9 | share: false 10 | cdate: 2025-02-07 11 | mdate: 2025-02-07 12 | --- 13 | 14 | # wandb Cheat Sheet 15 | 16 | ``` 17 | wandb init 18 | ``` 19 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/zotero Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: zotero 使用指南 3 | tags: 4 | - Tools 5 | - CheatSheet 6 | categories: 7 | date: 2024-12-23T12:16:42+08:00 8 | modify: 2024-12-23T12:16:42+08:00 9 | dir: 10 | share: false 11 | cdate: 2024-12-23 12 | mdate: 2024-12-23 13 | --- 14 | 15 | # zotero 使用指南 16 | 17 | - [zotero 使用指南](https://blog.csdn.net/l903445981/article/details/119960684) 18 | - [Zotero 中文社区 \| Zotero 中文维护小组](https://zotero-chinese.com/) 19 | - [ZOTERO 与 Obsidian 笔记插入和联动(含美化的笔记模板)](https://zhuanlan.zhihu.com/p/677461923) 20 | - [ZOTERO 于 Obsidian 联动方案](https://zhuanlan.zhihu.com/p/651144180) 21 | - 看了一圈下来,感觉现有方案都不太符合心意,于是不折腾了。不如让 zotero 和 obsidian 分开,真要做笔记的时候肯定是直接写出来的,没必要交织在一起了。 22 | - 安装了一个插件 translate to pdf 以外就没有搞什么了。 23 | 24 | aqbwc7e4ezzawrgh 25 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/小鹤双拼 Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 小鹤双拼 3 | tags: 4 | - 输入法 5 | - Tools 6 | - CheatSheet 7 | categories: 8 | date: 2025-02-19T08:13:16+08:00 9 | modify: 2025-02-19T08:13:16+08:00 10 | dir: 11 | share: false 12 | cdate: 2025-02-19 13 | mdate: 2025-02-19 14 | --- 15 | 16 | # 小鹤双拼 17 | 18 | - [双拼练习 - 打字练习 - 在线打字练习(dazi.91xjr.com)](https://dazi.91xjr.com/typing/train/shuang.html) 19 | 20 | ## win 11 安装 21 | 22 | ```txt 23 | Windows Registry Editor Version 5.00 24 | 25 | [HKEY_CURRENT_USER\Software\Microsoft\InputMethod\Settings\CHS] 26 | "Enable Cloud Candidate"=dword:00000000 27 | "Enable Dynamic Candidate Ranking"=dword:00000001 28 | "EnableExtraDomainType"=dword:00000001 29 | "Enable self-learning"=dword:00000001 30 | "EnableSmartSelfLearning"=dword:00000001 31 | "EnableLiveSticker"=dword:00000000 32 | "Enable EUDP"=dword:00000001 33 | "Enable Double Pinyin"=dword:00000001 34 | "UserDefinedDoublePinyinScheme0"="小鹤双拼*2*^*iuvdjhcwfg^xmlnpbksqszxkrltvyovt" 35 | "DoublePinyinScheme"=dword:0000000a 36 | ``` 37 | 38 | 然后把这个变成 reg 39 | -------------------------------------------------------------------------------- /docs/Tools/Cheat Sheet/tools/远程连接 Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 远程连接 Cheat Sheet 3 | tags: 4 | - Tools 5 | - CheatSheet 6 | categories: graph 7 | date: 2024-10-12T13:01:56+0800 8 | modify: 2024-12-06T00:13:45+0800 9 | dir: Obsidian 10 | share: false 11 | --- 12 | 13 | # 远程连接 Cheat Sheet 14 | 15 | - [串流游戏百问百答(4):PC进阶 | Parsec使用指南 - 哔哩哔哩](https://www.bilibili.com/read/cv32334628) 16 | - [win11使用ipad(平板)做副屏,纯软件实现方案【无需虚拟显示器】 - 哔哩哔哩](https://www.bilibili.com/read/cv23432170/#:~:text=%E6%89%93%E5%BC%80%E5%B9%B3%E6%9D%BF%E7%AB%AF%E7%9A%84moon) 17 | - [zhuanlan.zhihu.com/p/657881254](https://zhuanlan.zhihu.com/p/657881254) 18 | - [使用Sunshine+Moonlight实现游戏远程串流教程](https://www.hangge.com/blog/cache/detail_3544.html#:~:text=Sunshine%20+) 19 | - [Parsec介绍及快速配置 - Makise](https://makise.xlog.app/parsec?) 20 | - [ipads 用 moonlight + sunshine 实现副屏方案](https://zhuanlan.zhihu.com/p/669124021#:~:text=%E3%80%90%E6%93%8D%E4%BD%9C%E6%AD%A5%E9%AA%A4%E3%80%91%201.%E8%BD%AF) 21 | - [如何远程操作电脑](https://obsidian.zerokei.top/Hub/%E5%A6%82%E4%BD%95%E8%BF%9C%E7%A8%8B%E6%93%8D%E4%BD%9C%E7%94%B5%E8%84%91/) 22 | - [Sunshine + Moonlight 熄屏串流方式 - 哔哩哔哩](https://www.bilibili.com/read/cv30603647/#:~:text=%E7%94%B1%E4%BA%8E%E4%B9%8B%E5%89%8D%E6%9C%89%E6%AE%B5%E6%97%B6%E9%97%B4%E4%B8%8D%E5%9C%A8) 23 | - [如何使用虚拟机](https://blog.csdn.net/m0_66480474/article/details/142535224#:~:text=parsec%E6%98%AF%E4%B8%80%E6%AC%BE%E7%9B%B8) 24 | -------------------------------------------------------------------------------- /docs/Tools/Environment/Arch_setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: arch 配置 3 | tags: 4 | - arch 5 | - Environment 6 | categories: 7 | date: 2025-02-09T22:08:30+08:00 8 | modify: 2025-02-09T22:08:30+08:00 9 | dir: 10 | share: false 11 | cdate: 2025-02-09 12 | mdate: 2025-02-09 13 | --- 14 | 15 | # Arch 配置 16 | 17 | ## preprocess 18 | 19 | - 删除卷 20 | - 高级启动 `F12` 21 | 22 | ## install 23 | 24 | ```shell 25 | systemctl stop reflector.service 26 | systemctl status reflector.service 27 | 28 | ls /sys/firmware/efi/efivars 29 | 30 | iwctl # 进入交互式命令行 31 | device list # 列出无线网卡设备名,比如无线网卡看到叫 wlan0 32 | station wlan0 scan # 扫描网络 33 | station wlan0 get-networks # 列出所有 wifi 网络 34 | station wlan0 connect wifi-name # 进行连接,注意这里无法输入中文。回车后输入密码即可 35 | exit # 连接成功后退出 36 | 37 | ping www.bilibili.com 38 | 39 | timedatectl set-ntp true # 将系统时间与网络时间进行同步 40 | timedatectl status # 检查服务状态 41 | ``` 42 | 43 | ```shell 44 | vim /etc/pacman.d/mirrorlist 45 | 46 | Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch # 中国科学技术大学开源镜像站 47 | Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch # 清华大学开源软件镜像站 48 | Server = https://repo.huaweicloud.com/archlinux/$repo/os/$arch # 华为开源镜像站 49 | Server = http://mirror.lzu.edu.cn/archlinux/$repo/os/$arch # 兰州大学开源镜像站 50 | ``` 51 | 52 | ```shell 53 | lsblk # 显示当前分区情况 54 | 55 | # 分区+挂载 ext4 or btrfs 56 | ``` 57 | 58 | ```shell 59 | pacstrap /mnt base base-devel linux linux-firmware btrfs-progs 60 | # 如果使用btrfs文件系统,额外安装一个btrfs-progs包 61 | pacstrap /mnt networkmanager vim sudo zsh zsh-completions 62 | ``` 63 | 64 | ```shell 65 | genfstab -U /mnt > /mnt/etc/fstab 66 | cat /mnt/etc/fstab 67 | ``` 68 | 69 | ```shell 70 | arch-chroot /mnt 71 | ``` 72 | 73 | ```shell 74 | vim /etc/hostname 75 | 76 | vim /etc/hosts 77 | 78 | 127.0.0.1 localhost 79 | ::1 localhost 80 | 127.0.1.1 myarch.localdomain myarch 81 | 82 | ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 83 | 84 | vim /etc/locale.gen #编辑 `/etc/locale.gen`,去掉 `en_US.UTF-8 UTF-8` 以及 `zh_CN.UTF-8 UTF-8` 行前的注释符号 85 | 86 | echo 'LANG=en_US.UTF-8' > /etc/locale.conf 87 | 88 | useradd -m -g users -G wheel lingxi 89 | 90 | # %wheel ALL=(ALL:ALL) ALL 91 | 92 | passwd root 93 | 94 | cat /proc/cpuinfo | grep "model name" 95 | 96 | pacman -S intel-ucode # Intel 97 | pacman -S amd-ucode # AMD 98 | 99 | pacman -S networkmanager 100 | systemctl enable NetworkManager.service 101 | 102 | pacman -S grub efibootmgr os-prober 103 | 104 | grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB --removable 105 | # 说明: 106 | # --target 指定目标平台为x86_64-efi 107 | # --efi-directory 指定EFI分区的路径 108 | # --bootloader-id 指定引导程序的ID 109 | # --removable 选项表示安装到可移动设备上,可不选 110 | ``` 111 | 112 | 编辑`/etc/default/grub`文件,将`"GRUB_TIMEOUT=5"`修改为`"GRUB_TIMEOUT=30"`; 113 | 114 | 将 `"GRUB_CMDLINE_LINUX_DEFAULT="` 后面的参数修改为 `"loglevel=5 nowatchdog"` 。当然你也可以修改为”loglevel=7”使用最高日志等级来装逼,这将会输出全部内核日志 115 | 116 | ```shell 117 | grub-mkconfig -o /boot/grub/grub.cfg 118 | 119 | ``` 120 | 121 | ```shell 122 | vim /etc/pacman.conf 123 | 124 | [multilib] 125 | 126 | [archlinuxcn] 127 | Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch # 中国科学技术大学开源镜像站 128 | Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch # 清华大学开源软件镜像站 129 | Server = https://mirrors.hit.edu.cn/archlinuxcn/$arch # 哈尔滨工业大学开源镜像站 130 | Server = https://repo.huaweicloud.com/archlinuxcn/$arch # 华为开源镜像站 131 | 132 | pacman -Syyu 133 | 134 | pacman -S plasma-meta konsole dolphin # plasma-meta 元软件包、konsole 终端模拟器和 dolphin 文件管理器 135 | 136 | systemctl enable sddm 137 | systemctl start sddm # 直接启动显示管理器,与以下reboot命令二选一即可 138 | 139 | sudo pacman -S sof-firmware alsa-firmware alsa-ucm-conf # 声音固件 140 | sudo pacman -S ntfs-3g # 使系统可以识别 NTFS 格式的硬盘 141 | sudo pacman -S adobe-source-han-serif-cn-fonts wqy-zenhei # 安装几个开源中文字体。一般装上文泉驿就能解决大多 wine 应用中文方块的问题 142 | sudo pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra # 安装谷歌开源字体及表情 143 | sudo pacman -S firefox chromium # 安装常用的火狐、chromium 浏览器 144 | sudo pacman -S ark # 压缩软件。在 dolphin 中可用右键解压压缩包 145 | sudo pacman -S packagekit-qt6 packagekit appstream-qt appstream # 确保 Discover(软件中心)可用,需重启 146 | sudo pacman -S gwenview # 图片查看器 147 | sudo pacman -S steam # 游戏商店。稍后看完显卡驱动章节再使用 148 | sudo pacman -S archlinuxcn-keyring # cn 源中的签名(archlinuxcn-keyring 在 archlinuxcn) 149 | sudo pacman -S yay # yay 命令可以让用户安装 AUR 中的软件(yay 在 archlinuxcn) 150 | 151 | sudo pacman -S fcitx5-im # 输入法基础包组 152 | sudo pacman -S fcitx5-chinese-addons # 官方中文输入引擎 153 | sudo pacman -S fcitx5-anthy # 日文输入引擎 154 | sudo pacman -S fcitx5-pinyin-moegirl # 萌娘百科词库。二刺猿必备(archlinuxcn) 155 | sudo pacman -S fcitx5-material-color # 输入法主题 156 | 157 | vim ~/.config/environment.d/im.conf 158 | 159 | # fix fcitx problem 160 | GTK_IM_MODULE=fcitx 161 | QT_IM_MODULE=fcitx 162 | XMODIFIERS=@im=fcitx 163 | SDL_IM_MODULE=fcitx 164 | GLFW_IM_MODULE=ibus 165 | 166 | sudo systemctl enable --now bluetooth 167 | 168 | sudo pacman -S timeshift 169 | sudo systemctl enable --now cronie.service 170 | ``` 171 | ## zsh 172 | 173 | ```shell 174 | sudo pacman -S zsh 175 | sh -c "$(curl -fsSL https://gitee.com/shmhlsy/oh-my-zsh-install.sh/raw/master/install.sh)" # 会覆盖 ~/.zshrc 176 | sudo chsh -s /usr/bin/zsh 177 | 178 | 179 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting 180 | 181 | git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions 182 | 183 | git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k 184 | ``` 185 | 186 | ```shell 187 | git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf 188 | ~/.fzf/install 189 | 190 | sudo pacman -S zsh-completions docker man-db exa bat tealdeer proxychains htop 191 | 192 | sudo pacman -S man-pages-zh_cn man-pages-zh_tw 193 | ``` 194 | 195 | ```shell 196 | sudo pacman -S thefuck git-delta fd ripgrep bottom dust zoxide procs sd gitui 197 | curl 198 | sudo pacman -S thefuck 199 | sudo pacman -S git-delta 200 | slides/slidev 201 | sudo pacman -S fd 202 | sudo pacman -S ripgrep 203 | bat 204 | exa 205 | sudo pacman -S bottom 206 | sudo pacman -S fud 207 | sudo pacman -S dust 208 | sudo pacman -S zoxide # do not use with z and autojump 209 | sudo pacman -S procs 210 | sudo pacman -S sd 211 | yay -S joshuto 212 | sudo pacman -S gitui 213 | yay -S lazydocker 214 | yay -S downgrade 215 | ``` 216 | 217 | ```shell 218 | email: mutt/neomutt 219 | translator: pot 220 | yay -S pot-translation 221 | ``` 222 | 223 | ## 软件 224 | 225 | ```shell 226 | yay -S linuxqq 227 | yay -S wechat 228 | yay -S telegram-desktop 229 | yay -S visual-studio-code-bin 230 | yay -S Okular 231 | yay -S Gwenview 232 | yay -S OBS 233 | yay -S KDEConnect 234 | yay -S Clash-verge-rev-bin 235 | yay -S Kate 236 | yay -S Filelight 237 | 238 | yay -S plasma-applet-window-buttons 239 | yay -S plasma6-applets-window-title 240 | yay -S plasma6-applets-panel-colorizer 241 | yay -S kwin-effect-rounded-corners-git 242 | ``` 243 | 244 | ## GRUB 美化 245 | 246 | ```shell 247 | git clone https://github.com/vinceliuice/grub2-themes.git 248 | 249 | [bigSur](https://www.pling.com/p/1443844) 250 | ``` 251 | 252 | ## 主题 253 | 254 | - WhiteSur 255 | - Kvantum -> KvMojave 256 | -------------------------------------------------------------------------------- /docs/Tools/Environment/Ubuntu_setup.md: -------------------------------------------------------------------------------- 1 | # Ubuntu 配置 2 | - [在 Ubuntu 安装配置 Fcitx 5 中文输入法 - muzing的杂货铺](https://muzing.top/posts/3fc249cf/#:~:text=Fcitx%205%20%E6%8F%90%E4%BE%9B) 3 | - [fcitx5-rime 挂接小鹤音形 | rovo98's Blog](https://rovo98.github.io/posts/2f1de6fa/#:~:text=%E4%BD%BF%E7%94%A8%20fcitx5-) 4 | - [zhuanlan.zhihu.com/p/660191327#:\~:text=Tabby(以前称为](https://zhuanlan.zhihu.com/p/660191327#:~:text=Tabby%EF%BC%88%E4%BB%A5%E5%89%8D%E7%A7%B0%E4%B8%BA) 5 | - [Zsh 安装与配置,使用 Oh-My-Zsh 美化终端 | Leehow的小站](https://www.haoyep.com/posts/zsh-config-oh-my-zsh/) 6 | - [zhuanlan.zhihu.com/p/658811059](https://zhuanlan.zhihu.com/p/658811059) 7 | - [PKMer\_TiddyWiki 简易指南](https://pkmer.cn/Pkmer-Docs/12-tiddywiki/tiddywiki/) 8 | - [Site Unreachable](https://docusaurus.nodejs.cn/docs) 9 | - [Jedsek | Blog](https://jedsek.xyz/posts/desktop-beautify/gnome/) 10 | 11 | ```shell 12 | visudo /etc/sudoers 13 | %sudo ALL=(ALL:ALL) NOPASSWD: ALL 14 | ``` 15 | 16 | ```shell 17 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting 18 | 19 | git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions 20 | 21 | git clone git://github.com/joelthelion/autojump.git 22 | cd autojump 23 | ./install.py 24 | 25 | [[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh 26 | ``` 27 | 28 | - 截图软件 29 | 30 | ```shell 31 | sudo apt-get install flameshot 32 | flameshot gui 33 | 34 | ``` 35 | 36 | - [在 Ubuntu 22.04|20.04|18.04 上安装 Node.js 20](https://cn.linux-console.net/?p=20486) 37 | -------------------------------------------------------------------------------- /docs/Tools/Environment/environment.md: -------------------------------------------------------------------------------- 1 | - [开发环境构建指南](https://wangloo.github.io/posts/tools/dev_env/) 2 | - [从零开始配置 Windows • Arthals' ink](https://arthals.ink/blog/initialize-windows) 3 | - [从零开始配置 Linux • Arthals' ink](https://arthals.ink/blog/initialize-linux) 4 | - [服务器环境配置 Cheat Sheet | Yi Pan (Conless)](https://conless.dev/blog/2024/server-cheatsheet/) 5 | - clash 6 | - powertoy 7 | - gsudo 8 | - git 9 | - [GitHub - Wybxc/git-remake-guide: Git 重开/重学指南](https://github.com/Wybxc/git-remake-guide) 10 | - picgo 11 | - [picgo + github + obsidian](https://blog.csdn.net/m0_73255659/article/details/138232206) 12 | - vscode 13 | - [系统 + 代码字体设置](https://blog.csdn.net/m0_46491549/article/details/134024757) 14 | - [zhuanlan.zhihu.com/p/603687041#:\~:text=clangd官方vs](https://zhuanlan.zhihu.com/p/603687041#:~:text=clangd%E5%AE%98%E6%96%B9vs) 15 | - [zhuanlan.zhihu.com/p/398790625#:\~:text=其中 VS Code](https://zhuanlan.zhihu.com/p/398790625#:~:text=%E5%85%B6%E4%B8%AD%20VS%20Code) 16 | - tools 17 | - [GitHub - jenius-apps/ambie: An app that uses white noise, nature sounds, and focus features to boost your productivity.](https://github.com/jenius-apps/ambie) 18 | - clash 19 | - [GitHub - Loyalsoldier/clash-rules: 🦄️🎃👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 等基于 Clash Premium 内核的客户端。](https://github.com/Loyalsoldier/clash-rules) 20 | - [Site Unreachable](https://docs.gtk.pw/) 21 | - [翻墙 | Blog](https://www.zizheng.life/article/bcea86ad-c006-462c-b56e-8cf84d14e4ba) 22 | - [GitHub - vpncn/vpncn.github.io: 2024中国翻墙软件VPN推荐以及科学上网避坑,稳定好用。对比SSR机场、蓝灯、V2ray、老王VPN、VPS搭建梯子等科学上网与翻墙软件,中国最新科学上网翻墙梯子VPN下载推荐,访问Chatgpt。](https://github.com/vpncn/vpncn.github.io) 23 | - Typora 24 | - [GitHub - sylviaxgj/typora-forest-theme: another typora theme](https://github.com/sylviaxgj/typora-forest-theme) 25 | - [GitHub - HappySimple/Typora-theme-Happysimple: 一款自制的Markdown主题!](https://github.com/HappySimple/Typora-theme-Happysimple) 26 | - github profiles 27 | - [GitHub - anuraghazra/github-readme-stats: :zap: Dynamically generated stats for your github readmes](https://github.com/anuraghazra/github-readme-stats) 28 | - github action 29 | - gsudo 30 | - openArk 31 | -------------------------------------------------------------------------------- /docs/Tools/Make/CMake.md: -------------------------------------------------------------------------------- 1 | # CMake 相关 2 | 3 | ## 1 构建最小项目 4 | 5 | - CMake 支持大写、小写和混合大小写命令、 6 | 7 | ``` 8 | mkdir build 9 | cd build 10 | cmake -G"MinGW Makefiles" .. 11 | cmake --build . 12 | ``` 13 | 14 | 之后会生成可执行文件 15 | 16 | ```text 17 | step1/ 18 | build/ 19 | CMakeLists.txt 20 | tutorial.cpp 21 | ``` 22 | 23 | ## 2 优化 CMakeLists. txt 文件 24 | 25 | ```cmake 26 | cmake_minimum_required(VERSION 3.15) 27 | 28 | # set the project name 29 | project(Tutorial) 30 | 31 | SET(SRC_LIST tutorial.cpp) 32 | 33 | # add the executable 34 | add_executable(${PROJECT_NAME} ${SRC_LIST}) 35 | ``` 36 | 37 | 1.0.2 分别对应 MAJOR MINOR PATCH 38 | 39 | - set 和 PROJECT_NAME 40 | - 添加版本号和配置头文件 41 | - 添加编译时间戳 42 | - 指定 C++标准 43 | - 添加库(添加库的位置,库文件名,头文件名) 44 | - 将库设置为可选项(分经典和现代) 45 | - 添加库的使用要求 46 | - INTERFACE 47 | - PRIVATE 48 | - PUBLIC 49 | - 静态链接库/动态链接库 50 | - build 目录介绍 51 | 52 | ## links 53 | 54 | - [Site Unreachable](https://www.runoob.com/cmake/cmake-tutorial.html) 55 | - [IPADS新人培训第二讲:CMake\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV14h41187FZ/) 56 | -------------------------------------------------------------------------------- /docs/Tools/Make/Makeflie.md: -------------------------------------------------------------------------------- 1 | ## Make 基础 2 | 3 | ### 什么是 Make 4 | 5 | Make 是一个自动化构建工具,使用 Makefile 文件来定义如何编译和链接程序。它通过检查文件的时间戳来决定哪些文件需要重新编译。 6 | 7 | ### Makefile 的基本结构 8 | 9 | Makefile 的基本结构由目标、依赖和命令组成,通常形式为: 10 | 11 | ``` 12 | target: dependencies 13 | command 14 | ``` 15 | 16 | ### Makefile 示例 17 | 18 | 让我们考虑一个简单的 C 语言项目,该示例将展示如何使用 Makefile 来编译一个具有多个源文件和头文件的程序,并展示 Makefile 相比手动命令行编译的优势。 19 | [编译进阶 - HPC入门指南](https://hpc-sjtu.github.io/HPC_Start_Guide/%E7%BC%96%E8%AF%91/complex/#makefile_1) 20 | 21 | ### Make 的常用命令 22 | 23 | - `make`:执行默认目标,与`make all`等效。 24 | - `make `:执行定义的``目标,如果没有这个目标将返回错误信息。 25 | - `make -j`:并行执行构建,使用本机的全部线程 26 | -------------------------------------------------------------------------------- /docs/Tools/Others/Chezmoi.md: -------------------------------------------------------------------------------- 1 | # 用 chezmoi 实现跨设备同步配置 2 | 3 | 本指南将帮助你使用 chezmoi 管理你的配置文件(dotfiles),并使用包管理器维护软件列表。 4 | 5 | ## 前期准备 6 | 7 | ### 1. 需要的工具 8 | 9 | - Git 10 | - GitHub 账号 11 | - chezmoi 12 | - 包管理器(Windows: Scoop, Ubuntu: apt/snap) 13 | 14 | ### 2. 重要的配置文件 15 | 16 | **Windows 常用配置文件**: 17 | 18 | ``` 19 | %USERPROFILE%/ 20 | ├── .gitconfig # Git配置 21 | ├── .ssh/ # SSH配置 22 | ├── Documents/ 23 | │ └── PowerShell/ 24 | │ └── Microsoft.PowerShell_profile.ps1 # PowerShell配置 25 | ├── AppData/ 26 | │ ├── Roaming/ 27 | │ │ └── Code/ 28 | │ │ └── User/ 29 | │ │ └── settings.json # VSCode配置 30 | │ └── Local/ 31 | └── .config/ 32 | └── scoop/ 33 | └── config.json # Scoop配置 34 | ``` 35 | 36 | **Ubuntu 常用配置文件**: 37 | 38 | ``` 39 | ~/ 40 | ├── .bashrc # Bash配置 41 | ├── .zshrc # Zsh配置 42 | ├── .gitconfig # Git配置 43 | ├── .ssh/ # SSH配置 44 | └── .config/ 45 | ├── Code/ 46 | │ └── User/ 47 | │ └── settings.json # VSCode配置 48 | └── tabby/ 49 | └── config.yaml # Tabby终端配置 50 | ``` 51 | 52 | ## GitHub 设置 53 | 54 | ### 1. 创建 GitHub 仓库 55 | 56 | 1. 访问 GitHub 并登录 57 | 2. 点击 "New repository" 58 | 3. 仓库名称设置为 `dotfiles` 59 | 4. 设置为 Public(推荐) 60 | 5. 不要初始化 README(我们将从本地初始化) 61 | 6. 创建仓库 62 | 63 | ### 2. 配置 SSH 密钥(如果还没有) 64 | 65 | ```bash 66 | # 生成SSH密钥 67 | ssh-keygen -t ed25519 -C "your_email@example.com" 68 | 69 | # 将公钥添加到GitHub 70 | # 1. 复制公钥内容 71 | cat ~/.ssh/id_ed25519.pub 72 | # 2. 访问 GitHub → Settings → SSH and GPG keys → New SSH key 73 | # 3. 粘贴公钥内容并保存 74 | ``` 75 | 76 | ## Windows 配置 77 | 78 | ### 1. 安装必要工具 79 | 80 | 使用 PowerShell(以管理员身份运行): 81 | 82 | ```powershell 83 | # 安装Scoop 84 | Set-ExecutionPolicy RemoteSigned -Scope CurrentUser 85 | irm get.scoop.sh | iex 86 | 87 | # 安装Git(如果还没有) 88 | scoop install git 89 | 90 | # 安装chezmoi 91 | scoop install chezmoi 92 | ``` 93 | 94 | ### 2. 初始化 chezmoi 95 | 96 | ```powershell 97 | # 初始化chezmoi并克隆你的仓库 98 | chezmoi init --apply https://github.com/yourusername/dotfiles.git 99 | # 用 ssh 也可以 100 | 101 | # 查看chezmoi将进行的更改 102 | chezmoi diff 103 | 104 | # 将现有配置文件添加到chezmoi 105 | chezmoi add $HOME/.gitconfig 106 | chezmoi add $HOME/.ssh/config 107 | chezmoi add $HOME/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 108 | chezmoi add $HOME/AppData/Roaming/Code/User/settings.json 109 | 110 | # 提交并推送更改 111 | chezmoi cd 112 | git add . 113 | git commit -m "Initial Windows config" 114 | git push 115 | ``` 116 | 117 | ### 3. 导出软件包列表 118 | 119 | ```powershell 120 | # 导出Scoop包列表 121 | scoop export > packages/scoop-packages.txt 122 | 123 | # 提交包列表 124 | chezmoi cd 125 | git add packages/scoop-packages.txt 126 | git commit -m "Add Windows package list" 127 | git push 128 | ``` 129 | 130 | ## Ubuntu 配置 131 | 132 | ### 1. 安装必要工具 133 | 134 | ```bash 135 | # 安装Git(如果还没有) 136 | sudo apt update 137 | sudo apt install git 138 | 139 | # 安装chezmoi 140 | sh -c "$(curl -fsLS get.chezmoi.io)" 141 | ``` 142 | 143 | 参考这个网站 [Install - chezmoi](https://www.chezmoi.io/install/) 进行下载,我命令行一直不成功,直接选择对应的包就行了。 144 | 145 | ``` 146 | sudo dpkg -i chezmoi_2.54.0_linux_amd64.deb 147 | chezmoi --version 148 | ``` 149 | 150 | ### 2. 初始化 chezmoi 151 | 152 | ```bash 153 | # 初始化chezmoi并克隆你的仓库 154 | chezmoi init --apply https://github.com/yourusername/dotfiles.git 155 | 156 | # 查看chezmoi将进行的更改 157 | chezmoi diff 158 | 159 | # 将现有配置文件添加到chezmoi 160 | chezmoi add ~/.bashrc 161 | chezmoi add ~/.zshrc 162 | chezmoi add ~/.gitconfig 163 | chezmoi add ~/.ssh/config 164 | chezmoi add ~/.config/Code/User/settings.json 165 | 166 | # 提交并推送更改 167 | chezmoi cd 168 | git add . 169 | git commit -m "Initial Ubuntu config" 170 | git push 171 | ``` 172 | 173 | ### 3. 导出软件包列表 174 | 175 | ```bash 176 | chezmoi cd 177 | mkdir packages 178 | # 导出apt包列表 179 | dpkg --get-selections | grep -v deinstall | awk '{print $1}' > packages/apt-packages.txt 180 | 181 | # 导出snap包列表 182 | snap list | awk '{if (NR>1) print $1}' > packages/snap-packages.txt 183 | 184 | # 提交包列表 185 | git add packages/apt-packages.txt packages/snap-packages.txt 186 | git commit -m "Add Ubuntu package lists" 187 | git push 188 | ``` 189 | 190 | ## 日常使用 191 | 192 | ### 1. 更新配置 193 | 194 | 当你修改了配置文件后: 195 | 196 | ```bash 197 | # 将更改添加到chezmoi 198 | chezmoi add ~/.bashrc # 或其他修改的配置文件 199 | 200 | # 查看更改 201 | chezmoi diff 202 | 203 | # 提交并推送更改 204 | chezmoi cd 205 | git add . 206 | git commit -m "Update bashrc" 207 | git push 208 | ``` 209 | 210 | ### 2. 在其他机器上同步 211 | 212 | ```bash 213 | # 拉取并应用最新更改 214 | chezmoi update 215 | ``` 216 | 217 | ### 3. 更新软件包列表 218 | 219 | Windows: 220 | 221 | ```powershell 222 | # 更新Scoop包列表 223 | scoop export > packages/scoop-packages.txt 224 | ``` 225 | 226 | Ubuntu: 227 | 228 | ```bash 229 | # 更新apt包列表 230 | dpkg --get-selections | grep -v deinstall | awk '{print $1}' > packages/apt-packages.txt 231 | 232 | # 更新snap包列表 233 | snap list | awk '{if (NR>1) print $1}' > packages/snap-packages.txt 234 | ``` 235 | 236 | ### 4. 在新机器上设置 237 | 238 | Windows: 239 | 240 | ```powershell 241 | # 安装chezmoi 242 | scoop install chezmoi 243 | 244 | # 初始化并应用配置 245 | chezmoi init https://github.com/yourusername/dotfiles.git 246 | chezmoi apply 247 | ``` 248 | 249 | Ubuntu: 250 | 251 | ```bash 252 | # 安装chezmoi 253 | sh -c "$(curl -fsLS get.chezmoi.io)" 254 | 255 | # 初始化并应用配置 256 | chezmoi init https://github.com/yourusername/dotfiles.git 257 | chezmoi apply 258 | ``` 259 | 260 | ## 常见问题 261 | 262 | ### 1. 如何处理不同机器的特定配置? 263 | 264 | 使用模板和条件语句。在 `.chezmoi.toml.tmpl` 中: 265 | 266 | ```toml 267 | {{- $osid := .chezmoi.os -}} 268 | [data] 269 | name = "Your Name" 270 | email = "your@email.com" 271 | {{- if eq .chezmoi.os "windows" }} 272 | is_windows = true 273 | {{- else if eq .chezmoi.os "linux" }} 274 | is_linux = true 275 | {{- end }} 276 | ``` 277 | 278 | ### 2. 如何处理敏感信息? 279 | 280 | 对于敏感信息,可以: 281 | 282 | 1. 使用模板和环境变量 283 | 2. 使用 chezmoi 的加密功能 284 | 3. 将敏感信息存储在单独的私有仓库中 285 | 286 | ### 3. 如何撤销更改? 287 | 288 | ```bash 289 | # 查看将要进行的更改 290 | chezmoi diff 291 | 292 | # 如果不满意,可以撤销 293 | chezmoi forget ~/.bashrc # 移除文件的管理 294 | 295 | # 或者重置为原始状态 296 | chezmoi apply --force 297 | ``` 298 | 299 | ### 4. 配置文件权限问题? 300 | 301 | chezmoi 会自动处理文件权限。对于特殊权限需求,可以在源文件名中使用特殊前缀: 302 | 303 | - `private_` : 创建私有文件 (chmod 600) 304 | - `executable_` : 创建可执行文件 (chmod 700) 305 | - `readonly_` : 创建只读文件 (chmod 400) 306 | 307 | ### 5. 如何查看管理的文件? 308 | 309 | ```bash 310 | # 列出所有管理的文件 311 | chezmoi managed 312 | 313 | # 查看源文件 314 | chezmoi cd 315 | ls -la 316 | ``` 317 | 318 | ### 6. 更新出错怎么办? 319 | 320 | ```bash 321 | # 备份当前状态 322 | chezmoi archive --output=backup.tar.gz 323 | 324 | # 重置更改 325 | chezmoi init --force 326 | 327 | # 重新应用配置 328 | chezmoi apply 329 | ``` 330 | -------------------------------------------------------------------------------- /docs/Tools/Others/zotero_使用指南.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: zotero_使用指南 3 | tags: 4 | - Zotero 5 | - Tools 6 | categories: 7 | date: 2024-12-23T12:16:42+08:00 8 | modify: 2024-12-23T12:16:42+08:00 9 | dir: 10 | share: false 11 | cdate: 2024-12-23 12 | mdate: 2024-12-23 13 | --- 14 | 15 | # zotero 使用指南 16 | 17 | - [zotero 使用指南](https://blog.csdn.net/l903445981/article/details/119960684) 18 | - [Zotero 中文社区 \| Zotero 中文维护小组](https://zotero-chinese.com/) 19 | - [ZOTERO 与 Obsidian 笔记插入和联动(含美化的笔记模板)](https://zhuanlan.zhihu.com/p/677461923) 20 | - [ZOTERO 于 Obsidian 联动方案](https://zhuanlan.zhihu.com/p/651144180) 21 | - 看了一圈下来,感觉现有方案都不太符合心意,于是不折腾了。不如让 zotero 和 obsidian 分开,真要做笔记的时候肯定是直接写出来的,没必要交织在一起了。 22 | - 安装了一个插件 translate to pdf 以外就没有搞什么了。 23 | -------------------------------------------------------------------------------- /docs/Tools/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: material/toolbox 3 | nostatistics: true 4 | comments: false 5 | --- 6 | 7 | # Toolbox 8 | 9 | !!! note "Abstract" 10 | 11 | 本部分内容(除特别声明外)采用 [**署名-非商业性使用-保持一致 4.0 国际 (CC BY-NC-SA 4.0)**](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议进行许可。 12 | 13 | {{ BEGIN_TOC }} 14 | - "Cheat Sheet": 15 | - bash: Cheat Sheet/tools/bash Cheat Sheet 16 | - git: Cheat Sheet/tools/git Cheat Sheet 17 | - gdb: Cheat Sheet/tools/gdb Cheat Sheet 18 | - vim: Cheat Sheet/editors/vim Cheat Sheet 19 | - "Envirtonment Setup": 20 | - Environment: Environment/environment 21 | - Obsidian: Environment/obsidian_setup 22 | - Ubuntu: Environment/Ubuntu_setup 23 | - Arch: Environment/Arch_setup 24 | - "Prompt Engerneering": 25 | - "如何写一个好 prompt": AI/prompt_writing 26 | - "useful prompt": AI/prompt 27 | - "Blog": 28 | - "Mkdocs & Material": Blog/Mkdocs_Material 29 | - "Make": 30 | - "CMake": Make/CMake 31 | - "Makefile": Make/Makefile 32 | - "Terminal": 33 | - "Tabby & Zsh": Terminal/Tabby_Zsh 34 | - "Others": 35 | - "SSH": Others/SSH 36 | - "Chezmoi 同步配置文件": Others/Chezmoi 37 | - "zotero 使用指南" : Others/zotero_使用指南 38 | {{ END_TOC }} -------------------------------------------------------------------------------- /docs/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | icon: /fontawesome/solid/face-smile-wink 3 | --- 4 | 5 | # About 🥳 6 | 7 | **Welcome, I'm Wnc.** 8 | 9 | ## Some Tags 10 | 11 | - 上海交通大学密西根学院 2024 级本科生 12 | - INTJ (Maybe) 13 | - Interested in AI, Robot and ... 14 | 15 | > [!info]- Ways to befriend with me 16 | > You could find my email or qq or WeChat in the icon above. 17 | > 18 | > Feel free to contact me! 19 | -------------------------------------------------------------------------------- /docs/assets/github/github-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/github/github-dark.png -------------------------------------------------------------------------------- /docs/assets/github/github-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/github/github-light.png -------------------------------------------------------------------------------- /docs/assets/images/WeChat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/images/WeChat.jpg -------------------------------------------------------------------------------- /docs/assets/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/images/avatar.png -------------------------------------------------------------------------------- /docs/assets/images/avatar_old.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/images/avatar_old.jpg -------------------------------------------------------------------------------- /docs/assets/images/home/dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/images/home/dark.jpg -------------------------------------------------------------------------------- /docs/assets/images/home/light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/images/home/light.jpg -------------------------------------------------------------------------------- /docs/assets/images/qq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WncFht/notes/73d59c3467da21bbb592cbc638f714f6b2e3fb6a/docs/assets/images/qq.jpg -------------------------------------------------------------------------------- /docs/css/card.css: -------------------------------------------------------------------------------- 1 | .card { 2 | position: relative; 3 | display: -ms-flexbox; 4 | display: flex; 5 | -ms-flex-direction: column; 6 | flex-direction: column; 7 | min-width: 0; 8 | word-wrap: break-word; 9 | background-color: #FEFEFE; 10 | background-clip: border-box; 11 | border: 0.5px solid #606060; 12 | border-radius: .25rem; 13 | margin-bottom: 1em; 14 | } 15 | 16 | [data-md-color-scheme="slate"] .card { 17 | background-color: #181818; 18 | border: 0.5px solid #606060; 19 | } 20 | 21 | .card-body { 22 | -ms-flex: 1 1 auto; 23 | flex: 1 1 auto; 24 | min-height: 1px; 25 | padding-left: 1rem; 26 | padding-right: 1rem; 27 | padding-bottom: 1rem; 28 | padding-top: 0.5rem; 29 | } 30 | 31 | .card-header { 32 | padding-left: 1.5rem; 33 | padding-right: 1.5rem; 34 | padding-top: 0.7rem; 35 | padding-bottom: 0.25rem; 36 | margin-bottom: 0; 37 | font-size: 1.5em; 38 | text-transform: uppercase; 39 | font-weight: 600; 40 | } 41 | 42 | .card-body ul { 43 | margin-top: 0; 44 | margin-bottom: 0; 45 | } 46 | 47 | .md-typeset :is(.card-body details) { 48 | margin-top: 0.25rem; 49 | margin-bottom: 0; 50 | } 51 | 52 | .file-block { 53 | display: flex; 54 | flex-direction: row; 55 | align-items: center; 56 | padding: 0.2em 1em; 57 | transition: background-color .3s cubic-bezier(.4,0,.2,1); 58 | } 59 | 60 | .file-block:hover { 61 | background-color: #eeeeee; 62 | } 63 | [data-md-color-scheme="slate"] .file-block:hover { 64 | background-color: #606060; 65 | } 66 | 67 | .file-title { 68 | padding-left: 0rem; 69 | margin-bottom: 0; 70 | font-size: 1.1em; 71 | font-weight: 600; 72 | } 73 | 74 | .file-meta { 75 | -ms-flex: 1 1 auto; 76 | flex: 1 1 auto; 77 | min-height: 1px; 78 | } 79 | 80 | .file-body { 81 | padding-left: 1em; 82 | margin-right: auto; 83 | } 84 | 85 | .down-button { 86 | border: 0.05rem solid; 87 | border-radius: 0.1rem; 88 | cursor: pointer; 89 | display: inline-block; 90 | font-weight: 700; 91 | padding: 0.25em 0.5em; 92 | transition: color .3s,background-color .3s,border-color .3s !important; 93 | } 94 | 95 | .down-button:is(:focus,:hover) { 96 | background-color: var(--md-accent-fg-color); 97 | border-color: var(--md-accent-fg-color); 98 | color: var(--md-accent-bg-color) !important; 99 | } -------------------------------------------------------------------------------- /docs/css/cards/cards.css: -------------------------------------------------------------------------------- 1 | 2 | .cards { 3 | 4 | --grain: url("/img/grain.webp"); 5 | --glitter: url("/img/glitter.png"); 6 | --glittersize: 25%; 7 | 8 | --space: 5%; 9 | --angle: 133deg; 10 | --imgsize: cover; 11 | 12 | --red: #f80e35; 13 | --yellow: #eedf10; 14 | --green: #21e985; 15 | --blue: #0dbde9; 16 | --violet: #c929f1; 17 | 18 | --clip: inset( 9.85% 8% 52.85% 8% ); 19 | --clip-invert: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 0 47.15%, 91.5% 47.15%, 91.5% 9.85%, 8% 9.85%, 8% 47.15%, 0 50%); 20 | 21 | --clip-stage: polygon(91.5% 9.85%, 57% 9.85%, 54% 12%, 17% 12%, 16% 14%, 12% 16%, 8% 16%, 8% 47.15%, 92% 47.15%); 22 | --clip-stage-invert: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 0 47.15%, 91.5% 47.15%, 91.5% 9.85%, 57% 9.85%, 54% 12%, 17% 12%, 16% 14%, 12% 16%, 8% 16%, 8% 47.15%, 0 50%); 23 | 24 | --clip-trainer: inset(14.5% 8.5% 48.2% 8.5%); 25 | --clip-borders: inset(2.8% 4% round 2.55% / 1.5%); 26 | 27 | } 28 | 29 | .showcase { 30 | z-index: 99; 31 | max-width: 320px; 32 | margin: auto; 33 | } 34 | 35 | .card__shine, 36 | .card__glare { 37 | 38 | will-change: transform, opacity, background-image, background-size, 39 | background-position, background-blend-mode, filter; 40 | 41 | } -------------------------------------------------------------------------------- /docs/css/changelog_extra.css: -------------------------------------------------------------------------------- 1 | .changelog-type-refactor { 2 | background-color: #c63f94b0; 3 | } 4 | .changelog-type-refactor::before { 5 | content: "文档重构"; 6 | } -------------------------------------------------------------------------------- /docs/css/extra.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "JetBrainsMono Nerd Font", "LXGW WenKai"; 3 | /* Lite version */ 4 | /* font-family: "LXGW WenKai Lite", sans-serif; */ 5 | /* TC version */ 6 | /* font-family: "LXGW WenKai TC", sans-serif; */ 7 | /* Screen version */ 8 | /* font-family: "LXGW WenKai Screen", sans-serif; */ 9 | } 10 | -------------------------------------------------------------------------------- /docs/css/flink.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Styles for the flink list and its items. 3 | * 4 | * .flink-list: 5 | * - Enables auto overflow and centers text. 6 | * - Adds padding around the list. 7 | * 8 | * .flink-list a: 9 | * - Sets the default link color. 10 | * 11 | * [data-md-color-scheme="slate"] .flink-list a: 12 | * - Changes link color for the "slate" color scheme. 13 | * 14 | * .flink-list-item: 15 | * - Positions items relatively and floats them to the left. 16 | * - Adds margin, width, height, and border-radius. 17 | * - Sets line-height and applies transform and transition effects. 18 | * - Changes background color on hover. 19 | * 20 | * .flink-item-icon: 21 | * - Floats the icon to the left and adds margin. 22 | * - Sets width, height, and border-radius. 23 | * 24 | * .flink-item-name: 25 | * - Adds padding and sets height. 26 | * - Makes the font bold and increases font size. 27 | * 28 | * .flink-item-desc: 29 | * - Adds padding and sets height. 30 | * - Sets font size. 31 | * 32 | * Media Queries: 33 | * - Adjusts the width of .flink-list-item based on screen width. 34 | * - Breakpoints at 1310px, 1219px, 1027px, 959px, and 692px. 35 | */ 36 | .flink-list { 37 | overflow: auto; 38 | padding: 10px 10px 0; 39 | text-align: center; 40 | } 41 | .flink-list a { 42 | color: #4a4a4a; 43 | } 44 | [data-md-color-scheme="slate"] .flink-list a { 45 | color: rgba(255,255,255,0.7); 46 | } 47 | .flink-list-item { 48 | position: relative; 49 | float: left; 50 | overflow: hidden; 51 | margin: 15px 7px; 52 | width: calc(100% / 2 - 15px); 53 | height: 90px; 54 | border-radius: 8px; 55 | line-height: 17px; 56 | -webkit-transform: translateZ(0); 57 | transform: translateZ(0); 58 | transition: 0.25s; 59 | } 60 | .flink-item-icon { 61 | float: left; 62 | overflow: hidden; 63 | margin: 15px 10px; 64 | width: 60px; 65 | height: 60px; 66 | border-radius: 35px; 67 | } 68 | .flink-item-name { 69 | padding: 19px 10px 0 0; 70 | height: 40px; 71 | font-weight: bold; 72 | font-size: 1.3em; 73 | } 74 | .flink-item-desc { 75 | padding: 13px 10px 16px 0; 76 | height: 50px; 77 | font-size: 0.93em; 78 | } 79 | .flink-list-item:hover { 80 | background-color: rgba(68,138,255,.1); 81 | } 82 | .flink-list-item { 83 | width: calc(50% - 15px) !important; 84 | } 85 | 86 | @media screen and (max-width: 1310px) { 87 | .flink-list-item { 88 | width: calc(100% - 15px) !important; 89 | } 90 | } 91 | @media screen and (max-width: 1219px) { 92 | .flink-list-item { 93 | width: calc(50% - 15px) !important; 94 | } 95 | } 96 | @media screen and (max-width: 1027px) { 97 | .flink-list-item { 98 | width: calc(100% - 15px) !important; 99 | } 100 | } 101 | @media screen and (max-width: 959px) { 102 | .flink-list-item { 103 | width: calc(50% - 15px) !important; 104 | } 105 | } 106 | @media screen and (max-width: 692px) { 107 | .flink-list-item { 108 | width: calc(100% - 15px) !important; 109 | } 110 | } -------------------------------------------------------------------------------- /docs/css/fold_toc.css: -------------------------------------------------------------------------------- 1 | .md-nav__list a.is-active { 2 | color: var(--md-default-fg-color--light); 3 | } 4 | 5 | [data-md-color-scheme="slate"] .md-nav__list a.is-active { 6 | color: #969696; 7 | } 8 | 9 | .md-sidebar--secondary .md-nav > .md-nav__list > li > a + .md-nav { 10 | display: none; 11 | } 12 | .md-sidebar--secondary .md-nav > .md-nav__list > li > a.is-active + .md-nav { 13 | display: block; 14 | } -------------------------------------------------------------------------------- /docs/css/giscus.css: -------------------------------------------------------------------------------- 1 | /*! MIT License 2 | * Copyright (c) 2018 GitHub Inc. 3 | * https://github.com/primer/primitives/blob/main/LICENSE 4 | */ 5 | main { 6 | --color-prettylights-syntax-comment: #8b949e; 7 | --color-prettylights-syntax-constant: #79c0ff; 8 | --color-prettylights-syntax-entity: #d2a8ff; 9 | --color-prettylights-syntax-storage-modifier-import: #c9d1d9; 10 | --color-prettylights-syntax-entity-tag: #7ee787; 11 | --color-prettylights-syntax-keyword: #ff7b72; 12 | --color-prettylights-syntax-string: #a5d6ff; 13 | --color-prettylights-syntax-variable: #ffa657; 14 | --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; 15 | --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; 16 | --color-prettylights-syntax-invalid-illegal-bg: #8e1519; 17 | --color-prettylights-syntax-carriage-return-text: #f0f6fc; 18 | --color-prettylights-syntax-carriage-return-bg: #b62324; 19 | --color-prettylights-syntax-string-regexp: #7ee787; 20 | --color-prettylights-syntax-markup-list: #f2cc60; 21 | --color-prettylights-syntax-markup-heading: #1f6feb; 22 | --color-prettylights-syntax-markup-italic: #c9d1d9; 23 | --color-prettylights-syntax-markup-bold: #c9d1d9; 24 | --color-prettylights-syntax-markup-deleted-text: #ffdcd7; 25 | --color-prettylights-syntax-markup-deleted-bg: #67060c; 26 | --color-prettylights-syntax-markup-inserted-text: #aff5b4; 27 | --color-prettylights-syntax-markup-inserted-bg: #033a16; 28 | --color-prettylights-syntax-markup-changed-text: #ffdfb6; 29 | --color-prettylights-syntax-markup-changed-bg: #5a1e02; 30 | --color-prettylights-syntax-markup-ignored-text: #c9d1d9; 31 | --color-prettylights-syntax-markup-ignored-bg: #1158c7; 32 | --color-prettylights-syntax-meta-diff-range: #d2a8ff; 33 | --color-prettylights-syntax-brackethighlighter-angle: #8b949e; 34 | --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; 35 | --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; 36 | --color-btn-text: #c9d1d9; 37 | --color-btn-bg: #21262d; 38 | --color-btn-border: rgba(240,246,252,.1); 39 | --color-btn-shadow: 0 0 transparent; 40 | --color-btn-inset-shadow: 0 0 transparent; 41 | --color-btn-hover-bg: #30363d; 42 | --color-btn-hover-border: #8b949e; 43 | --color-btn-active-bg: #282e33; 44 | --color-btn-active-border: #6e7681; 45 | --color-btn-selected-bg: #161b22; 46 | --color-btn-primary-text: #fff; 47 | --color-btn-primary-bg: #238636; 48 | --color-btn-primary-border: rgba(240,246,252,.1); 49 | --color-btn-primary-shadow: 0 0 transparent; 50 | --color-btn-primary-inset-shadow: 0 0 transparent; 51 | --color-btn-primary-hover-bg: #2ea043; 52 | --color-btn-primary-hover-border: rgba(240,246,252,.1); 53 | --color-btn-primary-selected-bg: #238636; 54 | --color-btn-primary-selected-shadow: 0 0 transparent; 55 | --color-btn-primary-disabled-text: hsla(0,0%,100%,.5); 56 | --color-btn-primary-disabled-bg: rgba(35,134,54,.6); 57 | --color-btn-primary-disabled-border: rgba(240,246,252,.1); 58 | --color-fg-default: #c9d1d9; 59 | --color-fg-muted: #8b949e; 60 | --color-fg-subtle: #6e7681; 61 | --color-canvas-default: #0d0d0d; 62 | --color-canvas-overlay: #131313; 63 | --color-canvas-inset: #060606; 64 | --color-canvas-subtle: #131313; 65 | --color-border-default: #30363d; 66 | --color-border-muted: #21262d; 67 | --color-neutral-muted: hsla(215,8%,47%,.4); 68 | --color-accent-fg: #58a6ff; 69 | --color-accent-emphasis: #1f6feb; 70 | --color-accent-muted: rgba(56,139,253,.4); 71 | --color-accent-subtle: rgba(56,139,253,.15); 72 | --color-success-fg: #3fb950; 73 | --color-attention-fg: #d29922; 74 | --color-danger-fg: #f85149; 75 | --color-primer-shadow-inset: 0 0 transparent; 76 | --color-primer-shadow-focus: 0 0 0 3px #0c2d6b; 77 | --color-scale-gray-7: #21262d; 78 | --color-scale-blue-8: #0c2d6b; 79 | /*! Extensions from @primer/css/alerts/flash.scss */ 80 | --color-social-reaction-bg-hover: var(--color-scale-gray-7); 81 | --color-social-reaction-bg-reacted-hover: var(--color-scale-blue-8); 82 | color-scheme: dark 83 | } 84 | 85 | main .pagination-loader-container { 86 | background-image: url(https://github.com/images/modules/pulls/progressive-disclosure-line-dark.svg) 87 | } 88 | 89 | main .gsc-loading-image { 90 | background-image: url(https://github.githubassets.com/images/mona-loading-dark.gif) 91 | } 92 | -------------------------------------------------------------------------------- /docs/css/grid cards.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --admonition-border-left-width: 0.2rem; 3 | --base-border-radius: 0.5rem; 4 | } 5 | 6 | /* Change font family of filename present on top of code block. */ 7 | /* .highlight span.filename { 8 | border-bottom: none; 9 | border-radius: var(--base-border-radius); 10 | display: inline; 11 | font-family: var(--md-code-font-family); 12 | border-bottom-left-radius: 0; 13 | border-bottom-right-radius: 0; 14 | margin-bottom: 5px; 15 | text-align: center; 16 | } 17 | .highlight span.filename + pre > code { 18 | border-radius: var(--base-border-radius); 19 | border-top-left-radius: 0; 20 | } 21 | .md-typeset pre > code { 22 | border-radius: var(--base-border-radius); 23 | } */ 24 | 25 | /* Customize admonition layout */ 26 | /* .md-typeset .admonition { 27 | border-width: 0px; 28 | border-left-width: var(--admonition-border-left-width); 29 | } 30 | 31 | [dir="ltr"] .md-typeset blockquote { 32 | border-radius: 0.2rem; 33 | border-left-width: var(--admonition-border-left-width); 34 | } */ 35 | 36 | /* Grid Cards */ 37 | .md-typeset .grid.cards > ul > li { 38 | border-radius: var(--base-border-radius); 39 | } 40 | .md-typeset .grid.cards > ul > li:hover { 41 | box-shadow: 0 0 0.2rem #ffffff40; 42 | } 43 | 44 | /* Markdown Button */ 45 | .md-typeset .md-button { 46 | border-radius: var(--base-border-radius); 47 | } 48 | 49 | /* Footer: Social Links */ 50 | .md-social__link svg { 51 | max-height: 1rem; 52 | } 53 | 54 | 55 | /* Forms */ 56 | .md-search__form { 57 | border-radius: var(--base-border-radius); 58 | } 59 | 60 | [data-md-toggle="search"]:checked ~ .md-header .md-search__form { 61 | border-top-right-radius: var(--base-border-radius); 62 | border-top-left-radius: var(--base-border-radius); 63 | } 64 | 65 | [dir="ltr"] .md-search__output { 66 | border-bottom-right-radius: var(--base-border-radius); 67 | border-bottom-left-radius: var(--base-border-radius); 68 | } 69 | 70 | /* Blog - index.md */ 71 | /* div.md-content header { 72 | display: none; 73 | } 74 | 75 | .md-post--excerpt { 76 | background-color: var(--md-accent-fg-color--transparent); 77 | box-shadow: 0 0 0 1rem var(--md-accent-fg-color--transparent); 78 | border-radius: var(--base-border-radius); 79 | } 80 | 81 | .md-post--excerpt .md-post__header { 82 | justify-content: center; 83 | } 84 | 85 | .md-post--excerpt .md-post__content > h2, 86 | .md-post__action { 87 | text-align: center; 88 | } */ 89 | 90 | /* Table */ 91 | .md-typeset table:not([class]) { 92 | border-radius: var(--base-border-radius); 93 | } 94 | 95 | 96 | 97 | 98 | 99 | .carousel { 100 | width: 60%; 101 | height: 100%; 102 | 103 | border-radius: 0.4rem; 104 | overflow: hidden; 105 | position: relative; 106 | 107 | /* 居中 */ 108 | margin-left: auto; 109 | margin-right: auto; 110 | 111 | border: 0.075rem solid #7b7b7b7a; 112 | box-shadow: var(--md-shadow-z1); 113 | } 114 | 115 | .carousel-container { 116 | width: 100%; 117 | height: 100%; 118 | 119 | position: relative; 120 | left: 0; 121 | 122 | display: flex; 123 | 124 | /* 过渡动画 1s */ 125 | transition: all 1s; 126 | } 127 | 128 | .carousel-hover { 129 | height: 100%; 130 | width: 10%; 131 | position: absolute; 132 | top: 0; 133 | 134 | /* 子元素垂直居中 */ 135 | display: flex; 136 | flex-flow: column nowrap; 137 | align-items: center; 138 | justify-content: center; 139 | } 140 | .carousel-hover.left { 141 | left: 0; 142 | } 143 | .carousel-hover.right { 144 | right: 0; 145 | } 146 | 147 | .carousel-hover button { 148 | background-color: var(--md-accent-fg-color); 149 | border-radius: 50%; 150 | 151 | cursor: pointer; 152 | 153 | opacity: 0; 154 | transition: opacity 0.3s; 155 | } 156 | .carousel-hover button::after { 157 | display: block; 158 | height: 1.5rem; 159 | width: 1.5rem; 160 | 161 | background-color: white; 162 | content: ""; 163 | mask-position: center; 164 | -webkit-mask-position: center; 165 | } 166 | .carousel-hover.left button::after { 167 | mask-image: var(--md-tabbed-icon--prev); 168 | -webkit-mask-image: var(--md-tabbed-icon--prev); 169 | } 170 | .carousel-hover.right button::after { 171 | mask-image: var(--md-tabbed-icon--next); 172 | -webkit-mask-image: var(--md-tabbed-icon--next); 173 | } 174 | 175 | /* hover 外层 */ 176 | .carousel-hover:hover button { 177 | opacity: 0.5; 178 | transition: opacity 0.3s; 179 | } 180 | /* hover 内层 */ 181 | .carousel-hover button:hover { 182 | opacity: 0.8; 183 | transition: opacity 0.3s; 184 | } 185 | 186 | .carousel-container a { 187 | width: 100%; 188 | height: 100%; 189 | 190 | flex-shrink: 0; 191 | } 192 | 193 | .carousel-container img { 194 | width: 100%; 195 | height: 100%; 196 | 197 | object-fit: cover; 198 | display: block; 199 | } 200 | 201 | .carousel-bottom { 202 | position: absolute; 203 | /* 宽度等同于内容宽度 */ 204 | width: 100%; 205 | padding: 20px; 206 | 207 | bottom: 0; 208 | 209 | display: flex; 210 | justify-content: center; 211 | /* 指示器间距 */ 212 | gap: 10px; 213 | 214 | opacity: 0; 215 | transition: opacity 0.3s; 216 | } 217 | .carousel-bottom:hover { 218 | opacity: 0.8; 219 | transition: opacity 0.3s; 220 | } 221 | 222 | .carousel-bottom .indicator { 223 | height: 5px; 224 | width: 20px; 225 | 226 | background-color: var(--md-accent-fg-color); 227 | 228 | opacity: 0.5; 229 | cursor: pointer; 230 | } 231 | 232 | .carousel:hover .bottom .indicator { 233 | opacity: 1; 234 | } 235 | .carousel:hover .shift .btn { 236 | opacity: 1; 237 | } 238 | 239 | @media screen and (max-width: 600px) { 240 | .carousel { 241 | width: 100%; 242 | } 243 | 244 | .carousel-hover button { 245 | opacity: 1; 246 | } 247 | } -------------------------------------------------------------------------------- /docs/css/tasklist.css: -------------------------------------------------------------------------------- 1 | .markdown-body .task-list-item { 2 | list-style-type: none !important; 3 | } 4 | 5 | .markdown-body .task-list-item input[type="checkbox"] { 6 | margin: 0 4px 0.25em -20px; 7 | vertical-align: middle; 8 | } 9 | 10 | .markdown-body .task-list-control { 11 | display: inline; /* Ensure label is inline incase theme sets it to block.*/ 12 | } 13 | 14 | .markdown-body .task-list-control { 15 | position: relative; 16 | display: inline-block; 17 | color: #555; 18 | cursor: pointer; 19 | } 20 | 21 | .markdown-body .task-list-control input[type="checkbox"] { 22 | position: absolute; 23 | opacity: 0; 24 | z-index: -1; /* Put the input behind the label so it doesn't overlay text */ 25 | } 26 | 27 | .markdown-body .task-list-indicator { 28 | position: absolute; 29 | top: -8px; 30 | left: -18px; 31 | display: block; 32 | width: 14px; 33 | height: 14px; 34 | color: #eee; 35 | background-color: #eee; 36 | border-radius: .25rem; 37 | } 38 | 39 | .markdown-body .task-list-control input[type="checkbox"]:checked + .task-list-indicator::before { 40 | display: block; 41 | margin-top: -4px; 42 | margin-left: 2px; 43 | font-size: 16px; 44 | line-height: 1; 45 | content: "✔"; 46 | color: #1EBB52; 47 | } -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | hide: 3 | - date 4 | - navigation 5 | - toc 6 | home: true 7 | nostatistics: true 8 | comments: false 9 | icon: material/home 10 | --- 11 | 12 | 13 | 14 |





15 | 16 |

17 | 18 | Welcome to wnc's note! 19 | 20 |

21 | 22 | 23 | 24 | [:octicons-link-16: My friends!](./Links.md) / 25 | [:octicons-info-16: About Me](./about.md) 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/js/katex.js: -------------------------------------------------------------------------------- 1 | document$.subscribe(({ body }) => { 2 | renderMathInElement(body, { 3 | delimiters: [ 4 | { left: "$$", right: "$$", display: true }, // Display mode equations 5 | { left: "$", right: "$", display: false }, // Inline equations 6 | { left: "\\(", right: "\\)", display: false }, // Alternative inline 7 | { left: "\\[", right: "\\]", display: true } // Alternative display 8 | ], 9 | }) 10 | }) -------------------------------------------------------------------------------- /docs/js/mathjax.js: -------------------------------------------------------------------------------- 1 | window.MathJax = { 2 | tex: { 3 | inlineMath: [["\\(", "\\)"]], // Inline math delimiters 4 | displayMath: [["\\[", "\\]"]], // Display math delimiters 5 | processEscapes: true, // Handle escaped characters 6 | processEnvironments: true // Process LaTeX environments 7 | }, 8 | options: { 9 | ignoreHtmlClass: ".*|", // Ignore all classes by default 10 | processHtmlClass: "arithmatex" // Only process elements with this class 11 | } 12 | }; 13 | 14 | document$.subscribe(() => { 15 | MathJax.typesetPromise() // Render math when document loads 16 | }) -------------------------------------------------------------------------------- /docs/js/scheme.js: -------------------------------------------------------------------------------- 1 | (() => { 2 | 3 | const preferToggle = e => { 4 | if (localStorage.getItem("data-md-prefers-color-scheme") === "true") { 5 | document.querySelector("body").setAttribute("data-md-color-scheme", (e.matches) ? "slate" : "default") 6 | } 7 | var frame = document.querySelector(".giscus-frame") 8 | var theme = document.querySelector("body").getAttribute("data-md-color-scheme") === "slate" ? "https://gcore.jsdelivr.net/gh/TonyCrane/note/docs/css/giscus.css" : "light" 9 | frame.contentWindow.postMessage( 10 | { giscus: { setConfig: { theme } } }, 11 | "https://giscus.app" 12 | ) 13 | } 14 | 15 | /** 16 | * Sets up the theme for the webpage based on user preferences and system settings. 17 | * 18 | * @param {HTMLElement} body - The body element of the webpage. 19 | * 20 | * The function performs the following steps: 21 | * 1. Checks if the browser supports the `prefers-color-scheme` media feature. 22 | * 2. Retrieves the user's preferred color scheme and preference settings from localStorage. 23 | * 3. Removes any old version of the color scheme settings from localStorage. 24 | * 4. Sets default values for the color scheme and preference settings if they are not found in localStorage. 25 | * 5. Adjusts the color scheme based on the user's preference and system settings. 26 | * 6. Updates the body element's attributes to reflect the current color scheme and preference settings. 27 | * 7. Adds an event listener to handle changes in the `prefers-color-scheme` media feature if supported. 28 | */ 29 | const setupTheme = body => { 30 | const preferSupported = window.matchMedia("(prefers-color-scheme)").media !== "not all" 31 | let scheme = localStorage.getItem("data-md-color-scheme") 32 | let prefers = localStorage.getItem("data-md-prefers-color-scheme") 33 | let oldversion = localStorage.getItem("/.__palette") 34 | 35 | if (oldversion) { 36 | localStorage.removeItem("/.__palette") 37 | } 38 | 39 | if (!scheme) { 40 | scheme = "slate" 41 | } 42 | if (!prefers) { 43 | prefers = "false" 44 | } 45 | 46 | if (prefers === "true" && preferSupported) { 47 | scheme = (window.matchMedia("(prefers-color-scheme: dark)").matches) ? "slate" : "default" 48 | } else { 49 | prefers = "false" 50 | } 51 | 52 | body.setAttribute("data-md-prefers-color-scheme", prefers) 53 | body.setAttribute("data-md-color-scheme", scheme) 54 | 55 | if (preferSupported) { 56 | const matchListener = window.matchMedia("(prefers-color-scheme: dark)") 57 | matchListener.addListener(preferToggle) 58 | } 59 | } 60 | 61 | const observer = new MutationObserver(mutations => { 62 | mutations.forEach(mutation => { 63 | if (mutation.type === "childList") { 64 | if (mutation.addedNodes.length) { 65 | for (let i = 0; i < mutation.addedNodes.length; i++) { 66 | const el = mutation.addedNodes[i] 67 | 68 | if (el.nodeType === 1 && el.tagName.toLowerCase() === "body") { 69 | setupTheme(el) 70 | break 71 | } 72 | } 73 | } 74 | } 75 | }) 76 | }) 77 | 78 | observer.observe(document.querySelector("html"), {childList: true}) 79 | setupTheme(document.querySelector("body")) 80 | })() 81 | 82 | window.toggleScheme = () => { 83 | const body = document.querySelector("body") 84 | const preferSupported = window.matchMedia("(prefers-color-scheme)").media !== "not all" 85 | let scheme = body.getAttribute("data-md-color-scheme") 86 | let prefer = body.getAttribute("data-md-prefers-color-scheme") 87 | 88 | if (preferSupported && scheme === "default" && prefer !== "true") { 89 | prefer = "true" 90 | scheme = (window.matchMedia("(prefers-color-scheme: dark)").matches) ? "slate" : "default" 91 | } else if (preferSupported && prefer === "true") { 92 | prefer = "false" 93 | scheme = "slate" 94 | } else if (scheme === "slate") { 95 | prefer = "false" 96 | scheme = "default" 97 | } else { 98 | prefer = "false" 99 | scheme = "slate" 100 | } 101 | localStorage.setItem("data-md-prefers-color-scheme", prefer) 102 | localStorage.setItem("data-md-color-scheme", scheme) 103 | body.setAttribute("data-md-prefers-color-scheme", prefer) 104 | body.setAttribute("data-md-color-scheme", scheme) 105 | 106 | var frame = document.querySelector(".giscus-frame") 107 | var theme = scheme === "slate" ? "https://gcore.jsdelivr.net/gh/TonyCrane/note/docs/css/giscus.css" : "light" 108 | frame.contentWindow.postMessage( 109 | { giscus: { setConfig: { theme } } }, 110 | "https://giscus.app" 111 | ) 112 | } 113 | -------------------------------------------------------------------------------- /docs/js/tablesort.js: -------------------------------------------------------------------------------- 1 | document$.subscribe(function() { 2 | /** 3 | * Selects all table elements within an article that do not have a class attribute. 4 | * 5 | * @type {NodeListOf} 6 | */ 7 | var tables = document.querySelectorAll("article table:not([class])") 8 | tables.forEach(function(table) { 9 | new Tablesort(table) 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /docs/js/toc.js: -------------------------------------------------------------------------------- 1 | (function (window, document) { 2 | function register($toc) { 3 | const currentInView = new Set(); 4 | const headingToMenu = new Map(); 5 | const $menus = Array.from($toc.querySelectorAll('.md-nav__list > li > a')); 6 | 7 | for (const $menu of $menus) { 8 | const elementId = $menu.getAttribute('href').trim().slice(1); 9 | const $heading = document.getElementById(elementId); 10 | if ($heading) { 11 | headingToMenu.set($heading, $menu); 12 | } 13 | } 14 | 15 | const $headings = Array.from(headingToMenu.keys()); 16 | 17 | const callback = (entries) => { 18 | for (const entry of entries) { 19 | if (entry.isIntersecting) { 20 | currentInView.add(entry.target); 21 | } else { 22 | currentInView.delete(entry.target); 23 | } 24 | } 25 | let $heading; 26 | if (currentInView.size) { 27 | // heading is the first in-view heading 28 | $heading = [...currentInView].sort(($el1, $el2) => $el1.offsetTop - $el2.offsetTop)[0]; 29 | } else if ($headings.length) { 30 | // heading is the closest heading above the viewport top 31 | $heading = $headings 32 | .filter(($heading) => $heading.offsetTop < window.scrollY) 33 | .sort(($el1, $el2) => $el2.offsetTop - $el1.offsetTop)[0]; 34 | } 35 | if ($heading && headingToMenu.has($heading)) { 36 | $menus.forEach(($menu) => $menu.classList.remove('is-active')); 37 | 38 | const $menu = headingToMenu.get($heading); 39 | $menu.classList.add('is-active'); 40 | let $menuList = $menu.parentElement.parentElement.parentElement; 41 | while ( 42 | $menuList.classList.contains('md-nav') && 43 | $menuList.parentElement.tagName.toLowerCase() === 'li' 44 | ) { 45 | $menuList.parentElement.children[0].classList.add('is-active'); 46 | $menuList = $menuList.parentElement.parentElement.parentElement; 47 | } 48 | } 49 | }; 50 | const observer = new IntersectionObserver(callback, { threshold: 0 }); 51 | 52 | for (const $heading of $headings) { 53 | observer.observe($heading); 54 | // smooth scroll to the heading 55 | if (headingToMenu.has($heading)) { 56 | const $menu = headingToMenu.get($heading); 57 | $menu.setAttribute('data-href', $menu.getAttribute('href')); 58 | $menu.setAttribute('href', 'javascript:;'); 59 | $menu.addEventListener('click', () => { 60 | if (typeof $heading.scrollIntoView === 'function') { 61 | $heading.scrollIntoView({ behavior: 'smooth' }); 62 | } 63 | const anchor = $menu.getAttribute('data-href'); 64 | if (history.pushState) { 65 | history.pushState(null, null, anchor); 66 | } else { 67 | location.hash = anchor; 68 | } 69 | }); 70 | $heading.style.scrollMargin = '4em'; 71 | } 72 | } 73 | } 74 | 75 | if (typeof window.IntersectionObserver === 'undefined') { 76 | return; 77 | } 78 | 79 | document.querySelectorAll('.md-sidebar--secondary').forEach(register); 80 | })(window, document); 81 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: mkdocs 2 | channels: 3 | - defaults 4 | dependencies: 5 | - python = 3.10 6 | - pip 7 | - pip: 8 | - mkdocs 9 | - mkdocs-material 10 | - mkdocs-glightbox 11 | - mkdocs-statistics-plugin 12 | - mkdocs-heti-plugin 13 | # mkdocs-include-dir-to-nav 14 | - mkdocs-git-revision-date-localized-plugin 15 | - rich # for mkdocs-toc-plugin 16 | - mkdocs-blogging-plugin 17 | - mkdocs-callouts 18 | - mkdocs-changelog-plugin 19 | - mkdocs-minify-plugin 20 | - mkdocs-video 21 | - mkdocs-bi-directional-links 22 | -------------------------------------------------------------------------------- /overrides/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | {{ super() }} 5 | {% if not page.meta.comments == false %} 6 | {% include "partials/comments.html" %} 7 | {% endif %} 8 | {% endblock %} -------------------------------------------------------------------------------- /overrides/partials/comments.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 21 | 22 | 23 | 38 | 39 | 49 | 50 | 51 | 54 | 55 | -------------------------------------------------------------------------------- /overrides/partials/content.html: -------------------------------------------------------------------------------- 1 | {% if page.edit_url %} 2 | 3 | {% include ".icons/material/pencil.svg" %} 4 | 5 | {% endif %} 6 | {% if not "\x3ch1" in page.content %} 7 |

{{ page.title | d(config.site_name, true)}}

8 | {% endif %} 9 | {{ page.content }} 10 | {% if page and page.meta and ( 11 | page.meta.git_revision_date_localized or 12 | page.meta.revision_date 13 | ) %} 14 | {% if page and page.meta and page.meta.hide and "date" in page.meta.hide %} 15 | {% else %} 16 | {% include "partials/source-file.html" %} 17 | {% endif %} 18 | {% endif %} -------------------------------------------------------------------------------- /overrides/partials/copyright.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs 2 | mkdocs-material 3 | mkdocs-glightbox 4 | mkdocs-statistics-plugin 5 | mkdocs-heti-plugin 6 | # mkdocs-include-dir-to-nav 7 | mkdocs-git-revision-date-localized-plugin 8 | rich # for mkdocs-toc-plugin 9 | mkdocs-blogging-plugin 10 | mkdocs-callouts 11 | mkdocs-changelog-plugin 12 | mkdocs-minify-plugin 13 | mkdocs-video 14 | mkdocs-bi-directional-links 15 | mkdocs-mermaid2-plugin --------------------------------------------------------------------------------