Skip to main content
23 votes
Accepted

File Automation Using Python On Linux

Addressing your questions: Readability The docstrings are generally fine. Not too long, not too short. Type hints: Your type hints should not go into the first line of the docstring. That line is ...
Alex Povel's user avatar
  • 1,226
8 votes

File Automation Using Python On Linux

Aside from what others have already said, the main thing that jumps out at me is that you're polling for changes, which is wasteful. On Linux, the proper solution is to use some bindings to the ...
ssokolow's user avatar
  • 181
7 votes

File Automation Using Python On Linux

I agree with all the points mentioned in the answer by @AlexPovel and I am not going to repeat them. One thing that struck me as odd is that you have this class called ...
Graipher's user avatar
  • 41.7k
7 votes

Simple Node.js version manager v2

Documentation It is great that you added a docstring at the top of the code. The PEP 8 style guide also recommends adding docstrings for functions. You could convert this comment: ...
toolic's user avatar
  • 15.7k
6 votes
Accepted

Simple Node.js version manager

It is great that you have already run shellcheck and addressed common issues. The code layout is excellent, with consistent indentation and well-named functions ...
toolic's user avatar
  • 15.7k
5 votes

Digitizing paper label system with Python

Fix your imports of tkinter You are importing tkinter twice, once with a wildcard and once "as tk". You should not be using the global import at all (see PEP9). Stick with a single import: ...
Bryan Oakley's user avatar
  • 2,169
5 votes
Accepted

Fetching data from a REST-API then converting to CSV

Looks pretty good! headings I am sad the first line of output isn't name,height,mass,hair_color,skin_color That would make the resulting .CSV far more valuable to ...
J_H's user avatar
  • 42.1k
5 votes

Simple Node.js version manager v2

First of all... thanks for sharing! This is a great piece of software I'd be glad to take maintenance over from you as a previous dev. Really. I will follow with quite a few notes, but they do not ...
STerliakov's user avatar
  • 2,034
4 votes
Accepted

Python Autoclicker

Your code is fairly simple (which is good) and there isn't much to make it "more efficient" or "faster". There's only a couple of suggestions I have to clean it up and you'll end ...
RGS's user avatar
  • 1,078
4 votes

API Generator for Python

working on my titulation project Mi lengua materna es el ingles, but I'm afraid I don't know what the verb "to titulate" is all about. Nonetheless, I welcome you with open arms to our ...
J_H's user avatar
  • 42.1k
4 votes
Accepted

"Python AutoClicker" Part 2

Your code is generally fine. I suspect you are not doing enough validation (for example, to forbid negative values or multi-character keys). Also, if you want to expand your toolkit, you can think ...
FMc's user avatar
  • 13.1k
4 votes
Accepted

Ruby 'mkdir_reports'-script for creating folder-/file-structure automated

Only a few notes: Creating dir_paths as an empty array, then on the next line immediately appending projects_path to it seems ...
Chris's user avatar
  • 4,339
3 votes
Accepted

Automatically Sending an Email based on a Google Sheet's cell value

Few minor things to improve: you may unpack row in the for row in rows loop; moreover, you can use extended Python-3.x iterable ...
alecxe's user avatar
  • 17.5k
3 votes

Python Autoclicker

Some of this is covered by @RGS; still: Rather than press/release, just call tap Do not ...
Reinderien's user avatar
  • 71.1k
3 votes

Unix batch job execution from BDD automation framework

Is my implementation approch correct? You mean, your implementation of Unixcon.JAVA ? Then if it works as expected it may be correct but I doubt because there are ...
gervais.b's user avatar
  • 2,147
3 votes
Accepted

VSCode-Portable Updater (MSYS2)

It's a pretty nice script, I like it. Special thanks for checking the script with shellcheck! Check for requirements early The program depends on some non-standard tools such as ...
janos's user avatar
  • 113k
3 votes
Accepted

Scrape and parse dictionary website and get meaning of each word in a text file

The most obvious bottleneck in your code is that you are calling the function eng_meaning in a loop, but that function creates a new Selenium instance everytime, ...
Kate's user avatar
  • 8,313
3 votes
Accepted

Discord.py Pokemon Bot performance problems

Almost certainly the largest slow-down is that you are getting each individual value on its own. Instead get all information at once: ...
Graipher's user avatar
  • 41.7k
2 votes

Digitizing paper label system with Python

The label images should be stored as .png files, not .jpeg. Use .png when you have non-photographic graphics, such as line drawings and text. Use .jpeg for photographic images. Taking the snapshot of ...
Kuba hasn't forgotten Monica's user avatar
2 votes

Python script for parsing links

When you navigate away from the page the WebElements get invalidated as DOM changes therefore I would recommend going for List Comprehension and convert the list of WebElements into the list of links ...
Dmitri T's user avatar
  • 121
2 votes
Accepted

Script to automate image searching and clicking on screen

Have you considered to split up your run_complete_flow() function? Personally I would prefer to put it in a class. The first part up to run_game would go into __init__(). Then I would try to split up ...
natter1's user avatar
  • 288
2 votes

Scrape and parse dictionary website and get meaning of each word in a text file

In addition to @Anonymous' answer, her are a few more observations. Selenium - finding elements Getting the translate button based on it being the last button on the page is rather brittle: ...
RootTwo's user avatar
  • 10.7k
2 votes
Accepted

Unefficent data wrangling in R

You can do more conversion as you read the data. The magic is done by the colClasses parameter to read.delim(). That parameter allows you to (1) convert the DateTime whilst reading and (2) drop ...
vk5tu's user avatar
  • 136
2 votes

Simple automation executing platform in Python

@erik-white covered a lot of good ground, but a couple of other things jumped out at me: if <x> is True: should be written as just ...
pjz's user avatar
  • 2,406
2 votes
Accepted

Simple automation executing platform in Python

This is a bit much to go through all at once. It would be better if you could separate out the general concept illustrated by examples as a single review, and then specific implementation of ...
Erik White's user avatar
2 votes
Accepted

Ruby-function for reading, parsing a text-file, removing data-duplicates

This is how I'd do it: ...
Jonathan Duarte's user avatar
2 votes
Accepted

bash script to setup a digitalocean webserver (apache2, nginx, PHP7.4, fastcgi, SSL)

set -e # Terminate if script has error The comment doesn't add value - assume that anybody reading either knows what the flag means or can read the Bash manual. ...
Toby Speight's user avatar
  • 88.3k
2 votes
Accepted

Python API testing

There is indeed a lot of repetition in this code. You have 3 cases: GET, POST, other. So we have: ...
Kate's user avatar
  • 8,313
2 votes

"Python AutoClicker" Part 2

If n_clicks and delay have default values, you can put them directly in the signature of your ...
Omar Aflak's user avatar
2 votes

Simple Node.js version manager

Nice Bash script! More informative error messages In this failure mode the user might not understand what went wrong and how to fix it: ...
janos's user avatar
  • 113k

Only top scored, non community-wiki answers of a minimum length are eligible