Skip to content

Instantly share code, notes, and snippets.

View RuolinZheng08's full-sized avatar

Lynn Zheng RuolinZheng08

View GitHub Profile
@RuolinZheng08
RuolinZheng08 / mfcc.py
Last active January 31, 2021 20:47
[Python] Mel-frequency Cepstrum
from IPython.display import Audio
import numpy as np
from numpy.fft import fft, ifft
from scipy.fftpack import dct, idct
from scipy.signal import stft
import soundfile as sf
@RuolinZheng08
RuolinZheng08 / index.html
Last active January 31, 2021 20:47
[Template] Dummy index.html for GitHub repo page
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Just a dummy html to redirect to my subdirectory -->
<meta http-equiv="refresh" content="0; url=[INSERT URL HERE]">
</head>
<body>
</body>
@RuolinZheng08
RuolinZheng08 / permutation_test.ipynb
Created January 31, 2021 20:45
[Python, Statistics] Permutation Test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RuolinZheng08
RuolinZheng08 / scrapwechat.py
Last active September 25, 2018 13:14
[Python] Scrap thumbnails from WeChat Official Account Posts
#!/usr/bin/python3
from urllib.request import urlopen
import ssl
import re, os, sys
# ignore ssl certificate errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
@RuolinZheng08
RuolinZheng08 / pixelcolor.py
Last active September 25, 2018 04:10
[Python] Image processing & filter
#!/usr/bin/python3
from PIL import Image
# Replace pixels of an input color in the image with a new color
fname = input('Enter image name: ')
oldc = input('Enter color (R, G, B) to be replaced: ')
newc = input('Enter color (R, G, B) for replacement: ')
if len(fname) < 1: fname = 'identicon.png'
if len(oldc) < 1: