套件名稱叫 python-dotenv,但 import 時寫的是 dotenv。> pip install python-dotenv這樣做的好處是不用把 API Key 直接寫在程式裡,例如避免:



api_key = "sk-xxxxxxxx"

文章標籤:

me1237guy 發表在 痞客邦 留言(0) 人氣()


me1237guy@mincode:/mnt/c/Users/me123/python-llm-for-beginners-demo-code/basic-llm-demo$ python3 -m pip show python-dotenv
/usr/bin/python3: No module named pipme1237guy@mincode:/mnt/c/Users/me123/python-llm-for-beginners-demo-code/basic-llm-demo$ sudo apt update
Get:1 http://archive.ubuntu.com/ubuntu resolute InRelease [136 kB]
Get:2 http://security.ubuntu.com/ubuntu resolute-security InRelease [137 kB]
Get:3 http://security.ubuntu.com/ubuntu resolute-security/main amd64 Packages [371 kB]
Get:4 http://archive.ubuntu.com/ubuntu resolute-updates InRelease [137 kB]
Get:5 http://security.ubuntu.com/ubuntu resolute-security/main Translation-en [89.6 kB]
Get:6 http://security.ubuntu.com/ubuntu resolute-security/main amd64 Components [32.7 kB]
Get:7 http://security.ubuntu.com/ubuntu resolute-security/main amd64 c-n-f Metadata [4616 B]
Get:8 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 Packages [150 kB]
Get:9 http://security.ubuntu.com/ubuntu resolute-security/universe Translation-en [48.3 kB]
Get:10 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 Components [43.2 kB]
Get:11 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 c-n-f Metadata [3552 B]
Get:12 http://security.ubuntu.com/ubuntu resolute-security/restricted amd64 Packages [321 kB]
Get:13 http://security.ubuntu.com/ubuntu resolute-security/restricted Translation-en [61.2 kB]
Get:14 http://security.ubuntu.com/ubuntu resolute-security/restricted amd64 c-n-f Metadata [396 B]
Get:15 http://security.ubuntu.com/ubuntu resolute-security/multiverse amd64 Packages [9020 B]
Get:16 http://security.ubuntu.com/ubuntu resolute-security/multiverse Translation-en [2660 B]
Get:17 http://security.ubuntu.com/ubuntu resolute-security/multiverse amd64 Components [212 B]
Get:18 http://security.ubuntu.com/ubuntu resolute-security/multiverse amd64 c-n-f Metadata [120 B]
Get:19 http://archive.ubuntu.com/ubuntu resolute-backports InRelease [136 kB]
Get:20 http://archive.ubuntu.com/ubuntu resolute/main amd64 Packages [1480 kB]
Get:21 http://archive.ubuntu.com/ubuntu resolute/main Translation-en [524 kB]
Get:22 http://archive.ubuntu.com/ubuntu resolute/main amd64 Components [395 kB]
Get:23 http://archive.ubuntu.com/ubuntu resolute/main amd64 c-n-f Metadata [32.4 kB]
Get:24 http://archive.ubuntu.com/ubuntu resolute/universe amd64 Packages [16.0 MB]
Get:25 http://archive.ubuntu.com/ubuntu resolute/universe Translation-en [6329 kB]
Get:26 http://archive.ubuntu.com/ubuntu resolute/universe amd64 Components [4556 kB]
Get:27 http://archive.ubuntu.com/ubuntu resolute/universe amd64 c-n-f Metadata [313 kB]
Get:28 http://archive.ubuntu.com/ubuntu resolute/restricted amd64 Packages [152 kB]
Get:29 http://archive.ubuntu.com/ubuntu resolute/restricted Translation-en [25.8 kB]
Get:30 http://archive.ubuntu.com/ubuntu resolute/restricted amd64 Components [556 B]
Get:31 http://archive.ubuntu.com/ubuntu resolute/multiverse amd64 Packages [290 kB]
Get:32 http://archive.ubuntu.com/ubuntu resolute/multiverse Translation-en [127 kB]
Get:33 http://archive.ubuntu.com/ubuntu resolute/multiverse amd64 Components [50.0 kB]
Get:34 http://archive.ubuntu.com/ubuntu resolute/multiverse amd64 c-n-f Metadata [8276 B]
Get:35 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 Packages [446 kB]
Get:36 http://archive.ubuntu.com/ubuntu resolute-updates/main Translation-en [111 kB]
Get:37 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 Components [84.8 kB]
Get:38 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 c-n-f Metadata [5756 B]
Get:39 http://archive.ubuntu.com/ubuntu resolute-updates/universe amd64 Packages [235 kB]
Get:40 http://archive.ubuntu.com/ubuntu resolute-updates/universe Translation-en [76.9 kB]
Get:41 http://archive.ubuntu.com/ubuntu resolute-updates/universe amd64 Components [166 kB]
Get:42 http://archive.ubuntu.com/ubuntu resolute-updates/universe amd64 c-n-f Metadata [4704 B]
Get:43 http://archive.ubuntu.com/ubuntu resolute-updates/restricted amd64 Packages [331 kB]
Get:44 http://archive.ubuntu.com/ubuntu resolute-updates/restricted Translation-en [63.0 kB]
Get:45 http://archive.ubuntu.com/ubuntu resolute-updates/restricted amd64 c-n-f Metadata [392 B]
Get:46 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse amd64 Packages [11.4 kB]
Get:47 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse Translation-en [3032 B]
Get:48 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse amd64 Components [216 B]
Get:49 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse amd64 c-n-f Metadata [256 B]
Get:50 http://archive.ubuntu.com/ubuntu resolute-backports/main amd64 Components [212 B]
Get:51 http://archive.ubuntu.com/ubuntu resolute-backports/main amd64 c-n-f Metadata [112 B]
Get:52 http://archive.ubuntu.com/ubuntu resolute-backports/universe amd64 Packages [640 B]
Get:53 http://archive.ubuntu.com/ubuntu resolute-backports/universe Translation-en [300 B]
Get:54 http://archive.ubuntu.com/ubuntu resolute-backports/universe amd64 Components [216 B]
Get:55 http://archive.ubuntu.com/ubuntu resolute-backports/universe amd64 c-n-f Metadata [116 B]
Get:56 http://archive.ubuntu.com/ubuntu resolute-backports/restricted amd64 Components [216 B]
Get:57 http://archive.ubuntu.com/ubuntu resolute-backports/restricted amd64 c-n-f Metadata [120 B]
Get:58 http://archive.ubuntu.com/ubuntu resolute-backports/multiverse amd64 Components [216 B]
Get:59 http://archive.ubuntu.com/ubuntu resolute-backports/multiverse amd64 c-n-f Metadata [120 B]
Fetched 33.5 MB in 16s (2124 kB/s)
110 packages can be upgraded. Run 'apt list --upgradable' to see them.
me1237guy@mincode:/mnt/c/Users/me123/python-llm-for-beginners-demo-code/basic-llm-demo$ sudo apt install python3-pip
Installing:
python3-pip
Installing dependencies:
python3-wheel
Recommended packages:
build-essential python3-dev
Summary:
Upgrading: 0, Installing: 2, Removing: 0, Not Upgrading: 110
Download size: 1444 kB
Space needed: 10.5 MB / 1024 GB available
Continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu resolute/universe amd64 python3-wheel all 0.46.3-2 [27.9 kB]
Get:2 http://archive.ubuntu.com/ubuntu resolute/universe amd64 python3-pip all 25.1.1+dfsg-1ubuntu2 [1416 kB]
Fetched 1444 kB in 2s (682 kB/s)
Selecting previously unselected package python3-wheel.
(Reading database ... 35923 files and directories currently installed.)
Preparing to unpack .../python3-wheel_0.46.3-2_all.deb ...
Unpacking python3-wheel (0.46.3-2) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../python3-pip_25.1.1+dfsg-1ubuntu2_all.deb ...
Unpacking python3-pip (25.1.1+dfsg-1ubuntu2) ...
Setting up python3-wheel (0.46.3-2) ...
Setting up python3-pip (25.1.1+dfsg-1ubuntu2) ...
Processing triggers for man-db (2.13.1-1build1) ...
文章標籤:

me1237guy 發表在 痞客邦 留言(0) 人氣()


安裝uv工具
> curl -LsSf https://astral.sh/uv/install.sh | sh你可以到 OpenAI Platform 建立 API Key。
文章標籤:

me1237guy 發表在 痞客邦 留言(0) 人氣()


如何使用 WSL 在 Windows 上安裝 Linux> wsl --install> wsl --list --verbose
Windows 子系統 Linux 版 沒有已安裝的發佈。這表示 WSL 已啟用,但目前沒有安裝任何 Linux 發佈版,例如 Ubuntu、Debian 等。你會看到可安裝的發佈版清單。最常用的是 Ubuntu,可以直接安裝:> wsl --install -d Ubuntu

me1237guy 發表在 痞客邦 留言(0) 人氣()


它們只分擔「CPU 端的資料前處理」,完全不分擔「GPU 端的模型運算」。 forward / backward / 梯度更新永遠是主行程一個人在 GPU 上做,4 個 worker 做的是讀圖、做資料增強、把標註轉成 tensor 這些跟模型本身無關、但訓練前必須做的雜活。
為什麼要開「行程」而不是「執行緒」
讀圖、resize、mosaic/隨機增強這些工作是 CPU + 硬碟 I/O bound。如果用 Python 的 threading 來做,會被 GIL(全域解釋器鎖)卡住——同一時間還是只有一個執行緒在真正執行 Python bytecode,多執行緒在這種 CPU 密集工作上幾乎沒有平行效益。PyTorch 的 DataLoader 因此選擇用 multiprocessing:每個 worker 是一個完全獨立的作業系統行程,各自有自己的 Python 解釋器、自己的 GIL,才能真正利用到多核心 CPU 同時處理。
文章標籤:

me1237guy 發表在 痞客邦 留言(0) 人氣()


C# Grabber Service選取GrabberService專案按下滑鼠右鍵並選取管理NuGet套件安裝Newtonsoft.Json套件專案新增appsettings.json選取GrabberService專案按下滑鼠右鍵並選取"加入",接著選取"新增項目"輸入名稱: appsettings.json滑鼠雙擊開啟appsettings.jsonGrabberService/FrameHeader.csusing System.Runtime.InteropServices;
namespace GrabberService;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FrameHeader
{
public ulong FrameId;
public ulong TimestampNs;
public uint Width;
public uint Height;
public uint Stride;
public uint PixelFormat;
public uint ImageSize;
public uint CameraIndex;
public uint Flags;
}

me1237guy 發表在 痞客邦 留言(0) 人氣()

容量1TB隨身碟經過一年瘋狂讀寫,遇到檔案複製一半就自動登出隨身碟SanDisk Ultra Fit USB 3.2 隨身碟 1TB(公司貨) $2,299   2025/04/30$5,889 2026/02/04  這漲幅也太大了吧!(SanDisk快換服務中心)
10054台北市中正區濟南路二段2號1F
(02)2321-7996
e-Mail:taiwandigi@yahoo.com.tw
每日營業時間:12:00~20:00

me1237guy 發表在 痞客邦 留言(0) 人氣()

一、概念先釐清(很重要)

來源分支(base / target)pylon-2026-01-16


功能 / 測試分支pylon-2026-01-17-test1


合併方向

👉 pylon-2026-01-17-test1 的變更合併到 pylon-2026-01-16


文章標籤:

me1237guy 發表在 痞客邦 留言(0) 人氣()

gimini: 初學者,使用限制: 4張/天,輸出圖片1K
Google AI Studio: 進階使用者,輸出圖片4K,顯示比例設定16:9,須付費綁定API Key

me1237guy 發表在 痞客邦 留言(0) 人氣()

CA-USB31-AC-BLS/3
37U 系列

37U 系列 黑白工業相機
USB 3.1 介面, USB供電
1/1.7 inch Sony CMOS STARVIS IMX226 感測器規格
4,000×3,000 (12 MP), 最高 30 fps
畫素: 水平: 1.85 µm, 垂直: 1.85 µm
捲簾快門
僅 36×36×25 mm

me1237guy 發表在 痞客邦 留言(0) 人氣()


Load Port
在半導體製造流程中,Load Port 安裝在設備前端(EFEM)外,
作為晶圓載體(如 FOUP FOSB)進出設備的接口,確保晶圓的潔淨度和安全。

me1237guy 發表在 痞客邦 留言(0) 人氣()

在批次檔(.bat)裡用
要把 %i 改成 %%i:

me1237guy 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。