def do_status(self):

		#debug
		'''
		self.debug(('self.',self,['StatusingProcessStr']))
		'''

		#Check
		if self.StatusingProcessStr!="":

			#call
			self.StatusedSnapshotStr=self.process(
				"ps -ef | grep "+self.StatusingProcessStr
			).ProcessedBashStr

			#debug
			'''
			self.debug(('self.',self,['StatusedSnapshotStr']))
			'''

			#map
			if self.StatusingProcessStr=='Python':

				#filter
				self.StatusedLineStrsList=SYS._filter(
						lambda __LineStr:
						SYS.PythonPathStr in __LineStr,
						self.StatusedSnapshotStr.split('\n')
					)
			else:

				#split
				self.StatusedLineStrsList=self.StatusedSnapshotStr.split('\n')

			#debug
			'''
			self.debug(
					[
						('self.',self,['StatusedLineStrsList']),

					]
				)
			'''
			
			#filter
			self.StatusedLineStrsList=SYS._filter(
					lambda __StatusedLineStr:
					__StatusedLineStr!='',
					self.StatusedLineStrsList
				)

			#call
			self.StatusedIdStrsList=map(
				lambda __LineStr:
				__LineStr.split()[1],
				self.StatusedLineStrsList	
			)

			#debug
			'''
	def recoverBefore(self,**_RecoveringVariablesDict):

		#debug
		self.debug('Start of the method')

		#If it was not yet setted
		if self.RecoveredDict=={}:

			#debug
			print('self.RetrievedFilteredRowedDictsList is ')
			SYS._print(self.FoundFilteredRowedDictsList)
			print('')

			if len(self.FoundFilteredRowedDictsList)==1:
				
				#debug
				print('It is good, there is one solution !')
				print('')

				#set the RecoveredDict
				self.RecoveredDict=self.FoundFilteredRowedDictsList[0]

			else:

				#debug
				print('Recoverer There are not multiple retrieved states')
				print('self.FoundFilteredRowedDictsList is ',self.FoundFilteredRowedDictsList)
				print('')

		#Update
		self.update(self.RecoveredDict.items())
	def do_scan(self):

		#set the ScannedGettingStrsList
		self.ScannedGetKeyStrsList=SYS.unzip(
			self.ScanningGridTuplesList,[0]
		)

		#Scan the values of this model
		self.ScannedValueVariablesTuplesList=list(
										itertools.product(*SYS.unzip(
										self.ScanningGridTuplesList,[1]
										)
									)
								)

		#debug
		self.debug(('self.',self,['ScannedGetKeyStrsList','ScannedValueVariablesTuplesList']))

		#map an update and a store for each combination
		map(
				lambda __ScannedValueVariablesTuple:
				self.update(
						zip(
							self.ScannedGetKeyStrsList, 
							__ScannedValueVariablesTuple
						)
				).setDoneVariables().collect(),
				self.ScannedValueVariablesTuplesList
			)
	def do_command(self):
		"""Collect with _GatheringKeyVariablesList and do a all sets for each with _UpdatingItemVariable"""

		#Check
		if self.CommandingGatherIsBool:

			#Get the GatheredVariablesList
			self.gather()

			#debug
			'''
			self.debug(
							('self.',self,[
									'CommandingUpdateList',
									'GatheringVariablesList',
									'GatheredVariablesList'
									]
							)
						)
			'''

			#Check
			if len(self.GatheredVariablesList)>0:

				#Just keep the values
				self.CommandingGraspVariablesList=SYS.flat(
					SYS.unzip(
						self.GatheredVariablesList,[1]
						)
				)

		#debug
		'''
		self.debug(("self.",self,['CommandingGraspVariablesList']))
		'''

		#Check for the order
		if self.CommandingOrderStr=="AllSetsForEach":

			#For each __GatheredVariable it is updating with _UpdatingItemVariable
			map(
					lambda __CommandedVariable:
					__CommandedVariable.update(self.CommandingUpdateList),
					self.CommandingGraspVariablesList
				)

		elif self.CommandingOrderStr=="EachSetForAll":

			#For each SettingTuple it is setted in _GatheredVariablesList
			map(
					lambda __SettingVariableTuple:
					map(
						lambda __CommandedVariable:
						__CommandedVariable.__setitem__(*__SettingVariableTuple),
						self.CommandingGraspVariablesList
						),
					self.CommandingUpdateList.items() 
					if hasattr(self.CommandingUpdateList,'items')
					else self.CommandingUpdateList
				)
	def do_recruit(self):
		
		#Check
		if type(self.VisitingBeforeUpdateList)!=list:
			self.VisitingBeforeUpdateList=[]

		#add
		self.VisitingBeforeUpdateList+=[
			(
				'PickingKeyVariablesList',['/']
			),
			(
				'ConcludingConditionVariable',
				self.RecruitingConcludeConditionVariable
			),
			(
				'cumulate',
				SYS.ApplyDictClass()
			)
		]

		#visit
		self.visit()

		#debug
		'''
		self.debug(('self.',self,['CumulatedVariablesList']))
		'''
		
		#flat
		self.RecruitedFlatCumulateVariablesList=SYS.filterNone(
			SYS.flat(
				self.CumulatedVariablesList
			)
		)
	def getSynapticRisePerturbationVariable(self,_PerturbationComplex):

		#debug
		'''
		self.debug(
			[
				('self.',self,[
						'StabilizedDecayTimeVariable',
					]),
				'_PerturbationComplex is '+str(_PerturbationComplex)
			]
		)
		'''

		#return
		return SYS.setMatrixArray(
					SYS.setMatrixArray(
						self.getSynapticDelayPerturbationVariable(_PerturbationComplex),
						1.+self.StabilizedDecayTimeVariable*_PerturbationComplex,
						np.ndarray.__div__,
						_AxisInt=1
					),
					1.+self.StabilizedRiseTimeVariable*_PerturbationComplex,
					np.ndarray.__div__,
					_AxisInt=1
				)
    def propertize_setModelingDescriptionTuplesList(self, _SettingValueVariable):

        # set
        self._ModelingDescriptionTuplesList = _SettingValueVariable

        # /###################/#
        # Update the ModelKeyStrsList
        #

        # extend
        self._ModelKeyStrsList = SYS.unzip(_SettingValueVariable, [0])

        # debug
        """
		self.debug(
			[
				'We have binded ModelingDescriptionTuplesList to ModelKeyStrsList',
				('self.',self,['ModelingDescriptionTuplesList'])
			]
		)
		"""

        # /###################/#
        # Look for items where it is a get dimension
        #

        # filter
        self.ModelDimensionTuplesList = map(
            lambda __DescriptionTuple: (__DescriptionTuple[0], __DescriptionTuple[2]),
            SYS._filter(lambda __DescriptionTuple: type(__DescriptionTuple[2]) in [list, tuple], _SettingValueVariable),
        )

        # debug
        """
def status(_ProcessStr):

	#call
	SnapshotStr=self.process(
		"ps -ef | grep "+_ProcessStr
	).ProcessedBashStr

	#Debug
	'''
	print('Processer')
	print('SnapshotStr is '+SnapshotStr)
	print('')
	'''

	#map
	if _ProcessStr=='Python':

		#filter
		LineStrsList=SYS._filter(
				lambda __LineStr:
				SYS.PythonPathStr in __LineStr,
				SnapshotStr.split('\n')
			)
	else:

		#split
		LineStrsList=SnapshotStr.split('\n')

	#debug
	'''
	print('Processer')
	print('LineStrsList is ')
	print(LineStrsList)
	print('')
	'''
	
	#filter
	LineStrsList=SYS._filter(
			lambda __LineStr:
			__LineStr!='',
			LineStrsList
		)

	#call
	IdStrsList=map(
		lambda __LineStr:
		__LineStr.split()[1],
		LineStrsList	
	)

	#debug
	'''
	print('Processer')
	print('IdStrsList is ')
	print(IdStrsList)
	print('')
	'''

	return ' '.join(map(str,IdStrsList))
	def mimic_set(self):
		""" """

		#debug
		'''
		self.debug(('self.',self,['SettingKeyVariable','SettingValueVariable']))
		'''

		#Check
		if type(self.SettingKeyVariable
			)==str:

			#Check
			if self.SettingKeyVariable.startswith(AttributionInstancePrefixStr):

				#debug
				'''
				self.debug('We are going to attribute to the instance')
				'''

				#Path
				self.attribute(
					SYS.deprefix(
						self.SettingKeyVariable,
						AttributionInstancePrefixStr
					),
					self.SettingValueVariable,
					_InstanceBool=True,
					_ClassBool=False
				)

				#Stop the setting
				return {'HookingIsBool':False}

			elif self.SettingKeyVariable.startswith(AttributionClassPrefixStr):

				#debug
				'''
				self.debug('We are going to attribute to the class')
				'''

				#Path
				self.attribute(
					SYS.deprefix(
						self.SettingKeyVariable,
						AttributionClassPrefixStr
					),
					self.SettingValueVariable,
					_InstanceBool=False,
					_ClassBool=True,
				)

				#Stop the setting
				return {'HookingIsBool':False}

			
		#Set and return 
		return BaseClass.set(self)
def getPropertizedVariableWithItemTuple(_ItemTuple):

	#Maybe it is already defined
	if 'PropertyInitVariable' in _ItemTuple[1]:
		return _ItemTuple[1]['PropertyInitVariable']
	else:

		#Return the default one associated with the type
		return SYS.getTypeClassWithTypeStr(SYS.getWordStrsListWithStr(_ItemTuple[0])[-1])
Esempio n. 11
0
def recordSimulation():

	#Use the global DataDict
	global DataDict

	#Record the MetaData Parameters
	DataDict.update(
						map(
								lambda ListedKeyString:
								(
									"*"+ListedKeyString,
									globals()[ListedKeyString]
								),
								map(
										lambda KeyString: 
										SYS.getSingularStringWithPluralString(KeyString.split("List")[0]),
										ScanDict.keys()
									)
							)
					)

	#Record the Data
	DataDict.update({

					"&MonitoredRateIntsList":MonitoredRateIntsList,
					"&RateFloatsArray":RateFloatsArray[MonitoredRateIntsList,:],
					"&WeigthsArray":WeigthsArray,
					"StatsDict":{
									"&MeanRateFloatsList":list(np.mean(RateFloatsArray,axis=1)),
									"&STDRateFloatsList":list(np.std(RateFloatsArray,axis=1))
								},
					"MonitoredFourierTransformsList":map(
															lambda FrequencyFloat:
															{	
																"*FrequencyFloat":FrequencyFloat,
																"MonitoredFourierComponentsDict":dict(
																map(
																	lambda IndexIntAndTuplesList:
																	("Monitored_"+str(MonitoredRateIntsList[IndexIntAndTuplesList[0]])+"Dict",dict(IndexIntAndTuplesList[1])),
							
																	enumerate(
																		map(
																				lambda MonitoredFourierComplexList:
																				[
																					("&AmplitudeFloatsList",abs(MonitoredFourierComplexList)),
																					("&PhaseFloatsList",map(lambda Complex:SYS.getArgumentFloatWithComplex(Complex),MonitoredFourierComplexList))
																				],
																				np.fft.fft(RateFloatsArray[MonitoredRateIntsList,:])
																			)
																		)
																	)
																)
															},
															np.arange(0.1,10.,5.)
															)
			})
	def retrieveAfter(self,**_RetrievingVariablesDict):

		#debug
		print('Joiner retrieveAfter method')
		print('self.RetrievedFilteredRowedDictsList is ')
		SYS._print(self.RetrievedFilteredRowedDictsList)
		print('self.JoinedRetrievingIndexesListsList is ')
		SYS._print(self.JoinedRetrievingIndexesListsList)
		print('self.JoinedJoinedListKeyStr is ')
		SYS._print(self.JoinedJoinedListKeyStr)
		print('')

		#Rebound the RetrievedFilteredRowedDictsList
		self.RetrievedFilteredRowedDictsList=filter(
														lambda __Variable:
														__Variable!=None,
														SYS.where(
							self.RetrievedFilteredRowedDictsList,
							self.JoinedRetrievingIndexesListsList
							)
						)

		#debug
		print('self.RetrievedFilteredRowedDictsList is ')
		SYS._print(self.RetrievedFilteredRowedDictsList)
		print('')
Esempio n. 13
0
def attest_insert():

	#Insert the default output
	Distance=SYS.DistanceClass(
		).update(
					[
						('IntsList',[4,5]),
						('PowerFloat',0.5)
					]
		).insert('Result'
		).update(
					[
						('IntsList',[4,5]),
						('PowerFloat',1.)
					]
		).insert(
		).update(
					[
						('IntsList',[4,5]),
						('PowerFloat',2.)
					]
		).insert(
		).update(
					[
						('IntsList',[1,2,3]),
						('PowerFloat',0.5)
					]
		).insert(
		).update(
					[
						('IntsList',[4,6]),
						('PowerFloat',1.)
					]
		).insert(
		).update(
					[
						('IntsList',[1,2,3]),
						('PowerFloat',1.)
					]
		).insert( 
		).update(
					[
						('IntsList',[0,1]),
						('PowerFloat',0.5)
					]
		).insert( 
		).hdfclose()

	#Return the object and the h5py
	return "\n\n\n\n"+SYS.represent(
			Distance
		)+'\n\n\n'+SYS.represent(
				os.popen('/usr/local/bin/h5ls -dlr '+Distance.HdformatingPathStr).read()
			)
Esempio n. 14
0
	def loadSimulations(self,**Kwargs):
		###H5PY PART !!!!!!!!
		#MetaDict And DataDict
		self.setDataDict()
		#Open the hdf5
		self.SimulationsH5pyFile=SYS.H5pyFileClass().update(
														{
															'FileString':ModelString,
															'FolderPathString':DataPathString
														});
		self.Simulations=self.SimulationsH5pyFile.FilePointer[SYS.getIdStringWithDict(self.DataDict)]
		self.SimulationsInt=len(self.Simulations['IFOutput']['&SpikesList']);

		#load the Outputs
		SimulationOutputs={}

		#Parse the data
		for SimulationInt in xrange(self.SimulationsInt):

			#Get the Data
			SimulationData=SYS.getListingDict(SYS.getDataDictWithDictAndIndexInt(self.Simulations,SimulationInt))

			#convert into numpy array
			for OutputKey in ['RateOutput','IFOutput']:
				SimulationOutputs[OutputKey]={}
				for Key in SimulationData[OutputKey].keys():
					SimulationOutputs[OutputKey][Key]=[]
					if type(SimulationData[OutputKey][Key]).__name__=="Dataset":
						SimulationOutputs[OutputKey][Key]=SimulationData[OutputKey][Key].value
					for ThingIdx in xrange(len(SimulationData[OutputKey][Key])):
						#if type(SimulationData[OutputKey][Key][ThingIdx])==list:
						if type(SimulationData[OutputKey][Key][ThingIdx]).__name__=="Dataset":
							SimulationOutputs[OutputKey][Key].append(SimulationOutputs[OutputKey][Key][ThingIdx].value);
						elif type(SimulationData[OutputKey][Key][ThingIdx])==dict:
							SimulationOutputs[OutputKey][Key].append({})
							for _Key in SimulationData[OutputKey][Key][ThingIdx].keys():
								SimulationOutputs[OutputKey][Key][ThingIdx][_Key]={}
								#if type(SimulationData[OutputKey][Key][ThingIdx][_Key])==list:
								if type(SimulationData[OutputKey][Key][ThingIdx][_Key]).__name__=="Dataset":
									#SimulationOutputs[OutputKey][Key][ThingIdx][_Key]=np.array(SimulationData[OutputKey][Key][ThingIdx][_Key]);
									SimulationOutputs[OutputKey][Key][ThingIdx][_Key]=SimulationData[OutputKey][Key][ThingIdx][_Key].value

			#print("end",SYS.getDictedDictWithVariable(SimulationOutputs))

			#put in the SimulationList
			self.SimulationsList.append(Simulation(SimulationOutputs['RateOutput'],SimulationOutputs['IFOutput']))

		#SYS._print(SYS.getDictedDictWithVariable(self.SimulationsList[0].__dict__))
		self.SimulationsH5pyFile.FilePointer.close()

		#Transfer inputs
		self.IFNetwork.RateOutput=self.SimulationsList[0].RateOutput
		self.IFNetwork.IFOutputsList=map(lambda SimulationInt:
							self.SimulationsList[SimulationInt].IFOutput,xrange(len(self.SimulationsList)))
	def findAfter(self,**_FindingVariablesDict):

		#debug
		self.debug('Start of the method')

		#debug
		self.debug(
					[
						('Are we going to do a where with the FoundFilteredRowedDictsList and the '),
						('filtering JoinedFindingTuplesList?'),
						('self.ModeledDict ',self.ModeledDict,[
																'ModelStr',
																'FoundFilteredRowedDictsList'
																]),
						("'JoinedFindingTuplesList' in self.ModeledDict is "+str(
							'JoinedFindingTuplesList' in self.ModeledDict))
					]
			)

		if 'JoinedFindingTuplesList' in self.ModeledDict:

			#debug
			self.debug(
						[
							'Ok we are going to do the where',
							"self.ModeledDict['JoinedFindingTuplesList'] is "+str(
								self.ModeledDict['JoinedFindingTuplesList'])
						]
					)

			#Where
			self.ModeledDict['FoundFilteredRowedDictsList']=SYS.filterNone(SYS.where(
							self.ModeledDict['FoundFilteredRowedDictsList'],
							self.ModeledDict['JoinedFindingTuplesList']
							)
			)

			#debug
			self.debug('Ok the where is done.')

		#debug
		self.debug(
					[
						'After intersection',
						('self.ModeledDict ',self.ModeledDict,[
															'ModelStr',
															'FoundFilteredRowedDictsList'
															]
														)
					]
				)

		#debug
		self.debug('End of the method')
Esempio n. 16
0
def attest_scan():

	#Scan
	Distance=SYS.DistanceClass(
		).scan('Result'
		).hdfclose()

	#Return the object and the h5py
	return "\n\n\n\n"+SYS.represent(
			Distance
		)+'\n\n\n'+SYS.represent(
				os.popen('/usr/local/bin/h5ls -dlr '+Distance.HdformatingPathStr).read()
			)
Esempio n. 17
0
	def do_scan(self):

		#<NotHook>
		#table first
		self.table()
		#</NotHook>

		#Check
		if len(self.ScanningRangeTuplesList)==0:

			#just insert
			self.insert()

		else:

			#set the ScannedGettingStrsList
			self.ScannedGetKeyStrsList=SYS.unzip(
				self.ScanningRangeTuplesList,[0]
			)

			#Scan the values of this model
			self.ScannedValueVariablesTuplesList=list(
											itertools.product(*SYS.unzip(
											self.ScanningRangeTuplesList,[1]
											)
										)
									)

			#Check
			if self.ScanningDatabaseKeyStr=="":
				self.ScanningDatabaseKeyStr=self.NodedDatabaseKeyStr

			#debug
			self.debug(('self.',self,[
				'ScanningDatabaseKeyStr',
				'ScannedGetKeyStrsList',
				'ScannedValueVariablesTuplesList']))
			
			#map an update and a store for each combination
			self.ScannedRetrieveListsList=map(
					lambda __ScannedValueVariablesTuple:
					getattr(
						self.NodedDatabaseParentPointer.update(
							zip(
								self.ScannedGetKeyStrsList, 
								__ScannedValueVariablesTuple
							)
						).setDoneVariables(),'NodedDatabaseOrderedDict'
						)[self.ScanningDatabaseKeyStr].insert().pick(['TabledInt','RowedIndexInt']),
					self.ScannedValueVariablesTuplesList
				)
Esempio n. 18
0
	def do_grid(self):
	
		#just for init
		self.store(_InsertIsBool=False)

		#grid before in all the components
		self.GridedComponentRetrieveListsList=map(
				lambda __DeriveGrider:
				__DeriveGrider.grid().GridedScanRetrieveListsList,
				self.OrganizedComponentCollectionOrderedDict.values()
			)

		#debug
		self.debug(('self.',self,['GridedComponentRetrieveListsList']))

		#set the GridedGettingStrsList
		self.GridedGetKeyStrsList=SYS.unzip(
			self.GridingScanTuplesList,[0]
		)

		#scan the values of this model
		self.GridedValueVariablesTuplesList=list(
				itertools.product(
					*SYS.unzip(
						self.GridingScanTuplesList,[1]
					)
				)
		)

		#set
		self.StoringInsertIsBool=True
		
		#map an update and a store for each combination
		self.GridedScanRetrieveListsList=map(
				lambda __GridedValueVariablesTuple:
				self.update(
					zip(
						self.GridedGetKeyStrsList, 
						__GridedValueVariablesTuple
					)
				).store(
				).OrganizedTopDeriveDatabaserVariable.pick(
					['TabledInt','RowedIndexInt']
				),
				self.GridedValueVariablesTuplesList
			)

		#debug
		'''
Esempio n. 19
0
	def push(self):

		#Bind with ModeString setting
		if SYS.sys.modules['os'].path.isfile(self.FilePathString):

			self['ModeString']="a"

		else:

			self['ModeString']="w"

		if self.FilePointer!=None:

			#Get the DictedDataDict
			SYS.setDatabaseFileWithCommitStringAndDictatingDict(self.FilePointer,self.CommitString,self.DictatingDict)
Esempio n. 20
0
def attest_recover():

	Distance=SYS.DistanceClass(
		).update(
					[
						('/App_Model_ParameterizingDict/FindingTuplesList',[
													('IntsList',(SYS.getIsEqualBool,[4,5])),
													('PowerFloat',(SYS.getIsEqualBool,1.))
											]),
						('/App_Model_ResultingDict/update',
							[
								('MergingTuplesList',
												[
													('UnitsInt',(operator.eq,2))
												]
											),
								('FindingTuplesList',[
													('DistanceFloat',(operator.gt,30.)),
													#('__IntsList',(SYS.getIsEqualBool,[4,5])),
											])
							]
						)
					]
		).recover('Result'
		).hdfclose()

	#Return the object and the h5py
	return "\n\n\n\n"+SYS.represent(
			Distance
		)
def getDoerStrWithKeyStr(_KeyStr):

	#Check
	if len(_KeyStr)>0:

		#Split the Str into words
		WordStrsList=SYS.getWordStrsListWithStr(_KeyStr)
		if len(WordStrsList)>0:
			PrefixWordStr="".join(WordStrsList[:-1])
			LastWordStr=WordStrsList[-1]

			#debug
			'''
			print('Doer getDoerStrWithKeyStr')
			print('PrefixWordStr is '+str(PrefixWordStr))
			print('LastWordStr is '+str(LastWordStr))
			print('')
			'''

			if LastWordStr[0] in ["P","p"] and LastWordStr[1:]=="roperty":
				return PrefixWordStr+LastWordStr[0]+"ropertize"

		#Default return
		return _KeyStr+'er'

	#Return ""
	return ""
Esempio n. 22
0
    def do_transmit(self):

        # debug
        """
		self.debug(('self.',self,['TransmittingSelfIsBool']))
		"""

        # Check
        if self.TransmittingSelfIsBool:

            # update
            self.update(self.TransmittingUpdateList)

            # map
        self.TransmittedVariablesList = SYS.flat(
            map(
                lambda __TransmittingCollectionStr: map(
                    lambda __DeriveNoderPointer: __DeriveNoderPointer.CatchToPointVariable,
                    getattr(self, __TransmittingCollectionStr + "CollectionOrderedDict").values(),
                )
                if hasattr(self, __TransmittingCollectionStr + "CollectionOrderedDict")
                else [],
                self.TransmittingCollectionStrsList,
            )
        )

        # command
        self.command(self.TransmittingUpdateList, self.TransmittedVariablesList, _GatherIsBool=False)
Esempio n. 23
0
	def do_array(self):
		
		#init
		self.ProducedDeriveNodersList=[self]

		#map
		self.ArrayedDeriveNodersListsList=map(
				lambda __ArrayingCollectionStr,__ArrayingNodeKeyStrsList,__ArrayingCollectionClass,__ArrayingUpdateVariable:
				self.__setitem__(
					'ProducedDeriveNodersList',
					SYS.flat(
						map(
							lambda __ProducedDeriveNoder:
							__ProducedDeriveNoder.produce(
								__ArrayingCollectionStr,
								__ArrayingNodeKeyStrsList,
								__ArrayingCollectionClass,
								__ArrayingUpdateVariable
							).ProducedDeriveNodersList,
							self.ProducedDeriveNodersList,
						)
					)
				).ProducedDeriveNodersList,
				self.ArrayingCollectionStrsList,
				self.ArrayingNodeKeyStrsListsList,
				self.ArrayingCollectionClassesList,
				self.ArrayingUpdateVariablesList
			)
Esempio n. 24
0
	def mimic_row(self):

		#debug
		'''
		self.debug(('self.',self,self.__class__.DoingAttributeVariablesOrderedDict.keys()))
		'''

		#Put all the GettingStrsList in the identifying container
		if self.FeaturingAllBool:

			#debug
			'''
			self.debug('Set the RowingGetStrsList with all the DatabasingGetStrs')
			'''
			
			#set 
			self['Attr_RowingGetStrsList']=SYS.unzip(
													self.DatabasingSealTuplesList,
													[0]
												)

			#debug
			'''
			self.debug(('self.',self,['RowingGetStrsList','DatabasingSealTuplesList']))
			'''
			
		#<NotHook>
		#row then
		BaseClass.row(self)
Esempio n. 25
0
	def do_pool(self):

		#debug
		self.debug(('self.',self,[
									'PoolingSubsetLengthInt',
									'PoolingSetLengthInt'
								]))

		#Combine
		self.PooledIntsListsList=list(
			itertools.combinations(
				xrange(self.PoolingSetLengthInt),
				self.PoolingSubsetLengthInt
			)
		)
		
		#debug
		'''
		self.debug(('self.',self,['PooledIntsListsList']))
		'''

		#filter only the one with the pitch 0
		self.PooledIntsListsList=SYS._filter(
			lambda __PooledInt:
			__PooledInt[0]==0,
			self.PooledIntsListsList
		)
	def retrieveAfter(self,**_RetrievingVariablesDict):

		#debug
		self.debug('Start of the method')

		#debug
		self.debug("self.ModeledDict['RetrievingIndexesList'] is "+str(self.ModeledDict['RetrievingIndexesList']))

		#Alias
		RetrievedTuplesList=self.ModeledDict['RetrievedTuplesList']

		#debug	
		DebuggedStr='RetrievedTuplesList is '+str(RetrievedTuplesList)
		self.debug(DebuggedStr)

		#Definition the RetrievingIndexesListIndexInt
		if len(RetrievedTuplesList)>0:

			#Get the Index 
			RetrievingIndexesListIndexInt=SYS.unzip(RetrievedTuplesList,[0]).index(
				self.ModeledDict['JoinedRetrievingIndexesListKeyStr'])

			#set and retrieve for the joined model
			self.ModeledDict['RetrievingIndexesList']=RetrievedTuplesList[RetrievingIndexesListIndexInt][1]
			self.retrieve(self.ModeledDict['JoinedModeledDict']['ModelStr'])

		#debug
		self.debug('End of the method')
Esempio n. 27
0
	def mimic_get(self):

		#Check
		if type(self.GettingKeyVariable)==str:

			#Check
			if self.GettingKeyVariable.startswith(ConnectGetSetPrefixStr):

				#debug
				'''
				self.debug(
						[
							'We get connect here',
							('self.',self,['GettingKeyVariable'])
						]
					)
				'''

				#connect
				self.connect(
						SYS.deprefix(
							self.GettingKeyVariable,
							ConnectGetSetPrefixStr
						)
					)

				#return
				return {'HookingIsBool':False}

		#set
		BaseClass.get(self)
Esempio n. 28
0
	def recordSample(self):

		#debug
		'''
		self.debug(
			[
				'This is the sample record level',
				('self.',self,[
					'RecordingLabelVariable'
				])
			]
		)
		'''

		#/##################/#
		# Build the colors
		#

		#Check
		if self.RecordingLabelVariable!=None:

			#get		
			self.RecordedColorTuplesList=SYS.getColorTuplesList(
				'black',
				self.RecordingColorStr,
				len(self.RecordingLabelVariable)+3,
				_PlotBool=False
			)[3:]

			#reverse
			self.RecordedColorTuplesList.reverse()

			#debug
			'''
	def mapPoint(self):

		#debug
		self.debug(
				[
					'We map point here',
					'PointMapVariable is ',
					SYS._str(self.PointMapVariable)
				]
			)

		#map
		map(
				lambda __ElementVariable:
				self.point(
					*__ElementVariable
				)
				if type(__ElementVariable) in [list,tuple]
				else self.point(
					__ElementVariable
				),
				self.PointMapVariable if type(
					self.PointMapVariable
				)==list else self.PointMapVariable.items()
			)
	def mimic_set(self):

		#Definition
		OutputDict={'HookingIsBool':True}

		#debug
		'''
		self.debug(('self.',self,['SettingKeyVariable']))
		'''

		#Check
		if type(
			self.SettingKeyVariable
		)==str and self.SettingKeyVariable.startswith(TeamChildPrefixStr):

			#debug
			'''
			self.debug('We team here')
			'''
			
			#team
			self.team(
				SYS.deprefix(
					self.SettingKeyVariable,
					TeamChildPrefixStr
				),
				self.SettingValueVariable
			)

			#Stop the setting
			OutputDict["HookingIsBool"]=False 

		#Call the parent get method
		if OutputDict['HookingIsBool']:
			return BaseClass.set(self)
Esempio n. 31
0
#ImportModules
import ShareYourSystem as SYS

#Definition 
MyController=SYS.ControllerClass(
		**{
			'FolderingPathStr':SYS.Tabler.LocalFolderPathStr,
			'ControllingModelClassVariable':SYS.TabularerClass
		}
	).get(
		'/-Models/|Things'
	)


#Build a structure with a database
SYS.set(
		MyController['/-Models/|Things'].ModeledMongoCollection,
		[
			('remove',{}),
			('insert',{'MyStr':"hello"})
		]
)

#print
print('mongo db is : \n'+SYS._str(MyController.pymongoview()))

#print
print('MyController is ')
SYS._print(MyController)