2,208,734 questions
Best practices
0
votes
4
replies
23
views
How to swap multiple variables using multiple assignment?
I am learning Python basics (variables, multiple assignment, operators) and trying to swap values of variables.
Here is my code:
a = 5
b = 10
a, b = b, a
print(a)
print(b)
Expected output:
10
5
...
Best practices
0
votes
0
replies
7
views
Python/GenAI/LLM: Best practices for asking follow‑up questions to clarify user intent in a chatbot
I’m building a chatbot using Python, pydantic_ai, google_genai, and the gemini‑2.0‑flash‑lite model. The bot includes a module responsible for retrieving context from a knowledge base (RAG). The ...
0
votes
0
answers
17
views
How to restart CKAN processes (but not jobs/worker) inside running ckan-docker dev container?
I’m developing CKAN extensions using the official ckan-docker setup with the dev images and need to restart CKAN after various updates in my extension.
Inside my main ckan container (run via ...
0
votes
0
answers
51
views
I cannot install a package using pip
I can't seem to get past this error, tring to install a package file (requirements.txt) using pip, but it keeps throwing an error. I am trying to install Python packages to a virtual memory location (...
-4
votes
0
answers
49
views
How to extract financial statement tables from PDF using Python? [closed]
I need to extract consolidated financial statement tables from PDF files (balance sheets, income statements) and retrieve specific financial metrics like:
Total Assets, Liabilities, Equity
Revenue, ...
0
votes
1
answer
18
views
altair mark_area not working with alt.Y2Value or alt.value
Goal: color the area above the line using mark_area.
Issue: the area appears below the line. Any changes I make to the Y2 channel (in terms of using alt.Y2Value or alt.value) have no effect.
Context: ...
-7
votes
0
answers
29
views
Issue: Voice Quality Degradation (Childish Tone) After Dataset & Config Changes in Coqui VITS Voice Cloning [closed]
Issue: Voice Quality Degradation after dataset & config changes in coqui VITS voice cloning
I’m working on voice cloning using Coqui TTS (VITS) and I’m facing a voice quality regression issue ...
0
votes
1
answer
12
views
LightningChart Python clicks stop firing after I add overlay series
I have a ChartXY where chart.add_event_listener('click', handler=on_click, target='seriesBackground') works fine until I add a rectangle/text overlay (used for annotations). As soon as I draw the ...
1
vote
1
answer
21
views
Restrict frame resizing in Tkinter so it can still be minimized, but maximazed only to a certain width
I am trying to build a simple app in python with tkinter. It contains two rows for file selection (column of labels on frame1, labelFrame, and column of entry and button pairs on a second frame, ...
-3
votes
1
answer
94
views
Can keyword arguments be variables? [duplicate]
I have a class that is initialized with a **kwargs parameter:
class Test:
def __init__(self, measurement, data, **kwargs):
# some stuff
names = list(kwargs.keys())
settings = list(kwargs....
1
vote
1
answer
34
views
Using Hatchling, how can I import and use classes in my package during the build process?
I feel like I am missing some basic concepts about how to use a hatchling CustomBuildHook.
During the package build process, I want to use a class from the same package that I am trying to build. I ...
-1
votes
0
answers
62
views
Sum up columns with the same string in the column name [closed]
I want to sum up (horizontally) some columns that share a common string in their name. For example, given the following columns
a_red, a_blue, a_green, b_red, b_yellow, b_blue
I would like to add in ...
0
votes
0
answers
44
views
Using Local LLM with LM studio to build agents
I'm using phi-3-mini-4k-instruct model from LM studio and start http server in my machine. Then I've a agents script that use that model. But the problem is the when I run my agents script instead of ...
Best practices
0
votes
0
replies
21
views
best way to leverage polars multithreading with scikit-learn compatibility
I've been working on a project for rapidly testing thousands of outcome variables on a standard set of predictors and covariates using polars. It's working very well, with speed ups as high as 16x ...
-2
votes
0
answers
53
views
Airflow variables debugging [closed]
In my DAG, I need to define different conditions for files based on the logical date of the DAG run. I want to access the logical date directly as a Python datetime object in my script, so I can ...