Skip to content

Instantly share code, notes, and snippets.

View TristanAmond's full-sized avatar

Tristan TristanAmond

View GitHub Profile
# initialize plotly credentials
plotly_tools.set_credentials_file(username='t_amond', api_key='REDACTED')
def update_plotly(self, url):
fileoption = 'extend'
time = datetime.datetime.now()
h,t = dht.read_retry(dht.DHT22, 4)
t = 9.0/5.0 * t + 32
def send_notification(self, content):
# bot_id connects with created bot on dev.groupme.com, text is message
payload = {
"bot_id" : "REDACTED",
"text" : content
}
with requests.Session() as c:
c.post("https://api.groupme.com/v3/bots/post", data=payload)
def parse_pushes(self, power_pin):
# Set variables
new_msgs = []
website_bot_id = "REDACTED"
print(self.initial_pull)
# Send GET request to GroupMe
with requests.Session() as c:
# If this is the first cycle the system is running
<script>
function POSTwater() {
var bot = "BOTID";
var msg = "water";
jQuery.post("https://api.groupme.com/v3/bots/post", {bot_id: bot, text:msg}); //closes post
alert("POST sent.");
}
</script>