Skip to content

Instantly share code, notes, and snippets.

View JoeGermuska's full-sized avatar

Joe Germuska JoeGermuska

View GitHub Profile
@JoeGermuska
JoeGermuska / README.md
Created September 10, 2020 22:22
Get last commit dates for remote git branches

I had a repo with dozens of abandoned or merged remote branches. Before deleting them wholesale, I wanted to know just how old they were.

I adapted this Stack Overflow answer, but dressed it up in a for loop since I wanted all of them. Also, since I wanted to sort them, I switched the date format to %cs (Short ISO), which didn't work in git 2.18.0 but does work in 2.28.0

@andrewbtran
andrewbtran / top_1_percent
Created August 3, 2018 19:43
top 1 percent ipums
# File # 1
# https://drive.google.com/open?id=1Lhz23JP4gRW4p_01D7OzaL60CT1wfem-
# File # 2
# https://drive.google.com/open?id=1XOWD8COTdDx30HNLZgrp57WzWUGOtaKA
# NOTE: To load data, you must download both the extract's data and the DDI
# and also set the working directory to the folder with these files (or change the path below).
#install.packages("tidyverse")
@myersjustinc
myersjustinc / README.md
Last active March 8, 2023 20:39
Remove Great Lakes and other water from Congressional districts shapefile

Remove Great Lakes and other water from Congressional districts shapefile

The problem

You want the most up-to-date shapefile of Congressional districts, but you don't want Michigan to be a giant blob.

(The Census Bureau offers some cartographic boundary shapefiles without this problem, but they aren't always the most current.)

@stuartathompson
stuartathompson / ranker.py
Created April 18, 2012 18:08 — forked from JoeGermuska/ranker.py
Example of how to convert a csv file to a table of ranked headers for each row
#!/usr/bin/env python
import csv
import json
r = csv.reader(open("data.csv"))
headers = r.next()
countries = headers[1:]
def saveData(output):
filename = "ranked"
print "Writing JSON output to %s.json" % filename
@brianboyer
brianboyer / import_tix.py
Created March 16, 2012 16:16
Unfuddle ticket generator
import csv, os.path
import os
import httplib, base64
import getpass
username = raw_input("Username:")
password = getpass.getpass("Password:")
subdomain = raw_input("Subdomain:")
project = raw_input("Project id:")
filename = raw_input("Tickets file:")
@brianboyer
brianboyer / gist:1696819
Created January 29, 2012 02:21
Lion dev environment notes
#!/bin/bash
# Requires, gdal, wget, spatialite, R with (maptools, RColorBrewer, classInt)
# You should be able to put any state/county combination in here and get a map made
# Replace spaces with an underscore ie:
#state=New_York
#county=New_York
#
#state=ILLINOIS
#county=Cook
#