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 / levensthein.c
Created January 29, 2022 23:16
Levenshtein distance in plain C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
typedef struct {
int *data;
@dkohlsdorf
dkohlsdorf / label_files.py
Created August 31, 2020 19:34
Labeling By Mayority
import shutil
import os
import pandas as pd
import numpy as np
def type_label(x):
labels = np.zeros(4)
for i in x:
labels[i] += 1
return np.argmax(labels)
@dkohlsdorf
dkohlsdorf / FixAiff.ipynb
Last active June 23, 2020 09:18
Fixing AIFF File in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / Dendrogram.ipynb
Created March 15, 2020 19:30
traverse agglomerative clustering sklearn
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / RecursiveNNEager.ipynb
Created March 15, 2020 19:28
Recursive Auto Encoder With Nodes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / RecursiveNNEager.ipynb
Created March 12, 2020 11:26
Recursive Auto Encoder in Tensorflow 2.0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / embedding2012.ipynb
Created October 4, 2019 23:24
Embedding2012.ipynb
Loading
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 / unsupervisedrecursivedolphinparsing.ipynb
Created September 25, 2019 11:50
UnsupervisedRecursiveDolphinParsing.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / KalmanFilters.ipynb
Created September 7, 2019 13:59
Simple Kalman Filter
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.