This file contains 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 serial, time, datetime, sys | |
import eeml | |
from xbee import xbee | |
import sensorhistory | |
from time import sleep | |
import optparse | |
import smbus |
This file contains 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 time, datetime | |
import sys | |
import traceback | |
def formatExceptionInfo(maxTBlevel=5): | |
cla, exc, trbk = sys.exc_info() | |
excName = cla.__name__ | |
try: | |
excArgs = exc.__dict__["args"] | |
except KeyError: | |
excArgs = "<no args>" |
This file contains 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
if (((time.time() - sensorhistory.fiveminutetimer) >= 60.0) | |
and (currminute % 2 == 0) | |
): | |
wattsused = {} | |
whused = {} | |
# Taking avgwattover5min from ALL or only one sensor => erronious KWh | |
for history in sensorhistories.sensorhistories: | |
wattsused[history.sensornum] += history.avgwattover5min() | |
whused[history.sensornum]+= history.dayswatthr |
This file contains 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 serial, time, datetime, sys | |
import eeml | |
from xbee import xbee | |
import sensorhistory | |
from time import sleep | |
import optparse | |
import smbus |
This file contains 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
#include <opencv2/opencv.hpp> | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/highgui/highgui.hpp" | |
#include "highgui.h" | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include "opencv2\video\background_segm.hpp" | |
#include <Windows.h> |