Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
78 views

originally I was trying to install opencv-python which fails on trying to install numpy:2.2.6 So I am trying to just install this numpy and for some obscure reason it tries to build it! instead of ...
62mkv's user avatar
  • 1,584
2 votes
1 answer
63 views

Imagine having the following polars dataframe "df" that contains the temperature of a machine that is either "active" or "inactive": import polars as pl from datetime ...
the_economist's user avatar
1 vote
1 answer
66 views

I found a suggestion to use ticker.PercentFormatter. This changed the decimal numbers on the y-axis to percentages like I want, but the style formatting (grid, background, etc.) is lost, and the ...
timelessbeing's user avatar
1 vote
1 answer
64 views

I am currently defining ORMs and DTOs in my fastapi application, and using SQLAlchemy 2.0 for this job. Many sources, including the official docs, specify that the way to use mapped types with ORMs is ...
xxixx's user avatar
  • 11
1 vote
0 answers
54 views

Does anyone know how to remove this white space? This is my current stylesheet: QTableView { background-color: #EEEEEE; } QTableView::item { background-color: transparent; } QHeaderView::...
Shadow_Guo's user avatar
1 vote
0 answers
52 views

I'm trying to connect Cursor to my custom MCP server, but it doesn’t work. How can I fix this? MCP Server Code from starlette.applications import Starlette from starlette.routing import Mount from mcp....
nemy's user avatar
  • 619
Advice
0 votes
0 replies
43 views

I need to migrate an insanely large code base that extensively uses SQLAlchemy 1.4 to 2.0. I am sure there is something I can do to automate or simplify at least a piece of this task, but I haven't ...
Mefitico's user avatar
  • 1,176
Advice
0 votes
1 replies
57 views

We’re working with a user table populated from multiple SSO sources, and the data has inconsistencies that hinder generating standardized names. I need a persistent, automated way to extract and ...
John Doe's user avatar
1 vote
0 answers
75 views

I have a table that looks like this import polars as pl df = pl.DataFrame( { "col1": [1, 2, 3, 4, 5], "col2": [10, 20, 30, 40, 50], "col3": [...
Lethnis's user avatar
  • 31
Advice
0 votes
7 replies
104 views

I use the polars, urllib and tldextract packages in python to parse 2 columns of URL strings in zstd-compressed parquet files (averaging 8GB, 40 million rows). The parsed output include the scheme, ...
norcalpedaler's user avatar
3 votes
3 answers
104 views

I have a black box function baseball that determines the magnitude of the distance that a baseball travels when launched. It takes the initial speed, the angle of launch and the initial spin. Assuming ...
panji's user avatar
  • 47
-3 votes
1 answer
52 views

This is my code: def q_f_a(t_p): x1 = t_p[0][0] y1 = t_p[0][1] x2 = t_p[1][0] y2 = t_p[1][1] x3 = t_p[2][0] y3 = t_p[2][1] a = [ x1 * ( y3 - y2) + x2 * ( y1 - y3 ) + x3 * ( ...
mark jan Horst's user avatar
2 votes
0 answers
44 views

In WSL (Ubuntu 24.04), when using Conan to create a package that links pybind11/3.0.1, the resulting executable in the test_package fails to run. Even if the executable doesn't directly call any ...
AzusaYu's user avatar
  • 21
5 votes
2 answers
278 views

I have this code in C++: #include <iostream> #include <iomanip> #include <limits> #include <boost/multiprecision/mpfr.hpp> using namespace boost::multiprecision; template<...
Stasiu222's user avatar
0 votes
2 answers
74 views

I wanted to try to use tkinter for the first time, and had a little program I wanted to try. It needed some text in a "table" and because of the number of rows and columns, I needed ...
TTM's user avatar
  • 21
0 votes
0 answers
20 views

There has been at least one other question regarding the introduction of new dimensions in the output of xarray.apply_ufunc; I have two problems with this answer: First, I feel like the answer avoids ...
derM's user avatar
  • 13.8k
-1 votes
1 answer
37 views

I have written a minimal test example to try and debug some issue I have been having where COPY does not appear to do anything when used to copy data to a postgres database. This is my Python code: ...
user2138149's user avatar
  • 18.6k
0 votes
1 answer
43 views

I'm learning how to use MQTT on AWS IoT - the goal is to simply publish and receive between AWS IoT MQTT test client and a Python script. I can successfully publish from my Python code but I am unable ...
user145760's user avatar
1 vote
2 answers
128 views

I have one dataframe with sessions - one session, one row, so SID is unique. The session has a doctor name. SID Doctor Patient 1 robby david 2 langdon sara 3 langdon michael I have another dataframe ...
Semyaz's user avatar
  • 11
0 votes
1 answer
53 views

I had this script for automated solving of a little daily game thing. I used to be able to run it by typing cmd into the folder where the script was, and then running the script by entering scriptname....
russia's user avatar
  • 1
0 votes
1 answer
82 views

def prepare_dataframe(df): # Map original CSV column names to internal aliases for easier access df.rename(columns={ 'Bomba Calor - Temperatura de Aire (°C)': 'temp_aire', '...
Juan Siécola's user avatar
1 vote
1 answer
73 views

I need to compute the Hessian of a function involving cross products in Python. As an experiment, I consider the simple function def func(x): return np.sum(np.cross(x[0:3], x[3:6])) and compute the ...
CW279's user avatar
  • 153
2 votes
2 answers
43 views

I’m working on a Python project on Windows 11 using VSCode. I recently reorganized my project by moving all files from a subfolder to the root folder so that the code can be executed directly from the ...
user31885331's user avatar
Advice
0 votes
0 replies
22 views

I'm doing a model for scheduling personnel through VRP formulation and I would like to know how can I integrate precedence binary matrix, using the CSR to accelerate the data processing. My precedence ...
user21559's user avatar
0 votes
1 answer
47 views

I’m running a Google Cloud Run service that exposes an API endpoint performing heavy computational tasks (CPU-bound). The API will be called very occasionally and for now there will never be ...
JoScratcherJo's user avatar