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


Python ShareYourSystem.sum方法代码示例

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


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

示例1: getDoing

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import sum [as 别名]
def getDoing(_InstanceVariable,_DoClassVariable=None):

	#check
	DoClassesList=SYS.GetList(_DoClassVariable,SYS)
	if len(DoClassesList)==0:
		DoClassesList=_InstanceVariable.__class__.MroDoerClassesList

	#Debug
	"""
	print('l 83 Doer')
	print('DoClassesList is ',DoClassesList)
	print('')
	"""

	#return
	return collections.OrderedDict(
		SYS.sum(
			map(
				lambda __DoClass:
				zip(
					__DoClass.DoingAttributeVariablesOrderedDict.keys(),
				map(
						lambda __DoneKeyStr:
						getattr(_InstanceVariable,__DoneKeyStr),
						__DoClass.DoingAttributeVariablesOrderedDict.keys()
					)
				),
				DoClassesList
			)
		)
	)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:33,代码来源:__init__.py

示例2: mimic_get

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

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

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

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

				#split
				AddGetKeyStrsList=self.GettingKeyVariable.split(CommandAddStr)[1:]

				#debug
				'''
				self.debug(
					[
						'We map get',
						'AddGetKeyStrsList is '+str(AddGetKeyStrsList) 
					]
				)
				'''
				
				#map get
				AddVariablesList=self[
						Getter.GetMapStr
					](*AddGetKeyStrsList).ItemizedMapValueVariablesList

				#debug
				'''
				self.debug(
					[
						'We sum now',
						'AddVariablesList is '+SYS._str(AddVariablesList) 
					]
				)	
				'''

				#map get
				self.GettedValueVariable=SYS.sum(AddVariablesList)

				#return
				return {'HookingIsBool':False}

		#return
		return BaseClass.get(self)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:55,代码来源:__init__+copy+3.py

示例3: viewNetwork

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

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

		#set log
		ViewedPhaseChartVariable.PyplotingChartVariable=[
				('plot',{
					'#liarg':[	
							xlimList,
							[0.,0.]
						],
					'#kwarg':{
							'linestyle':'--',
							'linewidth':1,
							'color':"black"
						}
					}

				),
				('set_xscale','log'),
				('set_xlim',xlimList),
				('set_xlabel',"$frequency (Hz)$"),
				('set_ylim',yLimPhaseList),
				('set_ylabel',"$phase$"),
				('set_yticks',yTickPhaseList),
				('set_yticklabels',map(lambda __Float:'$'+str(__Float)+'$',yTickPhaseList))
			]

		#
		# Plot max but just (for the first)
		#

		#map
		ViewedAmplitudeDrawVariable.PyplotingDrawVariable += SYS.sum(map(
			lambda __IndexInt:
			map(
				lambda __FourierMaxTuple:
				('plot',{
					'#liarg':[
						[__FourierMaxTuple[0]]*2,
						yLimAmplitudeList
					],
					'#kwarg':{
							'linestyle':'--',
							'linewidth':1,
							#'color':self.ViewingColorStrsList[__IndexInt]
							'color':"black"
						}
				}),
				self.TransferedPeakVariable[__IndexInt]
			),
			range(len(self.TeamDict['Populations'].ManagementDict))[:1]
		))

		#map
		'''
		ViewedPhaseDrawVariable.PyplotingDrawVariable += SYS.sum(map(
			lambda __IndexInt:
			map(
				lambda __FourierMaxTuple:
				('plot',{
					'#liarg':[
						[__FourierMaxTuple[0]]*2,
						yLimPhaseList
					],
					'#kwarg':{
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:70,代码来源:__init__.py

示例4: setDefaultMutable

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import sum [as 别名]
def setDefaultMutable(
	_InstanceVariable,
	_ClassVariable,
	_AttributeKeyVariable=None,
	**_KwargVariablesDict
):
	
	#get
	DefaultClassesList=SYS.GetList(_ClassVariable,SYS)

	#Set
	if 'ForceSetIsBool' in _KwargVariablesDict:
		ForceSetIsBool=_KwargVariablesDict['ForceSetIsBool']
	else:
		ForceSetIsBool=False

	#/#################/#
	# Get all the attribute to default set again and filter 
	# the ones that have not the right
	#

	#Check
	if _AttributeKeyVariable==None:
		AttributeKeyStrsList=SYS.sum(
			map(
				lambda __DefaultClass:
				__DefaultClass.DefaultSpecificKeyStrsList,
				DefaultClassesList
			)
		)
	elif type(_AttributeKeyVariable)!=list:
		AttributeKeyStrsList=[AttributeKeyVariable]
	else:
		AttributeKeyStrsList=_AttributeKeyVariable
		
	#/################/#
	# map an init for the mutable variables by detecting them at the level of the class 
	# they are None
	#

	#map
	TypeClassesList=map(
			lambda __AttributeKeyStr:
			SYS.getTypeClassWithTypeStr(
				SYS.getTypeStrWithKeyStr(__AttributeKeyStr)
			)
			if (
					SYS.getIsNoneBool(
						getattr(
							_InstanceVariable,
							__AttributeKeyStr
						)
					) 
					if ForceSetIsBool==False 
					else True
				)
			and getattr(
				_InstanceVariable.__class__,
				__AttributeKeyStr
			)==None
			else None.__class__,
			AttributeKeyStrsList
	)

	#debug
	'''
	print('l 122 Defaultor')
	print('AttributeKeyStrsList is '+str(AttributeKeyStrsList))
	print('TypeClassesList is '+str(TypeClassesList))
	print('')
	'''

	#set in the instance
	map(
			lambda __AttributeKeyStr,__TypeClass:
			setattr(
					_InstanceVariable,
					__AttributeKeyStr,
					__TypeClass()
			)
			if __TypeClass!=None.__class__ 
			else None,
			AttributeKeyStrsList,
			TypeClassesList
	)

	#return 
	return _InstanceVariable
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:90,代码来源:__init__+copy+2.py

示例5: setDefault

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import sum [as 别名]
def setDefault(
	_InstanceVariable,
	_ClassVariable,
	_AttributeKeyVariable=None,
	**_KwargVariablesDict
):
	
	#/#################/#
	# Get all the default classes
	#

	#get
	DefaultClassesList=SYS.GetList(_ClassVariable,SYS)

	#Debug
	print('setDefault l 168')
	print('DefaultClassesList is ')
	print(DefaultClassesList)
	print('')

	#/#################/#
	# Get all the attribute to default set again and filter 
	# the ones that have not the right
	#

	#Check
	if _AttributeKeyVariable==None:
		AttributeKeyStrsList=SYS.sum(
			map(
				lambda __DefaultClass:
				__DefaultClass.DefaultSpecificKeyStrsList,
				DefaultClassesList
			)
		)
	elif type(_AttributeKeyVariable)!=list:
		AttributeKeyStrsList=[_AttributeKeyVariable]
	else:
		AttributeKeyStrsList=_AttributeKeyVariable

	#Check
	if 'DefaultNotSetTagStrsList' in _KwargVariablesDict:

		#filter
		AttributeKeyStrsList=SYS._filter(
				lambda __AttributeKeyStr:
				__AttributeKeyStr not in _KwargVariablesDict['DefaultNotSetTagStrsList'],
				AttributeKeyStrsList
			)
		
	#Debug
	print('Defaultor l 194')
	print('AttributeKeyStrsList is ')
	print(AttributeKeyStrsList)
	print('')

	#map a set for all the class attributes into the instance
	map(
			lambda __AttributeKeyStr:
			_InstanceVariable.__setattr__
			(
				__AttributeKeyStr,
				getattr(
						_InstanceVariable.__class__,
						__AttributeKeyStr
					)
			),
			AttributeKeyStrsList
		)

	#set
	'''
	setDefaultMutable(
		_InstanceVariable,
		DefaultClassesList,
		AttributeKeyStrsList
	)
	'''

	#return 
	return _InstanceVariable
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:82,代码来源:__init__+copy+2.py

示例6: map

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import sum [as 别名]
plt.subplot(141)
plt.plot(
	SampleFloatsArray,
	MyNumscipyer.NumscipiedValueFloatsArray.T
)
plt.subplot(142)
plt.plot(
	MyNumscipyer.NumscipiedFourierFrequencyFloatsArray,
	MyNumscipyer.NumscipiedFourierAmplitudeFloatsArray.T
)
map(
	lambda __NumscipiedFourierMaxTupleFloat:
	plt.plot(
		*__NumscipiedFourierMaxTupleFloat,
		marker='o'
	),
	SYS.flat(MyNumscipyer.NumscipiedFourierMaxTupleFloatsArray)
)
plt.subplot(143)
plt.plot(
	MyNumscipyer.NumscipiedFourierFrequencyFloatsArray,
	MyNumscipyer.NumscipiedFourierPhaseFloatsArray.T
)
plt.subplot(144)
plt.plot(
	MyNumscipyer.NumscipiedFourierFrequencyFloatsArray,
	SYS.sum(MyNumscipyer.NumscipiedFourierCrossPhaseFloatsArray).T
)
plt.show()

开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:31,代码来源:09_ExampleCell.py

示例7: print

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

#init
MyList=[
	[2,3],
	[3,4,[5,9]]
]

#print
print(SYS.sum(MyList))

#print
print(SYS.flat(MyList))

#array
MyArray=SYS.numpy.array(
	[
		[2,3],
		[3,4]
	]
)

#print
print(SYS.sum(MyArray))

#array
MyArray=SYS.numpy.array(
	[
		[[2,1],[3,5]],
		[[3],[4,66]]
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:33,代码来源:15_ExampleDoc.py

示例8: do_explore

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import sum [as 别名]
	def do_explore(self):
		""" """

		#debug
		'''
		self.debug(
			[
				"We explore here"
			]
		)
		'''

		#Check
		if self.ExploredSucessesInt < self.ExploringSuccessesInt:

			#
			# Prepare
			#

			#Check
			if hasattr(self.ExploringRangeVariable,'items'):
				self.ExploredRangeTuplesList=self.ExploringRangeVariable.items()

			#Check
			if hasattr(self.ExploringConditionVariable,'items'):
				self.ExploredConditionTuplesList=self.ExploringConditionVariable.items()

			#Check
			if len(self.ExploredRangeTuplesList)!=len(self.ExploredParameterStrsList):
				self.ExploredParameterStrsList = map(
					lambda __TuplesList:__TuplesList[0],
					self.ExploredRangeTuplesList
				)

			#
			# Prepare Children
			#

			#Check
			if self.ExploredManagersVariable == None:

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

				#sum
				self.ExploredManagersVariable = SYS.sum(
					SYS.filterNone(
						map(
							lambda __TeamStr:
							self.TeamDict[__TeamStr].ManagementDict.values()
							if __TeamStr in self.TeamDict
							else None,
							self.TeamingClassesDict.keys()
						)
					)
				)

				#Check
				if self.ParentDeriveTeamerVariable == None:

					#coordinate one first time
					self.coordinate(self.ExploringMethodStr)

					#set
					ExploredTopMethodStr=self.ExploringMethodStr+"Top"

					#Check
					if hasattr(self,ExploredTopMethodStr):

						#set
						self.ExploredMethodStr = ExploredTopMethodStr

			if self.ExploredMethodStr=="":
				self.ExploredMethodStr = self.ExploringMethodStr

			#
			# Pick
			#

			#Check
			while self.ExploringTrialsInt > self.ExploredTrialsInt :

				#count
				self.ExploredTrialsInt +=1

				#debug
				'''
				self.debug(
					[
						"We test with a new trial set",
						('self.',self,[
								'ExploredTrialsInt'
							])
					]
#.........这里部分代码省略.........
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:103,代码来源:__init__.py

示例9: setDefault

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import sum [as 别名]
def setDefault(
	_InstanceVariable,
	_ClassVariable,
	_AttributeKeyVariable=None,
	**_KwargVariablesDict
):
	
	#/#################/#
	# Get all the default classes
	#

	#get
	DefaultClassesList=SYS.GetList(_ClassVariable,SYS)

	#Debug
	'''
	print('setDefault l 168')
	print('DefaultClassesList is ')
	print(DefaultClassesList)
	print('')
	'''

	#/#################/#
	# Get all the attribute to default set again and filter 
	# the ones that have not the right
	#

	#Check
	if _AttributeKeyVariable==None:
		AttributeKeyStrsList=SYS.sum(
			map(
				lambda __DefaultClass:
				__DefaultClass.DefaultSpecificKeyStrsList,
				DefaultClassesList
			)
		)
	elif type(_AttributeKeyVariable)!=list:
		AttributeKeyStrsList=[_AttributeKeyVariable]
	else:
		AttributeKeyStrsList=_AttributeKeyVariable

	#Check
	if 'DefaultNotSetTagStrsList' in _KwargVariablesDict:

		#filter
		AttributeKeyStrsList=SYS._filter(
				lambda __AttributeKeyStr:
				__AttributeKeyStr not in _KwargVariablesDict['DefaultNotSetTagStrsList'],
				AttributeKeyStrsList
			)
		
	#Debug
	'''
	print('Defaultor l 194')
	print('AttributeKeyStrsList is ')
	print(AttributeKeyStrsList)
	print('')
	'''

	#/#################/#
	# Reset the attributes by taking the ones in the class
	#

	#map 
	map(
			lambda __AttributeKeyStr:
			_InstanceVariable.__setattr__
			(
				__AttributeKeyStr,
				getattr(
						_InstanceVariable.__class__,
						__AttributeKeyStr
					)
			),
			AttributeKeyStrsList
		)

	#/#################/#
	# Reset maybe the mutable attributes by initiating with their type
	#

	#Check
	if 'DefaultMutableBool' in _KwargVariablesDict:
		DefaultMutableBool=_KwargVariablesDict['DefaultMutableBool']
	else:
		DefaultMutableBool=False

	#Check
	if DefaultMutableBool:

		#set
		setDefaultMutable(
			_InstanceVariable,
			DefaultClassesList,
			AttributeKeyStrsList
		)

	#return 
	return _InstanceVariable
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:101,代码来源:__init__.py


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