Skip to content

Instantly share code, notes, and snippets.

View lwthatcher's full-sized avatar

Lawrence Thatcher lwthatcher

  • West Jordan, UT
View GitHub Profile
@lwthatcher
lwthatcher / nodes.short.csv
Last active August 13, 2018 18:15
node matrix for short version of the pills-blue data
id parent dist
0 18906 1699
1 18973 2233
2 17633 103
3 16259 42
4 17538 92
5 17538 92
6 17768 126
7 17445 84
8 17132 64
@lwthatcher
lwthatcher / data.short.csv
Last active August 13, 2018 18:14
down-sampled version of pills-blue.csv
We can't make this file beautiful and searchable because it's too large.
Ax,Ay,Az,Gx,Gy,Gz,Cx,Cy,Cz,Lt,Li,alt,temp,label
-2082.0000,-279.0000,343.0000,67.0000,-6.0000,-100.0000,11810.0000,182.0000,9025.0000,78.0000,9.0000,1361.9388,23.1875,0.0000
-2050.0000,-266.0000,342.0000,60.0000,-79.0000,-12.0000,3624.9000,401.8000,9023.6000,78.0000,9.0000,1361.9343,23.1875,0.0000
-2045.0000,-270.0000,319.0000,87.0000,-55.0000,-6.0000,115.4000,492.4000,9021.4000,78.0000,9.0000,1361.9299,23.1875,0.0000
-2034.0000,-286.0000,361.0000,23.0000,1.0000,-7.0000,113.0000,487.7000,9018.1000,78.0000,9.0000,1361.9255,23.1875,0.0000
-2062.0000,-281.0000,346.0000,42.0000,9.0000,-74.0000,113.0000,492.6000,9011.8000,78.0000,9.0000,1361.9211,23.1875,0.0000
-2026.0000,-295.0000,358.0000,44.0000,25.0000,-156.0000,110.5000,495.5000,9010.0000,78.0000,9.0000,1361.9167,23.1875,0.0000
-2014.0000,-290.0000,363.0000,27.0000,-12.0000,146.0000,108.5455,497.0000,9012.5455,78.0000,9.0000,1361.9122,23.1875,0.0000
-2021.0000,-287.0000,351.0000,-28.0000,-53.0000,-34.0000,110.7273,497.0000,9022.7273,78.0000,9.0000,1361.9072,2
@lwthatcher
lwthatcher / pills-blue.csv
Last active August 9, 2018 17:31
The matrix formatted version of the "pills-blue" dataset
We can't make this file beautiful and searchable because it's too large.
Ax,Ay,Az,Gx,Gy,Gz,Cx,Cy,Cz,Lt,Li,alt,temp,label
-2082,-279,343,67,-6,-100,11810,182,9025,78,9,1361,23,0
-2062,-289,342,95,-73,-119,10640,213,9024,78,9,1361,23,0
-2030,-300,289,93,-68,-106,9471,244,9024,78,9,1361,23,0
-2005,-295,289,98,-52,45,8302,276,9024,78,9,1361,23,0
-2036,-293,301,98,-115,160,7132,307,9024,78,9,1361,23,0
-2021,-280,322,93,-151,70,5963,339,9024,78,9,1361,23,0
-2039,-273,329,75,24,-43,4794,370,9023,78,9,1361,23,0
-2050,-266,342,60,-79,-12,3624,401,9023,78,9,1361,23,0
-2030,-277,346,57,-95,-131,2455,433,9023,78,9,1361,23,0
@lwthatcher
lwthatcher / pb-hac.csv
Last active August 9, 2018 00:15
pills-blue dataset hierarchical agglomerative clustering
We can't make this file beautiful and searchable because it's too large.
c1,c2
28132,37154
35320,37688
41842,42054
33153,33779
14034,14255
9094,9348
30400,31237
11291,11515
43398,44219
@lwthatcher
lwthatcher / energy.csv
Last active July 16, 2018 22:28
The parsed spectral-energy readings from the "pills-blue" dataset.
Ax Ay Az Gx Gy Gz Cx Cy Cz Lt Li alt temp
0.0586 0.0192 0.0729 0.1782 0.6143 1.2098 1714.6671 1.2122 0.0058 0.0000 0.0000 0.0000 0.0000
0.7906 0.4004 0.3073 2.6416 4.2193 1.9100 0.0004 0.0015 0.0034 0.0000 0.0000 0.0000 0.0000
0.8761 0.5150 0.6394 3.0105 4.7755 2.2394 0.0004 0.0019 0.0063 0.0000 0.0000 0.0000 0.0000
0.3231 0.4598 0.4514 0.8059 1.7208 1.6781 0.0049 0.0035 0.0017 0.0002 0.0000 0.0000 0.0000
1.1056 0.7903 1.2303 1.8307 5.0953 6.1343 0.0140 0.0049 0.0048 0.0004 0.0000 0.0000 0.0000
3.4744 23.8738 6.9396 13.4673 13.0307 109.8241 0.1389 0.0092 0.0360 0.0005 0.0000 0.0000 0.0000
16.4351 38.8765 9.7718 77.7409 40.8310 69.6456 5499.1575 0.0826 0.0351 0.0006 0.0000 0.0000 0.0000
46.5563 27.3880 4.4035 48.2226 25.2924 16.0427 2144.8985 0.5816 0.5567 0.0007 0.0000 0.0000 0.0000
27.0823 13.1692 4.2939 32.7277 39.4538 81.2642 0.7101 1.8308 0.2591 0.0020 0.0000 0.0000 0.0000
@lwthatcher
lwthatcher / pillsBlueData.csv
Created June 27, 2018 17:25
Pills-Blue data in BDL format
We can't make this file beautiful and searchable because it's too large.
D,Time:0ms
S,0,LED Sync
C,0,11810,182,9025
A,0,-2082,-279,343
G,0,67,-6,-100
A,10,-2062,-289,342
G,10,95,-73,-119
A,20,-2030,-300,289
G,20,93,-68,-106
@lwthatcher
lwthatcher / custom-json-encoder.py
Last active May 9, 2022 21:04
python json custom indent based on line length
# majority of code thanks to: https://stackoverflow.com/questions/13249415/how-to-implement-custom-indentation-when-pretty-printing-with-the-json-module#answer-13252112
import _ctypes
import json
import re
class NoIndent(object):
def __init__(self, value):
self.value = value
def __repr__(self):
if not isinstance(self.value, list):
@lwthatcher
lwthatcher / .block
Last active January 26, 2017 22:34
Quadtree Search Filters
license: mit
height: NaN
scrolling: no
border: yes
@lwthatcher
lwthatcher / .block
Last active December 14, 2016 22:16
simple polygon and point
license: mit
@lwthatcher
lwthatcher / .block
Last active July 7, 2019 15:37
Fixed-Radius Near Neighbors II
license: mit