Skip to content

Instantly share code, notes, and snippets.

View lindemann09's full-sized avatar
🐧

Oliver Lindemann lindemann09

🐧
View GitHub Profile
@lindemann09
lindemann09 / wait_callback.py
Created January 15, 2015 14:31
wait callback functions in Expyriment (0.7)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Demonstration of wait callback functions in Expyriment
"""
from expyriment import control, design, misc, io, stimuli
control.defaults.quit_key = None # switch off quitting key
@lindemann09
lindemann09 / expyriment_system_info.py
Created May 26, 2015 09:25
Expyriment System Info
import expyriment
for k,v in expyriment.get_system_info().iteritems():
print k + ":\t" + str(v)
@lindemann09
lindemann09 / expyriment_test_suite.py
Created May 26, 2015 09:40
Expyriment Test Suite
import expyriment
expyriment.control.run_test_suite()
@lindemann09
lindemann09 / install_jasp.sh
Last active August 29, 2015 14:22
JASP installation script for Debian & Ubuntu linux
echo "This script is deprecated!"
echo "Please visit http://lindemann09.github.io/jasp-linux-install/"
#This shows how to get the random slopes and CI's for each level in a hierarchical model
#dataset used
head(iris)
#what we want to investigate
#Is there a general relationship? and how it differs by species
plot(iris$Sepal.Width ~ iris$Petal.Width, col = iris$Species, las =1)
#Our model with random slope and intercept
@lindemann09
lindemann09 / install_CmdStan.sh
Last active October 24, 2022 17:55
CmdStan installation script for Debian Linux
#!/bin/bash
#
# Linux installation script for CmdStan (http://mc-stan.org/)
# Downloads and installs CmdStan on DEBIAN/UBUNTU LINUX
# The following shell commands will be created (/usr/bin/...):
# stanc
# stan_make
# stan_print
#
# Please adapt VERSION number!
"""
Formal design of the experiment "sub-symbolic-place-value"
"""
def dec2base_x(n, base):
"""base x array (numpy array) of the decimal n"""
rtn = []
while(n>0):
rtn.append(n%base)
n = n/base
@lindemann09
lindemann09 / spss2csv.R
Created January 7, 2016 14:16
Convert SPSS data (.sav) to comma-separated text (.csv)
#!/usr/bin/Rscript
#
# Converts spss file to csv-file ("output.csv")
#
# usage:
# Rscript spss2csv.R <FILENAME>
library(foreign)
args <- commandArgs(trailingOnly = TRUE)
data = read.spss(args[1], to.data.frame=TRUE)
@lindemann09
lindemann09 / mouse_press_demo.py
Created July 8, 2016 07:50
mouse_press_demo.py
# quit program by pressing <ESC>
from expyriment import io, control
control.set_develop_mode(True)
control.initialize()
mouse = io.Mouse()
control.start(skip_ready_screen=True)