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 ...
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 ...
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 ...
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:
...
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 ...
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:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
3
votes
Python Autoclicker
Some of this is covered by @RGS; still:
Rather than press/release, just call tap
Do not ...
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 ...
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 ...
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, ...
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:
...
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 ...
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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
2
votes
Accepted
Ruby-function for reading, parsing a text-file, removing data-duplicates
This is how I'd do it:
...
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.
...
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:
...
2
votes
"Python AutoClicker" Part 2
If n_clicks and delay have default values, you can put them directly in the signature of your ...
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:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
automation × 38python × 20
python-3.x × 9
selenium × 5
bash × 4
performance × 3
beginner × 3
ruby × 3
linux × 3
powershell × 3
rest × 3
html × 2
node.js × 2
api × 2
shell × 2
email × 2
jq × 2
java × 1
javascript × 1
vba × 1
excel × 1
css × 1
console × 1
file × 1
csv × 1