All Questions
Tagged with performance python
2,366 questions
7
votes
3
answers
549
views
Team picker command line application
I've made a program for randomly splitting game participants into different teams. The code works and solves the problem. I'm interested in advice on what you'd do differently or better.
...
3
votes
1
answer
163
views
Synchronize clock tick for timed action
The code shown below goes back to the tutorial How to Use a Timer in Tkinter.
I first simplified the tkinter import by restriction to Python 3.
Then I found a ...
9
votes
3
answers
2k
views
Solver for Wordle puzzle
After a success with the Jumble puzzle solver, I am doing a Wordle puzzle solver. I know many other Wordle solvers have been posted, yet this is my original version, which emphasizes list ...
5
votes
1
answer
121
views
backward induction algorithm computation
Is there a way to significantly speed-up this code?
I'm solving a dynamic programming model using a backward induction algorithm. A crucial step is to calculate the current-period value function (VF), ...
5
votes
2
answers
194
views
LeetCode Number 416: Partition Equal Subset Sum
Problem: MLE
I am confused as to why the LeetCode judge reports Memory Limit Exceeded when my solution looks close to the editorial solution. I not too familiar with ...
2
votes
0
answers
147
views
How to make this arbitrary precision π calculator using Machin-like formula run faster?
Two days ago (or yesterday depending on your timezone) was π-day. So I thought it was a good day to calculate π.
I used Machin-like formula to calculate π, in homage of William Shanks, who calculated ...
-2
votes
1
answer
84
views
Intersect two arrays in python
I have two unidimensional numpy arrays in python, gs and ni. I want to intersect them but preserving the order in gs.
When they have high cardinality this operation becomes so costly. Is there any ...
8
votes
2
answers
956
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 ...
6
votes
3
answers
246
views
GitHub Label Management with GraphQL, Requests, and Loguru
I've developed a Python script that automates the management of GitHub labels. It utilizes both the GitHub GraphQL API (to fetch label data) and the REST API (to update, delete, and merge labels). The ...
5
votes
1
answer
92
views
Find food related words in German: Seeking Feedback on Concurrency and Code Organization
I'm developing a pipeline that processes unknown ingredient data from the OpenFoodFacts API. The goal is to find valid German words that are not yet in their taxonomy.
The tool performs the following ...
6
votes
2
answers
255
views
(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 ...
7
votes
2
answers
249
views
Two-Step Linear Equation Solver with Input Validation and Formatting
This code defines a function to solve two-step linear equations of the form coefficient * variable + constant = solution. It prompts the user for the coefficient, ...
2
votes
2
answers
127
views
split list elements into multiple categories
I have a list of groups, which I would like to categorize based on a few criteria, and the elements can satisfy multiple criteria, and thus end up in multiple groups.
I created this function to split ...
3
votes
1
answer
99
views
Optimizing sieving code for the Multiple Polynomial Quadratic Sieve
I wrote code for the multiple polynomial quadratic sieve (MPQS) here:
...
3
votes
1
answer
89
views
Multi-Page Web Scraping Code Using Selenium with Multithreading
I have written a web scraping script using Selenium to crawl blog content from multiple URLs. The script processes URLs in batches of 1000 and uses multithreading with the ThreadPoolExecutor to ...