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,595 questions
-5
votes
0
answers
20
views
unet type Segmentation Model training extremely slow
I am trying to implement unet++ for the next day wildfire dataset, but my training process became extremely slow on colab free gpu. I wonder if there is any bug in my code that I am not aware of. ...
4
votes
4
answers
293
views
Function in Python that Encrypts and Decrypts basically, taking String to List and the other hand
I'm new on Python, so I'm looking at these YouTube videos of Python projects to practice, and I saw this one of a Password Manager with encryption, but the encryption part couldnt use password, ...
5
votes
4
answers
274
views
Absolute-path Python function taking as argument a path relative to the directory of a script (.py) or Jupyter notebook (.ipynb) file
I'm currently still in the early stages of learning Python and Jupyter notebooks, and I wanted to ask if the following code for returning absolute paths relative to the directory of a script (...
4
votes
3
answers
518
views
Ping sweep of IP subnets
I made a ping sweep for the first time, and I want to do better. What do you think that I might be missing?
...
-5
votes
0
answers
36
views
Analyze a directory recursively what file types (file extensions) they contain [closed]
Aim
My aim is to analyze a (big) (sub)directory and just find out what file extensions all files have there (recursively).
Additionally, these conditions apply:
I am on Windows, but I could use WSL ...
8
votes
2
answers
598
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
232
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
597
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
266
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
483
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
650
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
127
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
816
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
687
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 ...