This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="styles.css" /> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.1/d3.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-queue/3.0.7/d3-queue.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/3.0.2/topojson.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O https://www2.census.gov/topics/genealogy/2010surnames/names.zip; unzip names.zip; awk -F "," '{print $1}' < Names_2010Census.csv | grep -i 'son$' | sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -LJO https://www2.census.gov/geo/docs/reference/codes/files/national_places.txt; grep -i "lucy" national_places.txt > lucy.txt; grep -i "julian" national_places.txt > julian.txt; grep -i "cody" national_places.txt > cody.txt; grep -i "laurel" national_places.txt > laurel.txt; curl -LJO https://www2.census.gov/geo/tiger/TIGER2017/PRIMARYROADS/tl_2017_us_primaryroads.zip; unzip tl_2017_us_primaryroads.zip; ogr2ogr -f 'CSV' tl_2017_us_primaryroads.csv tl_2017_us_primaryroads.dbf; grep -i "lucy" national_places.txt >> lucy.txt; grep -i "julian" national_places.txt >> julian.txt; grep -i "cody" national_places.txt >> cody.txt; grep -i "laurel" national_places.txt >> laurel.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from string import ascii_lowercase as alph | |
from pprint import pprint | |
alphabet = {v: k+1 for (k, v) in enumerate(alph)} | |
pprint(alphabet) | |
""" | |
=> | |
{'a': 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
a script that runs every sunday to let me know of birthdays coming up that week | |
most of the math happens in the spreadsheet | |
--> example: https://docs.google.com/spreadsheets/d/1iXcg0THKuQwosKiD5syktAmGA390Gu8OSFs5iKM1EwQ/edit?usp=sharing | |
*/ | |
function birthdayNotifier() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
import requests | |
from bs4 import BeautifulSoup | |
def j_formatter(reporter): | |
name, affil = [x.strip() for x in reporter.split(',', 1)] | |
# if this were a real thing, would obv want more rigorous cleaning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while [[ $# -gt 1 ]] | |
do | |
key="$1" | |
case $key in | |
-u|--url) | |
URL="$2" | |
shift | |
;; | |
-s|--starttime) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() {window.open("http://whoiz.herokuapp.com/lookup?url=" + window.location.host.toString().replace(/\//g,"").replace("http:","").replace("www.",""), '_blank');})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// given an array of arrays of paired numbers (say, years) | |
// collapse consecutive into an aggregate human-readable string | |
// so like | |
// [[2001, 2002], [2002, 2003], [2003, 2004], [2015, 2016]] | |
// becomes "2001-2004, 2015-2016" | |
function makeHumanReadableYears(arr) { | |
var out = []; | |
var breakpoints = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$$$. $$$$$$$$&@@@@@@@BBB$@@##E gj @@`L@@El&&@$$&@,#@@$@@@E .$$#, |L$E | |
@l$B,'B$$$$@g@@@@$$@@$$$$$@@'E $$@ $lgg$@$$#@$@@@$3@p#@@@@FsO@$gL#,'$E | |
|@E@ @@@@@@@@$@@@B$&$$$$$$$@- E=w$@@$$@@@$I'l#E$$r$B}$@@E,}@@B@IL`;#E | |
$ $= $$$$$$$@@@@@$$$$$$$$$@$ $@@$$F="``"""-: 3#L$@ $$B @g3@Q@&L |L` | |
E #@L j$$$$@@$@B$$$$$$$$$$$E $@$$$8FLLL., -|,A$F &$$@@@I||||$ | |
@j@$E #$@$g$@@@$$$$IlL|l&$@ gE$$F||I4&$@$&QL F,-,$$$B$&$&L|LQ$B | |
@$,$@ $$@&@$$$$$LlI$$$$IA` #$@BF' "A&$$@8$LL |-@$$$$L|Ll1$$I$$F | |
B4@@,-L$$ggggE1#EI$$F"^ ||@#@L zgppz, | '@$$L|||TL|LTl|$$F | |
#$@@5 $@$$#@$$@g'1`.;z$@@g;'T$@E,g$@@@B@@@@@@@@@@ , }l$LlLlIL@g$P! $#L | |
@@@@@ $$$$$@$$$E$Q$&@@@$$$, .-lg$$$$@$@B#B$@BB@@b ^?$L$II4$$$,! $#L |