Skip to main content

Posts

libmceliece: Full Installation Guide

libmceliece: Full Installation Guide for Global Users (System-Wide) This guide walks you through installing libmceliece — a high-performance C implementation of the McEliece post-quantum cryptosystem — from source globally on a Linux system. Note: If you see warnings like this script does not know how to check instruction-set extensions without python3-capstone , it's recommended to install python3-capstone for accurate CPU detection. 🧰 1. Prerequisites Install all necessary and recommended dependencies: sudo apt update && sudo apt install -y \ autoconf \ build-essential \ clang \ python3 \ python3-pip \ gcc \ clang \ valgrind \ libcpucycles-dev \ librandombytes-dev \ python3-capstone \ wget \ curl \ make \ man-db 📋 Breakdown by Category Category Packages Build tools gcc , clang , build-essential , make Test...

AssertionError: SessionMiddleware Must Be Installed

  Fixing the "AssertionError: SessionMiddleware Must Be Installed" in FastAPI This error typically occurs when you try to access  request.session  in custom middleware before the  SessionMiddleware  has been properly applied. Here's how you can resolve this issue and ensure smooth session handling in your FastAPI application. Understanding the Issue The error indicates that the  SessionMiddleware  is either not installed correctly or is being accessed too late in the middleware stack. To resolve this, you need to make sure that  SessionMiddleware  is added to the FastAPI application before any custom middleware that relies on session data. Error Example Code: Here's a simple FastAPI application that demonstrates the error setup for session middleware: from fastapi import FastAPI, Request from starlette.middleware.sessions import SessionMiddleware app = FastAPI() # Add SessionMiddleware first app.add_middleware(SessionMiddleware, secret_key = ...

apt-get vs apt vs yum | Debian-Based vs Red Hat-Based Linux Systems | Comparison and Differences

# Debian-Based Systems vs Red Hat-Based Systems The choice between apt-get and yum (or its modern replacement dnf) depends on the Linux distribution you are using. Each package manager is designed for specific Linux ecosystems, so there's no single "best" package manager that applies universally. Here are some considerations. # Debian-Based Systems: # Introduction Debian-Based Systems refer to Linux distributions that are built upon the Debian operating system as their foundational framework. These systems inherit the core characteristics, package management tools, and philosophies of Debian, which is known for its emphasis on free and open-source software, stability, and adherence to strict licensing standards. Popular Debian-based distributions include Ubuntu, Linux Mint, and Debian itself. # apt-get: On Debian-based systems, such as Ubuntu, `apt-get` is commonly used. However, i...

Debian-Based vs Red Hat-Based Systems: A Comprehensive Comparison

# Debian-Based Systems vs Red Hat-Based Systems Debian-Based Systems and Red Hat-Based Systems are two major categories of Linux distributions, each with its own characteristics, package management systems, and philosophies. Here's a comparison between the two: # Debian-Based Systems: # Introduction Debian-Based Systems refer to Linux distributions that are built upon the Debian operating system as their foundational framework. These systems inherit the core characteristics, package management tools, and philosophies of Debian, which is known for its emphasis on free and open-source software, stability, and adherence to strict licensing standards. Popular Debian-based distributions include Ubuntu, Linux Mint, and Debian itself. 1.) Package Management: APT (Advanced Package Tool) : Debian-based systems primarily use APT for package management. Commands like apt-get (or apt ) are used ...

Understanding the Differences Between Column(TIMESTAMP(timezone=True)) and Column(DateTime) in SQLAlchemy

# Column(DateTime) vs Column(TIMESTAMP(timezone=True)) This article explains the differences between Column(TIMESTAMP(timezone=True)) and Column(DateTime) in SQLAlchemy. Both data types are used to store date and time values, but they differ in whether they include timezone information. The article provides guidance on when to use each data type, based on the timezone requirements of your application. Additionally, the article notes that the behavior of these data types may depend on the specific database backend being used. # Introduction Both `Column(TIMESTAMP(timezone=True))` and `Column(DateTime)` can be used to define a column in SQLAlchemy to store a date and time value. However, there are some differences between the two types of columns: # "Column(DateTime)" `Column(DateTime)` stores a date and time value without a timezone. This means that the value will be stored in the database exactly as it is provided, without any adjustmen...