Skip to content

Instantly share code, notes, and snippets.

View smathot's full-sized avatar

Sebastiaan Mathot smathot

View GitHub Profile
@smathot
smathot / opensesame_script_syntax.txt
Created August 31, 2012 15:48
OpenSesame script syntax
OPENSESAME SCRIPT SYNTAX
========================
1 ABOUT OPENSESAME SCRIPT
=========================
OpenSesame script is a simple definitional language that defines an experiment. It is not a full fledged programming language. The OpenSesame script is interpreted by an OpenSesame runtime environment.
2 GENERAL REMARKS
=================
@smathot
smathot / form_example_1.txt
Created August 31, 2012 13:02
Form example 1
# Margins are defined as "top;right;bottom;left". Each value corresponds to a
# margin in pixels.
set margins "50;100;50;100"
# The spacing is simply a value in pixels.
set spacing "25"
# The sizes of the rows are relative. "1;2;1" means that there are three rows,
# where the middle one is twice as large as the bottom and top ones. So "1;2;1"
@smathot
smathot / tutorial_forum.txt
Created August 28, 2012 21:01
Tutorial forum.cogsci.nl
For security reasons, the script-based embedding does
not work, but you can embed snippets using the
following syntax:
[gist:(your gist id)]
You can find your gist id in the URL of your
gist. If the URL is:
https://gist.github.com/2709074
The following code embeds the paste into your forum
@smathot
smathot / gist:2709074
Created May 16, 2012 09:33
OpenSesame script to draw mouse cursor
from openexp.mouse import mouse
from openexp.canvas import canvas
# Uncomment for 0.25 and earlier
# exp = self.experiment
# The name of the sketchpad item to draw the cursor on
src_sketchpad = 'my_sketchpad'
# The size of the cursor crosshair
@smathot
smathot / bigsmallloop
Created April 16, 2012 08:44
Big and Small Loops
# 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"
@smathot
smathot / clickplot.py
Created March 10, 2012 13:31
Clickable interactive matplotlib figure
#!/usr/bin/env python
#-*- coding:utf-8 -*-
from matplotlib import pyplot
import numpy as np
class ClickPlot:
"""
A clickable matplotlib figure
@smathot
smathot / subplotexample.py
Created March 5, 2012 16:08
Matplotlib subplot example
#!/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)
@smathot
smathot / legacy_timing_check.opensesame
Created February 8, 2012 09:56
Timing check for OpenSesame Legacy Backend
# 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"
@smathot
smathot / psycho_timing_check.opensesame
Created January 25, 2012 10:28
Timing check for OpenSesame Psycho Backend
# 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"
@smathot
smathot / backlight.sh
Created January 1, 2012 15:23
Script to fix backlight issue (dark screen) for HP g62 laptop on Ubuntu 11.10
#!/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: