發表文章

目前顯示的是 9月, 2026的文章

HW01 Python 環境建立和Hello World

圖片
  1. NotebookLM Notebook LM  2. YouTube 3. 學習卡與測驗 測驗 學習卡 4.kaggle python 一、Python 程式碼:智慧燈控系統 專案名稱: Smart Lighting Control System(智慧燈控系統) 功能包含人體感測模擬、環境亮度判斷、自動開關燈、手動控制、燈控紀錄及 CSV 匯出。不需要額外安裝套件,適合在 Kaggle Notebook 執行。 # ===================================================== # Smart Lighting Control System # 智慧燈控系統 # Platform: Kaggle Notebook # ===================================================== import pandas as pd from datetime import datetime # ===================================================== # 1. System Settings # 系統設定 # ===================================================== LUX_THRESHOLD = 300 control_mode = "AUTO" light_status = False records = [] # ===================================================== # 2. Smart Lighting Function # 智慧燈控功能 # ===================================================== def smart_lighting ( presence , brightness ): global light_status if control_mode == "AUTO" : # 有人且環境昏暗,自動...