This file contains hidden or 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
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 | |
================= |
This file contains hidden or 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
# 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" |
This file contains hidden or 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
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 |
This file contains hidden or 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.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 |
This file contains hidden or 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" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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: |