Hello, python!

10/12
Learning python experience from Goran Peremin
As the new year begins, I am embarking on a journey to learn the programming language Python.
 
Starting out, I had very little prior knowledge of programming- I knew HTML, a bit of CSS, and barely any JavaScript. Having little prior programming knowledge, I started out with realypython.com and later moved on to DataCamp. I eventually incorporated Algebra into my studies…
 
Have you ever come to the realization that in order to truly master the art of coding, one must put in the time and practice to hone their skills? Who knew? ;))
 
import random
import time
def print_hello_world():
    for i in range(10):
        print("Hello, world!")
        time.sleep(random.uniform(0, 0.5))
print_hello_world()

All Hail Goran the Mighty Pythonian!

Collect ‘Em All!

Ah, the grand and glorious ‘Introduction to Python’ certification. Four hours of mind-numbing lectures and tedious exercises, all to prove that one can recite the basic syntax of the language. Truly, a feat worthy of the Knights of Ni!

Statement of accomplishment has been awarded to Goran Peremin. Introduction to Python. DataCamp

I have earned a Python skill badge on LinkedIn. It was a task as difficult as trying to swallow a haunch of wild boar whole, but I did it! With the grace of a lumberjack and the skill of a knight who says ‘Ni!’ I am now one step closer to being a programming master, and all shall hail me as a true Pythonian.

Automating Boring Tasks and Learning to Code in the Most Spam-Filled Way Possible

And so, I present to you, my trusty notebook of coding endeavors, where I shall document my journey from novice to master. If I don’t forget to update it, that is.

Throughout my journey, I hope to share my experiences and tips with you.

Practice makes perfect, unless you're a Python, then it just makes you deadly

Unknown

“Practice makes perfect, unless you’re a Python, then it just makes you deadly”

Have you tried converting thousands of images from jpeg or png to the webp format?

Cat converting thousands of images to the webp format

With the power of Python at my disposal, I have crafted a code so cunning, so brilliant, that it shall convert even the most stubborn of image files to the webp format with ease. Behold, for I present to you: The Holy Grail of Image Conversion!

import os
from PIL import Image
folder_path = "D:/Test" #Ovdje se upisuje folder sa slikama
webp_folder = folder_path + "_webp"
os.makedirs(webp_folder, exist_ok=True)
for filename in os.listdir(folder_path):
    if not filename.endswith(".webp"):
        image = Image.open(os.path.join(folder_path, filename))
        webp_path = os.path.join(webp_folder, os.path.splitext(filename)[0] + ".webp")
        image.save(webp_path, "webp")
print("Konvertiranje je završeno i spremljeno u folder: ", webp_folder)

All hail the mighty webp format!

Write Comment...

Name

Email