Skip to content

Instantly share code, notes, and snippets.

View venthur's full-sized avatar

Bastian Venthur venthur

View GitHub Profile
@venthur
venthur / true_labels.txt
Created January 21, 2015 12:00
True Labels for BCI Competition III - Tübingen Dataset
1.0000000e+00
1.0000000e+00
-1.0000000e+00
-1.0000000e+00
-1.0000000e+00
-1.0000000e+00
-1.0000000e+00
-1.0000000e+00
1.0000000e+00
-1.0000000e+00
@venthur
venthur / serialtrigger.py
Created June 27, 2014 07:34
using the serial port to send marker
import serial
#
# Initialization
#
serialport = serial.Serial()
serialport.baudrate = 57600
# i assume that translates to COM3 on windows
serialport.port = 3
# open once per feedback session
#!/usr/bin/env python
"""
This script recursively searches the current directory for .vimrc files
and counts the number of times an option has been modified.
It currently only uses lines that start with 'set ', 'setlocal', 'let',
etc. are ignored.
"""
#!/usr/bin/env python
from multiprocessing import Process
import time
timer = time.clock
def proc():
time.sleep(1)
@venthur
venthur / latency.txt
Created December 12, 2012 07:43 — forked from jboner/latency.txt
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
%%\vspace{-15pt} {\small\itshape \addr \hfill \phone; \email}
%\vspace{-15pt} {\small\itshape \addra \hfill E-Mail: \email\\
%\addrb \hfill Web: \web \\
%\addrc \hfill}
%\vspace{8 pt}
@venthur
venthur / latency.txt
Created September 28, 2012 09:03 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms