Keep SSH Session Alive

Problem Formulation I just tried to run AutoGPT on an EC2 instance using SSH from my local Windows machine. But here’s the annoying part: the connection always closes and AutoGPT can only work in small ~10 minute increments. When I return to my machine, I need to SSH into my instance and restart the program. … Read more

Yum on EC2 Linux Causes ModuleNotFoundError: No module named ‘dnf’ [Fixed]

I just used Yum to install Git on my Linux AWS EC2 instance using the following commands: πŸ‘Ό Error But when running these commands in my shell, I got the error messages ModuleNotFoundError: No module named ‘dnf’: 😑 [ec2-user@ip-172-31-19-40 ~]$ sudo yum update -y Traceback (most recent call last): File “/usr/bin/yum”, line 61, in <module> … Read more

How to Use Python 3.X (3.9, 3.10, or 3.11) as Default for “python3” in Linux?

Ready to embrace the power of Python 3.11 as your default Python3 version? 🐍 Let’s make it happen! Just follow these simple steps: 1️⃣ First, let’s check your current default Python version. Open your terminal and run the following command: python3 –version In my AWS instance, the command python3 pointed to my installed Python version … Read more

Bitcoin OP_RETURN: Exploring Its Functionality and Use Cases

Bitcoin, a decentralized digital currency, uses a unique scripting system in its transactions to provide greater flexibility and security. One of the important script opcodes in this system is the OP_RETURN, which has provided an avenue for embedding data within the Bitcoin blockchain. πŸ‘‡πŸ’‘ The OP_RETURN is a script opcode that marks a transaction output … Read more

How to Install Pip? 5 Easy Steps

In this article, I’ll quickly guide you through the installation steps for Python’s package installer pip. But first things first: πŸ‘‡ What Is Pip? βœ… pip is the package installer for Python used to install and manage software packages (also known as libraries or modules) written in Python. pip makes it easy to install, upgrade, … Read more

Python Int to String with Leading Zeros

To convert an integer i to a string with leading zeros so that it consists of 5 characters, use the format string f'{i:05d}’. The d flag in this expression defines that the result is a decimal value. The str(i).zfill(5) accomplishes the same string conversion of an integer with leading zeros. Challenge: Given an integer number. … Read more