Site | Short description | API Documentation | Python wrapper |
---|---|---|---|
Alexa Web | Web traffic data | API Documentation | Python wrapper for Alexa Web |
Amazon | Online Shopping | [API Documentation](http://docs.aws.ama |
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
#!/usr/bin/env python | |
import datetime | |
start = 2000 | |
res = {} | |
for i in range(90): | |
year = start + i | |
dt = datetime.date(year, 12, 31) | |
key = dt.strftime('%a %j') | |
res.setdefault(key, []).append(year) |
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
#!/usr/bin/env bash | |
set -e | |
set -u | |
mkdir -p ~/bin | |
GIT_WORK_TREE=~/bin git checkout -f | |
GIT_SHA=$(git rev-parse --short HEAD) | |
echo "DATE: $(date)" |
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
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" |
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
import logging | |
import contextlib | |
class PrefixLogger(logging.getLoggerClass()): | |
_prefix = [] | |
@contextlib.contextmanager | |
def prefix_context(self, prefix): | |
self._prefix.append(prefix) |
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
#!/usr/bin/env python | |
import argparse | |
import socket | |
COLORS = [ | |
'white', | |
'red', | |
'orange', | |
'yellow', |
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
// track in title on play.pocketcasts.com | |
var doc_title = document.title, | |
intr = function() { | |
var title = $('.player_podcast_title:first').text(), | |
remaining = $('.remaining_time:first').text(), | |
current = $('.current_time:first').text(); | |
if(title && remaining && current) { | |
document.title = remaining + ' : ' + title + ' : ' + doc_title; | |
} else { | |
document.title = doc_title; |
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
# | |
# Bash completion for fabric | |
# | |
function _fab_complete() { | |
local cur | |
if [[ -f "fabfile.py" || -d "fabfile" ]]; then |
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
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
I hereby claim:
- I am tanelpuhu on github.
- I am tanel (https://keybase.io/tanel) on keybase.
- I have a public key whose fingerprint is CCB0 751E 97A6 2998 8140 3FA1 18FD 1DED 30F6 CF4A
To claim this, I am signing this object:
NewerOlder