Skip to content

Instantly share code, notes, and snippets.

@micuat
micuat / git-diary.sh
Last active December 14, 2015 19:29
Shellscript to collect what you committed yesterday
LOGSDATE=$(date -v -1d +%Y-%m-%d) # yesterday
LOGUDATE=$(date +%Y-%m-%d) # today
GITUSER=micuat # git author
GITPREOPTIONS="--no-pager"
GITOPTIONS="--since=$LOGSDATE --until=$LOGUDATE --all --author=$GITUSER --no-merges"
#DIRPATH=/Users/naoto/ # Path to repos
for f in $(cat $HOME/bin/repos) # File includes repo list
from __future__ import print_function
import sys
from liblas import file
# usage
# $ python las2ply > output.ply
# http://stackoverflow.com/questions/5574702/how-to-print-to-stderr-in-python
def eprint(*args, **kwargs):
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
import numpy as np
from pylsl import StreamInfo, StreamOutlet, StreamInlet, resolve_stream
from pythonosc import udp_client
def compute_feature_vector(eegdata, Fs):
# https://github.com/bcimontreal/bci_workshop/blob/master/bci_workshop_tools.py
eegdata = np.array([eegdata]).T
# 1. Compute the PSD
winSampleLength = len(eegdata)
@micuat
micuat / run_video_3d.pde
Last active August 31, 2017 01:12 — forked from fjenett/run_video_3d.pde
Run video and 3D data in parallel
/**
* fjenett - 2015
*/
import org.piecemaker2.api.*;
import org.piecemaker2.models.*;
import java.util.Properties;
import java.util.Date;
import csv
import datetime
import sys
import pandas as pd
filename = sys.argv[1]
joints = {}
with open(filename, newline='') as csvfile:
import re
import csv
import sys
filename = sys.argv[1]
data = []
with open(filename, 'r') as f:
for line in f:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@micuat
micuat / OscBinary.pde
Created December 1, 2017 02:58
Parse OSC Binary
public class OscBinary extends OscMessage {
OscBinary(byte[] bytes) {
super(new OscMessage(""));
parseMessage(bytes);
}
}
@micuat
micuat / orient3d-bno055.c
Last active December 4, 2017 02:43
PiShield - BNO055
#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#define I2C_ADDR 0x28