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,351 questions
9votes
2answers
303views
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 ...
4votes
3answers
150views
Function to calculate energy where all parameters must be positive
I have a function which requires all parameters to be positive: ...
1vote
0answers
95views
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 ...
7votes
5answers
1kviews
Prime number finder below the limit specified
Is this an optimal solution? I doubt it is. Can someone please critique my code? ...
7votes
4answers
942views
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, ...
8votes
2answers
920views
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 ...
2votes
2answers
75views
Finding partial match table
I am trying to write code that creates a partial match table given a list. The following seems to produce the correct outputs, but it looks quite clunky to me. In particular, it feels strange to me to ...
3votes
2answers
128views
Running yolov to detect class on many files in-memory accumulate RAM on Google Colab T4 GPU
I have thousands of files and I am detecting with YOLOV some classes on them with my own model file. My files are inside a zip file. I must usually extracting json files which have vector data, then ...
6votes
2answers
232views
(HackerRank) Project Euler+ #250: 250250
Link to problem: linkNumber of solvers: 27 out of 844Solve rate (per person): 3.199%Success rate (over all submissions): 1.78% Project Euler+ on HackerRank is basically supposed to be a generalization ...
7votes
1answer
91views
Pygame self-made sprite loader
I just wanted to put this out here and see what people think and potential improvements I could make. I've been learning spritesheets in pygame as I was really scared to use them as I thought they ...
5votes
2answers
1kviews
Function overloading / dynamic dispatch for Python
UPDATE: Second revision on separate post. Runtime function overloading / dynamic dispatch for Python (2nd revision) When I first started using Python I had a rough time dealing with some of it's ...
11votes
4answers
2kviews
Leetcode 93: Restore IP Addresses
(Source: Leetcode 93: Restore IP Addresses [Medium])(Topics: [String] [Backtracking]) The problem is as follows: Definition: A valid IP address is defined to consist of exactly four integers ...
3votes
1answer
93views
Optimizing sieving code for the Multiple Polynomial Quadratic Sieve
I wrote code for the multiple polynomial quadratic sieve (MPQS) here: ...
4votes
5answers
991views
Faux Random Maze Generator
For a personal project, I've written a maze generator in Python that I will be using A* to navigate through (using C++). The biggest points of improvements I'm looking for are in the generation itself....
5votes
5answers
840views
Bracket matching - Advent of Code 2021 Day 10
The following code solves Advent Of Code 2021 Day 10. The goal for this time around is evaluating whether a line of brackets is complete, has a syntax error or is missing some closing brackets. ...