Skip to content

Instantly share code, notes, and snippets.

kcranston /
Last active Nov 11, 2020
GitHub Device Flow
import requests
client_id = "Iv1.8df72ad9560c774c"
header = {"Content-Type": "application/json", "Accept": "application/json"}
# Step 1
payload1 = {"client_id": client_id,}
r =

Keybase proof

I hereby claim:

  • I am kcranston on github.
  • I am kcranstn ( on keybase.
  • I have a public key ASDToFvPm9f1d3BK6NvfUVaE5Yzd2JKNpf9Q4IIA_nDFnwo

To claim this, I am signing this object:

View Bioinformatics_pandas_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
kcranston /
Last active Mar 23, 2018
intro to document stores in postgreSQL

Document stores in PostgreSQL

Notes for software engineering meeting presentation


  • mid to late 2000s: appearance of Document stores / NoSQL databases such as Mongo, Couch
  • Relational DBs now have support for document data: JSON in MySQL, JSON and JSONB in PostgreSQL
  • Focus on JSONB in Postgres (most full featured)
kcranston /
Last active Aug 19, 2016
Diagnosting encoding issues with OTT
import codecs
import csv
import as ott
ott_loc = "path-to-ott"
taxonomy = ott.OTT(ott_loc)
ott_names = taxonomy.ott_id_to_names
ott_parents = taxonomy.ott_id2par_ott_id
ott_filename = "ott.csv"