2,208,354 questions
Advice
0
votes
2
replies
14
views
Automating Image Classification for Website Content Using Computer Vision
There are a large number of images that need to be uploaded to my organization’s website. Currently, it takes a significant amount of time to manually classify each image into categories such as tower,...
0
votes
0
answers
19
views
GitLab CI: Unable to download job artifact from another project – CI_JOB_TOKEN returns 404, private token returns 401
I’m facing an issue while trying to download a job artifact from one GitLab project into another using GitLab CI/CD.
What I’m trying to achieve
In the project A, I want to improve CI testing by:
...
-2
votes
1
answer
35
views
Most efficient way to merge two lists of dictionaries by a shared key in Python? [duplicate]
I have two lists of dictionaries in Python, and I need to merge them into a single list based on a shared key (e.g., id).
My Data:
Python
list_a = [
{'id': 1, 'name': 'Alice'},
{'id': 2, 'name'...
-2
votes
0
answers
16
views
Celery worker crashes after hitting memory limit in low-RAM setup
I’m running Celery with multiple workers on a low-memory server (1GB RAM). When a worker’s memory usage grows and hits its limit, it stops processing tasks and eventually crashes with a memory error.
...
0
votes
0
answers
15
views
Python TypeError in GFG Minimize Heights II – missing positional argument ‘k’
I am trying to solve the “Minimize the Heights II” problem from GeeksforGeeks using Python. The problem gives you a sequence of tower heights and requires modifying each tower height by either ...
-1
votes
1
answer
28
views
Python Call Base Class Stringification [duplicate]
I'm struggling to figure out how to call the base class implementation of stringification in Python. The following illustrates what I am attempting to do:
class A:
def __init__(self, text):
...
-2
votes
0
answers
16
views
.loc uses label based slicing [closed]
But why does it still give an output when both the start and end index are not present as index. (as in the image). This behavior is similar to position based rather than label based
enter image ...
-2
votes
0
answers
18
views
Apache Superset: Localhost refused to connect while embedding Superset through iframe [closed]
I am using version 6.0.0 in Docker Desktop and tried to embed a dashboard in a simple .html file through iframe. But it says
localhost refused to connect
whenever I am tying to execute the HTML file....
0
votes
1
answer
37
views
Cannot resolve circular reference between two models
I have these two models (I've trimmed away extra fields to keep it readable):
class Forum(LegacyBase):
__tablename__ = "forums"
id: Mapped[int] = mapped_column("forumID", ...
-7
votes
0
answers
30
views
Record Validation and Consistency Check on SCHOLAR.txt [closed]
A text file SCHOLAR.txt contains student academic records.
Each record is stored on one line in the following format:
RollNo@Name@Class@Section@SubjectCodes@Marks
Where:
RollNo → integer (no gaps ...
Best practices
0
votes
1
replies
18
views
How do I properly import a self-written module which depends on a third-party module within a program?
I am writing (in Python) a function for import and use in another program. This function takes standard Python data structures as input, e.g., list of strings, and outputs a numpy array based on the ...
-3
votes
0
answers
34
views
Dash design changed [closed]
My design in dash changed without me asking for it.
I'm using:
app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
And that gave me this design:
But for some reason it changed and now ...
1
vote
0
answers
27
views
Trying to write a Python plug-in for Gimp version 3.0.8 that selects a polygon
After a lot of digging and trying to sort out the older interface API from the gimp 3 version. I find I'm stuck. I'm using the code below to try to select a triangular area. The code runs in the ...
3
votes
1
answer
68
views
is_dir() returns False for relative path, but True for resolved path
I'm on Win11 and have a relative Path instance for which is_dir() returns False:
>>> s = "../../../a/b/c"
>>> p = pathlib.Path(s)
>>> p.is_dir()
False
>>> ...
0
votes
0
answers
32
views
Why does .view() fail after permuting dimensions for a GRU?
I'm trying to train a character-level GRU on Linux kernel source but the training loop keeps crashing with this error:
RuntimeError: view size is not compatible with input tensor's size and stride (...