Skip to content

Instantly share code, notes, and snippets.

View onyxfish's full-sized avatar

Christopher Groskopf onyxfish

View GitHub Profile
@onyxfish
onyxfish / exonerations.ipynb
Last active August 29, 2015 02:56
First agate ipython experiment
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@onyxfish
onyxfish / gist:9421065
Created March 7, 2014 21:57
keybase.md
### Keybase proof
I hereby claim:
* I am onyxfish on github.
* I am onyxfish (https://keybase.io/onyxfish) on keybase.
* I have a public key whose fingerprint is 9D2F F7F8 83C0 E286 25B5 3BA2 B7C0 7A1B 908A E10B
To claim this, I am signing this object:
@onyxfish
onyxfish / 555.py
Created April 7, 2014 13:23
Dead simple script to find optimal resistor and capacitor values for a 555 timer circuit
#!/usr/bin/env python
import sys
import itertools
TIME_HIGH_GOAL = int(sys.argv[1])
TIME_LOW_GOAL = int(sys.argv[2])
print 'Seeking optimal R1, R2 and C1 values for a %i pulse every %i milliseconds...' % (TIME_HIGH_GOAL, TIME_LOW_GOAL)

https://twitter.com/mdo/status/456520960481312769

"GitHub users: what do you love about, hate about, or want to see added to Issues?"

  • Setting labels is inconsistent. On detail page it's click to set, on list its apply/remove.
  • Setting assignee is inconsistent. On detail page "I" am first in the list but on list I'm alphabetized.
  • Issues don't close from commit messages until merged to master. (This breaks our workflow.)
  • Milestone deadlines are confusing. "Due on the 18th" rarely means "Finished by the 17th at midnight".
  • "Closes #2, #3" only closes #2.
@onyxfish
onyxfish / analytics.py
Created May 7, 2014 19:04
First working google analytics example
#!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
import httplib2
import os
import sys
from apiclient import discovery
from apiclient.errors import HttpError
@onyxfish
onyxfish / gist:cd15c6eed80b8acea3c5
Created December 17, 2014 01:44
Permissions schemes Google uses
Federated login using 3rd party providers (LDAP)
Sign-in-as-a-Service
Concurrent logins with multiple accounts
Forced logins with single accounts (Drive)
API keys that use Oauth2
API keys that use don't use Oauth2
IP-restricted API keys
Domain-restricted API keys
Alternate accounts (password reset)
Account forwarding (email)
@onyxfish
onyxfish / gist:750d1367699350cb6abd
Last active August 29, 2015 14:16
NICAR15 Links
Mr. Chartmaker: Impressive new responsive charting tool built by Gregor Aisch for Upshot
http://vis4.net/blog/posts/seven-features-youll-wantin-your-next-charting-tool/
markdowneyjr: Interesting (though probably fragile) approach to using Markdown for editing (i.e. how we use Google COPY docs)
https://github.com/veltman/markdowneyjr
Change Agent: neat, if maybe ill-advised usage of Github to version simple key/value data (written by someone at Github)
https://github.com/benbalter/change_agent
Wolfram Data Drop: Crazy new "give us all your data" platfrom that integrates with Wolfram Alpha
@onyxfish
onyxfish / fabfile.py
Created March 12, 2010 15:27
Fabric script to deploy staticly built tables from ProPublica's table-setter application to S3.
from fabric.api import *
"""
Base configuration
"""
env.project_name = 'tables'
"""
Environments
"""
import inspect
# dir()
# >>> ['RuntimeException', 'String', 'TropoApp', 'TropoCall', 'TropoChoice', 'TropoEvent', '__name__', '_handleCallBack', '_parseTime', 'a', 'action', 'answer', 'appInstance', 'ask', 'call', 'callFactory', 'conference', 'conferenceFactory', 'context', 'createConference', 'currentApp', 'currentCall', 'destroyConference', 'engine', 'hangup', 'incomingCall', 'log', 'prompt', 'record', 'redirect', 'reject', 'say', 'startCallRecording', 'stopCallRecording', 'token', 'transcribe', 'transcription', 'transfer', 'wait']
if (currentCall):
log("READ HERE: Incoming")
# log(currentCall) # object instance
# log(action) # undefined
@onyxfish
onyxfish / Safecity Setup
Created May 10, 2010 19:15
Setup instructions for safecity
# Assumes you have Postgres installed
mkvirtualenv --no-site-packages safecity
easy_install pip
pip install -r requirements.txt
# The default dataset is the South Austin neighborhood of Chicago
# For complete dataset edit bootstrap.sh to remove the flag to ./manage load_centerline
# For the downtown/loop dataset edit bootstrap.sh to change the flag to ./manage load_centerline -d