r/learnpython • • Apr 29 '20

Finally did something I am proud of - Helping others with Python!

I have been dabbling in programming for a few years now, but with a full-time job and other commitments, I never really made the time to create something truly useful.

I went through the web scraping phase, made simple scripts to move files out of my downloads folder and place them into the respective folder based on their extension, and I was quite content with this kind of simple stuff.

But now I finally feel like I made something worth while! While quarantined with the fam, I overheard my mom trying to resize 100s of product images for her e-com site.

Mom is not technologically incapable, she knows how to google "Image Resizer" or something along those lines, but she always does them one-by-one. A huge time sink. I did not know she does this every time she gets new images from her vendors.

Mom: "This is going to take me forever! This vendor never sends me the right image size, every quarter this takes hours, ARGHHH!"

Python Noob: "I think I can get this done in a few minutes for you, mind if I give it a go?"

After some googling I proceeded to use the Pillow module to iterate through all of the images in a folder and plop them into a new folder, nicely resized. This took me like 10 mins to resize all of the images, she was blown away.

I went one step further though because I knew this was a recurring thing for her. I needed to make a proper desktop icon for her to clickity clack and immediately have 100s of images resized anytime. A few youtube videos later, and she was able to double click an icon on her desktop to resize product images anytime without needing the command prompt.

It took just a few minutes to teach her how to put the original images in folder X, double click the image resizing icon, and the new images would be in folder Y shortly thereafter.

Needless to say, she is super happy to be able to resize all of these images in bulk, saving her HOURS of her time. I am on Cloud 9 as well because I feel like I've finally put my programming wherewithal to good use by helping my mom with something so practical.

I'm excited to continue learning new ways to make life easier with the "magic" of python.

TL;DR - Finally did a thing in python and feeling quite good about it!

938 Upvotes

76 comments sorted by

View all comments

8

u/mrrask Apr 29 '20

I've had two scripts that made me happy, myself, but I am yet to do something that matters to others. :D First one might even irritate others, as it was a "Scammer Spammer" to spam fake accounts, fake social security numbers and fake passwords to phishing websites.

But congrats, mate, when you know a thing or two about computers, there are so many ways of improving thing everyone else thinks is inevitable, i guess! Good job!

3

u/LittleEaster Apr 29 '20

Hahah love the scammer spammer idea. And thanks mate, if only I could use my “magic” figure out the dang windows 10 audio drivers for this AMD Ryzen 5 my life would be complete LOL

0

u/[deleted] Apr 29 '20

[deleted]

4

u/mrrask Apr 29 '20

Well no, not at all, but... Like I mentioned it is one of my first scripts (and I'm still just learning! :D ), that wan't just following a tutorial, so I'm pretty sure I messed it up at some point, and I'm not 100 on what is actually working ATM. Feel free to play around and make it your own: https://github.com/mikkelrask/python-scammer-spammer/blob/master/scammer.py

ALSO credit to Engineering Man on youtube for the original idea! In this video he sent fake mails and randomised passwords, but most phishing emails I got myself, was trying to phish my SSN and password for Danish Goverment standardised logins, so I wanted to be able to pick and choose what I wanted to spam.

I also added a whois lookup to do the responsible thing, and get the abuse email from the registrar. :)

1

u/Devils___Advocate__ Apr 30 '20

I'm a python novice, and that engineer man wrote that code so quick. It's pretty awesome.