Skip to content

Instantly share code, notes, and snippets.

View lindemann09's full-sized avatar
🐧

Oliver Lindemann lindemann09

🐧
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from expyriment import control, design, misc, io, stimuli
def scale_to_fullscreen(visual_stimulus, exp, keep_aspect_ratio=True):
"""Scale the stimulus to fullscreen.
This is a surface operation. After this, a surface will be present!
Scaling goes along with a quality loss. Thus, scaling an already
@lindemann09
lindemann09 / full_screen_test.py
Created May 6, 2014 07:20
pygame full screen test
import pygame
pygame.display.init()
screen_size = (pygame.display.Info().current_w,
pygame.display.Info().current_h)
pygame.display.set_mode(screen_size,
pygame.DOUBLEBUF | pygame.OPENGL | pygame.FULLSCREEN)
pygame.time.wait(2000)
pygame.quit()
@lindemann09
lindemann09 / SNARC-experiment.py
Last active December 12, 2015 00:28
Expyriment Examples
#!/usr/bin/env python
"""
A parity judgment task to assess the SNARC effect.
See e.g.:
Gevers, W., Reynvoet, B., & Fias, W. (2003). The mental representation of
ordinal sequences is spatially organized. Cognition, 87(3), B87-95.
"""