Skip to content

Instantly share code, notes, and snippets.

@johnxx
johnxx / 2019-05-20_18.56.12.csv
Created May 21, 2019 01:58
Cranking 2019-05-20 18:56 PDT
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 8. in line 1.
#
PriLevel,SecLevel,Trigger,Sync,RefTime,MaxTime,ToothTime,Time
Flag,Flag,Flag,Flag,ms,ms,ms,ms
1.0,0.0,0.0,1.0,33.104,461.38,-428.276,33.104
0.0,0.0,0.0,1.0,41.484,461.38,8.38,41.484
1.0,0.0,0.0,1.0,82.708,461.38,41.224,82.708
0.0,0.0,0.0,1.0,88.512,461.38,5.804,88.512
1.0,0.0,0.0,1.0,103.092,461.38,14.58,103.092
0.0,0.0,0.0,1.0,107.836,461.38,4.744,107.836
1.0,0.0,0.0,1.0,119.892,461.38,12.056,119.892
"speeduino 201903: Speeduino 2019.03"
"Capture Date: Mon May 20 19:07:49 PDT 2019"
Time SecL RPM MAP MAPxRPM TPS AFR Lambda IAT CLT Engine DFCO Gego Gair Gbattery Gwarm Gammae Accel Enrich VE PW AFR Target PW2 DutyCycle1 DutyCycle2 TPS DOT Advance Dwell Battery V rpm/s Error # Error ID Boost PSI Boost cut Launch Hard Hard Limiter IAC value Baro Pressure Sync Loss # AuxIn CH0 AuxIn CH1 AuxIn CH2 AuxIn CH3 AuxIn CH4 AuxIn CH5 AuxIn CH6 AuxIn CH7
sec rpm kpa % O2 bits % % % % % % % ms O2 ms %/s deg ms V rpm/s None kpa
0.000 30 0 101 0 0 20.000 1.361 21 82 0 0 100 100 109 100 109 100 6 0.0 13.500 0.0 0.0 0.0 0 5 5.5 11.4 0 2 0 0.0 0 0 0 0 101 0 0 0 0 0 0 0 0 0
0.008 30 0 101 0 0 20.000 1.361 21 82 0 0 100 100 109 100 109 100 6 0.0 13.500 0.0 0.0 0.0 0 5 5.5 11.4 0 2 0 0.0 0 0 0 0 101 0 0 0 0 0 0 0 0 0
0.062 30 0 101 0 0 20.000 1.361 21 82 0 0 100 100 109 100 109 100 6 0.0 13.500 0.0 0.0 0.0 0 5 5.5 11.4 0 2 0 0.0 0 0 0 0 101 0 0 0 0 0 0 0 0 0
0.120 31 0 101 0 0 20.000 1.361 21 82 0 0 100 10
import jsonstreams
with jsonstreams.Stream(jsonstreams.Type.object, filename='foo') as my_file:
my_dict = {
'Name': 'Pants',
'Color': 'khaki',
}
for k, v in my_dict.iteritems():
my_file.write(k, v)
with my_file.subobject('Folders') as sub:
for n in {1..100} ; do
output=''
expr $n % 3 > /dev/null || output='fizz'
expr $n % 5 > /dev/null || output=$output'buzz'
[ -z $output ] && output=$n
echo $output
done