Skip to content

Instantly share code, notes, and snippets.

View faroit's full-sized avatar
🚀
Crafting narrow ai

Fabian-Robert Stöter faroit

🚀
Crafting narrow ai
View GitHub Profile
@faroit
faroit / .tmux.conf
Last active March 12, 2020 21:59
tmux conf
# Usage:
# - Prefix is set to Ctrl-a (make sure you remapped Caps Lock to Ctrl)
# - All prefixed with Ctrl-a
# - Last used window: /
# - Last used pane: ;
# - Vertical split: v
# - Horizontal split: s
# - Previous window: [
# - Next window: ]
# - Choose session: Ctrl-s

Keybase proof

I hereby claim:

  • I am faroit on github.
  • I am faroit (https://keybase.io/faroit) on keybase.
  • I have a public key whose fingerprint is 1A86 8B44 A8FF C682 94D9 F729 DB01 E2B2 0DB1 9CC3

To claim this, I am signing this object:

@faroit
faroit / gruln.py
Created July 23, 2016 15:28 — forked from udibr/gruln.py
Keras GRU with Layer Normalization
from keras.layers import GRU, initializations, K
from collections import OrderedDict
class GRULN(GRU):
'''Gated Recurrent Unit with Layer Normalization
Current impelemtation only works with consume_less = 'gpu' which is already
set.
# Arguments
output_dim: dimension of the internal projections and the final output.
USER=your_github_username
# Create a token via commandline
# curl -u "$USER" -d '{"scopes":["repo"],"note":"migrate.sh"}' https://api.github.com/authorizations
TOKEN=yourtoken
REPONAME=${PWD##*/}
# Create repository and return the git url
URL=$( curl -v -XPOST -H "Authorization: token $TOKEN" https://api.github.com/user/repos \

PYTHON

import numpy as np
import timeit

P = np.random.random((20, 15, 100, 30, 2))

A = np.random.random((20, 15, 100, 5))
H = np.random.random((30, 5))
C = np.random.random((2, 5))
@faroit
faroit / setup_sisec.yaml
Created December 5, 2015 14:56
setup file for DSD100
# Define the Input sources for each track
sources:
vocals: vocals.wav
drums: drums.wav
bass: bass.wav
other: other.wav
# Additionally provide the artistic mix
mix:
mixture.wav
@faroit
faroit / pydsd.py
Last active December 5, 2015 15:20
Example code how to use pyDSD
import pydsd
def my_function(dsd_track):
# do your fancy bss algorithm
# use the tracks mixture audio as numpy array
dsd_track.audio
# get the path for external processing
dsd_track.path
# $ brew install https://raw.github.com/gist/1121425/rubberband.rb
require 'formula'
class Rubberband < Formula
homepage ''
url 'http://code.breakfastquay.com/attachments/download/35/rubberband-1.8.1-gpl-executable-osx-universal.tar.bz2'
version '1.8.1'
sha1 'bceba7dba8cdd773a318ca973ed9c5806be03262'
# -*- coding: utf-8 -*-
"""
Bandlimited versions of scipy.signal.waveforms.
Intent is mathematical perfection over performance;
these use additive synthesis, so they are slow, but exact.
Less ideal methods using BLIT:
Sawtooth can be made by integrating BLIT minus a DC value to prevent integrator wandering off
Square can be made by integrating bipolar BLIT
@faroit
faroit / get_commit_sha.py
Created March 19, 2015 23:13
Get current commit sha
from git import Repo # requires gitpython
repo_dir = os.path.abspath(os.path.dirname(__file__))
commit = Repo(repo_dir).head.commit.hexsha[:8]