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
# take snapshots to create a timelapse video | |
import time | |
import picamera | |
method = raw_input("Select timelapse in seconds or minutes (S or M):> ") | |
if "s" in method or "S" in method: | |
seconds = int(raw_input("Enter photo interval in seconds: >: ")) |
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/python | |
# Raspi-sump, a sump pump monitoring system. | |
# Al Audet | |
# http://www.linuxnorth.org/raspi-sump/ | |
import time | |
import numpy as np | |
import matplotlib as mpl | |
mpl.use('Agg') | |
import matplotlib.pyplot as plt |
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
import smtplib | |
import string | |
def smtp_gmail(): | |
username = "your smtp username here " | |
password = "your smtp password here" | |
smtp_server = "smtp.gmail.com:587" | |
email_from = "sender email" | |
email_to = "recipient email or wireless carrier sms #" | |
email_body = string.join(( |
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
import decimal | |
number = float(1.787654) | |
decimal.getcontext().prec = 2 | |
dec_number = decimal.Decimal(number) * 1 | |
print str(dec_number) |
NewerOlder