This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
use std::hash::Hash; | |
use std::ops::Index; | |
/// Collection that counts occurences of items in an iterable container | |
/// | |
/// Inspired by the equivalent in Python's `collections` package | |
/// | |
/// # Example usage | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Small program for convolving a mono .wav file. Purpose is to test equality of | |
the blockwise convolution with direct convolution. | |
""" | |
import argparse | |
import soundfile as sf | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% draws triangle with 90 deg angle | |
% as example for drawing and naming angles in a shape | |
\documentclass[tikz, crop, border=5pt]{standalone} | |
%\usepackage{tikz} | |
\usepackage{tkz-euclide} | |
\usetkzobj{all} | |
\usepackage{amsmath} | |
\usepackage{bm} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[crop, border=5pt, tikz]{standalone} | |
\usetikzlibrary{positioning} | |
\usetikzlibrary{arrows.meta} | |
\begin{document} | |
\begin{tikzpicture}[>=Triangle, line width=1pt, | |
block/.style={draw, rectangle, minimum width=3em, minimum height=3em}, | |
point/.style={coordinate, anchor=center}] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* wav2raw | |
* | |
* Read .wav file and write only the signal values into a .raw file | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import shutil | |
import subprocess | |
import sys | |
COMMAND_TEMPLATE = '{exe} {scenefile} --outfile {outfile} {options}' | |
COMMENT_CHAR = '# ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding:utf8 -*- | |
""" | |
Code snippet for controlling one or multiple instances of vlc player over the | |
network. | |
To make this work, the respective vlc player instances have to be configured | |
to expose their web interfaces as described here: | |
https://wiki.videolan.org/documentation:modules/http_intf | |
""" | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reusable(generator): | |
"""Convert a generator into a ReusableIterator.""" | |
class ReusableIterator: | |
"""Create an wrapper for a generator to allow repeated iteration.""" | |
def __init__(self, *args, **kwargs): | |
"""Store the arguments to pass to the wrapped generator.""" | |
self.args = args | |
self.kwargs = kwargs |