Skip to content

Instantly share code, notes, and snippets.

Model508/Bolus (9) -> BolusNormal (13)
Model523/Bolus (13) -> BolusNormal (13)
Model508/Prime (10) -> Prime (10)
Model508/NoDelivery (9) -> AlarmPump (9)
Model508/MResultTotals (7) -> ResultDailyTotal (10)
Model523/MResultTotals (10) -> ResultDailyTotal (10)
Model508/ChangeBasalProfile_old_profile (152) -> ChangeBasalProfilePattern (152)
Model508/ChangeBasalProfile_new_profile (152) -> ChangeBasalProfile (152)
Model508/CalBGForPH (7) -> CalBgForPh (7)
Model508/SensorAlert (8) -> AlarmSensor (8)
Traceback (most recent call last):
File "/usr/bin/openaps-report", line 4, in <module>
__import__('pkg_resources').run_script('openaps==0.0.10', 'openaps-report')
File "/usr/lib/python2.7/site-packages/setuptools-19.7-py2.7.egg/pkg_resources/__init__.py", line 724, in run_script
File "/usr/lib/python2.7/site-packages/setuptools-19.7-py2.7.egg/pkg_resources/__init__.py", line 1650, in run_script
File "/usr/lib/python2.7/site-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
app( )
File "/usr/lib/python2.7/site-packages/openaps-0.0.10-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__
//
// PumpMessage.swift
// Naterade
//
// Created by Nathan Racklyeft on 9/2/15.
// Copyright © 2015 Nathan Racklyeft. All rights reserved.
//
import Foundation
https://www.icloud.com/keynote/000mRNXHtLqlJ5-OXTp5SZ2pw#RileyLinkDemo
from bluepy.btle import UUID, Peripheral, ADDR_TYPE_PUBLIC, DefaultDelegate
import time
import struct
class RileyLinkBLE(DefaultDelegate):
SERVICE_UUID = "0235733b-99c5-4197-b856-69219c2a3845"
DATA_UUID = "c842e849-5028-42e2-867c-016adada9155"
RESPONSE_COUNT_UUID = "6e6c7910-b89e-43a5-a0fe-50c5e2b81f4a"
CUSTOM_NAME_UUID = "d93b2af0-1e28-11e4-8c21-0800200c9a66"
TIMER_TICK_UUID = "6e6c7910-b89e-43a5-78af-50c5e2b86f7e"
#!/usr/bin/env python
from subprocess import call
import sys
for width in range(4,17):
for skip in range(0,9):
packets = map(lambda x: x[skip*2:], sys.argv[1:])
#print "***** data = %s" % packets
print "***** width = %d" % width
@ps2
ps2 / corr.py
Created July 8, 2016 04:01
bit correlation plot
from matplotlib import gridspec
ticks = np.arange(0, bit_deltas.shape[1], 8.0)
fig = plt.figure(figsize=(15, 15))
gs = gridspec.GridSpec(4, 1)
ax1 = fig.add_subplot(gs[0:3,:])
ax2 = fig.add_subplot(gs[3,:])
ax1.matshow(bit_deltas.corr(), aspect='auto')
 0
Target:blank
Partitioning already done...
Flashing already done...
GADGET DRIVER: usb_dnl_dfu
@ps2
ps2 / gist:8694b78571f2cbf061d2c1797434fa5d
Last active September 13, 2016 22:39
CC Debugger program firmware
- NOP
Read Status 0x34 [], 178
Write Config 0x1d [34], 178
=============================================== Get PARTNUM & VERSION ======================
- NOP
- MOV A, DPS -> 0
- MOV DPS, #0
- MOV A, DPH0 -> 0
- MOV A, DPL0 -> 0
- MOV DPTR, PARTNUM

How can this code:

    api( ).update(query, obj, {upsert: true, new: true}, function complete (err, r1) {
      if (!err) {
        console.log("r1 = " + r1)
        console.log("typeof(r1) = " + typeof(r1))
        console.log("r1.upserted = " + r1.upserted)
        console.log("Object.keys(r1) = " + Object.keys(r1))