This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *** | |
# * Continuously poll the keyboard | |
# *** | |
from openexp.keyboard import keyboard | |
my_keyboard = keyboard(self.experiment, timeout=20) | |
start_time = self.time() | |
while True: | |
# Perform some task here | |
key, end_time = my_keyboard.get_key() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by OpenSesame 0.25 (Dashy Darwin) | |
# Thu Dec 15 11:06:26 2011 (posix) | |
# | |
# Copyright Sebastiaan Mathot (2010-2011) | |
# <http://www.cogsci.nl> | |
# | |
set foreground "white" | |
set subject_parity "even" | |
set description "A template containing a practice and an experimental phase" | |
set title "Repeat trials" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import vlc | |
import pygame | |
def callback(self, player): | |
print 'FPS =', player.get_fps() | |
print 'time =', player.get_time(), '(ms)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openexp.canvas import canvas | |
c1 = canvas(self.experiment) | |
c2 = canvas(self.experiment) | |
c3 = canvas(self.experiment) | |
soa = 0 # The desired SOA. 0 = fastest possible | |
N = 10 # Nr of repetitions | |
w = self.get('width') | |
h = self.get('height') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fix the backlight issue on Ubuntu 11.10 for | |
# a HP G62 laptop. Add this script to the startup | |
# applications. In addition, make sure to make | |
# /sys/class/backlight/intel_backlight | |
# world-writable (chmod 777), for example | |
# in /etc/rc.local | |
# | |
# Examples: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by OpenSesame 0.25 (Dashy Darwin) | |
# Wed Jan 25 11:28:24 2012 (posix) | |
# | |
# Copyright Sebastiaan Mathot (2010-2011) | |
# <http://www.cogsci.nl> | |
# | |
set foreground "white" | |
set subject_parity "even" | |
set description "Default description" | |
set title "New experiment" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by OpenSesame 0.25 (Dashy Darwin) | |
# Wed Feb 8 10:55:36 2012 (posix) | |
# | |
# Copyright Sebastiaan Mathot (2010-2011) | |
# <http://www.cogsci.nl> | |
# | |
set foreground "white" | |
set subject_parity "even" | |
set description "Default description" | |
set title "Legacy timing check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
from matplotlib import pyplot | |
import numpy as np | |
fig = pyplot.figure() | |
xData = np.linspace(0, 4*np.pi) | |
yData = np.sin(xData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
from matplotlib import pyplot | |
import numpy as np | |
class ClickPlot: | |
""" | |
A clickable matplotlib figure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by OpenSesame 0.26 (Earnest Einstein) | |
# Mon Apr 16 10:43:50 2012 (posix) | |
# | |
# Copyright Sebastiaan Mathot (2010-2011) | |
# <http://www.cogsci.nl> | |
# | |
set foreground "white" | |
set subject_parity "even" | |
set description "Default description" | |
set title "New experiment" |
OlderNewer