How to use the ipywidgets.FloatText function in ipywidgets

To help you get started, we’ve selected a few ipywidgets examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rheiland / xml2jupyter / tests / user_params_baseline_cancer_biobots.py View on Github external
value=0,
          step=0.01,
          style=style, layout=widget_layout)

        param_name7 = Button(description='cargo_relative_repulsion', disabled=True, layout=name_button_layout)
        param_name7.style.button_color = 'lightgreen'

        self.cargo_relative_repulsion = FloatText(
          value=5,
          step=0.1,
          style=style, layout=widget_layout)

        param_name8 = Button(description='worker_o2_relative_uptake', disabled=True, layout=name_button_layout)
        param_name8.style.button_color = 'tan'

        self.worker_o2_relative_uptake = FloatText(
          value=0.1,
          step=0.01,
          style=style, layout=widget_layout)

        param_name9 = Button(description='worker_apoptosis_rate', disabled=True, layout=name_button_layout)
        param_name9.style.button_color = 'lightgreen'

        self.worker_apoptosis_rate = FloatText(
          value=0,
          step=0.01,
          style=style, layout=widget_layout)

        param_name10 = Button(description='worker_motility_persistence_time', disabled=True, layout=name_button_layout)
        param_name10.style.button_color = 'tan'

        self.worker_motility_persistence_time = FloatText(
github rheiland / xml2jupyter / tests / user_params_baseline_default.py View on Github external
value=.1,
          step=0.01,
          style=style, layout=widget_layout)

        param_name5 = Button(description='elastic_coefficient', disabled=True, layout=name_button_layout)
        param_name5.style.button_color = 'lightgreen'

        self.elastic_coefficient = FloatText(
          value=0.05,
          step=0.01,
          style=style, layout=widget_layout)

        param_name6 = Button(description='worker_motility_persistence_time', disabled=True, layout=name_button_layout)
        param_name6.style.button_color = 'tan'

        self.worker_motility_persistence_time = FloatText(
          value=5.0,
          step=0.1,
          style=style, layout=widget_layout)

        param_name7 = Button(description='worker_migration_speed', disabled=True, layout=name_button_layout)
        param_name7.style.button_color = 'lightgreen'

        self.worker_migration_speed = FloatText(
          value=5.0,
          step=0.1,
          style=style, layout=widget_layout)

        param_name8 = Button(description='attached_worker_migration_bias', disabled=True, layout=name_button_layout)
        param_name8.style.button_color = 'tan'

        self.attached_worker_migration_bias = FloatText(
github rheiland / xml2jupyter / tests / user_params_baseline_cancer_immune.py View on Github external
value=0.25,
          step=0.01,
          style=style, layout=widget_layout)

        param_name21 = Button(description='oncoprotein_saturation', disabled=True, layout=name_button_layout)
        param_name21.style.button_color = 'lightgreen'

        self.oncoprotein_saturation = FloatText(
          value=2.0,
          step=0.1,
          style=style, layout=widget_layout)

        param_name22 = Button(description='oncoprotein_threshold', disabled=True, layout=name_button_layout)
        param_name22.style.button_color = 'tan'

        self.oncoprotein_threshold = FloatText(
          value=0.5,
          step=0.1,
          style=style, layout=widget_layout)

        param_name23 = Button(description='max_attachment_distance', disabled=True, layout=name_button_layout)
        param_name23.style.button_color = 'lightgreen'

        self.max_attachment_distance = FloatText(
          value=18.0,
          step=1,
          style=style, layout=widget_layout)

        param_name24 = Button(description='min_attachment_distance', disabled=True, layout=name_button_layout)
        param_name24.style.button_color = 'tan'

        self.min_attachment_distance = FloatText(
github martinRenou / Odysis / odysis / odysis.py View on Github external
def _init_slice_widgets(self):
        # TODO Update the step of the slider
        self.slice_position_wid = FloatSlider(
            description='Plane position',
            min=self.slice_position_min,
            max=self.slice_position_max,
            value=0.0
        )
        self.slice_position_min_wid = FloatText(description='Min', value=self.slice_position_min)
        self.slice_position_max_wid = FloatText(description='Max', value=self.slice_position_max)

        link((self, 'slice_position'), (self.slice_position_wid, 'value'))
        link((self, 'slice_position_min'), (self.slice_position_wid, 'min'))
        link((self, 'slice_position_min'), (self.slice_position_min_wid, 'value'))
        link((self, 'slice_position_max'), (self.slice_position_wid, 'max'))
        link((self, 'slice_position_max'), (self.slice_position_max_wid, 'value'))
github Calysto / conx / conx / dashboard.py View on Github external
def __init__(self, net, width="95%", height="550px", play_rate=0.5):
        self._ignore_layer_updates = False
        self.player = _Player(self, play_rate)
        self.player.start()
        self.net = net
        self.dataset = net.dataset
        self.net = net
        self._width = width
        self._height = height
        ## Global widgets:
        style = {"description_width": "initial"}
        self.feature_columns = IntText(description="Feature columns:", value=3, style=style)
        self.feature_scale = FloatText(description="Feature scale:", value=2.0, style=style)
        self.feature_columns.observe(self.regenerate, names='value')
        self.feature_scale.observe(self.regenerate, names='value')
        ## Hack to center SVG as justify-content is broken:
        self.net_svg = HTML(value="""<p style="text-align:center">%s</p>""" % ("",), layout=Layout(
            width=self._width, overflow_x='auto', overflow_y="auto",
            justify_content="center"))
        # Make controls first:
        self.output = Output()
        controls = self.make_controls()
        config = self.make_config()
        super().__init__([config, controls, self.net_svg, self.output])
github geoscixyz / em_examples / em_examples / Attenuation.py View on Github external
def AttenuationWidgetTBL():
    i = interact(
        WaveVelandSkindWidgetTBL,
        epsr = FloatText(value=9., description="$\epsilon_r$"),
        log_sigma= FloatSlider(min=-4., max=1., step=0.5, value=-1.5, description="log$(\sigma)$"),
        log_frequency= FloatSlider(min=5., max=10., step=0.5, value=5.5, description="log$(f)$")
    )
    return i
github geoscixyz / em_examples / em_examples / MarineCSEM1D.py View on Github external
csem_fields_app,
    rho0=FloatText(value=1e8, description='$\\rho_{0} \ (\Omega m)$'),
    rho1=FloatText(value=0.3, description='$\\rho_{1} \ (\Omega m)$'),
    rho2=FloatText(value=1., description='$\\rho_{2} \ (\Omega m)$'),
    rho3=FloatText(value=100., description='$\\rho_{3} \ (\Omega m)$'),
    rho4=FloatText(value=1., description='$\\rho_{4} \ (\Omega m)$'),
    zsrc=FloatText(value=-950., description='src height (m)'),
    rv_rh=FloatText(value=1., description='$\\rho_{2 \ v} / \\rho_{2 \ h}$'),
    dz1=FloatText(value=1000., description="dz1 (m)"),
    dz2=FloatText(value=1000., description="dz2 (m)"),
    dz3=FloatText(value=200., description="dz3 (m)"),
    frequency=FloatText(value=0.5, description='f (Hz)'),
    Field=ToggleButtons(options =['E','H','P'],value='E'),
    Plane=ToggleButtons(options =['XZ','YZ'],value='XZ'),
    Fixed=widgets.widget_bool.Checkbox(value=False),
    vmin=FloatText(value=None),
    vmax=FloatText(value=None),
    __manual=True
        )
    return Q1
github HCsoft-RD / shaolin / shaolin / core / object_notation.py View on Github external
if 'min' not in kwargs.keys():
            kwargs['min'] = word -100.
        return Widget(wid.FloatSlider, **kwargs)

    elif isinstance(word, tuple):
        is_int = np.all([isinstance(w, int_types) for w in word])
        if is_int:
            return Widget(wid.IntSlider, **kwargs)
        else:
             return Widget(wid.FloatSlider, **kwargs)
    else:
        is_int = np.all([isinstance(w, int_types) for w in word])
        if is_int:
            return Widget(wid.IntText, **kwargs)
        else:
             return Widget(wid.FloatText, **kwargs)
github geoscixyz / em_examples / em_examples / MarineCSEM1D.py View on Github external
rho3=FloatText(value=100., description='$\\rho_{3} \ (\Omega m)$')
    rho4=FloatText(value=1., description='$\\rho_{4} \ (\Omega m)$')
    rv_rh=FloatText(value=1., description='$\\rho_{2 \ v} / \\rho_{2 \ h}$')
    dz1=FloatText(value=1000., description="dz1 (m)")
    dz2=FloatText(value=1000., description="dz2 (m)")
    dz3=FloatText(value=200., description="dz3 (m)")
    frequency_bg=FloatText(value=0.5, description='f$^{BG}$ (Hz)')
    zsrc_bg=FloatText(value=-950., description='src height$^{BG}$ (m)')
    zrx_bg=FloatText(value=-1000., description='rx height$^{BG}$ (m)')
    rho0_bg=FloatText(value=1e8, description='$\\rho_{0}^{BG} \ (\Omega m)$')
    rho1_bg=FloatText(value=0.3, description='$\\rho_{1}^{BG} \ (\Omega m)$')
    rho2_bg=FloatText(value=1., description='$\\rho_{2}^{BG} \ (\Omega m)$')
    rho3_bg=FloatText(value=1., description='$\\rho_{3}^{BG} \ (\Omega m)$')
    rho4_bg=FloatText(value=1., description='$\\rho_{4}^{BG} \ (\Omega m)$')
    rv_rh_bg=FloatText(value=1., description='$\\rho_{2 \ v}^{BG} / \\rho_{2 \ h}^{BG}$')
    dz1_bg=FloatText(value=1000., description="dz1$^{BG}$ (m)")
    dz2_bg=FloatText(value=1000., description="dz2$^{BG}$ (m)")
    dz3_bg=FloatText(value=200., description="dz3$^{BG}$ (m)")
    Field=ToggleButtons(options =['E','H', 'Zxy'],value='E', description="Field")
    Plane=ToggleButtons(options =['XZ','YZ'],value='XZ', description="Plane")
    Component=ToggleButtons(options =['x','y', 'z'], value='x', description="rx direction")
    Complex=ToggleButtons(options =['Real','Imag', "Amp", "Phase"],value='Amp', description="Complex")
    scale=ToggleButtons(options =['log','linear'], value='log', description="Scale")
    Fixed=widgets.widget_bool.Checkbox(value=False, description="Fixed")
    vmin=FloatText(value=None, description='vmin')
    vmax=FloatText(value=None, description='vmax')
    __manual = True

    out = widgets.interactive_output(
        csem_data_app,
        {
            "frequency":frequency,
github geoscixyz / em_examples / em_examples / DCWidgetResLayer2_5D.py View on Github external
def ResLayer_app():
    app = widgetify(PLOT, manual=True,
                    survey=ToggleButtons(options=[
                                         'Dipole-Dipole', 'Dipole-Pole', 'Pole-Dipole', 'Pole-Pole'], value='Dipole-Dipole'),
                    zcLayer=FloatSlider(min=-10., max=0., step=1., value=-10.,
                                        continuous_update=False, description='$zc_{layer}$'),
                    dzLayer=FloatSlider(min=0.5, max=5., step=0.5, value=1.,
                                        continuous_update=False, description='$dz_{layer}$'),
                    rholayer=FloatText(
                        min=1e-8, max=1e8, value=5000., continuous_update=False, description='$\\rho_{2}$'),
                    xc=FloatSlider(min=-30., max=30., step=1.,
                                   value=0., continuous_update=False),
                    zc=FloatSlider(min=-30., max=-15., step=0.5,
                                   value=-25., continuous_update=False),
                    r=FloatSlider(min=1., max=10., step=0.5,
                                  value=5., continuous_update=False),
                    rhoTarget=FloatText(
                        min=1e-8, max=1e8, value=500., continuous_update=False, description='$\\rho_{3}$'),
                    rhohalf=FloatText(
                        min=1e-8, max=1e8, value=500., continuous_update=False, description='$\\rho_{1}$'),
                    A=FloatSlider(min=-30.25, max=30.25, step=0.5,
                                  value=-30.25, continuous_update=False),
                    B=FloatSlider(min=-30.25, max=30.25, step=0.5,
                                  value=30.25, continuous_update=False),
                    M=FloatSlider(min=-30.25, max=30.25, step=0.5,