Posts

How Apache Spark Works

Apache Spark is a powerful, distributed computing framework designed for fast data processing and analysis on a large scale. It helps users run complex computations on huge datasets and is faster than other frameworks like Hadoop MapReduce, thanks to its memory-based architecture. Key Concepts of Apache Spark: RDD (Resilient Distributed Dataset): RDD is the core concept of Spark. It's a distributed collection of data that can be processed across multiple machines (or nodes) in parallel. RDDs are immutable (they can't be changed after creation) and are stored in memory by default, which makes processing faster. If needed, Spark can also save RDDs to disk. Parallel and Distributed Processing: Spark can process data in parallel on multiple machines. Each machine (or node) processes part of the data. Spark uses a resource manager like YARN or Mesos to manage the resources and schedule the jobs across the cluster. Lazy Evaluation: ...

A Night Interrupted

In the stillness of a quiet summer night, inside an apartment nestled in one of the calm alleys of the city, the only sound was the rhythmic tapping of keyboard keys. In the dim shadows of the room, I, a programmer lost in a sea of code, was engrossed in an endless world of lines and functions, trying to find and fix a stubborn bug. Time had no meaning for me; I had been staring at the screen for hours, with nothing but the pure flow of code running through my mind. It was as if I had been lost in a virtual world where only my computer and I existed. But this silence, a familiar and comforting silence, was suddenly shattered by the sharp, piercing sound of an ambulance siren. The siren's wail cut through the open window like a sharp knife, echoing through the walls of the apartment. This sound broke the silence and pulled my mind from the infinite world of codes back to the real world. My heart pounded for a moment, and my fingers, w...

Introducing Persian DateTime Converter: Convert Python Dates to Persian Dates

Introducing Persian DateTime Converter: Convert Python Dates to Persian Dates I'm thrilled to announce the release of a new Python package: Persian DateTime Converter ! 🎉 This package allows developers to easily convert Python's Gregorian datetime objects to Persian (Jalali) dates with high accuracy, all without relying on any external libraries. If you're working on a project that needs to support Persian dates, this package is a great addition to your Python toolkit! 🛠️ Why Persian DateTime Converter? The Persian (Jalali) calendar is widely used in Iran and other Persian-speaking countries. However, native support for this calendar in Python is limited. The Persian DateTime Converter package fills this gap by providing a simple, dependency-free solution for converting Gregorian dates to Persian dates. Key Features No Dependencies: A pure Python solution with zero dependencies. Accurate Conversions: Converts Python datetime objects to Persia...

Unveiling One of Iran’s Most Complex Django Projects: A Journey Through Innovation

Unveiling One of Iran’s Most Complex Django Projects: A Journey Through Innovation After years of dedication, innovation, and hard work, I am excited to share one of my most significant projects to date. This endeavor, now publicly available on GitHub , represents a monumental achievement in the world of Django development in Iran. In this blog post, I will take you through the journey of this project, its core features, and the technological innovations that make it stand out. The Journey Embarking on this project was no small feat. It began with a vision to create a comprehensive solution that could address complex business needs and streamline various processes. Over the years, this vision has transformed into one of the most sophisticated Django projects in Iran. The journey involved countless hours of coding, problem-solving, and refining to ensure that the final product was bot...

drf-paseto by me!

Introducing drf-paseto : A Modern Authentication Solution for Django REST Framework I'm excited to announce the release of drf-paseto , a new Python package designed to provide a more secure and robust alternative to JWT (JSON Web Tokens) for Django REST Framework (DRF) applications. If you're a Django developer looking to enhance your API security, drf-paseto might be the right solution for you. What is PASETO? PASETO, or Platform-Agnostic Security Tokens , is a modern and secure standard for token-based authentication. Unlike JWT, PASETO is designed with security in mind from the ground up. It provides the following advantages: Eliminates Common JWT Pitfalls : PASETO prevents common vulnerabilities found in JWT implementations, such as signature confusion attacks. Simple and Secure : PASETO has fewer footguns. Developers can use it securely without needing to understand the nuances of cryptographic settings...

PyTorch: Philosophy and Reasons Behind Its Creation

Image
PyTorch is an open-source machine learning library developed by Facebook's AI Research Lab (FAIR). It has become one of the most popular tools for researchers and developers in deep learning. But why was PyTorch created, and what philosophy guided its development? To answer these questions, we need to explore the challenges in machine learning and the needs of researchers and data scientists that PyTorch sought to address.

استفاده از FFmpeg با Celery: راهنمایی برای پردازش کارآمد ویدئو

استفاده از FFmpeg با Celery: راهنمایی برای پردازش کارآمد ویدئو در دنیای دیجیتال امروزی، محتوای ویدئویی به بخشی جدایی‌ناپذیر از بسیاری از برنامه‌ها تبدیل شده است، از پلتفرم‌های رسانه‌ای گرفته تا ابزارهای آموزشی. پردازش کارآمد ویدئو بسیار حیاتی است و ادغام FFmpeg با Celery می‌تواند راه‌حلی قدرتمند برای خودکارسازی و مدیریت وظایف ویدئویی ارائه دهد. این راهنما نحوه راه‌اندازی FFmpeg با Celery را بررسی می‌کند و بینش‌های کاربردی برای ساده‌سازی جریان‌های کاری پردازش ویدئو ارائه می‌دهد. آشنایی با FFmpeg و Celery FFmpeg یک ابزار منبع باز و قدرتمند برای مدیریت فایل‌های چندرسانه‌ای است. این ابزار از طیف گسترده‌ای از فرمت‌های ویدئویی و صوتی پشتیبانی می‌کند و آن را به یک راه‌حل مناسب برای وظایفی مانند تبدیل، ویرایش و استریم تبدیل کرده است. از طرف دیگر، Celery یک صف وظایف ناهمزمان مبتنی بر پیام‌رسانی توزیع‌شده است که به شما امکان می‌دهد وظایف پس‌زمینه را مدیریت کنید و آن‌ها را به صورت همزمان اجرا کنید، که این امر برای مدیریت فرآیندهای زمان‌بر مانند کدگذاری ویدئو ایده‌آل است. ترکیب FFmpeg با...