2,208,806 questions
- Bountied 3
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
2
answers
64
views
Efficiently generate all unique 4-integer ratios within a range up to scaling
I want to generate all unique 4-integer combinations where each value is in a small range, for example: 1–10, and two combinations are considered the same if one is a scaled version of the other.
...
0
votes
0
answers
20
views
How do I print dynamically generated QR codes from python code on a raspberry pi to a Brother QL 800 label printer?
I'm working on a python application that's running on a raspberry pi that is intended to receive a data string from Azure IoT Hub, make a QR code off that string, then print that QR code as a label on ...
0
votes
1
answer
56
views
Module not found in Python
I have a Python project in VS Code with this file structure:
project
src
main.py
__init__.py
lib
utils.py
__init__.py
The __init__.py files are empty.
In the ...
Advice
1
vote
4
replies
62
views
How can I convert .sto to .csv with pandas?
I have a .sto file from OpenSim that I would like to convert to a .csv file for data processing. According to the website, the header for these files looks like this:
Coordinates
nRows=153
nColumns=24
...
-1
votes
0
answers
34
views
LeetCode SQL solutions are not synchronising to GitHub, using LeetHub v2 extension [closed]
I’m using the Google Chrome extension LeetHub v2, and it works as expected for synchronising Python LeetCode solutions to my GitHub account. However, it’s not syncing SQL problem solutions.
How can I ...
2
votes
1
answer
131
views
Polars (Python) is unable to read Unicode character U+2019
I have a JSON file that I'm trying to read into a Polars dataframe but keep getting an error message. I've been able to pin it to a specific character, but I don't know what to do about it. JSON file ...
Advice
1
vote
3
replies
98
views
Modulo implementaion
Is there a better way to do this? I wanted to create an implementation of the modulo.
def odd_even(num):
elif num == -32768:
return 'even'
elif num == -32767:
return '...
0
votes
0
answers
51
views
Mimicking MATLAB's sparse least squares solution results as closely as possible in Python
I rewrote some MATLAB code in Python, and after a lot of debugging, I've reached a point where the difference in results between MATLAB and python comes down to the results of solving least squares.
...
0
votes
0
answers
37
views
How to suppress the execution of the currentTextChanged in an editable QComboBox widget, when I change the selected item?
I have a list of dictionaries that represent settings and an editable QComboBox with which I want to select which dictionary I am currently modifying, but also change one of the keys in the settings ...
0
votes
0
answers
44
views
Real-time streaming lags at high data rates even with scrolling X-axis
I am using LightningChart Python (ChartXY) to display real-time data. My application appends new samples continuously (multiple series in the real project), and the X-axis is configured to scroll.
At ...
3
votes
1
answer
55
views
Problem with DWT3D with Custom Keras Layer
I'm trying to integrate the TFDWT library's DWT3D layer into a custom Keras layer.
import tensorflow as tf
import keras
from TFDWT.DWT3DFB import DWT3D
class DWTLayer(keras.layers.Layer):
def ...
1
vote
1
answer
69
views
Cumulative sum with group_by
Suppose I have the following DataFrame of the number of births in each state in each year:
df = pl.DataFrame(
{
"state": ["CA", "CA", "CA", "TX&...
0
votes
0
answers
19
views
Reading multiple GRIB files using Xarray with cfgrib engine with index files in custom location
I am trying to read multiple ERA5 GRIB files using the Python Xarray's xr.mfopen_dataset() method. My ERA5 input files are on a server in a location where I only have read permission for. Therefore, I ...
3
votes
0
answers
49
views
Can someone help explain Python's mypy issue with Incompatible return value type due to covariance when returning a sub type of a union
Apologies if there is a straightforward answer already that I'm too smooth brained to see. I am working with Python 3.13+ and Mypy 1.19.1. I've read mypy's docs, read several similar questions/answers ...
-4
votes
0
answers
72
views
Why is it only allowing one deck to draw from both? [closed]
For some reason, When I click on mon_deck, it draws from both mon_deck and loc_deck, and nothing happens when I click loc_deck.
elif event.type == pygame.MOUSEBUTTONDOWN:
if event.button == 1:
...