Category : callback

I have multiple tk.Checkbuttons that should share the same callback when clicked (or changed). The variables (states) of the checkboxes should be available within the callback that is triggered on status change (and used for all checkbuttons). There are many articles like this, most of them dealing with parallel lists of state-variables. Because I want ..

Read more

I have a form in Dash that takes in value and returns a filtered datatable based on that value: import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import pandas as pd from dash.dependencies import Input, Output import dash_table import numpy as np df = pd.DataFrame(np.random.randint(10, size=[100,4]), columns=set(‘ABCD’)) print(df) app ..

Read more

I’m having trouble implementing an async service call in my subscriber callback. I found a previous post on ROS Answers about doing so here: https://answers.ros.org/question/302037/ros2-how-to-call-a-service-from-the-callback-function-of-a-subscriber/ However, the example in the answer here only prints the data being received by the subscriber and nothing else before performing the service call, then looks for the response elsewhere. ..

Read more

I am training a keras model with a data generator that reads the data in batches from a directory. This works great with model.fit(). But when using model.predict(), I would like to have both ypred and ytrue values returned. Can I enable/modify model.predict() to do this (maybe with a custom callback)? class DataGenerator(tf.keras.utils.Sequence): def__init__(self, ids, ..

Read more