Skip to content

Instantly share code, notes, and snippets.

View si3mshady's full-sized avatar
🐍

Elliott Arnold si3mshady

🐍
View GitHub Profile
@si3mshady
si3mshady / README.md
Created November 23, 2025 01:52
This script is a complete, standalone practice solution for training a custom Reinforcement Learning (RL) agent called "Thor's Hammer" to perform a difficult interception task. It serves as Day 3 of your RL learning journal.

📝 RL Journal: Day 3 – Stopping My Agent From Getting Lost in Space (Mjollnir Intercept V12)

This Gist contains the latest working script for my personal Reinforcement Learning (RL) project, where I am building an intelligent drone agent, Thor’s Hammer, using the PPO algorithm in a custom Gymnasium environment (MjollnirEnv).

This code represents the V12 iteration of the environment, primarily focused on fixing inefficient training caused by the agent wasting time drifting off-screen.


🎯 V12 Focus: Environment Shaping and Termination Logic

@si3mshady
si3mshady / README.md
Created November 21, 2025 18:47
This file provides a fully commented, self-contained implementation of a simple 2D GridWorld environment, built on the standard Gymnasium API (the successor to OpenAI Gym). This environment is designed to serve as a foundational, educational example for anyone learning how to create custom environments for Reinforcement Learning (RL) agents.

Gymnasium Custom Environment: Annotated GridWorld (gridworld_env.py)

This file provides a fully commented, self-contained implementation of a simple 2D GridWorld environment, built on the standard Gymnasium API (the successor to OpenAI Gym). This environment is designed to serve as a foundational, educational example for anyone learning how to create custom environments for Reinforcement Learning (RL) agents.

Key Features Demonstrated

Environment Initialization (init): Defines the size of the world and sets up rendering.

Observation & Action Spaces: Clearly defines the Dict observation space (agent and target coordinates) and the Discrete(4) action space (Up, Down, Left, Right).

@si3mshady
si3mshady / install_deps.sh
Created September 23, 2025 07:11
Python script that loads the DINOv2-ViT-L backbone, applies dynamic INT8 quantization, runs calibration and inference tests (FP32 vs INT8), reports speed and size improvements, and saves the quantized weights as dinov2_int8_weights.pth.
# Check existing PyTorch
!python -c "import torch, torchvision; print(f'PyTorch: {torch.__version__}, TorchVision: {torchvision.__version__}')"
# System packages
!apt-get update -qq
!apt-get install -y -qq git wget curl build-essential
# Clone MapAnything
!git clone https://github.com/facebookresearch/map-anything.git
%cd map-anything
@si3mshady
si3mshady / README.md
Created September 2, 2025 12:42
IoT water-leak detection pipeline with Terraform — streams audio to Kinesis, runs inference on SageMaker, and delivers leak alerts via SNS/SQS (dev stage with admin access).

IoT Water-Leak Detection (Audio) — AWS (Kinesis → Lambda → SageMaker → SNS/SQS)

This project deploys a lean, secure, and production-minded pipeline for detecting water leaks (e.g., a continuously running toilet) using short audio snippets analyzed by a pre-deployed SageMaker inference endpoint.

How it works

  1. Edge device (Pi/PC/Phone) records a 1–2s audio snippet when a trigger fires (timer, sound level, manual), base64-encodes it, and sends a JSON payload to Kinesis Data Streams.
  2. Lambda consumer reads Kinesis records, calls your SageMaker endpoint with the audio, and parses the model’s response.
  3. If the model predicts your alert label (default: toilet) with confidence ≥ threshold (default: 0.5), Lambda publishes a JSON alert to SNS.
  4. SQS subscribes to the topic so a Streamlit dashboard (or any worker) can read alerts reliably.
@si3mshady
si3mshady / README.md
Last active August 20, 2025 02:58
A colorful CLI tool for preparing audio datasets with TorchAudio. Works on folders of class-labeled WAV files Handles resampling, padding, normalization, and augmentation (AWGN, background mix, time shift, RIR) Exports waveforms, spectrograms, or mel features Includes teaching mode with colored explanations + progress bars Simple install: drop i…

audioprep

audioprep is a simple command-line tool for preparing audio datasets for machine learning. It resamples, pads/trims, normalizes, and augments audio files, then exports WAVs and optional spectrogram / mel features. It also prints step-by-step explanations so you can see what’s happening.


✨ Features

@si3mshady
si3mshady / ubuntu-remote-desktop-drone-dev-setup.sh
Created March 24, 2025 12:38
💻 Installs a full XFCE desktop environment and XRDP server on Ubuntu, enabling remote desktop access to run QGroundControl, DroneKit scripts, Prometheus, Grafana, and LangChain-based AI agents. This script is the foundation for developing, testing, and teaching agentic drone systems in a cloud-hosted environment. Ideal for educators, drone devel…
#!/bin/bash
# === STEP 0: Update System ===
echo "[*] Updating system..."
sudo apt-get update && sudo apt-get upgrade -y
# === STEP 1: Install XFCE Desktop Environment ===
echo "[*] Installing XFCE4 desktop environment..."
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y xfce4 xfce4-session
@si3mshady
si3mshady / gmail_newsletter_dispatcher.py
Created March 17, 2025 11:36
Automated newsletter generation and email dispatch using CrewAI and Gmail API with OAuth 2.0 authentication
import os
import base64
from dotenv import load_dotenv
from crewai import Agent, Task, Crew
from crewai_tools import BaseTool
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from email.mime.text import MIMEText
@si3mshady
si3mshady / openshift-app-deployment.yml
Last active January 13, 2025 04:10
Deploys four Node.js applications (meal-app, drink-app, workout-app, nutrition-app), along with Prometheus and Grafana, on OpenShift. Each app is exposed via internet-accessible routes for monitoring and AI-enhanced functionality.
apiVersion: v1
kind: List
items:
# Deployment for meal-app
- apiVersion: apps/v1
kind: Deployment
metadata:
name: meal-app
spec:
replicas: 1
@si3mshady
si3mshady / setup_dashboard_apps.sh
Last active March 28, 2025 10:16
This script automates the setup and deployment of four AI-powered web applications (meal suggestions, drink recipes, workout plans, and nutrition analysis) along with monitoring tools (Prometheus and Grafana). Each application integrates with the OpenAI API for AI-generated results, and Prometheus collects metrics for observability.
#!/bin/bash
DOCKER_USERNAME="si3mshady"
API_KEY="your_openai_api_key_here" # Replace with your actual OpenAI API key
# Create the project directory structure
mkdir -p prometheus grafana
mkdir -p meal_app/public drink_app/public workout_app/public nutrition_app/public
# Create Prometheus configuration file
@si3mshady
si3mshady / deploy_aro_cluster.sh
Created December 30, 2024 04:17
This Bash script automates the deployment of an Azure Red Hat OpenShift (ARO) cluster in a specified Azure region.
#!/bin/bash
# Variables
LOCATION="centralus" # Azure region
RESOURCEGROUP="aro-rg" # Resource group name
CLUSTER="aro-cluster" # OpenShift cluster name
VNET="aro-vnet" # Virtual network name
MASTER_SUBNET="master-subnet" # Master subnet name
WORKER_SUBNET="worker-subnet" # Worker subnet name
PULL_SECRET_PATH="pull-secret.txt" # Path to your Red Hat pull secret