Skip to main content

Question list filters

Filter by
Sorted by
Tagged with
Score of 1
0 answers
7 views

I have some code, where I'm trying to compare words present within sentences in one column, to the first n words in a wordlist (in another column), and return the words in the sentences that don't ...
Score of -1
1 answer
50 views

I am trying to move from a prepackaged Flask/uWSGI to a custom Docker with Gunicorn. My Dockerfile is changed into: FROM python:3.13-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ ...
Score of 0
1 answer
109 views

According to the docs, typing.Final is: Special typing construct to indicate final names to type checkers. Final names cannot be reassigned in any scope. Final names declared in class scopes cannot ...
Score of -2
0 answers
107 views

I'm trying to make a bar chart showing pinned/unpinned vortices depending on tilt. Because of this, I want each bar to represent one vortex, and the y-axis to be the tilt. Currently I have this code, ...
Score of -3
0 answers
58 views

Years ago (2015-2020) I created a few hobby projects. The setup was extremely simple via: tiangolo/uwsgi-nginx-flask:latest docker image, a slim docker image with a production ready webserver simple ...
Score of 0
1 answer
179 views

I have this generic class: class Box[T]: def __init__(self, val: T): self.val = val In Python <3.12, that would be written: from typing import TypeVar, Generic T = TypeVar('T') class ...
Score of 0
2 answers
114 views

I query a DFS table from Python. select * gives me correct dates and tickers, but as soon as I list the columns, TIME turns into 8 and CODE turns into 22 — the numeric columns are fine. raw = session....
Score of 3
2 answers
114 views

I have this generic class in Python 3.12: class Box[T]: def __init__(self, val: T): self.val = val I can instantiate it in 3 ways: box: Box[int] = Box(42) box = Box[int](42) box = Box(...
Score of 1
1 answer
129 views

I'm writing some code that I want to make use of lazy imports, which were introduced in Python 3.15. However, I want the code to run fine on Python < 3.15 too, albeit without lazy imports. Just ...
Score of -6
0 answers
93 views

Is there a way to make multiple copies of a class without specifying the variable name? Like how scratch has a "make clone of self" block. What I want is for there to be multiple items, so I ...
Score of 5
2 answers
112 views

I have these two attrs classes in Python: import attrs @attrs.define(frozen=True) class FooA: x: int @attrs.define class FooB: x: int = attrs.field(on_setattr=attrs.setters.frozen) In #1, ...
Score of -2
2 answers
135 views

Consider the following class Point and its metaclass PointMeta. What happens if I omit the super call in __init__ method of PointMeta class, is there any difference in behavior? class PointMeta(type): ...
Score of 2
1 answer
135 views

I'm learning how to capture video from camera using opencv for Python. The official tutorial provides the following example (modified): import cv2 as cv cap = cv.VideoCapture(0) if not cap.isOpened():...
Score of -5
0 answers
132 views

I am a Computer Science student working on a project that analyzes dog barks to determine the underlying emotion. Aside from the complex data collection process (recording barks and their associated ...
Score of -5
1 answer
254 views

According to Wikipedia: Python 3.0 was released on 3 December 2008, and was a major revision and not completely backward-compatible with earlier versions, with some new semantics and changed syntax. ...

15 30 50 per page
1
2 3 4 5
…
146952