Skip to content

Instantly share code, notes, and snippets.

View SCI4THIS's full-sized avatar

Andrew Kistler SCI4THIS

  • Corner of bedlam and squalor --Tom Waits
View GitHub Profile
def unroll_flags: .flags |
map( if .REPEAT_FLAG
then (. as $flag | range(.repeat_count + 1) | $flag)
else . end
);
def build_contour_map: .contourEnds |
{ i: [range(1; (. | length) + 1)],
m: [0,map (. + 1)[]] } as $j |
$j.i | map([$j.m[.-1],$j.m[.]]);