Skip to content

Instantly share code, notes, and snippets.

Christopher Groskopf onyxfish

Block or report user

Report or block onyxfish

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@onyxfish
onyxfish / README.md
Created Mar 30, 2017
Import the entire Bureau of Labor Statistics (BLS) Quarterly Census of Wages (QCEW) dataset into a PostgreSQL database
View README.md

QCEW Data Loader

These scripts import the entire Bureau of Labor Statistics Quarterly Census of Employement and Wages (from 1990 to latest) into one giant PostgreSQL database.

The database created by this process will use about 100GB of disk space. Make sure you have enough space available before you start!

Configuration

Database name, table name, and more can be configured via config.sh.

@onyxfish
onyxfish / linestring.py
Last active Oct 7, 2016
An agate aggregation to generate geojson linestrings from sequential row data
View linestring.py
import agate
import geojson
class LineString(agate.Aggregation):
def __init__(self, lat_column, lng_column):
self._lat_column_name = lat_column
self._lng_column_name = lng_column
def get_aggregate_data_type(self, table):
return agate.Text()
@onyxfish
onyxfish / example.py.ipynb
Last active Oct 24, 2015
Using agate in a Jupyter notebook
View example.py.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@onyxfish
onyxfish / exonerations.ipynb
Last active Aug 29, 2015
First agate ipython experiment
View exonerations.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:750d1367699350cb6abd
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 / gist:cd15c6eed80b8acea3c5
Created Dec 17, 2014
Permissions schemes Google uses
View gist:cd15c6eed80b8acea3c5
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 / README.md
Last active Jan 5, 2020
Google Spreadsheets script to generate slugs from a range of cells
View README.md

This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.

Use it like this!

# A B C
1 a b slug
2 foo baz bing =slugify(A2:B4)
3 bar BAZ
4 FOO baz-bing
@onyxfish
onyxfish / ordered_json.py
Created May 29, 2014
Usage of object_pairs_hook to load JSON with guaranteed key order
View ordered_json.py
#!/usr/bin/env python
from collections import OrderedDict
import json
write_data = OrderedDict([
('a', '1'),
('b', '2'),
('c', '3')
])
@onyxfish
onyxfish / analytics.py
Created May 7, 2014
First working google analytics example
View analytics.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
import httplib2
import os
import sys
from apiclient import discovery
from apiclient.errors import HttpError
View github_issues.md

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.
You can’t perform that action at this time.