2,208,321 questions
0
votes
0
answers
13
views
Undo doesn't emit `notified_changed` signal in a GTK/Python application
I am trying to develop a PyGObject application but experiencing a strange behavior. I’ve created a demo for you to reproduce it. This is the code:
import gi
gi.require_version("Gtk", "4....
0
votes
0
answers
20
views
Reliable way to keep a single Excel file auto-updated from a slow, session-based web application [closed]
I’m working with an internal web application that exposes data only through a UI workflow (no public API).
Current manual process
Log in to the site
Navigate through several UI steps
Apply filters (...
-1
votes
2
answers
39
views
How to structure and print a categorized restaurant-style menu with aligned prices in Python?
I’m working on a Python console program that displays a restaurant-style menu with categories and prices, and allows users to select items by number. I want the menu to be easy to scan, similar to how ...
-5
votes
0
answers
34
views
How can I make this really execute trades for me? [closed]
import ccxt
import pandas as pd
import numpy as np
# Exchange setup
exchange = ccxt.binance({
'apiKey': 'YOUR_API_KEY',
'secret': 'YOUR_SECRET',
})
symbol = 'XAU/USD'
timeframe = '30m'
...
2
votes
0
answers
31
views
Silencing NumPy Divide-by-Zero Warning while maintaining bit-for-bit parity with F77 Double Precision
I am porting a vertical interpolation routine from Fortran 77 to NumPy. I am aiming for bit-for-bit parity (Mean Absolute Error (\approx 10^{-16})) with the gfortran output, which uses DOUBLE ...
-4
votes
0
answers
28
views
looking for face recognition and validation for registration [closed]
We’re building a registration flow where users upload a face image (stored on S3, backend gets the URL). We need to validate that the image has one clear face and check for possible duplicate faces ...
-1
votes
1
answer
30
views
Is it possible to provide manually-calculated percentages to tqdm?
I'm collecting progress from a second process that provides percentages. It'd be convenient if I could use tqdm, except that I'd need to update it with the percentages that I already have (which I ...
Advice
0
votes
7
replies
32
views
How do you control the printed representation of objects in a Pandas Series (or DataFrame)?
I am using Pandas 2.3. I have a Pandas Series with an object dtype. The objects are Bits instances from the bitstring library, or short lists of Bits; but I don't think that the exact object type is ...
-8
votes
0
answers
64
views
Variables and functions not being color coded in Python [closed]
I have a problem in VS Code where the variables in my code don't turn blue, the functions don't turn yellow, and the imported library doesn't turn green. I rely on this a lot to tell what kind of ...
Best practices
0
votes
2
replies
28
views
How to show step-by-step simplification and solution of a linear equation in Python?
I have a linear equation like this:
((x + b) * a) / (c * d) + ((x - b) * e) / (f * g) = 0
I want to solve it in Python step by step, showing all intermediate steps like in a school notebook.
I know I ...
0
votes
0
answers
33
views
Neo4j GraphAcademy Docker Installlation Error on Windows: ModuleNotFoundError: No module named neo4j
I'm trying to get a container running Python to connect to my Neo4j container in Docker.
I'm following the steps in the Neo4j GraphAcademy Python Installation tutorial (https://neo4j.com/docs/python-...
6
votes
2
answers
53
views
Use argparse to define an option that takes a string consisting of any letters from a given set
Using argparse, I'd like to support the following syntax:
asm2k.py -o XXXXX bbl.asm
Specifically, the -o option can take 1 or more letters, where the letters are from the set of "ARLQTNZCFXPB&...
3
votes
1
answer
40
views
Speed up univariate logistic regression using IRLS on large number of subsampled samples
I'm trying to perform logistic regression on samples randomly subsampled from a huge dataset for binary classification. I implemented logistic regression using iterative reweighted least squares (IRLS)...
-1
votes
0
answers
30
views
How to extract timestamps from a whisper model
I want to divide the conversion to text into timestamps and what was said at that time, and beyond that, put it into organized data structures. How do you extract the timestamps from the model and ...
4
votes
2
answers
89
views
Return the list of indices where an array is increasing for at least a particular number of values
For example, indices where arr is increasing for at least 4 values:
arr = [4, 5, 6, 7, 2, 3, 4, 7, 8, 11, 2]
func(arr, 4) # -> [0, 4]
Is there some numpy-ish method for dealing with intervals of ...