Last active
August 29, 2016 14:15
-
-
Save dehamzah/64cce4c2a61d9342a6c51f8e2b2d6cff to your computer and use it in GitHub Desktop.
This program will remind you to take a break and drink some water every 2 hours
This file contains hidden or 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 | |
import webbrowser | |
import time | |
# Video 'Are You Drinking Enough Water?' | |
url = 'https://www.youtube.com/watch?v=QMi3xA-5KbE' | |
start_count = 0 | |
total_count = 8 | |
# 2 Hours | |
waiting_time = 2*60*60 | |
print '#Program Take a Break and Drink Water' | |
print 'Started at', time.ctime() | |
while start_count < total_count: | |
time.sleep(waiting_time) | |
webbrowser.open(url) | |
start_count = start_count + 1 | |
print 'Get out from your desk and drink some water, bro! (%d)' % start_count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment