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
import logging | |
from colorama import init, Fore, Back | |
init(autoreset=True) | |
class ColorFormatter(logging.Formatter): | |
# Change this dictionary to suit your coloring needs! | |
COLORS = { | |
"WARNING": Fore.RED, |
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
CC=clang | |
CXX=clang++ | |
SOURCES=ringbuffer.c | |
INCLUDES=-I. | |
test:test.cpp $(SOURCES) | |
$(CXX) -std=c++11 -o runtests $(INCLUDES) `pkg-config --cflags --libs gtest` $^ | |
./runtests |
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
CC=clang | |
CCX=clang++ | |
SOURCES=adder.c | |
TESTSOURCES=test_add_two_numbers.cxx run_all_tests.cxx | |
INCLUDES=-I. | |
EXE=adder | |
$(EXE): $(SOURCES) main.c | |
$(CC) $(INCLUDES) $^ -o $@ |
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
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.colorTheme": "One Dark Pro", | |
// "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", | |
"editor.fontFamily": "'Fira Code', Hack", | |
"editor.fontWeight": "100", | |
"editor.fontSize": 13, | |
"editor.fontLigatures": true, | |
"editor.rulers": [ | |
120 |
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
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.colorTheme": "One Dark Pro", | |
// "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", | |
"editor.fontFamily": "'Fira Code', Hack", | |
"editor.fontWeight": "100", | |
"editor.fontSize": 13, | |
"editor.fontLigatures": true, | |
"editor.rulers": [ | |
120 |
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
#include "FLAC/stream_encoder.h" | |
#define CHUNKSIZE 512 | |
FLAC__StreamEncoderWriteStatus callback | |
(const FLAC__StreamEncoder *encoder | |
,const FLAC__byte buffer[] | |
,size_t bytes | |
,unsigned samples | |
,unsigned current_frame |
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
import numpy as np | |
import scipy.io.wavfile as wf | |
import matplotlib.pylab as plt | |
def main(): | |
# use power of 2 for FFT length | |
FFTN = 2**14 | |
try: # try to read from wav file |
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
package main | |
import ( | |
"github.com/hypebeast/go-osc/osc" | |
"github.com/rakyll/portmidi" | |
) | |
const ( | |
NOTEOFF = 0x80 | |
NOTEON = 0x90 |
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
CC=clang | |
LIB= | |
INCLUDES=-Iinclude/ | |
FLAGS=-Wall -Werror -pedantic | |
SOURCES=$(wildcard src/*.c) | |
#OBJECTS=$(SOURCES:.c=.o) # This way works too | |
OBJECTS=$(patsubst %.c, %.o, $(SOURCES)) | |
EXE=executable_name.out | |
all: $(EXE) clean |
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
import numpy as np | |
import scipy.signal as sig | |
from scipy.io.wavfile import write as write | |
from matplotlib import pyplot as plt | |
SR = 48000 | |
SECS = 10.0 | |
NSAMPS = int(SECS * SR) | |
NTAPS = 61 | |
INT_MAX = 2**15-1 |
NewerOlder