Linux
[Linux] podman 基礎指令筆記
Introduction
Podman 是一個專用來管理容器(container)和鏡像(image)的開源工具,全名為 Pod Manager tool (podman)。Podman 是一個與 docker 相似的工具,但是設計上有一些小區別。
Read More »[Linux] podman 基礎指令筆記[Linux] 使用 duf 指令查看硬碟使用狀況
Introduction
duf
是一款可以在 Linux 系統上較為有『圖形化表達』的硬碟空間使用狀況檢查工具,名字取自 Disk Usage/Free Utility。順帶一提,這項工具其實不僅在 Linux,在 MacOS 和 Windows 上也都可以安裝哦。
使用 OpenAI Moderation Endpoint 偵測不適當內容
介紹
Moderation 模型是一個 OpenAI 所提供的免費工具,用來審查所謂的『不適當內容』。詳細的禁止條例可以參考 https://openai.com/policies/usage-policies。
Read More »使用 OpenAI Moderation Endpoint 偵測不適當內容[已解決] UserWarning: CUDA initialization: CUDA unknown error – this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at …/c10/cuda/CUDAFunctions.cpp:109.) return torch._C._cuda_getDeviceCount() > 0
問題描述
今天我在我的伺服器訓練模型時,我寫好了一份多片 GPU 平行化訓練的腳本,接著把最新的資料輸入給模型開始訓練;但是在訓練過程中,我得到了沒有 GPU 的錯誤訊息。當我使用 torch.cuda.is_available()
確認時,得到了以下錯誤訊息。
[Linux] 彩色打印輸出 rich-cli 指令筆記
Introduction
rich-cli
是一個基於 Python rich
套件的命令列工具,也就是說,我們可以不必撰寫 Python 程式碼就直接輸出彩色終端機的文字結果。
[Linux] 如何確認端口(port)已經被使用?
問題描述
我們通常都會在 Linux 伺服器上啟動各式各樣的服務,最常見的就是開一個網頁、開放一個端口(port)來讓我們或使用者測試開發中的功能。
Read More »[Linux] 如何確認端口(port)已經被使用?LeetCode: 1539-Kth Missing Positive Number 解題紀錄
題目
Given an array arr
of positive integers sorted in a strictly increasing order, and an integer k
.
Return the kth
positive integer that is missing from this array.
[Linux] 使用 `pygmentize` 或 `highlight` 來顯示、印出帶有顏色的文件內容
Read More »[Linux] 使用 `pygmentize` 或 `highlight` 來顯示、印出帶有顏色的文件內容「我大部分的上班時間都用來找一些讓 Linux 終端機顯示得更漂亮的工具,
反正老闆看了也只會覺得我很厲害要有美觀的介面才能提高生產力!」 —— 愛貓工程師
[Linux] 使用 Memtest86+ 進行燒機測試筆記
簡介
記憶體(Random Access Memory, RAM)是現代電腦裝置中不可或缺的一個儲存硬體。其可用於儲存作業系統、應用程式、及所有顯示資料的實時(real-time)工作狀態。
Read More »[Linux] 使用 Memtest86+ 進行燒機測試筆記