saw a cool animation
https://twitter.com/MirantisIT/status/703363866516828161
wanted to replicate it in the browser
saw a cool animation
https://twitter.com/MirantisIT/status/703363866516828161
wanted to replicate it in the browser
type DocumentBody = Raw String | Words List String | |
tokenize: DocumentBody -> List String | |
tokenize s = | |
case s of | |
Raw str_body -> String.split " " str_body |> (List.map String.toLower) | |
Words list_body -> List.map String.toLower list_body | |
-- Tests |
/* LAYER 0 | |
* | |
* ,--------------------------------------------------. ,--------------------------------------------------. | |
* | Esc | 1 | 2 | 3 | 4 | 5 | + = | | +L2 | 6 | 7 & | 8 * | 9 ( | 0 ) | -_ | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | |
* | Tab | Q | W | E | R | T | \ | | | { | Y | U | I | O | P | } ] | | |
* |--------+------+------+------+------+------| \ | | | [ |------+------+------+------+------+--------| | |
* | LCtrl | A | S | D | F | G |------| |------| H | J | K | L | ; : | ' " | | |
* |--------+------+------+------+------+------| ~L1 | | ~L1 |------+------+------+------+------+--------| | |
* | LShift | Z | X | C | V | B | | | | N | M | ,< | . > | / ? | RShift | |
export AWS_CREDENTIAL_FILE=/Users/deanc/.aws_credential_file | |
export AWS_SECRET_ACCESS_KEY=$(cat $AWS_CREDENTIAL_FILE | grep -i secret | cut -d "=" -f 2) | |
export AWS_ACCESS_KEY_ID=$(cat $AWS_CREDENTIAL_FILE | grep -i access | cut -d "=" -f 2) |
which?
$ which which
/usr/bin/which
$ which $(!!)
which $(which which)
/usr/bin/which
$ which $(!!)
which $(which $(which which))
/usr/bin/which
Collecting examples that break or do not break.
Next step is refactoring the broken bq example into the https requests example using the same http lib that bq does.
need to get to the root of why SSLErrors
are thrown
In [8]: !ls | |
README.tmpenv bin include lib share | |
In [9]: [i.upper() for i in _] | |
Out[9]: ['README.TMPENV', 'BIN', 'INCLUDE', 'LIB', 'SHARE'] |
#!/bin/bash | |
# pull out census data per city file and put it into its own file | |
for i in $(ls raw_city_data/); | |
do | |
echo "parsing $i" | |
grep -i "census:population" raw_city_data/$i > census_populations/$i | |
done | |
# do the exact same thing, but takes a third the time (and makes your computer very very warm) |
# if you just start typing | |
def really_long_func_def( | |
a, | |
b, | |
c): | |
really_long_func_def( | |
a, # "continuation line over-indented for hanging indent" | |
b, | |
c |
Zoom and pan by scrolling and clicking and dragging.
view on bl.ocks.org
The difference between these two maps is how the zoom behavior is bound to them. I had been using the one on the right and unhappy with how the ability to pan was compromised the further you zoomed in. Also it had seemed jittery. After closely studying the examples from Mike Bostock I finally figured out that you have to bind the zoom behavior to the parent SVG element but have all the juicy map details as a child element, and have the zoom function manipulate that child directly. The way I had set it up originally, the zoom function was manipulating the child, but the zoom behavior was also bound directly to the child. At least that's how I understand that I did it.
What's the difference between these two ways to use the zoom behavior? Why does the one on the right act so buggy?