Skip to content

Instantly share code, notes, and snippets.

View gist:a9a8073963ee7c8869aed68aaa2f9420
Raspberry Pi Camera:
The stock camera is nice. But, you can get the same sensor from many 3rd parties that also has an "M12" lens mount. This is like the one we used in lab. You can get a lens set and find the right one for your purposes and FOV:
Link to M12 lens kit
Links to camera:
IR sensitive with M12 mount:
View gist:fa12dc38fbf70dcdebd102ecbebd0872
from picamera import PiCamera
from time import sleep
import RPi.GPIO as GPIO
GPIO.setup(11, GPIO.IN)
camera = PiCamera()
cdeister / cadCSVLook.m
Last active Dec 12, 2017
Matlab script debuging Eric CSV 12/11/2017 Eric needs to sign up for GitHub
View cadCSVLook.m
%% plot the first write
% 1) plot all
% and derivative
hold on
View gist:975e679b199d91284ccf727cb7eb144b
% subplot
hold all
for n=1:numel(session.lick_times)
if numel(session.lick_times{n}>0)
if analyzedBehavior.hitTrials(n)==1
mColor=[0 0 0];
elseif analyzedBehavior.hitTrials(n)==0
mColor=[0 0 1];
View VoxPlayingBTB
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar
-- More info here:
-- modified with VOX's dictionary
if application "VOX" is running then
tell application "VOX"
if player state is 1 then
return (get artist) & " - " & (get track)
return ""