From dec47dbfe35110d98e75fad1f6f7eb974725e78f Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Thu, 27 Apr 2023 14:02:42 +0800 Subject: [PATCH] vault backup: 2023-04-27 14:02:42 --- .obsidian/workspace.json | 53 +++++++---------------------- 04. Programming/Python/choices().md | 5 +++ 04. Programming/Python/sample().md | 7 ++++ 3 files changed, 24 insertions(+), 41 deletions(-) create mode 100644 04. Programming/Python/choices().md create mode 100644 04. Programming/Python/sample().md diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 495cdaa..a8787a2 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -35,59 +35,32 @@ "pinned": true } }, - { - "id": "d9b61a5cf384f8a5", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "05. 資料收集/成長型心態.md", - "mode": "source", - "source": true - } - } - }, { "id": "086749ea7c146394", "type": "leaf", - "state": { - "type": "canvas", - "state": { - "file": "00. Inbox/My Mindmap.canvas", - "viewState": { - "x": -20.168616755818107, - "y": -122.63779270806947, - "zoom": -1.1666666666666667 - } - } - } - }, - { - "id": "c251f8420f9c66e9", - "type": "leaf", "state": { "type": "markdown", "state": { - "file": "05. 資料收集/成長型心態.md", + "file": "04. Programming/Python/Poetry.md", "mode": "source", "source": true } } }, { - "id": "71c11cbd68fe6792", + "id": "622d06d7d2b8ee7f", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "05. 資料收集/固定型心態.md", - "mode": "source", + "file": "04. Programming/Python/sample().md", + "mode": "preview", "source": true } } } ], - "currentTab": 3 + "currentTab": 2 } ], "direction": "vertical" @@ -125,8 +98,7 @@ } } } - ], - "currentTab": 1 + ] } ], "direction": "horizontal", @@ -146,7 +118,7 @@ "state": { "type": "backlink", "state": { - "file": "00. Inbox/My Mindmap.canvas", + "file": "04. Programming/Python/Poetry.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -171,7 +143,7 @@ "state": { "type": "outline", "state": { - "file": "00. Inbox/My Mindmap.canvas" + "file": "04. Programming/Python/Poetry.md" } } }, @@ -224,6 +196,10 @@ }, "active": "086749ea7c146394", "lastOpenFiles": [ + "00. Inbox/My Mindmap.canvas", + "04. Programming/Python/sample().md", + "04. Programming/Python/choices().md", + "04. Programming/Python/`choices()`.md", "attachments/Pasted image 20230426214323.png", "05. 資料收集/峰值對焦.md", "attachments/Pasted image 20230426213640.png", @@ -233,7 +209,6 @@ "attachments/Pasted image 20230426213534.png", "attachments/Pasted image 20230426213513.png", "05. 資料收集/成長型心態.md", - "00. Inbox/My Mindmap.canvas", "00. Inbox/01. TODO.md", "05. 資料收集/Tool Setup/Software/Windows 11 Setup.md", "05. 資料收集/固定型心態.md", @@ -248,7 +223,6 @@ "attachments/Pasted image 20230418111538.png", "attachments/Pasted image 20230418111512.png", "attachments/Pasted image 20230418111423.png", - "attachments/Pasted image 20230418111420.png", "04. Programming/OpenCL.md", "04. Programming/OpenCV.md", "01. 個人/01. Daily/2023-04-16(週日).md", @@ -258,9 +232,6 @@ "04. Programming/OpenCV API.md", "03. 專注Study/C++/C++17.md", "04. Programming/QT/timer.md", - "05. 資料收集/Capture One.md", - "05. 資料收集/向右曝光.md", - "05. 資料收集/Color Format.md", "00. Inbox/vc-fwUpdate code trace(Meetup).canvas", "01. 個人/01. Daily/2023/03", "未命名.canvas", diff --git a/04. Programming/Python/choices().md b/04. Programming/Python/choices().md new file mode 100644 index 0000000..f3afb2a --- /dev/null +++ b/04. Programming/Python/choices().md @@ -0,0 +1,5 @@ +從list中選出n個項目,有可能重複: +```python +import random +random.choices(seq, n) +``` \ No newline at end of file diff --git a/04. Programming/Python/sample().md b/04. Programming/Python/sample().md new file mode 100644 index 0000000..3e43a80 --- /dev/null +++ b/04. Programming/Python/sample().md @@ -0,0 +1,7 @@ +從一個list中,選出n個不重複的項目: +```python +import random +random.sample(seq, n) +``` + +不像 [[choices()]] 是會重複的。 \ No newline at end of file