Skip to content

Instantly share code, notes, and snippets.

View adamhunter's full-sized avatar

Adam Hunter adamhunter

View GitHub Profile
@adamhunter
adamhunter / led-blink.py
Created January 8, 2014 02:45
python gpio script to blink led
echo "commit,reverted" && git log -600 | grep -B 8 'This reverts commit' | awk '/commit/ {if($1 == "This") { printf "%s %s\n", substr($4, 0, length($4) - 1), nextline } else { printf "%s, ", $2 }; }'
@adamhunter
adamhunter / darksky.py
Created July 11, 2018 02:16
batch download darksky timemachine api
import os
import time
from datetime import datetime, timedelta
from dotenv import load_dotenv, find_dotenv
from urllib.request import urlopen
from concurrent.futures import ThreadPoolExecutor, wait
def main():
print("running!")
load_dotenv(find_dotenv())