2,208,052 questions
1
vote
0
answers
5
views
Inserting figures in the chat response in Gradio.ChatInterface
I am creating an LLM Agent Chat app with Gradio, Using the gr.ChatInterface block
In My app the LLM agent attempt to insert an image like this:

but ...
-1
votes
0
answers
25
views
CS 50 Phyton: test_fuel fails check50
I cannot get check50 to greenlight my test_fuel.py. Having sat on this problem like forever, I neeed help:
Fuel.py works as expected, all cases I tried work as specified
The tests in test_fuel are ...
-9
votes
0
answers
31
views
Can anyone help me how to compute the transition matrix in Google code jam 2008 problem D? [closed]
I'm trying to enhance my skills in computer sciences so i begin to do contest in programming.
i have begin with Google code Jam 2008.
Everything was all rigth until i found a problem where i really ...
-1
votes
0
answers
20
views
How to SELECT data from base model and also access data from sub models
I formalized my tables User and Employee to inherit from model Person, now when I log in I cannot access data attributes from child classes.
Base class:
class Person(db_connection.Base):
Id= ...
Best practices
0
votes
0
replies
15
views
Apply different function to each leaf of pytree in `jax`
Suppose that I have a jax pytree with n leaves and a set of distinct functions to apply to each leaf of the pytree. I can do the following:
from functools import partial
import jax
# Function to ...
-4
votes
0
answers
12
views
GenAI & Salesforce CRM Analytics: Why do LLMs generate valid Python but broken Dashboard JSON (White Screen)?
I am currently writing my Bachelor's thesis on using Generative AI (LLMs like GPT-4o) to automate dashboard creation in Salesforce CRM Analytics (CRMA). I’ve run into a specific technical phenomenon ...
0
votes
0
answers
15
views
Detect input from EV3 IR remote during blocking calls
I am trying to program an Lego EV3 robot using MicroPython. If one of the sensors is triggered (like the Touch Sensor, for example) the robot is supposed to speak. However, if the robot is actively ...
0
votes
0
answers
6
views
How to get complete Amazon Ads Data via v3 API - getting too few rows in comparison to reports from Ads console?
I have successfully configured all the details to pull Amazon ads data using the v3 api, but the problem is that I am getting too few rows per report, as opposed to when I manually download the ...
3
votes
1
answer
30
views
Updating a Plotly imshow image from a dropdown menu
I am trying to use a dropdown menu in Plotly to update an image created using imshow. It renders fine initially, but using the dropdown to select new entries just gives me an empty array image. I'm a ...
-2
votes
2
answers
62
views
List not updating outside function scope [duplicate]
I am trying to modify a list inside a function, but the changes are not reflected outside the function.
def update_list(my_list):
my_list = my_list + [4]
nums = [1, 2, 3]
update_list(nums)
print(...
1
vote
0
answers
25
views
Why does python vkbottle run_polling() method doesn't work
I make vk bot by vkbottle.
1 bot handles few communities, by this i use async method run_polling(), If i use run_forever() method bot handle only 1 community in time
import asyncio
from vkbottle.bot ...
-1
votes
1
answer
65
views
Correct way to handle Ctrl-C in Python on Linux
Multiple pages on the Internet, including answers to this SO question and this page from a training company, say that you should handle Ctrl-C in python with code similar to:
import signal
import sys
...
Best practices
0
votes
0
replies
41
views
Sensitive data and AI
I am developing a tool using Python that integrates AI (GitHub Copilot SDK). This tool processes CI/CD pipeline definitions and analyze their data. I was thinking about how to deal with security in ...
-2
votes
0
answers
30
views
RDP Server python pcomm access issue
I've some python scripts which are working in my RDP server (Win11).
I set a task schedule to make them work in everyday at 08:00 and 20:00.
Every code that I have works perfectly except these two ...
4
votes
1
answer
109
views
Why is "utf-8" an acceptable encoding when it's not one of the aliases known to the encodings module
Consider the following:
import encodings
print(sorted(set(encodings.aliases.aliases.values())))
Note that "utf-8" is not in the set and yet is probably the most commonly specified encoding ...