def _createTps(numCols):
 minThreshold = 4
 activationThreshold = 5
 newSynapseCount = 7
 initialPerm = 0.3
 connectedPerm = 0.5
 permanenceInc = 0.1
 permanenceDec = 0.05
 globalDecay = 0
 cellsPerColumn = 1
 cppTp = TP10X2(numberOfCols=numCols, cellsPerColumn=cellsPerColumn, initialPerm=initialPerm, connectedPerm=connectedPerm, minThreshold=minThreshold, newSynapseCount=newSynapseCount, permanenceInc=permanenceInc, permanenceDec=permanenceDec, activationThreshold=activationThreshold, globalDecay=globalDecay, burnIn=1, seed=_SEED, verbosity=VERBOSITY, checkSynapseConsistency=True, pamLength=1000)
 cppTp.retrieveLearningStates = True
 pyTp = TP(numberOfCols=numCols, cellsPerColumn=cellsPerColumn, initialPerm=initialPerm, connectedPerm=connectedPerm, minThreshold=minThreshold, newSynapseCount=newSynapseCount, permanenceInc=permanenceInc, permanenceDec=permanenceDec, activationThreshold=activationThreshold, globalDecay=globalDecay, burnIn=1, seed=_SEED, verbosity=VERBOSITY, pamLength=1000)
 return (cppTp, pyTp)

def _createTps ( numCols ) : minThreshold = 4 activationThreshold = 5 newSynapseCount = 7 initialPerm = 0.3 connectedPerm = 0.5 permanenceInc = 0.1 permanenceDec = 0.05 globalDecay = 0 cellsPerColumn = 1 cppTp = TP10X2 ( numberOfCols = numCols , cellsPerColumn = cellsPerColumn , initialPerm = initialPerm , connectedPerm = connectedPerm , minThreshold = minThreshold , newSynapseCount = newSynapseCount , permanenceInc = permanenceInc , permanenceDec = permanenceDec , activationThreshold = activationThreshold , globalDecay = globalDecay , burnIn = 1 , seed = _SEED , verbosity = VERBOSITY , checkSynapseConsistency = True , pamLength = 1000 ) cppTp . retrieveLearningStates = True pyTp = TP ( numberOfCols = numCols , cellsPerColumn = cellsPerColumn , initialPerm = initialPerm , connectedPerm = connectedPerm , minThreshold = minThreshold , newSynapseCount = newSynapseCount , permanenceInc = permanenceInc , permanenceDec = permanenceDec , activationThreshold = activationThreshold , globalDecay = globalDecay , burnIn = 1 , seed = _SEED , verbosity = VERBOSITY , pamLength = 1000 ) return ( cppTp , pyTp )
create two instances of temporal poolers with identical parameter settings .