Skip to content

Instantly share code, notes, and snippets.

View charlesramey's full-sized avatar

Chad Ramey charlesramey

  • GaTech PhD Comuter Science Student
  • Atlanta, Ga
View GitHub Profile
@charlesramey
charlesramey / videovisualization.py
Created July 12, 2025 03:45
creates line plot animated video and then pairs it with spectrogram for the matched wav file
import os
import re
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import matplotlib.dates as mdates
from tqdm.contrib import tqdm as rainbow_tqdm
import subprocess
@charlesramey
charlesramey / create_video_lists.py
Last active November 14, 2023 21:02
create lists of original and trimmed videos
import os
import cv2
import numpy as np
def find_original_video_files(root_dir):
video_files = []
for root, _, files in os.walk(root_dir):
for file in files:
if file.endswith((".mp4")):
@charlesramey
charlesramey / distances.pkl
Created December 1, 2021 17:19
distance matrix
8003 636e 756d 7079 2e63 6f72 652e 6d75
6c74 6961 7272 6179 0a5f 7265 636f 6e73
7472 7563 740a 7100 636e 756d 7079 0a6e
6461 7272 6179 0a71 014b 0085 7102 4301
6271 0387 7104 5271 0528 4b01 4b64 4b64
8671 0663 6e75 6d70 790a 6474 7970 650a
7107 5802 0000 0066 3871 084b 004b 0187
7109 5271 0a28 4b03 5801 0000 003c 710b
4e4e 4e4a ffff ffff 4aff ffff ff4b 0074
710c 6289 4280 3801 0000 0000 0000 0000
@charlesramey
charlesramey / vbm.md
Last active February 6, 2020 20:03
Arbitrary vector by matrix multiplication

Numpy method for C = A * B where A is a (a,) vector, B is a (b,c) matrix, and C is a (a, b, c) tensor

import numpy as np
a = np.array([7,8,9])
b = np.array([[1,2,3],[4,5,6]])
c = a[:,np.newaxis].dot(b.flatten()[np.newaxis, :])
c.reshape(a.shape[0], b.shape[0], b.shape[1])