Skip to content

Instantly share code, notes, and snippets.

View kastnerkyle's full-sized avatar

Kyle Kastner kastnerkyle

View GitHub Profile
@kastnerkyle
kastnerkyle / Instantaneous Frequency and Phase Derivatives.ipynb
Created March 20, 2019 16:13
Instantaneous frequency and rainbowgrams with librosa.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Uncompressed version of
// https://gist.github.com/munificent/b1bcd969063da3e6c298be070a22b604
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#include <stdbool.h> // 2008-2019
const int HEIGHT = 40;
const int WIDTH = 80;
@kastnerkyle
kastnerkyle / .gitignore
Created March 11, 2019 20:31 — forked from ctsrc/.gitignore
Random dungeon generator from https://news.ycombinator.com/item?id=19309378, deobfuscated, refactored and commented
/.idea/
/cmake-build-debug/
/dungeon
sudo add-apt-repository ppa:graphics-drivers -y
sudo apt-get update
sudo apt-get install nvidia-driver-418 nvidia-utils-418 nvidia-settings -y
wget -N https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run
wget -N http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libcudnn7_7.5.0.56-1+cuda10.1_amd64.deb
sudo ./cuda_10.1.105_418.39_linux.run --override --silent --toolkit --no-opengl-libs
sudo dpkg -i libcudnn7_7.5.0.56-1+cuda10.1_amd64.deb
sudo apt-get install libcupti-dev -y
{
"transcript": "the Roman letter was used side by side with the Gothic.",
"words": [
{
"case": "success",
"end": 0.11,
"endOffset": 3,
"phones": [
{
"duration": 0.05,
# Author: Kyle Kastner
# License: BSD 3-Clause
import os
import copy
import numpy as np
import matplotlib
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
from scipy.io import wavfile
import scipy.signal as sg
# Author: Kyle Kastner
# License: BSD 3-Clause
# A port of the code from
# "Griffin-Lim Like Phase Recovery via Alternating Direction Method of Multipliers", Yoshiki Masuyama, Kohei Yatabe, Yasuhiro Oikawa
# https://ieeexplore.ieee.org/document/8552369
# https://codeocean.com/capsule/1284665/tree/v1
# into numpy
import numpy as np
import scipy.signal as sg
import scipy
@kastnerkyle
kastnerkyle / install_voices.sh
Created February 23, 2019 03:28
Install festival and festival voices in Ubuntu
# https://ubuntuforums.org/archive/index.php/t-751169.html
sudo apt-get install -y festival festlex-cmu festlex-poslex festlex-oald libestools1.2 unzip
sudo apt-get install -y festvox-don festvox-rablpc16k festvox-kallpc16k festvox-kdlpc16k
mkdir cmu_tmp
pushd .
cd cmu_tmp/
wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_awb_arctic-0.90-release.tar.bz2
wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_bdl_arctic-0.95-release.tar.bz2
@kastnerkyle
kastnerkyle / vector_kuhn.py
Last active November 11, 2024 11:05
Vectorized, alternating update versions of various algorithms for Kuhn poker
# Author: Kyle Kastner
# License: BSD 3-Clause
# Vectorized, alternating update CFR+ for Kuhn poker
# For specific algorithmic details see
# http://jeskola.net/cfrp_mt.pdf
# https://pdfs.semanticscholar.org/ed52/8594465e96f51fd9a3cf00401bfba20597fa.pdf
# An alternate overview using scalar, simultaneous updates
# https://justinsermeno.com/posts/cfr/
# Author: Kyle Kastner
# License: BSD 3-Clause
# Inspired from blogpost by Justin Sermeno https://justinsermeno.com/posts/cfr/
# Extended with algorithms described by Oskari Tammelin http://jeskola.net/cfr/demo/ by
# Particularly, solve has core game logic
# http://jeskola.net/cfr/demo/solve.js
# basecfr: http://poker.cs.ualberta.ca/publications/NIPS07-cfr.pdf
# cfrplus: https://arxiv.org/abs/1407.5042