Example #1
0
p = Paragraph(
    text="The divs below were configured with additional css_classes:")

div1 = Div(text="""
<p> This Bokeh Div adds the style classes:<p>
<pre>
.custom {
    border-radius: 0.5em;
    padding: 1em;
}
.custom-1 {
    border: 3px solid #2397D8;
}
</pre>
""")
div1.css_classes = ["custom", "custom-1"]

div2 = Div(text="""
<p> This Bokeh Div adds the style classes:<p>
<pre>
.custom {
    border-radius: 0.5em;
    padding: 1em;
}
.custom-2 {
    border: 3px solid #14999A;
    background-color: whitesmoke;
}
</pre>
""")
div2.css_classes = ["custom", "custom-2"]
Example #2
0
div1 = Div(
    text="""
<p> This Bokeh Div adds the style classes:<p>
<pre>
.custom {
    border-radius: 0.5em;
    padding: 1em;
}
.custom-1 {
    border: 3px solid #2397D8;
}
</pre>
"""
)
div1.css_classes = ["custom", "custom-1"]

div2 = Div(
    text="""
<p> This Bokeh Div adds the style classes:<p>
<pre>
.custom {
    border-radius: 0.5em;
    padding: 1em;
}
.custom-2 {
    border: 3px solid #14999A;
    background-color: whitesmoke;
}
</pre>
"""
    ],
    formatters={
        "date": "datetime"
    },
    mode="vline"
))

#finance_info = Div(text="""
#    <b>NFLX</b>
#    <div class='price'>
#        24.31
#    </div>
#""")

div = Div(text="""Click on the graph to display a list of financial articles on and before that date""", width=500, height=500)
div.css_classes = ["scroll-box"]

button_callback = CustomJS(args=dict(radio_button_group = radio_button_group, div=div, text_input=text_input, output=output, source=source),code="""
     output.text = ''
     div.text=''
     var ticker = text_input.value;
     jQuery.ajax({
        type: 'POST',
        url: '/update_y_data',
        data: {"ticker_sent": ticker},
        dataType: 'json',
        success: function (json_from_server) {
            var updated_price_list = json_from_server[ticker][0];
            var current_date_data = json_from_server[ticker][1];
            source.data['price'] = updated_price_list;
            var current_price = updated_price_list[updated_price_list.length-1]
Example #4
0
tsneMetricSelect = Select(title="metrique", value='cosine', width=120, options=['braycurtis', 'canberra', 'chebyshev', 'cityblock', 'correlation', 'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'yule'])
tsneLoading = Div()
LoadingDiv = Div()
informationDiv = Div(width=600)
NumberElementsDiv = Div(width=250)
iterationCount = Div(width=100)
minus = Div(text='-',width=15)
plus = Div(text='+',width=15)
word1 = TextInput(width=200, title="Analogie")
word2 = TextInput(width=200, title="-")
word3 = TextInput(width=200, title="+")
calculateAnalogy = Button(label='Calculer', button_type='success', width=60)
equals = Div(text=" ", width=120)
searchBox = TextInput(width=250, placeholder="Rechercher ...")
searchButton = Button(label='Rechercher', button_type='success', width=100)
equals.css_classes = ["center"]
# p3.css_classes = ["blackBorder"]
analogyColumns = [
    TableColumn(field="words", title="Mots"),
    TableColumn(field="similarity", title="Similarit\u00E9"),
]
analogyDataTable = DataTable(source=sourceAnalogy, columns=analogyColumns, index_position=None, width=500, height=200)
analogy = row(column(word1, word2, word3, row(calculateAnalogy, Spacer(width=20), equals)), Spacer(width=40), analogyDataTable)
renderer = p2.select(dict(type=GlyphRenderer))
ds = renderer[0].data_source

d1 = Div(text="<h2>Choix d'un mod\u00E8le</h2>", width=500)
d2 = Div(text="<h2>Choix d'un mot</h2>", width=500)
d3 = Div(text="<h2>Visualisation globale des repr\u00E9sentations</h2><br><h3>Vecteurs de dimension 100 projet\u00E9s dans le plan selon :</h3>", width=500)
projectionMethode = RadioGroup(labels=["la m\u00E9thode t-SNE en deux dimensions", "les deux premiers axes principaux"], active=0)
d4 = Div(text="<h2>Exploration des voisinages</h2><br><h3>Voisinages \u00E9tablis selon :</h3>", width=500)