2,209,018 questions
1
vote
0
answers
17
views
Build wxPython in a virtual environment, Python 3.14 Debian 13
I am trying to build wxPython in a virtual environment. Debian 13 does not come with Python 3.14. I have installed Python 3.14 in a virtual environment. I have installed the dependencies and it seems ...
0
votes
1
answer
20
views
Playwright intercepts Facebook Ads GraphQL only after scrolling (missing first 15–20 ads)
I am scraping Facebook Ads Library using Playwright (Python) and intercepting
GraphQL responses via page.on("response").
The problem is that my interceptor does NOT capture ads from the ...
-4
votes
1
answer
23
views
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" terminated with exit code: -1
I face the error above when trying to run any Python code on VSC; it might be because my computer has the "KidSafe" program on it ("KidSafe" is the literal name). If it really is, ...
0
votes
2
answers
29
views
Why doesn't the np.dot() method work with my arrays?
I am using jupyter notebook and numpy with the intention of making a program that orthonormalizes any given base following the Gram-Schmidt method for linear algebra.
Why doesn't the np.dot() method ...
0
votes
0
answers
19
views
In QML, startSystemResize does not work on macOS
I am developing a frameless window using QML and Python 3.13.8, PySide6 and QtQuick. I work on macOs Sequoia 15.2.
I want the borders of the content area to be shifted from the main window so I add ...
-3
votes
0
answers
25
views
I have a problem and I need fixing for my Tetris game [closed]
I need help with a problem I have with a Tetris game I'm making, The blocks of the Tetris Pieces are pixels away from each other, making it look like a single square.
The Pieces are essentially ...
-3
votes
0
answers
36
views
pytest-cov showing 0% or low coverage for module that is tested - directory vs explicit files
Just spent a few hours debugging a frustrating pytest-cov issue and wanted to share what I found, since I couldn't find this specific case documented anywhere.
Running pytest tests/ --cov=mypackage ...
Advice
3
votes
1
replies
37
views
Reshaping a numpy array of encoded data
I'm trying to re-shape a rather large array of encoded data efficiently. The original array (orig_array) is encoded using thermometer encoding (enc_array)
import numpy as np
from numpy.lib....
0
votes
0
answers
25
views
How to use Hugging Face API in Telegram Bot? | Python [closed]
I need to use some Hugging Face AI agents: Text-To-Video and Text-To-Music, Speech. Then my project will be ready and I will host it 24/7 using Render.
Ok, now about Hugging Face: I already knew about ...
-1
votes
1
answer
79
views
Is it possible to fix a recursive Python function within a 12-character edit distance?
I have the following recursive Python function. The goal is to return the index of the first occurrence of it in the list. Is it possible to fix this code within a maximum of 12 edits?
def index_of(it,...
-3
votes
0
answers
35
views
Pylance error: "topleft" is not a known attribute of "None" [closed]
I created a class that inherits from the pygame.sprite.Sprite class. In the init() method i create a rect and set its position. I have another method(set_pos()) where i also set the position of the ...
0
votes
0
answers
17
views
How can AUC be correctly used with a softmax output,sparse integer labels& categorical_crossentropy for binary classification in Keras without errors?
I am working on a binary image classification task using TensorFlow/Keras (TensorFlow version: 2.19.0). My model architecture is a multimodal setup with two input branches (CT and PET scans), and its ...
2
votes
2
answers
42
views
How can I dynamically load and execute `/foo.py` if it contains relative imports?
If I have /www/code/foo.py and /www/code/bar.py, where foo.py contains from . import bar, I can do the following to dynamically load and execute foo.py
path = '/www/code/foo.py'
spec = importlib.util....
-7
votes
1
answer
88
views
Add two numbers in python? [closed]
I'm just use for this logo in two sum numbers program but are not work for this used in --> this are not to work but I'm using a self how it works are you explain for this question?
class ListNode:
...
-4
votes
0
answers
49
views
GPU not being utilized in Python 3.10 despite CUDA and Conda setup [closed]
I’m working on a project in Python 3.10, and after experiencing heavy CPU throttling, I realised that all computations are running on the CPU instead of the GPU.
I’ve attempted to enable GPU ...