Skip to content

Instantly share code, notes, and snippets.

View TaDahCorp's full-sized avatar

R&D TaDahCorp

  • Las Vegas
View GitHub Profile
@TaDahCorp
TaDahCorp / receivefromholo.php
Created March 19, 2018 21:19
Hologram.io Nova receive message
import time
import datetime
from Hologram.HologramCloud import HologramCloud
retvalue = "NA"
i=1
def holo_heartbeat():
recv = hologram.sendMessage("!", topics=["heartbeat","pigate"])
time.sleep(5) # give it time to think about it
@TaDahCorp
TaDahCorp / ConfigParser_example.py
Last active March 14, 2018 20:37
Using ConfigParser as an alternative to argparse in Python
import ConfigParser
# load external configuration settings
configParser = ConfigParser.RawConfigParser()
configFilePath = r'config.txt'
try:
configParser.read(configFilePath)
max_storage = float(configParser.get('Personalized', 'max_storage'))
my_IP = configParser.get('Personalized', 'IP')
print("Configuration settings read correctly. IP:",my_IP," Capacity: ", max_storage)
except ConfigParser.Error: