Dataset Viewer
Auto-converted to Parquet Duplicate
QuestionId
int64
74.8M
79.8M
UserId
int64
56
29.4M
QuestionTitle
stringlengths
15
150
QuestionBody
stringlengths
40
40.3k
Tags
stringlengths
8
101
CreationDate
stringdate
2022-12-10 09:42:47
2025-11-01 19:08:18
AnswerCount
int64
0
44
UserExpertiseLevel
int64
301
888k
UserDisplayName
stringlengths
3
30
79,806,769
2,813,606
How to extract table from PDF with boxes into pandas dataframe
<p>I am trying to solve 3 problems:</p> <ol> <li>Detect a table in my PDF that appears after a specific section.</li> <li>Parse out the information in the table into a pandas dataframe.</li> <li>Mark if a box is checked (or not blank) next to the information parsed from the table.</li> </ol> <p>Here is a link to the <a...
<python><pandas><parsing><pdf><ocr>
2025-11-01 19:08:18
1
921
user2813606
79,806,767
3,577,105
Python: Getting the list of arguments passed into the current function, while allowing keyword argument default values
<p>I'm writing a function whose inner logic needs to know which optional keyword arguments the function was called with.</p> <p>I also need to be able to specify default values for keyword arguments.</p> <p>If an argument was specified in the call, it will behave one way; if that argument was not specified in the call ...
<python><arguments><default>
2025-11-01 19:02:54
0
904
Tom Grundy
79,806,536
4,108,542
"RuntimeError: PdhAddEnglishCounterW failed" in python psutil module
<p>I try to get free memory and swap amounts on Windows 7 64bit machine with psutil python module. Virtual memory info works normally, but getting swap information failed:</p> <pre><code>Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)] on win32 Type &quot;help&quot;, &quot;copyright...
<python><python-3.x><windows><windows-7><psutil>
2025-11-01 13:03:34
1
569
Artem
79,806,527
9,072,753
how to check if pid has rolled over?
<p>I am writing a program that will periodically scan all processes on a machine. I want to cache as much as possible to avoid any system load.</p> <p>I can list all available pids on a machine with <code>ls /proc/[0-9]*</code> and then iterate over the list. What do I use as the key of the cache to protect against pid...
<python><linux><pid>
2025-11-01 12:33:57
2
145,478
KamilCuk
79,806,459
4,565,376
How to get sum of tuples using built-in function?
<p>In Python 3 built-in function <code>sum(iterable, /, start=0)</code> allows to get the total from <code>iterable</code>. <code>start</code> value is not allowed to be a string.</p> <p>Ok, so we can call <code>sum</code> for lists (concatenation)</p> <pre class="lang-py prettyprint-override"><code>sum([[1,2,3],[4,5],...
<python><python-3.x><list><sum><tuples>
2025-11-01 10:10:06
1
337
leofun01
79,806,406
13,392,257
How to handle aiokafka getmany() exceptions in case of stopped kafka
<p>I am runnging aiokafka consumer in fastAPI app In the main file I am starting the consumer</p> <pre><code>from aiokafka import AIOKafkaConsumer def create_application() -&gt; FastAPI: ... return FastAPI() app = create_application() consumer = create_consumer() @app.on_event(&quot;startup&quot;) async def...
<python><apache-kafka><aiokafka>
2025-11-01 08:14:29
1
1,708
mascai
79,806,248
6,822,178
Advanced combinatorics in Python: binom(n,2) subsets of binom(n,3) combinations without repetition
<p>I have a list <code>d_n</code> of <code>n</code> integers and the results <code>Z_klm</code> of a function <code>fun(dk, dl, dm)</code> for all <code>binom(n, 3)</code> combinations without repetition <code>(k, l, m)</code> out of <code>d_n</code> indices.</p> <p>Now, for all <code>binom(n, 2)</code> combinations wi...
<python><combinations><python-itertools><combinatorics>
2025-10-31 22:29:08
1
2,289
Max Pierini
79,806,145
17,472,988
Python gets stuck in an infinite loop restarting multiprocessing pool workers on error in initilization routine
<p>I am trying to setup a multiprocessing Python task on Windows 10, Python 3.13. I have &quot;main.py&quot; module, containing the main entry, &quot;orchestration.py&quot; module with worker initilization and task routines, as well as some other modules not relevanet to present issue. An MRE is shown below.</p> <p>If ...
<python><windows><multithreading><multiprocessing>
2025-10-31 19:34:02
1
1,859
PChemGuy
79,805,870
2,123,706
Python was not found error when running python script from cmd prompt
<p>I can run a python script line by line successfully in VSCode</p> <p><a href="https://i.sstatic.net/BHcx8a9z.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BHcx8a9z.png" alt="enter image description here" /></a></p> <p>But when I try to run it from prompt using <code>python .\test.py</code> I receive...
<python><windows>
2025-10-31 14:09:59
1
3,810
frank
79,805,820
7,699,611
testcontainers initializing dockerclient twice - the second time on container.start
<p>I am trying to create a container with oracle db to run tests. Due to some restrictions, I have to use rootless podman instead of docker. Here is how I do it:</p> <pre><code>def _container_env_kwargs() -&gt; dict: # Try Podman rootless unix socket rootless = f&quot;/var/run/user/{os.getuid()}/podman/podman.s...
<python><python-3.x><docker><testcontainers><podman>
2025-10-31 13:02:02
1
939
Muslimbek Abduganiev
79,805,794
4,316,500
pyueye is_GetCameraList gives wrong dwCameraID
<p>When I open &quot;IDS Camera Manager&quot;, I can read all serial numbers, camera type and CameraID of the connected IDS cameras.</p> <p>I guess that the same functionality expected for the pyueye.ueye.is_GetCameraList function.</p> <p>But when I execute it, I get the right number of cameras (I currently have 2 conn...
<python><python-module>
2025-10-31 12:42:38
0
1,011
2diabolos.com
79,805,594
9,112,151
How to resolve error Unresolved attribute reference 'create' for class 'BaseRepository'
<p>I have code:</p> <pre><code>import logging from typing import Generic, TypeVar from typing import Self, Any, Type from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.orm import Session logger = logging.getLogger(__name__) T = TypeVar('T') class BaseRepository(Generic[T]): model_cls: Type[T] ...
<python><pycharm><python-typing>
2025-10-31 09:34:45
0
1,019
Альберт Александров
79,805,579
1,719,931
Extending polars DataFrame while maintaining variables between calls
<p>I would like to code a logger for polars using the <a href="https://docs.pola.rs/api/python/stable/reference/api.html" rel="nofollow noreferrer">Custom Namespace API</a>.</p> <p>For instance, starting from:</p> <pre class="lang-py prettyprint-override"><code>import logging import polars as pl penguins_pl = pl.read_...
<python><python-polars>
2025-10-31 09:19:13
2
5,202
robertspierre
79,805,422
6,048,158
Why are there no records read from spanner change stream?
<p>I'm trying to write a Python GCP dataflow that processes records from a Spanner change stream and prints them out. I am running it locally and it appears to work but prints no records when I update a record in the database.</p> <p>My setup:</p> <ul> <li>created a Spanner database, a table called <strong>Patients</st...
<python><apache-beam><google-cloud-spanner>
2025-10-31 05:21:17
0
525
Joe P
79,805,402
1,797,628
Python tempfile TemporaryDirectory path changes multiple times after initialization
<p>I am using <a href="https://docs.python.org/3/library/tempfile.html" rel="nofollow noreferrer">tempfile</a> with Polars for the first time and getting some surprising behavior when running it in a serverless Cloud Function-like environment. Here is my simple test code:</p> <pre><code>try: with tempfile.Temporary...
<python><serverless><python-polars><temporary-files>
2025-10-31 04:42:19
1
2,585
starmandeluxe
79,805,124
6,457,407
SWIG code doesn't compile on Github/MacOS machine. Works fine on Linux, Windows
<p>My swig code has stopped compiling when being built on a Github MacOS runner.</p> <p>Since the SWIG code uses numpy, it has the required numpy initialization:</p> <pre><code>%init %{ import_array(); } </code></pre> <p>Swig turns this into the following C code:</p> <pre><code>SWIG_init(void) { ... import_...
<python><gcc><swig>
2025-10-30 18:55:05
0
11,605
Frank Yellin
79,805,035
12,281,892
PyScript on Github pages doesn't see files with relative paths
<p>I have a github repo that is hosted on GitHub Pages (project site). I’m migrating a small PyScript demo to GitHub Pages and hitting 404s when preloading files via <code>&lt;py-config&gt;</code>. This works locally and also worked previously with an older PyScript alpha*. The github repo contains an <code>index.html<...
<python><file><github-pages><pyscript>
2025-10-30 16:59:09
1
2,550
My Work
79,804,988
14,773,854
Windows API: Software breakpoints are not hit
<p>I am using Python to write a rudimentary debugger that will use Windows APIs to debug C source files. I am stuck on creating the software breakpoints. I did some research and found <a href="https://www.codeproject.com/articles/Writing-Windows-Debugger-Part-2" rel="nofollow noreferrer">this article</a> that explains ...
<python><c><winapi>
2025-10-30 16:16:26
1
357
user14773854
79,804,948
5,931,672
Understanging right_bases of peak_prominences
<p>I have this code:</p> <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt from scipy.signal import find_peaks, peak_prominences # I have my array x peaks, _ = find_peaks(x) prominences, left_bases, right_bases = peak_prominences(x, peaks) contour_heights = x[peaks] - prominences plt.plot...
<python><scipy>
2025-10-30 15:45:19
1
4,192
J Agustin Barrachina
79,804,879
6,772,468
How to fix "AttributeError: 'Series' object has no attribute 'codes'" using pandas.Categorical
<p>I am trying to convert a string that is a categorical data type into a numeric. I found out that I can use <a href="https://pandas.pydata.org/docs/reference/api/pandas.Categorical.html" rel="nofollow noreferrer">pandas.Categorical</a>, unfortunately, accessing the codes attribute give me an error.</p> <p>Here is a m...
<python><pandas><categorical-data>
2025-10-30 14:32:42
1
1,375
JA-pythonista
79,804,833
4,498,251
Pandas: Why do certain errors appear?
<p>When executing a simple group by statement on a pandas dataframe, there is a weird error (about details like whether or not to show the group by columns in the resulting table): <a href="https://stackoverflow.com/questions/77969964/deprecation-warning-with-groupby-apply">Deprecation Warning with groupby.apply</a></p...
<python><pandas><dataframe>
2025-10-30 13:47:28
0
1,023
Fabian Werner
79,804,795
5,547,553
How to count the length of a list of dicts, containing bytes as well in python
<p>I have composed this list of dicts:</p> <pre class="lang-py prettyprint-override"><code>from pprint import pprint image = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x16\x00\x00\x00\x16\x08\x02\x00\x00\x00K\xd6\xfbl\x00\x00\x00\tpHYs\x00\x00\x0e\xc4\x00\x00\x0e\xc4\x01\x95+\x0e\x1b\x00\x00\x02\xbfIDAT8\x8d\xa5...
<python>
2025-10-30 13:09:24
0
1,174
lmocsi
79,804,255
1,144,588
Reference column named "*" in Polars
<p>I have a Polars DataFrame with a column named <code>&quot;*&quot;</code> and would like to reference just that column. When I try to use <code>pl.col(&quot;*&quot;)</code> it is interpreted as a wildcard for &quot;all columns.&quot; Here's an example:</p> <pre><code>import polars as pl df = pl.DataFrame({&quot;A&quo...
<python><dataframe><python-polars>
2025-10-29 21:56:41
4
359
Sam
79,804,144
4,503,546
Automating X (Twitter) posts using scheduler and lines from a CSV file
<p>I have put together a simple program to automate posting to x.com (formerly Twitter) with a free X account (i.e. you don't have to pay for an account to run this code).</p> <pre><code>import tweepy BEARER_TOKEN = '' API_KEY = '' API_SECRET_KEY = '' ACCESS_TOKEN = '' ACCESS_TOKEN_SECRET = '' client = tweepy.Client(...
<python><twitter><automation>
2025-10-29 19:11:23
0
407
GC123
79,804,134
7,993,601
Python Google style doc string for generic class Type Parameter
<p>I want to annotate a type parameter for a generic dataclass of mine with a Google style docstring to both support generating documentation <strong>and</strong> mouse hovering within VS Code (and other editors/IDEs). If I use numpy style docstrings it appears to work for mouse hovering, however when I try to use Goog...
<python><python-typing><docstring>
2025-10-29 18:57:10
1
843
Snap
79,804,104
10,203,572
Memory usage keeps increasing when extracting embeddings via sentence-transformers
<p>I have a set of about 100M paragraph-sized strings (multilingual) I am extracting embeddings for, but the memory usage keeps increasing until I start overflowing into disk swap:</p> <pre><code>model = SentenceTransformer(&quot;Qwen/Qwen3-Embedding-0.6B&quot;, tokenizer_kwargs={&quot;pad...
<python><macos><nlp><apple-silicon><sentence-transformers>
2025-10-29 18:09:52
1
1,066
Layman
79,803,382
1,335,340
Transform DataFrame containing ID pairs into a list of sets
<p>I have a Pandas DataFrame with the following structure</p> <div class="s-table-container"><table class="s-table"> <thead> <tr> <th>left_id</th> <th>right_id</th> </tr> </thead> <tbody> <tr> <td>a</td> <td>b</td> </tr> <tr> <td>c</td> <td>a</td> </tr> <tr> <td>x</td> <td>y</td> </tr> </tbody> </table></div> <p>I need...
<python><pandas><dataframe>
2025-10-29 01:57:32
3
917
Joe F.
79,803,302
506,230
Running `pip install -e .` does not install project to PATH
<p>I'm working on a wrapper around a tool called Coverity. I want to provide some syntactic sugar around the existing commands, so I'm using Python's Click library to work up a simple CLI.</p> <p>The problem comes when I follow the instructions on <a href="https://click.palletsprojects.com/en/stable/entry-points/" rel=...
<python><command-line-interface>
2025-10-28 22:16:33
0
5,055
commadelimited
79,803,236
6,822,178
Pandas DataFrame with a hundred million entries and counting the number of identical characters in strings
<p>I have a <code>pandas</code> DataFrame (<code>df</code>) with two columns (namely <code>Tuple</code> and <code>Set</code>) and approximately 100,000,000 entries. The <code>Tuple</code> column data is a string of exactly 9 characters. The <code>Set</code> column data is an ordinal integer from <code>0</code> to appro...
<python><pandas><dataframe><bigdata><counter>
2025-10-28 20:21:06
3
2,289
Max Pierini
79,803,160
10,017,890
With GCP Vertex AI, how do I do prompt management
<p>In AWS Bedrock, we can use AWS BEDROCK PROMPT MANAGEMENT to manage the prompt lifecycle. How do I do this in GCP VertexAI or Google AI studio</p> <p>I have tried to use the code mentioned in the below link , but the code looks like is not working and the vertex AI package seems to be old</p> <p><a href="https://docs...
<python><google-cloud-platform><google-cloud-vertex-ai><google-generativeai>
2025-10-28 18:41:17
1
1,860
Rajib Deb
79,803,079
1,946,418
Python install exe cmdline options seems not enough?
<p>Trying to install Python installation exe on several machines, so looking for some cmdline help</p> <p><a href="https://www.python.org/ftp/python/3.14.0/python-3.14.0-amd64.exe" rel="nofollow noreferrer">https://www.python.org/ftp/python/3.14.0/python-3.14.0-amd64.exe</a></p> <p><code>python-3.14.0-amd64.exe /help</...
<python><windows><exe>
2025-10-28 16:51:35
0
1,120
scorpion35
79,803,053
16,688,854
Asynchronous listening and processing in a Pyside app
<p>I am having difficulties integrating asyncio with Pyside.</p> <p>What I want to acheive:</p> <ul> <li>I have several emitters (up to 30) sending messages independently every few milliseconds (200ms) in multicast.</li> <li>I have a python PySide app that needs to listen to these incoming messages, process them, and u...
<python><pyqt><python-asyncio><pyside><multicast>
2025-10-28 16:16:04
1
337
Antoine101
79,803,031
6,024,187
Remove horizontal white space between square matplotlib plots
<p>I cannot remove the horizontal white space between a large number of subplots in matplotlib lib. How do I do this?</p> <p>I think the problem is that the default plots are very wide, so that even when I set <code>wspace</code> to zero and matplotlib thinks it is smashing the plots together, there is still a ton of ...
<python><matplotlib>
2025-10-28 15:58:16
1
897
Finncent Price
79,802,985
1,264,097
Real copies of functions in Python
<p>In Python 3, I have the following code snippet:</p> <pre><code>x = [1,2,3] test = [] for i in range(3): def broken_func(a): return x[i] + a test.append(broken_func) print('Test at creation :', test[-1](1), test[-1]) for func in test: print('Test later :', func(1), func) </code></pre> <p>The...
<python>
2025-10-28 15:18:57
1
697
R. C.
79,802,842
3,025,981
Adding an Object column to a polars DataFrame with broadcasting
<p>If I have a DataFrame, I can create a column with a single value like this:</p> <pre class="lang-py prettyprint-override"><code>df = pl.DataFrame([[1, 2, 3]]) df.with_columns(pl.lit(&quot;ok&quot;).alias(&quot;metadata&quot;)) </code></pre> <pre><code>shape: (3, 2) ┌──────────┬──────────┐ │ column_0 ┆ metadata │ │ -...
<python><dataframe><python-polars>
2025-10-28 13:07:20
2
8,187
Ilya V. Schurov
79,802,787
482,717
Analyze emails using Apple Intelligence on macOS 26 (Tahoe)
<p>How to access Mail app emails on my MacBook with maOS 26.0.1. using Python and Apple Intelligence?</p> <p>I need to generate a report based on email Sender, Topic, and Content.</p>
<python><macos><apple-intelligence>
2025-10-28 12:23:10
0
64,604
Paul Verest
79,802,758
1,230,477
Failure to load Auth Cookies by Playwright into browser context
<p>With Camoufox server and browser I manually create a browser context and save it as a state file (cookies, incl. auth cookies).<br /> See the file:<br /> <a href="https://i.sstatic.net/19wgtOm3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/19wgtOm3.png" alt="enter image description here" /></a></p> ...
<python><cookies><playwright><camoufox>
2025-10-28 11:51:26
0
6,351
Igor Savinkin
79,802,659
3,535,147
Trying to solve a pip-compile stack trace error
<p>When I run pip-compile I get an error telling me that</p> <pre><code>AttributeError: 'InstallRequirement' object has no attribute 'use_pep517' </code></pre> <p>I am using</p> <ul> <li>Python 3.11.6</li> <li>pip v25.3</li> <li>pip-compile v7.5.1</li> </ul> <p>From other threads, I suspect that there is a compatibilit...
<python><pip><pip-compile>
2025-10-28 10:27:32
1
303
user3535147
79,802,641
17,472,988
Micromamba crashes with null pointer dereference error
<p>When attempting to execute Micromamba</p> <pre class="lang-none prettyprint-override"><code>micromamba.exe --version </code></pre> <p>it crashes with the null pointer dereference error:</p> <p><a href="https://i.sstatic.net/Yjg9Iix7.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Yjg9Iix7.jpg" alt="Mi...
<python><anaconda><conda><mamba><micromamba>
2025-10-28 10:16:46
1
1,859
PChemGuy
79,802,572
6,265,620
How to read uploaded file by LangGraph
<p>I am following <a href="https://docs.langchain.com/oss/python/langchain/context-engineering#messages" rel="nofollow noreferrer">Context engineering in agents - Docs</a> by LangChain which reads the uploaded files in a call to <code>wrap_model</code>. This is</p> <p>The code, copied from the linked document:</p> <pre...
<python><langchain><langgraph><langsmith>
2025-10-28 08:51:20
1
30,226
Edward
79,802,430
188,331
Transformers with Python 3.12.3 produce lots of errors
<p>I got Python 3.12.3 on an Ubuntu server. I tried to install <code>transformers</code>, <code>tokenizers</code>, <code>datasets</code> and <code>accelerate</code> to use the <code>Seq2SeqTrainer</code> in the <code>transformers</code>.</p> <p>I used a virtual environment for the installation, ensuring the installatio...
<python><huggingface-transformers>
2025-10-28 04:35:06
0
54,395
Raptor
79,802,360
962,844
Superset Guest Token
<p>I'm trying to access an Apache Superset dashboard using a guest token, but no matter what configuration I change, Superset always redirects to the login page instead of displaying the embedded dashboard.</p> <p><strong>Setup:</strong></p> <p>I plan to deploy Superset to a production server later, but for testing pur...
<python><docker><apache-superset>
2025-10-28 01:36:36
0
2,678
Mateus
79,802,146
10,034,073
Python catch ImportError without catching transitive errors raised by the module
<p>In Python, when an <code>import</code> fails, how can I differentiate between:</p> <ul> <li>The module doesn't exist.</li> <li>The module exists, but it tried importing another module that didn't exist.</li> </ul> <hr /> <h1>Example</h1> <pre class="lang-py prettyprint-override"><code># ./first.py try: import s...
<python><python-import><importerror>
2025-10-27 18:40:28
2
444
kviLL
79,802,076
21,826,195
Why do I get a SettingWithCopyWarning when using shift and dropna inside a function?
<p>In general, when I receive this warning</p> <pre><code>/home/mo/mwe.py:7: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead </code></pre> <p>I head to the <a href="https://stackoverflow.com/a/53954986/21826195">second ...
<python><pandas><dataframe><pandas-settingwithcopy-warning>
2025-10-27 17:07:10
3
2,028
Mo_
79,802,064
1,200,914
Lock a DynamoDB table on reading/writing operations
<p>I have a DynamoDB table with entries that can have a status (waiting, error, running...). Only up to 25 entries can have running status.</p> <p>My objective is to have an AWS Lambda function that checks if there are fewer than 25 entries with &quot;running&quot; status, and if so, retrieve the next N entries that ha...
<python><amazon-web-services><aws-lambda><amazon-dynamodb>
2025-10-27 16:42:29
1
3,052
Learning from masters
79,801,880
3,997,262
How to call custom embedding specifically in litellm?
<p>I am trying to implement a custom llm router and have this in my <code>.yaml</code> file:</p> <pre class="lang-yaml prettyprint-override"><code>model_list: - model_name: &quot;text-embedding-3-small&quot; litellm_params: model: &quot;custom_llm_router/text-embedding-3-small&quot; ... </code></pre> <p>in ...
<python><litellm>
2025-10-27 13:42:18
0
592
programmer
79,801,782
4,393,951
Python execution log with call stack
<p>I have complicated Python code which I wish to trace. I want to have a log file that will list all function calls in the order in which they are called, and for each call:</p> <ul> <li>the current call stack</li> <li>parameters passed to the function</li> <li>return values</li> </ul> <p>Doing this by inspecting the ...
<python><trace>
2025-10-27 11:47:09
1
499
Yair M
79,801,771
244,297
How to detect redundant assignments with Python linters?
<p>Consider this small function:</p> <pre><code>def test(): x = 1 x = 2 x = 3 return x + 1 </code></pre> <p>Apparently, the first two assignments to <code>x</code> have no effect here and can be removed. Yet surprisingly, <code>pylint</code>/<code>flake8</code>/<code>ruff</code> don't produce any warnin...
<python><static-analysis>
2025-10-27 11:39:07
1
151,764
Eugene Yarmash
79,801,475
10,339,757
Convert existing dataset to rioxarray object
<p>I have a dataset that I need to convert into a rioxarray dataset so I can use regridding features but I can't work out how to convert an already existing xarray object to rioxarray.</p> <p>Unfortunately I can't just load the object in as an rioxarray object as the file is a csv that I convert from a pandas object to...
<python><geospatial><python-xarray>
2025-10-27 05:27:11
2
371
thefrollickingnerd
79,800,033
307,050
How to asynchronously push state from backend to frontend
<p>I'm trying to build a simple app using <a href="https://reflex.dev/" rel="nofollow noreferrer">Reflex</a>.</p> <p>My use case is different from most of the examples shown in the docs.</p> <p>I need to constantly receive data from a UDP socket, parse the contents and then push certain values from the backend to the f...
<python><python-reflex>
2025-10-26 12:04:27
1
1,347
mefiX
79,800,025
10,490,375
Build numpy 2.3+ without accelerated libraries
<p>Related post: <a href="https://stackoverflow.com/questions/32228967/compile-numpy-without-intel-mkl-blas-atlas-lapack">Compile numpy WITHOUT Intel MKL/BLAS/ATLAS/LAPACK</a></p> <p>Recent versions of numpy use <code>meson</code> for build configuration, I can build numpy from source but failed to exclude BLAS/LAPACK/...
<python><numpy><lapack><blas><meson-build>
2025-10-26 11:52:01
1
376
nochenon
79,799,743
19,968,680
Will calling Engine.dispose() in a forked process cause errors in another process?
<p>When using SQLAlchemy in a forked process, the recommended approach per <a href="https://docs.sqlalchemy.org/en/latest/core/pooling.html#using-connection-pools-with-multiprocessing-or-os-fork" rel="nofollow noreferrer">sqlalchemy documentation</a> (EDIT: originally linked <a href="https://docs.sqlalchemy.org/en/13/c...
<python><sqlalchemy><fork><connection-pooling>
2025-10-25 21:12:18
2
322
gbiz123
79,799,713
215,761
apache fails to import from correct PYTHONPATH
<p>The situation is like this:</p> <ol> <li><p>in my <code>httpd.conf</code>, I have</p> <pre><code>SetEnv PYTHONPATH /Users/&lt;MY_NAME_&gt;/PATH_TO/py3 </code></pre> </li> <li><p>my Python script in a browser runs, prints something like a header, and then I print from it the environment like</p> <pre class="lang-py p...
<python><macos><apache>
2025-10-25 19:37:21
1
320
Vlad K.
79,799,613
2,741,620
Horizontal scrollbar on tkinter treeview is not working
<p>I am using tkinter, pandas and treeview. The treeview is to display an excel file via filedialog with 15 columns, which is very lengthy, hence I needed a horizontal scrollbar.</p> <p>However the scrollbar does not work. The treeview spans the excel data out of the window.</p> <p>How can I solve this?</p> <pre><code>...
<python><tkinter><treeview>
2025-10-25 16:31:44
1
367
user2741620
79,799,589
4,214,922
How do I exchange a service account for a tenant encoded token
<p>Using identity platform I'd like to exchange a service account for a tenant encoded token. I need to do this because our GitHub action needs to make use of our cli tool which requires sign in by a tenant user. And the GitHub action is using a service account set as a secret which has the role 'Service Account Token ...
<python><google-cloud-platform><firebase-authentication><google-identity-toolkit>
2025-10-25 15:39:00
1
3,591
anonymous-dev
79,799,564
6,066,645
Why does my PySide6 DBUS ScreenSaver Signal-Listener not work?
<p>I am currently trying to connect to the Screensaver Signal (<code>org.freedesktop.ScreenSaver</code> - <code>/ScreenSaver</code> - <code>ActiveChanged(bool)</code>) that is emitted when the Screen-Saver is closed:</p> <pre><code>$ dbus-monitor &quot;interface='org.freedesktop.ScreenSaver'&quot; ... signal time=17613...
<python><qt><dbus><pyside6><freedesktop.org>
2025-10-25 14:48:41
0
440
Gerrit Addiks
79,799,443
428,542
Type-hinting a combined Mix-in class and subclass leads to TypeErrors
<p>The following code-snippet bridges some dataclasses and GUI-classes using PySide6 (the Qt library).</p> <p>The <code>HasDataobject</code> class is key here. It defines a mix-in for subclasses of <code>QGraphicsItem</code>. It adds an attribute (<code>dataobject</code>) and method (<code>update_visibility()</code>) t...
<python><python-typing><mixins><pyside6>
2025-10-25 10:27:27
1
3,568
MacFreek
79,799,441
16,220,410
no visual active indication of python environment in linux mint terminal
<p>i cant figure out why there is no visual indication that the python environment is active, i have created the venv with uv, i have installed the flet framework inside it and i can run the python file without issue but there is no indication in the terminal that it is active after it is activated, i am using Oh-My-Po...
<python><bash><oh-my-posh>
2025-10-25 10:26:10
1
1,277
k1dr0ck
79,799,270
1,796,123
How to reuse a Django model for multiple relationships
<p>I want to make a task model and a user model. And I want each task to be able to be related to 3 users. Each task should be related to a creator user, an assignee user, and a verifier user. And I want to only have one user table. My inclination is to have 3 foreign keys on the task table: creator_id, assignee_id, an...
<python><django><django-models>
2025-10-25 01:23:17
2
6,410
wetjosh
79,799,210
1,727,657
Confused about variable scope - why is x local in this function and why isn't it associated with a variable?
<p>When I run the Python script below, I get the following error from Ipython (v3.14):</p> <pre><code>UnboundLocalError: cannot access local variable 'x' where it is not associated with a value </code></pre> <p>and it highlights the 2nd <code>x</code> in <code>print('x = ',x)</code>. But if I comment out the next line...
<python>
2025-10-24 22:24:11
0
477
OutThere
79,799,126
784,318
Line unnecessarily expanded
<p>In my Python code I have a line that looks like so:</p> <pre><code>tm = tm[0:3] + [0,] + tm[3:6] + [0,] </code></pre> <p>Ruff attempts to fix this with the following 10 lines, which are arguably less legible:</p> <pre><code>tm = ( tm[0:3] + [ 0, ] + tm[3:6] + [ 0, ] ) </code><...
<python><ruff>
2025-10-24 20:08:03
1
23,067
Besi
79,799,057
11,581,214
Applying JavaScript formatting to IronPDF form using PyMuPDF
<p>I am using IronPdf (2025.6.1.5) to create fillable PDF forms. This involves creating HTML forms and converting them to PDFs with IronPDF. I am post-processing the PDFs with PyMuPDF (1.26.4) to apply JavaScript controls to fields to specify currency, percentage, and number formats. I am using the Adobe Acrobat <code>...
<javascript><python><pdf><pymupdf><ironpdf>
2025-10-24 18:05:14
0
524
BalooRM
79,798,997
1,194,864
Compute instance on demand on google cloud for a websocket application
<p>I have created a WebSocket application, and I have stored my server on a VM running on google-server-platform as an Compute Engine (I am really custom to the correct terminology). This VM is constantly running and listening to the client. To run the server, I am using an SSH connection to activate and then running m...
<python><google-cloud-platform><websocket><google-compute-engine>
2025-10-24 16:52:03
2
5,452
Jose Ramon
79,798,940
1,818,713
python typing distinctions between inline created parameters and variables
<h4>Preamble</h4> <p>I'm using polars's <code>write_excel</code> method which has a parameter <code>column_formats</code> which wants a <code>ColumnFormatDict</code> that is <a href="https://github.com/pola-rs/polars/blob/main/py-polars/src/polars/_typing.py" rel="nofollow noreferrer">defined here and below</a></p> <pr...
<python><python-typing><python-polars>
2025-10-24 15:52:54
2
19,938
Dean MacGregor
79,798,928
10,034,073
Access expected type in Pydantic within a field wrap validator using the annotated pattern
<p>I'm using a <a href="https://docs.pydantic.dev/latest/concepts/validators/#field-wrap-validator" rel="nofollow noreferrer">field wrap validator</a> in Pydantic with the Annotated pattern, and I want to access the expected/annotated type of a field from within the validator function. Here's an example of what I want:...
<python><validation><python-typing><pydantic><pydantic-v2>
2025-10-24 15:33:29
1
444
kviLL
79,798,911
5,877,334
Microsoft Graph API: Intune Win32 App Upload - commitFileFailed Error After Successful API Calls
<p>I'm experiencing persistent <code>commitFileFailed</code> errors when uploading .intunewin files to Microsoft Intune via the Graph API. All API calls return success status codes, but the final commit processing fails internally.</p> <p><strong>API Workflow</strong></p> <p>Following the standard Microsoft Graph API s...
<python><azure><microsoft-graph-api><microsoft-graph-intune>
2025-10-24 15:12:03
0
1,099
aprasanth
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
17