Skip to content

Instantly share code, notes, and snippets.

import re
def uses_python_26(path):
"""Does this path need 2.6?"""
match = re.search('20[0-9][0-9]', path)
assert match, 'Could not figure out Python version'
return int(match.group(0)) < 2016
MARKET = acm.FMarketPlace['IM']
TICK = acm.FTickSizeList['1000']
assert TICK
def CreateOrderBook(ins):
# Pick appropriate market and tick size list for the convertible
# market =
# tickSizeList =
info = acm.FMarketOrderBookCreateInfo(MARKET)
START-OF-FILE
DATALOADER_LOAD=['Instrument', 'PriceLinkDefinition', 'Latest Prices']
RUNDATE=20140714
PROGRAMFLAG=oneshot
CLOSINGVALUES=yes
"""
Update the quotation to per 100 unit instead of Pound
Workaround for AR682829
"""
import acm,ael
import FLogger
logger = FLogger.FLogger(__name__)
POUND = ael.Quotation['Pound']
@elconde
elconde / CsvToArray.py
Created October 25, 2012 16:52 — forked from tony-landis/CsvToArray.py
Convert CSV string to fixed width text table
"""
Convert CSV string to fixed width text table. Supports multi-line rows, column width limits, and creates a header row automatically
@author Tony Landis
@link http://www.tonylandis.com
@license GPL
"""
from math import ceil
class CsvToTxt():
@elconde
elconde / README
Created March 15, 2012 13:16
Initial README
C++ Challenge
import re
RE_NULL = re.compile('\[NULL\]',re.IGNORECASE)
def removeNull(s):
return RE_NULL.sub('',s)
print 'This is a test, yes it is'