Noder

Doc


A Noder defines Child ordered dicts with as KeyStr. The items inside are automatically setted with Noded and have a Pointer to the parent InstanceVariable. This is the beginning for buiding high arborescent and (possibly circular) structures of objects.


View the Noder notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Noder.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Noder defines Child ordered dicts with <DoStr> as KeyStr. 
The items inside are automatically setted with Noded<DoStr><TypeStr> and have 
a Pointer to the parent InstanceVariable. This is the beginning for buiding high
arborescent and (possibly circular) structures of objects.

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Applyiers.Filterer"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
import collections
from ShareYourSystem.Standards.Itemizers import Pather
#</ImportSpecificModules>

#<DefineLocals>
NodingPrefixGetStr='<'
NodingSuffixGetStr='>'
NodingCollectionPrefixStr="Node"
#</DefineLocals>

#<DefineClass>
@DecorationClass()
class NoderClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                    'NodingCollectionStr',
                                    'NodedCollectionOrderedDict',
                                    'NodedCollectionStr',
                                    'NodedKeyStr',
                                    'NodedCollectionIndexInt'
                                ]

    def default_init(self,
                _NodingCollectionStr="",                            
                _NodedCollectionOrderedDict=None,                                               
                _NodedCollectionStr="",         
                _NodedKeyStr="",            
                _NodedCollectionIndexInt=-1,                                
                **_KwargVariablesDict
                ):

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

        #global
        global NodingCollectionPrefixStr

        NodedMethodStr='__setattr__'
        NodedMethod=getattr(self,NodedMethodStr)

        #Int and Set Child attributes
        NodedMethod(
            NodingCollectionPrefixStr+'CollectionStr',
            "Globals"
        )
        NodedMethod(
            NodingCollectionPrefixStr+'IndexInt',
            -1
        )
        """
        NodedMethod(
            NodingCollectionPrefixStr+'KeyStr',
            SYS._filter(
                lambda __ListedVariable:
                id(__ListedVariable)==self.IdStr,
                sys.modules['__main__'].globals().values()
            )
        )
        """
        NodedMethod(
            NodingCollectionPrefixStr+'KeyStr',
            'Top'+self.__class__.NameStr
        )
        self.point(
                None,
                NodingCollectionPrefixStr+'PointOrderedDict'
            )
        self.point(
                None,
                NodingCollectionPrefixStr+'PointDeriveNoder'
            )

    def do_node(self):

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

        #Get the NodedStr
        if self.NodingCollectionStr!="":

            #set the Noded OrderedDict and KeyStr
            NodedCollectionOrderedSetTagStr=self.NodingCollectionStr+'CollectionOrderedDict'
            #self.NodeKeyStrKeyStr=self.NodedPrefixStr+'KeyStr'

            try:
                self.NodedCollectionOrderedDict=getattr(self,NodedCollectionOrderedSetTagStr)
            except AttributeError:
                self.__setattr__(
                                    NodedCollectionOrderedSetTagStr,
                                    collections.OrderedDict()
                                )
                self.NodedCollectionOrderedDict=getattr(self,NodedCollectionOrderedSetTagStr)

    def mimic_get(self):

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

        #Definition
        OutputDict={'HookingIsBool':True}

        #Appending set
        if self.GettingKeyVariable.startswith(NodingPrefixGetStr):

            #Definition the SplittedStrsList
            SplittedStrsList=self.GettingKeyVariable.split(NodingSuffixGetStr)

            #Definition the NodingCollectionStr
            NodingCollectionStr=NodingPrefixGetStr.join(
                SplittedStrsList[0].split(NodingPrefixGetStr)[1:])

            #debug
            '''
            self.debug(
                        [
                            'NodingCollectionStr is '+NodingCollectionStr,
                            'We are going to node'
                        ]
                    )
            '''

            #Nodify
            self.node(
                        NodingCollectionStr,
                        #**{'IsNoderBool':False}
                    )

            #Definition of the KeyStr
            GetKeyStr=NodingSuffixGetStr.join(SplittedStrsList[1:])

            #debug
            '''
            self.debug(
                            [
                                'node is done',
                                'GetKeyStr is '+GetKeyStr,
                                'self.NodedCollectionOrderedDict is '+str(self.NodedCollectionOrderedDict)
                            ]
                )
            '''

            #Get with a digited KeyStr case
            if GetKeyStr.isdigit():

                #Definition the GetInt
                GetInt=(int)(GetKeyStr)

                #Check if the size is ok
                if GetInt<len(self.NodedCollectionOrderedDict):

                    #Get the GettedVariable 
                    self.GettedValueVariable=SYS.get(
                        self.NodedCollectionOrderedDict,
                        'values',
                        GetInt
                    )

                    #Return
                    OutputDict['HookingIsBool']=False
                    #<Hook>return OutputDict

            #Get in the ValueVariablesList
            elif GetKeyStr=="":

                #Get the GettedVariable
                self.GettedValueVariable=self.NodedCollectionOrderedDict.values()

                #Return 
                OutputDict['HookingIsBool']=False
                #<Hook>return OutputDict

            elif GetKeyStr in self.NodedCollectionOrderedDict:

                #Get the GettedVariable
                self.GettedValueVariable=self.NodedCollectionOrderedDict[GetKeyStr]

                #Return 
                OutputDict['HookingIsBool']=False
                #<Hook>return OutputDict



        #Call the parent get method
        if OutputDict['HookingIsBool']:

            #debug
            '''
            self.debug(
                        [
                            ('self.',self,['GettingKeyVariable']),
                            'BaseClass.get is '+str(BaseClass.get)
                        ]
                    )
            '''

            #Call
            return BaseClass.get(self)

        else:

            #return
            return OutputDict

    #<Hook>@Hooker.HookerClass(**{'HookingAfterVariablesList':[BaseClass.set]})
    #@Imitater.ImitaterClass()
    def mimic_set(self):
        """ """

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

        #Definition
        OutputDict={'HookingIsBool':True}

        #Appending set
        if self.SettingKeyVariable.startswith(NodingPrefixGetStr):

            #Definition the SplittedStrsList
            SplittedStrsList=self.SettingKeyVariable.split(NodingSuffixGetStr)

            #Definition the NodingCollectionStr
            NodingCollectionStr=NodingPrefixGetStr.join(
                SplittedStrsList[0].split(NodingPrefixGetStr)[1:])

            #Check if it is an append of Nodes
            IsNoderBool='NoderClass' in map(
                                            lambda __Class:
                                            __Class.__name__,
                                            type(self.SettingValueVariable).__mro__
                                            )

            #debug
            '''
            self.debug(('vars ',vars(),['NodingCollectionStr','IsNoderBool']))
            '''

            #Nodify
            self.node(
                        NodingCollectionStr,
                        #**{'IsNoderBool':IsNoderBool}
                    )

            #Definition the KeyStr
            SetTagStr=NodingSuffixGetStr.join(SplittedStrsList[1:])

            #debug
            '''
            self.debug('SetTagStr is '+SetTagStr)
            '''

            #Append (or set if it is already in)
            Pather.setWithPathVariableAndKeyVariable(
                self.NodedCollectionOrderedDict,
                Pather.PathPrefixStr+SetTagStr,
                self.SettingValueVariable
            )

            if Pather.PathPrefixStr not in SetTagStr:

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

                #If it is an object
                if IsNoderBool:

                    #global
                    global NodingCollectionPrefixStr

                    NodedMethodStr='__setattr__'
                    NodedMethod=getattr(self.SettingValueVariable,NodedMethodStr)

                    #Int and Set Child attributes
                    NodedMethod(
                        NodingCollectionPrefixStr+'CollectionStr',
                        self.NodingCollectionStr
                    )
                    NodedMethod(
                        NodingCollectionPrefixStr+'IndexInt',
                        len(self.NodedCollectionOrderedDict)-1
                    )
                    NodedMethod(
                        NodingCollectionPrefixStr+'KeyStr',
                        SetTagStr
                    )
                    self.SettingValueVariable.point(
                            self.NodedCollectionOrderedDict,
                            NodingCollectionPrefixStr+'PointOrderedDict'
                        )
                    self.SettingValueVariable.point(
                            self,
                            NodingCollectionPrefixStr+'PointDeriveNoder'
                        )

            #set
            OutputDict['HookingIsBool']=False

            #return
            return OutputDict

        #Call the parent get method
        if OutputDict['HookingIsBool']:
            return BaseClass.set(self)

#</DefineClass>

View the Noder sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [3]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Noder
    
#Definition of a Noder instance
MyNoder=Noder.NoderClass()

#Short expression for setting in the appended manner a structured object
MyNoder['<Nodome>FirstChildNoder']=Noder.NoderClass()

#Short expression for setting in the appended manner a structured object
MyNoder['<Nodome>SecondChildNoder']=Noder.NoderClass()

#Definition the AttestedStr
SYS._attest(
    [
        'MyNoder is '+SYS._str(
                MyNoder,
                **{
                'RepresentingBaseKeyStrsListBool':False,
                'RepresentingAlineaIsBool':False
                }
            )
    ]
) 

#Print



*****Start of the Attest *****

MyNoder is < (NoderClass), 4556884240>
   /{ 
   /  '<New><Instance>IdInt' : 4556884240
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopNoder
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>NodomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstChildNoder' : < (NoderClass), 4556971024>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4556971024
   /   /   /  '<New><Instance>NodeCollectionStr' : Nodome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstChildNoder
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (NoderClass), 4556884240>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557647952>
   /   /   /  '<Spe><Class>NodedCollectionIndexInt' : -1
   /   /   /  '<Spe><Class>NodedCollectionOrderedDict' : None
   /   /   /  '<Spe><Class>NodedCollectionStr' : 
   /   /   /  '<Spe><Class>NodedKeyStr' : 
   /   /   /  '<Spe><Class>NodingCollectionStr' : 
   /   /   /}
   /   /  'SecondChildNoder' : < (NoderClass), 4555537872>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4555537872
   /   /   /  '<New><Instance>NodeCollectionStr' : Nodome
   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /  '<New><Instance>NodeKeyStr' : SecondChildNoder
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (NoderClass), 4556884240>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557647952>
   /   /   /  '<Spe><Class>NodedCollectionIndexInt' : -1
   /   /   /  '<Spe><Class>NodedCollectionOrderedDict' : None
   /   /   /  '<Spe><Class>NodedCollectionStr' : 
   /   /   /  '<Spe><Class>NodedKeyStr' : 
   /   /   /  '<Spe><Class>NodingCollectionStr' : 
   /   /   /}
   /   /}
   /  '<Spe><Class>NodedCollectionIndexInt' : -1
   /  '<Spe><Class>NodedCollectionStr' : 
   /  '<Spe><Class>NodedKeyStr' : 
   /  '<Spe><Instance>NodedCollectionOrderedDict' : {...}< (OrderedDict), 4557647952>
   /  '<Spe><Instance>NodingCollectionStr' : Nodome
   /}

*****End of the Attest *****


Appender

Doc


An Appender append by doing a set in a NodedOrderedDict thanks to the


View the Appender notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Appender.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


An Appender append by doing a set in a NodedOrderedDict thanks to the <AppendedNodeCollectionStr><AppendedNodeKeyStr>

"""


#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Noder"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
import collections

from ShareYourSystem.Applyiers import Updater
Noder=BaseModule
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class AppenderClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                    'AppendingCollectionVariable',
                                    'AppendedNodeCollectionStr', 
                                    'AppendedNodeKeyStr'
                                ]

    def default_init(self,
                        _AppendingCollectionVariable=None,              
                        _AppendedNodeCollectionStr="",                              
                        _AppendedNodeKeyStr="", 
                        **_KwargVariablesDict
                    ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_append(self):
        """ """

        #debug
        '''
        self.debug('self.AppendingCollectionVariable is '+str(self.AppendingCollectionVariable))
        '''

        #TuplesList Case
        if SYS.getIsTuplesListBool(self.AppendingCollectionVariable):

            #debug
            '''
            self.debug('This is a tuples list')
            '''

            #Definition the KeyStrsList
            AppendedKeyStrsList=SYS.unzip(self.AppendingCollectionVariable,[0])

            #Look for an AppendingNodeCollectionStr
            try:
                NodeCollectionStrIndexInt=AppendedKeyStrsList.index(
                    "NodeCollectionStr"
                )
                self.AppendedNodeCollectionStr=self.AppendingCollectionVariable[
                    NodeCollectionStrIndexInt
                ][1]

                '''
                #self.AppendedKeyStrKeyStr='Noded'+self.AppendedNodeCollectionStr+'KeyStr'
                try:
                    AppendedKeyStrIndexInt=AppendedKeyStrsList.index(
                        self.AppendedKeyStrKeyStr
                    )
                    self.AppendedKeyStr=self.AppendingCollectionVariable[KeyStrIndexInt][1]
                except:
                    pass
                '''
                NodeKeyStrIndexInt=AppendedKeyStrsList.index(
                    "NodeKeyStr"
                )
                self.AppendedNodeKeyStr=self.AppendingCollectionVariable[
                    NodeKeyStrIndexInt
                ][1]

            except:
                pass

        else:

            #Objects Case
            if "AppenderClass" in map(
                            lambda __Class:
                            __Class.__name__,
                            type(self.AppendingCollectionVariable).__mro__
                            ):

                #debug
                '''
                self.debug('This is a derived object from an Appender')
                '''

                #set
                AppendedDict=self.AppendingCollectionVariable.__dict__

            #dict Case
            elif type(self.AppendingCollectionVariable) in [dict,collections.OrderedDict]:
                AppendedDict=self.AppendingCollectionVariable

            try:

                #set
                self.AppendedNodeCollectionStr=AppendedDict["NodeCollectionStr"]
                self.AppendedNodeKeyStr=AppendedDict[
                        'NodeKeyStr'
                ]

            except:
                pass

        #Init the SettingVariable and Add the NodifyingStr
        AppendedSettingKeyVariable=Noder.NodingPrefixGetStr+self.AppendedNodeCollectionStr+Noder.NodingSuffixGetStr+self.AppendedNodeKeyStr

        #debug
        self.debug([
                        ('self.',self,[
                                            'AppendedNodeCollectionStr',
                                            'AppendedNodeKeyStr'
                                        ])
                    ]
                )

        #Then set
        if AppendedSettingKeyVariable!=Noder.NodingPrefixGetStr+Noder.NodingSuffixGetStr:
            self.__setitem__(
                                AppendedSettingKeyVariable,
                                self.AppendingCollectionVariable
                            )

        #Return self
        #return self

#</DefineClass>

View the Appender sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [7]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Appender

#Append with a TuplesList
MyAppender=Appender.AppenderClass().append([
                                    ('NodeCollectionStr','Tree'),
                                    ('NodeKeyStr','MyTuplesList'),
                                    ('MyStr','Hello')
                                ]
                            )

#Append with a dict
MyAppender.append({
                    'NodeCollectionStr':'Tree',
                    'NodeKeyStr':'MyDict',
                    'MyOtherStr':'Bonjour'
                    }
                )

#Append with an instance
MyAppender.append(
                    Appender.AppenderClass().update(
                        [
                            ('NodeCollectionStr','Tree'),
                            ('NodeKeyStr','MyAppender')
                        ]
                    )
                )

#Definition the AttestedStr
SYS._attest(
    [
        'MyAppender is '+SYS._str(
        MyAppender,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
)  

#Print


                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    ////////////////////////////////
                    Appender/__init__.py do_append
                    From Appender/__init__.py do_append | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                    ////////////////////////////////
                    
                    l.138 : 
                    *****
                    I am with [('NodeKeyStr', 'TopAppender')]
                    *****
                    self.AppendedNodeCollectionStr is Tree
                    self.AppendedNodeKeyStr is MyTuplesList
                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                        
                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    ////////////////////////////////
                    Appender/__init__.py do_append
                    From Appender/__init__.py do_append | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                    ////////////////////////////////
                    
                    l.138 : 
                    *****
                    I am with [('NodeKeyStr', 'TopAppender')]
                    *****
                    self.AppendedNodeCollectionStr is Tree
                    self.AppendedNodeKeyStr is MyDict
                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                        
                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    ////////////////////////////////
                    Appender/__init__.py do_append
                    From Appender/__init__.py do_append | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                    ////////////////////////////////
                    
                    l.138 : 
                    *****
                    I am with [('NodeKeyStr', 'TopAppender')]
                    *****
                    self.AppendedNodeCollectionStr is Tree
                    self.AppendedNodeKeyStr is MyAppender
                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                        


*****Start of the Attest *****

MyAppender is < (AppenderClass), 4556354768>
   /{ 
   /  '<New><Instance>IdInt' : 4556354768
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopAppender
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /{ 
   /   /  'MyTuplesList' : 
   /   /   /[
   /   /   /  0 : ('NodeCollectionStr', 'Tree')
   /   /   /  1 : ('NodeKeyStr', 'MyTuplesList')
   /   /   /  2 : ('MyStr', 'Hello')
   /   /   /]
   /   /  'MyDict' : 
   /   /   /{ 
   /   /   /  'MyOtherStr' : Bonjour
   /   /   /  'NodeCollectionStr' : Tree
   /   /   /  'NodeKeyStr' : MyDict
   /   /   /}
   /   /  'MyAppender' : < (AppenderClass), 4556962512>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4556962512
   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /  '<New><Instance>NodeIndexInt' : 2
   /   /   /  '<New><Instance>NodeKeyStr' : MyAppender
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (AppenderClass), 4556354768>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557648544>
   /   /   /  '<Spe><Class>AppendedNodeCollectionStr' : 
   /   /   /  '<Spe><Class>AppendedNodeKeyStr' : 
   /   /   /  '<Spe><Class>AppendingCollectionVariable' : None
   /   /   /}
   /   /}
   /  '<Spe><Instance>AppendedNodeCollectionStr' : Tree
   /  '<Spe><Instance>AppendedNodeKeyStr' : MyAppender
   /  '<Spe><Instance>AppendingCollectionVariable' : {...}< (AppenderClass), 4556962512>
   /}

*****End of the Attest *****


Instancer

Doc


An Appender append by doing a set in a NodedOrderedDict thanks to the


View the Instancer notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Instancer.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


An Appender append by doing a set in a NodedOrderedDict thanks to the <AppendedNodeStr><AppendedNodeKeyStr>

"""


#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Appender"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>

Appender=BaseModule
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class InstancerClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                    'InstancingVariable',
                                    'InstancingClass',
                                    'InstancingIsBool',
                                    'InstancedVariable'
                                ]

    def default_init(self,
                        _InstancingVariable=None,
                        _InstancingClass=None,  
                        _InstancingIsBool=False,
                        _InstancedVariable=None,
                        **_KwargVariablesDict
                    ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

    #@Imitater.ImitaterClass()
    def mimic_append(self):

        #Instance first
        self.instance()

        #Append then
        Appender.AppenderClass.append(self,self.InstancedVariable)

        #Return self
        return self

    def do_instance(self):
        """ """

        #Check
        if self.InstancingIsBool:

            #Init
            InstancingClass=None

            #TuplesList Case
            if SYS.getIsTuplesListBool(self.InstancingVariable):

                #debug
                '''
                self.debug('This is a tuples list')
                '''

                if self.InstancingClass==None:

                    #debug
                    '''
                    self.debug('Find the instancing class')
                    '''

                    #Definition the KeyStrsList
                    KeyStrsList=SYS.unzip(self.InstancingVariable,[0])

                    try:
                        InstancingClass=self.InstancingVariable[KeyStrsList.index('InstancingClass')][1]
                    except:
                        pass

                else:
                    InstancingClass=self.InstancingClass

                #Check
                if InstancingClass!=None:

                    #Init
                    self.InstancedVariable=InstancingClass()

                    #Map
                    map(
                            lambda __ItemTuple:
                            self.InstancedVariable.__setattr__(*__ItemTuple),
                            self.InstancingVariable
                        )

                    #debug
                    '''
                    self.debug(('vars ',vars(),['InstancedVariable']))
                    '''

            elif hasattr(self.InstancingVariable,'items'):

                #debug
                '''
                self.debug('This is an itemizing thing')
                '''

                if self.InstancingClass==None:

                    #debug
                    '''
                    self.debug('Find the instancing class')
                    '''

                    try:
                        InstancingClass=self.InstancingVariable['InstancingClass']
                    except:
                        pass
                else:

                    #Definition
                    InstancingClass=self.InstancingClass

                if InstancingClass!=None:

                    #Init
                    self.InstancedVariable=InstancingClass()

                    #Map
                    map(
                            lambda __ItemTuple:
                            self.InstancedVariable.__setattr__(*__ItemTuple),
                            self.InstancingVariable.items()
                        )

            elif hasattr(self.InstancingVariable,'__dict__'):

                #Check
                if self.InstancingClass!=None:

                    #Init
                    self.InstancedVariable=self.InstancingClass()

        #Return self
        #return self

#</DefineClass>

View the Instancer sources on Github


In [10]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Appender,Instancer

#Append with a TuplesList
MyInstancer=Instancer.InstancerClass(**{'InstancingIsBool':True}).instance([
                                    ('AppendingNodeCollectionStr','Structure'),
                                    ('NodeKeyStr','MyInstancedAppender'),
                                    ('MyStr','Hello'),
                                    ('InstancingClass',Appender.AppenderClass)
                                ]
                            )

#Definition the AttestedStr
SYS._attest(
    [
        'MyInstancer is '+SYS._str(
        MyInstancer,
        **{
            'RepresentingBaseKeyStrsListBool':False
        }
        )
    ]
)  

#Print



*****Start of the Attest *****

MyInstancer is < (InstancerClass), 4556365584>
   /{ 
   /  '<New><Instance>IdInt' : 4556365584
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopInstancer
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<Spe><Class>InstancingClass' : None
   /  '<Spe><Instance>InstancedVariable' : < (AppenderClass), 4556365392>
   /   /{ 
   /   /  '<New><Instance>AppendingNodeCollectionStr' : Structure
   /   /  '<New><Instance>IdInt' : 4556365392
   /   /  '<New><Instance>InstancingClass' : <class 'ShareYourSystem.Standards.Noders.Appender.AppenderClass'>
   /   /  '<New><Instance>MyStr' : Hello
   /   /  '<New><Instance>NodeCollectionStr' : Globals
   /   /  '<New><Instance>NodeIndexInt' : -1
   /   /  '<New><Instance>NodeKeyStr' : MyInstancedAppender
   /   /  '<New><Instance>NodePointDeriveNoder' : None
   /   /  '<New><Instance>NodePointOrderedDict' : None
   /   /  '<Spe><Class>AppendedNodeCollectionStr' : 
   /   /  '<Spe><Class>AppendedNodeKeyStr' : 
   /   /  '<Spe><Class>AppendingCollectionVariable' : None
   /   /}
   /  '<Spe><Instance>InstancingIsBool' : True
   /  '<Spe><Instance>InstancingVariable' : 
   /   /[
   /   /  0 : ('AppendingNodeCollectionStr', 'Structure')
   /   /  1 : ('NodeKeyStr', 'MyInstancedAppender')
   /   /  2 : ('MyStr', 'Hello')
   /   /  3 : 
   /   /   /(
   /   /   /  0 : InstancingClass
   /   /   /  1 : {...}< (type), 140476488391344>
   /   /   /)
   /   /]
   /}

*****End of the Attest *****


Adder

Doc


An Adder maps an append


View the Adder notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Adder.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


An Adder maps an append
"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Instancer"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class AdderClass(BaseClass):

    #Definition 
    RepresentingKeyStrsList=[
                                    #'AddingVariablesList'
                                ]

    def default_init(self,
                        _AddingVariablesList=None, 
                        **_KwargVariablesDict
                ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

    #@Argumenter.ArgumenterClass(**{'ArgumentingDoStr':'Add'})
    def __add__(self,_VariablesList):
        """Apply the append to the <_AddingVariablesList>"""

        #Call the add method
        self.add(_VariablesList)

        #Return 
        return self

    def do_add(self):
        """Apply the append to the <_AddingVariablesList>"""

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

        #Apply  
        self.map('append',map(
                                    lambda __AddingVariable:
                                    {'LiargVariablesList':[__AddingVariable]},
                                    self.AddingVariablesList
                                )
                )

#</DefineClass>

View the Adder sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [14]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Adder

#Definition an Tree instance
MyAdder=Adder.AdderClass()+[
    [
        ('NodeCollectionStr','Tree'),
        ('NodeKeyStr','MyTuplesList'),
        ('MyStr','Hello')
    ],
    {
        'NodeCollectionStr':'Tree',
        'NodeKeyStr':'MyDict',
        'MyOtherStr':'Bonjour'
    },
    Adder.AdderClass().update(
            [
                ('NodeCollectionStr','Tree'),
                ('NodeKeyStr','MyChildAppender')
            ]
        )
]
    
#Definition the AttestedStr
SYS._attest(
    [
        'MyAdder is '+SYS._str(
        MyAdder,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
)  

#Print


                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                            ////////////////////////////////
                                            Appender/__init__.py do_append
                                            From Appender/__init__.py do_append | Instancer/__init__.py mimic_append | Mimicker/__init__.py mimic | Applyier/__init__.py do_apply | Mapper/__init__.py do_map | Adder/__init__.py do_add | Adder/__init__.py __add__ | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                                            ////////////////////////////////
                                            
                                            l.138 : 
                                            *****
                                            I am with [('NodeKeyStr', 'TopAdder')]
                                            *****
                                            self.AppendedNodeCollectionStr is Tree
                                            self.AppendedNodeKeyStr is MyTuplesList
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                                                        
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                            ////////////////////////////////
                                            Appender/__init__.py do_append
                                            From Appender/__init__.py do_append | Instancer/__init__.py mimic_append | Mimicker/__init__.py mimic | Applyier/__init__.py do_apply | Mapper/__init__.py do_map | Adder/__init__.py do_add | Adder/__init__.py __add__ | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                                            ////////////////////////////////
                                            
                                            l.138 : 
                                            *****
                                            I am with [('NodeKeyStr', 'TopAdder')]
                                            *****
                                            self.AppendedNodeCollectionStr is Tree
                                            self.AppendedNodeKeyStr is MyDict
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                                                        
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                            ////////////////////////////////
                                            Appender/__init__.py do_append
                                            From Appender/__init__.py do_append | Instancer/__init__.py mimic_append | Mimicker/__init__.py mimic | Applyier/__init__.py do_apply | Mapper/__init__.py do_map | Adder/__init__.py do_add | Adder/__init__.py __add__ | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                                            ////////////////////////////////
                                            
                                            l.138 : 
                                            *****
                                            I am with [('NodeKeyStr', 'TopAdder')]
                                            *****
                                            self.AppendedNodeCollectionStr is Tree
                                            self.AppendedNodeKeyStr is MyChildAppender
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                                                        


*****Start of the Attest *****

MyAdder is < (AdderClass), 4556365584>
   /{ 
   /  '<New><Instance>IdInt' : 4556365584
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopAdder
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /{ 
   /   /  'MyTuplesList' : 
   /   /   /[
   /   /   /  0 : ('NodeCollectionStr', 'Tree')
   /   /   /  1 : ('NodeKeyStr', 'MyTuplesList')
   /   /   /  2 : ('MyStr', 'Hello')
   /   /   /]
   /   /  'MyDict' : 
   /   /   /{ 
   /   /   /  'MyOtherStr' : Bonjour
   /   /   /  'NodeCollectionStr' : Tree
   /   /   /  'NodeKeyStr' : MyDict
   /   /   /}
   /   /  'MyChildAppender' : < (AdderClass), 4556365264>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4556365264
   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /  '<New><Instance>NodeIndexInt' : 2
   /   /   /  '<New><Instance>NodeKeyStr' : MyChildAppender
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (AdderClass), 4556365584>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557648248>
   /   /   /}
   /   /}
   /}

*****End of the Attest *****


Distinguisher

Doc


A Distinguisher is a bit the opposite of a Commander, it updates for every child nodes with a distinguished tuples list.


View the Distinguisher notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Distinguisher.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Distinguisher is a bit the opposite of a Commander, it updates
for every child nodes with a distinguished tuples list.

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Adder"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
from ShareYourSystem.Standards.Noders import Noder
#</ImportSpecificModules>

#<DefineLocals>
DistinguishingPrefixStr="Dis_"
#</DefineLocals

#<DefineClass>
@DecorationClass()
class DistinguisherClass(BaseClass):

    #Definition 
    RepresentingKeyStrsList=[
                                'DistinguishingNodeStr',
                                'DistinguishingUpdatesList',
                                'DistinguishedCollectionOrderedDict'
                            ]

    def default_init(self,
                _DistinguishingNodeStr="",
                _DistinguishingUpdatesList=None,    
                _DistinguishedCollectionOrderedDict=None,                       
                **_KwargVariablesDict
                ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def mimic_set(self):
        """ """

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

        #Definition
        OutputDict={'HookingIsBool':True}

        #Deep set
        if self.SettingKeyVariable.startswith(DistinguishingPrefixStr):

            #debug
            '''
            self.debug('We are going to distinguish')
            '''


            #set arguments
            self.DistinguishingNodeStr=Noder.NodingSuffixGetStr.join(
                    (
                        Noder.NodingPrefixGetStr.join(
                            self.SettingKeyVariable.split(
                                Noder.NodingPrefixGetStr
                            )[1:]
                        )
                    ).split(Noder.NodingSuffixGetStr)[:-1]
                )

            self.DistinguishingUpdatesList=self.SettingValueVariable

            #debug
            '''
            self.debug(('self.',self,[
                    'DistinguishingNodeStr',
                    'DistinguishingUpdatesList'
                    ]))
            '''

            #distinguish
            self.distinguish()

            #Stop the setting
            OutputDict["HookingIsBool"]=False
            #<Hook>return OutputDict

        #Call the parent get method
        if OutputDict['HookingIsBool']:
            BaseClass.set(self)

    def do_distinguish(self):
        """ """

        #Check
        if self.DistinguishingNodeStr!="":

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

            #get
            self.DistinguishedCollectionOrderedDict=getattr(
                self,
                self.DistinguishingNodeStr+'CollectionOrderedDict'
            )

            #Map the distinguished updates
            map(
                lambda __NodeVariable,__UpdateTuplesList:
                __NodeVariable.update(__UpdateTuplesList),
                self.DistinguishedCollectionOrderedDict.values(),
                self.DistinguishingUpdatesList
            )

#</DefineClass>

View the Distinguisher sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [18]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Distinguisher
import copy

#Definition a tree of Distinguishers.
MyDistinguisher=Distinguisher.DistinguisherClass().__add__(
    [
        Distinguisher.DistinguisherClass().update(
            [
                ('NodeCollectionStr','Tree'),
                ('NodeKeyStr',str(Int1))
            ]
        ) for Int1 in xrange(2)
    ]
)

#distinguish
MyDistinguisher.distinguish("Tree",[
                                        [('MyStr',"hello")],
                                        [('MyInt',0)]
                                    ])

#distinguish through setting
MyDistinguisher.__setitem__(
    "Dis_<Tree>",
    [
        [('MyOtherStr',"bonjour")],
        [('MyOtherInt',1)]
    ]
)

#Definition the AttestedStr
SYS._attest(
    [
        'MyDistinguisher is '+SYS._str(
        MyDistinguisher,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
)  

#Print


                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                            ////////////////////////////////
                                            Appender/__init__.py do_append
                                            From Appender/__init__.py do_append | Instancer/__init__.py mimic_append | Mimicker/__init__.py mimic | Applyier/__init__.py do_apply | Mapper/__init__.py do_map | Adder/__init__.py do_add | Adder/__init__.py __add__ | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                                            ////////////////////////////////
                                            
                                            l.138 : 
                                            *****
                                            I am with [('NodeKeyStr', 'TopDistinguisher')]
                                            *****
                                            self.AppendedNodeCollectionStr is Tree
                                            self.AppendedNodeKeyStr is 0
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                                                        
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                            ////////////////////////////////
                                            Appender/__init__.py do_append
                                            From Appender/__init__.py do_append | Instancer/__init__.py mimic_append | Mimicker/__init__.py mimic | Applyier/__init__.py do_apply | Mapper/__init__.py do_map | Adder/__init__.py do_add | Adder/__init__.py __add__ | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                                            ////////////////////////////////
                                            
                                            l.138 : 
                                            *****
                                            I am with [('NodeKeyStr', 'TopDistinguisher')]
                                            *****
                                            self.AppendedNodeCollectionStr is Tree
                                            self.AppendedNodeKeyStr is 1
                                            
                                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                                                        


*****Start of the Attest *****

MyDistinguisher is < (DistinguisherClass), 4557734416>
   /{ 
   /  '<New><Instance>IdInt' : 4557734416
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopDistinguisher
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /{ 
   /   /  '0' : < (DistinguisherClass), 4557736784>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557736784
   /   /   /  '<New><Instance>MyOtherStr' : bonjour
   /   /   /  '<New><Instance>MyStr' : hello
   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : 0
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (DistinguisherClass), 4557734416>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557626632>
   /   /   /  '<Spe><Class>DistinguishedCollectionOrderedDict' : None
   /   /   /  '<Spe><Class>DistinguishingNodeStr' : 
   /   /   /  '<Spe><Class>DistinguishingUpdatesList' : None
   /   /   /}
   /   /  '1' : < (DistinguisherClass), 4557737104>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557737104
   /   /   /  '<New><Instance>MyInt' : 0
   /   /   /  '<New><Instance>MyOtherInt' : 1
   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /  '<New><Instance>NodeKeyStr' : 1
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (DistinguisherClass), 4557734416>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557626632>
   /   /   /  '<Spe><Class>DistinguishedCollectionOrderedDict' : None
   /   /   /  '<Spe><Class>DistinguishingNodeStr' : 
   /   /   /  '<Spe><Class>DistinguishingUpdatesList' : None
   /   /   /}
   /   /}
   /  '<Spe><Instance>DistinguishedCollectionOrderedDict' : {...}< (OrderedDict), 4557626632>
   /  '<Spe><Instance>DistinguishingNodeStr' : Tree
   /  '<Spe><Instance>DistinguishingUpdatesList' : 
   /   /[
   /   /  0 : 
   /   /   /[
   /   /   /  0 : ('MyOtherStr', 'bonjour')
   /   /   /]
   /   /  1 : 
   /   /   /[
   /   /   /  0 : ('MyOtherInt', 1)
   /   /   /]
   /   /]
   /}

*****End of the Attest *****


Parenter

Doc


A Parenter completes the list of grand-parent nodes that a child node could have. It acts only at one level.


View the Parenter notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Parenter.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Parenter completes the list of grand-parent nodes that 
a child node could have. It acts only at one level.

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Distinguisher"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
import copy
from ShareYourSystem.Standards.Itemizers import Pather
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass(
    **{'ClassingSwitchMethodStrsList':['parent']}
)
class ParenterClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                'ParentingWalkBool',
                                'ParentedDeriveParentersList',
                                'ParentedNodeCollectionStrsList',
                                'ParentedNodePathStr'
                            ]

    def default_init(self,
                _ParentingWalkBool=True,
                _ParentedDeriveParentersList=None,
                _ParentedNodeCollectionStrsList=None,
                _ParentedNodePathStr="",
                **_KwargVariablesDict): 

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_parent(self):

        #debug
        '''
        self.debug(('self.',self,['ParentingNodeStr','NodePointDeriveNoder']))
        '''

        #Check of a parent pointer
        if self.NodePointDeriveNoder!=None:

            #debug
            '''
            self.debug('We are going to node the parent pointer')
            '''

            #Parent the parent maybe
            if self.ParentingWalkBool:

                #parent the parent
                self.NodePointDeriveNoder.parent()

            #set
            self.ParentedDeriveParentersList=[self.NodePointDeriveNoder
            ]+self.NodePointDeriveNoder.ParentedDeriveParentersList

            self.ParentedNodeCollectionStrsList=[self.NodedCollectionStr
            ]+self.NodePointDeriveNoder.ParentedNodeCollectionStrsList
            self.ParentedNodeCollectionStrsList.reverse()

            #definition
            ParentedNodePathStrsList=map(
                    lambda __ParentedDeriveParenter:
                    __ParentedDeriveParenter.NodeKeyStr,
                    self.ParentedDeriveParentersList
                )
            ParentedNodePathStrsList.reverse()

            #Debug
            '''
            self.debug('ParentedNodePathStrsList is '+str(ParentedNodePathStrsList))
            '''

            #set
            self.ParentedNodePathStr=Pather.PathPrefixStr.join(ParentedNodePathStrsList)

        #Return self
        #return self

#</DefineClass>

View the Parenter sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [22]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Parenter

#Short expression and set in the appended manner
MyParenter=Parenter.ParenterClass().__setitem__(
    '<Tree>ChildParenter',
    Parenter.ParenterClass().__setitem__(
        '<Tree>GrandChildParenter',
        Parenter.ParenterClass()
    )
)

#Parent for the children
#MyParenter['<Tree>ChildParenter'].parent('Tree')
MyParenter['<Tree>ChildParenter']['<Tree>GrandChildParenter'].parent()

#Definition the AttestedStr
SYS._attest(
    [
        'MyParenter is '+SYS._str(
        MyParenter,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
) 

#Print



*****Start of the Attest *****

MyParenter is < (ParenterClass), 4557737552>
   /{ 
   /  '<New><Instance>IdInt' : 4557737552
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopParenter
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /{ 
   /   /  'ChildParenter' : < (ParenterClass), 4557736144>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557736144
   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : ChildParenter
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ParenterClass), 4557737552>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557625744>
   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  'GrandChildParenter' : < (ParenterClass), 4557735312>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>IdInt' : 4557735312
   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /   /   /  '<New><Instance>NodeKeyStr' : GrandChildParenter
   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ParenterClass), 4557736144>
   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557626928>
   /   /   /   /   /  '<Spe><Class>ParentingWalkBool' : True
   /   /   /   /   /  '<Spe><Instance>ParentedDeriveParentersList' : 
   /   /   /   /   /   /[
   /   /   /   /   /   /  0 : {...}< (ParenterClass), 4557736144>
   /   /   /   /   /   /  1 : {...}< (ParenterClass), 4557737552>
   /   /   /   /   /   /]
   /   /   /   /   /  '<Spe><Instance>ParentedNodeCollectionStrsList' : ['', '']
   /   /   /   /   /  '<Spe><Instance>ParentedNodePathStr' : TopParenter/ChildParenter
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<Spe><Class>ParentingWalkBool' : True
   /   /   /  '<Spe><Instance>ParentedDeriveParentersList' : 
   /   /   /   /[
   /   /   /   /  0 : {...}< (ParenterClass), 4557737552>
   /   /   /   /]
   /   /   /  '<Spe><Instance>ParentedNodeCollectionStrsList' : ['']
   /   /   /  '<Spe><Instance>ParentedNodePathStr' : TopParenter
   /   /   /}
   /   /}
   /  '<Spe><Class>ParentedNodePathStr' : 
   /  '<Spe><Class>ParentingWalkBool' : True
   /  '<Spe><Instance>ParentedDeriveParentersList' : []
   /  '<Spe><Instance>ParentedNodeCollectionStrsList' : []
   /}

*****End of the Attest *****


Collecter

Doc


Collecter instances


View the Collecter notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Collecter.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


Collecter instances

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Parenter"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
from ShareYourSystem.Standards.Classors import Doer
from ShareYourSystem.Standards.Noders import Noder
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class CollecterClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[   
                                    'CollectingCollectionStr',
                                    'CollectingNodeKeyStr',
                                    'CollectingNodeVariable',
                                    'CollectedGetStr',
                                    'CollectedSuffixStr',
                                    'CollectedSetTagStr'
                                ]

    #@Hooker.HookerClass(**{'HookingAfterVariablesList':[{'CallingVariable':BaseClass.__init__}]})
    def default_init(self,
                        _CollectingCollectionStr="",
                        _CollectingNodeKeyStr="",
                        _CollectingNodeVariable=None,
                        _CollectedGetStr="",
                        _CollectedSuffixStr="",
                        _CollectedSetTagStr="",
                        **_KwargVariablesDict
                    ):

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_collect(self):

        #debug
        '''
        self.debug(('self.',self,[
                        'CollectingCollectionStr',
                        'CollectingNodeKeyStr',
                        'CollectingNodeVariable'
                    ]))
        '''

        #Set
        self.CollectedGetStr=Noder.NodingPrefixGetStr+self.CollectingCollectionStr+Noder.NodingSuffixGetStr

        #Add a typing suffix Str
        if hasattr(self.CollectingNodeVariable.__class__,'NameStr'):
            self.CollectedSuffixStr=self.CollectingNodeVariable.__class__.NameStr  
        else:
            CollectedTypeStr=type(self.CollectingNodeVariable).__name__
            self.CollectedSuffixStr=CollectedTypeStr[0].upper()+CollectedTypeStr[1:]

        #set
        self.CollectedSetTagStr=self.CollectedGetStr+self.CollectingNodeKeyStr+self.CollectedSuffixStr

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

        #node
        self[self.CollectedSetTagStr]=self.CollectingNodeVariable

#</DefineClass>

View the Collecter sources on Github


In [25]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Noder,Collecter

#Definition of an instance
MyCollecter=Collecter.CollecterClass().collect(
    'Nodome',
    'First',
    Noder.NoderClass()
).collect(
    'Nodome',
    'Second',
    Noder.NoderClass()
)

#Definition the AttestedStr
SYS._attest(
    [
        'MyCollecter is '+SYS._str(
        MyCollecter,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
) 

#Print



*****Start of the Attest *****

MyCollecter is < (CollecterClass), 4557737616>
   /{ 
   /  '<New><Instance>IdInt' : 4557737616
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopCollecter
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>NodomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstNoder' : < (NoderClass), 4557737424>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557737424
   /   /   /  '<New><Instance>NodeCollectionStr' : Nodome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstNoder
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (CollecterClass), 4557737616>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624264>
   /   /   /  '<Spe><Class>NodedCollectionIndexInt' : -1
   /   /   /  '<Spe><Class>NodedCollectionOrderedDict' : None
   /   /   /  '<Spe><Class>NodedCollectionStr' : 
   /   /   /  '<Spe><Class>NodedKeyStr' : 
   /   /   /  '<Spe><Class>NodingCollectionStr' : 
   /   /   /}
   /   /  'SecondNoder' : < (NoderClass), 4557705680>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557705680
   /   /   /  '<New><Instance>NodeCollectionStr' : Nodome
   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /  '<New><Instance>NodeKeyStr' : SecondNoder
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (CollecterClass), 4557737616>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624264>
   /   /   /  '<Spe><Class>NodedCollectionIndexInt' : -1
   /   /   /  '<Spe><Class>NodedCollectionOrderedDict' : None
   /   /   /  '<Spe><Class>NodedCollectionStr' : 
   /   /   /  '<Spe><Class>NodedKeyStr' : 
   /   /   /  '<Spe><Class>NodingCollectionStr' : 
   /   /   /}
   /   /}
   /  '<Spe><Instance>CollectedGetStr' : <Nodome>
   /  '<Spe><Instance>CollectedSetTagStr' : <Nodome>SecondNoder
   /  '<Spe><Instance>CollectedSuffixStr' : Noder
   /  '<Spe><Instance>CollectingCollectionStr' : Nodome
   /  '<Spe><Instance>CollectingNodeKeyStr' : Second
   /  '<Spe><Instance>CollectingNodeVariable' : {...}< (NoderClass), 4557705680>
   /}

*****End of the Attest *****


Catcher

Doc


Catcher instances grasps a Variable, sets a Pointer on it that will be then collected


View the Catcher notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Catcher.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>

Catcher instances grasps a Variable, sets a Pointer on it that will be then collected 

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Applyiers.Producer"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
from ShareYourSystem.Standards.Itemizers import Pointer
from ShareYourSystem.Standards.Noders import Noder
import collections
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class CatcherClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                'CatchingCollectionStr',
                                'CatchingUpdateVariable',
                                'CatchingNodeKeyStr',
                                'CatchingDefaultNodeKeyStrBool',
                                'CatchingDerivePointerClass',
                                'CatchingPointBackSetStr',
                                'CatchedGraspVariable',
                                'CatchedNodeKeyStr',
                                'CatchedDerivePointerVariable'
                            ]

    def default_init(self,
                        _CatchingCollectionStr="",
                        _CatchingUpdateVariable=None,
                        _CatchingNodeKeyStr="",
                        _CatchingDefaultNodeKeyStrBool=True,
                        _CatchingDerivePointerClass=Pointer.PointerClass,
                        _CatchingPointBackSetStr="",
                        _CatchedGraspVariable=None,
                        _CatchedNodeKeyStr="",
                        _CatchedDerivePointerVariable=None,
                        **_KwargVariablesDict
                    ):

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_catch(self):

        #debug
        '''
        self.debug(
                    ('self.',self,[
                                    'CollectingCollectionStr',
                                    'GraspingClueVariable'
                                ])
                )
        '''

        #grasp
        '''
        self.grasp(
            self.GraspingClueVariable
        )
        '''

        #link
        if type(self.GraspingClueVariable)==SYS.GraspDictClass:
            self.CatchingUpdateVariable=self.GraspingClueVariable

        #Defaut set for the collection keyStr
        if self.CatchingDefaultNodeKeyStrBool:

            #Check
            CatchedGetStr=">UnknowPath<"
            if type(self.GraspingClueVariable) in SYS.StrTypesList:

                #set
                CatchedGetStr=self.GraspingClueVariable

            elif type(self.GraspingClueVariable)==SYS.GraspDictClass and type(
                self.GraspingClueVariable['HintVariable']) in SYS.StrTypesList:

                #set
                CatchedGetStr=self.GraspingClueVariable['HintVariable']

            elif hasattr(self.GraspedAnswerVariable,'parent'):

                #Get the up
                CatchedUpNodeKeyStrsList=(self.parent(
                    ).ParentedNodePathStr+'/'+self.NodeKeyStr).split('/')
                CatchedUpNodeKeyStrsList.reverse()
                CatchedUpPathStr='/'.join(CatchedUpNodeKeyStrsList[:-1])

                #Get the down
                CatchedDownNodeKeyStrsList=(self.GraspedAnswerVariable.parent(
                    ).ParentedNodePathStr+'/'+self.GraspedAnswerVariable.NodeKeyStr).split('/')
                CatchedDownPathStr='/'.join(CatchedDownNodeKeyStrsList[1:])

                #Get the top
                CatchedTopStr=CatchedUpNodeKeyStrsList[-1]

                if CatchedUpNodeKeyStrsList[-1]==CatchedDownNodeKeyStrsList[0]:

                    #set
                    CatchedGetStr=CatchedUpPathStr+'>'+CatchedTopStr+'<'+CatchedDownPathStr                 

            #set
            self.CatchedNodeKeyStr=CatchedGetStr

        else:

            #Look for one
            self.CatchedNodeKeyStr=self.CatchingNodeKeyStr

        #adapt the 
        self.CatchedNodeKeyStr=self.CatchedNodeKeyStr.replace('/','_')

        #debug
        '''
        self.debug(
                    ('self.',self,[
                                    'CatchingCollectionStr',
                                    'CatchedNodeKeyStr'
                                ])
                    )
        '''

        #Check
        if self.CatchingCollectionStr=="":
            self.CatchingCollectionStr=self.CollectingCollectionStr

        #init
        self.CatchedDerivePointerVariable=self.CatchingDerivePointerClass(
            **{
                'PointingBackSetStr':self.CatchingPointBackSetStr
            }
        ).point(
            self.GraspedAnswerVariable,
            'CatchToPointVariable'
        )

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

        #collect and update
        self.collect(
            self.CatchingCollectionStr,
            self.CatchedNodeKeyStr,
            self.CatchedDerivePointerVariable
        )

        #set
        self.CatchedDerivePointerVariable.update(
            self.CatchingUpdateVariable
        )

#</DefineClass>

View the Catcher sources on Github

Example

With a point back


In [29]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Applyiers import Producer
from ShareYourSystem.Standards.Noders import Catcher

#Definition of an instance
MyProducer=Producer.ProducerClass().produce(
            ['First','Second'],
            Catcher.CatcherClass,
            **{'CollectingCollectionStr':"Pointome"}
        )

#point
MyProducer['<Pointome>FirstCatcher'].grasp(
            '/NodePointDeriveNoder/<Pointome>SecondCatcher'
        ).catch(
            _PointBackSetStr='MyBackVariable',
            **{
                'CollectingCollectionStr':'Relatome',
            }
    )

#Definition the AttestedStr
SYS._attest(
    [
        'MyProducer is '+SYS._str(
        MyProducer,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
) 

#Print



*****Start of the Attest *****

MyProducer is < (ProducerClass), 4557706512>
   /{ 
   /  '<New><Instance>IdInt' : 4557706512
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopProducer
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>PointomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstCatcher' : < (CatcherClass), 4556355856>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4556355856
   /   /   /  '<New><Instance>NodeCollectionStr' : Pointome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstCatcher
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4557706512>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557648544>
   /   /   /  '<New><Instance>RelatomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  '_NodePointDeriveNoder_<Pointome>SecondCatcherPointer' : < (PointerClass), 4555536528>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>IdInt' : 4555536528
   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : < (CatcherClass), 4556357264>
   /   /   /   /   /   /{ 
   /   /   /   /   /   /  '<New><Instance>IdInt' : 4556357264
   /   /   /   /   /   /  '<New><Instance>MyBackVariable' : {...}< (PointerClass), 4555536528>
   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Pointome
   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : SecondCatcher
   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4557706512>
   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557648544>
   /   /   /   /   /   /  '<Spe><Class>CatchedDerivePointerVariable' : None
   /   /   /   /   /   /  '<Spe><Class>CatchedGraspVariable' : None
   /   /   /   /   /   /  '<Spe><Class>CatchedNodeKeyStr' : 
   /   /   /   /   /   /  '<Spe><Class>CatchingCollectionStr' : 
   /   /   /   /   /   /  '<Spe><Class>CatchingDefaultNodeKeyStrBool' : True
   /   /   /   /   /   /  '<Spe><Class>CatchingDerivePointerClass' : <class 'ShareYourSystem.Standards.Itemizers.Pointer.PointerClass'>
   /   /   /   /   /   /  '<Spe><Class>CatchingNodeKeyStr' : 
   /   /   /   /   /   /  '<Spe><Class>CatchingPointBackSetStr' : 
   /   /   /   /   /   /  '<Spe><Class>CatchingUpdateVariable' : None
   /   /   /   /   /   /}
   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (CatcherClass), 4556357264>
   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /  '<Spe><Instance>PointedPathBackVariable' : {...}< (PointerClass), 4555536528>
   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : MyBackVariable
   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (CatcherClass), 4556357264>
   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<Spe><Class>CatchedGraspVariable' : None
   /   /   /  '<Spe><Class>CatchingDefaultNodeKeyStrBool' : True
   /   /   /  '<Spe><Class>CatchingDerivePointerClass' : {...}< (type), 140476488083952>
   /   /   /  '<Spe><Class>CatchingNodeKeyStr' : 
   /   /   /  '<Spe><Class>CatchingUpdateVariable' : None
   /   /   /  '<Spe><Instance>CatchedDerivePointerVariable' : {...}< (PointerClass), 4555536528>
   /   /   /  '<Spe><Instance>CatchedNodeKeyStr' : _NodePointDeriveNoder_<Pointome>SecondCatcher
   /   /   /  '<Spe><Instance>CatchingCollectionStr' : Relatome
   /   /   /  '<Spe><Instance>CatchingPointBackSetStr' : MyBackVariable
   /   /   /}
   /   /  'SecondCatcher' : {...}< (CatcherClass), 4556357264>
   /   /}
   /  '<Spe><Class>ProducingUpdateVariable' : None
   /  '<Spe><Instance>ProducedPushList' : 
   /   /[
   /   /  0 : 
   /   /   /[
   /   /   /  0 : First
   /   /   /  1 : {...}< (CatcherClass), 4556355856>
   /   /   /]
   /   /  1 : 
   /   /   /[
   /   /   /  0 : Second
   /   /   /  1 : {...}< (CatcherClass), 4556357264>
   /   /   /]
   /   /]
   /  '<Spe><Instance>ProducingCollectionKeyStrsList' : ['First', 'Second']
   /  '<Spe><Instance>ProducingPushClass' : <class 'ShareYourSystem.Standards.Noders.Catcher.CatcherClass'>
   /}

*****End of the Attest *****


Attentioner

Doc


Attentioner instances grasp a Variable and make inside a catch to the original instance


View the Attentioner notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Attentioner.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


Attentioner instances grasp a Variable and make inside a catch to the original
instance

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Catcher"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
from ShareYourSystem.Standards.Classors import Doer
from ShareYourSystem.Standards.Noders import Noder
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class AttentionerClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                'AttentioningCollectionStr'
                            ]

    def default_init(self,
                        _AttentioningCollectionStr="",
                        **_KwargVariablesDict
                    ):

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_attention(self):

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

        #set
        if self.AttentioningCollectionStr=="":
            self.AttentioningCollectionStr=self.CollectingCollectionStr

        #debug
        self.debug(
                    ('self.',self,[
                            'AttentioningCollectionStr',
                            'GraspingClueVariable'
                            ])
                )

        #poitn in the other way
        self.GraspedAnswerVariable.grasp(
                self
            ).catch(
                self.AttentioningCollectionStr
            )



#</DefineClass>

View the Attentioner sources on Github


In [32]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Applyiers import Producer
from ShareYourSystem.Standards.Noders import Attentioner

#Definition of an instance
MyProducer=Producer.ProducerClass().produce(
            ['First','Second'],
            Attentioner.AttentionerClass,
            **{'CollectingCollectionStr':"Pointome"}
        )

#attention
MyProducer['<Pointome>FirstAttentioner'].grasp(
        '/NodePointDeriveNoder/<Pointome>SecondAttentioner'
    ).attention(
        'BackRelatome'
    )

#Definition the AttestedStr
SYS._attest(
    [
        'MyProducer is '+SYS._str(
        MyProducer,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
) 

#Print


                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    ////////////////////////////////
                    Attentioner/__init__.py do_attention
                    From Attentioner/__init__.py do_attention | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                    ////////////////////////////////
                    
                    l.60 : 
                    *****
                    I am with [('NodeKeyStr', 'FirstAttentioner')]
                    *****
                    self.AttentioningCollectionStr is BackRelatome
                    self.GraspingClueVariable is /NodePointDeriveNoder/<Pointome>SecondAttentioner
                    
                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                        


*****Start of the Attest *****

MyProducer is < (ProducerClass), 4556960144>
   /{ 
   /  '<New><Instance>IdInt' : 4556960144
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopProducer
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>PointomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstAttentioner' : < (AttentionerClass), 4556961360>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4556961360
   /   /   /  '<New><Instance>NodeCollectionStr' : Pointome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstAttentioner
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4556960144>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557648840>
   /   /   /  '<Spe><Instance>AttentioningCollectionStr' : BackRelatome
   /   /   /}
   /   /  'SecondAttentioner' : < (AttentionerClass), 4556960848>
   /   /   /{ 
   /   /   /  '<New><Instance>BackRelatomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  'SecondAttentioner>TopProducer<FirstAttentionerPointer' : < (PointerClass), 4557735568>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>IdInt' : 4557735568
   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (AttentionerClass), 4556961360>
   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (AttentionerClass), 4556961360>
   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (AttentionerClass), 4556961360>
   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<New><Instance>IdInt' : 4556960848
   /   /   /  '<New><Instance>NodeCollectionStr' : Pointome
   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /  '<New><Instance>NodeKeyStr' : SecondAttentioner
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4556960144>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557648840>
   /   /   /  '<Spe><Class>AttentioningCollectionStr' : 
   /   /   /}
   /   /}
   /  '<Spe><Class>ProducingUpdateVariable' : None
   /  '<Spe><Instance>ProducedPushList' : 
   /   /[
   /   /  0 : 
   /   /   /[
   /   /   /  0 : First
   /   /   /  1 : {...}< (AttentionerClass), 4556961360>
   /   /   /]
   /   /  1 : 
   /   /   /[
   /   /   /  0 : Second
   /   /   /  1 : {...}< (AttentionerClass), 4556960848>
   /   /   /]
   /   /]
   /  '<Spe><Instance>ProducingCollectionKeyStrsList' : ['First', 'Second']
   /  '<Spe><Instance>ProducingPushClass' : <class 'ShareYourSystem.Standards.Noders.Attentioner.AttentionerClass'>
   /}

*****End of the Attest *****


Coupler

Doc


A Coupler


View the Coupler notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Coupler.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Coupler 

"""


#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Attentioner"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>

from ShareYourSystem.Standards.Itemizers import Pather
from ShareYourSystem.Standards.Noders import Noder
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class CouplerClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                'CouplingNodeStr',
                                'CouplingGetStr',
                                'CoupledGetStr'
                            ]

    def default_init(self,
                        _CouplingNodeStr="",
                        _CouplingGetStr="", 
                        _CoupledGetStr="",
                        **_KwargVariablesDict
                    ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_couple(self):

        #debug
        '''
        self.debug(('self.',self,[
                                    'CouplingNodeStr',
                                    'CouplingGetStr',
                                    'PointingBackBool'
                                ]))
        '''

        #set
        self.CoupledGetStr=Noder.NodingPrefixGetStr+self.CouplingNodeStr+Noder.NodingSuffixGetStr
        self.PointingSetPathStr=self.CoupledGetStr+self.CouplingGetStr.split(
                        Noder.NodingSuffixGetStr
                    )[-1]

        #debug
        '''
        self.debug(('self.',self,['CoupledGetStr','PointingSetPathStr']))
        '''

        #point
        self.point(
                    self.CouplingGetStr,
                    self.PointingSetPathStr
                )

        #Return self
        #return self

#</DefineClass>

View the Coupler sources on Github


In [35]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Coupler

#store
MyCoupler=Coupler.CouplerClass().collect(
        'Couplome',
        'FirstChild',
        Coupler.CouplerClass()
).collect(
        'Couplome',
        'SecondChild',
        Coupler.CouplerClass()
)

#couple
MyCoupler['<Couplome>SecondChildCoupler'].couple(
            'Relatome',
            '/NodePointDeriveNoder/<Couplome>FirstChildCoupler'
    )

#Return
SYS._attest(
    [
    'MyCoupler is '+SYS._str(
            MyCoupler,
            **{
                'RepresentingBaseKeyStrsListBool':False,
                'RepresentingAlineaIsBool':False
            }
        )
    ]
)

#Print



*****Start of the Attest *****

MyCoupler is < (CouplerClass), 4557184912>
   /{ 
   /  '<New><Instance>CouplomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstChildCoupler' : < (CouplerClass), 4557737552>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557737552
   /   /   /  '<New><Instance>NodeCollectionStr' : Relatome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstChildCoupler
   /   /   /  '<New><Instance>NodePointDeriveNoder' : < (CouplerClass), 4557734864>
   /   /   /   /{ 
   /   /   /   /  '<New><Instance>IdInt' : 4557734864
   /   /   /   /  '<New><Instance>NodeCollectionStr' : Couplome
   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /  '<New><Instance>NodeKeyStr' : SecondChildCoupler
   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (CouplerClass), 4557184912>
   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557626928>
   /   /   /   /  '<New><Instance>RelatomeCollectionOrderedDict' : 
   /   /   /   /   /{ 
   /   /   /   /   /  'FirstChildCoupler' : {...}< (CouplerClass), 4557737552>
   /   /   /   /   /}
   /   /   /   /  '<Spe><Instance>CoupledGetStr' : <Relatome>
   /   /   /   /  '<Spe><Instance>CouplingGetStr' : /NodePointDeriveNoder/<Couplome>FirstChildCoupler
   /   /   /   /  '<Spe><Instance>CouplingNodeStr' : Relatome
   /   /   /   /}
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557625744>
   /   /   /  '<Spe><Class>CoupledGetStr' : 
   /   /   /  '<Spe><Class>CouplingGetStr' : 
   /   /   /  '<Spe><Class>CouplingNodeStr' : 
   /   /   /}
   /   /  'SecondChildCoupler' : {...}< (CouplerClass), 4557734864>
   /   /}
   /  '<New><Instance>IdInt' : 4557184912
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopCoupler
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<Spe><Class>CoupledGetStr' : 
   /  '<Spe><Class>CouplingGetStr' : 
   /  '<Spe><Class>CouplingNodeStr' : 
   /}

*****End of the Attest *****


Settler

Doc


A Settler


View the Settler notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Settler.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Settler 

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Coupler"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
import copy
from ShareYourSystem.Standards.Itemizers import Pather
from ShareYourSystem.Applyiers import Linker
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass(**{'ClassingSwitchMethodStrsList':['settle']})
class SettlerClass(
                    BaseClass,
                    Linker.LinkerClass
                    ):

    #Definition
    RepresentingKeyStrsList=[
                                'SettlingParentBool',
                                'SettlingLinkBool'
                            ]

    def default_init(self,
                _SettlingParentBool=False,
                _SettlingLinkBool=False,
                **_KwargVariablesDict):

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

    #@Switcher.SwitcherClass()
    def do_settle(self):

        #debug
        '''
        self.debug('We settle here')
        '''

        #Parent first
        if self.SettlingParentBool:

            #debug
            '''
            self.debug('We parent here')
            '''

            #parent
            self.parent()

        #link
        if self.SettlingLinkBool:

            #debug
            '''
            self.debug('We link here')
            '''

            #link
            self.link()

        #Return self
        #return self

    #@Imitater.ImitaterClass()
    def mimic_set(self):

        #debug


        #Call the parent method
        OutputDict=BaseClass.set(self)

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

        #Check
        if self.SettingKeyVariable=='NodePointDeriveNoder' and self.SettingValueVariable!=None:

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

            #settle
            self.settle()

        #return 
        #return OutputDict

#</DefineClass>

View the Settler sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [39]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Settler

#Short expression and set in the appended manner
MySettler=Settler.SettlerClass().__setitem__(
    '<Settlome>ChildSettler',
    Settler.SettlerClass()
).update(
    [
        (
            '<Settlome>GrandFirstChildSettler',
            Settler.SettlerClass()
        ),
        (
            '<Settlome>GrandSecondChildSettler',
            Settler.SettlerClass(**{
                'SettlingParentBool':True,
                'SettlingLinkBool':True
                }
                ).__setitem__(
                'LinkingPointListsList',
                [
        ('/NodePointDeriveNoder/<Settlome>GrandFirstChildSettler','GrandFirstChildSettler')
                ]
            )
        )
    ]
)



#Definition the AttestedStr
SYS._attest(
    [
        'MySettler is '+SYS._str(
        MySettler,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
) 
#Print



*****Start of the Attest *****

MySettler is < (SettlerClass), 4556962512>
   /{ 
   /  '<New><Instance>IdInt' : 4556962512
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopSettler
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>SettlomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'ChildSettler' : < (SettlerClass), 4557737488>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557737488
   /   /   /  '<New><Instance>NodeCollectionStr' : Settlome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : ChildSettler
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (SettlerClass), 4556962512>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557626632>
   /   /   /  '<Spe><Class>SettlingLinkBool' : False
   /   /   /  '<Spe><Class>SettlingParentBool' : False
   /   /   /}
   /   /  'GrandFirstChildSettler' : < (SettlerClass), 4557736464>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557736464
   /   /   /  '<New><Instance>NodeCollectionStr' : Settlome
   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /  '<New><Instance>NodeKeyStr' : GrandFirstChildSettler
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (SettlerClass), 4556962512>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557626632>
   /   /   /  '<Spe><Class>SettlingLinkBool' : False
   /   /   /  '<Spe><Class>SettlingParentBool' : False
   /   /   /}
   /   /  'GrandSecondChildSettler' : < (SettlerClass), 4557737680>
   /   /   /{ 
   /   /   /  '<New><Instance>GrandFirstChildSettler' : {...}< (SettlerClass), 4557736464>
   /   /   /  '<New><Instance>IdInt' : 4557737680
   /   /   /  '<New><Instance>NodeCollectionStr' : Settlome
   /   /   /  '<New><Instance>NodeIndexInt' : 2
   /   /   /  '<New><Instance>NodeKeyStr' : GrandSecondChildSettler
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (SettlerClass), 4556962512>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557626632>
   /   /   /  '<Spe><Instance>SettlingLinkBool' : True
   /   /   /  '<Spe><Instance>SettlingParentBool' : True
   /   /   /}
   /   /}
   /  '<Spe><Class>SettlingLinkBool' : False
   /  '<Spe><Class>SettlingParentBool' : False
   /}

*****End of the Attest *****


Connecter

Doc


Connecter instances catch grasped variables and makes an attention also on it.


View the Connecter notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Connecter.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>

Connecter instances catch grasped variables and makes an attention also on it.

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Walkers.Mobilizer"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class ConnecterClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                'ConnectingGraspClueVariablesList',
                                'ConnectedCatchDerivePointersList'
                            ]

    def default_init(self,
                        _ConnectingGraspClueVariablesList=None,
                        _ConnectedCatchDerivePointersList=None,
                        **_KwargVariablesDict
                    ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_connect(self):   

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

        #catch
        self.ConnectedCatchDerivePointersList=map(
                lambda __ConnectingGraspVariable:
                self.grasp(
                        __ConnectingGraspVariable
                    ).catch(
                    ).attention(
                    ).GraspedAnswerVariable,
                self.ConnectingGraspClueVariablesList
            )

#</DefineClass>

View the Connecter sources on Github


In [43]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Applyiers import Producer
from ShareYourSystem.Standards.Noders import Connecter

#Definition of an instance
MyProducer=Producer.ProducerClass().produce(
            ['First','Second'],
            Connecter.ConnecterClass,
            **{'CollectingCollectionStr':"Connectome"}
        )

#connect
MyProducer['<Connectome>FirstConnecter'].connect(
    [
        '/NodePointDeriveNoder/<Connectome>SecondConnecter',
        SYS.GraspDictClass(**{'MyInt':0,'HintVariable':MyProducer['<Connectome>FirstConnecter']})
    ],
    **{
        'CatchingCollectionStr':"PostRelatome",
        'AttentioningCollectionStr':"PreRelatome",
    }
)

#Definition the AttestedStr
SYS._attest(
    [
        'MyProducer is '+SYS._str(
        MyProducer,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
) 

#Print


                        
                        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                        ////////////////////////////////
                        Attentioner/__init__.py do_attention
                        From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                        ////////////////////////////////
                        
                        l.60 : 
                        *****
                        I am with [('NodeKeyStr', 'FirstConnecter')]
                        *****
                        self.AttentioningCollectionStr is PreRelatome
                        self.GraspingClueVariable is /NodePointDeriveNoder/<Connectome>SecondConnecter
                        
                        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                
                        
                        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                        ////////////////////////////////
                        Attentioner/__init__.py do_attention
                        From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                        ////////////////////////////////
                        
                        l.60 : 
                        *****
                        I am with [('NodeKeyStr', 'FirstConnecter')]
                        *****
                        self.AttentioningCollectionStr is PreRelatome
                        self.GraspingClueVariable is GraspDictClass([('MyInt', 0), ('HintVariable', < (ConnecterClass), 4557706960>
                           /{ 
                           /  '<New><Instance>IdInt' : 4557706960
                           /  '<New><Instance>NodeCollectionStr' : Connectome
                           /  '<New><Instance>NodeIndexInt' : 0
                           /  '<New><Instance>NodeKeyStr' : FirstConnecter
                           /  '<New><Instance>NodePointDeriveNoder' : < (ProducerClass), 4557735312>
                           /   /{ 
                           /   /  '<New><Instance>ConnectomeCollectionOrderedDict' : 
                           /   /   /{ 
                           /   /   /  'FirstConnecter' : < (ConnecterClass), 4557706960>
                           /   /   /   /{ 
                           /   /   /   /  '<New><Instance>IdInt' : 4557706960
                           /   /   /   /  '<New><Instance>NodeCollectionStr' : Connectome
                           /   /   /   /  '<New><Instance>NodeIndexInt' : 0
                           /   /   /   /  '<New><Instance>NodeKeyStr' : FirstConnecter
                           /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4557735312>
                           /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624560>
                           /   /   /   /  '<New><Instance>PostRelatomeCollectionOrderedDict' : 
                           /   /   /   /   /{ 
                           /   /   /   /   /  '_NodePointDeriveNoder_<Connectome>SecondConnecterPointer' : < (PointerClass), 4557705808>
                           /   /   /   /   /   /{ 
                           /   /   /   /   /   /  '<New><Instance>IdInt' : 4557705808
                           /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : < (ConnecterClass), 4557707024>
                           /   /   /   /   /   /   /{ 
                           /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557707024
                           /   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Connectome
                           /   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
                           /   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : SecondConnecter
                           /   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4557735312>
                           /   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624560>
                           /   /   /   /   /   /   /  '<New><Instance>PreRelatomeCollectionOrderedDict' : 
                           /   /   /   /   /   /   /   /{ 
                           /   /   /   /   /   /   /   /  'SecondConnecter>TopProducer<FirstConnecterPointer' : < (PointerClass), 4557707216>
                           /   /   /   /   /   /   /   /   /{ 
                           /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557707216
                           /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
                           /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
                           /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
                           /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
                           /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
                           /   /   /   /   /   /   /   /   /}
                           /   /   /   /   /   /   /   /}
                           /   /   /   /   /   /   /  '<New><Instance>WatchParentWithParenterBool' : True
                           /   /   /   /   /   /   /  '<Spe><Class>ConnectedCatchDerivePointersList' : None
                           /   /   /   /   /   /   /  '<Spe><Class>ConnectingGraspClueVariablesList' : None
                           /   /   /   /   /   /   /}
                           /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
                           /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
                           /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557707024>
                           /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
                           /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
                           /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557707024>
                           /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
                           /   /   /   /   /   /}
                           /   /   /   /   /  'FirstConnecter>TopProducer<FirstConnecterPointer' : < (PointerClass), 4557705360>
                           /   /   /   /   /   /{ 
                           /   /   /   /   /   /  '<New><Instance>HintVariable' : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /   /   /  '<New><Instance>IdInt' : 4557705360
                           /   /   /   /   /   /  '<New><Instance>MyInt' : 0
                           /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
                           /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
                           /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
                           /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
                           /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
                           /   /   /   /   /   /}
                           /   /   /   /   /}
                           /   /   /   /  '<New><Instance>WatchParentWithParenterBool' : True
                           /   /   /   /  '<Spe><Instance>ConnectedCatchDerivePointersList' : []
                           /   /   /   /  '<Spe><Instance>ConnectingGraspClueVariablesList' : 
                           /   /   /   /   /[
                           /   /   /   /   /  0 : /NodePointDeriveNoder/<Connectome>SecondConnecter
                           /   /   /   /   /  1 : {...}< (GraspDictClass), 4557648248>
                           /   /   /   /   /]
                           /   /   /   /}
                           /   /   /  'SecondConnecter' : {...}< (ConnecterClass), 4557707024>
                           /   /   /}
                           /   /  '<New><Instance>IdInt' : 4557735312
                           /   /  '<New><Instance>NodeCollectionStr' : Globals
                           /   /  '<New><Instance>NodeIndexInt' : -1
                           /   /  '<New><Instance>NodeKeyStr' : TopProducer
                           /   /  '<New><Instance>NodePointDeriveNoder' : None
                           /   /  '<New><Instance>NodePointOrderedDict' : None
                           /   /  '<New><Instance>WatchParentWithParenterBool' : True
                           /   /  '<Spe><Class>ProducingUpdateVariable' : None
                           /   /  '<Spe><Instance>ProducedPushList' : 
                           /   /   /[
                           /   /   /  0 : 
                           /   /   /   /[
                           /   /   /   /  0 : First
                           /   /   /   /  1 : {...}< (ConnecterClass), 4557706960>
                           /   /   /   /]
                           /   /   /  1 : 
                           /   /   /   /[
                           /   /   /   /  0 : Second
                           /   /   /   /  1 : {...}< (ConnecterClass), 4557707024>
                           /   /   /   /]
                           /   /   /]
                           /   /  '<Spe><Instance>ProducingCollectionKeyStrsList' : ['First', 'Second']
                           /   /  '<Spe><Instance>ProducingPushClass' : <class 'ShareYourSystem.Standards.Noders.Connecter.ConnecterClass'>
                           /   /}
                           /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624560>
                           /  '<New><Instance>PostRelatomeCollectionOrderedDict' : {...}< (OrderedDict), 4557625448>
                           /  '<New><Instance>WatchParentWithParenterBool' : True
                           /  '<Spe><Instance>ConnectedCatchDerivePointersList' : {...}< (list), 4556980592>
                           /  '<Spe><Instance>ConnectingGraspClueVariablesList' : {...}< (list), 4558788728>
                           /})])
                        
                        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                


*****Start of the Attest *****

MyProducer is < (ProducerClass), 4557735312>
   /{ 
   /  '<New><Instance>ConnectomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstConnecter' : < (ConnecterClass), 4557706960>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557706960
   /   /   /  '<New><Instance>NodeCollectionStr' : Connectome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstConnecter
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4557735312>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624560>
   /   /   /  '<New><Instance>PostRelatomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  '_NodePointDeriveNoder_<Connectome>SecondConnecterPointer' : < (PointerClass), 4557705808>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>IdInt' : 4557705808
   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : < (ConnecterClass), 4557707024>
   /   /   /   /   /   /{ 
   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557707024
   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Connectome
   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : SecondConnecter
   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4557735312>
   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624560>
   /   /   /   /   /   /  '<New><Instance>PreRelatomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /  'SecondConnecter>TopProducer<FirstConnecterPointer' : < (PointerClass), 4557707216>
   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557707216
   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /}
   /   /   /   /   /   /  '<Spe><Class>ConnectedCatchDerivePointersList' : None
   /   /   /   /   /   /  '<Spe><Class>ConnectingGraspClueVariablesList' : None
   /   /   /   /   /   /}
   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557707024>
   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557707024>
   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /}
   /   /   /   /  'FirstConnecter>TopProducer<FirstConnecterPointer' : < (PointerClass), 4557705360>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>HintVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<New><Instance>IdInt' : 4557705360
   /   /   /   /   /  '<New><Instance>MyInt' : 0
   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<New><Instance>PreRelatomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  'FirstConnecter>TopProducer<FirstConnecterPointer' : < (PointerClass), 4557706640>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>HintVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<New><Instance>IdInt' : 4557706640
   /   /   /   /   /  '<New><Instance>MyInt' : 0
   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557706960>
   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<Spe><Instance>ConnectedCatchDerivePointersList' : 
   /   /   /   /[
   /   /   /   /  0 : {...}< (ConnecterClass), 4557707024>
   /   /   /   /  1 : {...}< (ConnecterClass), 4557706960>
   /   /   /   /]
   /   /   /  '<Spe><Instance>ConnectingGraspClueVariablesList' : 
   /   /   /   /[
   /   /   /   /  0 : /NodePointDeriveNoder/<Connectome>SecondConnecter
   /   /   /   /  1 : GraspDictClass([('MyInt', 0), ('HintVariable', < (ConnecterClass), 4557706960>
   /{ 
   /  '<New><Instance>IdInt' : 4557706960
   /  '<New><Instance>NodeCollectionStr' : Connectome
   /  '<New><Instance>NodeIndexInt' : 0
   /  '<New><Instance>NodeKeyStr' : FirstConnecter
   /  '<New><Instance>NodePointDeriveNoder' : {...}< (ProducerClass), 4557735312>
   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624560>
   /  '<New><Instance>PostRelatomeCollectionOrderedDict' : {...}< (OrderedDict), 4557625448>
   /  '<New><Instance>PreRelatomeCollectionOrderedDict' : {...}< (OrderedDict), 4557624856>
   /  '<New><Instance>WatchParentWithParenterBool' : True
   /  '<Spe><Instance>ConnectedCatchDerivePointersList' : {...}< (list), 4556999208>
   /  '<Spe><Instance>ConnectingGraspClueVariablesList' : {...}< (list), 4558788728>
   /})])
   /   /   /   /]
   /   /   /}
   /   /  'SecondConnecter' : {...}< (ConnecterClass), 4557707024>
   /   /}
   /  '<New><Instance>IdInt' : 4557735312
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopProducer
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<Spe><Class>ProducingUpdateVariable' : None
   /  '<Spe><Instance>ProducedPushList' : 
   /   /[
   /   /  0 : 
   /   /   /[
   /   /   /  0 : First
   /   /   /  1 : {...}< (ConnecterClass), 4557706960>
   /   /   /]
   /   /  1 : 
   /   /   /[
   /   /   /  0 : Second
   /   /   /  1 : {...}< (ConnecterClass), 4557707024>
   /   /   /]
   /   /]
   /  '<Spe><Instance>ProducingCollectionKeyStrsList' : ['First', 'Second']
   /  '<Spe><Instance>ProducingPushClass' : <class 'ShareYourSystem.Standards.Noders.Connecter.ConnecterClass'>
   /}

*****End of the Attest *****


Networker

Doc


A Networker


View the Networker notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Networker.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Networker 

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Connecter"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
from ShareYourSystem.Standards.Noders import Noder
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass(**{'ClassingSwitchMethodStrsList':["network"]})
class NetworkerClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                    'NetworkedDeriveConnectersList',
                                    'NetworkedConnectionTuplesList'
                                ]

    #@Hooker.HookerClass(**{'HookingAfterVariablesList':[{'CallingVariable':BaseClass.__init__}]})
    def default_init(self,
                        _NetworkingSuffixStr="Connectome",
                        _NetworkingCatchStr="Post",
                        _NetworkingAttentionStr="Pre",
                        _NetworkedDeriveConnectersList=None,
                        _NetworkedConnectionTuplesList=None,
                        **_KwargVariablesDict
                    ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

        #map
        map(
                lambda __KeyStr:
                self.__setattr__(
                        __KeyStr,
                        ""
                    ),
                map(
                        lambda __TagStr:
                        'Newtork'+__TagStr+'Str',
                        ['Collection','Catch','Attention']
                    )
            )

    def do_network(self):   

        #recruit first
        if self.VisitingCollectionStrsList==None:
            self.VisitingCollectionStrsList=[self.CollectingCollectionStr]

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

        #recruit
        self.recruit()
        self.NetworkedDeriveConnectersList=self.RecruitedFlatCumulateVariablesList

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

        #map a connect
        self.NetworkedConnectionTuplesList=map(
                lambda __NodedDeriveConnecter:
                (
                    __NodedDeriveConnecter,
                    __NodedDeriveConnecter.connect(
                        **{
                            'CatchingCollectionStr':self.NetworkingCatchStr+self.NetworkingSuffixStr,
                            'AttentioningCollectionStr':self.NetworkingAttentionStr+self.NetworkingSuffixStr
                        }
                    ).update(
                        [
                            ('NetworkCollectionStr',self.NetworkingSuffixStr),
                            ('NetworkCatchStr',self.NetworkingCatchStr),
                            ('NetworkAttentionStr',self.NetworkingAttentionStr)
                        ]
                    ).pick(
                        [
                            'ConnectedAttentionDeriveConnectersList',
                            'ConnectedCatchDerivePointersList'
                        ]
                    )
                ),
                self.NetworkedDeriveConnectersList
        )
#</DefineClass>

View the Networker sources on Github


In [46]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Connecter,Networker
import operator

#Definition of a brian structure
MyNetworker=Networker.NetworkerClass(
    ).push(
[
    (
        'First',
        Connecter.ConnecterClass().update(
            [
                ('ConnectingGraspClueVariablesList',
                    [
                        '/NodePointDeriveNoder/<Connectome>SecondConnecter'
                    ]
                ),
                ('TagStr','Networked')
            ]
        )
    ),
    (
        'Second',
        Connecter.ConnecterClass().__setitem__(
            'TagStr',
            'Networked'
        )
    )
],
    **{
        'CollectingCollectionStr':'Connectome'
    }
).network(
    **{
                'RecruitingConcludeConditionVariable':[
                    ('__class__.NameStr',operator.eq,'Connecter')
                ]
        }
    )

#Definition the AttestedStr
SYS._attest(
    [
        'MyNetworker is '+SYS._str(
        MyNetworker,
        **{
            'RepresentingBaseKeyStrsList':False,
            'RepresentingAlineaIsBool':False
        }
        ),
    ]
) 

#Print


                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                            ////////////////////////////////
                            Attentioner/__init__.py do_attention
                            From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | Networker/__init__.py do_network | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                            ////////////////////////////////
                            
                            l.60 : 
                            *****
                            I am with [('NodeKeyStr', 'FirstConnecter')]
                            *****
                            self.AttentioningCollectionStr is PreConnectome
                            self.GraspingClueVariable is /NodePointDeriveNoder/<Connectome>SecondConnecter
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        


*****Start of the Attest *****

MyNetworker is < (NetworkerClass), 4557737872>
   /{ 
   /  '<New><Instance>ConnectomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstConnecter' : < (ConnecterClass), 4557735376>
   /   /   /{ 
   /   /   /  '<New><Instance>ConnectomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /}
   /   /   /  '<New><Instance>IdInt' : 4557735376
   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /  '<New><Instance>NodeCollectionStr' : Connectome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstConnecter
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (NetworkerClass), 4557737872>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557623376>
   /   /   /  '<New><Instance>PostConnectomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  '_NodePointDeriveNoder_<Connectome>SecondConnecterPointer' : < (PointerClass), 4557736656>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>IdInt' : 4557736656
   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : < (ConnecterClass), 4557706704>
   /   /   /   /   /   /{ 
   /   /   /   /   /   /  '<New><Instance>ConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /}
   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557706704
   /   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Connectome
   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : SecondConnecter
   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (NetworkerClass), 4557737872>
   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557623376>
   /   /   /   /   /   /  '<New><Instance>PreConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /  'SecondConnecter>TopNetworker<FirstConnecterPointer' : < (PointerClass), 4557734032>
   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557734032
   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (ConnecterClass), 4557735376>
   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557735376>
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557735376>
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /}
   /   /   /   /   /   /  '<New><Instance>TagStr' : Networked
   /   /   /   /   /   /  '<Spe><Instance>ConnectedCatchDerivePointersList' : []
   /   /   /   /   /   /  '<Spe><Instance>ConnectingGraspClueVariablesList' : []
   /   /   /   /   /   /}
   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (ConnecterClass), 4557706704>
   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (ConnecterClass), 4557706704>
   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<New><Instance>TagStr' : Networked
   /   /   /  '<Spe><Instance>ConnectedCatchDerivePointersList' : 
   /   /   /   /[
   /   /   /   /  0 : {...}< (ConnecterClass), 4557706704>
   /   /   /   /]
   /   /   /  '<Spe><Instance>ConnectingGraspClueVariablesList' : ['/NodePointDeriveNoder/<Connectome>SecondConnecter']
   /   /   /}
   /   /  'SecondConnecter' : {...}< (ConnecterClass), 4557706704>
   /   /}
   /  '<New><Instance>IdInt' : 4557737872
   /  '<New><Instance>NewtorkAttentionStr' : 
   /  '<New><Instance>NewtorkCatchStr' : 
   /  '<New><Instance>NewtorkCollectionStr' : 
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopNetworker
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<Spe><Instance>NetworkedConnectionTuplesList' : 
   /   /[
   /   /  0 : 
   /   /   /(
   /   /   /  0 : {...}< (ConnecterClass), 4557735376>
   /   /   /  1 : 
   /   /   /   /[
   /   /   /   /  0 : None
   /   /   /   /  1 : {...}< (list), 4557541104>
   /   /   /   /]
   /   /   /)
   /   /  1 : 
   /   /   /(
   /   /   /  0 : {...}< (ConnecterClass), 4557706704>
   /   /   /  1 : 
   /   /   /   /[
   /   /   /   /  0 : None
   /   /   /   /  1 : {...}< (list), 4555686904>
   /   /   /   /]
   /   /   /)
   /   /]
   /  '<Spe><Instance>NetworkedDeriveConnectersList' : 
   /   /[
   /   /  0 : {...}< (ConnecterClass), 4557735376>
   /   /  1 : {...}< (ConnecterClass), 4557706704>
   /   /]
   /}

*****End of the Attest *****


Transmitter

Doc


A Transmitter


View the Transmitter notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Transmitter.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Transmitter

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Networker"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
import copy
from ShareYourSystem.Standards.Itemizers import Pather
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class TransmitterClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                'TransmittingUpdateList',
                                'TransmittingCollectionStrsList',
                                'TransmittedVariablesList',
                                'TransmittingSelfIsBool'
                            ]

    def default_init(self,
            _TransmittingUpdateList=None,
            _TransmittingCollectionStrsList=None,
            _TransmittingSelfIsBool=True,
            _TransmittedVariablesList=None,
            **_KwargVariablesDict
        ):  

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

    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
                    )

        #Return self
        #return self

#</DefineClass>

View the Transmitter sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [50]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Transmitter
import operator

#Definition of a brian structure
MyTransmitter=Transmitter.TransmitterClass(
    ).push(
[
    (
        'First',
        Transmitter.TransmitterClass().update(
            [
                ('ConnectingCatchGetStrsList',
                    [
                        '/NodePointDeriveNoder/<Transmitome>SecondTransmitter'
                    ]
                ),
                ('ConnectingGraspClueVariablesList',
                    [
                        '/NodePointDeriveNoder/<Transmitome>SecondTransmitter'
                    ]
                ),
                ('TagStr','Networked')
            ]
        )
    ),
    (
        'Second',
        Transmitter.TransmitterClass().__setitem__(
            'TagStr',
            'Networked'
        )
    )
],
    **{
        'CollectingCollectionStr':'Transmitome'
    }
).network(
    **{
                'RecruitingConcludeConditionVariable':[
                    ('__class__.NameStr',operator.eq,'Transmitter')
                ]
        }
)

#transmit
MyTransmitter['<Transmitome>FirstTransmitter'].transmit(
    [('MyInt',0)],
    ['PostConnectome']
)

#Definition the AttestedStr
SYS._attest(
    [
        'MyTransmitter is '+SYS._str(
        MyTransmitter,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        )
    ]
) 

#Print


                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                            ////////////////////////////////
                            Attentioner/__init__.py do_attention
                            From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | Networker/__init__.py do_network | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                            ////////////////////////////////
                            
                            l.60 : 
                            *****
                            I am with [('NodeKeyStr', 'FirstTransmitter')]
                            *****
                            self.AttentioningCollectionStr is PreConnectome
                            self.GraspingClueVariable is /NodePointDeriveNoder/<Transmitome>SecondTransmitter
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        


*****Start of the Attest *****

MyTransmitter is < (TransmitterClass), 4557734736>
   /{ 
   /  '<New><Instance>IdInt' : 4557734736
   /  '<New><Instance>NetworkAttentionStr' : Pre
   /  '<New><Instance>NetworkCatchStr' : Post
   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /  '<New><Instance>NewtorkAttentionStr' : 
   /  '<New><Instance>NewtorkCatchStr' : 
   /  '<New><Instance>NewtorkCollectionStr' : 
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopTransmitter
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>TransmitomeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstTransmitter' : < (TransmitterClass), 4557734480>
   /   /   /{ 
   /   /   /  '<New><Instance>ConnectingCatchGetStrsList' : ['/NodePointDeriveNoder/<Transmitome>SecondTransmitter']
   /   /   /  '<New><Instance>IdInt' : 4557734480
   /   /   /  '<New><Instance>MyInt' : 0
   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /  '<New><Instance>NodeCollectionStr' : Transmitome
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstTransmitter
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (TransmitterClass), 4557734736>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624264>
   /   /   /  '<New><Instance>PostConnectomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  '_NodePointDeriveNoder_<Transmitome>SecondTransmitterPointer' : < (PointerClass), 4557737296>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>IdInt' : 4557737296
   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : < (TransmitterClass), 4557735952>
   /   /   /   /   /   /{ 
   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557735952
   /   /   /   /   /   /  '<New><Instance>MyInt' : 0
   /   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Transmitome
   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : SecondTransmitter
   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (TransmitterClass), 4557734736>
   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557624264>
   /   /   /   /   /   /  '<New><Instance>PreConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /  'SecondTransmitter>TopTransmitter<FirstTransmitterPointer' : < (PointerClass), 4557736336>
   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557736336
   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (TransmitterClass), 4557734480>
   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (TransmitterClass), 4557734480>
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (TransmitterClass), 4557734480>
   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /}
   /   /   /   /   /   /  '<New><Instance>TagStr' : Networked
   /   /   /   /   /   /  '<New><Instance>TransmitomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /}
   /   /   /   /   /   /  '<Spe><Class>TransmittedVariablesList' : None
   /   /   /   /   /   /  '<Spe><Class>TransmittingCollectionStrsList' : None
   /   /   /   /   /   /  '<Spe><Class>TransmittingSelfIsBool' : True
   /   /   /   /   /   /  '<Spe><Class>TransmittingUpdateList' : None
   /   /   /   /   /   /}
   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (TransmitterClass), 4557735952>
   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (TransmitterClass), 4557735952>
   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<New><Instance>TagStr' : Networked
   /   /   /  '<New><Instance>TransmitomeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /}
   /   /   /  '<Spe><Class>TransmittingSelfIsBool' : True
   /   /   /  '<Spe><Instance>TransmittedVariablesList' : 
   /   /   /   /[
   /   /   /   /  0 : {...}< (TransmitterClass), 4557735952>
   /   /   /   /]
   /   /   /  '<Spe><Instance>TransmittingCollectionStrsList' : ['PostConnectome']
   /   /   /  '<Spe><Instance>TransmittingUpdateList' : 
   /   /   /   /[
   /   /   /   /  0 : ('MyInt', 0)
   /   /   /   /]
   /   /   /}
   /   /  'SecondTransmitter' : {...}< (TransmitterClass), 4557735952>
   /   /}
   /  '<Spe><Class>TransmittedVariablesList' : None
   /  '<Spe><Class>TransmittingCollectionStrsList' : None
   /  '<Spe><Class>TransmittingSelfIsBool' : True
   /  '<Spe><Class>TransmittingUpdateList' : None
   /}

*****End of the Attest *****


Grouper

Doc


A Grouper establishes a group of parenting nodes for which each level is setted in equivalent hdf5 structure.


View the Grouper notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Grouper.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Grouper establishes a group of parenting nodes for which 
each level is setted in equivalent hdf5 structure.

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Transmitter"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
import functools

from ShareYourSystem.Standards.Classors import Doer
#</ImportSpecificModules>

#<DefineFunctions>
def getGroupedPathStrWithPathStrsList(_PathStrsList):

    #Reduce
    PathStr=functools.reduce(
            lambda _TotalPathStr,_PathStr:
            _TotalPathStr+_PathStr 
            if (len(_TotalPathStr)>0 and _TotalPathStr[-1]=='/') and (len(_PathStr)>0 and _PathStr[0]!='/'
                ) or (len(_TotalPathStr)>0 and _TotalPathStr[-1]!='/') and (len(_PathStr)>0 and _PathStr[0]=='/')
            else 
            _TotalPathStr[:-1]+_PathStr 
            if (len(_TotalPathStr)>0 and _TotalPathStr[-1]=='/') and (len(_PathStr)>0 and _PathStr[0]=='/'
                )
            else _TotalPathStr+'/'+_PathStr 
            if '/' not in [_PathStr,_TotalPathStr]
            else "",
            _PathStrsList
            )

    #Maybe add / at the beginning
    if (len(PathStr)>0 and PathStr[0]!='/') or PathStr=="":
        PathStr='/'+PathStr

    #Return
    return PathStr
#</DefineFunctions>

#<DefineClass>
@DecorationClass()
class GrouperClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                    'GroupedParentVariable',
                                    'GroupedInt',
                                    'GroupedKeyStr',
                                    'GroupedDeriveParentersList',
                                    'GroupedPathStrsList',
                                    'GroupedPathStr'
                                ]

    #@Hooker.HookerClass(**{'HookingAfterVariablesList':[{'CallingVariable':BaseClass.__init__}]})
    def default_init(
                self,
                _GroupedParentVariable=None,
                _GroupedInt=-1,
                _GroupedKeyStr="",
                _GroupedDeriveParentersList=None,
                _GroupedPathStrsList=None,
                _GroupedPathStr="/",
                **_KwargVariablesDict
            ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

        #set
        self.HdformatingFileKeyStr=SYS.InflectEngine.plural(
            Doer.DoerStrToDoStrOrderedDict[
                self.__class__.NameStr
                ]
            )+'.hdf5'

    def do_group(self):

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

        #Parent
        self.parent()

        #Check
        if len(self.ParentedDeriveParentersList)>0:
            UppestParentPointer=self.ParentedDeriveParentersList[-1]
        else:
            UppestParentPointer=self

        #Then get also from the UppestParentPointer its UppestGroupedParentVariable
        if hasattr(UppestParentPointer,'GroupedDeriveParentersList'):
            if len(UppestParentPointer.GroupedDeriveParentersList)>0:
                UppestGroupedParentVariable=UppestParentPointer.GroupedDeriveParentersList.GroupedDeriveParentersList[-1]
            else:
                UppestGroupedParentVariable=UppestParentPointer

        #Link
        self.HdformatedFileVariable=UppestGroupedParentVariable.HdformatedFileVariable

        #debug
        #print('self.HdformatedFileVariable is ',self.HdformatedFileVariable)

        #Create a group in the hdf5 file
        if self.HdformatedFileVariable!=None:

            #debug
            '''
            self.debug(
                        [
                            'UppestGroupedParentVariable.GroupedPathStr is '+UppestGroupedParentVariable.GroupedPathStr,
                            ('self.',self,[
                                        'ParentedNodePathStr',
                                        'NodedKeyStr'
                                    ])
                        ]
                    )
            '''

            #set the GroupedPathStr
            if UppestParentPointer==self:
                self.GroupedPathStr="/"
            else:
                self.GroupedPathStr=getGroupedPathStrWithPathStrsList(
                    [
                        UppestGroupedParentVariable.GroupedPathStr,
                        self.ParentedNodePathStr,
                        self.NodeKeyStr
                    ]
                )

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

            #Check if the Path exists
            if self.GroupedPathStr not in self.HdformatedFileVariable:

                #set all the intermediate Paths before
                PathStrsList=self.GroupedPathStr.split('/')[1:]
                ParsingChildPathStr="/"

                #set the PathStr from the top to the down (integrativ loop)
                for ChildPathStr in PathStrsList:

                    #Go deeper
                    NewParsingChildPathStr=ParsingChildPathStr+ChildPathStr

                    #Create the group if not already
                    if NewParsingChildPathStr not in self.HdformatedFileVariable:
                        if self.HdformatingModuleStr=="tables":
                            self.HdformatedFileVariable.create_group(ParsingChildPathStr,ChildPathStr)
                        elif self.HdformatingModuleStr=="h5py":
                            Group=self.HdformatedFileVariable[ParsingChildPathStr]
                            Group.create_group(ChildPathStr)

                    #Prepare the next group 
                    ParsingChildPathStr=NewParsingChildPathStr+'/'

        #Return self
        #return self

#</DefineClass>

View the Grouper sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [54]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Grouper

#Definition a structure of Grouper
MyGrouper=Grouper.GrouperClass().hdformat().update(
    [
        (
            '<Tree>FirstChildGrouper',
            Grouper.GrouperClass().update(
                [
                    ('<Tree>GrandChildGrouper',
                    Grouper.GrouperClass())
                ]
            )
        ),
        (
            '<Tree>SecondChildGrouper',
            Grouper.GrouperClass()
        )
    ]
)

#Walk to set the same structure in the hdf5
MyGrouper.walk(
        {
                'BeforeUpdateList':
                [
                    ('parent',{'LiargVariablesList':['Tree']}),
                    ('group',{'LiargVariablesList':[]})
                ],
                'GatherVariablesList':['<Tree>']
        }
).hdfclose()

#Definition the AttestedStr
SYS._attest(
    [
        'MyGrouper is '+SYS._str(
        MyGrouper,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
            }
        ),
        'MyGrouper.hdfview().HdformatedConsoleStr is '+MyGrouper.hdfview().HdformatedConsoleStr
    ]
) 

#Print



*****Start of the Attest *****

MyGrouper is < (GrouperClass), 4557736720>
   /{ 
   /  '<New><Instance>IdInt' : 4557736720
   /  '<New><Instance>NewtorkAttentionStr' : 
   /  '<New><Instance>NewtorkCatchStr' : 
   /  '<New><Instance>NewtorkCollectionStr' : 
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopGrouper
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstChildGrouper' : < (GrouperClass), 4557737424>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557737424
   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstChildGrouper
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (GrouperClass), 4557736720>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558901328>
   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  'GrandChildGrouper' : < (GrouperClass), 4557736080>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>IdInt' : 4557736080
   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /   /   /  '<New><Instance>NodeKeyStr' : GrandChildGrouper
   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (GrouperClass), 4557737424>
   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4557717040>
   /   /   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<Spe><Class>GroupedInt' : -1
   /   /   /   /   /  '<Spe><Class>GroupedKeyStr' : 
   /   /   /   /   /  '<Spe><Class>GroupedParentVariable' : None
   /   /   /   /   /  '<Spe><Instance>GroupedDeriveParentersList' : []
   /   /   /   /   /  '<Spe><Instance>GroupedPathStr' : /TopGrouper/FirstChildGrouper/GrandChildGrouper
   /   /   /   /   /  '<Spe><Instance>GroupedPathStrsList' : []
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<Spe><Class>GroupedInt' : -1
   /   /   /  '<Spe><Class>GroupedKeyStr' : 
   /   /   /  '<Spe><Class>GroupedParentVariable' : None
   /   /   /  '<Spe><Instance>GroupedDeriveParentersList' : []
   /   /   /  '<Spe><Instance>GroupedPathStr' : /TopGrouper/FirstChildGrouper
   /   /   /  '<Spe><Instance>GroupedPathStrsList' : []
   /   /   /}
   /   /  'SecondChildGrouper' : < (GrouperClass), 4557736208>
   /   /   /{ 
   /   /   /  '<New><Instance>IdInt' : 4557736208
   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /  '<New><Instance>NodeKeyStr' : SecondChildGrouper
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (GrouperClass), 4557736720>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558901328>
   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /}
   /   /   /  '<Spe><Class>GroupedInt' : -1
   /   /   /  '<Spe><Class>GroupedKeyStr' : 
   /   /   /  '<Spe><Class>GroupedParentVariable' : None
   /   /   /  '<Spe><Instance>GroupedDeriveParentersList' : []
   /   /   /  '<Spe><Instance>GroupedPathStr' : /TopGrouper/SecondChildGrouper
   /   /   /  '<Spe><Instance>GroupedPathStrsList' : []
   /   /   /}
   /   /}
   /  '<Spe><Class>GroupedInt' : -1
   /  '<Spe><Class>GroupedKeyStr' : 
   /  '<Spe><Class>GroupedParentVariable' : None
   /  '<Spe><Instance>GroupedDeriveParentersList' : []
   /  '<Spe><Instance>GroupedPathStr' : /
   /  '<Spe><Instance>GroupedPathStrsList' : []
   /}

------

MyGrouper.hdfview().HdformatedConsoleStr is /                        Group
/TopGrouper              Group
/TopGrouper/FirstChildGrouper Group
/TopGrouper/FirstChildGrouper/GrandChildGrouper Group
/TopGrouper/SecondChildGrouper Group


*****End of the Attest *****


Structurer

Doc


A Structurer is the last level of class that helps for building hierarchic structures. For a certain it walks to group everybody in the hfd5.


View the Structurer notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Structurer.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


A Structurer is the last level of class that helps for building
hierarchic structures. For a certain <StructuringNodeStr> it walks to group
everybody in the hfd5.

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Grouper"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
from ShareYourSystem.Standards.Noders import Noder
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class StructurerClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                    'StructuringNodeCollectionStrsList',
                                    'StructuringBeforeUpdateList'
                                ]

    #@Hooker.HookerClass(**{'HookingAfterVariablesList':[{'CallingVariable':BaseClass.__init__}]})
    def default_init(self,
                        _StructuringNodeCollectionStrsList=[],
                        _StructuringBeforeUpdateList=None,
                        **_KwargVariablesDict
                    ):

        #Call the parent __init__ method
        BaseClass.__init__(self,**_KwargVariablesDict)

    #@Hooker.HookerClass(**{'HookingAfterVariablesList':[{'CallingMethodStr':'hdformat'}]})
    def do_structure(self):

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

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

        """
        print([
                            ('parent',{'LiargVariablesList':[self.ParentingNodeStr]}),
                            ('group',{'LiargVariablesList':[]})
                        ]+self.StructuringBeforeUpdateList)
        """

        #Walk while parentizing and grouping
        self.walk(
                    {
                        'BeforeUpdateList':
                        [
                            ('parent',{'LiargVariablesList':[]}),
                            ('group',{'LiargVariablesList':[]})
                        ]+self.StructuringBeforeUpdateList,
                        'GatherVariablesList':map(
                                lambda __StructuringNodeCollectionStr:
                                Noder.NodingPrefixGetStr+__StructuringNodeCollectionStr+Noder.NodingSuffixGetStr,
                                self.StructuringNodeCollectionStrsList
                            )
                    }
                )

        #Return self
        #return self

#</DefineClass>

View the Structurer sources on Github

Example

Let's create an empty class, which will automatically receive special attributes from the decorating ClassorClass, specially the NameStr, that should be the ClassStr without the TypeStr in the end.


In [58]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Noders import Structurer

#Definition a "graph" structure
MyStructurer=Structurer.StructurerClass().update(
    [
        (
            '<Graph>FirstChildStructurer',
            Structurer.StructurerClass().update(
            [
                ('<Graph>GrandChildStructurer',
                Structurer.StructurerClass())
            ])
        ),
        (
            '<Graph>SecondChildStructurer',
            Structurer.StructurerClass().update(
            [
                ('<Tree>OtherGrandChildStructurer',
                Structurer.StructurerClass())
            ])
        )
    ]
).structure(['Graph','Tree']).hdfclose()
    
#Definition the AttestedStr
SYS._attest(
    [
        'MyStructurer is '+SYS._str(
        MyStructurer,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        ),
        'MyStructurer.hdfview().HdformatedConsoleStr is '+MyStructurer.hdfview().HdformatedConsoleStr
    ]
) 

#Print



*****Start of the Attest *****

MyStructurer is < (StructurerClass), 4556963664>
   /{ 
   /  '<New><Instance>GraphCollectionOrderedDict' : 
   /   /{ 
   /   /  'FirstChildStructurer' : < (StructurerClass), 4557734800>
   /   /   /{ 
   /   /   /  '<New><Instance>GraphCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  'GrandChildStructurer' : < (StructurerClass), 4557708688>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>GraphCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>IdInt' : 4557708688
   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Graph
   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /   /   /  '<New><Instance>NodeKeyStr' : GrandChildStructurer
   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (StructurerClass), 4557734800>
   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558903104>
   /   /   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<Spe><Class>StructuringBeforeUpdateList' : None
   /   /   /   /   /  '<Spe><Class>StructuringNodeCollectionStrsList' : []
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<New><Instance>IdInt' : 4557734800
   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /  '<New><Instance>NodeCollectionStr' : Graph
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : FirstChildStructurer
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (StructurerClass), 4556963664>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558903992>
   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /}
   /   /   /  '<Spe><Class>StructuringBeforeUpdateList' : None
   /   /   /  '<Spe><Class>StructuringNodeCollectionStrsList' : {...}< (list), 4556259696>
   /   /   /}
   /   /  'SecondChildStructurer' : < (StructurerClass), 4557706640>
   /   /   /{ 
   /   /   /  '<New><Instance>GraphCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /}
   /   /   /  '<New><Instance>IdInt' : 4557706640
   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /  '<New><Instance>NodeCollectionStr' : Graph
   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /  '<New><Instance>NodeKeyStr' : SecondChildStructurer
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (StructurerClass), 4556963664>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558903992>
   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  'OtherGrandChildStructurer' : < (StructurerClass), 4557706320>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>GraphCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>IdInt' : 4557706320
   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Tree
   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /   /   /  '<New><Instance>NodeKeyStr' : OtherGrandChildStructurer
   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (StructurerClass), 4557706640>
   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558903696>
   /   /   /   /   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<Spe><Class>StructuringBeforeUpdateList' : None
   /   /   /   /   /  '<Spe><Class>StructuringNodeCollectionStrsList' : {...}< (list), 4556259696>
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<Spe><Class>StructuringBeforeUpdateList' : None
   /   /   /  '<Spe><Class>StructuringNodeCollectionStrsList' : {...}< (list), 4556259696>
   /   /   /}
   /   /}
   /  '<New><Instance>IdInt' : 4556963664
   /  '<New><Instance>NewtorkAttentionStr' : 
   /  '<New><Instance>NewtorkCatchStr' : 
   /  '<New><Instance>NewtorkCollectionStr' : 
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopStructurer
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<New><Instance>TreeCollectionOrderedDict' : 
   /   /{ 
   /   /}
   /  '<Spe><Instance>StructuringBeforeUpdateList' : []
   /  '<Spe><Instance>StructuringNodeCollectionStrsList' : ['Graph', 'Tree']
   /}

------

MyStructurer.hdfview().HdformatedConsoleStr is /                        Group
/TopStructurer           Group
/TopStructurer/FirstChildStructurer Group
/TopStructurer/FirstChildStructurer/GrandChildStructurer Group
/TopStructurer/SecondChildStructurer Group
/TopStructurer/SecondChildStructurer/OtherGrandChildStructurer Group
/xx0xxThingsFindoerTable Dataset {3/Inf}
    Data:
        (0) {RowInt=0, MyInt=1, MyIntsList=[0,0,1], MyStr="bonjour"},
        (1) {RowInt=1, MyInt=0, MyIntsList=[0,0,1], MyStr="guten tag"},
        (2) {RowInt=2, MyInt=1, MyIntsList=[0,0,0], MyStr="bonjour"}
/xx0xxThingsInserterTable Dataset {2/Inf}
    Data:
        (0) {RowInt=0, MyInt=1, MyIntsList=[2,4,6], MyStr="bonjour"},
        (1) {RowInt=1, MyInt=0, MyIntsList=[0,0,0], MyStr="hello"}
/xx0xxThingsRecovererTable Dataset {3/Inf}
    Data:
        (0) {RowInt=0, MyInt=1, MyIntsList=[0,0,1], MyStr="bonjour"},
        (1) {RowInt=1, MyInt=0, MyIntsList=[0,0,1], MyStr="guten tag"},
        (2) {RowInt=2, MyInt=1, MyIntsList=[0,0,0], MyStr="bonjour"}
/xx0xxThingsRetrieverTable Dataset {2/Inf}
    Data:
        (0) {RowInt=0, MyInt=1, MyIntsList=[2,4,6], MyStr="bonjour"},
        (1) {RowInt=1, MyInt=0, MyIntsList=[0,0,0], MyStr="guten tag"}
/xx0xxThingsRowerTable   Dataset {0/Inf}
    Data:

/xx0xxThingsTablerTable  Dataset {0/Inf}
    Data:

/xx0xx__UnitsInt_3__ThingsMergerTable Dataset {2/Inf}
    Data:
        (0) {RowInt=0, MyInt=0, MyIntsList=[0,0,1], MyStr="hello"},
        (1) {RowInt=1, MyInt=1, MyIntsList=[0,0,1], MyStr="bonjour"}
/xx0xx__UnitsInt_3__ThingsShaperTable Dataset {2/Inf}
    Data:
        (0) {RowInt=0, MyInt=0, MyIntsList=[0,0,1], MyStr="hello"},
        (1) {RowInt=1, MyInt=1, MyIntsList=[0,0,1], MyStr="bonjour"}
/xx1xx__UnitsInt_2__ThingsMergerTable Dataset {1/Inf}
    Data:
        (0) {RowInt=0, MyInt=0, MyIntsList=[0,0], MyStr=""}
/xx1xx__UnitsInt_2__ThingsShaperTable Dataset {1/Inf}
    Data:
        (0) {RowInt=0, MyInt=0, MyIntsList=[0,0], MyStr=""}


*****End of the Attest *****


Organizer

Doc


Organizer instances


View the Organizer notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Organizer.ipynb)

Code



# -*- coding: utf-8 -*-
"""


<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>


Organizer instances

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Structurer"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>
from ShareYourSystem.Standards.Modelers import Modeler
from ShareYourSystem.Standards.Noders import Noder
import operator
#</ImportSpecificModules>

#<DefineLocals>
#</DefineLocals>

#<DefineClass>
@DecorationClass(**{
    'ClassingSwitchMethodStrsList':['organize']
})
class OrganizerClass(BaseClass):

    #Definition
    RepresentingKeyStrsList=[
                                'OrganizingModelsCollectionStr',
                                'OrganizingComponentsCollectionStr',
                                'OrganizingOutKeyStrsList',
                                'OrganizingInKeyStrsList',
                                'OrganizingOutStr',
                                'OrganizingInStr',
                                'OrganizedTopDeriveDatabaserVariable',
                                'OrganizedInstallIsBool',
                                'OrganizedDataGetStr',
                                'OrganizedComponentsGetStr',
                                'OrganizedDataGetStr',
                                'OrganizedComponentsGetStr',
                                'OrganizedInConnectAttentionGetStrsList',
                                'OrganizedOutConnectAttentionGetStrsList'
                            ]

    def default_init(self,
                        _OrganizingModelsCollectionStr="Data",
                        _OrganizingComponentsCollectionStr="Component",
                        _OrganizingOutKeyStrsList=None,
                        _OrganizingInKeyStrsList=None,
                        _OrganizingOutStr="Results",
                        _OrganizingInStr="Parameters",
                        _OrganizedTopDeriveDatabaserVariable=None,
                        _OrganizedInstallIsBool=False,
                        _OrganizedDataGetStr="",
                        _OrganizedComponentsGetStr="",
                        _OrganizedInConnectAttentionGetStrsList=None,
                        _OrganizedOutConnectAttentionGetStrsList=None,
                        _OrganizedComponentCollectionOrderedDict=None,
                        **_KwargVariablesDict
                    ):

        #Call the parent init method
        BaseClass.__init__(self,**_KwargVariablesDict)

    def do_organize(self):

        #Check
        if len(self.OrganizingInKeyStrsList)==0:
            self.OrganizingInKeyStrsList=self.__class__.DoingAttributeVariablesOrderedDict.keys()
        if len(self.OrganizingOutKeyStrsList)==0:
            self.OrganizingOutKeyStrsList=self.__class__.DoneAttributeVariablesOrderedDict.keys()

        #set
        self.OrganizedDataGetStr=Noder.NodingPrefixGetStr+self.OrganizingModelsCollectionStr+Noder.NodingSuffixGetStr
        self.OrganizedComponentsGetStr=Noder.NodingPrefixGetStr+self.OrganizingComponentsCollectionStr+Noder.NodingSuffixGetStr

        #Make the hierarchical joins for the ins 
        self.OrganizedInConnectAttentionGetStrsList=map(
                lambda __DeriveNoder:
                '/NodePointDeriveNoder/'+self.OrganizedComponentsGetStr+__DeriveNoder.NodeKeyStr+'/'+self.OrganizedDataGetStr+self.OrganizingInStr+'Hierarchizer',
                self[self.OrganizedComponentsGetStr]
            )

        #Set
        self.OrganizedComponentCollectionOrderedDict=getattr(
            self,
            self.OrganizingComponentsCollectionStr+'CollectionOrderedDict'
        )

        #map
        self.OrganizedOutConnectAttentionGetStrsList=[
                '/NodePointDeriveNoder/'+self.OrganizedDataGetStr+self.OrganizingInStr+'Hierarchizer'
        ]

        #debug
        '''
        self.debug(
                    ('self.',self,[
                                    'OrganizedInConnectAttentionGetStrsList',
                                    'OrganizedOutConnectAttentionGetStrsList'
                                ])
            )
        '''

        #import
        from ShareYourSystem.Standards.Modelers import Hierarchizer

        #Set a parameters and a results database
        self.push(
                [
                    (
                        self.OrganizingInStr,
                        Hierarchizer.HierarchizerClass().update(
                            [
                                (
                                    'Attr_ModelingSealTuplesList',
                                    map(
                                        Modeler.getModelingColumnTupleWithGetKeyStr,
                                        self.OrganizingInKeyStrsList
                                    )
                                ),
                                (
                                    'Attr_RowingGetStrsList',
                                    self.__class__.DoingAttributeVariablesOrderedDict.keys()
                                ),
                                (
                                    'ConnectingGraspClueVariablesList',
                                    self.OrganizedInConnectAttentionGetStrsList
                                )
                            ]
                        )
                    ),
                    (
                        self.OrganizingOutStr,
                        Hierarchizer.HierarchizerClass().update(
                            [
                                (
                                    'Attr_ModelingSealTuplesList',
                                    map(
                                        Modeler.getModelingColumnTupleWithGetKeyStr,
                                        self.OrganizingOutKeyStrsList
                                    )
                                ),
                                (
                                    'ConnectingGraspClueVariablesList',
                                    self.OrganizedOutConnectAttentionGetStrsList
                                ),
                                ('TagStr','Networked')
                            ]
                        )
                    )
                ],
            **{'CollectingCollectionStr':self.OrganizingModelsCollectionStr}
        )

        #set
        self.OrganizedTopDeriveDatabaserVariable=getattr(
                self,
                self.OrganizingModelsCollectionStr+'CollectionOrderedDict'
            ).values()[-1]
#</DefineClass>

View the Organizer sources on Github

Example

Let's do all at the same time : Results-Parameters join and hierarchic joins.


In [62]:
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Standards.Classors import Classer
from ShareYourSystem.Standards.Modelers import Hierarchizer
from ShareYourSystem.Standards.Noders import Organizer
import numpy as np
import operator

#Define a Sumer class
@Classer.ClasserClass()
class SumerClass(Organizer.OrganizerClass):

    #Definition
    RepresentingKeyStrsList=[
                            'SumingFirstInt',
                            'SumingSecondInt',
                            'SumedTotalInt'
                        ]
                            
    def default_init(self,
                        _SumingFirstInt=0,
                        _SumingSecondInt=0,
                        _SumedTotalInt=0,
                    ):

        #Call the parent init method
        self.__class__.__bases__[0].__init__(self)
    
    def do_sum(self):
    
        #debug
        '''
        self.debug(('self.',self,['SumingFirstInt','SumingSecondInt']))
        '''

        #set the SumedTotalInt
        self.SumedTotalInt=self.SumingFirstInt+self.SumingSecondInt

#Define a Factorizer class
@Classer.ClasserClass()
class FactorizerClass(Organizer.OrganizerClass):

    #Definition
    RepresentingKeyStrsList=[
                                'FactorizingPowerFloat',
                                'FactorizedTotalFloat'
                            ]
                            
    def default_init(self,
                        _FactorizingPowerFloat=1.,
                        _FactorizedTotalFloat=0.
                    ):

        #Call the parent init method
        self.__class__.__bases__[0].__init__(self)

        #Build the output hierarchy
        self.produce(
                ['X','Y'],
                SumerClass,
                **{'CollectingCollectionStr':self.OrganizingComponentsCollectionStr}
            )

    def do_factorize(self):

        #debug
        '''
        self.debug('We factorize here')
        '''

        #set the FactorizedTotalFloat
        self.FactorizedTotalFloat=np.power(
            sum(
                map(
                    lambda __DeriveSumer:
                    __DeriveSumer.SumedTotalInt,
                    self['<Component>']
                )
            ),
            self.FactorizingPowerFloat
        )

#Definition of a Factorizer instance, organize structure and network
MyFactorizer=FactorizerClass().walk(
                {
                    'AfterUpdateList':[
                        ('organize',{'LiargVariablesList':[]})
                    ],
                    'GatherVariablesList':['<Component>']
                }
            ).structure(
                ['Component']
            ).network(
                **{
                    'VisitingCollectionStrsList':[
                        'Data','Component'
                    ],
                    'RecruitingConcludeConditionVariable':[
                        (
                            '__class__.__mro__',
                            operator.contains,Hierarchizer.HierarchizerClass
                        )
                    ]
                }
            )

#Update transmit the do method and insert in the results
MyFactorizer.__setitem__(
    "Dis_<Component>",
    [
        [
            ('SumingFirstInt',1),
            ('SumingSecondInt',2)
        ],
        [
            ('SumingFirstInt',1),
            ('SumingSecondInt',3)
        ]
    ]
).walk(
    {
        'AfterUpdateList':[
            ('callDo',{'LiargVariablesList':[]})
        ],
        'GatherVariablesList':['<Component>']
    }
)['<Data>ResultsHierarchizer'].insert()

#Update and insert in the results
MyFactorizer.__setitem__(
    "Dis_<Component>",
    [
        [
            ('SumingFirstInt',2)
        ],
        [
            ('SumingSecondInt',4)
        ]
    ]
).walk(
    {
        'AfterUpdateList':[
            ('callDo',{'LiargVariablesList':[]})
        ],
        'GatherVariablesList':['<Component>']
    }
)['<Data>ResultsHierarchizer'].insert()

#Definition the AttestedStr
SYS._attest(
    [
        'MyFactorizer is '+SYS._str(
        MyFactorizer,
        **{
            'RepresentingBaseKeyStrsListBool':False,
            'RepresentingAlineaIsBool':False
        }
        ),
        'hdf5 file is : '+MyFactorizer.hdfview().hdfclose().HdformatedConsoleStr
    ]
) 

#Print


                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                            ////////////////////////////////
                            Attentioner/__init__.py do_attention
                            From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | Networker/__init__.py do_network | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                            ////////////////////////////////
                            
                            l.60 : 
                            *****
                            I am with [('NodeKeyStr', 'ParametersHierarchizer')]
                            *****
                            self.AttentioningCollectionStr is PreConnectome
                            self.GraspingClueVariable is /NodePointDeriveNoder/<Component>XSumer/<Data>ParametersHierarchizer
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                            ////////////////////////////////
                            Attentioner/__init__.py do_attention
                            From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | Networker/__init__.py do_network | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                            ////////////////////////////////
                            
                            l.60 : 
                            *****
                            I am with [('NodeKeyStr', 'ParametersHierarchizer')]
                            *****
                            self.AttentioningCollectionStr is PreConnectome
                            self.GraspingClueVariable is /NodePointDeriveNoder/<Component>YSumer/<Data>ParametersHierarchizer
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                            ////////////////////////////////
                            Attentioner/__init__.py do_attention
                            From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | Networker/__init__.py do_network | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                            ////////////////////////////////
                            
                            l.60 : 
                            *****
                            I am with [('NodeKeyStr', 'ResultsHierarchizer')]
                            *****
                            self.AttentioningCollectionStr is PreConnectome
                            self.GraspingClueVariable is /NodePointDeriveNoder/<Data>ParametersHierarchizer
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                            ////////////////////////////////
                            Attentioner/__init__.py do_attention
                            From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | Networker/__init__.py do_network | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                            ////////////////////////////////
                            
                            l.60 : 
                            *****
                            I am with [('NodeKeyStr', 'ResultsHierarchizer')]
                            *****
                            self.AttentioningCollectionStr is PreConnectome
                            self.GraspingClueVariable is /NodePointDeriveNoder/<Data>ParametersHierarchizer
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                            ////////////////////////////////
                            Attentioner/__init__.py do_attention
                            From Attentioner/__init__.py do_attention | Connecter/__init__.py do_connect | Networker/__init__.py do_network | site-packages/six.py exec_ | Celler/__init__.py do_cell | Notebooker/__init__.py do_notebook | Documenter/__init__.py do_inform | inform.py <module>
                            ////////////////////////////////
                            
                            l.60 : 
                            *****
                            I am with [('NodeKeyStr', 'ResultsHierarchizer')]
                            *****
                            self.AttentioningCollectionStr is PreConnectome
                            self.GraspingClueVariable is /NodePointDeriveNoder/<Data>ParametersHierarchizer
                            
                            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        


*****Start of the Attest *****

MyFactorizer is < (FactorizerClass), 4557736080>
   /{ 
   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /{ 
   /   /  'XSumer' : < (SumerClass), 4557736720>
   /   /   /{ 
   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /}
   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /{ 
   /   /   /   /  'ParametersHierarchizer' : < (HierarchizerClass), 4556961360>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>IdInt' : 4556961360
   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Data
   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /   /   /  '<New><Instance>NodeKeyStr' : ParametersHierarchizer
   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (SumerClass), 4557736720>
   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558968344>
   /   /   /   /   /  '<New><Instance>PreConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /  'ParametersHierarchizer_XSumer>TopFactorizer<ParametersHierarchizerPointer' : < (PointerClass), 4557735504>
   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557735504
   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : < (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4556961872
   /   /   /   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Data
   /   /   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : ParametersHierarchizer
   /   /   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (FactorizerClass), 4557736080>
   /   /   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : 
   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /  'ParametersHierarchizer' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /   /  'ResultsHierarchizer' : < (HierarchizerClass), 4556960016>
   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4556960016
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Data
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : ResultsHierarchizer
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (FactorizerClass), 4557736080>
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4559088016>
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>PostConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /  '_NodePointDeriveNoder_<Data>ParametersHierarchizerPointer' : < (PointerClass), 4557737488>
   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557737488
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>TagStr' : Networked
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>_ModelingSealTuplesList' : 
   /   /   /   /   /   /   /   /   /   /   /[
   /   /   /   /   /   /   /   /   /   /   /  0 : 
   /   /   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /   /   /  0 : JoinedTopFactorizerResultsHierarchizerModelToTopFactorizerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /   /   /  1 : JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /   /   /  2 : Int64Col(shape=(2,), dflt=0, pos=None)
   /   /   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /   /   /  1 : 
   /   /   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /   /   /  0 : FactorizedTotalFloat
   /   /   /   /   /   /   /   /   /   /   /   /  1 : FactorizedTotalFloat
   /   /   /   /   /   /   /   /   /   /   /   /  2 : Float64Col(shape=(), dflt=0.0, pos=None)
   /   /   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /   /   /]
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>_RowingGetStrsList' : ['JoinedTopFactorizerResultsHierarchizerModelToTopFactorizerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerResultsHierarchizerModelToTopFactorizerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerResultsHierarchizerModelToTopFactorizerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerResultsHierarchizerModelToTopFactorizerParametersHierarchizerModelRetrieveIndexesList']
   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /  '<New><Instance>PostConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /  '_NodePointDeriveNoder_<Component>XSumer_<Data>ParametersHierarchizerPointer' : < (PointerClass), 4557734800>
   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557734800
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (HierarchizerClass), 4556961360>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4556961360>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4556961360>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /  '_NodePointDeriveNoder_<Component>YSumer_<Data>ParametersHierarchizerPointer' : < (PointerClass), 4557735952>
   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557735952
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : < (HierarchizerClass), 4558972880>
   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4558972880
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Data
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : ParametersHierarchizer
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : < (SumerClass), 4557734928>
   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /  'ParametersHierarchizer' : {...}< (HierarchizerClass), 4558972880>
   /   /   /   /   /   /   /   /   /   /   /   /   /  'ResultsHierarchizer' : < (HierarchizerClass), 4558972624>
   /   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4558972624
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Data
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : ResultsHierarchizer
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (SumerClass), 4557734928>
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4559085944>
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>PostConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '_NodePointDeriveNoder_<Data>ParametersHierarchizerPointer' : < (PointerClass), 4557736912>
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557736912
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (HierarchizerClass), 4558972880>
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4558972880>
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4558972880>
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>TagStr' : Networked
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>_ModelingSealTuplesList' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /[
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  0 : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  0 : JoinedYSumerResultsHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  1 : JoinYSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  2 : Int64Col(shape=(2,), dflt=0, pos=None)
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  1 : 
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  0 : SumedTotalInt
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  1 : SumedTotalInt
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /  2 : Int32Col(shape=(), dflt=0, pos=None)
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /   /   /   /   /   /   /]
   /   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>_RowingGetStrsList' : ['JoinedYSumerResultsHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedYSumerResultsHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedYSumerResultsHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedYSumerResultsHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList']
   /   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557734928
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>JoinedYSumerResultsHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList' : [0, 1]
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Component
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodeKeyStr' : YSumer
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (FactorizerClass), 4557736080>
   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558870928>
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>SumedTotalInt' : 5
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>SumingFirstInt' : 1
   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>SumingSecondInt' : 4
   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4559085944>
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>PreConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /  'ParametersHierarchizer_YSumer>TopFactorizer<ParametersHierarchizerPointer' : < (PointerClass), 4557736336>
   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557736336
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /  'ParametersHierarchizer_YSumer>TopFactorizer<YSumer_ResultsHierarchizerPointer' : < (PointerClass), 4557735056>
   /   /   /   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557735056
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (HierarchizerClass), 4558972624>
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4558972624>
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4558972624>
   /   /   /   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>_ModelingSealTuplesList' : 
   /   /   /   /   /   /   /   /   /   /   /   /[
   /   /   /   /   /   /   /   /   /   /   /   /  0 : 
   /   /   /   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /   /   /   /  0 : SumingFirstInt
   /   /   /   /   /   /   /   /   /   /   /   /   /  1 : SumingFirstInt
   /   /   /   /   /   /   /   /   /   /   /   /   /  2 : Int32Col(shape=(), dflt=0, pos=None)
   /   /   /   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /   /   /   /  1 : 
   /   /   /   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /   /   /   /  0 : SumingSecondInt
   /   /   /   /   /   /   /   /   /   /   /   /   /  1 : SumingSecondInt
   /   /   /   /   /   /   /   /   /   /   /   /   /  2 : Int32Col(shape=(), dflt=0, pos=None)
   /   /   /   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /   /   /   /]
   /   /   /   /   /   /   /   /   /   /   /  '<New><Instance>_RowingGetStrsList' : ['SumingFirstInt', 'SumingSecondInt']
   /   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4558972880>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4558972880>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /  '<New><Instance>PreConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /  'ParametersHierarchizer>TopFactorizer<ResultsHierarchizerPointer' : < (PointerClass), 4557735824>
   /   /   /   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557735824
   /   /   /   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (HierarchizerClass), 4556960016>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4556960016>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4556960016>
   /   /   /   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /   /  '<New><Instance>_ModelingSealTuplesList' : 
   /   /   /   /   /   /   /   /   /[
   /   /   /   /   /   /   /   /   /  0 : 
   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /  0 : JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /  1 : JoinXSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /  2 : Int64Col(shape=(2,), dflt=0, pos=None)
   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /  1 : 
   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /  0 : JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /  1 : JoinYSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /   /   /   /  2 : Int64Col(shape=(2,), dflt=0, pos=None)
   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /  2 : 
   /   /   /   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /   /   /   /  0 : FactorizingPowerFloat
   /   /   /   /   /   /   /   /   /   /  1 : FactorizingPowerFloat
   /   /   /   /   /   /   /   /   /   /  2 : Float64Col(shape=(), dflt=0.0, pos=None)
   /   /   /   /   /   /   /   /   /   /)
   /   /   /   /   /   /   /   /   /]
   /   /   /   /   /   /   /   /  '<New><Instance>_RowingGetStrsList' : ['JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList', 'FactorizingPowerFloat']
   /   /   /   /   /   /   /   /}
   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4556961872>
   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /}
   /   /   /   /   /   /  'ParametersHierarchizer_XSumer>TopFactorizer<XSumer_ResultsHierarchizerPointer' : < (PointerClass), 4557736592>{...}< (dict), 4555679456>
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>_ModelingSealTuplesList' : 
   /   /   /   /   /   /[
   /   /   /   /   /   /  0 : 
   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /  0 : SumingFirstInt
   /   /   /   /   /   /   /  1 : SumingFirstInt
   /   /   /   /   /   /   /  2 : Int32Col(shape=(), dflt=0, pos=None)
   /   /   /   /   /   /   /)
   /   /   /   /   /   /  1 : 
   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /  0 : SumingSecondInt
   /   /   /   /   /   /   /  1 : SumingSecondInt
   /   /   /   /   /   /   /  2 : Int32Col(shape=(), dflt=0, pos=None)
   /   /   /   /   /   /   /)
   /   /   /   /   /   /]
   /   /   /   /   /  '<New><Instance>_RowingGetStrsList' : ['SumingFirstInt', 'SumingSecondInt']
   /   /   /   /   /}
   /   /   /   /  'ResultsHierarchizer' : < (HierarchizerClass), 4558972048>
   /   /   /   /   /{ 
   /   /   /   /   /  '<New><Instance>ComponentCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>DataCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>IdInt' : 4558972048
   /   /   /   /   /  '<New><Instance>NetworkAttentionStr' : Pre
   /   /   /   /   /  '<New><Instance>NetworkCatchStr' : Post
   /   /   /   /   /  '<New><Instance>NetworkCollectionStr' : Connectome
   /   /   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /   /   /  '<New><Instance>NodeCollectionStr' : Data
   /   /   /   /   /  '<New><Instance>NodeIndexInt' : 1
   /   /   /   /   /  '<New><Instance>NodeKeyStr' : ResultsHierarchizer
   /   /   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (SumerClass), 4557736720>
   /   /   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558968344>
   /   /   /   /   /  '<New><Instance>PostConnectomeCollectionOrderedDict' : 
   /   /   /   /   /   /{ 
   /   /   /   /   /   /  '_NodePointDeriveNoder_<Data>ParametersHierarchizerPointer' : < (PointerClass), 4557737296>
   /   /   /   /   /   /   /{ 
   /   /   /   /   /   /   /  '<New><Instance>IdInt' : 4557737296
   /   /   /   /   /   /   /  '<New><Instance>CatchToPointVariable' : {...}< (HierarchizerClass), 4556961360>
   /   /   /   /   /   /   /  '<Spe><Class>PointedBackSetStr' : 
   /   /   /   /   /   /   /  '<Spe><Class>PointedPathBackVariable' : 
   /   /   /   /   /   /   /  '<Spe><Instance>PointedGetVariable' : {...}< (HierarchizerClass), 4556961360>
   /   /   /   /   /   /   /  '<Spe><Instance>PointedLocalSetStr' : CatchToPointVariable
   /   /   /   /   /   /   /  '<Spe><Instance>PointingBackSetStr' : 
   /   /   /   /   /   /   /  '<Spe><Instance>PointingGetVariable' : {...}< (HierarchizerClass), 4556961360>
   /   /   /   /   /   /   /  '<Spe><Instance>PointingSetPathStr' : CatchToPointVariable
   /   /   /   /   /   /   /}
   /   /   /   /   /   /}
   /   /   /   /   /  '<New><Instance>TagStr' : Networked
   /   /   /   /   /  '<New><Instance>_ModelingSealTuplesList' : 
   /   /   /   /   /   /[
   /   /   /   /   /   /  0 : 
   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /  0 : JoinedXSumerResultsHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /  1 : JoinXSumerParametersHierarchizerModelRetrieveIndexesList
   /   /   /   /   /   /   /  2 : Int64Col(shape=(2,), dflt=0, pos=None)
   /   /   /   /   /   /   /)
   /   /   /   /   /   /  1 : 
   /   /   /   /   /   /   /(
   /   /   /   /   /   /   /  0 : SumedTotalInt
   /   /   /   /   /   /   /  1 : SumedTotalInt
   /   /   /   /   /   /   /  2 : Int32Col(shape=(), dflt=0, pos=None)
   /   /   /   /   /   /   /)
   /   /   /   /   /   /]
   /   /   /   /   /  '<New><Instance>_RowingGetStrsList' : ['JoinedXSumerResultsHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedXSumerResultsHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedXSumerResultsHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList', 'JoinedXSumerResultsHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList']
   /   /   /   /   /}
   /   /   /   /}
   /   /   /  '<New><Instance>IdInt' : 4557736720
   /   /   /  '<New><Instance>JoinedXSumerResultsHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList' : [0, 1]
   /   /   /  '<New><Instance>NewtorkAttentionStr' : 
   /   /   /  '<New><Instance>NewtorkCatchStr' : 
   /   /   /  '<New><Instance>NewtorkCollectionStr' : 
   /   /   /  '<New><Instance>NodeCollectionStr' : Component
   /   /   /  '<New><Instance>NodeIndexInt' : 0
   /   /   /  '<New><Instance>NodeKeyStr' : XSumer
   /   /   /  '<New><Instance>NodePointDeriveNoder' : {...}< (FactorizerClass), 4557736080>
   /   /   /  '<New><Instance>NodePointOrderedDict' : {...}< (OrderedDict), 4558870928>
   /   /   /  '<Spe><Instance>SumedTotalInt' : 4
   /   /   /  '<Spe><Instance>SumingFirstInt' : 2
   /   /   /  '<Spe><Instance>SumingSecondInt' : 2
   /   /   /}
   /   /  'YSumer' : {...}< (SumerClass), 4557734928>
   /   /}
   /  '<New><Instance>DataCollectionOrderedDict' : {...}< (OrderedDict), 4559088016>
   /  '<New><Instance>IdInt' : 4557736080
   /  '<New><Instance>JoinedTopFactorizerParametersHierarchizerModelToXSumerParametersHierarchizerModelRetrieveIndexesList' : [0, 1]
   /  '<New><Instance>JoinedTopFactorizerParametersHierarchizerModelToYSumerParametersHierarchizerModelRetrieveIndexesList' : [0, 1]
   /  '<New><Instance>JoinedTopFactorizerResultsHierarchizerModelToTopFactorizerParametersHierarchizerModelRetrieveIndexesList' : [0, 1]
   /  '<New><Instance>NewtorkAttentionStr' : 
   /  '<New><Instance>NewtorkCatchStr' : 
   /  '<New><Instance>NewtorkCollectionStr' : 
   /  '<New><Instance>NodeCollectionStr' : Globals
   /  '<New><Instance>NodeIndexInt' : -1
   /  '<New><Instance>NodeKeyStr' : TopFactorizer
   /  '<New><Instance>NodePointDeriveNoder' : None
   /  '<New><Instance>NodePointOrderedDict' : None
   /  '<Spe><Class>FactorizingPowerFloat' : 1.0
   /  '<Spe><Instance>FactorizedTotalFloat' : 9.0
   /}

------

hdf5 file is : /                        Group
/TopFactorizer           Group
/TopFactorizer/XSumer    Group
/TopFactorizer/XSumer/xx0xxParametersHierarchizerTable Dataset {3/Inf}
    Data:
        (0) {RowInt=0, SumingFirstInt=1, SumingSecondInt=2},
        (1) {RowInt=1, SumingFirstInt=2, SumingSecondInt=2},
        (2) {RowInt=2, SumingFirstInt=1, SumingSecondInt=4}
/TopFactorizer/XSumer/xx0xxResultsHierarchizerTable Dataset {3/Inf}
    Data:
        (0) {JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,0], 
        (0)  RowInt=0, SumedTotalInt=3},
        (1) {JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,1], 
        (1)  RowInt=1, SumedTotalInt=4},
        (2) {JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (2)  RowInt=2, SumedTotalInt=5}
/TopFactorizer/YSumer    Group
/TopFactorizer/YSumer/xx0xxParametersHierarchizerTable Dataset {4/Inf}
    Data:
        (0) {RowInt=0, SumingFirstInt=1, SumingSecondInt=3},
        (1) {RowInt=1, SumingFirstInt=1, SumingSecondInt=4},
        (2) {RowInt=2, SumingFirstInt=0, SumingSecondInt=0},
        (3) {RowInt=3, SumingFirstInt=0, SumingSecondInt=3}
/TopFactorizer/YSumer/xx0xxResultsHierarchizerTable Dataset {4/Inf}
    Data:
        (0) {JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,0], 
        (0)  RowInt=0, SumedTotalInt=4},
        (1) {JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,1], 
        (1)  RowInt=1, SumedTotalInt=5},
        (2) {JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (2)  RowInt=2, SumedTotalInt=0},
        (3) {JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,3], 
        (3)  RowInt=3, SumedTotalInt=3}
/xx0xxParametersHierarchizerTable Dataset {7/Inf}
    Data:
        (0) {FactorizingPowerFloat=1, 
        (0)  JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,0], 
        (0)  JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,0], 
        (0)  RowInt=0},
        (1) {FactorizingPowerFloat=1, 
        (1)  JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,1], 
        (1)  JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,1], 
        (1)  RowInt=1},
        (2) {FactorizingPowerFloat=1, 
        (2)  JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,0], 
        (2)  JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (2)  RowInt=2},
        (3) {FactorizingPowerFloat=1, 
        (3)  JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (3)  JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (3)  RowInt=3},
        (4) {FactorizingPowerFloat=1, 
        (4)  JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (4)  JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,3], 
        (4)  RowInt=4},
        (5) {FactorizingPowerFloat=1, 
        (5)  JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (5)  JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,0], 
        (5)  RowInt=5},
        (6) {FactorizingPowerFloat=2, 
        (6)  JoinXSumerParametersHierarchizerModelRetrieveIndexesList=[0,2], 
        (6)  JoinYSumerParametersHierarchizerModelRetrieveIndexesList=[0,0], 
        (6)  RowInt=6}
/xx0xxResultsHierarchizerTable Dataset {7/Inf}
    Data:
        (0) {FactorizedTotalFloat=7, 
        (0)  JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList=[0,
        (0)  0], RowInt=0},
        (1) {FactorizedTotalFloat=9, 
        (1)  JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList=[0,
        (1)  1], RowInt=1},
        (2) {FactorizedTotalFloat=0, 
        (2)  JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList=[0,
        (2)  2], RowInt=2},
        (3) {FactorizedTotalFloat=0, 
        (3)  JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList=[0,
        (3)  3], RowInt=3},
        (4) {FactorizedTotalFloat=0, 
        (4)  JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList=[0,
        (4)  4], RowInt=4},
        (5) {FactorizedTotalFloat=0, 
        (5)  JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList=[0,
        (5)  5], RowInt=5},
        (6) {FactorizedTotalFloat=81, 
        (6)  JoinTopFactorizerParametersHierarchizerModelRetrieveIndexesList=[0,
        (6)  6], RowInt=6}


*****End of the Attest *****