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
#!/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
#!/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
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
#!/usr/bin/env python3 | |
# coding=utf-8 | |
import sys | |
from datamatrix import io, DataMatrix | |
INPUTCSV = sys.argv[-1] | |
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
--- | |
API: 2 | |
OpenSesame: 3.0.6 | |
Platform: posix | |
--- | |
set width 1024 | |
set transparent_variables "no" | |
set title "KidsTest" | |
set synth_backend "legacy" | |
set subject_parity "even" |
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 numpy as np | |
def uvtoxy(u, v, Bu=1.4, A=3., Bv=1.8): | |
u = np.array(u, dtype=float) | |
v = np.array(v, dtype=float) | |
R = A * np.sqrt(np.exp(2*u/ Bu) - (2*np.exp(u/Bu)*np.cos(v/Bv)) + 1) | |
phi = np.arctan2( | |
(np.exp(u/Bu)*np.sin(v/Bv)), | |
((np.exp(u/Bu)*np.cos(v/Bv))-1) |
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 | |
# Usage: | |
# atom-locale [locale] | |
# Example (for French): | |
# atom-locale fr_FR | |
# Important note: | |
# This permanently changes the locale for atom spellchecker. | |
# To reset back to English, start with en_US locale. | |
ATOM_HUNSPELL_FOLDER="/opt/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/vendor/hunspell_dictionaries" | |
HUNSPELL_FOLDER="/usr/share/hunspell" |
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
def __init__(self, log_comment=None): | |
"""Create a stimulus. | |
Keyword arguments: | |
log_comment -- the comment for the event log file (str) (optional) | |
""" | |
self._id = Stimulus._id_counter | |
Stimulus._id_counter += 1 |
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 pyaudio | |
import wave | |
import sys | |
import struct | |
import math | |
TAP_THRESHOLD = 0.050 | |
FORMAT = pyaudio.paInt16 | |
SHORT_NORMALIZE = (1.0/32768.0) | |
CHANNELS = 2 |
NewerOlder