Skip to content

Instantly share code, notes, and snippets.

rfm@rfmwin MINGW64 /e/roms/No-Intro - Nintendo - Nintendo Entertainment System (2017-06-18)/Castlevania (USA)
$ diff -y --suppress-common-lines Castlevania\ \(USA\)\ \(Rev\ A\)_prg_27C010.bin.xxd Castlevania\ \(USA\)_prg_27C010_dumped.bin.xxd --color=always
00001da3: 10011101 . | 00001da3: 10111101 .
00001db3: 00000001 . | 00001db3: 00100001 !
00002a58: 00000001 . | 00002a58: 00010001 .
00002a68: 11101010 . | 00002a68: 11111010 .
00002a78: 11101010 . | 00002a78: 11111010 .
00004172: 00000000 . | 00004172: 00000110 .
00006904: 10100001 . | 00006904: 11100001 .
00007104: 00000111 . | 00007104: 11000111 .
import sys
from scipy.io import wavfile
import numpy as np
import scipy.fft as fft
import matplotlib.pyplot as plt
import matplotlib.ticker
def plotStepResp(file_path):
'''
<div id='PurpleAirWidget_20911_module_AQI_conversion_C0_average_10_layer_standard'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=F6XNR6RXBTVML7GR&module=AQI&conversion=C0&average=10&layer=standard&container=PurpleAirWidget_20911_module_AQI_conversion_C0_average_10_layer_standard'></script>
#!/usr/bin/env python
import numpy as np
import os
import cv2
kernel = np.ones((6,6), np.float32)/36.0
while True:
#img = noisy(sys.argv[1], seed)
img = np.random.normal(192, 5, (400,400,1))
cv2.imshow("Noise", np.uint8(img))
#!/usr/bin/env python
import numpy as np
import cv2
import sys
import scipy.io.wavfile
import scipy.signal
# Needs to be a regular wav file, not wavex
# Also, assuming PCM, 2 channels, 16-bit
fs, data = scipy.io.wavfile.read(sys.argv[1], 'rb')