Пример #1
0
def plot_true_and_estimated_channel_with_bokeh_all_antennas(
        true_channel, estimated_channel, title=''):
    p0 = plot_true_and_estimated_channel_with_bokeh(true_channel,
                                                    estimated_channel,
                                                    'Antenna 1', 0)
    p1 = plot_true_and_estimated_channel_with_bokeh(true_channel,
                                                    estimated_channel,
                                                    'Antenna 2', 1)
    p2 = plot_true_and_estimated_channel_with_bokeh(true_channel,
                                                    estimated_channel,
                                                    'Antenna 3', 2)
    p3 = plot_true_and_estimated_channel_with_bokeh(true_channel,
                                                    estimated_channel,
                                                    'Antenna 4', 3)
    p1.x_range = p0.x_range
    p2.x_range = p0.x_range
    p3.x_range = p0.x_range
    p1.y_range = p0.y_range
    p2.y_range = p0.y_range
    p3.y_range = p0.y_range

    p = gridplot([[p0, p1], [p2, p3]])

    par = bw.Paragraph(text=title)
    vbox = bw.VBox(children=[par, p])
    return vbox
from bokeh.models import ColumnDataSource, widgets as wd
from bokeh.models.widgets import Select
from bokeh.plotting import figure

colors = ['#c9d9d3', '#718dbf', '#e84d60']
gpa = ['A+', 'A', 'B+', 'B', 'C+', 'C', 'D+', 'D', 'F']
years = ['2015', '2016', '2017']
dct = dict(zip(gpa, range(9)))
STAdata = {
    'gpa': gpa,
    '2015': [0] * 9,
    '2016': [0] * 9,
    '2017': [0] * 9,
}

paragraph = wd.Paragraph(text='option')


def connectSQLServer():
    attr = dict(
        server='10.20.213.10',
        database='csc1002',
        user='******',
        password='******',
        port=1433,
        as_dict=True,
    )
    try:
        return pymssql.connect(**attr)
    except Exception as e:
        print(e)
Пример #3
0
from bokeh.models import widgets as wd
from bokeh.layouts import widgetbox as wb, layout
import random
import time

# Login
btnLogin = wd.Button(label="Login")
btnReset = wd.Button(label="Reset")
name = wd.TextInput(title="Name", 
    placeholder="enter name ....")
pwd = wd.TextInput(title="Password", 
    placeholder="enter password ....")

# Study
majors = wd.RadioButtonGroup(labels=["CS", "Stat", "Math", "EIE", "Energy", "HSS", "SME"])
text = wd.Paragraph(text="Press button to start .... ")
answer = wd.Paragraph(text="")
btnRandom = wd.Button(label="Choose For Me")

login = layout( [
        [ wb(name) ],
        [ wb(pwd) ],
        [ wb(btnLogin), wb(btnReset) ]  # side by side
    ] )

major = layout( [
        [ wb(majors, width=800) ],
        [ wb(text, btnRandom, answer) ]
    ] )

page1 = wd.Panel(child=login, title="Login")
Пример #4
0
                                   active=-1)
dept_input = wd.TextInput(value="",
                          title="Department",
                          placeholder="Seach department")
title_input = wd.TextInput(value="", title="Title", placeholder="Serach title")
options = wd.RadioGroup(labels=['and', 'or'], active=0, width=100, inline=True)
button_refresh = wd.Button(label="Refresh")
Group_choices = wd.RadioButtonGroup(
    name="Title",
    labels=['Begins with ...', '... contains ...', '... ends with'],
    active=1)
Department_choices = wd.RadioButtonGroup(
    name="Department",
    labels=['Begins with ...', '... contains ...', '... ends with'],
    active=1)
Text_Instruction = wd.Paragraph(text="Option")

# Data used in Tab1
columns = [
    wd.TableColumn(field="id", title="Course ID"),
    wd.TableColumn(field="title", title="Title"),
    wd.TableColumn(field="dept", title="Department"),
    wd.TableColumn(field="credit", title="Credits"),
    wd.TableColumn(field="instructor", title="Instructor"),
]
data_table = wd.DataTable(columns=columns,
                          source=ColumnDataSource(),
                          width=800)

# Select the department
esql = "SELECT dept_name FROM lgu.department"
Пример #5
0
from bokeh.io import show, curdoc, output_file
from bokeh.plotting import figure
from bokeh.layouts import widgetbox as wb, layout
from bokeh.models import widgets as wd, ColumnDataSource
from bokeh.core.properties import value
import string
import pymssql

paragraph = wd.Paragraph(text="option")
optionGroup = wd.RadioGroup(labels=["and", "or"],
                            active=0,
                            width=100,
                            inline=True)
btnGroupLetters = wd.RadioButtonGroup(labels=list(string.ascii_uppercase),
                                      active=-1)
title_input = wd.TextInput(value="",
                           title="Title:",
                           placeholder="comtains....")
dept_input = wd.TextInput(value="",
                          title="Department",
                          placeholder="contains....")
btnGroupTitle = wd.RadioButtonGroup(
    name='title',
    labels=["begin with...", "...comtains...", "...ends with"],
    active=1)
refresh = wd.Button(label="Refresh")
btnGroupDept = wd.RadioButtonGroup(
    name='dept',
    labels=["begin with...", "...contains...", "...end with"],
    active=1)
Пример #6
0
                                   active=-1)
title_input = wd.TextInput(value='', title='Title', placeholder='search title')
dept_input = wd.TextInput(value="",
                          title='Department',
                          placeholder='search department')
options = wd.RadioGroup(labels=['and', 'or'], active=0, width=100, inline=True)
button_refresh = wd.Button(label='Refresh')
Group_choices = wd.RadioButtonGroup(
    name='Title',
    labels=['begins with...', '...contains...', '...ends with'],
    active=1)
Department_choices = wd.RadioButtonGroup(
    name='Department',
    labels=['begins with...', '...contains...', '...ends with'],
    active=1)
Text_Instruction = wd.Paragraph(text='option')

# Data table in the first page
columns = [
    wd.TableColumn(field='id', title='Course ID'),
    wd.TableColumn(field='title', title='Title'),
    wd.TableColumn(field='dept', title='Department'),
    wd.TableColumn(field='credit', title='Credits'),
    wd.TableColumn(field='instructor', title='Instructor'),
]
data_table = wd.DataTable(columns=columns,
                          source=ColumnDataSource(),
                          width=800)

# department select
esql = "SELECT dept_name FROM lgu.department "