Skip to content

Instantly share code, notes, and snippets.

View RicherMans's full-sized avatar

Heinrich Dinkel RicherMans

View GitHub Profile
@RicherMans
RicherMans / bashargs.sublime-snippet
Created May 23, 2017 08:07
bashargs.sublime-snippet
<snippet>
<content><![CDATA[
# Arguments: ${1:arg}
function usage {
echo "Error, please use the following parameters:" # unknown option
echo "./$TM_FILENAME ${1/(\A\s*,\s*\Z)|,?\s*([A-Za-z_][a-zA-Z0-9_]*)\s*(=[^,]*)?(,\s*|$)/(?2:-$2 /g} ..."
exit
}
[[ \$# -lt $2 ]] && usage
@RicherMans
RicherMans / config
Last active October 20, 2017 02:07
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@RicherMans
RicherMans / train.py
Last active October 17, 2017 13:12
DNN implementation for Homework Classification
# -*- coding: utf-8 -*-
# @Author: richman
# @Date: 2017-10-17 19:04:18
# @Last Modified by: richman
# @Last Modified time: 2017-10-17 21:12:09
import torch
from torchnet.engine import Engine
import torchnet as tnt
import numpy as np
@RicherMans
RicherMans / assignment2.py
Created December 28, 2017 07:15
Assignment2 DSP
from scipy import signal
import numpy as np
def pitohz(x):
return x/(np.pi*2)
def prototype_filter():
""" ASSIGNMENT 2
[ 16229.573] (--) Log file renamed from "/home/richman/.local/share/xorg/Xorg.pid-17257.log" to "/home/richman/.local/share/xorg/Xorg.0.log"
[ 16229.574]
X.Org X Server 1.19.6
Release Date: 2017-12-20
[ 16229.574] X Protocol Version 11, Revision 0
[ 16229.574] Build Operating System: Linux 4.9.71-1-lts x86_64
[ 16229.574] Current Operating System: Linux lazor 4.15.0-1-MANJARO #1 SMP PREEMPT Sun Dec 24 07:39:02 UTC 2017 x86_64
[ 16229.574] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15-x86_64 root=UUID=73baad87-869c-45f3-8696-ce5c40ae70e6 rw resume=UUID=6a184fd2-3308-4130-b65c-72b4e3272f8a
[ 16229.574] Build Date: 25 December 2017 02:02:38PM
[ 16229.574]
@RicherMans
RicherMans / assignment3.py
Created January 8, 2018 12:18
Assignment3 in dsp coursera course. Efficient matrix implementation
import numpy as np
def subband_filtering(x, h):
""" ASSIGNMENT 3
Write a routine to implement the efficient version of the subband filter
as specified by the MP3 standard
Arguments:
x: a new 512-point data buffer, in time-reversed order [x[n],x[n-1],...,x[n-511]].
import numpy as np
import pandas as pd
import torch.nn.functional as F
import torch
import torch.nn as nn
import torchnet as tnt
import librosa
from tqdm import tqdm
import os
import argparse
import pandas as pd
import os
from plotnine import *
import numpy as np
from fire import Fire
from mistletoe import Document, HTMLRenderer
def plot(report_md: str = 'report.md'):
"""Plots the report ( all markdown tables )
@RicherMans
RicherMans / audio_video.py
Last active April 11, 2019 05:56
Audio_video extract
import numpy as np
import pandas as pd
import os
import argparse
from mimetypes import MimeTypes
import librosa
import deepdish as dd
from tqdm import tqdm
parser = argparse.ArgumentParser()
@RicherMans
RicherMans / extract_audio_video.sh
Last active April 17, 2019 06:24
Split video file into audio / video indep. components
#!/usr/bin/env bash
if [[ $# -lt 2 ]]; then
echo "Input Flist and Output dir"
exit
fi
module load parallel
module load ffmpeg