Skip to content

Instantly share code, notes, and snippets.

View benallard's full-sized avatar
🤹
Juggling

Benoît Allard benallard

🤹
Juggling
View GitHub Profile
@benallard
benallard / analysedump.py
Created October 25, 2013 23:16
Script to parse MegaDump logs from galileod (fitbit), and try to extract interesting information from it.
#!/usr/bin/env python
import sys
import time
def readdata():
""" input is from stdin in the format of lines of long string starting
with a tab ('\t') representing the hexadcimal representation of the data
(megadump)"""
d = []
@benallard
benallard / p.py
Created January 9, 2013 17:38
Script to help parsing and analysing of data stored on disk during synchronisation of the Fitbit tracker by benallard/fitbit
import os, yaml
TRACKERID = '22WB2F'
def collect(dir):
dir = os.path.join(os.path.expanduser('~/.fitbit'), dir)
data = {}
for fname in os.listdir(dir):
if 'connection-' in fname:
f = open(os.path.join(dir, fname), 'r')