Skip to content

Instantly share code, notes, and snippets.

View si3mshady's full-sized avatar
🐍

Elliott Arnold si3mshady

🐍
View GitHub Profile
@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
@si3mshady
si3mshady / drone_mission.py
Created December 15, 2024 10:27
Description: This script automates a drone mission by performing the following steps: Connects to the drone using a specified connection string. Clears any existing missions to prevent conflicts. Adds a new mission with specified waypoints. Arms the drone and takes off to a target altitude. Monitors the mission progress through the waypoints. En…
import argparse
import time
from dronekit import connect, VehicleMode, LocationGlobalRelative, Command
from pymavlink import mavutil
def connect_drone(connection_string):
"""
Connects to the drone and waits until the connection is established.
"""
@si3mshady
si3mshady / sitl_drone_waypoint_and_return.py
Created December 14, 2024 00:51
Description: This script connects to a SITL (Software In The Loop) drone simulation, demonstrates takeoff, navigation to a waypoint, and a return-to-home sequence using DroneKit. The drone flies to a predefined waypoint at 32.747405, -97.083837 and returns to its original position. It uses a MAVLink command to trigger landing of the drone at the…
import argparse
from dronekit import connect, VehicleMode, LocationGlobalRelative
import time
from pymavlink import mavutil
def connect_and_print_attributes(connection_string):
print(f"Connecting to drone on {connection_string}...")
# Connect to the vehicle
try: