当前位置: 首页>>代码示例>>Python>>正文


Python ShareYourSystem.represent方法代码示例

本文整理汇总了Python中ShareYourSystem.represent方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.represent方法的具体用法?Python ShareYourSystem.represent怎么用?Python ShareYourSystem.represent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ShareYourSystem的用法示例。


在下文中一共展示了ShareYourSystem.represent方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: attest_insert

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
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()
			)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:56,代码来源:__init__.py

示例2: attest_scan

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
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()
			)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:15,代码来源:__init__.py

示例3: attest_recover

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
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
		)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:32,代码来源:__init__.py

示例4: attest_retrieve

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
def attest_retrieve():
	Distance=SYS.DistanceClass(
		).__setitem__('/App_Model_ResultingDict/RetrievingIndexesList',(0,2)
		).retrieve('Result'
		).hdfclose()

	#Return the object and the h5py
	return "\n\n\n\n"+SYS.represent(
			Distance
		)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:12,代码来源:__init__.py

示例5: attest_merge

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
def attest_merge():

	#Retrieve
	Distance=SYS.DistanceClass(
		).merge('Result',
						[
							('UnitsInt',(operator.eq,2)),
						]
		).hdfclose()

	#Return the object and the h5py
	return "\n\n\n\n"+SYS.represent(
			Distance
		)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:16,代码来源:Distance+copy.py

示例6: attest_model

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
def attest_model():

	#Build Hdf groups
	Modeler=SYS.ModelerClass().update(
								[
									('App_Model_ParameterizingDict',
											{
												'ColumningTuplesList':
												[
													('MyInt',tables.Int64Col()),
													('MyStr',tables.StrCol(10)),
													('MyIntsList',tables.Int64Col(shape=3))
												]
											}
									)
								]
								).model('Parameter')
																
	#Return the object itself
	return 'Attest gives : \n\n\n\n'+SYS.represent(
							Modeler
						)+'\n\n\n\n'+SYS.represent(
							Modeler.DatabasedModelClass.__dict__
						)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:26,代码来源:Modeler+copy.py

示例7: attest_retrieve

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
def attest_retrieve():

	#Retrieve
	Distance=SYS.DistanceClass(
		).update(
					[
						('/App_Model_ResultingDict/MergingTuplesList',
												[
													('UnitsInt',(operator.eq,2))
												]
											),
						('/App_Model_ResultingDict/RetrievingIndexesListsList',[
													('DistanceFloat',(operator.gt,30.)),
													('__IntsList',(SYS.getIsEqualBool,[4,5])),
													('ParameterizedJoinedList',(SYS.getIsEqualBool,[0,1]))
											])
					]
		).retrieve('Result'
		).hdfclose()

	#Return the object and the h5py
	return "\n\n\n\n"+SYS.represent(
			Distance
		)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:26,代码来源:Distance+copy.py

示例8: attest_join

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
def attest_join():

	#Build Hdf groups
	Joiner=SYS.JoinerClass().hdformat().update(
								[
									(
										'App_Structure_ChildJoiner1',
										SYS.JoinerClass().update(
										[
											('App_Model_ParameterizingDict',
														{
															'ColumningTuplesList':
															[
																('MyIntsList',tables.Int64Col(shape=2))
															]
														}
											),
											('MyIntsList',[2,4]),
											('App_Model_ResultingDict',
														{
															'ColumningTuplesList':
															[
																('MyInt',tables.Int64Col())
															]
														}
											),
											('MyInt',1)
										])
									),
									('App_Model_ParameterizingDict',
														{
															'ColumningTuplesList':
															[
																('MyStr',tables.StrCol(10)),
															]
														}
									),
									('MyStr',"hello")
								]	
							).walk(
										[
											'StructuredOrderedDict.items()'
										],
										**{
												'BeforeUpdateList':
												[
													('parentize',{'ArgsVariable':"Structure"}),
													('group',{'ArgsVariable':""}),
													('model',{'ArgsVariable':"Parameter"}),
													('table',{'ArgsVariable':""}),
													('row',{'ArgsVariable':""}),
													('insert',{'ArgsVariable':""})
												]
											}
									).update(
										[
											
											('App_Model_ResultingDict',
												{
													'ColumningTuplesList':
													[
														('MyFloat',tables.Float32Col()),
														('MyFloatsList',tables.Float32Col(shape=3))
													],
													'JoiningTuple':("Structure","Parameter")
												}
											),
											('MyFloat',0.1),
											('MyFloatsList',[2.3,4.5,1.1])
										]
									).model("Result"		
									).table(
									).row(
									).insert("Result"
									).hdfclose()

	#Return the object itself
	return "Objects is : \n"+SYS.represent(
		Joiner
		)+'\n\n\n'+SYS.represent(os.popen('/usr/local/bin/h5ls -dlr '+Joiner.HdformatingPathStr
		).read())
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:83,代码来源:Joiner+copy+4.py

示例9: findBefore

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
	def findBefore(self,**_FindingVariablesDict):

		#debug
		self.debug('Find the joined model')

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

		#Check that JoinedModelStr is good
		if JoinedModelStr!="":

			#Copy the ModeledDict
			CopiedModeledDict=copy.copy(self.ModeledDict)

			#debug
			self.debug(
						[
							'First we are going to find in the joined model',
							'JoinedModelStr is '+str(JoinedModelStr)
						]
					)

			#Find
			self.ModeledDict=self.ModeledDict['JoinedModeledDict']
			self.find()
			JoinedModeledDict=self.ModeledDict
			self.ModeledDict=CopiedModeledDict

			#debug
			self.debug(
						[
							'Find in the joined model is done',
							'JoinedModelStr is '+str(JoinedModelStr)
						]
					)

			#debug
			self.debug('Ok we have found the joined model')

			#Copy the FoundFilteredRowedDictsList
			JoinedFoundFilteredRowedDictsList=JoinedModeledDict['FoundFilteredRowedDictsList']

			#debug
			self.debug(
						[
							'JoinedFoundFilteredRowedDictsList is ',
							SYS.represent(JoinedFoundFilteredRowedDictsList)
						]
			)

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

			#Make the TabledInt and the RowInt as a <JoinedModelStr>RetrievingIndexesList
			map(
					lambda __JoinedFoundFilteredRowedDict:
					__JoinedFoundFilteredRowedDict.__setitem__(
						JoinedRetrievingIndexesListKeyStr,
						[
							__JoinedFoundFilteredRowedDict['TabledInt'],
							__JoinedFoundFilteredRowedDict['RowInt'],
						]
					),
					JoinedFoundFilteredRowedDictsList
				)

			#set the JoinedFindingTuplesList
			JoinedFindingTuplesList=[
						(
							JoinedRetrievingIndexesListKeyStr,
							(
								SYS.getIsInListBool,
								map(
										lambda __JoinedFoundFilteredRowedDict:
										[
											__JoinedFoundFilteredRowedDict['TabledInt'],
											__JoinedFoundFilteredRowedDict['RowInt'],
										],
										JoinedFoundFilteredRowedDictsList
									)
							)
					)
				]

			#debug
			self.debug(
						[
							'JoinedFindingTuplesList is',
							SYS.represent(JoinedFindingTuplesList)
						]
					)

		else:

			#set an default empty
			JoinedFindingTuplesList=[]

		#debug
		self.debug(
					[
#.........这里部分代码省略.........
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:103,代码来源:Joiner+copy+4.py

示例10: rowAfter

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]

#.........这里部分代码省略.........
					]
				)

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

		#Check
		if len(JoinedModeledDict)>0:

			#debug
			self.debug("Ok there is some not empty JoinedModeledDict here")

			#set JoinedRetrievingIndexesListKeyStr
			JoinedRetrievingIndexesListKeyStr=self.ModeledDict['JoinedRetrievingIndexesListKeyStr']

			#Definition the GettingStrsList and the GettedVariablesList
			if 'ColumningTuplesList' in JoinedModeledDict:

				#debug
				self.debug('Check that this joined row is a new row in the table or not')

				#Get the GettingStrsList and GettedVariablesList
				GettingStrsList=SYS.unzip(JoinedModeledDict['ColumningTuplesList'],[0])
				GettedVariablesList=self.pick(GettingStrsList)

				#Check if it was already rowed
				IsRowedBoolsList=map(
						lambda __Row:
						all(
							map(
									lambda __GettingStr,__GettedVariable:
									SYS.getIsEqualBool(__Row[__GettingStr],__GettedVariable),
									GettingStrsList,
									GettedVariablesList
								)
						),
						JoinedModeledDict['TabledTable'].iterrows()
					)					

				#debug
				self.debug(
							[
								'self.StructuredKeyStr is '+str(
									self.StructuredKeyStr) if hasattr(self,'StructuredKeyStr') else "",
								'IsRowedBoolsList is '+str(IsRowedBoolsList)
							]
						)

				#If it is rowed then set the JoinedRetrievingIndexesList
				try:
					RowInt=IsRowedBoolsList.index(True)
				except ValueError:
					RowInt=-1

				#debug
				self.debug('So the corresponding RowInt is '+str(RowInt))

				#set the RowInt
				self.ModeledDict['JoinedOrderedDict'][JoinedRetrievingIndexesListKeyStr][1]=RowInt


			#Alias
			JoinedOrderedDict=self.ModeledDict['JoinedOrderedDict']
			JoinedRetrievingIndexesList=self.ModeledDict['JoinedOrderedDict'][JoinedRetrievingIndexesListKeyStr]
			JoinedNodifiedNodeStr=self.ModeledDict['JoinedNodifiedNodeStr']
			JoinedNodifiedNodedStr=self.ModeledDict['JoinedNodifiedNodedStr']

			#Give the JoinedRetrievingIndexesList to itself
			JoinedOrderedDict.__setitem__(
				JoinedRetrievingIndexesListKeyStr,
				JoinedRetrievingIndexesList
			)

			#debug
			self.debug(
						[
							'JoinedOrderedDict is now',
							SYS.represent(JoinedOrderedDict)
						]
					)

			#Give to the parent
			if JoinedNodifiedNodeStr!="":
				ParentPointer=getattr(
										self,
										JoinedNodifiedNodedStr+'ParentPointer'
							)
				if ParentPointer!=None:
					ParentPointer['App_Model_'+ModelingStr+'Dict']['JoinedOrderedDict'][
							getattr(
									self,
									JoinedNodifiedNodedStr+'KeyStr'
									)+JoinedRetrievingIndexesListKeyStr
							]=JoinedRetrievingIndexesList

			#Update the self.RowedIdentifiedOrderedDic
			self.ModeledDict['RowedIdentifiedOrderedDict'].update(JoinedOrderedDict)

		#debug
		self.debug('End of the method')
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:104,代码来源:Joiner+copy+4.py

示例11: attest_recover

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
def attest_recover():

	#Bound an output method
	def outputAfter(_Recoverer):
		_Recoverer.MulInt=_Retriever.FirstInt*_Retriever.SecondInt
	SYS.RecovererClass.HookingMethodStrToMethodsListDict['outputAfter']=[outputAfter]

	#Retrieve
	Recoverer=SYS.RecovererClass(
		).update(
					[
						('FirstInt',0),
						('SecondInt',0),
						('App_Model_ParameterizingDict',{
											'ColumningTuplesList':
											[
												#ColumnStr 	#Col 	
												('FirstInt',	tables.Int64Col()),
												('SecondInt',	tables.Int64Col())
											],
											'IsFeaturingBool':True,
										}),
						('App_Model_ResultingDict',{
											'ColumningTuplesList':
											[
												#ColumnStr 	#Col 	
												('MulInt',	tables.Int64Col())
											],
											'JoiningTuple':("","Parameter")
										})
					]
		).update(
					[
						('FirstInt',1),
						('SecondInt',2)
					]
		).insert('Result'
		).update(
					[
						('FirstInt',1),
						('SecondInt',3)
					]
		).insert(
		).update(
					[
						('FirstInt',2),
						('SecondInt',2)
					]
		).insert(
		).update(
					[
						('FirstInt',2),
						('SecondInt',3)
					]
		).insert(
		).update(
					[
						('FirstInt',3),
						('SecondInt',3)
					]
		).insert(
		).recover(
					'Result'	
		).hdfclose()

	#Return the object and the h5py
	return "\n\n\n\n"+SYS.represent(
			Retriever
		)+'\n\n\n'+SYS.represent(
				os.popen('h5ls -dlr '+Retriever.HdformatingPathStr).read()
			)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:73,代码来源:Recoverer+copy.py

示例12: rowAfter

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
	def rowAfter(self,**_RowingVariablesList):

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

		#debug
		DebuggingStr="self.ModeledDict['ModelStr'] is "+str(self.ModeledDict['ModelStr'])
		DebuggingStr+='\nWe are going to check if this model is already inserted...'
		self.debug(DebuggingStr)

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

		#Check
		if JoinedModeledDict!={}:

			#set JoinedRetrievingIndexesListKeyStr
			JoinedRetrievingIndexesListKeyStr=self.ModeledDict['JoinedRetrievingIndexesListKeyStr']

			#Definition the GettingStrsList and the GettedVariablesList
			if 'ColumningTuplesList' in JoinedModeledDict:

				#debug
				self.debug('Check that this row is a new row in the table or not')

				#Get the GettingStrsList and GettedVariablesList
				GettingStrsList=SYS.unzip(JoinedModeledDict['ColumningTuplesList'],[0])
				GettedVariablesList=self.pick(GettingStrsList)

				#Check if it was already rowed
				IsRowedBoolsList=map(
						lambda __Row:
						all(
							map(
									lambda __GettingStr,__GettedVariable:
									SYS.getIsEqualBool(__Row[__GettingStr],__GettedVariable),
									GettingStrsList,
									GettedVariablesList
								)
						),
						JoinedModeledDict['TabularedTable'].iterrows()
					)					

				#debug
				if hasattr(self,'StructuredKeyStr'):
					self.debug('self.StructuredKeyStr is '+str(self.StructuredKeyStr))
				self.debug('IsRowedBoolsList is '+str(IsRowedBoolsList))

				#If it is rowed then set the JoinedRetrievingIndexesList
				try:
					RowInt=IsRowedBoolsList.index(True)
				except ValueError:
					RowInt=-1

				#debug
				self.debug('So the corresponding RowInt is '+str(RowInt))

				#set the RowInt
				self.ModeledDict['JoinedOrderedDict'][JoinedRetrievingIndexesListKeyStr][1]=RowInt


			#Alias
			JoinedOrderedDict=self.ModeledDict['JoinedOrderedDict']
			JoinedRetrievingIndexesList=self.ModeledDict['JoinedOrderedDict'][JoinedRetrievingIndexesListKeyStr]
			JoinedNodifiedNodeStr=self.ModeledDict['JoinedNodifiedNodeStr']

			#Give the JoinedRetrievingIndexesList to itself
			JoinedOrderedDict.__setitem__(
				JoinedRetrievingIndexesListKeyStr,
				JoinedRetrievingIndexesList
			)

			#debug
			self.debug(
						[
							'JoinedOrderedDict is now',
							SYS.represent(JoinedOrderedDict)
						]
					)

			#Give to the parent
			if JoinedNodifiedNodeStr!="":
				ParentPointer=getattr(
										self,
										JoinedNodifiedNodedStr+'ParentPointer'
							)
				if ParentPointer!=None:
					ParentPointer['App_Model_'+ModelingStr+'Dict']['JoinedOrderedDict'][
							getattr(
									self,
									JoinedNodifiedNodedStr+'KeyStr'
									)+JoinedRetrievingIndexesListKeyStr
							]=JoinedRetrievingIndexesList

			#Update the self.RowedIdentifiedOrderedDic
			self.ModeledDict['RowedIdentifiedOrderedDict'].update(JoinedOrderedDict)

		#debug
		self.debug('End of the method')
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:101,代码来源:Joiner+copy+3.py

示例13: find

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import represent [as 别名]
	def find(self,**_KwargVariablesDict):

		#Check that JoiningDatabaseKeyStr is good
		if JoiningDatabaseKeyStr!="":

			#Find
			self.JoinedDeriveDatabaserPointer.find()

			#debug
			self.debug('Ok we have found the joined model')

			#Copy the FoundFilteredRowedDictsList
			JoinedFoundFilteredRowedDictsList=self.JoinedDeriveDatabaserPointer['FoundFilteredRowedDictsList']

			#debug
			self.debug(
						[
							'JoinedFoundFilteredRowedDictsList is ',
							SYS.represent(JoinedFoundFilteredRowedDictsList)
						]
			)

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

			#Make the TabledInt and the RowInt as a <JoiningDatabaseKeyStr>RetrievingIndexesList
			map(
					lambda __JoinedFoundFilteredRowedDict:
					__JoinedFoundFilteredRowedDict.__setitem__(
						JoinedRetrievingIndexesListKeyStr,
						[
							__JoinedFoundFilteredRowedDict['TabledInt'],
							__JoinedFoundFilteredRowedDict['RowInt'],
						]
					),
					JoinedFoundFilteredRowedDictsList
				)

			#set the JoinedFindingTuplesList
			JoinedFindingTuplesList=[
						(
							JoinedRetrievingIndexesListKeyStr,
							(
								SYS.getIsInListBool,
								map(
										lambda __JoinedFoundFilteredRowedDict:
										[
											__JoinedFoundFilteredRowedDict['TabledInt'],
											__JoinedFoundFilteredRowedDict['RowInt'],
										],
										JoinedFoundFilteredRowedDictsList
									)
							)
					)
				]

			#debug
			self.debug(
						[
							'JoinedFindingTuplesList is',
							SYS.represent(JoinedFindingTuplesList)
						]
					)

		else:

			#set a default empty
			JoinedFindingTuplesList=[]

		#debug
		self.debug(
					[
						('self.ModeledDict',self.ModeledDict,['ModelStr','FoundRowDictsList'])
					]
				)

		#Put them in the ModeledDict
		LocalVars=vars()
		map(
				lambda __GettingStr:
				self.ModeledDict.__setitem__(__GettingStr,LocalVars[__GettingStr]),
				[
					'JoinedFindingTuplesList',
				]
			)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:87,代码来源:__init__+copy.py


注:本文中的ShareYourSystem.represent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。