Skip to content

Instantly share code, notes, and snippets.

@b-ryan
b-ryan / requirements-licenses.py
Created Jul 5, 2018
Get licenses from all packages in requirements.txt (packages need to be installed locally first)
View requirements-licenses.py
#!/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 Feb 25, 2018
gun data analysis
View gun-data.py
#!/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")
View keybase.md

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 Sep 16, 2013
Tampermonkey script to widen the trello modal
View widen-trello-modal.js
// ==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() {