callback

Plotly Dash – callback dash table on python doesnt trigger

Plotly Dash – callback dash table on python doesnt trigger Question: I have an app with multiple pages, controlled from this index, in a new page I want to insert a dash table and assign some interactivity using callbacks. Take a basic dash table example (https://dash.plotly.com/datatable) and insert it into my app, but the callback …

Total answers: 1

Streamlit and Python, The problem of not using the return value of the function inside the other function and undesired path visual

Streamlit and Python, The problem of not using the return value of the function inside the other function and undesired path visual Question: The code: #Libraries import pandas as pd import numpy as np import matplotlib.pyplot as plt import os import fitz import io import streamlit as st global path_input_0 #HERE ASSIGNMENTS——————————- path_input_0="" path_input_last="" def …

Total answers: 2

Im trying to get a text from a tkinter entry and put it inside a dictionary but I get PY_VAR(some number) instead

Im trying to get a text from a tkinter entry and put it inside a dictionary but I get PY_VAR(some number) instead Question: the code below is part of a class. def expected_callback(self,expected_val_var,index,mode): dictionary[self.row][3] = expected_val_var def dataType callback(self,event): expected_val_var = StringVar() expected_val_var.trace("w",self.expected_callback) expected_val = Entry(self.root, width=20, textvariable= expected_val_var) expected_val.insert(0,"Expected value") expected_val.grid(row=self.row,column=self.col+2) Im trying to …

Total answers: 2

Output a graph and table from a single dash callback

Output a graph and table from a single dash callback Question: I would like to generate a graph and table from a dash callback, but the code outputs one or the other. Below is the final part of the code. The data is filtered by chained callbacks (two drop-downs – LGA and SMA) and a …

Total answers: 1

How to print one log line per every 10 epochs when training models with tensorflow keras?

How to print one log line per every 10 epochs when training models with tensorflow keras? Question: When I fit the model with: model.fit(X, y, epochs=40, batch_size=32, validation_split=0.2, verbose=2) it prints one log line for each epoch as: Epoch 1/100 0s – loss: 0.2506 – acc: 0.5750 – val_loss: 0.2501 – val_acc: 0.3750 Epoch 2/100 …

Total answers: 1

Why doesn't a callback get executed immediately upon calling yield in Scrapy?

Why doesn't a callback get executed immediately upon calling yield in Scrapy? Question: I am building a web scraper to scrape remote jobs. The spider behaves in a way that I don’t understand and I’d appreciate it if someone could explain why. Here’s the code for the spider: import scrapy import time class JobsSpider(scrapy.Spider): name …

Total answers: 1

A command does not finish when executed using Python Paramiko exec_command

A command does not finish when executed using Python Paramiko exec_command Question: I’ve got a Python program which sits on a remote server which uploads a file to an AWS bucket when run. If I ssh onto the server and run it with the command sudo python3 /path/to/backup.py it works as expected. I’m writing a …

Total answers: 1

KivyMD callback(self,instance) example

KivyMD callback(self,instance) example Question: I am using a floating action button speed dial in kivymd. I have added the data dictionary and want to add separate functions to all the sub buttons. For that I have to use callback. Can anyone tell me by an example how do I do it? Kv code: MDFloatingActionButtonSpeedDial: callback: …

Total answers: 1

How can I properly call a method from its callback method within a class?

How can I properly call a method from its callback method within a class? Question: I Have a code with two functions. Function ‘send_thread’ and Function ‘receive_thread’ which is the callback of ‘send_thread’. What I want to do is to run ‘send_thread’, this activates ‘receive_thread’ and once it’s over repeat it all again. To do …

Total answers: 2