Skip to content

Instantly share code, notes, and snippets.

View ralphbean's full-sized avatar

Ralph Bean ralphbean

  • Red Hat, Inc
  • Rochester, NY
View GitHub Profile
@ralphbean
ralphbean / gist:9811131
Created March 27, 2014 16:08
keybase.md
### Keybase proof
I hereby claim:
* I am ralphbean on github.
* I am ralphbean (https://keybase.io/ralphbean) on keybase.
* I have a public key whose fingerprint is 9450 4C3A E11D D197 9200 58AB A90E D7DE 9710 95FF
To claim this, I am signing this object:
@ralphbean
ralphbean / scrape-issues.py
Created May 9, 2014 01:59
Script to scrape all issues for a github user
import requests
import getpass
import sys
def get_repos(username, auth):
""" username should be a string
auth should be a tuple of username and password.
eventually, we'll switch it to use an oauth token
"""
@ralphbean
ralphbean / self-acls.py
Created July 14, 2014 15:13
Audit script to look for odd cases from the pkgdb
#!/usr/bin/env python
""" This script looks for people who have assigned themselves the
'approveacls' status in pkgdb by checking the fedmsg history.
Gotta first do::
$ yum install \
fedmsg \
python-fedmsg-meta-fedora-infrastructure \
python-requests \
""" Calculate "dev to release" leadtime.
Prints out statistics about the time between the first commit of a new feature
and the tag where that feature gets released.
Ideally, we'd like to compute the time between first commit and deployment to
production, but we don't have an easy way to reliably access logs of when
things were deployed against when they were committed in git.
A quick script for my talk on technical debt at Flock 2015.
@ralphbean
ralphbean / stats-for-decause.py
Created August 11, 2015 15:54
stats for decause. bodhi comments and copr builds over the last few years (from fedmsg data)
""" stats-for-decause.py
so, 0 years ago is august 2014 to august 2015
1 years ago is august 2013 to august 2014
2 years ago is august 2012 to august 2013, etc..
the anonymous comments don't add up back 2 years ago because the
anonymous format changed in the message payload -- the "contains"
thing doesn't work exactly that far back.
Output:
@ralphbean
ralphbean / index.html
Created August 3, 2011 18:05
test with force directed stuff
<!DOCTYPE html>
<html>
<head>
<title>Force-Directed Layout (Dynamic)</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.min.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.min.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.min.js"></script>
<style type="text/css">
html, body {
@ralphbean
ralphbean / index.html
Created August 4, 2011 14:51
d3 viz for narcissus
<!DOCTYPE html>
<html>
<head>
<title>Proof of concept for d3 viz + narcissus</title>
<link rel="stylesheet" type="text/css" href="spider.css"></style>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.min.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.min.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="spider.js"></script>
@ralphbean
ralphbean / gist:1163585
Created August 22, 2011 21:09 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job:
  • Research Systems Administrator at RIT. I teach Chemists and Biologists (and others) how to program for high performance computing environments.
Favorite Python project:
Favorite Conference:
  • PyCon US

Python Experience Level:

@ralphbean
ralphbean / test-reflect.py
Created August 30, 2011 16:26
Test overriding reflected column types in with sqlalchemy.
#!/usr/bin/env python
""" Demonstrates an issue with overriding reflected column types.
Author: Ralph Bean <ralph.bean@gmail.com>
Take a look at :meth:`reflect_and_verify_legacy_db_mangle`.
Running this script produces the following output::
% ./test-reflect.py
@ralphbean
ralphbean / index.html
Created October 7, 2011 18:45
FPS graph using d3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Chart of frames/second with d3.js</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js">
</script>
<style type="text/css">