Skip to content

Instantly share code, notes, and snippets.

View mike-lawrence's full-sized avatar

Mike Lawrence mike-lawrence

  • Halifax, Nova Scotia, Canada
View GitHub Profile
@mike-lawrence
mike-lawrence / rstanSegafult.log
Created March 3, 2014 16:02
segfault in rstan
> library(rstan)
Loading required package: Rcpp
Loading required package: inline
Attaching package: ‘inline’
The following object is masked from ‘package:Rcpp’:
registerPlugin
@mike-lawrence
mike-lawrence / install.log
Created March 3, 2014 18:02
R install log for ez and inline, plus inline/Rcpp test
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin10.8.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
Mikes-MacBook-Air:Leszek-pupil-tracker-e3af21d625d5 mike$ mkdir build
Mikes-MacBook-Air:Leszek-pupil-tracker-e3af21d625d5 mike$ cd build
Mikes-MacBook-Air:build mike$ cmake ..
-- The C compiler identification is Clang 5.1.0
-- The CXX compiler identification is Clang 5.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
[ 42%] Building CXX object lib/CMakeFiles/singleeyefitter.dir/SingleEyeFitter.cpp.o
In file included from /Users/mike/Downloads/singleeyefitter-master 3/lib/SingleEyeFitter.cpp:12:
In file included from /Users/mike/Downloads/singleeyefitter-master 3/lib/singleeyefitter/SingleEyeFitter.h:7:
/Users/mike/Downloads/singleeyefitter-master 3/lib/singleeyefitter/Circle.h:117:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
#endif _CIRCLE_H_
^
//
In file included from /Users/mike/Downloads/singleeyefitter-master 3/lib/SingleEyeFitter.cpp:21:
/Users/mike/Downloads/singleeyefitter-master 3/lib/singleeyefitter/solve.h:111:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
#endif _SOLVE_H_
@mike-lawrence
mike-lawrence / llvm32_install_error.txt
Created July 3, 2014 19:19
Error when installing homebrew/versions/llvm32
Last login: Thu Jul 3 14:37:43 on ttys001
t89dc:~ mike$ brew update
Already up-to-date.
t89dc:~ mike$ brew doctor
Your system is ready to brew.
t89dc:~ mike$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 22825d362f07f3ea4338c4309e2b8963dd729976
HOMEBREW_PREFIX: /usr/local
@mike-lawrence
mike-lawrence / Makefile
Created July 4, 2014 17:54
opencv-ndarray-conversion-Makefile
PYTHON_VERSION = 2.7
PYTHON_INCLUDE = /usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/Current/include/python2.7
NUMPY_INC = /usr/local/lib/python2.7/site-packages/numpy/core/include
BOOST_INC = /usr/local/Cellar/boost/1.55.0_2/include
BOOST_LIB = /usr/local/Cellar/boost/1.55.0_2/lib
OPENCV_LIB = /usr/local/Cellar/opencv/2.4.9/lib/
OPENCV_INC = /usr/local/Cellar/opencv/2.4.9/include/
TARGET = matrmul
require 'formula'
class BoostNumpy < Formula
homepage 'https://github.com/ndarray/'
url 'https://github.com/ndarray/Boost.NumPy.git', :using => :git, :branch => 'master'
version "0.0.1"
depends_on 'scons' => :build
depends_on 'boost' => 'with-python'
@mike-lawrence
mike-lawrence / dprime_sim.R
Created July 24, 2014 16:25
d-prime reliability simulation
library(plyr)
library(data.table) #for rbindlist
library(MASS) #for mvrnorm
N = 110
P = .25
K = 440
intercept = -0.7793
effect = 1.0772
intercept_sd = 0.3757
effect_sd = 0.2081
@mike-lawrence
mike-lawrence / runSimLots.sh
Created August 12, 2014 16:23
Simulation of method for increasing precision of time.time() on Windows
for i in `seq 1 100`;
do
python sim.py
done
@mike-lawrence
mike-lawrence / stim.py
Last active August 29, 2015 14:05
labjack timing test
########
# Import libraries
########
import sdl2
import sdl2.ext
import time
import OpenGL.GL
sdl2.SDL_Init(sdl2.SDL_INIT_VIDEO)
stimDisplay = sdl2.ext.Window("test", size=(1920,1080),position=(0,0),flags=sdl2.SDL_WINDOW_OPENGL|sdl2.SDL_WINDOW_SHOWN|sdl2.SDL_WINDOW_FULLSCREEN_DESKTOP|sdl2.SDL_RENDERER_ACCELERATED | sdl2.SDL_RENDERER_PRESENTVSYNC)#sdl2.SDL_WINDOW_BORDERLESS#|sdl2.SDL_RENDERER_ACCELERATED | sdl2.SDL_RENDERER_PRESENTVSYNC)