Skip to content

Instantly share code, notes, and snippets.

@catherinedevlin
catherinedevlin / gist:6588378
Last active December 23, 2015 05:39
IPython Notebook: your new SQL Client (lightning talk from PostgresOpen 2013)
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@catherinedevlin
catherinedevlin / getvalue.py
Last active December 28, 2015 00:19
Simple IPython magic that gets a value; used to demo a problem
from IPython.core.magic import Magics, magics_class, line_magic
@magics_class
class GetValueMagics(Magics):
@line_magic
def getvalue(self, line=''):
var_name = line.split()[0]
return self.shell.user_ns[var_name]
def load_ipython_extension(ip):
@catherinedevlin
catherinedevlin / ddl-mongo-intro,ipynb
Created November 14, 2013 05:37
From Dayton Dynamic Languages Nov 13 meeting on MongodDB
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"""
Clones all of a GitHub organization's public repositories.
Includes a ``.repo-metadata.json`` in each repository with GitHub's
data on the repo.
"""
import itertools
import json
import os
import os.path
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@catherinedevlin
catherinedevlin / budget_authority_endpoint.md
Last active July 7, 2017 18:52
Endpoint description for /api/v2/budget_authority/agencies/<agency_identifier>/

Retrieve Historical Budget Authority data by agency identifier

Route: /api/v2/budget_authority/agencies/<agency_identifier>/

Method: GET

This route retrieves a record of historical budget authority, by year, summed over an agency, as identified by the agency identifier (or CGAC) and, optionally, over FR entity code (FREC).

@catherinedevlin
catherinedevlin / download_v2.md
Last active September 25, 2017 20:25 — forked from kevinli-work/download_v2.md
Download v2 API

Download v2 API

/v2/download/columns (GET) (NOT YET IMPLEMENTED)

Returns a list of available columns that can be requested in CSV generation for a specific type.

Request

  • type possible values: award or transaction

Response

Federal Account Spending By Category

Route: /api/v2/federal_accounts/<PK>/spending_by_category/

Method: POST

This route takes a federal_account DB ID and returns the data reqired to visualized the Spending By Category graphic.

Request

Federal Account Fiscal Year Snapshot

Route: /api/v2/federal_accounts/<PK>/fiscal_year_snapshot/<FY?>

Method: GET

This route takes a federal_account DB ID and returns the data reqired to visualized the fiscal_year_snapshot graphic.

If is not specified, results are returned for the current fiscal year, defined as the most recent FY for which submissions have been certified.