2,209,289 questions
0
votes
1
answer
11
views
NumPy generate a 2d linear array using multiple values
So I'm trying to generate a map for a personal project using opensimplex noise, multiple layers etc.
My problem is that I want to recreate the equator to combine with a temperature map to obviously ...
0
votes
0
answers
6
views
Matplotlib polar plot has broken lines for satellite trajectories
When drawing satellite trajectories, the azimuth Angle jumps from 359° to 0°, causing the line segments to span the entire chart (break) instead of smoothly connecting.
python version:3.11.9; ...
0
votes
2
answers
28
views
subtract list with same length
I want to subtract two list with the same length such it returns a list with same length, for example,
a = [1,2,3,4]
b = [5,4,3,7]
a-b=[1-5,2-4,3-3,4-7]=[-4,-2,0,-3]
is there any method?
Best practices
0
votes
0
replies
17
views
Logger Configuration for Python Projects
I am wondering how I am supposed to setup a logger for python projects.
It makes sense that I can setup a logger for the main file in a project Example:
# main.py
logger = logging.getLogger('...
0
votes
0
answers
15
views
In GeoPandas, list of latitude and longitude points not being classified into a boundary area
I’m working with the Ceremonial County Boundaries of England shapefile available here:
https://www.data.gov.uk/dataset/0fb911e4-ca3a-4553-9136-c4fb069546f9/ceremonial-county-boundaries-of-england
The ...
-3
votes
0
answers
29
views
Downloading an entire wiki project [closed]
I am trying to download a wiki for a community because I have a feeling they're going to be wiping parts of it, but I can't find a means to do so after searching around for some time. The only option ...
-9
votes
0
answers
49
views
How to solve this question on AND operation? [closed]
You are given an array of length . You are also given tasks.
Each task is of the following type:
L R V: Apply the bitwise-and operator with V for all
You need to print the array after performing all ...
1
vote
2
answers
36
views
Implement a Sentinel Flag without an Arbitrary Value
I'm trying to implement a sentinel flag in Python without using an arbitrary value. That means the sentinel variable cannot be assigned a specific value like None , 0 , False, "wrong", etc. ...
0
votes
0
answers
18
views
Creating a full screen compatible overlay for MacOS [duplicate]
// Source - https://stackoverflow.com/q/79826930
// Posted by DwangML, modified by community. See post 'Timeline' for change history
// Retrieved 2025-12-01, License - CC BY-SA 4.0
import AppKit
...
Tooling
0
votes
1
replies
29
views
Implement STL flexi toy maker / add hinges to STL files programmatically
So, what I am trying to implement is STL flexi toy maker app.
The desired functionality is simple: the user uploads stl -> selects where to 'cut' (where the hinges will be) -> the model is ...
Best practices
1
vote
1
replies
30
views
Create mask from array based on threshold
I have an array and I want to create a mask for this array based on a threshold, sorry if the explanation is a bit convoluted.
The first step is to find the intervals of elements higher than half of ...
-3
votes
0
answers
70
views
How to edit/replace text in a PDF without changing formatting [closed]
I’m building a Python app where the user uploads a PDF, I modify or add a few words, and then return the edited PDF back to them.
The critical requirement is that the resulting PDF must look exactly ...
3
votes
4
answers
101
views
Convert this date/time format into pandas datetime
I downloaded some data from a data repository to do some analysis, and it is in a format that I have never seen and do not know how to work with.
import pandas as pd
raw={
'Fill':['text','','','...
Advice
0
votes
2
replies
33
views
How to navigate to domain (not url) in Python Playwright?
I know that Playwright has Page class with goto() method, but it accepts url only. In my use case I'll most probably test sites knowing only their domain, so I'd have let's say google.com as url ...
0
votes
1
answer
38
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 ...