human
Can you provide a code to 2 given the following:
2.2 multiple callbacks in the same class
It is important to be able to assign several callbacks to the same class. Generally speaking, when programing a dashboard two types of callback will be needed:
- Domain speciffic callback: contains the code of the function that will use the widgets as parameters. 
- Layout callback: Logic that controls how the dashboard is displayed. 
In the following example we have an example class with 4 different callbacks applied to its widgets."
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to 2.

from shaolin import Dashboard
from IPython.core.display import clear_output
class ShaoExample(Dashboard):
    
    def __init__(self):
        dashboard = ['column$name=example',
                     ['toggle_buttons$description=Toggle&name=toggle&options=["paramnb","shaolin"]',
                      'textarea$description=Some text&name=text&value=brainstorming',
                      'float_slider$description=Float slider&name=fslider&min=0&max=10&step=1&value=5'
                     ],
                    ]
        Dashboard.__init__(self,dashboard)
        self.fslider.observe(self._update_layout_1)
        self.fslider.observe(self.callback_2)
        self.toggle.observe(self.callback_1)
        self.toggle.observe(self._update_layout_2)
        
        
    def _update_layout_1(self,_=None):
        """Hides the textarea widget when
        the slider value is higher than 5"""
        if self.fslider.value >=5:
            self.text.visible = False
        else:
            self.text.visible = True
            
    def _update_layout_2(self,_=None):
        """Disable the text input when the
        toggle buttons value is shaolin"""
        if self.toggle.value =='shaolin':
            self.text.widget.disabled = False
        else:
            self.text.widget.disabled = True
    
    def callback_1(self,_=None):
        """Prints the textarea value"""
        print(self.text.value)
        clear_output(True)
    
    def callback_2(self,event):
        """Displays the event data passed
        to the callback and the slider value"""
        print("event data: {}".format(event))
        print(self.fslider.value)
        clear_output(True)

shao_e = ShaoExample()

shao_e[0]