本文整理汇总了Python中ShareYourSystem类的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem类的具体用法?Python ShareYourSystem怎么用?Python ShareYourSystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ShareYourSystem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: recoverBefore
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())
示例2: do_scan
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
)
示例3: do_command
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
)
示例4: do_recruit
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
)
)
示例5: getSynapticRisePerturbationVariable
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
)
示例6: do_status
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
'''
示例7: propertize_setModelingDescriptionTuplesList
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
"""
示例8: status
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))
示例9: mimic_set
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)
示例10: getPropertizedVariableWithItemTuple
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])
示例11: recordSimulation
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.)
)
})
示例12: retrieveAfter
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('')
示例13: findAfter
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')
示例14: loadSimulations
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)))
示例15: attest_insert
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()
)