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
https://www.amazon.com/dp/B07L92S9MT/ref=twister_B07P935WRY?_encoding=UTF8&th=1
Links to camera:
IR sensitive with M12 mount:
https://www.amazon.com/Arducam-Camera-Raspberry-Interchangeable-LS-2717CS/dp/B013JV4Z7K?ref_=fsclp_pl_dp_1&th=1
View gist:fa12dc38fbf70dcdebd102ecbebd0872
from picamera import PiCamera
from time import sleep
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.IN)
camera = PiCamera()
inPreview=0
@cdeister
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
figure(309)
subplot(2,1,1)
plot(aa.psDatatm,aa.psDatav1,'k-','linewidth',1)
% and derivative
hold on
plot(aa.psDatatm(2:end),diff(aa.psDatav1),'r-','linewidth',1)
View gist:975e679b199d91284ccf727cb7eb144b
% subplot
figure(100)
h3=subplot(1,6,1:4);
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: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar
-- 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)
else
return ""