Skip to content

Instantly share code, notes, and snippets.

View craig8's full-sized avatar

Craig craig8

View GitHub Profile
@craig8
craig8 / testweatheragent.py
Last active October 16, 2015 18:34
VOLTTRON Weather Agent test
# Example file using the weather agent.
#
# Requirements
# - A VOLTTRON instance must be started
# - A weatheragnet must be running prior to running this code.
#
# Author: Craig Allwardt
from volttron.platform.vip.agent import Agent
import gevent
@craig8
craig8 / gist:42f53b59204310bc6fdec0dd5ec4d14a
Last active May 9, 2018 16:44
python main module template
import argparse
import logging
import sys
LOG_FORMAT = "%(asctime)s:%(levelname)s:%(processName)s - %(name)s %(message)s"
logging.basicConfig(stream=sys.stdout, level=logging.INFO,
format=LOG_FORMAT)
_log = logging.getLogger("main")