Exemplo n.º 1
0
                color="crimson",
                alpha=0.4)
acc_plot.circle(source=data_tm,
                x='time',
                y='top5_val',
                size=3,
                color="limegreen",
                alpha=0.4)
acc_plot.xaxis.axis_label = "Time"
acc_plot.yaxis.axis_label = "Acc"
acc_plot.title.text = "Training acc"

# Widgets
t_lr_base = TextInput(placeholder="Base LR")
t_lr_base.title = 'Base LR'
t_lr_base.value = '0.01'
b_update = Button(label="Update")
b_update.on_click(update_lr_base)
s_lr_scale = Slider(start=-4, end=2, value=0, step=.01, title="LR Scale")
s_lr_scale.on_change("value", update_lr_scale)
b_clear_data = Button(label="Clear")
b_clear_data.on_click(clear_data)

inputs_0 = widgetbox([s_lr_scale], width=600)
inputs_1 = widgetbox([t_lr_base], width=200)
inputs_2 = widgetbox([b_update], width=200)
inputs_3 = widgetbox([b_clear_data], width=200)

# Document
curdoc().add_root(
    column(row(inputs_0, inputs_1, inputs_2, inputs_3),
Exemplo n.º 2
0
    width=config_main['plot_config']['tab_aiaBrowser']['button_wdth'])
Div_JSOC_info = Div(
    text="""""",
    width=config_main['plot_config']['tab_aiaBrowser']['divJSOCinfo_wdth'])

Text_Cadence = TextInput(
    value='12s',
    title="Cadence:",
    width=config_main['plot_config']['tab_aiaBrowser']['button_wdth'])
Text_email = TextInput(
    value='',
    title="JSOC registered email:",
    width=config_main['plot_config']['tab_aiaBrowser']['button_wdth'])
try:
    email = config_main['core']['JSOC_reg_email']
    Text_email.value = email
except:
    pass

global selected_time
selected_time = {
    'YY_select_st': YY_select_st.value,
    'MM_select_st': MM_select_st.value,
    'DD_select_st': DD_select_st.value,
    'hh_select_st': hh_select_st.value,
    'mm_select_st': mm_select_st.value,
    'ss_select_st': ss_select_st.value,
    'YY_select_ed': YY_select_ed.value,
    'MM_select_ed': MM_select_ed.value,
    'DD_select_ed': DD_select_ed.value,
    'hh_select_ed': hh_select_ed.value,
Exemplo n.º 3
0
seconds_checkbox = CheckboxGroup(
        labels=["Seconds"], active=[0, 1])
average_checkbox = CheckboxGroup(
        labels=["Average"], active=[0, 1])
# output_file('Actlab.html')
p = figure(x_range=(min_pt, max_pt), y_range=(min_pt, max_pt))
image_link = getImage("MD6")
p.image_url(url=[image_link], x=min_x, y=min_y, w=(max_x - min_x), h=(max_y - min_y), anchor="bottom_left")
p.line(xlist, ylist, line_width=3, color="navy")

date = time.strptime(str(startTime), "%Y-%m-%d %H:%M:%S")
if seconds_checkbox.active==[]:
	strDate = str(date.tm_mday) + "-" + str(calendar.month_name[date.tm_mon]) + "-" + str(date.tm_year) + " " + str(date.tm_hour) + ":" + str(date.tm_min)
else:
	strDate = str(date.tm_mday) + "-" + str(calendar.month_name[date.tm_mon]) + "-" + str(date.tm_year) + " " + str(date.tm_hour) + ":" + str(date.tm_min) + ":" + str(date.tm_sec)
timestamp_robot.value = str(strDate)

def seeLocation():
	global timestamp, mindiff
	circle_x = []
	circle_y = []
	timeIndex = 0
	converted_time = datetime.fromtimestamp(int(timestamp)/1000).strftime("%Y-%m-%d %H:%M:%S")
	initial_diff = dateutil.relativedelta.relativedelta (converted_time, robot_time[0])
	mindiff = initial_diff.seconds
	for index in range(0, len(robot_time)):
		diff = dateutil.relativedelta.relativedelta (converted_time, robot_time[index])
		if converted_time==robot_time[index]:
			circle_x.append(float("{0:.3f}".format(float(xlist[index]))))
			circle_y.append(float("{0:.3f}".format(float(ylist[index]))))
			mindiff = 0