This file contains hidden or 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 | |
import couchdbkit | |
import ROOT | |
import sys | |
import KDataPy.samba_utilities as sutil | |
import KDataPy.util as kutil | |
from os import listdir | |
from os.path import isfile, join | |
import numpy as np |
This file contains hidden or 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
First, I start with a reminder of the raw data structure and amp level data structure. (I won't include the Muon Modules…). TCA = TClonesArray | |
KRawEvent | |
-- TCA of KRawBolometerRecords | |
- detector name, mass, etc.. | |
- TRefArray links to KRawBoloPulseRecords | |
- TRef link to KRawSambaRecord | |
This file contains hidden or 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
//paste this into a ROOT macro, or the interpreter directly | |
gSystem.Load("libkds") | |
KHLAEvent *ehla = KEventFactory::NewHLAEvent() | |
KAmpEvent *eamp = KEventFactory::NewAmpEvent() | |
eamp->SetEventTriggerStamp(100) | |
eamp->AddBolo() | |
// (class KAmpBolometerRecord*)0x7fbbeacd1ee0 |
This file contains hidden or 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
Alpine Data Labs 30.2% (60) 34.2% (68) 35.7% (71) 1.94 199 | |
Bright.com 25.4% (54) 48.4% (103) 26.3% (56) 1.99 213 | |
Cloudant 93.3% (1349) 3.5% (50) 3.3% (47) 2.90 1446 | |
Cloudera 30.1% (241) 47.2% (378) 22.7% (182) 2.07 801 | |
Cloudmeter 87.2% (444) 7.9% (40) 5.3% (27) 2.83 509 | |
CloudPhysics 75.6% (341) 14.9% (67) 10.4% (47) 2.67 451 | |
Concurrent 16.2% (22) 42.6% (58) 41.2% (56) 1.75 136 | |
Continuum Analytics 59.6% (133) 17.0% (38) 23.3% (52) 2.36 223 | |
Datameer 57.5% (226) 21.1% (83) 21.4% (84) 2.36 393 | |
DataSift 12.5% (12) 47.9% (46) 39.6% (38) 1.73 96 |
This file contains hidden or 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 couchdbkit import Server | |
from csv import DictReader | |
import time, sys, subprocess, math, os, datetime, pytz, calendar, json | |
#______________ | |
# parseDoc | |
def parseDoc(doc): | |
for k,v in doc.items(): | |
This file contains hidden or 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
def geoname(lat, lng, usrname): | |
url = 'http://api.geonames.org/countrySubdivisionJSON?lat=%f&lng=%f&username=%s' % (lat, lng, usrname) | |
r = requests.get(url) | |
r.raise_for_status() #we'll quit if we have any problems. | |
return r.json() |
This file contains hidden or 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
function(doc){ | |
if(doc.text && !doc.countryName && !doc.adminName1 && doc.geo && typeof doc["geo"]["coordinates"][0] === 'number' && typeof doc["geo"]["coordinates"][1] === 'number') | |
emit( doc._id, 1); | |
} |
This file contains hidden or 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
http://cpsievert.wordpress.com/ | |
https://github.com/cpsievert/pitchFX | |
http://fastballs.wordpress.com/2007/08/23/how-to-build-a-pitch-database/ | |
http://www.fangraphs.com/library/misc/pitch-fx/ | |
http://www.fangraphs.com/library/interpreting-pitchfx-data/ | |
http://www.fangraphs.com/library/pitch-type-abbreviations-classifications/ | |
http://gd2.mlb.com/components/game/mlb/year_2007/ | |
http://www.fangraphs.com/blogs/the-early-trend-of-2013-dingers/#more-120259 |
This file contains hidden or 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
import base64 | |
import os | |
import sys | |
user = raw_input('username:') | |
password = raw_input('password:') | |
b64encoded = base64.urlsafe_b64encode('{0}:{1}'.format(user,password)) | |
shell = os.path.basename(os.environ.get('SHELL')) |
This file contains hidden or 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 couchdbkit import Server | |
from csv import DictReader | |
import time, sys, subprocess, math, os, datetime, pytz, calendar, json | |
#______________ | |
# parseDoc | |
def parseDoc(doc): | |
for k,v in doc.items(): | |