This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
import argparse | |
import datetime | |
import sys | |
import time | |
import threading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#run from terminal with: adb shell "$(cat temperature.sh)" to get list of temperature sensors and their temperature | |
#on Android devices | |
for VARIABLE in $(seq 1 80) | |
do | |
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/type | |
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/temp | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore all | |
* | |
# Unignore all with extensions | |
!*.* | |
# Unignore all dirs | |
!*/ | |
### Above combination will ignore all files without extension ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# liuw | |
# Nasty hack to raise exception for other threads | |
import ctypes # Calm down, this has become standard library since 2.5 | |
import threading | |
import time | |
NULL = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
LONG = ctypes.c_long | |
DWORD = ctypes.c_ulong | |
ULONG_PTR = ctypes.POINTER(DWORD) | |
WORD = ctypes.c_ushort | |
class MOUSEINPUT(ctypes.Structure): | |
_fields_ = (('dx', LONG), | |
('dy', LONG), |