Skip to content

Instantly share code, notes, and snippets.

View dkohlsdorf's full-sized avatar
🏠
Working from home

Daniel Kohlsdorf dkohlsdorf

🏠
Working from home
View GitHub Profile
@dkohlsdorf
dkohlsdorf / RecursiveNNEager.ipynb
Created March 12, 2020 11:26
Recursive Auto Encoder in Tensorflow 2.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / download_toronto.py
Last active January 19, 2020 03:10
Download Toronto Emotion Speech Set
from lxml import html
import requests
import urllib.request
import re
import time
import os.path
HANDLE = '^/handle/[0-9]+/[0-9]+$'
BASE_URL = 'https://tspace.library.utoronto.ca'
page = requests.get(BASE_URL + '/handle/1807/24487')
@dkohlsdorf
dkohlsdorf / embedding2012.ipynb
Created October 4, 2019 23:24
Embedding2012.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / dtw.pyx
Created October 4, 2019 14:58
Dynamic Time Warping Implementation in Cython
import numpy as np
class DTW:
def __init__(self, n, m):
cdef double[:, :] dp = np.ones((n + 1, m + 1)) * float('inf')
self.dp = dp
self.n = n
self.m = m
@dkohlsdorf
dkohlsdorf / KalmanFilters.ipynb
Created September 7, 2019 13:59
Simple Kalman Filter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / DeleteWhistleFromClick.py
Last active July 15, 2019 21:01
Deleting Whistles From Clicks
import matplotlib.pyplot as plt
import numpy as np
import warnings
import os
from collections import namedtuple
from numpy.fft import fft, ifft
from scipy.io import wavfile
from scipy.ndimage import gaussian_filter
warnings.filterwarnings('ignore')
@dkohlsdorf
dkohlsdorf / AutoDiff.ipynb
Last active April 5, 2019 11:38
Auto Differentiation To Latex
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / alignment_dtw.py
Last active March 19, 2019 19:37
Align A Bunch Of Videos. Second file using merge sort for joining the timestamps.
'''
Align videos using Dynamic Time Warping
Given a set of video files with associated time stamp files,
the program creates a new set of aligned videos.
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@dkohlsdorf
dkohlsdorf / Regexp.java
Last active March 18, 2019 23:17
Parse A Regular Expression
package parser;
public class ExpressionNode {
public static final char or = '|';
public static final char and = '.';
public static final char repeat = '*';
public char symbol;
public ExpressionNode left, right;
@dkohlsdorf
dkohlsdorf / SparseVector
Last active March 18, 2019 23:17
Interview Question Sparse Vector
//Given two sparse vectors. Write a function to find a dot product of these vectors.
// [0,4,0,0,1,0,0,10,0]
// [2,0,0,0,3,0,0,0,0]
// 3
x = (4, 1), (1, 4), (10, 7)
y = (2, 0), (3, 4)