How to use the bokeh.models.Div function in bokeh

To help you get started, we’ve selected a few bokeh 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 komo-fr / pep_map_site / pep_map / html_generator / generate_html.py View on Github external
linked_from_table_title_div = Div(text='<strong>PEP N is linked from ...</strong>',
                                      style={'color': BASE_FONT_COLOR})
    link_to_table_title_div = Div(text='<strong>PEP N links to ...</strong>',
                                  style={'color': BASE_FONT_COLOR})

    # Timeline用のデータソースを用意する
    timeline_display_circle_source = tl_compo.generate_timeline_data_source(pep_graph)
    timeline_label_source = tl_compo.generate_timeline_label_data_source(pep_graph)
    desc_start_date, _ = tl_compo.get_timeline_plot_range(pep_graph)
    desc_start_date = desc_start_date + datetime.timedelta(days=30)
    timeline_desc_label_source = tl_compo.generate_timeline_desc_data_source(xs=[desc_start_date, desc_start_date],
                                                                             ys=[1.7, 0.1],
                                                                             font_size=15)

    # 入力ボックス用のデータソース生成
    error_message_div = Div(width=300, height=8, style={'color': 'red'}, text='')

    title_div = Div(width=700,
                    style={'font-size': 'large',
                           'line-height': '1.5',
                           'color': BASE_FONT_COLOR})
    title_div.text = """
    Let's enter the PEP number in the left text box.<br>
    Then you can see the following information.
    <li>Which PEPs do link that PEP?</li>
    <li>Which PEPs are linked from that PEP?</li>
    """

    checkbox_group = CheckboxGroup(labels=["Show Python 2 release dates",
                                           "Show Python 3 release dates"],
                                   active=[0, 1])
github komo-fr / pep_map_site / pep_map / html_generator / generate_html.py View on Github external
release_source_dict = {'py2_release_label_source': py2_release_label_data_source,
                           'py3_release_label_source': py3_release_label_data_source,
                           'py2_release_line_source': py2_release_line_data_source,
                           'py3_release_line_source': py3_release_line_data_source
                           }

    all_pep_data_source = compo.generate_node_data_source(pep_graph)

    # DataTable用のデータソースを用意する
    linked_from_table_source = table_compo.generate_data_table_data_source(pep_graph)
    link_to_table_source = table_compo.generate_data_table_data_source(pep_graph)

    linked_from_data_table = table_compo.generate_data_table(linked_from_table_source)
    link_to_data_table = table_compo.generate_data_table(link_to_table_source)

    linked_from_table_title_div = Div(text='<strong>PEP N is linked from ...</strong>',
                                      style={'color': BASE_FONT_COLOR})
    link_to_table_title_div = Div(text='<strong>PEP N links to ...</strong>',
                                  style={'color': BASE_FONT_COLOR})

    # Timeline用のデータソースを用意する
    timeline_display_circle_source = tl_compo.generate_timeline_data_source(pep_graph)
    timeline_label_source = tl_compo.generate_timeline_label_data_source(pep_graph)
    desc_start_date, _ = tl_compo.get_timeline_plot_range(pep_graph)
    desc_start_date = desc_start_date + datetime.timedelta(days=30)
    timeline_desc_label_source = tl_compo.generate_timeline_desc_data_source(xs=[desc_start_date, desc_start_date],
                                                                             ys=[1.7, 0.1],
                                                                             font_size=15)

    # 入力ボックス用のデータソース生成
    error_message_div = Div(width=300, height=8, style={'color': 'red'}, text='')
github ChairOfStructuralMechanicsTUM / Mechanics_Apps / Vibroacoustic_plates / VibroP_MessageClass.py View on Github external
message header, width and height of the message that use can change in runtime.
        :param Color: python string
        :param Size: int
        :param FontStyle: python string. To find out the available parameters,
        please, have a look at the HTML documentation (font style)
        :param MessageHeader: python string
        :param Width: int
        :param Height: int
        """

        self.Header = MessageHeader
        self.Color = Color
        self.Size = Size
        self.FontStyle = FontStyle

        self.Widget = Div( text = "",
                           render_as_text = False,
                           width = Width,
                           height = Height )
github ChairOfStructuralMechanicsTUM / Mechanics_Apps / Vibroacoustic_plates / main.py View on Github external
ShearModulus.addBuffer( BufferName = "DefaultOrthotropic",
                              BufferData = OrthotropicData )

    ShearModulus.addBuffer( BufferName = "GeneralIsotropic",
                              BufferData = IsotropicData )


    ShearModulus.addBuffer( BufferName = "GeneralOrthotropic",
                              BufferData = OrthotropicData )

    ShearModulus.addBuffer( BufferName = "Input",
                              BufferData = OrthotropicData )


    # ........................ Poissons ratios ................................
    POISSON_RATIO_TITEL = Div( text = """POISSON'S RATIOS:""" )
    PoissonRatios = VibroP_InteractiveTable( TableName = "POISSON'S RATIOS",
                                      Rows = 2,
                                      Columns = 3 )

    PoissonRatios.setTitels( [ [ POISSON_RATIO_XY,
                                 POISSON_RATIO_XZ,
                                 POISSON_RATIO_YZ ],
                               [ POISSON_RATIO_YX + "\t(auto)",
                                 POISSON_RATIO_ZX + "\t(auto)",
                                 POISSON_RATIO_ZY + "\t(auto)" ] ] )

    PoissonRatios.setDisabled(1, 0, True)
    PoissonRatios.setDisabled(1, 1, True)
    PoissonRatios.setDisabled(1, 2, True)

    DataIsotropic = [ [ "0.42", "0.42", "0.42" ],
github cutright / DVH-Analytics / dvha / models / plot.py View on Github external
def __add_stat_divs(self):
        self.normal_test_div = {key: Div() for key in [1, 2]}
        self.t_test_div = Div()
        self.wilcoxon_div = Div()
github informatics-lab / forest / forest / main.py View on Github external
image_controls = images.Controls(menu)

    def on_change(attr, old, new):
        if int(new) == 1:
            image_controls.labels = ["Show"]
        elif int(new) == 2:
            image_controls.labels = ["L", "R"]
        elif int(new) == 3:
            image_controls.labels = ["L", "C", "R"]

    figure_drop.on_change("value", on_change)

    image_controls.subscribe(artist.on_visible)

    div = bokeh.models.Div(text="", width=10)
    border_row = bokeh.layouts.row(
        bokeh.layouts.column(toggle),
        bokeh.layouts.column(div),
        bokeh.layouts.column(dropdown))

    # Pre-select first layer
    for name, _ in config.patterns:
        image_controls.select(name)
        break

    if len(args.files) > 0:
        navigator = navigate.FileSystem.file_type(
                args.files,
                args.file_type)
    elif args.database is not None:
        navigator = database
github informatics-lab / forest / forest / survey.py View on Github external
<ul>
            {% for answer in answers %}
            <li>Q{{loop.index}}: {{answer}}</li>
            {% endfor %}
        </ul>
        <p>If you would like to edit your answers
        please do so now, otherwise feel free to save
        your results.</p>
        """)
        self.div = bokeh.models.Div(text="")
        self.buttons = {
            "edit": bokeh.models.Button(label="Edit"),
            "save": bokeh.models.Button(label="Save")}
        self.buttons["edit"].on_click(self.on_edit)
        self.buttons["save"].on_click(self.on_save)
        self.contact = bokeh.models.Div(
                text=CONTACT_TEXT)
        super().__init__()
github NervanaSystems / nlp-architect / nlp_architect / solutions / trend_analysis / ui / main.py View on Github external
Row(topic_clustering_before, topic_clustering_after)
                                        ]
        if selected == 1:
            graphs_area.children = [Row(top_before, top_after)]
        if selected == 2:
            graphs_area.children = [Row(hot_trends, cold_trends)]
        if selected == 3:
            if trend_clustering is None:
                graphs_area.children = [Div(text='no word embedding data')]
            else:
                graphs_area.children = [trend_clustering]
        if selected == 4:
            graphs_area.children = [custom_trends]
        if selected == 5:
            if topic_clustering_before is None:
                graphs_area.children = [Div(text='no word embedding data')]
            else:
                graphs_area.children = [Row(topic_clustering_before,
                                        topic_clustering_after)]
        if selected == 6:
            filter_topics_table_source.data = {'topics': filter_rows}
            filter_topics_table_source.selected.indices = get_valid_indices()
            filter_custom_table_source.data = {'topics': filter_rows}
            filter_custom_table_source.selected.indices = get_custom_indices()
            refresh_filter_area()
            apply_filter = False
    label.text = ""
github cutright / DVH-Analytics / dvha / models / plot.py View on Github external
def __create_divs(self):
        self.div_center_line = Div(text='', width=175)
        self.div_ucl = Div(text='', width=175)
        self.div_lcl = Div(text='', width=175)

        self.div_adj_center_line = Div(text='', width=175)
        self.div_adj_ucl = Div(text='', width=175)
        self.div_adj_lcl = Div(text='', width=175)
github NervanaSystems / nlp-architect / nlp_architect / solutions / absa_solution / ui.py View on Github external
def _create_header(train_dropdown,
                   inference_dropdown, text_status) -&gt; layouts.Row:
    """Utility function for creating and styling the header row in the UI layout."""

    architect_logo = Div(text='<a href="http://nlp_architect.nervanasys.com"> <img width="200" border="0"></a> by Intel® AI Lab',
                         style={'margin-left': '500px', 'margin-top': '20px', 'font-size': '110%',
                                'text-align': 'center'})
    css_link = Div(text="",
                   style={'font-size': '0%'})

    js_script = Div(text="<input hidden="true" id="inputOS" type="file">")

    title = Div(text="ABSApp",
                style={'font-size': '300%', 'color': 'royalblue', 'font-weight': 'bold',
                       'margin-left': '500px'})

    return row(column(row(children=[train_dropdown, lexicons_dropdown, inference_dropdown],
                          width=500), row(text_status)), css_link, js_script,
               widgetbox(title, width=900, height=84),
               widgetbox(architect_logo, width=400, height=84))