This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT YEARWEEK('2012-1-1', 0) '2012-1-1' | |
, YEARWEEK('2012-12-30', 0) '2012-12-30' | |
, YEARWEEK('2012-12-31', 0) '2012-12-31' | |
, YEARWEEK('2013-1-1', 0) '2013-1-1' | |
, YEARWEEK('2013-1-5', 0) '2013-1-5' | |
, YEARWEEK('2013-1-6', 0) '2013-1-6' | |
, 0 type | |
UNION | |
SELECT YEARWEEK('2012-1-1', 1) '2012-1-1' | |
, YEARWEEK('2012-12-30', 1) '2012-12-30' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove this comment and save file in ~/.azkabanrc | |
[DEFAULT] | |
user = | |
session_id = | |
[vagrant] | |
url = https://localhost:8443 | |
user = azkaban | |
session_id = 3b25ac47-a791-4648-8434-bcbc737e4ba5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [[ -z $1 ]] | |
then | |
echo "must supply virtualenvname" | |
exit 128 | |
fi | |
# This lists the packages to link from the system site packages | |
PACKAGES_TO_INSTALL=(numpy scipy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import re, urllib, urllib2 | |
class Spreadsheet(object): | |
def __init__(self, key): | |
super(Spreadsheet, self).__init__() | |
self.key = key | |
class Client(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to install the latest stable version: | |
brew install scala --with-docs | |
# to install scala-2.10: | |
brew install https://raw.github.com/gist/4340744/scala.rb --with-docs | |
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands): | |
brew switch scala 2.9.2 | |
brew switch scala 2.10.0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- view: custom_table_colmn_info | |
derived_table: | |
sql: | | |
SELECT | |
a.schemaname | |
, b.table_name | |
, b.ordinal_position | |
, b.column_name | |
, REPLACE(b.udt_name, 'bpchar', 'char') data_type | |
, character_maximum_length data_length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION kaplan_meier(text) | |
RETURNS TABLE ( | |
time_period int, | |
pivot text, | |
exposed int, | |
events int, | |
marginal_probability double precision, | |
cumulative_probability double precision | |
) AS | |
$PROC$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from json import dumps | |
import sys | |
while True: | |
string = sys.stdin.readline() | |
if not string: | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo | |
bar | |
biz | |
baff | |
bang! |