From 973a20615d5180c2401b6414310bda620ba72a40 Mon Sep 17 00:00:00 2001 From: wener Date: Sun, 19 May 2024 23:22:59 +0800 Subject: [PATCH] update --- notes/ai/ai-glossary.md | 34 +- notes/ai/llm/llama.cpp.md | 28 ++ notes/ai/llm/llm-agent.md | 26 ++ notes/ai/llm/llm-glossary.md | 7 +- notes/ai/llm/llm-models.md | 42 ++- notes/ai/llm/ollama.md | 1 + notes/ai/ml/README.md | 8 +- notes/ai/ml/dataset.md | 15 + notes/ai/ml/label-studio.md | 99 ++++++ notes/ai/ml/labelImg.md | 9 + notes/ai/ml/labeling.md | 79 +++++ notes/ai/ml/pytorch.md | 19 ++ notes/ai/ml/traning.md | 29 ++ notes/ai/ml/yolo.md | 35 ++ notes/ai/ml/yolov8.md | 194 ++++++++++++ .../postgresql/postgresql-version.md | 17 + notes/devops/kubernetes/distro/sealos.md | 4 +- notes/devops/web/kong/README.md | 2 +- notes/healthcare/README.md | 4 + notes/healthcare/drug/README.md | 15 + notes/healthcare/{drugs => drug}/dmards.md | 0 notes/healthcare/drug/drug-faq.md | 6 + notes/healthcare/drug/drug-glossary.md | 299 ++++++++++++++++++ notes/healthcare/drug/essential.md | 24 ++ notes/healthcare/drugs/README.md | 137 -------- notes/healthcare/drugs/essential.md | 11 - notes/healthcare/healthcare-faq.md | 8 + .../{glossary.md => healthcare-glossary.md} | 4 +- notes/healthcare/medicine/README.md | 8 + .../medicine-faq.md} | 0 .../medicine-glossary.md} | 8 + notes/languages/diagram/diagram-awesome.md | 2 +- notes/languages/python/pip.md | 19 ++ notes/languages/python/pyenv.md | 27 +- notes/languages/python/python-faq.md | 27 ++ notes/service/api/flatbuffers.md | 44 +++ notes/service/dns/dns-rr.md | 63 +++- notes/service/document/document-awesome.md | 3 +- notes/service/media/ffmpeg/ffmpeg-faq.md | 2 + notes/service/media/format/flv.md | 85 +++++ .../media/{ => image}/image-awesome.md | 9 + notes/service/media/{ => image}/svgo.md | 0 notes/service/network/proxy/proxychain-ng.md | 3 + notes/web/browser/chrome/chrome-version.md | 1 + notes/web/dev/biome.md | 9 +- notes/web/nodejs/nodejs-faq.md | 23 ++ notes/web/react/mobx.md | 12 + notes/web/react/satori.md | 2 + 48 files changed, 1316 insertions(+), 187 deletions(-) create mode 100644 notes/ai/llm/llama.cpp.md create mode 100644 notes/ai/llm/llm-agent.md create mode 100644 notes/ai/ml/dataset.md create mode 100644 notes/ai/ml/label-studio.md create mode 100644 notes/ai/ml/labelImg.md create mode 100644 notes/ai/ml/labeling.md create mode 100644 notes/ai/ml/pytorch.md create mode 100644 notes/ai/ml/traning.md create mode 100644 notes/ai/ml/yolo.md create mode 100644 notes/ai/ml/yolov8.md create mode 100644 notes/healthcare/drug/README.md rename notes/healthcare/{drugs => drug}/dmards.md (100%) create mode 100644 notes/healthcare/drug/drug-faq.md create mode 100644 notes/healthcare/drug/drug-glossary.md create mode 100644 notes/healthcare/drug/essential.md delete mode 100644 notes/healthcare/drugs/README.md delete mode 100644 notes/healthcare/drugs/essential.md rename notes/healthcare/{glossary.md => healthcare-glossary.md} (99%) create mode 100644 notes/healthcare/medicine/README.md rename notes/healthcare/{medical-faq.md => medicine/medicine-faq.md} (100%) rename notes/healthcare/{medical-glossary.md => medicine/medicine-glossary.md} (94%) create mode 100644 notes/languages/python/python-faq.md create mode 100644 notes/service/api/flatbuffers.md create mode 100644 notes/service/media/format/flv.md rename notes/service/media/{ => image}/image-awesome.md (88%) rename notes/service/media/{ => image}/svgo.md (100%) create mode 100644 notes/web/react/mobx.md diff --git a/notes/ai/ai-glossary.md b/notes/ai/ai-glossary.md index 4d1832ece90..59396164da2 100644 --- a/notes/ai/ai-glossary.md +++ b/notes/ai/ai-glossary.md @@ -5,17 +5,29 @@ tags: # AI Glossary -| abbr. | for | cn | -| ----- | -------------------------------------------- | -------------------- | -| GPT | Generative Pre-trained Transformer | 生成型预训练变换模型 | -| LLM | Large Language Model | 大语言模型 | -| LoRA | Language of Rules and Actions | 语言规则与行动语言 | -| LLaMa | Large Language Model for Machine Translation | 机器翻译的大语言模型 | -| RLHF | Reinforcement Learning from Human Feedback | 人类反馈强化学习 | -| SFT | Supervised Fine-tuning | 监督微调 | -| RM | Reward / preference modeling | 奖励/偏好建模 | -| SDXL | Stable Diffusion XL | -| ERP | erotic role playing | 情色角色扮演 | +| abbr. | for | cn | +| ----- | ----------------------------------------------- | -------------------- | +| AI | Artificial Intelligence | 人工智能 | +| ERP | erotic role playing | 情色角色扮演 | +| GELAN | Generalized Efficient Layer Aggregation Network | 通用高效层聚合网络 | +| GPT | Generative Pre-trained Transformer | 生成型预训练变换模型 | +| LLaMa | Large Language Model for Machine Translation | 机器翻译的大语言模型 | +| LLM | Large Language Model | 大语言模型 | +| LoRA | Language of Rules and Actions | 语言规则与行动语言 | +| PGI | Programmable Gradient Information | 可编程梯度信息 | +| RLHF | Reinforcement Learning from Human Feedback | 人类反馈强化学习 | +| RM | Reward / preference modeling | 奖励/偏好建模 | +| SDXL | Stable Diffusion XL | 稳定扩散 XL | +| SFT | Supervised Fine-tuning | 监督微调 | +| SOTA | State of the Art | 最新技术 | +| YOLO | You Only Look Once | | + +| en | cn | +| ---------------- | -------- | +| Stable Diffusion | 稳定扩散 | + + +## LLM 参数 - temperature - 可以控制词元选择的随机性。较低的温度适合希望获得真实或正确回复的提示,而较高的温度可能会引发更加多样化或意想不到的结果。 diff --git a/notes/ai/llm/llama.cpp.md b/notes/ai/llm/llama.cpp.md new file mode 100644 index 00000000000..6447f61bafe --- /dev/null +++ b/notes/ai/llm/llama.cpp.md @@ -0,0 +1,28 @@ +--- +title: llama.cpp +--- + +# llama.cpp + +- [ggerganov/llama.cpp](https://github.com/ggerganov/llama.cpp) + - MIT, C++ + - LLM inference in C/C++ + +```bash +# AlpineLinux py for ML +apk add \ + gcc g++ python3 py3-pip musl-dev cmake make pkgconf build-base \ + git openssh-client binutils coreutils util-linux findutils sed grep tar wget curl neofetch \ + rust cargo python3-dev openssl-dev linux-headers + +# llama.cpp +# ========= +git clone https://github.com/ggerganov/llama.cpp.git +cd llama.cpp +make -j + +./main -m ./models/7B/ggml-model-q4_0.bin -p "Building a website can be done in 10 simple steps:" -n 512 +./main -m ./models/7B/ggml-model-q4_0.bin --file prompts/alpaca.txt --instruct --ctx_size 2048 --keep -1 + +./main -m ./models/ggml-alpaca-7b-q4.bin --color -f ./prompts/alpaca.txt -ins -b 256 --top_k 10000 --temp 0.2 --repeat_penalty 1 -t 7 +``` diff --git a/notes/ai/llm/llm-agent.md b/notes/ai/llm/llm-agent.md new file mode 100644 index 00000000000..ab2e7a40fef --- /dev/null +++ b/notes/ai/llm/llm-agent.md @@ -0,0 +1,26 @@ +--- +tags: + - Automachine +--- + +# Agent + +- Components + - Tools + - Agent Core + - Planing + - with Feedback + - without Feedback + - Memory + - short + - long + - hybrid +- usecase + - Conversational + - Task Oriented + - Creative + - Collaborative + +--- + +- https://www.truefoundry.com/blog/llm-agents diff --git a/notes/ai/llm/llm-glossary.md b/notes/ai/llm/llm-glossary.md index 5040fec5989..6d614abb0f0 100644 --- a/notes/ai/llm/llm-glossary.md +++ b/notes/ai/llm/llm-glossary.md @@ -1,8 +1,11 @@ --- tags: -- Glossary + - Glossary --- # LLM Glossary - +| en | for | cn | notes | +| ---- | ---------------------------- | ----------------- | --------------- | +| GGML | GPT-Generated Model Language | | Georgi Gerganov | +| GGUF | GPT-Generated Unified Format | GPT生成的统一格式 | diff --git a/notes/ai/llm/llm-models.md b/notes/ai/llm/llm-models.md index 0a714ae1071..b8cf26f0b50 100644 --- a/notes/ai/llm/llm-models.md +++ b/notes/ai/llm/llm-models.md @@ -5,25 +5,51 @@ tags: # LLM Models -| model | year | params | note | -| ------- | ---- | ------ | ------------------ | -| GPT-1 | 2018 | 0.12B | -| GPT-2 | 2019 | 1.5B | -| GPT-3 | 2020 | 175B | -| GPT-3.5 | 2022 | | ChatGPT,570GB Text | -| GPT-4 | 2023 | -| GPT-4V | 2023 | +**Proprietary Models** + +| model | date | notes | +| ------------- | ---- | ------------------ | +| GPT-3.5-turbo | 2022 | 4K | +| GPT-3.5-16k | 2022 | 16K | +| GPT-3.5 | 2022 | ChatGPT,570GB Text | +| GPT-4 | 2023 | +| GPT-4-32k | 2023 | +| GPT-4V | 2023 | +| GPT-4o | 2023 | + +**Open Source/Weight Models** + +| model | date | ctx | notes | +| ------- | ---- | --- | ------------------ | +| GPT-1 | 2018 | | 0.12B | +| GPT-2 | 2019 | | 1.5B | +| GPT-3 | 2020 | 2k | 175B | +| LLAMA2 | 2023 | 4K | by Meta | +| LLAMA3 | 2024 | 8K | by Meta | +| phi3 | 2024 | | by Microsoft | +| gemma | 2024 | | by Google DeepMind | +| mistral | 2024 | | by Mistral AI | - https://ollama.com/library - 7B - 8GB 内存 - 13B - 16GB 内存 - 70B - 32GB 内存 +- 小 context window 适用于 RAG +- Context Window + - LLama-3 8B 8K-1M https://ollama.com/library/llama3-gradient + - 256k context window requires at least 64GB of memory + - 1M+ context window requires significantly more (100GB+) --- +- Leader board + - https://huggingface.co/open-llm-leaderboard + - https://chat.lmsys.org/?leaderboard + - https://www.vellum.ai/llm-leaderboard - [google-deepmind/gemma](https://github.com/google-deepmind/gemma) - Apache-2.0, Flax, JAX - by Google DeepMind + - Ultra, Pro, Flash, Nano - 2B, 7B - llama2 - 7B, 13B, 70B diff --git a/notes/ai/llm/ollama.md b/notes/ai/llm/ollama.md index 9b52c7b07bb..a684c974145 100644 --- a/notes/ai/llm/ollama.md +++ b/notes/ai/llm/ollama.md @@ -6,6 +6,7 @@ title: ollama - [ollama/ollama](https://github.com/ollama/ollama) - MIT, Golang + - 封装 llama.cpp - 参考 - [ollama/ollama-js](https://github.com/ollama/ollama-js) - MIT, TS diff --git a/notes/ai/ml/README.md b/notes/ai/ml/README.md index fa647fec64a..1c9dc7b3b9e 100644 --- a/notes/ai/ml/README.md +++ b/notes/ai/ml/README.md @@ -1,7 +1,11 @@ -# 机器学习 +--- +title: 机器学习 +--- -## Tips +# 机器学习 +- [训练](./traning.md) +- [标记](./labeling.md) - [Comparing Deep Learning Frameworks](https://www.infoq.com/presentations/comparison-deep-learning-frameworks) | - | [tiny-cnn](https://github.com/nyanp/tiny-cnn) | [caffe](https://github.com/BVLC/caffe) | [Theano](https://github.com/Theano/Theano) | [TensorFlow](https://www.tensorflow.org/) | diff --git a/notes/ai/ml/dataset.md b/notes/ai/ml/dataset.md new file mode 100644 index 00000000000..2ac0e7d00ed --- /dev/null +++ b/notes/ai/ml/dataset.md @@ -0,0 +1,15 @@ +--- +title: Dataset +--- + +# Dataset + +- https://roboflow.com/formats +- https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml +- coco128 + - YOLOv5 Tutorial Dataset + - https://www.kaggle.com/datasets/ultralytics/coco128 + - https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml + - https://ultralytics.com/assets/coco128.zip +- [ultralytics/JSON2YOLO](https://github.com/ultralytics/JSON2YOLO) + - Convert JSON annotations into YOLO format diff --git a/notes/ai/ml/label-studio.md b/notes/ai/ml/label-studio.md new file mode 100644 index 00000000000..3fa667cf3cd --- /dev/null +++ b/notes/ai/ml/label-studio.md @@ -0,0 +1,99 @@ +--- +title: Label Studio +--- + +# Label-studio + +- [HumanSignal/label-studio](https://github.com/HumanSignal/label-studio) + - Apache-2.0 + - 数据库: SQLite, PostgreSQL + - 存储: S3 +- telementry + - COLLECT_ANALYTICS +- 参考 + - https://labelstud.io/ + - 前端 https://github.com/HumanSignal/label-studio/tree/develop/web/libs/editor + +```bash +pip install -U label-studio +label-studio + +# https://hub.docker.com/r/heartexlabs/label-studio +# https://github.com/HumanSignal/label-studio/blob/develop/docker-compose.yml +docker run --rm -it \ + -p 8080:8080 \ + -v $PWD/data:/label-studio/data \ + --name label-studio heartexlabs/label-studio + +# label-studio --log-level DEBUG + +LABEL_STUDIO_BASE_DATA_DIR=$PWD/data \ +LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true \ +LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=$PWD/files \ + label-studio start +``` + +| env | flags | default | +| ---------------------------------------- | ----------------------------- | ---------------------- | +| LABEL_STUDIO_DATABASE | -db,--database | label_studio.sqlite3 | +| LABEL_STUDIO_BASE_DATA_DIR | --data-dir | +| CONFIG_PATH | -c,--config | default_config.json | +| LABEL_STUDIO_LABEL_CONFIG | -l,--label-config | None | +| LABEL_STUDIO_PORT | -p,--port | 8080 | +| LABEL_STUDIO_HOST | --host | +| LABEL_STUDIO_PROJECT_DESC | --initial-project-description | +| LABEL_STUDIO_PASSWORD | --password | +| LABEL_STUDIO_USERNAME | --username | default_user@localhost | +| LABEL_STUDIO_USER_TOKEN | --user-token | +| LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED | | False | +| LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT | | / | + +## tags + + +```xml + + + + + + + + + + +``` + +- Video+TimeSerias + - https://github.com/HumanSignal/label-studio/issues/4827 +- https://labelstud.io/tags/ +- https://github.com/google-research-datasets/Video-Timeline-Tags-ViTT + +## structs + +```ts +interface Obj { + id: string; + + data:any + value:any + + from_name: string; + to_name: string; + type: string; +} +``` + +# FAQ + +## video frameCount + +- framerate 默认 24 +- https://github.com/HumanSignal/label-studio/issues/3315 +- https://labelstud.io/tags/video diff --git a/notes/ai/ml/labelImg.md b/notes/ai/ml/labelImg.md new file mode 100644 index 00000000000..6b709494bec --- /dev/null +++ b/notes/ai/ml/labelImg.md @@ -0,0 +1,9 @@ +--- +title: LabelImg +--- + +# LabelImg + +- ~~[HumanSignal/labelImg](https://github.com/HumanSignal/labelImg)~~ + - MIT, Python + - -> [Label Studio](./label-studio.md) diff --git a/notes/ai/ml/labeling.md b/notes/ai/ml/labeling.md new file mode 100644 index 00000000000..be425db0628 --- /dev/null +++ b/notes/ai/ml/labeling.md @@ -0,0 +1,79 @@ +--- +title: Labeling +--- + +# Labeling + +- VOC - Visual Object Classes + - Pascal VOC + - XML + - object, name, bndbox +- COCO + - Common Objects in Context + - JSON + - images, annotations, categories + - bbox - `[x, y, w, h]` +- YOLO - You Only Look Once + - ` ` +- 参考 + - https://github.com/KKKSQJ/DeepLearning/tree/master/others/label_convert + +## VOC + +```xml + + VOC2012 + image1.jpg + + 800 + 600 + 3 + + + dog + Unspecified + 0 + 0 + + 48 + 240 + 195 + 371 + + + + +``` + +## COCO + +```json +{ + "images": [ + { + "id": 1, + "file_name": "image1.jpg", + "width": 800, + "height": 600 + } + ], + "annotations": [ + { + "id": 1, + "image_id": 1, + "category_id": 18, + "bbox": [48, 240, 147, 131], + "segmentation": [], + "area": 19257, + "iscrowd": 0 + } + ], + "categories": [ + { + "id": 18, + "name": "dog", + "supercategory": "animal" + } + ] +} +``` diff --git a/notes/ai/ml/pytorch.md b/notes/ai/ml/pytorch.md new file mode 100644 index 00000000000..b6cedf0946d --- /dev/null +++ b/notes/ai/ml/pytorch.md @@ -0,0 +1,19 @@ +--- +title: PyTorch +--- + +# PyTorch + +- [pytorch](https://github.com/pytorch/pytorch) + - Python, C++ + +```bash +pip3 install torch torchvision torchaudio + +brew install proxychains-ng +echo -e '[ProxyList]\nsocks5 127.0.0.1 8888' > proxychains.conf +proxychains4 pip3 install torch torchvision +``` + +- https://pytorch.org/tutorials/ +- https://www.fast.ai/ diff --git a/notes/ai/ml/traning.md b/notes/ai/ml/traning.md new file mode 100644 index 00000000000..81266f6b579 --- /dev/null +++ b/notes/ai/ml/traning.md @@ -0,0 +1,29 @@ +--- +title: 训练 +--- + +# Traning + +```mermaid +graph TD + DataCollection["数据收集"] + DataLabeling["数据标注"] + ModelTraining["模型训练"] + ModelEvaluation["模型评估"] + ModelDeploy["模型部署"] + + DataCollection -- 抓取 --> DataLabeling + DataLabeling -- 格式化 --> ModelTraining + ModelTraining -- 测试 --> ModelEvaluation + ModelEvaluation -- 分析 --> Quality{"质量?"} + Quality -- YES:发布 --> ModelDeploy + Quality -- NO:修复 --> DataLabeling + ModelDeploy -- 收集 --> ErrorMonitoring + ErrorMonitoring -- 检查 --> ErrorCheck{"错误检查"} + ErrorCheck -- YES:继续迭代 --> DataCollection + ErrorCheck -- NO:热修复 --> ModelDeploy +``` + +- label-studio 数据标注工具 +- transformers - 模型训练套件 +- TextBrewer - 模型蒸馏工具 diff --git a/notes/ai/ml/yolo.md b/notes/ai/ml/yolo.md new file mode 100644 index 00000000000..d9886a0492d --- /dev/null +++ b/notes/ai/ml/yolo.md @@ -0,0 +1,35 @@ +--- +title: Yolo +--- + +# Yolo + +- [YOLO](https://arxiv.org/abs/1506.02640) +- [ultralytics/yolov5](https://github.com/ultralytics/yolov5) +- [meituan/YOLOv6](https://github.com/meituan/YOLOv6) + - GPLv3 + - by 美团, 2022 +- [WongKinYiu/yolov7](https://github.com/WongKinYiu/yolov7) + - GPLv3 +- [ultralytics/ultralytics](https://github.com/ultralytics/ultralytics) + - AGPLv3 + - YOLOv8 + - 支持 detection, segmentation, pose estimation, tracking, and classification + - https://docs.ultralytics.com/ + +| model | file | for | Size | +| ------ | ---------------------- | ---------------- | --------------------: | +| YOLOv8 | `yolov8{n,s,m,l,x}.pt` | Detection | 6, 22, 50, 83, 131 MB | +| YOLOv9 | `yolov9{c,e}.pt` | Object Detection | 49, 112 MB | + +- https://docs.ultralytics.com/models/yolov8/ +- https://github.com/ultralytics/assets/releases + +# FAQ + +## YOLOv5 vs YOLOv8 + +- YOLOv5 + - 易用 +- YOLOv8 + - 更快、更准 diff --git a/notes/ai/ml/yolov8.md b/notes/ai/ml/yolov8.md new file mode 100644 index 00000000000..bbd98496fa3 --- /dev/null +++ b/notes/ai/ml/yolov8.md @@ -0,0 +1,194 @@ +--- +title: YOLOv8 +--- + +# YOLOv8 + +- [ultralytics/ultralytics](https://github.com/ultralytics/ultralytics) + - AGPLv3 + - YOLOv8 + - 支持 detection, segmentation, pose estimation, tracking, and classification + - https://docs.ultralytics.com/ + +```bash +pip3 install ultralytics +``` + +```bash +# yolo [TASK] MODE [ARGS] + +# 结果在 runs/detect/predict +yolo detect predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' + +# default.yaml +``` + +- TASK - detect, segment, classify + - detech - 检测 - 识别和定位图像或视频中的对象或感兴趣区域 + - segment - 分割 - 图像或视频 划分 为对应不同对象或类别的 区域或像素的过程 + - classify - 分类任务是预测输入图像的类别标签 + - post - 姿态检测的目标是识别图像中的对象并估计它们的关键点 + - 这通常涉及到识别人体的部位(如手臂、腿、脸等)并标记其关键点(如关节位置)。姿态估计在运动分析、增强现实等领域特别有用。 + - OBB + - 更精确地捕捉图像中物体的方向,特别是在物体倾斜或旋转时。 + - OBB是标准边界框的扩展,它允许边界框有任意的旋转角度,而不仅仅是水平或垂直对齐。这在卫星图像、医学成像等领域中非常有用,可以更准确地定位和描述对象的形状和方向。 +- MODE - train, val, predict, export, track +- ARGS + - https://docs.ultralytics.com/usage/cfg/ + +```py +from ultralytics import YOLO + +# Create a new YOLO model from scratch +model = YOLO('yolov8n.yaml') + +# Load a pretrained YOLO model (recommended for training) +model = YOLO('yolov8n.pt') + +# Train the model using the 'coco8.yaml' dataset for 3 epochs +results = model.train(data='coco8.yaml', epochs=3) + +# Evaluate the model's performance on the validation set +results = model.val() + +# Perform object detection on an image using the model +results = model('https://ultralytics.com/images/bus.jpg') + +# Export the model to ONNX format +success = model.export(format='onnx') +``` + +## train + +```bash +# demo +# src/datasets/coco8 +yolo train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01 +``` + +```yaml +train: train +val: val + +nc: 80 +names: ['person', 'bicycle', 'car'] +``` + +```bash +yolo train data=dataset.yaml model=yolov8n.pt epochs=100 imgsz=640 +``` + +``` + +``` + +```yaml title="dataset.yaml" +# path: # root dir +train: src/dataset/train # 训练集图像路径 +val: src/dataset/val # 验证集图像路径 +# test: + +nc: 3 # 类别数量 +names: ['cat', 'dog', 'bird'] # 类别名称列表 + +# download: +``` + +- YOLOv5 & YOLOv8 YAML + +``` +Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size +1/10 0G 1.65 4.301 1.229 45 1280: 22%|██▏ | 41/189 [01:28<04:10, 1.70s/it] +Class Images Instances Box(P R mAP50 mAP50-95): 0%| | 0/95 [00:00 `SELECT $1::int + $2::int \bind 1 2 \g)` +- SIMD 加速 + - JSON + - 字符串处理 +- pg_stat_io +- load_balance_hosts + - libpq +- 参考 + - https://www.postgresql.org/about/news/postgresql-16-released-2715/ ## PostgreSQL 15 - 新增 MERGE 语句 - 用于合并两个 **表** diff --git a/notes/devops/kubernetes/distro/sealos.md b/notes/devops/kubernetes/distro/sealos.md index 97e2872851c..a9c2947894c 100644 --- a/notes/devops/kubernetes/distro/sealos.md +++ b/notes/devops/kubernetes/distro/sealos.md @@ -4,4 +4,6 @@ title: sealos # sealos -- [fanux/sealos](https://github.com/fanux/sealos) +- [labring/sealos](https://github.com/labring/sealos) +- 参考 + - [labring/laf](https://github.com/labring/laf) diff --git a/notes/devops/web/kong/README.md b/notes/devops/web/kong/README.md index 140b8d52bc9..326f459b17a 100644 --- a/notes/devops/web/kong/README.md +++ b/notes/devops/web/kong/README.md @@ -5,7 +5,7 @@ title: Kong # Kong Gateway - [kong](https://github.com/Kong/kong) - - OpenResty + LUA + lua-kong-nginx-module + - Apache-2.0, OpenResty + LUA + lua-kong-nginx-module - [REST Admin API](https://docs.konghq.com/latest/admin-api/) - 支持 Golang 插件 - [CHANGELOG](https://github.com/Kong/kong/blob/master/CHANGELOG.md) diff --git a/notes/healthcare/README.md b/notes/healthcare/README.md index b80b508ba52..af6f0ec9a9b 100644 --- a/notes/healthcare/README.md +++ b/notes/healthcare/README.md @@ -4,4 +4,8 @@ title: 健康 # 健康 +- Healthcare - 医疗保健 + - 涵盖了提供医学服务和支持以保持或恢复人体健康的所有方面。这包括医疗服务的提供, + - 如医院治疗、家庭医生服务、护理、康复等。医疗保健不仅限于治疗疾病,也包括预防保健和健康教育等。 +- [FAQ](./healthcare-faq.md) - [默沙东诊疗手册](https://www.msdmanuals.cn/home) diff --git a/notes/healthcare/drug/README.md b/notes/healthcare/drug/README.md new file mode 100644 index 00000000000..34a17944e95 --- /dev/null +++ b/notes/healthcare/drug/README.md @@ -0,0 +1,15 @@ +--- +title: 药物 +--- + +# 药物 + +> 是药三分毒 + +- [术语](./drug-glossary.md) +- [常见问题](./drug-faq.md) + +## 参考 + +- https://helloyishi.com.tw +- https://www.drugs.com/ diff --git a/notes/healthcare/drugs/dmards.md b/notes/healthcare/drug/dmards.md similarity index 100% rename from notes/healthcare/drugs/dmards.md rename to notes/healthcare/drug/dmards.md diff --git a/notes/healthcare/drug/drug-faq.md b/notes/healthcare/drug/drug-faq.md new file mode 100644 index 00000000000..0682469abd4 --- /dev/null +++ b/notes/healthcare/drug/drug-faq.md @@ -0,0 +1,6 @@ +--- +tags: +- FAQ +--- + +# Drug FAQ diff --git a/notes/healthcare/drug/drug-glossary.md b/notes/healthcare/drug/drug-glossary.md new file mode 100644 index 00000000000..e4b1a02e568 --- /dev/null +++ b/notes/healthcare/drug/drug-glossary.md @@ -0,0 +1,299 @@ +--- +tags: + - Glossary +--- + +# Drug Glossary + +| abbr. | for | cn | +| ----- | ---------------------------------------- | ------------------ | +| COPD | Chronic Obstructive Pulmonary Disease | 慢性阻塞性肺病 | +| APAP | Acetaminophen | 对乙酰氨基酚 | +| NSAID | Nonsteroidal Anti-Inflammatory Drug | 非甾体抗炎药 | +| OTC | Over-the-counter | 非处方药 | +| MTC | Medullary Thyroid Cancer | 髓样甲状腺癌 | +| MEN | Multiple Endocrine Neoplasia | 多发性内分泌腺肿瘤 | +| NMPA | National Medical Products Administration | 国家药品监督管理局 | + +| en | cn | +| ----------------- | ---------- | +| Drug nomenclature | 药物命名法 | +| Dexamethasone | 地塞米松 | +| Steroid | 类固醇 | +| Corticosteroid | 皮质类固醇 | +| Prednisone | 泼尼松 | +| Quinolines | 喹啉类药物 | +| Oxycinchophen | 奥西曲芬 | +| Gold preparations | 金制剂 | +| Penicillamine | 青霉胺 | +| Oxicam | 昔康 | + +**知名制药公司** + +| en | cn | notes | known for | +| ------------------------------ | ------------ | ---------------- | -------------------------------- | +| Eli Lilly and Company | 礼来公司 | 美国, 1876 | 精神疾病、内分泌疾病、抗肿瘤药物 | +| Roche, F. Hoffmann-La Roche AG | 罗氏 | 瑞士巴塞尔, 1896 | 创新药物和诊断产品 | +| Pfizer Inc. | 辉瑞 | 美国, 1849 | 各类药物和疫苗 | +| Merck & Co., Inc. | 默沙东 | 美国, 1891 | 新药研发、疫苗 | +| Novartis International AG | 诺华 | 瑞士, 1996 | 创新药物、仿制药、眼科保健产品 | +| GlaxoSmithKline, GSK | 葛兰素史克 | 英国, 2000 | 疫苗、药物、消费者保健品 | +| AstraZeneca | 阿斯利康 | 英国, 1999 | 肿瘤、心血管、肾病及代谢疾病药物 | +| Sanofi | 赛诺菲 | 法国, 2004 | 处方药和疫苗 | +| Bayer AG | 拜耳 | 德国, 1863 | 医药保健、作物科学 | +| Johnson & Johnson | 强生 | 美国, 1886 | 医药、医疗设备、消费品 | +| AbbVie Inc. | 艾伯维 | 美国, 2013 | 免疫学、肿瘤学、病毒学 | +| Amgen Inc. | 安进 | 美国, 1980 | 生物制药、肿瘤和骨骼健康 | +| Bristol-Myers Squibb | 百时美施贵宝 | 美国, 1989 | 肿瘤学、免疫学、心血管疾病 | +| Gilead Sciences, Inc. | 吉利德 | 美国, 1987 | 抗病毒药物、肿瘤药物 | +| Takeda Pharmaceutical Company | 武田药品 | 日本, 1781 | 肿瘤、消化系统疾病、神经疾病 | +| Novo Nordisk | 诺和诺德 | 丹麦, 1923 | 糖尿病治疗、肥胖管理 | +| Boehringer Ingelheim | 勃林格殷格翰 | 德国, 1885 | 心血管疾病、呼吸系统疾病 | +| Biogen | 渤健 | 美国, 1978 | 神经科学、罕见病 | +| Astellas Pharma Inc. | 安斯泰来 | 日本, 2005 | 器官移植、泌尿系统疾病 | +| Teva Pharmaceutical Industries | Teva 制药 | 以色列, 1901 | 仿制药、生物制药 | +| Himalaya Drug Company | 喜马拉雅药业 | 印度, 1930 | 天然草药、保健品 | + +**药物** + +| en | cn | Drug nomenclature | notes | by | +| --------------------- | ---------------------- | ----------------------------------------- | ------------------------------------------ | ---- | +| Loratadine | 氯雷他定 | 开瑞坦/Kairetan, 息斯敏/Xisumin | 过敏症状 | +| Carbocisteine | 羧甲司坦 | +| Dexamethasone | 地塞米松 | | +| Leflunomide | 来氟米特 | 爱若化/Airohua | 成人类风湿关节炎 | +| Orlistat | 奥利司他 | 赛尼可/Xenical | 减肥 | +| Ibuprofen | 布洛芬 | 布洛芬/Brufen, 芬必得/Fenbid, 美林/Motrin | 退烧、止痛、抗炎症 | +| Acetaminophen | 对乙酰氨基酚 | 泰诺/Tylenol | > 38.5 °C | +| Paracetamol | ^ | ^ | +| Aspirin | 阿司匹林 | 拜耳阿斯匹林 | 降低炎症、退烧、止痛 | +| Domperidone | 多潘立酮 | 吗丁啉/Motilium | 胃肠道疾病, 消化 | +| Guaifenesin | 格隆溴铵福莫特罗 | Robitussin, Mucinex | 祛痰、咳嗽、感冒、支气管炎 | +| Terbutaline | 硫酸特布他林 | | 支气管痉挛、哮喘、慢性阻塞性肺病 | +| Budesonide | 布地奈德 | Pulmicort/普米克令舒 | 哮喘、慢性阻塞性肺病 | +| Dexamethasone acetate | 醋酸地塞米松 | 皮炎平, 意可贴 | +| Terbinafine | 特比萘芬,酮康唑,氟康唑 | 达克宁/Daktarin,乐肤舒/Lamisil | 真菌感染 | +| Oseltamivir | 奥司他韦 | 达菲/Tamiflu | 流感病毒 | +| Methotrexate | 甲氨蝶呤 | 特瑞索/Trexall, Rheumatrex | 癌症、自体免疫疾病、子宫外孕和进行药物流产 | +| Celecoxib | 塞来昔布 | 希乐葆/Celebrex, 西乐葆 | 疼痛、炎症、类风湿关节炎 | +| Etoricoxib | 依托考昔 | 阿法酸/Arcoxia | 疼痛、炎症、类风湿关节炎 | +| Meloxicam | 美洛昔康 | 莫比可/Mobic | 骨关节炎、类风湿性关节炎 | +| Semaglutide | 司美格鲁肽 | Ozempic、Wegovy、Rybelsus | 抗糖尿病、减肥 | +| Tirzepatide | 替西帕肽 | Mounjaro/2型糖尿病, Zepbound/减肥 | 抗糖尿病、减肥 | 礼来 | + +- https://drugbank.ca/ + +## 皮质类固醇 {#corticosteroid} + +## 替西帕肽 {#tirzepatide} + +- 商品名 + - Zepbound + - 1300元/盒/2支 + - Mounjaro - 日本版替西帕肽 + - 2.5mg/0.5mL - 700元 + - 5mg/0.5mL - 980元 +- 作用 + - 减肥 - 减少食物摄入量和减慢食物通过消化道的速度,也就是胃排空速来帮助减肥,可在更长的时间内有饱腹感,并减少进食量。 + - 用量 + - 2.5mg, 每周一次皮下注射, 4周后, 增加剂量至5 mg, 每周皮下注射一次。 + - 最大剂量为每周一次皮下注射15mg +- 参考 + - https://zepbound.lilly.com/ + - 减肥作用 https://m.1blv.com/newsDetail/122115.html + +## 羧甲司坦 {#carbocisteine} + +- Carbocisteine +- Carbocysteine +- 适应症 + - 慢性支气管炎、支气管哮喘等引起的 痰液粘稠难排 + - COPD +- 商品名 + - Mucodyne - +- 参考 + - https://www.nhs.uk/medicines/carbocisteine/ + +## 氯雷他定 {#loratadine} + +- Loratadine +- 第二代的抗组织胺药 +- 商品名 + - 开瑞坦 + - 息斯敏 + - 克敏能 + - 佳力天(Claritin) + - 乐敏锭(Lomidine) +- 疗效 + - 治疗过敏症状 + - 缓解过敏性鼻炎引起的症状:如喷嚏、流涕、鼻痒、鼻塞、以及眼部眼痒及烧灼感。 + - 慢性荨麻疹,瘙痒性皮肤病以及其它过敏性皮肤病的对症治疗 + +## 地塞米松 {#dexamethasone} + +- Dexamethasone +- 皮质类固醇 +- 适应症 + - 含风湿性疾病 + - 某些皮肤病、严重过敏、哮喘、慢性阻塞性肺病、义膜性喉炎、脑水肿 + - 也可能与抗生素合并用于结核病患者。 + +## 青霉胺 {#penicillamine} + +- Penicillamine +- 1970 FDA 批准,WHO 基本药物 +- 产品名 + - Cuprimine +- 适应症 + - 威尔逊氏病 + - 尿胱氨酸水平高 + - 类风湿性关节炎 + - 各种重金属中毒的肾结石患者 + +## 双氯芬酸钾片 + +diclofenac + +急性疼痛短期治疗 +创伤、妇科、脊柱、耳鼻喉感染性疼痛和炎症 + +## 来氟米特片 {#leflunomide} + +- Leflunomide +- 1998 年 FDA 批准 +- 商品名 + - 爱若化 - Arava by Sanofi Aventis +- 适应症 + - 改善成人类风湿关节炎 + - 狼疮性肾炎 +- 注意事项 + - 检测 FBC,肾功能,LFT,血压,体重。 + - 每周检查两次,直到剂量稳定六周。 + - 稳定 12 个月后可降低到每月三次检查(如果毒性较高,则更频繁)。 + - 如果剂量增加,则每两周监测一次,直到剂量稳定六周,然后恢复到以前的时间表。 +- 目前只发现医院有 Leflunomide 来氟米特 + +--- + +- https://en.wikipedia.org/wiki/Leflunomide + +## 甲氨蝶呤 + +:::caution + +- 副作用较多,服用的注意事项较多 +- 不一定需要每日服用 + +::: + +- methotrexate - MTX - 甲氨蝶呤/氨甲蝶呤 +- 药效 + - 癌症、自体免疫疾病、子宫外孕和进行药物流产 + - 癌症: 癌症类型包含乳癌、白血病、肺癌、淋巴癌和骨肉瘤 + - 自体免疫疾病: 银屑病、类风湿性关节炎和克隆氏症 +- 注意事项 + - 孕妇禁用 + - 不适用于类风湿关节炎场景 + - low blood cell counts + - weak immune system - 免疫系统弱 + - alcoholism - 酗酒 + - chronic liver disease - 慢性肝病 + - 哺乳期 + - 禁用场景 + - 肾病 + - 肺病 + - 发热 + - 胃溃疡 + - 溃疡性结肠炎 +- 参考 + - https://www.drugs.com/methotrexate.html + +## 醋酸泼尼松片 + +- prednisone +- 适应症 +- 副作用 +- 注意事项 + +## 盐酸氨基葡萄糖片 + +骨关节炎治疗和预防: 膝关节、髋关节、脊柱、肩、手、手腕、踝关节 + +## 希乐葆 + +- Celebrex - 希乐葆/西乐葆 +- 像布洛芬,是一种非类固醇类消炎止痛药 +- 月经、骨关节炎疼痛、类风湿关节炎、缓解疼痛、强直性脊柱炎 +- https://www.healthymatters.com.hk/zh/medicines/celecoxib-in-hong-kong/ + +## 依那西普 + +- Enbrel - 依那西普 - Etanercept +- 注射剂 +- 治疗 + - 疗类风湿性关节炎、银屑病关节炎、斑块状银屑病、强直性脊椎炎 +- https://www.healthymatters.com.hk/zh/medicines/etanercept-in-hong-kong/ + +## 甲钴胺 + +- 甲钴胺 - Mecobalamin +- 神经周围疾病 - 神经痛、麻木 + - 神经炎神经痛 +- 一种 维生素 B12 + - 可直接服用 维生素 B12 替代 甲钴胺 +- 厂家 + - 甲保可 +- 副作用 + - 厌食、恶心、呕吐、腹泻 + - 低血钾、高尿酸 +- 参考 + - https://www.drugs.com/international/mecobalamin.html + - https://www.mayoclinic.org/drugs-supplements-vitamin-b12/art-20363663 + - https://helloyishi.com.tw/drugs-supplement/mecobalamin/ + +## 普瑞巴林 + +- Pregabalin +- 治疗: 癫痫, 神经性疼痛, 纤维肌痛, 及 广泛性焦虑症 +- 抗癫痫药 + +## 氟哌噻吨美利曲辛片 + +- Flupentixol-melitracen + - deanxit + - by Lundbeck + - [灵北制药](https://zh.wikipedia.org/wiki/灵北制药) + - 丹麦 +- 短期服用 + +| - | - | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| 治疗 | 轻、中度抑郁和焦虑。
神经衰弱、心因性抑郁,抑郁性神经官能症,隐匿性抑郁,心身疾病伴焦虑和情感淡漠,更年期抑郁,嗜酒及药瘾者的焦躁不安及抑郁。 | + +- 参考 + - https://en.wikipedia.org/wiki/Flupentixol/melitracen + +## 奥利司他 {#orlistat} + +- Orlistat - 奥利司他 +- 商品名 + - Xenical/赛尼可 +- 适应症 + - 肥胖症 - BMI >= 24 +- 作用 + - 阻止脂肪的吸收 +- 副作用 + - 脂肪排泄 +- 参考 + - 美国:奥利司他在2007年成为第一个政府合法的减肥药 + - 欧盟:奥利司他在2009年成为非处方药 + - 台湾:目前唯一一个合法辅助减肥药物 + +## FDA 怀孕用药分级 + +- A:無風險 +- B:輕度風險 +- C:中度風險 +- D:高度風險 +- X:絕對禁止 +- N:未知 diff --git a/notes/healthcare/drug/essential.md b/notes/healthcare/drug/essential.md new file mode 100644 index 00000000000..a760b36ab57 --- /dev/null +++ b/notes/healthcare/drug/essential.md @@ -0,0 +1,24 @@ +--- +title: 基本药物 +--- + +# 基本药物 + +> 基本药物 - Essential medicines - 指 "能够满足人们的优先医疗卫生需求" 的药物 + +- EML - WHO Model List of Essential Medicines +- 参考 + - [世界卫生组织基本药物标准清单](https://zh.wikipedia.org/wiki/世界卫生组织基本药物标准清单) + - [儿童基本药物清单](https://en.wikipedia.org/wiki/WHO_Model_List_of_Essential_Medicines_for_Children) + - https://www.who.int/groups/expert-committee-on-selection-and-use-of-essential-medicines/essential-medicines-lists + - https://list.essentialmeds.org/ + +**使用抗组胺药和药物过敏反应** + +| en | zh | +| -----------------------: | ----------------------------- | +| Loratadine | 氯雷他定 | +| Dexamethasone | 地塞米松 | +| Epinephrine (adrenaline) | 肾上腺素 | +| Hydrocortisone | 氢化可的松/皮质醇(cortisol) | +| Prednisolone | 泼尼松龙 | diff --git a/notes/healthcare/drugs/README.md b/notes/healthcare/drugs/README.md deleted file mode 100644 index 18d9ee24189..00000000000 --- a/notes/healthcare/drugs/README.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -title: 药物 ---- - -# 药物 - -> 是药三分毒 - -## 双氯芬酸钾片 - -diclofenac - -急性疼痛短期治疗 -创伤、妇科、脊柱、耳鼻喉感染性疼痛和炎症 - -## 来氟米特片 - -- Leflunomide -- 厂家 - - 爱若化 - -1. 改善成人类风湿关节炎 -2. 狼疮性肾炎 - -- 目前只发现医院有 Leflunomide 来氟米特 -- Leflunomide 注意事项 - - 检测 FBC,肾功能,LFT,血压,体重。 - - 每周检查两次,直到剂量稳定六周。 - - 稳定 12 个月后可降低到每月三次检查(如果毒性较高,则更频繁)。 - - 如果剂量增加,则每两周监测一次,直到剂量稳定六周,然后恢复到以前的时间表。 - -## 甲氨蝶呤 - -:::caution - -- 副作用较多,服用的注意事项较多 -- 不一定需要每日服用 - -::: - -- methotrexate - MTX - 甲氨蝶呤/氨甲蝶呤 -- 药效 - - 癌症、自体免疫疾病、子宫外孕和进行药物流产 - - 癌症: 癌症类型包含乳癌、白血病、肺癌、淋巴癌和骨肉瘤 - - 自体免疫疾病: 银屑病、类风湿性关节炎和克隆氏症 -- 注意事项 - - 孕妇禁用 - - 不适用于类风湿关节炎场景 - - low blood cell counts - - weak immune system - 免疫系统弱 - - alcoholism - 酗酒 - - chronic liver disease - 慢性肝病 - - 哺乳期 - - 禁用场景 - - 肾病 - - 肺病 - - 发热 - - 胃溃疡 - - 溃疡性结肠炎 -- 参考 - - https://www.drugs.com/methotrexate.html - -## 醋酸泼尼松片 - -- prednisone - -## 盐酸氨基葡萄糖片 - -骨关节炎治疗和预防: 膝关节、髋关节、脊柱、肩、手、手腕、踝关节 - -## 希乐葆 - -- Celebrex - 希乐葆/西乐葆 -- 像布洛芬,是一种非类固醇类消炎止痛药 -- 月经、骨关节炎疼痛、类风湿关节炎、缓解疼痛、强直性脊柱炎 -- https://www.healthymatters.com.hk/zh/medicines/celecoxib-in-hong-kong/ - -## 依那西普 - -- Enbrel - 依那西普 - Etanercept -- 注射剂 -- 治疗 - - 疗类风湿性关节炎、银屑病关节炎、斑块状银屑病、强直性脊椎炎 -- https://www.healthymatters.com.hk/zh/medicines/etanercept-in-hong-kong/ - -## 甲钴胺 - -- 甲钴胺 - Mecobalamin -- 神经周围疾病 - 神经痛、麻木 - - 神经炎神经痛 -- 一种 维生素 B12 - - 可直接服用 维生素 B12 替代 甲钴胺 -- 厂家 - - 甲保可 -- 副作用 - - 厌食、恶心、呕吐、腹泻 - - 低血钾、高尿酸 -- 参考 - - https://www.drugs.com/international/mecobalamin.html - - https://www.mayoclinic.org/drugs-supplements-vitamin-b12/art-20363663 - - https://helloyishi.com.tw/drugs-supplement/mecobalamin/ - -## 普瑞巴林 - -- Pregabalin -- 治疗: 癫痫, 神经性疼痛, 纤维肌痛, 及 广泛性焦虑症 -- 抗癫痫药 - -## 氟哌噻吨美利曲辛片 - -- Flupentixol-melitracen - - deanxit - - by Lundbeck - - [灵北制药](https://zh.wikipedia.org/wiki/灵北制药) - - 丹麦 -- 短期服用 - -| - | - | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| 治疗 | 轻、中度抑郁和焦虑。
神经衰弱、心因性抑郁,抑郁性神经官能症,隐匿性抑郁,心身疾病伴焦虑和情感淡漠,更年期抑郁,嗜酒及药瘾者的焦躁不安及抑郁。 | - -- 参考 - - https://en.wikipedia.org/wiki/Flupentixol/melitracen - -## FDA 怀孕用药分级 - -A:無風險 -B:輕度風險 -C:中度風險 -D:高度風險 -X:絕對禁止 -N:未知 - -## 参考 - -- https://helloyishi.com.tw -- https://www.drugs.com/ diff --git a/notes/healthcare/drugs/essential.md b/notes/healthcare/drugs/essential.md deleted file mode 100644 index a2461f72cde..00000000000 --- a/notes/healthcare/drugs/essential.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: 基本药物 ---- - -# 基本药物 - -> 基本药物 - Essential medicines - 指 "能够满足人们的优先医疗卫生需求" 的药物 - -- 参考 - - [世界卫生组织基本药物标准清单](https://zh.wikipedia.org/wiki/世界卫生组织基本药物标准清单) - - [儿童基本药物清单](https://en.wikipedia.org/wiki/WHO_Model_List_of_Essential_Medicines_for_Children) diff --git a/notes/healthcare/healthcare-faq.md b/notes/healthcare/healthcare-faq.md index 60efdbddd6a..30dd9354ab2 100644 --- a/notes/healthcare/healthcare-faq.md +++ b/notes/healthcare/healthcare-faq.md @@ -34,3 +34,11 @@ tags: - 通过抑制胃和小肠中的脂肪分解酶(脂肪酶)来工作。这些酶负责分解饮食中的脂肪,使其可以被身体吸收。 - 可能有副作用,如消化不良、腹泻和脂肪溢出等。 - 不能阻止 **碳水化合物** + +## Healthcare vs Medicine + +- Medicine - 医学 + - 医学是一门科学,研究人类生理和病理的规律,以预防、诊断、治疗疾病,维护和恢复健康为目的。 +- Healthcare - 医疗保健 + - 涵盖了提供医学服务和支持以保持或恢复人体健康的所有方面。这包括医疗服务的提供,如医院治疗、家庭医生服务、护理、康复等。医疗保健不仅限于治疗疾病,也包括预防保健和健康教育等。 + - 医学是医疗保健的基础,但医疗保健还包括其他方面,如公共卫生、健康管理、医疗保险等。 diff --git a/notes/healthcare/glossary.md b/notes/healthcare/healthcare-glossary.md similarity index 99% rename from notes/healthcare/glossary.md rename to notes/healthcare/healthcare-glossary.md index 81132f9f44b..067d345de55 100644 --- a/notes/healthcare/glossary.md +++ b/notes/healthcare/healthcare-glossary.md @@ -1,5 +1,7 @@ --- title: 词汇表 +tags: + - Glossary --- # 词汇表 @@ -63,8 +65,6 @@ title: 词汇表 - 参考 - [what-are-mets](https://www.healthline.com/health/what-are-mets) -# FAQ - ## 运动项目能量消耗表 - https://www.hpa.gov.tw/Cms/File/Attach/9738/File_9134.pdf diff --git a/notes/healthcare/medicine/README.md b/notes/healthcare/medicine/README.md new file mode 100644 index 00000000000..6839cf37974 --- /dev/null +++ b/notes/healthcare/medicine/README.md @@ -0,0 +1,8 @@ +--- +title: 医学 +--- + +# 医学 + +- [词汇](./medicine-glossary.md) +- [FAQ](./medicine-faq.md) diff --git a/notes/healthcare/medical-faq.md b/notes/healthcare/medicine/medicine-faq.md similarity index 100% rename from notes/healthcare/medical-faq.md rename to notes/healthcare/medicine/medicine-faq.md diff --git a/notes/healthcare/medical-glossary.md b/notes/healthcare/medicine/medicine-glossary.md similarity index 94% rename from notes/healthcare/medical-glossary.md rename to notes/healthcare/medicine/medicine-glossary.md index 86bd9d61578..41d0321fc91 100644 --- a/notes/healthcare/medical-glossary.md +++ b/notes/healthcare/medicine/medicine-glossary.md @@ -26,6 +26,14 @@ title: 医学词汇表 | capsule | 胶囊 | | tablet | 片 | +| en | cn | +| ------------ | -------- | +| Drug | 药物 | +| Healthcare | 医疗保健 | +| Medicine | 医学 | +| Pathology | 病理学 | +| Pharmacology | 药理学 | + ## X-ray vs CT vs MRI - X 射线 - X-Ray - 1901 年 diff --git a/notes/languages/diagram/diagram-awesome.md b/notes/languages/diagram/diagram-awesome.md index 559678da69f..47ba9ce74cc 100644 --- a/notes/languages/diagram/diagram-awesome.md +++ b/notes/languages/diagram/diagram-awesome.md @@ -18,7 +18,7 @@ tags: - [asciiflow](https://asciiflow.com) - [vega/vega](https://github.com/vega/vega) - [Deep-Symmetry/bytefield-svg](https://github.com/Deep-Symmetry/bytefield-svg) - - [DSL](https://bytefield-svg.deepsymmetry.org/bytefield-svg/1.6.0/intro.html) + - [DSL](https://bytefield-svg.deepsymmetry.org/bytefield-svg/1.8.0/intro.html) - https://textik.com/ - [asciiflow](https://asciiflow.com/) - [gaphor/gaphor](https://github.com/gaphor/gaphor) diff --git a/notes/languages/python/pip.md b/notes/languages/python/pip.md index 226adcaf656..2b8a0ae91f7 100644 --- a/notes/languages/python/pip.md +++ b/notes/languages/python/pip.md @@ -4,8 +4,17 @@ title: pip # pip +- [pypa/pip](https://github.com/pypa/pip) + - MIT, Python + - package installer for Python + - pypa -> Python Packaging Authority +- 参考 + - https://pip.pypa.io/en/stable/ + ```bash # pip install | download | uninstall | freeze | inspect | list | show | check | config | search | cache | index | wheel | hash | debug + +eval "$(pip completion --bash)" ``` ## Torch @@ -58,6 +67,16 @@ trusted-host = https://pypi.tuna.tsinghua.edu.cn - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ +## conf + +```ini +[global] +proxy = http://user:password@proxy_name:port +``` + +- https://pip.pypa.io/en/stable/topics/configuration/ +- https://pip.pypa.io/en/stable/user_guide/#config-file + # FAQ ## Running pip as the 'root' user can result in broken permissions diff --git a/notes/languages/python/pyenv.md b/notes/languages/python/pyenv.md index 5e4d18fc6ba..424a55484d2 100644 --- a/notes/languages/python/pyenv.md +++ b/notes/languages/python/pyenv.md @@ -4,9 +4,34 @@ title: pyenv # pyenv +- [pyenv/pyenv](https://github.com/pyenv/pyenv) + - MIT + ```bash brew install pyenv -pyenv install 2 +pyenv install --list +pyenv install 3 + +# pyenv install 2 # pyenv global 2 + export PATH=$(pyenv root)/shims:$PATH + +# $HOME/.pyenv/ +pyenv root +ls $(pyenv root)/shims + + +echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc +echo 'eval "$(pyenv init --path)"' >> ~/.bashrc +echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc +source ~/.bashrc + +# virtualenv +brew install pyenv-virtualenv +pyenv virtualenv 3 venv ``` + +- PYENV_VERSION +- .python-version +- $(pyenv root)/version diff --git a/notes/languages/python/python-faq.md b/notes/languages/python/python-faq.md new file mode 100644 index 00000000000..f7976fece30 --- /dev/null +++ b/notes/languages/python/python-faq.md @@ -0,0 +1,27 @@ +--- +tags: +- FAQ +--- + +# Python FAQ + +## venv + +```bash +# 以前为 pyvenv - 3.3 - 3.7 +# 有些 distro 需要额外安装 python3-venv +# 只有部分 virtualenv 功能 +python -m venv myenv +cd myenv +source bin/activate +``` + +- [pyenv](./pyenv.md) + - 多版本管理 +- pyenv-virtualenv +- venv + - https://docs.python.org/3/library/venv.html +- virtualenv + - https://virtualenv.pypa.io/en/latest/ +- pipenv +- ~~pyvenv~~ diff --git a/notes/service/api/flatbuffers.md b/notes/service/api/flatbuffers.md new file mode 100644 index 00000000000..51223cb4ef3 --- /dev/null +++ b/notes/service/api/flatbuffers.md @@ -0,0 +1,44 @@ +--- +title: FlatBuffers +--- +# FlatBuffers + +- [google/flatbuffers](https://github.com/google/flatbuffers) + - Apache-2.0 + - by Google + - 跨平台序列化库 + - 优点 + - 速度快 + - 体积小 + - 无需解析即可访问数据 + - 应用场景 + - 游戏 + - 物联网 + - 高性能数据传输 + - Adopted by + - Apache Arrow + - TensorFlow Lite + - PyTorch + - Draco + +# FAQ + +## FlatBuffers vs Protocol Buffers + +- FlatBuffers + - 强调性能 + - 场景: 游戏开发、物联网设备、移动应用 + - 0 拷贝 + - 更高效、即使序列化 + - 可用于内存受限场景 + - 可以直接访问 + - 占用空间比 Protocol Buffers 大一些 + - 二进制格式更注重快速访问和零拷贝 + - API 复杂 + - 需要理解 内存布局和访问方式 +- Protocol Buffers + - 强调 兼容性 + - 场景: CS通信、配置文件、网络协议 + - 以 Message 方式呈现 - 序列化、反序列化都存在额外内存分配 + - 变长编码 - Varint + - API 简单 diff --git a/notes/service/dns/dns-rr.md b/notes/service/dns/dns-rr.md index bcf000705ba..a67e4e3efdb 100644 --- a/notes/service/dns/dns-rr.md +++ b/notes/service/dns/dns-rr.md @@ -10,15 +10,72 @@ title: DNS Records [https draft]: https://datatracker.ietf.org/doc/draft-ietf-dnsop-svcb-https -- HTTPS - - Apple’s iOS 14 - - Chrom 102+ https://chromestatus.com/feature/5485544526053376 + - [List of DNS record types](https://en.wikipedia.org/wiki/List_of_DNS_record_types) - https://simpledns.plus/help/https-records - PowerDNS [Supported Record Types](https://doc.powerdns.com/authoritative/appendices/types.html) - Encrypted SNI/Encrypted ClientHello - Encrypted SNI +| type | for | format | +| ----- | ------------------ | ---------------------------------------------------------------- | +| A | IPv4 | `IPv4` | +| AAAA | IPv6 | `IPv6` | +| CNAME | Canonical Name | `CanonicalName` | +| SOA | Start of Authority | `PrimaryNS ResponsibleParty Serial Refresh Retry Expire Minimum` | +| SRV | Service | `Priority Weight Port Target` | +| ALIAS | Alias | `CanonicalName` | +| TXT | Text | `Text` | +| HTTPS | HTTPS | `Priority Target` | + +## SVCB + +- SVCB - Service Binding - 服务绑定 +- 通用的DNS记录类型 +- 用于 + - HTTPS + - IMAP over TLS + - SMTP over TLS +- 参数 + - alpn + - port + - echconfig + +## HTTPS + +- SVCB 格式 +- alpn +- port +- ipv4hint +- ipv6hint +- SVCB - alpn=h2,h3-19 mandatory=ipv4hint,alpn ipv4hint=192.0.2.1 + +``` +alpn="h2,h3" ipv4hint="93.184.216.34" ipv6hint="2606:2800:220:1:248:1893:25c8:1946" +``` + +- 避免 HTTP/1 和 HTTP/2 的 Alt-Svc:, 直接使用 HTTP/3 +- 支持 + - Apple’s iOS 14 + - Chrom 102+ https://chromestatus.com/feature/5485544526053376 + - curl + - https://github.com/curl/curl/wiki/HTTPS-record + - https://datatracker.ietf.org/doc/rfc9460/ + +## SOA + +``` +PrimaryNS ResponsibleParty Serial Refresh Retry Expire Minimum +``` + +- Primary NS(主域名服务器)- 域的主DNS服务器的名称,它拥有关于域的权威数据。 +- Responsible party(负责人的电子邮件地址)- 管理域的联系人的电子邮件地址,但是通常使用“.”代替传统电子邮件地址中的“@”。 +- Serial(序列号)- 该域的修订版号,每次更新域时都应该增加这个数字。 +- Refresh - 从辅助服务器向主服务器查询更新的时间间隔(以秒为单位)。 +- Retry - 如果辅助服务器尝试联系主服务器失败后,再次尝试的时间间隔。 +- Expire - 辅助服务器在没有联系到主服务器的情况下,将其数据认为是有效的最长时间。 +- Minimum TTL(最小生存时间)- 此域中所有记录的默认生存时间。 + ## SRV - `_SERVICE._PROTOCOL.example.com` diff --git a/notes/service/document/document-awesome.md b/notes/service/document/document-awesome.md index 6ac78d3c304..75a4f85d9a1 100644 --- a/notes/service/document/document-awesome.md +++ b/notes/service/document/document-awesome.md @@ -165,10 +165,11 @@ tags: - [iddan/react-spreadsheet](https://github.com/iddan/react-spreadsheet) - MIT, TS - npm:react-spreadsheet + - deps: @linaria/core - 40kB/12kB - 非常简单易用 - ⚠️ 注意 - 不推荐使用 - - 功能少 + - 功能很少 - 没有 virtual - 依赖的 fast-formula-parser 相对比较大 - +292kB/83kB diff --git a/notes/service/media/ffmpeg/ffmpeg-faq.md b/notes/service/media/ffmpeg/ffmpeg-faq.md index e393176cc5c..a5a2ba531f5 100644 --- a/notes/service/media/ffmpeg/ffmpeg-faq.md +++ b/notes/service/media/ffmpeg/ffmpeg-faq.md @@ -70,3 +70,5 @@ ffmpeg -i input.mp4 -f srt -i input.srt \ ```bash ffmpeg -i in.mp4 -tag:v hvc1 -c:a copy -c:v copy -movflags faststart out.mp4 ``` + +## ffprobe durations is different from ffmpeg diff --git a/notes/service/media/format/flv.md b/notes/service/media/format/flv.md new file mode 100644 index 00000000000..18c75aadad1 --- /dev/null +++ b/notes/service/media/format/flv.md @@ -0,0 +1,85 @@ +--- +title: flv +--- + +# flv + +- .flv, .fla, .f4v, .f4a, .f4b, .f4p +- FLV - 2003-09 - SWF +- F4V - 2007-12 - H.264, MPEG-4 Part 12 +- video/x-flv, video/mp4, audio/mp4 +- 参考 + - [Flash Video](https://en.wikipedia.org/wiki/Flash_Video) + +## format + +- Header - 9 bytes + - Signature + - Version + - Flags + - Header Size +- Packet - 15 bytes + - Previous Tag Size + - Tag Type + - Data Size + - Timestamp + - Stream ID +- Packet Type + - 18/0x12 - AMF Metadata + - 8/0x08 - Audio + - 9/0x09 - Video +- AMF Metadata + - duration - double + - width - double + - height - double + - framerate - double + - AdditionalHeader + - Encryption + - Metadata + + +![](https://kroki.io/bytefield/svg/eNptkU1vgzAMhu_7FVZ2odIihZW2G7d99bTzLohDKA6ghQ8lQdBV_Pe561ZKx-FRJOuRndf2UlTSOWMhTDKeGcQKDqEqtAZ2K4VSUrBhceNNtD1qXXejp9S81xTV56WViDlrt5fTmVLJmV6taTSOHgbJSm2O3o8Iu1q3ZcW1TFBbiJhgd8wn7oklERArYk1siAfikXginokX4pV4I7YsPo2HpO7R8gYNNxTYX49l3hWpyyEQx5KRHf_9QI4yRWP_qmQC275_MIgOoW0o6XK4WHUME1H0_ij6w3mJV5rSMrP_xNNVpqrnsHdAQSEKS-nymF7bJsDy1IAtvpCSnvsE04HnNs7V5eIbrmOnnA==) + + + +![](https://kroki.io/bytefield/svg/eNqNkc9uwjAMh-97Csu7gLRK7Shj621_XwJxcKhTqqU0StIBQ333mY1RqhVph0-RrC-_2M4oZ00hOA-ZKqLCMa9hn-nSGMBrirWmGNvx1ain7diYetN5Wg97tly_n1sqHrKWO-q_SZoGshpnDXcep2qqZwfvW4RlbZpqHRlSbDzMMcYbTIRbYSKkwlS4E2bCvfAgPApPwrPwIrwKb7j4eR5UvWUfWXaRk4GTu64cbco8rCCNDyVHm-jYwIopZ-d_q2ICWscfEKgAX34ywnyfeSszp-3Z0hfQuxJ2thOT9mztfXEUeBsAj8FZRWG1kNM3CjCnQDLJKWbSnn5lMCT4PxGNldkHMg5_9t8M6bmfkVzqA31wTBWUOV5q-mgXZAF1ySb3eCqqOoS6Gn8Bce7flg==) + + diff --git a/notes/service/media/image-awesome.md b/notes/service/media/image/image-awesome.md similarity index 88% rename from notes/service/media/image-awesome.md rename to notes/service/media/image/image-awesome.md index 26d94cbac8b..b0df3291b2f 100644 --- a/notes/service/media/image-awesome.md +++ b/notes/service/media/image/image-awesome.md @@ -13,6 +13,15 @@ tags: - 有损 PNG 75%: ~75% - https://imageoptim.com/ - [ImageOptim/libimagequant](https://github.com/ImageOptim/libimagequant) + - [JamieMason/ImageOptim-CLI](https://github.com/JamieMason/ImageOptim-CLI) + +```bash +brew install imageoptim-cli +``` + +## JPG + +- [mozilla/mozjpeg](https://github.com/mozilla/mozjpeg) ## SVG diff --git a/notes/service/media/svgo.md b/notes/service/media/image/svgo.md similarity index 100% rename from notes/service/media/svgo.md rename to notes/service/media/image/svgo.md diff --git a/notes/service/network/proxy/proxychain-ng.md b/notes/service/network/proxy/proxychain-ng.md index 3d695fd95da..b70b099c390 100644 --- a/notes/service/network/proxy/proxychain-ng.md +++ b/notes/service/network/proxy/proxychain-ng.md @@ -14,4 +14,7 @@ brew install proxychains-ng # 网络请求会被代理 proxychains4 curl google.com + +# 配置 +echo -e '[ProxyList]\nsocks5 127.0.0.1 8888' > proxychains.conf ``` diff --git a/notes/web/browser/chrome/chrome-version.md b/notes/web/browser/chrome/chrome-version.md index 39d45247e9b..db8541e70da 100644 --- a/notes/web/browser/chrome/chrome-version.md +++ b/notes/web/browser/chrome/chrome-version.md @@ -65,6 +65,7 @@ tags: - https://chromestatus.com/roadmap - 每个版本的特性变化 - 关注 Enabled by default +- https://webstatus.dev/ - https://bugs.chromium.org/p/chromium/issues/list - https://chromiumdash.appspot.com/schedule - [What's New in DevTools](https://developer.chrome.com/tags/new-in-devtools/) diff --git a/notes/web/dev/biome.md b/notes/web/dev/biome.md index b7878512d79..e70c7fe831f 100644 --- a/notes/web/dev/biome.md +++ b/notes/web/dev/biome.md @@ -11,12 +11,6 @@ title: biome - 参考 - https://biomejs.dev/blog/biome-wins-prettier-challenge/ -:::tip - -- lint 单个规则 https://github.com/biomejs/biome/issues/58 - -::: - ```bash brew install biome # by macOS Brew pnpm add -Dw @biomejs/biome # add to Project @@ -30,6 +24,9 @@ time npx biome check ./src --use-server # 一般项目 user 快 0.2s # 如果没安装 @biomejs/biome npx @biomejs/biome check ./src npx @biomejs/biome check ./src --apply + +# 单个规则 v1.7.4+ +biome lint --rule=style/useNamingConvention --apply ./src ``` **biome.json** diff --git a/notes/web/nodejs/nodejs-faq.md b/notes/web/nodejs/nodejs-faq.md index dd9dbf78dca..f69ed5fb1dc 100644 --- a/notes/web/nodejs/nodejs-faq.md +++ b/notes/web/nodejs/nodejs-faq.md @@ -77,6 +77,29 @@ pnpm node --loader ts-node/esm --watch ./src/apps/ve-contract-server/main.ts - tsconfig-paths esm 问题 - https://github.com/dividab/tsconfig-paths/issues/243 + +## 选择包管理器 {#choose-pm} + +> 选择 pnpm + +- pnpm + - 速度快 + - 使用 hardlink - 节省空间,速度快 + - 如果在 wsl 可能用不了 hardlink,回退为 softlink 或者 copy 方式 + - 意外情况比较少 + - workspace 支持完善 +- npm + - node_modules 太大 + - 安装慢 + - 如果 pnpm 不兼容的情况可以考虑 npm +- yarn v1 + - 比 npm 好一点 - 区别越来越小 + - 支持 workspace +- yarn berry + - 很多工具不支持 + - pnp 方式生态推进慢 + - 不建议使用 + ## shebang **CJS** diff --git a/notes/web/react/mobx.md b/notes/web/react/mobx.md new file mode 100644 index 00000000000..382d666bfc5 --- /dev/null +++ b/notes/web/react/mobx.md @@ -0,0 +1,12 @@ +--- +title: mobx +--- + +# mobx + +- [mobxjs/mobx](https://github.com/mobxjs/mobx) + - MIT, JS, TS +- packages + - mobx-react-lite + - mobx-state-tree - MST + - state container system diff --git a/notes/web/react/satori.md b/notes/web/react/satori.md index 0fb4ca9dbd2..378dd16d08d 100644 --- a/notes/web/react/satori.md +++ b/notes/web/react/satori.md @@ -8,6 +8,8 @@ title: satori - SVG - satori - PNG - satori+resvg-js - PDF - satori+PSDKit + - TailwindCSS - 使用 tw 属性而不是 className + - 使用 twrnc - 参考 - https://og-playground.vercel.app/