Skip to content

Instantly share code, notes, and snippets.

View jasonherald's full-sized avatar

Jason Herald jasonherald

  • Jason B Herald
  • Christiansburg, VA
View GitHub Profile
@jasonherald
jasonherald / listen.py
Last active April 5, 2025 15:53
Check a DNS Entry every 30 sec and Pop A Mac notification when it Resolves
"""
Note on Notification Permissions (macOS):
If you run this script for a valid domain and do not see a notification, it likely needs permission to send notifications.
To grant permission:
1. Open Script Editor (Press Command + Space, type “Script Editor”, and open the app).
2. Paste the following into a new script window:
display notification "Test to ensure permissions" with title "Let's Do It"
@jasonherald
jasonherald / music_gen.py
Last active July 11, 2023 19:06
Music generation - PMCG
#install instructions
#install python 3.14 - https://www.python.org/downloads/
#open a powershell or command window
#run the following commands:
#install pytorch - pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
#install dependencies - pip install PySoundFile transformers
#install mgen dependencies - pip install git+https://github.com/facebookresearch/audiocraft.git
import sys, os, os.path
var ptr = 0;
var ins = Array();
var tape = 30000;
var loop = Array();
var ctr = 0;
for (var i = 0; i < tape; i ++) {
ins[i] = 0;