If you're like me and you use semver for versioning your tags, you probably hate when you do this:
$ git tag -l
0.1.0
0.10.0
0.2.0
0.3.0
0.3.1
0.4.0
0.5.0
| #!/bin/bash | |
| # https://gist.github.com/loisaidasam/e4e475f47c47d18ad39d | |
| # Requires `pup` and `jq` in your `$HOME/bin` dir | |
| # TODO: Figure out how to do this | |
| #BOT_NAME="ESPN Headlines Bot" | |
| #VERSION="0.3" | |
| #USER_AGENT="$BOT_NAME/$VERSION" |
If you're like me and you use semver for versioning your tags, you probably hate when you do this:
$ git tag -l
0.1.0
0.10.0
0.2.0
0.3.0
0.3.1
0.4.0
0.5.0
| { | |
| "arrivals": [ | |
| "00:35:00", | |
| "00:35:00", | |
| "00:38:00", | |
| "00:55:00", | |
| "00:55:00", | |
| "00:58:00", | |
| "01:05:00", | |
| "01:05:00", |
| """Carnac the Magnificent! | |
| http://raganwald.com/2015/05/08/carnac-the-magnificent.html | |
| https://news.ycombinator.com/item?id=9511700 | |
| """ | |
| import itertools | |
| import sys | |
| #!/bin/bash | |
| # Based on https://gist.github.com/loisaidasam/0431f4d1b8a3c120b978 | |
| ./injuries.sh | jq '.[].injury' | sort | uniq -c | sort -nr |
| #!/bin/bash | |
| curl -Ss http://www.rotoworld.com/teams/injuries/nba/all/ | \ | |
| pup 'div#cp1_pnlInjuries tr json{}' | \ | |
| jq '[.[] | {name: .children[0].children[0].text, pos: .children[2].text, status: .children[3].text, date: .children[4].text, injury: .children[5].text, returns: .children[6].text} | select(.date != null)]' |
| #!/bin/bash | |
| # This hook is run after this virtualenv is activated. | |
| # This part requires `heroku-config` | |
| # (install like this: heroku plugins:install git://github.com/ddollar/heroku-config.git) | |
| echo "Pulling all heroku environment variables..." | |
| heroku config:pull --overwrite --quiet | |
| set -a | |
| source .env |
A command line API for getting leaderboard data about the PGA Masters Tournament.
Based on http://www.espn.com/golf/leaderboard
Requirements:
There are 12 people on a deserted island. 11 of them each have the same weight and 1 of them weighs either more or less than the others. Your task is to figure out if that person weighs more or less than any of the others.
There are no scales on the island, but there is a seesaw (that fits as many people on it at once as you like). The limitation is that you can only use the seesaw 3 times in total.
How do you use the seesaw to figure out if the person weighs more or less?
All golfers and their rankings:
https://docs.google.com/spreadsheets/d/1HUCllAJdhFt0s4Mj2ZdF-BYYYNYDYgsGGyvZV2w8Me8/pubhtml
First get all of the data (using pup):