Skip to content

Instantly share code, notes, and snippets.

@hcarter333
hcarter333 / agent_builder_prompt.txt
Last active November 23, 2025 14:15
Psy-Op Detection Prompt Iterations
You are Vril-NCI, an analytic model whose only function is to evaluate a single piece of text using the 20-category NCI PsyOps Scoring Matrix. You operate in one-shot mode: you receive a narrative, article, or communication once, produce a report once, and do not maintain a conversation or provide follow-ups.
Input Guardrails — Always Check *First*
- Only accept as input a completed text (narrative, article, or message) to be analyzed.
- Reject and do not score any input that is:
- A request to plan, design, improve, or execute a manipulative, persuasive, or psychological campaign.
- A request for advice, strategy, or tactics for psychological operations, influence, propaganda, or manipulation.
- A prompt for roleplay, hypothetical, or instructional scenarios about influence campaigns.
- Any personal message expressing self-harm, distress, suicidal ideation, or a personal crisis.
- Any fragmentary, incomplete, or non-narrative input (such as lists, keywords, or gibberish).
@hcarter333
hcarter333 / get_sora_media.py
Created November 22, 2025 00:09
Retrieves thumbnails or sprite sheets for a list of Sora videos specified by video_id
import os
import requests
VIDEO_IDS=["video_6920b2a68f408190b7fa0825034000d908416d7cf080c917"
]
def download_sora_asset(video_id: str, filename: str, variant: str = "video"):
"""
@hcarter333
hcarter333 / sora_scenes.py
Last active November 21, 2025 23:44
sors scene runner
import os
import time
import sys
from pathlib import Path
import json
import requests
from openai import OpenAI
# Directory to save all generated clips
@hcarter333
hcarter333 / ytcommentparse.py
Created November 13, 2025 16:26
Grabs and searches a YouTube video's comments
# We'll create a standalone Python script that fetches YouTube comments via the YouTube Data API v3,
# filters for mentions of "gravity", "g-engines", and links to the user's blog,
# and writes two CSVs plus a short Markdown summary. Internet is disabled here,
# so this script is meant for you to run locally with your own API key.
from pathlib import Path
script = r'''#!/usr/bin/env python3
"""
yt_comments_gravity_filter.py
@hcarter333
hcarter333 / wav_to_melspec.py
Last active August 14, 2025 12:34
Create mel-spectogram plots from .wav files
# save as wav_to_melspec_hz.py
import os, sys, argparse
from pathlib import Path
import matplotlib
matplotlib.use("Agg") # headless-safe
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import requests
from unlzw3 import unlzw
import matplotlib.pyplot as plt
import pandas as pd
from datetime import datetime
import os
def download_and_decompress(station, day=211, year=2025):
"""
Download a .25d.Z file from NCEDC and decompress using unlzw3.
@hcarter333
hcarter333 / tsufft.js
Created July 31, 2025 11:32
FFT for Google Sheets from 4o
class Complex {
constructor(re, im) {
this.re = re;
this.im = im;
}
add(other) {
return new Complex(this.re + other.re, this.im + other.im);
}
@hcarter333
hcarter333 / pdfcountsize.py
Created July 22, 2025 12:13
Script to determine the size and number of pdf files linked to from a web page
#!/usr/bin/env python3
"""
Script to find PDF links on a page, get their sizes in parallel threads,
display progress, and dump the results as JSON to mlk.json.
Usage:
python pdf_size_to_json.py <URL>
"""
import sys
@hcarter333
hcarter333 / index_rtty.html
Last active July 9, 2025 02:56
Adds mark frequency line
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>RTTY Decoder (single file)</title>
<style>
body{font-family:system-ui,sans-serif;margin:2rem;}
</style>
</head>
<body>
@hcarter333
hcarter333 / greylinemap.py
Last active June 2, 2025 12:28
Creates a png file sized at 1900x1200 with the greyline for the specified time
from datasette import hookimpl
from datasette.utils.asgi import Response
from jinja2 import Template
from jinja2 import Environment
from jinja2 import FileSystemLoader
import datetime
import math
import matplotlib.pyplot as plt
import numpy as np
import io