Skip to content

Instantly share code, notes, and snippets.

View TurnOffNOD's full-sized avatar

Thomas Copper TurnOffNOD

  • University of Chinese Academy of Sciences
  • HangZhou
View GitHub Profile
#!/usr/bin/python3
from pathlib import Path
from threading import Timer
cpu_temp_file = "/sys/class/thermal/thermal_zone0/temp"
duty_cycle_file = "/sys/class/pwm/pwmchip0/pwm0/duty_cycle"
temp_wall = 65000
lowest_fan_speed = 3000
def read_cpu_temp():