10 Python Scripts to Automate Your Daily Tasks

A must-have collection for everyone

Abdur Rahman
Stackademic

Image generated using Ideogram 2.0

One of the superpowers of Python is automation-so why not use this superpower for your daily tasks?

The following 10 Python scripts will help any newcomer or experienced developer automate repetitive processes, save time, and effort.

And no, you don’t have to be expert enough to get started.

1) Image Optimizer: Because Who Has Time for Photoshop?

Ever had to optimize images for a website or social media and just didn’t want to open up Photoshop? Well, you don’t have to anymore. With just a simple Python script, with the help of the powerful Pillow module-yes, it is indeed named after a library, not a blanket-you can resize, crop, sharpen, and many other things. The following script performs cropping, resizing, flipping, rotating, adjusting contrast, blurring, sharpening, and even filtering of an image.

# Image Optimizing
from PIL import Image, ImageFilter, ImageOps, ImageEnhance

# Load the image
im = Image.open("Image1.jpg")

# Crop the image
im = im.crop((34, 23, 100, 100))

# Resize the image
im = im.resize((50, 50))

# Flip the image horizontally
im = im.transpose(Image.FLIP_LEFT_RIGHT)

# Rotate the image 360 degrees
im = im.rotate(360)

#…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (16)

What are your thoughts?

Automation is suchhh a game-changer!

53

Automation is lit. Can we combine the all the tools install one container, share it to our community?

34

Nice, auto posting things like medium posts. This will be a fun project

25