Skip to content

Instantly share code, notes, and snippets.

View finbarrocallaghan's full-sized avatar

Finbarr O'Callaghan finbarrocallaghan

View GitHub Profile
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name = 'glucometerutils',
packages = ['glucometerutils', 'glucometerutils.drivers', 'glucometerutils.support'],
scripts = ['glucometer.py'],
version = '1',
description = 'Glucometer access utilities',
#!/usr/bin/env python
import time
import json
import pandas as pd
from datetime import datetime
from os.path import expanduser
def transform_data(data):
objectify = lambda dat: [{"x": x, "y": y} for x, y in dat.iteritems()]
json_data = [{'name': x[0], 'data': objectify(x[1])}
@finbarrocallaghan
finbarrocallaghan / dict_based.py
Last active August 29, 2015 13:57
auto-07p plotting
from pylab import *
data =loadtxt("test.dat")
x = data[:,0]
y = data[:,1]
z = data[:,2]
stability = z.copy()
date load core0 core1 temp1 temp2 temp3
Wed May 15 02:26:01 0.00 0.59 1.26 67.0 +66.0 +70.0 +110.5 +57.0
Wed May 15 02:27:01 0.00 0.49 1.18 67.0 +65.0 +70.0 +110.5 +56.5
Wed May 15 02:28:01 0.00 0.40 1.11 67.0 +65.0 +70.0 +110.5 +56.5
Wed May 15 02:29:01 0.00 0.33 1.04 65.0 +65.0 +70.0 +110.5 +56.5
Wed May 15 02:30:01 0.00 0.27 0.97 65.0 +65.0 +70.0 +110.5 +56.5
Wed May 15 02:31:01 0.11 0.25 0.92 65.0 +65.0 +70.0 +110.5 +56.0
Wed May 15 02:32:01 0.04 0.20 0.86 65.0 +64.0 +69.0 +110.5 +56.0
Wed May 15 02:33:01 0.01 0.17 0.81 64.0 +64.0 +70.0 +110.5 +56.0
Wed May 15 02:34:01 0.01 0.14 0.76 64.0 +64.0 +69.0 +110.5 +56.0
@finbarrocallaghan
finbarrocallaghan / log
Created September 14, 2012 14:49
reading from a csv?
[15:43:47.273] GET http://local_ip:8089/temp.csv [HTTP/1.0 200 OK 2ms]
[15:43:47.219] TypeError: data is null @ file:///local/user/tutorial/simple.js:2