<s> '''<STR_LIT>''' <EOL> import QSTK . qstkutil . DataAccess as da <EOL> import tables as pt <EOL> import numpy as np <EOL> from itertools import izip <EOL> import time <EOL> import dircache <EOL> def getStocks ( listOfPaths ) : <EOL> listOfStocks = list ( ) <EOL> print "<STR_LIT>" <EOL> fileExtensionToRemove = "<STR_LIT>" <EOL> for path in listOfPaths : <EOL> stocksAtThisPath = list ( ) <EOL> stocksAtThisPath = dircache . listdir ( str ( path ) ) <EOL> stocksAtThisPath = filter ( lambda x : ( str ( x ) . find ( str ( fileExtensionToRemove ) ) > - <NUM_LIT:1> ) , stocksAtThisPath ) <EOL> stocksAtThisPath = map ( lambda x : ( x . partition ( str ( fileExtensionToRemove ) ) [ <NUM_LIT:0> ] ) , stocksAtThisPath ) <EOL> for stock in stocksAtThisPath : <EOL> listOfStocks . append ( stock ) <EOL> return listOfStocks <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> print "<STR_LIT>" <EOL> dataItemsList = [ ] <EOL> dataItemsList . append ( '<STR_LIT>' ) <EOL> listOfStocks = list ( ) <EOL> listOfPaths = list ( ) <EOL> listOfPaths . append ( "<STR_LIT>" ) <EOL> listOfStocks = getStocks ( listOfPaths ) <EOL> alpha = da . DataAccess ( True , listOfPaths , "<STR_LIT>" , "<STR_LIT>" , True , listOfStocks ) <EOL> tslist = list ( alpha . getTimestampArray ( ) ) <EOL> listOfTS = alpha . getTimestampArray ( ) <EOL> for stock in [ "<STR_LIT>" ] : <EOL> alphaList = alpha . getStockDataList ( stock , '<STR_LIT>' ) <EOL> ctr = <NUM_LIT:0> <EOL> for val in alphaList : <EOL> print "<STR_LIT>" + str ( stock ) + "<STR_LIT>" + str ( val ) + "<STR_LIT>" + str ( listOfTS [ ctr ] ) <EOL> ctr += <NUM_LIT:1> <EOL> print "<STR_LIT>" </s>
