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 / camnet.js
Created July 9, 2019 13:30
WebCam and MobileNet in Tensorflow.js
/**
* Object Recognition from Webcam
*
* by Daniel Kyu Hwa Kohlsdorf
* mailto: dkohlsdorf@gmail.com
*/
'use strict';
@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 / triplet.py
Last active July 1, 2021 22:50
Triplet Loss Experiments For Audio Data with Tensorflow 2.0
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow.keras.layers as layers
import tensorflow.keras.losses as loss
import tensorflow_datasets.public_api as tfds
from sys import argv
from random import Random
from os import walk
@dkohlsdorf
dkohlsdorf / unsupervisedrecursivedolphinparsing.ipynb
Created September 25, 2019 11:50
UnsupervisedRecursiveDolphinParsing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / convnet.ipynb
Created August 26, 2019 14:28
ConvNet.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkohlsdorf
dkohlsdorf / nips.py
Last active October 29, 2020 09:38
Download all nips papers ever
from lxml import html
import requests
import urllib.request
BASE_URL = 'https://papers.nips.cc/'
page = requests.get(BASE_URL)
tree = html.fromstring(page.content)
books = [ href.attrib['href'] for href in tree.xpath('//a') if 'book' in href.attrib['href']]
@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
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.