Skip to content

Instantly share code, notes, and snippets.

View Cdaprod's full-sized avatar
🫠
Learn something new everyday!

David Cdaprod

🫠
Learn something new everyday!
View GitHub Profile
@Cdaprod
Cdaprod / Ndi-Moviepy.md
Created June 16, 2025 16:22
NDI+Moviepy Notebook

NDI Stream to MoviePy Professional Video Processing

A comprehensive system for capturing NDI streams, recording them, and processing with MoviePy for professional video production workflows.

📦 Cell 1: Install Dependencies

# Install required packages
!pip install ndi-python opencv-python ipywidgets moviepy numpy pillow
# Note: Ensure NDI SDK/Runtime is installed on your system
@Cdaprod
Cdaprod / run-llama-cuda-server.ps1
Created June 15, 2025 19:38
Running dockerized `ghcr.io/ggml-org/llama.cpp` CUDA Server
docker run --gpus all --restart unless-stopped -d `
-v "B:\Models:/models" `
-p 8000:8000 `
ghcr.io/ggml-org/llama.cpp:server-cuda `
-m /models/llama-2-7b-chat.Q4_K_M.gguf `
--port 8000 --host 0.0.0.0 -n 512 --n-gpu-layers 35

🎬 CDAProd — NodeVideo Expressions Guide

⚙️ Built by David Cannan — DevOps Engineer & AI Solutions Architect
💡 Self-made | #devopsdad | #tripletdad | #hacktheplanet

GitHub - Cdaprod Blog LinkedIn

@Cdaprod
Cdaprod / Cinematic_Text_Expression.md
Last active June 11, 2025 17:36
Mini script - Motion Expression Fx for NodeVideo

Simple Cinematic Example for Text

fadeInDuration = 1.5
delay = (index - 1) * 0.2
t = time - (thisLayer.startTime + delay)

progress = clamp(t / fadeInDuration, 0, 1)
easeT = ease(progress, 0, 1)
@Cdaprod
Cdaprod / my_autometadata.py
Last active June 4, 2025 17:12
Goes with my xqd smb gist and this one is attempting to automate all metadata
import os
import cv2
import xml.etree.ElementTree as ET
def get_video_technical_info(path):
cap = cv2.VideoCapture(path)
fps = cap.get(cv2.CAP_PROP_FPS)
frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
@Cdaprod
Cdaprod / my_xqd_smb_share.md
Last active June 4, 2025 15:15
Automating XQD Via Network Share Using SMB

TL;DR • It’s fine that both XQD cards individually mount as D:. • Differentiate them by VolumeLabel, not by drive letter. • Modify your script so the SMB share name = VolumeLabel (e.g. XQD_Card1, XQD_Card2). • Register your task once via PowerShell—after that, “hot-plug” automatically shares whichever card you inserted under the correct name.

Feel free to reach out if you want help auto-removing the share on eject, adding logging to see exactly when each card fires, or any other fine-tuning!

Explanation of Key Changes

@Cdaprod
Cdaprod / camera_rig_and_ios_polycam.py
Last active May 28, 2025 22:28
Blender BPY — Here’s how to extract a frame and map it onto a traced 3D object:​​​​​​​​​​​​​​​​
"""
Nikon + Polycam iOS - Camera Rig
"""
#!/usr/bin/env python3
"""
Camera Rig + iPhone Polycam Automation System
Monitors for new Polycam scans and camera footage, then processes automatically
"""
import os
@Cdaprod
Cdaprod / bpy_video_and_image_texture_mapping_demonstration.py
Created May 28, 2025 21:26
Blender BPY — Texture Mapping & Raycasting With iPhone Screenshots and Recordings
import bpy
import bmesh
import os
from mathutils import Vector
from bpy_extras.object_utils import world_to_camera_view
# ============ MEDIA LOADING & VALIDATION ============
def validate_media_file(file_path):
"""Validate if file exists and get media type"""
@Cdaprod
Cdaprod / terminal_3d_scene_setup_v1.py
Last active May 28, 2025 21:20
Blender BPY — Terminal 3D Layered Scene Setup
import bpy
import bmesh
from mathutils import Vector
# Clear existing mesh objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
# Scene setup
scene = bpy.context.scene
@Cdaprod
Cdaprod / terminal_dive.py
Created May 28, 2025 01:32
Blender Shellfish iOS Terminal Drive BPY Script
import bpy
import os
# 1. ——— CONFIGURE these paths & data —————————————
FONT_PATH = "/path/to/JetBrainsMono Nerd Font.ttf" # ← point to your local Nerd Font
LINES = [
"cd ~/Projects/Cdaprod",
"git status",
"exa -lh --color=always",
"ssh [email protected]",