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
''' A python script that monitors idle time on a Windows machine. | |
After the idle threshold is hit, windows media player is started | |
and it plays a playlist. After the playlist is finished or when the | |
operating system is no longer idle, the windows media player is killed. ''' | |
from ctypes import Structure, windll, c_uint, sizeof, byref | |
import subprocess | |
import time | |
# how long before the playlist should begin |
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
from math import pow | |
def find_all_numbers(): | |
# this is the loop of numbers 1,2...9 | |
for x in range(1, 10): | |
# build a dict with each number as a key; | |
# 1: [1, 12, 123, ...] | |
numbers[x] = [] | |
# loop to increase multiplier which is a power of 10; | |
# 1*10^0, 1*10^1, ... |