def worker(x):
 (cellsPerColumn, numSequences) = (x[0], x[1])
 nTrainingReps = 1
 sequenceLength = 10
 numCols = 200
 print 'Started', cellsPerColumn, numSequences
 seqGenMode = 'shared subsequence, one pattern'
 subsequenceStartPos = 5
 trainingSet = buildTrainingSet(numSequences=numSequences, sequenceLength=sequenceLength, pctShared=0.1, seqGenMode=seqGenMode, subsequenceStartPos=subsequenceStartPos, numCols=numCols, minOnes=21, maxOnes=25)
 (numFailures1, numStrictErrors1, numPerfect1, atHub, tp) = _testSequence(trainingSet, nTrainingReps=nTrainingReps, numberOfCols=numCols, cellsPerColumn=cellsPerColumn, initialPerm=0.8, connectedPerm=0.7, minThreshold=11, permanenceInc=0.4, permanenceDec=0, permanenceMax=1, globalDecay=0.0, newSynapseCount=8, activationThreshold=8, doPooling=False, shouldFail=False, predJustAfterHubOnly=5)
 seqGenMode = 'no shared subsequence'
 trainingSet = buildTrainingSet(numSequences=numSequences, sequenceLength=sequenceLength, pctShared=0, seqGenMode=seqGenMode, subsequenceStartPos=0, numCols=numCols, minOnes=21, maxOnes=25)
 (numFailures2, numStrictErrors2, numPerfect2, tp) = _testSequence(trainingSet, nTrainingReps=nTrainingReps, numberOfCols=numCols, cellsPerColumn=cellsPerColumn, initialPerm=0.8, connectedPerm=0.7, minThreshold=11, permanenceInc=0.4, permanenceDec=0, permanenceMax=1, globalDecay=0.0, newSynapseCount=8, activationThreshold=8, doPooling=False, shouldFail=False)
 print 'Completed',
 print cellsPerColumn, numSequences, numFailures1, numStrictErrors1, numPerfect1, atHub, numFailures2, numStrictErrors2, numPerfect2
 return (cellsPerColumn, numSequences, numFailures1, numStrictErrors1, numPerfect1, atHub, numFailures2, numStrictErrors2, numPerfect2)

def worker ( x ) : ( cellsPerColumn , numSequences ) = ( x [ 0 ] , x [ 1 ] ) nTrainingReps = 1 sequenceLength = 10 numCols = 200 print 'Started' , cellsPerColumn , numSequences seqGenMode = 'shared subsequence, one pattern' subsequenceStartPos = 5 trainingSet = buildTrainingSet ( numSequences = numSequences , sequenceLength = sequenceLength , pctShared = 0.1 , seqGenMode = seqGenMode , subsequenceStartPos = subsequenceStartPos , numCols = numCols , minOnes = 21 , maxOnes = 25 ) ( numFailures1 , numStrictErrors1 , numPerfect1 , atHub , tp ) = _testSequence ( trainingSet , nTrainingReps = nTrainingReps , numberOfCols = numCols , cellsPerColumn = cellsPerColumn , initialPerm = 0.8 , connectedPerm = 0.7 , minThreshold = 11 , permanenceInc = 0.4 , permanenceDec = 0 , permanenceMax = 1 , globalDecay = 0.0 , newSynapseCount = 8 , activationThreshold = 8 , doPooling = False , shouldFail = False , predJustAfterHubOnly = 5 ) seqGenMode = 'no shared subsequence' trainingSet = buildTrainingSet ( numSequences = numSequences , sequenceLength = sequenceLength , pctShared = 0 , seqGenMode = seqGenMode , subsequenceStartPos = 0 , numCols = numCols , minOnes = 21 , maxOnes = 25 ) ( numFailures2 , numStrictErrors2 , numPerfect2 , tp ) = _testSequence ( trainingSet , nTrainingReps = nTrainingReps , numberOfCols = numCols , cellsPerColumn = cellsPerColumn , initialPerm = 0.8 , connectedPerm = 0.7 , minThreshold = 11 , permanenceInc = 0.4 , permanenceDec = 0 , permanenceMax = 1 , globalDecay = 0.0 , newSynapseCount = 8 , activationThreshold = 8 , doPooling = False , shouldFail = False ) print 'Completed' , print cellsPerColumn , numSequences , numFailures1 , numStrictErrors1 , numPerfect1 , atHub , numFailures2 , numStrictErrors2 , numPerfect2 return ( cellsPerColumn , numSequences , numFailures1 , numStrictErrors1 , numPerfect1 , atHub , numFailures2 , numStrictErrors2 , numPerfect2 )
worker process used in multiprocessing mode .