Skip to content

Instantly share code, notes, and snippets.

@b-ryan
b-ryan / requirements-licenses.py
Created July 5, 2018 16:53
Get licenses from all packages in requirements.txt (packages need to be installed locally first)
#!/usr/bin/env python
import pkg_resources
def get_pkg_license(pkg):
try:
lines = pkg.get_metadata_lines('METADATA')
except:
lines = pkg.get_metadata_lines('PKG-INFO')
for line in lines:
@b-ryan
b-ryan / gun-data.py
Created February 25, 2018 19:04
gun data analysis
#!/usr/bin/env python
import csv
with open("gun-data.csv") as f:
r = csv.reader(f)
head = next(r)
i_date = head.index("Date")
i_deaths = head.index("Fatalities")
i_type = head.index("Type of weapons")

Keybase proof

I hereby claim:

  • I am b-ryan on github.
  • I am b_ryan (https://keybase.io/b_ryan) on keybase.
  • I have a public key whose fingerprint is 2C8E A158 A742 12E4 6957 75AF 35CA 0179 65DF 4E5E

To claim this, I am signing this object:

@b-ryan
b-ryan / widen-trello-modal.js
Created September 16, 2013 14:39
Tampermonkey script to widen the trello modal
// ==UserScript==
// @name Widen Trello modal
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match https://trello.com/*
// @copyright 2013+, Buck Ryan
// ==/UserScript==
$('.window').hover(function() {