Skip to content

Instantly share code, notes, and snippets.

View Staubgeborener's full-sized avatar
:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";

Staubgeborener

:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";
View GitHub Profile
@Staubgeborener
Staubgeborener / GetRaspiStats.py
Last active October 30, 2018 04:44 — forked from funvill/gist:5252169
Get the system stats on the raspberry pi or any linux system in python
#This Script needs Python3. Original script from @funvill,
#edit (urllib and http/request support, also added gpu temperature) by @staubgeborener
#This edit allows to post raspberry pi stats on any php supported website. You could use this together with cron for example.
import os
import urllib.request, urllib.parse
# Return CPU temperature as a character string
def getCPUtemperature():
res = os.popen('vcgencmd measure_temp').readline()