Questions tagged [python-3.x]
Python 3 is the latest version of the Python programming language and was formally released on December 3rd, 2008. Use this tag along with the main python tag to denote programs that are meant to be run on a Python 3 interpreter only. Do not mix this tag with the python-2.x tag.
 5,347 questions
 
 - Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
 
 2
 
 votes
 
 
 
 3
 
 answers
 
 
 
 1k
 
 views
 
 
 
 
 
 Build datasets larger than GPT-1 & GPT-2 with ~200 lines of Python with textnano
 Lightweight text dataset builder for ML with zero dependencies
Context
I'm returning to Python development after a break and actively learning AI/ML. As part of my learning journey, I'm building a ...
 
 
 
 
 
 5
 
 votes
 
 
 
 3
 
 answers
 
 
 
 891
 
 views
 
 
 
 
 
 Moving ball simulation within a donut
 How do I optimise my code more?
The goal is to have my code work with more than 200 moving balls, but that takes forever right now and doesn't look smooth at all. Furthermore, I can't get the sizing ...
 
 
 
 
 
 2
 
 votes
 
 
 
 2
 
 answers
 
 
 
 106
 
 views
 
 
 
 
 
 Calculation of liquid propellant nozzles
 I'm calculating the injectors, and I've added the complete calculation code and tested it using pytest. Can you suggest a better way to structure the code so that I ...
 
 
 
 
 
 10
 
 votes
 
 
 
 4
 
 answers
 
 
 
 1k
 
 views
 
 
 
 
 Yet Another Python Weather Visualizer using Open-Meteo
 As a personal project to build my portfolio, I've created a simple weather app that displays temperature, precipitation, and wind for any given city. This is my first time building a GUI using ...
 
 
 
 
 
 5
 
 votes
 
 
 
 4
 
 answers
 
 
 
 2k
 
 views
 
 
 
 
 
 A function that opens a CSV file
 I'm working on a project that requires me to open CSV files. It must check that the file is open and then return it to main. I've written a function to do so and would like to know how it looks, if ...
 
 
 
 
 
 5
 
 votes
 
 
 
 2
 
 answers
 
 
 
 469
 
 views
 
 
 
 
 Weakly-Referencing Tree Structure in Python
 For another project of mine, I decided that it would be handy to have a tree structure to dictate hierarchy between pieces of data, but I didn't want to unnecessarily keep that data alive if it would ...
 
 
 
 
 
 4
 
 votes
 
 
 
 2
 
 answers
 
 
 
 291
 
 views
 
 
 
 
 
 Reading a webpage for its list of sites, but getting only the sites I want
 Currently, I have this "leave only the urls that don't have unwanted substrings inside" code. I originally tried to use a comprehension to filter the unwanted urls.
...
 
 
 
 
 
 2
 
 votes
 
 
 
 1
 
 answer
 
 
 
 138
 
 views
 
 
 
 
 
 ABC/XYZ business process analysis
 I have written a code that deals with ABC/XYZ analysis. I want to use it in my application and would like to find out how the code can be improved, its readability and it will be better to implement ...
 
 
 
 
 
 12
 
 votes
 
 
 
 4
 
 answers
 
 
 
 1k
 
 views
 
 
 
 
 
 Simple mutation simulation for use in science class
 I've been giving my grade tens an introduction to computational phylogenomics, based around computing dissimilarity between DNA strands, and a simplified model of mutation. They've been exploring how ...
 
 
 
 
 
 9
 
 votes
 
 
 
 2
 
 answers
 
 
 
 355
 
 views
 
 
 
 
 
 Simple Node.js version manager v2
 As a followup to my previous version, I decided to try make this more cross-platform. I considered several languages: C++ is pretty cross platform, Rust is gaining popularity (and the language used by ...
 
 
 
 
 
 4
 
 votes
 
 
 
 3
 
 answers
 
 
 
 198
 
 views
 
 
 
 
 
 Function to calculate energy where all parameters must be positive
 I have a function which requires all parameters to be positive:
...
 
 
 
 
 
 1
 
 vote
 
 
 
 0
 
 answers
 
 
 
 158
 
 views
 
 
 
 
 Runtime function overloading / dynamic dispatch for Python (2nd revision)
 Second revision of the original post: Function overloading / dynamic dispatch for Python
TL;DR:
Improved version of this library[^1] based on previous reviews and criticism. It provides runtime ...
 
 
 
 
 
 7
 
 votes
 
 
 
 5
 
 answers
 
 
 
 2k
 
 views
 
 
 
 
 
 Prime number finder below the limit specified
 Is this an optimal solution? I doubt it is. Can someone please critique my code?
...
 
 
 
 
 
 7
 
 votes
 
 
 
 4
 
 answers
 
 
 
 988
 
 views
 
 
 
 
 
 Project Euler #54: class for poker hands
 I'm working right now on Project Euler problem 54, and I figured that this was the perfect opportunity to try to work with classes. This is my first time, so I'm sure that there are a lot of style, ...
 
 
 
 
 
 8
 
 votes
 
 
 
 2
 
 answers
 
 
 
 1k
 
 views
 
 
 
 
 
 2D block game like Minecraft
 I have been working on a 2D block game. I like the progress I am making, but I would like to improve the performance and the overall quality of the code. The code and textures are stored in my GitHub ...