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 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('')
#Definition MyController=SYS.ControllerClass( **{ 'FolderingPathStr':SYS.Tabularer.LocalFolderPathStr, 'ControllingModelClassVariable':SYS.TabularerClass } ).set( '/-Models/|Things', { 'ModelingDescriptionTuplesList': [ #GetStr #ColumnStr #Col ('MyInt','MyInt',tables.Int64Col()), ('MyStr','MyStr',tables.StringCol(10)), ('MyIntsList','MyIntsList',tables.Int64Col(shape=3)) ] } ) #Definition the AttestedStr print('MyController is ') SYS._print(MyController) #view print('hdf5 file is : \n'+SYS._str(MyController.hdfview())) #close MyController.file(_ModeStr='c')
# ImportModules import ShareYourSystem as SYS # Define and condition MyConditioner = SYS.ConditionerClass().condition( # ConditioningTestGetVariable "MyInt", # ConditioningGetBoolFunction lambda _TestVariable, _AttestVariable: _TestVariable == _AttestVariable, # ConditioningAttestGetVariable 2, # ConditioningInstanceVariable # {'MyInt':3} ) # print print("MyConditioner is ") SYS._print(MyConditioner) # condition ... it is going to try to get 2 in the dict # and raise an error but then use 2 # as the self.ConditioningTestGetVariable print("MyConditioner.condition(2) is ") SYS._print(MyConditioner.condition(2)) # print print("MyConditioner.condition(type,_AttestGetVariable=dict) is ") SYS._print(MyConditioner.condition(type, _AttestGetVariable=dict))
#ImportModules import ShareYourSystem as SYS #define MyTeamDict=SYS.Teamer.TeamDict([('a',1),('b',2)]) #print print('MyTeamDict is ') SYS._print(MyTeamDict) #get print(MyTeamDict.getValue(0)) print(MyTeamDict.getValue(1))
('|b',{ 'FiguringDrawVariable': [ ( '#plot', { '#liarg':[ [1,2,3], [5,5,5] ], '#kwarg':{ 'linestyle':"-", 'color':'g' } } ) ] }) ] } } } } ).show( ) #print print('MyShower is ') SYS._print(MyShower)
#first make self.make() #Cast self.BuiltMyStr='My MadeMyInt is '+str(self.MadeMyInt) #print print('BuilderClass.SwitchMethodDict is ') print(SYS.indent(BuilderClass.SwitchMethodDict)) #Definition an instance MyBuilder=BuilderClass() #Print print('Before make, MyBuilder.__dict__ is ') SYS._print(MyBuilder.__dict__) #make once print('NOW we build') MyBuilder.build(**{'MakingMyFloat':3.}) #Print print('After the build, MyBuilder.__dict__ is ') SYS._print(MyBuilder.__dict__) #Switch by default it is just the last Name and the the last do in the mro print('Now we switch') MyBuilder.setSwitch() #Print print('After the switch MyBuilder.__dict__ is ')
'model': ''' dv/dt = (-(v+60*mV)+11*mV + 5.*mV*sqrt(20.*ms)*xi)/(20*ms) : volt ''', 'threshold':'v>-50*mV', 'reset':'v=-70*mV' } ) #/###################/# # Print # #Definition the AttestedStr print('MyNeurongrouper is ') SYS._print(MyNeurongrouper) #/###################/# # Do one simulation # #Print from brian2 import Network,ms,mV MyNetwork=Network() map( MyNetwork.add, SYS.flat( [ MyNeurongrouper.NeurongroupedBrianVariable, MyNeurongrouper.NeurongroupedSpikeMonitorsList, MyNeurongrouper.NeurongroupedStateMonitorsList
RepresentingKeyStrsList = ["BuildingMyStr", "BuiltMyStr"] def default_init(self, _BuildingMyStr="", _BuiltMyStr=""): MakerClass.__init__(self) def do_build(self): # set pass # Definition an instance MyBuilder = BuilderClass() # Print print("Before make, MyBuilder is ") SYS._print(MyBuilder, **{"RepresentingKeyStrsList": ["MakingMyFloat", "MadeMyInt"]}) # make once MyBuilder.make(3.0) # Print print("After the first make, MyBuilder is ") SYS._print(MyBuilder, **{"RepresentingKeyStrsList": ["MakingMyFloat", "MadeMyInt"]}) # make again MyBuilder.make(5.0) # Print print("After the second make, MyBuilder is ") SYS._print(MyBuilder, **{"RepresentingKeyStrsList": ["MakingMyFloat", "MadeMyInt"]})
self.debug( [ 'I know my parent !', ('self["^"].',self['^'],['ParentKeyStr']) ] ) #Define MyMaker=MakerClass( ).set( '-Things',MakerClass() ) #print print('MyMaker is ') SYS._print(MyMaker) #Define @SYS.ClasserClass() class BuilderClass(MakerClass): def propertize_setParentKeyStr(self,_SettingValueVariable): #call the base method MakerClass.propertize_setParentKeyStr(self,_SettingValueVariable) #debug self.debug( [ 'and its id is :', ('self["^"].',self['^'],['PrintIdInt'])
#ImportModules import ShareYourSystem as SYS #Explicit expression MyPather=SYS.PatherClass( ).get( 'ChildPather' ) MyPather.ChildPather.set( '/</IdIntsDict.__setitem__', {'#value:#map@get':['#direct:MyChildPather','/~/IdInt']} ) #print print('MyPather is ') SYS._print(MyPather)
#debug self.debug('MakingIntsList is setted !') #set the value of the "hidden" property variable self._MakingIntsList=_SettingValueVariable #Bind with MadeInt setting self.MadeSumInt=sum(self._MakingIntsList) #define and set MyMaker=MakerClass( ) #print(MakerClass.) #print print('MyMaker before set is ') SYS._print(MyMaker) #set MyMaker.__setitem__( 'MakingIntsList', [3,4] ) #print print('MyMaker is ') SYS._print(MyMaker) print(MyMaker.__class__.MakingIntsList)
#ImportModules import ShareYourSystem as SYS #Define MyGetter=SYS.GetterClass() MyGetter.MyInt=1 MyGetter.HelloStr="hello" MyGetter.FirstRedirectStr="HelloStr" MyGetter.SecondRedirectStr="FirstRedirectStr" #print print('A simple dict get with key MyInt gives') SYS._print(MyGetter[{"#key":"MyInt"}]) #print print('A first undirect level get gives with #key:#get') SYS._print(MyGetter[{"#key:#get":"FirstRedirectStr"}]) #print print('A recursive undirect level get gives') SYS._print(MyGetter[ { "#key:#get":{ "#key:#get":"SecondRedirectStr" } } ] ) #print
#ImportModules import ShareYourSystem as SYS #define MyTeamer=SYS.TeamerClass( ).team( 'Children', { 'MyInt':0 }, _AfterSetVariable={ 'MyStr':"hello" } ) #print print("MyTeamer is ") SYS._print(MyTeamer)
#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) #kill MyController.process(_ActionStr='kill')
['$First','$Second'], ['&Neurons'], ['$E','$I'] ] ).command( '+&.values+$.values', { 'parent':[], '#bound:recruit':lambda _InstanceVariable:_InstanceVariable[ '/Top/NeuronsDict' ].__setitem__( _InstanceVariable.ManagementTagStr, _InstanceVariable ) if _InstanceVariable['/^/ParentKeyStr']=="Neurons" else None, #'/Top/NeuronsList.append':{ # '#set':[">>self"], # '#if':[ # ('/^/ParentKeyStr',SYS.operator.eq,"Neurons") # ] #} }, _AfterWalkRigidBool=True ) #print print('MyParenter.NeuronsList is ') SYS._print(MyParenter.NeuronsList)
#ImportModules import ShareYourSystem as SYS from ShareYourSystem.Tutorials import Decrementer #Definition an instance MyDecrementer=Decrementer.DecrementerClass().decrement() #Definition the AttestedStr print('MyDecrementer is ') SYS._print(MyDecrementer)
#ImportModules import ShareYourSystem as SYS #define at the level of the class SYS.AttributerClass.OneStr="hello" #define and set with attr MyAttributer=SYS.AttributerClass( )['#map@set']( { '<Instance>MyInt':0, '<Class>OurList':[5], '<Instance>OneStr':"bonjour" } ) #Definition the AttestedStr print('MyAttributer is ') SYS._print(MyAttributer) #Check for the shared attributes print('SYS.AttributerClass().OurList is ') print(SYS.AttributerClass().OurList) #get print("MyAttributer['<Instance>OneStr']") print(MyAttributer['<Instance>OneStr']) print("MyAttributer['<Class>OneStr']") print(MyAttributer['<Class>OneStr'])
#ImportModules import ShareYourSystem as SYS #Definition a Installer instance MyInstaller=SYS.InstallerClass( ).install( _AllBool=True ) #Definition the AttestedStr print('MyInstaller is ') SYS._print(MyInstaller)
#/###################/# # View # MyPredicter.mapSet( { 'PyplotingFigureVariable':{ 'figsize':(10,8) }, 'PyplotingGridVariable':(30,30), '-Panels':[ ] } ).view( ).pyplot( ).show( ) #/###################/# # Print # #Definition the AttestedStr print('MyPredicter is ') SYS._print(MyPredicter)
'PyplotingLegendDict':{ 'fontsize':10, 'ncol':2 } } } } ), ( '|Stat', { 'PyplotingTextVariable':[-0.4,0.], 'PyplotingShiftVariable':[4,0], 'PyplotingShapeVariable':[5,9], } ) ] } ).view( ).pyplot( ).show( ) #/###################/# # Print # #print print('MyHopfer is ') SYS._print(MyHopfer)
'LeakingTimeVariable':'#scalar:20.*ms', #'LeakingTimeVariable':20., #'LeakingTimeVariable':20.*SYS.brian2.ms, #'LeakingTimeVariable':[10.,20.,10.], 'RecordingLabelVariable':[0,1], 'LeakingSymbolPrefixStr':'r' } ).leak( ).simulate( 500. ) #/###################/# # View # MyLeaker.view( ).pyplot( ).show( ) #/###################/# # Print # #print print('MyLeaker is ') SYS._print(MyLeaker)
('MyIntsList','MyIntsList',SYS.tables.Int64Col(shape=3)) ] } ).model( ) #Build a structure with a database SYS.mapSet( MyModeler.ModeledHdfTable, [ ('row.__setitem__',{'#liarg':('MyStr',"hello")}), ('row.append',{'#liarg':None}), ('row.__setitem__',{'#liarg':('MyStr',"bonjour")}), ('row.__setitem__',{'#liarg':('MyIntsList',[4,5,6])}), ('row.append',{'#liarg':None}), ('flush',{'#liarg':None}) ] ) #Definition the AttestedStr print('MyModeler is ') SYS._print(MyModeler) #view print('hdf5 file is : \n'+SYS._str(MyModeler.hdfview())) #close MyModeler.file(_ModeStr='c')
#ImportModules import ShareYourSystem as SYS #figure MyPyploter=SYS.PyploterClass( ).mapSet( { 'PyplotingDrawVariable': { 'plot':{ '#liarg':[ [1,2,3], [2,6,3] ], '#kwarg':{ 'linestyle':"--" } } } } ).pyplot( ) #print print('MyPyploter is ') SYS._print(MyPyploter) SYS.matplotlib.pyplot.show()
#Define MyStabilizer=SYS.StabilizerClass( ).stationarize( _MeanWeightVariable=[ [0.5,-500.], [500.,-10.] ] ).stabilize( _DelayTimeVariable=0.001, _ScanFrequencyVariable=[10.] ) #Choose the parameters to print KeyStrsList=[ 'StationarizingMeanWeightVariable', 'StabilizingConstantTimeVariable', #in ms 'StabilizingDelayTimeVariable', 'StabilizedTotalPerturbationComplexesArray', #matrix M 'StabilizedDeterminantFloatsTuple', #If it has converged, then it has to be closed to (0,0) 'StabilizedInstabilityLambdaFloatsTuple', # real part should be negative if stable, (from this particular initial condition) 'StabilizedInstabilityFrequencyFloat' ] #print SYS._print(SYS.collections.OrderedDict(zip(KeyStrsList,MyStabilizer.mapGet(KeyStrsList))))
""" MyBrianer[ '/-Traces/|*v/-Samples/|Default' ].view( ).pyplot( ).show( ) """ """ MyBrianer['/-Events/|Default'].view( ).pyplot( ).show( ) """ MyBrianer.view( ).pyplot( ).show( ) #/###################/# # Print # #Definition the AttestedStr print('MyBrianer is ') SYS._print(MyBrianer)
#ImportModules import ShareYourSystem as SYS #Definition of a Scriptbooker MyScriptbooker=SYS.ScriptbookerClass( ).folder( SYS.Filer ).scriptbook( **{ 'GuidingBookStr':'Doc' } ) #Definition the AttestedStr print('MyScriptbooker is ') SYS._print(MyScriptbooker)
#ImportModules import ShareYourSystem as SYS #Explicit expression MyPointer=SYS.PointerClass( ).point( #PointingToGetVariable '/FirstChildPointer/GrandChildPointer', #PointingToSetKeyVariable 'MyGrandChildPointer', #PointingBackBool _BackBool=True ) #print print('MyPointer is') SYS._print(MyPointer)
'__setitem__', SYS.ApplyDictClass( { 'LiargVariablesList':[ '__setitem__', SYS.ApplyDictClass( { 'LiargVariablesList': ['MyNotLostStr','ben he'] } ) ] } ) ) #With just one argument MyApplyier.apply( SYS.ApplyDictClass( { 'MethodStr':'__setitem__', 'LiargVariablesList':['MyInt',5] } ) ) #print print('MyApplyier is ') SYS._print(MyApplyier)
{ '|E':{ 'array':[ [ ['-Connections'], ['|/^/|E','|/^/|I'] ], [ {}, { 'MyStr':"hello" } ] ] }, '|I':{} } ).get('?v') print(MyConnecter['/-Neurons/|E'].mapConnect('Connect')) #print print('MyConnecter is ') SYS._print(MyConnecter) #Ioannidis #Craig Bennett Neural correlates... Salmon thing
10., #PredictingNormalisationInt 0.5, #PredictingCostFloat 0., #PredictingPerturbativeInputWeightFloat 0., #PredictingPerturbativeLateralWeightFloat 0., #PredictingInputRandomStatStr 'norm', #PredictingLateralRandomStatStr 'norm' ).predisense( #PredisensingRunTimeFloat (ms) 100., #PredisensingStepTimeFloat (ms) 0.1, #PredisensingClampFloat 0.5, #PredisensingMonitorIntsList [0] ).view( ).pyplot( ) SYS.matplotlib.pyplot.show() #print print('MyPredisenser is') SYS._print(MyPredisenser)