Skip to content

Instantly share code, notes, and snippets.

View si3mshady's full-sized avatar
🐍

Elliott Arnold si3mshady

🐍
View GitHub Profile
@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:
@si3mshady
si3mshady / windows_vm_deployment.tf
Created December 10, 2024 13:59
This Terraform script, windows_vm_deployment.tf, is designed to deploy a Windows 11 virtual machine in Azure. It provisions a resource group, a virtual network, a subnet, a public IP address, and a network interface to support the VM. The VM is configured with: 8GB RAM and 250GB storage The Windows 11 operating system A pre-defined admin usernam…
provider "azurerm" {
features {}
subscription_id = var.subscription_id
client_id = var.client_id
client_secret = var.client_secret
tenant_id = var.tenant_id
}
resource "azurerm_resource_group" "rg" {
@si3mshady
si3mshady / outlook_email_organizer.py
Created November 4, 2024 19:08
This Python script automates email organization in Outlook by scanning the inbox every 30 minutes and moving emails with specific patterns (like "INC" followed by numbers) to a designated folder. Using regex for subject matching, the script provides more powerful filtering than Outlook’s default rule creator, allowing flexible pattern recognitio…
import time
import win32com.client
import re
def run_outlook_script():
# Your Outlook automation code here
outlook = win32com.client.Dispatch("Outlook.Application")
namespace = outlook.GetNamespace("MAPI")
inbox = namespace.GetDefaultFolder(6) # Inbox folder
target_folder_name = "ServiceNow Incidents"
@si3mshady
si3mshady / Readme.md
Created October 9, 2024 13:07
This script extracts audio from a video file, transcribes and translates the audio using OpenAI's Whisper API, generates timed subtitles, and creates a Text-to-Speech (TTS) audio track, finally combining the translated audio and subtitles back into the video.

Sure! Here's the README for you to copy and paste:

# Video Transcription and Translation

This Python script processes a video file by extracting its audio, transcribing and translating it, generating subtitles, and producing a Text-to-Speech (TTS) audio track. The final output is a new video that includes the translated audio and subtitles.

## Requirements

- Python 3.x