2,209,294 questions
0
votes
0
answers
11
views
Can we edit .py files in VSCode and use Google Colab extension to run them on Google servers like Jupyter Notebooks?
I have just get my hands dirty with VSCode's extension Google Colab (by Google).
While I can connect to google servers for running Jupyter Notebooks (.ipynb files), Is there a way to use VSCode ...
-1
votes
0
answers
32
views
Deciding on a new language for a database application [closed]
About 3 years ago I developed a fairly simple database in Microsoft Access. I was very unexperienced at the time, and now I'm noticing major issues with how I structured tables and the database is ...
0
votes
0
answers
15
views
Numpy importing error in mod_wsgi app on Fedora 43
I'm getting an error when importing numpy from an Apache mod_wsgi application on Fedora 43. It does not happen in Rocky Linux 9, the production server.
app.wsgi:
import sys
sys.path.insert(0, '/var/...
-3
votes
0
answers
24
views
Instagram Comment Scraping using Selenium - Selenium not loading more than 15 Instagram comments [closed]
I’m working on a Selenium-based Instagram scraper (for learning purposes) and I'm trying to extract the first 20 comments from a post.
However, Selenium always returns only 15 comments, even though ...
-5
votes
0
answers
25
views
How do I efficiently check if any value in a list of dictionaries matches a given key-value pair in Python? [duplicate]
data = [
{"id": 1, "name": "Alice", "active": True},
{"id": 2, "name": "Bob", "active": False},
{"id&...
0
votes
1
answer
30
views
problem with numba calling with dtype fit
I want to use numba to accelerate a physical simulation of water sphere layer, using the code for simulating:
from numba import njit
import numpy as np
from consts import *
"""...
0
votes
0
answers
23
views
Can't show Cv2 frame in pyqt6 QLabel pixmap
I am trying to show a video feed from a camera captured using cv2 in a PyQt6 window. I have done some experimenting and followed a few guides to create the code included below. It creates the window ...
Best practices
0
votes
5
replies
85
views
What is the Pythonic way to handle invalid user input in a while loop?
import random
number_to_guess = random.randint(1, 10)
while True:
guess = input("Guess a number between 1 and 10: ")
# This crashes if 'guess' is not a number
if int(guess) == ...
-2
votes
0
answers
38
views
How to Fix my Code to Simulate a Realistic Three Body Problem? My code plots straight lines that's Incorrect I want to keep correct physics and values [closed]
This is my Code: (I want to plot in 3D the Chaotic and symbolic paths of Three-Body interaction given any input for mass, radius, and initial position of the 3 bodies) I keep getting straight lines as ...
-4
votes
0
answers
63
views
I need to validate a word is infact an english word [closed]
hello i am trying to make some sort of scrabble like game on python and i was wondering is there prebuilt programs that can already validate if a word is a proper word on python I've heard of enchant ...
0
votes
0
answers
38
views
Polars lazyframe update() silently failing in a serverless Cloud Function (OOM error)
I am trying to apply changes from one dataframe (source file is a 7 MB .CSV) to a larger dataframe (source file approx. 3GB .CSV), e.g. update existing rows with matching IDs, while at the same time ...
-1
votes
0
answers
37
views
Why LoRA Shows 1.4B Trainable Params Instead of 38M When Fine-Tuning Gemma 3 4B? [closed]
I found a code snippet for fine-tuning the Gemma-3 4B model on an OCR dataset that converts handwritten math formulas into LaTeX. The original author shared their results showing about **38 million ...
0
votes
0
answers
34
views
Why different files produce same GNSS plots in my Python code?
I wrote a piece of Python code to read different GPS observation files (.24o) and navigation files (.24p), and generate polar plots of satellite trajectories. It is hoped that the RINEX file can be ...
0
votes
0
answers
32
views
Altair choropleth map selection interval and bidirectional linking
I want to make a bidirectional plot where the selected values through brush in the scatter plot appear in a different opacity in the choropleth map, and the selected countries in the choropleth appear ...
0
votes
1
answer
58
views
How to install locally built package with uv
I am struggling a bit with uv mental model and compatibility with existing tool.
I have a project with a "setup.py", previously using python -m build to run the build. I couldn't find a way ...