Skip to content

Instantly share code, notes, and snippets.

View jerryc05's full-sized avatar
🥇
Experienced bug writer

jerryc05 jerryc05

🥇
Experienced bug writer
  • Georgia Institute of Technology
  • 02:59 (UTC -04:00)
View GitHub Profile
@jerryc05
jerryc05 / ffmpeg.md
Created May 10, 2023 10:30
ffmpeg tldr
ffmpeg -i in.mp4 -ss 00:00 [-to 5:0] -c copy -map 0 out.mp4
ffmpeg -i in.mp4 -ss 00:00 [-t 5:0] -c copy -map 0 out.mp4
#!/usr/bin/env python3
# pip3 install dnspython pythonping
# github.global.ssl.fastly.net
#
# github.com
# gist.github.com
# assets-cdn.github.com
#
@jerryc05
jerryc05 / access_cache.py
Created April 24, 2021 06:09
Timing for accessing cache with TLB
#!usr/bin/env python3
from fractions import Fraction
if __name__ == '__main__':
cols = 60
titles = ('Memory Component', 'Hit Rate (in %)', 'Access Time (cycles)')
mcs = ('TLB', 'Cache', 'Main Mem', 'Disk')
hr_at: 'list[list[Fraction]]' = []
for mc in mcs:
@jerryc05
jerryc05 / 3c_problem.py
Last active January 5, 2022 16:45
3c's Problem
#!usr/bin/env python3
from dataclasses import dataclass
from math import log2, floor
from typing import cast, Set
if __name__ == '__main__':
n_set_, n_blk_, n_sz_, cols = '# of total sets: ', '# of total blocks: ', 'block size in bytes: ', 60
n_set = int(input(n_set_))
n_blk = int(input(n_blk_))
@jerryc05
jerryc05 / rsa.cpp
Last active January 5, 2022 16:45
Stupid EECS 376 RSA Calculator
#include <array>
#include <cassert>
#include <ctgmath>
#include <iostream>
#include <vector>
#define PHI "\u03C6"
#define MUL "\u00D7"
static constexpr