Skip to content

Creating a timer with tkinter

I am creating a GUI that needs to have timer starting from 0 and counting up every second until it reaches a limit This is the code I have right now Right now this is increasing the score each second but it does not open the GUI until the score reaches the limit. How can I make it so the

Comparing two lists with specific values to read

I have two lists and when I loop through the list and I managed to get the difference, but I need time as well because it is a separate item and ‘uvz’ does not mean to me anything in the list with a few thousand entries. I tried to convert it to the dictionary, but it overwrites with the last

More elegant way to call arbitrary Python functions from Flask

Setting up a Flask REST API is easy. I use the following approach: In this example I import functions sitting inside utility.py: This allows me to pass any function name as an argument and get the result back. So if I ran the following in my browser: I would see: The way I process the request is quite bloated…

Reading file and counting repeated elements automation

I need help to solve a problem quickly. At work I have a file that has 18 characters per line (there are more than 600 lines). I need to read each line and on each line read 6 characters at a time. And in these 6 characters I want to count how many times it is repeated in this file.

Are certain words forbidden as keys in a dict() statement?

So I was getting carried away after finishing my function to convert user time strings to seconds when I decided to extend my conversion dictionary with the statement: This fails. I can assign bs=1e-18, but if I assign as=1e-18 it says SyntaxError: invalid syntax, so I tried escaping the a but no luck. Are th…