525 karma · joined March 13, 2012
"200 f to c"
and macOS spotlight you can go even shorter: "200 f"> "... ordering of key-value pairs"
order of appearance of key-value pairs in input does not matter.
> "... if row #100 introduces a new key-value pair"
this is sparse data. miller handles this with the "unsparsify" verb:
$ cat in.json
{ "a": 1, "b": 2 }
{ "a": 3, "b": 4 }
{ "a": 5, "b": 6, "c": 7 }
without unsparsify: $ cat in.json | mlr --j2p cat
a b
1 2
3 4
a b c
5 6 7
with unsparsify: $ cat in.json | mlr --j2p unsparsify then cat
a b c
1 2 -
3 4 -
5 6 7
unsparsify can also set default values: $ cat in.json | mlr --j2p unsparsify --fill-with 0 then cat
a b c
1 2 0
3 4 0
5 6 7
> "... What if the value for a key is an array?"Array value treatment seems to depend on output format. for output types that can represent arrays, they are preserved:
$ cat in-array.json
{ "a": [0,1,2], "b": [5,6,7] }
{ "a": [3,4,5], "b": [8,9,0] }
$ cat in-array.json | mlr --jsonl cat
{"a": [0, 1, 2], "b": [5, 6, 7]}
{"a": [3, 4, 5], "b": [8, 9, 0]}
for formats like csv/fixed-width, arrays are flattened into columns, one for each array element: $ cat in-array.json | mlr --j2p cat
a.1 a.2 a.3 b.1 b.2 b.3
0 1 2 5 6 7
3 4 5 8 9 0
flatten separator can also be set: $ cat in-array.json | mlr --j2p --flatsep _ cat
a_1 a_2 a_3 b_1 b_2 b_3
0 1 2 5 6 7
3 4 5 8 9 0so, it remains simple and concise for the easy problems, yet can scale up to address the trickier ones as well.
i've used csvkit, sqlite, jq, etc. miller is my favorite tool for data-fu (with sqlite being a close 2nd)
$ mlr -N --csv head -n 20 pp-2002.csv
-N is a shortcut for --implicit-csv-header and --headerless-csv-output
Did you mean Peter Attia?
if you are looking to get the measurement data in the computer, then this isn't for you...
(Mac Desktop): I use xbar [0] with a custom script to create a menubar nested dropdown of all of my cheatsheets. Selecting opens in typora [0] for reading/editing markdown.
(CLI): I use cheat [0] which consumes the same markdown cheatsheet content
[0]: https://xbarapp.com
[1]: https://typora.io
[2]: https://github.com/cheat/cheatrecent periods:
1. a period of months of inactivity.
2. a period of multiple months of morning exercise (running soon after waking, before any food)
3. a period of multiple months of inactivity
4. a period of multiple months of running again
The pattern I experience is clear: during the periods of exercise, after morning running, I don't feel any need/urge to eat breakfast. Easily skippable.
During periods of inactivity, my body craves breakfast. Not skippable without significant willpower.
csv mode can also be set with a switch:
sqlite3 :memory: -csvOthers can correct me, but I believe each payment just adds a month of time to your balance. So a number of months can be added at once.
mlr --icsv --oasv cat input.csv # csv to asv
mlr --iasv --ocsv cat input.asv # asv to csv
[0] https://miller.readthedocs.io/en/latest/[1] https://miller.readthedocs.io/en/latest/file-formats/#csvtsv...
went something like this:
- a routing node (a kernel extension) would receive packets and forward them (verbatim, same src & dest IP) to a backend worker
- backend worker was configured for same IP, which meant: a) arp had to be disabled to avoid conflict, or b) the loopback interface had to be aliased to same IP (using loopback avoids arp conflict and worker still happy to accept the packet and respond)
- response then goes back directly from worker to original source, which was a good approach for scaling web traffic back then, small http requests going through routing node, large responses going back direct from worker to source.
more details:
don't know what's going on inside of espn but their web experience (mobile or not) is just terrible - and i don't bother with the app. was really looking for something like how simple yahoo sports was back in the day, and plaintextsports seems to be it.
From making submarines, to bending steel axles, to making drones, to climbing walls, to lifting heavy loads, all with legos.
Highly recommended if you're into legos or even if you just like getting answers to "can lego do X?"
there are some pi cases with lego pin-sized holes to help interface the two.
it's essential to organize them otherwise locating the piece of interest becomes too frustrating and time consuming. we use a stack of tool boxes from the hardware store to organize ours.
https://eclecti.cc/hardware/tiny-usb-type-c-adjustable-power...
HN discussion: https://news.ycombinator.com/item?id=26644110