Skip to content

Instantly share code, notes, and snippets.

View tuukka's full-sized avatar

Tuukka Hastrup tuukka

View GitHub Profile
@tuukka
tuukka / emfitqs.py
Created October 26, 2018 19:25 — forked from ejain/emfitqs.py
Retrieves sleep presence records from Emfit QS, and merges the records into a single spreadsheet.
import io, re, requests, sys, time, zipfile
def get_device(token):
r = get("/api/v1/user/get", token)
device = r.json()["user"]["devices"]
print("Device: " + device, file = sys.stderr)
return device
def list_presences(token, device):
r = get("/api/v1/presence/{0}/latest".format(device), token)
@tuukka
tuukka / kalkati2gtfs.py
Last active December 15, 2015 13:39 — forked from stefanw/kalkati2gtfs.py
"""
Kalkati to GTFS converter
Beware: it simplifies some things.
(c) 2011 Stefan Wehrmeyer http://stefanwehrmeyer.com
License: MIT License
"""
from datetime import date, timedelta