Skip to main content

158 posts tagged with "python"

python tag description

View All Tags

Integrating Python Barcode Scanners with a Database

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Connecting your scanner to a database transforms a simple visual tool into a functional Inventory Management or Attendance System. In this walkthrough, we will use SQLite because it is built into Python, requires no external server setup, and is perfect for edge devices like a Raspberry Pi or a local laptop.

How to Decode Barcodes and Industrial 2D Codes with Python

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Building a code generator is only half the battle. In this walkthrough, we will build a high-performance scanning system capable of identifying and decoding multiple barcodes and 2D codes (QR, Data Matrix, etc.) from both static images and real-time video streams.

Generating Data Matrix and PDF417 in Python

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

While QR codes are great for marketing and consumers, industrial and government applications often require formats that are either more compact or hold significantly more data. This article covers how to generate Data Matrix (popular in healthcare and aerospace) and PDF417 (the standard for ID cards and shipping) using Python.

Generating Barcodes in Python: A Step-by-Step Guide

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Generating barcodes is a surprisingly simple task in Python thanks to a few highly specialized libraries. Whether you're building an inventory system, a ticketing app, or a simple tracking tool, Python can generate industry-standard barcodes in just a few lines of code.

The most popular and robust library for this task is python-barcode.

emoji.demojize() vs. clean-text Performance Comparison

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Performance Showdown: emoji.demojize() vs. clean-text for Emoji Handling

When choosing a library for high-throughput text preprocessing, performance is often as important as accuracy. Both the emoji library's demojize() function and the comprehensive clean-text library can remove or replace emojis, but they serve different purposes, which impacts their speed and efficiency.

Since no direct, widely-published benchmark comparing only these two specific functions exists, this analysis focuses on their architectural differences and their respective performance profiles, based on typical NLP use cases.

Programmatically Detect Emoji in Text with Python

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

🔎 How to Programmatically Detect Emoji in Text with Python

Programmatically detecting and extracting emoji from text is a common task in data science and natural language processing (NLP). Unlike standard ASCII characters, emojis are complex Unicode characters or sequences that can span multiple code points, making simple string checks or basic regular expressions unreliable.

The most robust and recommended approach in Python is to use a specialized third-party library that maintains the latest list of Unicode emoji definitions.

gRPC in Python Example

· 7 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

gRPC in Python: A Practical Example and When to Choose It

gRPC (gRPC Remote Procedure Calls) is a modern, high-performance, open-source framework developed by Google that enables communication between services. It relies on Protocol Buffers (protobuf) for its Interface Definition Language (IDL) and uses HTTP/2 for transport.

It has become the standard choice for communication in microservices and polyglot (multi-language) environments where performance, efficiency, and strong typing are critical.

When to Use Multiple try-except Blocks in Python

· 7 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

🚧 When to Use Multiple try...except Blocks in Python

While it is possible to wrap an entire function in a single try...except block, experienced Python developers know that strategically using multiple, smaller try...except blocks is often superior. This approach enhances clarity, improves error granularity, and aids recovery.

This article details the specific scenarios where breaking down your code into multiple guarded sections is the recommended best practice.

Catching Multiple Exception Types in Python

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

🎣 Catching Multiple Exception Types in Python

In robust Python development, it is often necessary to catch and handle several different types of exceptions that might arise from a single block of code. Python provides flexible and concise syntax to manage multiple exceptions in a single try...except structure.

This article details the three primary methods for catching multiple exceptions, focusing on efficiency and best practice.