Python Code Tutorials

Setting up Python on Mac: Installation Instructions and Running Your First Script

This article guides new MacBook users on setting up Python, checking for existing Python versions, and installing it if necessary. It also provides a step-by-step guide to running your first Python script.

How to Calculate the BLEU Score in Python

Deep-dive into the BLEU Score: A guide to understanding BLEU (Bilingual Evaluation Understudy), a vital metric in NLP. Learn how it evaluates machine-generated sentences against human references in text summarization, translation, and more with NLTK in Python.

Fine-tuning BERT for Semantic Textual Similarity with Transformers in Python

Learn how you can fine-tune BERT or any other transformer model for semantic textual similarity using Huggingface Transformers, PyTorch and sentence-transformers libraries in Python.

How to Make a Snake Game in Python

Learn how to build a classic snake game using Pygame in Python. This detailed step-by-step tutorial explains how to initialize Pygame, generate food for the snake, draw game objects, update the snake's position, handle user input, and manage the game loop. Suitable for beginner to intermediate Python programmers intere

How to Make a Checkers Game with Pygame in Python

Learn how to build a checkers game from scratch with the help of Pygame library in Python.

How to Make an Image Editor in Python

Learn how you can build a simple GUI image editor with Tkinter, pillow, ttkbootstrap libraries in Python

Speech Recognition in Python

Learn how to do Automatic Speech Recognition (ASR) using APIs and/or directly performing Whisper inference on Transformers in Python

How to Build a GUI Language Translator App in Python

Learn how to build a GUI language translator app with tkinter, googletrans, pyttsx3, ttkbootstrap, and pyperclip libraries in Python.

Real-time Object Tracking with OpenCV and YOLOv8 in Python

Learn how to perform real-time object tracking with the DeepSORT algorithm and YOLOv8 using the OpenCV library in Python.

How to Use the Argparse Module in Python

Master the argparse module in Python with this comprehensive tutorial, covering command-line applications, argument parsing, real-world examples, integration with other libraries, and best practices to create user-friendly interfaces and powerful command-line tools.

Image to Image Generation with Stable Diffusion in Python

Learn how you can generate similar images with depth estimation (depth2img) using stable diffusion with huggingface diffusers and transformers libraries in Python.

How to Build a Tic Tac Toe Game in Python

Learn how to build a tic tac toe game using the Pygame library from scratch in Python.

How to Generate Images from Text using Stable Diffusion in Python

Learn how to perform text-to-image using stable diffusion models with the help of huggingface transformers and diffusers libraries in Python.

How to Create a RESTful API with Flask in Python

Learn to build a RESTful API using Flask, Python, and SQLite, covering setup, CRUD operations, database integration, and best practices for code organization.