Skip to content

Instantly share code, notes, and snippets.

View gist:65feaf31babbc3e7763cc20340139cc8
>>> properties_dict = {}
>>> for i, row in enumerate(csv.reader(open("Workbook1.csv", "r"))):
... if i == 0:
... continue
... props = row[17].replace("'", '"')
... properties_dict[i] = json.loads(props)
>>> for k, v in properties_dict.items():
... print(v["gender"])
thomas-scrace / gist:6bdd1bec8d32298c08e923ec5809f364
Created Jan 27, 2017
How to download all files from a Gdrive golder using GAM
View gist:6bdd1bec8d32298c08e923ec5809f364
$ gam user USER_NAME_OF_FILE_OWNER show filelist query "'FILE_ID_OF_FOLDER' in parents" id >files.csv
$ gam csv files.csv gam user ~Owner get drivefile id ~id
thomas-scrace /
Created Dec 13, 2016
Download and install the golang tools. Change variables to suit your purposes.
#!/usr/bin/env bash
# Downloads the specified version of go, unpacks it,
# deletes any existing version, and installs the new
# one globally. Needs root.
set -e
View gist:d2519b8a6c2470e26496
# Build and install postgres from the git tree.
# This was tested on Ubuntu 14.04 on 19 July 2015
# when the development version of PGSQL was 9.6devel.
sudo apt-get update
sudo apt-get install build-essential libreadline-dev zlib1g-dev git flex bison libxml2-dev libxslt-dev libssl-dev
git clone git://

Keybase proof

I hereby claim:

  • I am thomas-scrace on github.
  • I am tomscrace ( on keybase.
  • I have a public key whose fingerprint is 66EA 2235 9E3D 5C75 010A 8925 2687 AD4D 1DBE 8A98

To claim this, I am signing this object:

thomas-scrace /
Last active Dec 30, 2015
Testing 'x in s' performance for various python sequence types
import timeit
seq_types = ('set', 'list', 'tuple')
intervals = (10, 100, 1000)
def test(t, i):
r = t(range(i))
for j in range(i):
if i in r: