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
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 |