Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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. ...
tomi bell's user avatar
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 ...
Wolf's user avatar
  • 375
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 ...
inyoot's user avatar
  • 347
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), ...
manifold's user avatar
  • 151
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 ...
user430243's user avatar
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 ...
Ξένη Γήινος's user avatar
-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 ...
phyAlph's user avatar
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 ...
coder's user avatar
  • 235
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 ...
kiaora's user avatar
  • 141
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 ...
kiaora's user avatar
  • 141
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 ...
CrSb0001's user avatar
  • 619
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, ...
LMays's user avatar
  • 341
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 ...
Craig Hamilton's user avatar
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: ...
J. Doe's user avatar
  • 186
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 ...
Minnie's user avatar
  • 31

15 30 50 per page
1
2 3 4 5
158