Skip to content

Instantly share code, notes, and snippets.

View evilying's full-sized avatar
🎯
Focusing

Jack evilying

🎯
Focusing
View GitHub Profile
@ideoforms
ideoforms / sox-cheat-sheet.sh
Last active October 15, 2025 15:05
sox cheat sheet
################################################################################
# sox cheat sheet
################################################################################
# Example commands for the sox command-line audio processing tool,
# for manipulating or batch processing audio files.
################################################################################
# Daniel Jones <[email protected]>
################################################################################
################################################################################
@chao-ji
chao-ji / beamsearch_decoder.py
Last active October 21, 2024 21:44
Easy to understand implementation of beam search algorithm used in decoder of seq2seq models
"""NumPy implementation of Beam Search. Can be used for decoding in Seq2Seq
models or transformer.
See https://chao-ji.github.io/jekyll/update/2019/01/24/Beam_Search.html
for an in-depth disucssion.
"""
import numpy as np
NEG_INF = -1e9
@tdomhan
tdomhan / coef_weight_plot.py
Created September 8, 2013 18:16
plotting the largest weights of a L2 regularized classifier + their names
import matplotlib.pyplot as plt
import numpy as np
figsize(20,8)
#clf is a sklearn classifier e.g. clf = LogisticRegression()
#vecotorizer is a sklearn vectorizer, e.g. vectorizer = TfidfVectorizer()
#let's get the coefficients:
coef = clf.coef_.ravel()
important = np.argsort(np.abs(coef))[-100:]