Skip to content

Instantly share code, notes, and snippets.

@subssn21
subssn21 / app.py
Last active September 27, 2019 20:11
Files necessary to recreate dropbox import error
import dropbox
from chalice import Chalice
app = Chalice(app_name='chalicetest')
@app.route('/')
def index():
return {'hello': 'world'}
@subssn21
subssn21 / kids.py
Created June 26, 2016 00:14
Select which child must take a shower first
import random
kids = ['Brenna', 'Quinn']
random.choice(kids)
@subssn21
subssn21 / gist:e9e121f6fd5ff50f688d
Created July 10, 2014 01:43
backport array_remove to postgres 9.2
create or replace function array_remove(a anyarray, e anyelement) returns anyarray as $$
BEGIN
return array(
select x from unnest(a) x where x <> e
);
END;
$$ LANGUAGE plpgsql;