Questions tagged [python]
Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability. Use the python tag for all Python related questions. If you believe your question may be even more specific, you can include a version specific tag such as python-3.x.
15,592 questions
7
votes
2
answers
343
views
Find the nearest school to you
I have created a text-based program that finds the nearest school using your coordinates.
The CSV DataFrame is available through LimeWire.
I'd like to know how I can improve it.
...
5
votes
2
answers
216
views
Transform dataset coordinates from Lambert Conformal Conic projection to WGS84
I am trying to convert a dataset which has a Lambert Conformal Conic projection to the classic WGS 84 with Python. Unfortunately, the dataset does not have a defined EPSG code, but the general ...
5
votes
3
answers
578
views
News API in Python - Take II
From my previous post, I tried to take into account all of the nice answers made by Kate, Chris, J_H, Booboo and mudskipper
Changes made
In short, I attempted to apply all of the following:
API key ...
8
votes
5
answers
1k
views
News API in Python
Why I made it
I’m building a voice assistant and thought it would be great if it could deliver news updates.
What it does
It cleans up the user’s query, determines whether it refers to a news category ...
4
votes
2
answers
258
views
Create Frame Widget with Pygame
I developed two custom UI components with Pygame: a Button widget and a Frame widget. After placing the Button inside the Frame, I encountered an issue with the Button’s collision detection.
...
5
votes
4
answers
477
views
Substitute patterns with values from lists
I was looking at a Stack Overflow question and got somewhat carried away with improving the solution, well beyond the scope of that question.
In summary, we have a string such as
...
6
votes
3
answers
641
views
ASCII-based Lightweight Browser with Clippy-Style Helper in Python (Updated)
This question used to contain a mistake in the code, so I had to debug and reformat it. This is the correct version.
Why I made it
A friend and I wanted to make a lightweight browser, since our ...
1
vote
2
answers
122
views
ASCII-based Lightweight Browser with Clippy-Style Helper in Python [duplicate]
Note that this is the original version which has not been formatted to comply to PEP-8 and contains an error in the code. Please visit the updated version instead to post answers, comments and/or cast ...
7
votes
3
answers
807
views
Optimizing real-time ASCII playback in Python when each frame is fetched as a PNG via GET
Why I made it
I wrote this script for one simple purpose: to Rickroll my friends.
How it works
This is the workflow:
It fetches a .png frame from a PHP endpoint on a website I own. The frame number ...
4
votes
2
answers
681
views
Unicode-based platformer game in Python (Updated)
I already asked this question, but the script I provided was not compliant to PEP-8, so I rewrote the script for better readability.
I'm making a platformer game called Uni where this small character ...
6
votes
3
answers
1k
views
Unicode-based platformer game in Python
I'm making a platformer game called Uni where this small character has to go as high as possible, in which the player constantly has to choose between jumping (W) going left or right (A-D) climbing ...
3
votes
5
answers
636
views
List folders with size
This code below aim to listing all folders in one directory and get size of each in byte. It uses only pathlib module for that.
...
0
votes
0
answers
61
views
Сreating a digital twin of the enterprise
I am creating a program to create digital twins of enterprises. I am using the Simpy framework for this purpose.
I'm creating a universal system that can model almost any enterprise, but I have a ...
2
votes
3
answers
1k
views
LeetCode 3542: Minimum Operations to Convert All Elements to Zero
I am working on this LeetCode problem where I have to count the minimum number of operations to make all elements in an array equal to zero 3542. Minimum Operations to Convert All Elements to Zero
...
7
votes
3
answers
788
views
Custom Error Exception Class in Python
I've written a class to handle my custom errors in Python. The idea is to simplify raising exception with custom messages, all you should do is raise the class and pass it a message.
Everything in the ...