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
def percentile_to_probability (hits, percentile): | |
""" hits 190 | |
percentile .99 | |
desc: given a 99 percentile what is the probability of seeing it in 190 attempts | |
""" | |
return (1-(percentile**hits)) * 100 | |
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
group 'chronlogger' | |
version '1.0-SNAPSHOT' | |
apply plugin: 'java' | |
apply plugin: 'application' | |
sourceCompatibility = 1.8 | |
version = '1.0' + new Date().format("MMddHHmm") | |
//remove javaagent when not monitoring with kamon |
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
""" | |
[DEFAULT] | |
ConnectionType=initiator | |
ReconnectInterval=60 | |
FileStorePath=store | |
FileLogPath=log | |
StartTime=00:00:00 | |
EndTime=00:00:00 | |
UseDataDictionary=Y |
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
from time import time, sleep | |
_128k = 128 * 1024 | |
_256k = 256 * 1024 | |
_512k = 512 * 1024 | |
_1024k = 1024 * 1024 | |
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
w='8=FIX.4.29=48135=E34=3649=OCO252=20140115-07:51:41.08856=DFIX20266=INTERNALISEDOCO21234567.5348578368=2394=29382=273=211=QLR6546-2014012467=1109=ABC76=CBXX:2301=OCO221=155=AA167=OPT200=201312205=21201=1202=154=138=50040=159=047=C77=C440=OCO29465=CBXX:OCO2386=1336=SESS11=QLR6556-2014012467=2109=ABC76=CBOE:2301=OCO221=155=AA167=OPT200=201312205=21201=1202=154=238=50040=444=1.299=1.3559=047=M77=C440=OCO29465=CBXX:OCO2386=1336=SESS10=112' | |
import quickfix | |
import quickfix42 | |
import quickfix50sp2 | |
dd=quickfix.DataDictionary('c:/tmp/fix42.xml') | |
m=quickfix.Message() | |
m=quickfix.Message(w,dd,False) |
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
import numpy as np | |
from fractions import Fraction | |
import pandas as pd | |
from odo import odo | |
def dec2percent (dec): | |
"""dec2percent(2) | |
""" |
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
""" | |
microsoft TrueSkill algorithm for rankings | |
""" | |
from __future__ import print_function | |
import math | |
import sys | |
from scipy.stats.distributions import norm as scipy_norm |
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
import pandas as pd | |
import numpy as np | |
option_data_frame = pd.read_csv('C:/code/python/pyql/examples/data/df_SPX_24jan2011.csv',parse_dates=[0,2]) | |
grouped = option_data_frame.groupby('dtExpiry') | |
for spec, group in grouped: | |
print('processing group %s' % spec) | |
indx = group.index |
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
""" | |
This was written using Python 2.7.2 | |
This requires the attached gziped blist library and the numpy library | |
or you can install blist and numpy from commandline with | |
easy_install blist or pip install blist | |
easy_install numpy or pip install numpy |
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
************************************************************************************************************ | |
*** Installation on Ubuntu 12.04 *************************************************************************** | |
************************************************************************************************************ | |
# Dependencies | |
sudo apt-get install build-essential | |
sudo apt-get install libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev | |
# Download Python | |
cd ~/Downloads/ | |
wget http://python.org/ftp/python/2.7.5/Python-2.7.5.tgz |
NewerOlder