twmap?
breakpoint()
also eats the help page watafakhelp(twmap)
work?twmap?
but its way less feature completetrans
to translate
, i nearly added it to firewall ban#!/bin/bash
# Advent of Code 01
while read -r l; do
if [ -z "$l" ]; then
nm+=( "$c" )
c=0
else
c=$(( c + l ))
fi
done < "$1"
nms=$(xargs -n1 <<< "${nm[@]}" | sort -n)
x1=$(tail -n1 <<< "${nms[@]}")
x2=$(tail -n3 <<< "${nms[@]}" | xargs | tr ' ' '+' | bc)
echo "$x1 $x2"
paste -s -d+ input|sed -e"s/++/\n/g"|bc|sort -n|tail -n1
bc
is non standard tho is it?tr '\n' ' ' | sed 's/ /\n/g' | sed 's/ /+/g' | sed 's/+$//g' | awk '{ print "echo $((" $0 "))" }' | bash | sort -n | tail -n 1
layer1 == layer2
tiles1[tiles1 == tiles2]
[0 0 0 ... 0 0 0]
numpy.indices
, numpy.equal
, numpy.concatenate
and that mask-indexing thingtiles1 == tiles2.nonzero()
to get the indicestiles1 == tiles2.nonzero()
to get the indices