Python Code Tutorials

How to Build a GraphQL API in Python

Learn how to leverage FastAPI, Strawberry, and PostgreSQL to build a fully functional CRUD GraphQL API server in Python.

How to Make a Maze Game in Python

Learn how to build a maze game with Pygame library in Python.

How to Edit Images using InstructPix2Pix in Python

Learn how you can edit and style images using Instruct-Pix2Pix with the help of Huggingface diffusers and transformers libraries in Python.

How to Control Generated Images by Diffusion Models via ControlNet in Python

Learn how you can control images generated by stable diffusion using ControlNet with the help of Huggingface transformers and diffusers libraries in Python.

How to Add a TLS/SSL Certificate in Python Code

Learn how to secure your Python applications with TLS/SSL certificates. Understand the importance of these cryptographic protocols, and grasp how to integrate SSL certificates into Python code using requests library.

Visual Question Answering with Transformers in Python

Learn the current state-of-the-art models (such as BLIP, GIT, and BLIP2) for visual question answering with huggingface transformers library in Python.

How to Calculate ROUGE Score in Python

Learn what is the ROUGE score and how to calculate it using rouge_score library in Python.

Setting Up Python Environment on a Dedicated Server

A guide on how to set up a Python environment on a dedicated server. It covers essential steps including connecting to the server via SSH, updating the system, installing Python and pip, creating a virtual environment, and running Python scripts.

How to Create a Slide Puzzle Game in Python

Learn how to make a slide puzzle game from scratch step by step with Pygame library in Python.

Word Error Rate in Python

Learn what is Word Error Rate (WER) metric that is widely used in Automatic Speech Recognition (ASR) and how to implement it in Python along with using third-party libraries like jiwer and evaluate.

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