Skip to content

Instantly share code, notes, and snippets.

View zharben's full-sized avatar

Zeph Harben zharben

  • Interwell Health
  • Berkeley, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am zharben on github.
  • I am zh (https://keybase.io/zh) on keybase.
  • I have a public key ASCBFHJHhkKM_R_EA8-CYvKFwzk8Voma4D2soSBtIdb5OQo

To claim this, I am signing this object:

import itertools
FIRST_CODE='CAF'
LAST_CODE='F71'
LENGTH_OF_CODE=3
permutes = itertools.product('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
repeat=LENGTH_OF_CODE)
#!/usr/bin/env python3
# Parallel uploads to Amazon AWS S3
#
# The MIT License (MIT)
#
# Copyright (c) 2011-2014 Tom Payne
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
license: gpl-3.0
import sqlalchemy as sa
select_produces_untyped_literal = \
sa.select(
[
sa.literal('sad_literal').label('sad_column')
])
select_produces_typed_literal = \
sa.select(
@zharben
zharben / sad.sql
Last active March 28, 2019 19:23
CREATE TABLE bar (sadness TEXT);
CREATE TABLE baz (sadness TEXT, sad_type TEXT);
INSERT INTO bar VALUES ('not so sad');
INSERT INTO baz VALUES ('not so sad', 'but wait');
-- witness sadness:
WITH
bar_sadness as (
SELECT sadness,
#!/bin/bash
set -eux
sudo apt-get update
packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common"
# bug: http://www.postgresql.org/message-id/20130508192711.GA9243@msgid.df7cb.de
sudo update-alternatives --remove-all postmaster.1.gz
@zharben
zharben / data.tsv
Last active September 8, 2015 03:05
lane id start end
0 Qin 5 205
0 Jin 265 420
0 Sui 580 615
0 Tang 620 900
0 Song 960 1265
0 Yuan 1270 1365
0 Ming 1370 1640
0 Qing 1645 1910
1 Yamato 300 530