Most active questions
45 questions from the last 30 days
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 ...
5 votes
5 answers
2k views
Chess Clock Code
The code below I've made is supposed to act as a chess clock when uploaded to a compatible Arduino. I've written everything, but I just want another set of eyes to look over the code in case I've ...
5 votes
5 answers
967 views
Function in Python that encrypts and decrypts, taking string to list and the other way around
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 couldn't use password, ...
7 votes
3 answers
861 views
Bash Backup script for password DB
Can you please comment on the script below? It backs up my local password database to a remote repository if a change is detected. It works as intended. I'd like some comments in terms of syntax, ...
5 votes
3 answers
735 views
Bash script for manually cleaning up the Traefik access log file and limiting it to a maximum of 50 MB
I have written a short bash (or POSIX-compliant) script to clean up the Traefik access log file and limit it to a maximum of 50 MB. I would like to know what you think of it. Any suggestions are ...
3 votes
5 answers
653 views
List folders with size
This code below aim to listing all folders in one directory and get size of each in byte. It uses only pathlib module for that. ...
5 votes
4 answers
491 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
657 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 ...
6 votes
3 answers
1k views
Unicode-based platformer game in Python
I'm making a platformer game called Uni where this small character has to go as high as possible, in which the player constantly has to choose between jumping (W) going left or right (A-D) climbing ...
7 votes
3 answers
826 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 ...
7 votes
3 answers
817 views
C++17/20 templated LRU cache : how should get* handle misses? (exception vs std::optional vs pointer)
I’m implementing a templated LRU cache in C++17 and C++20. High-level design: Recency: ...
7 votes
3 answers
464 views
MinMaxStack - tracks minimum and maximum values
I'm implementing a MinMaxStack<T> in C++20 that tracks minimum and maximum values. The class needs T to support ...
9 votes
3 answers
576 views
Maze Solver in Python inspired by Micro-Mouse Competition Logic
Why I made it I watched this video by veritasium about Micro-Mouse maze-solving competitions, and found the logic to get to the center fascinating. Hence, despite not having a maze or a mouse, I spent ...
5 votes
3 answers
600 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 ...
5 votes
3 answers
546 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? ...