- Don't use Zoom
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
import expyriment, os, pygame, time | |
from expyriment import design, control, stimuli, io | |
from expyriment.misc import constants | |
#expyriment.control.defaults.open_gl = 0 | |
control.set_develop_mode(True) | |
exp = expyriment.design.Experiment(background_colour=[150,150,150]) | |
expyriment.control.initialize(exp) |
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
" Title: .vimrc | |
" Author: Florian Krause <[email protected]> | |
" Date: 2021-03-07 | |
" " GLOBAL SETTINGS | |
" | |
if has('win32') || has ('win64') | |
let $VIMHOME = $HOME."/vimfiles" | |
else |
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 collections import OrderedDict | |
import nibabel as nib | |
from brainvoyagertools import voi # Get it from https://github.com/fladd/brainvoyagertools | |
v1 = voi.VOIsDefinition(framing_cube=256, reference_space="MNI") | |
v2 = voi.VOIsDefinition(framing_cube=256, reference_space="MNI") |
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
import time | |
titles = ("Clock", "Implementation", "Monotonic", "Adjustable", "Resolution") | |
print("".join(str(x).ljust(30) for x in titles)) | |
print("".join(("-" * len(x)).ljust(30) for x in titles)) | |
for clock in ("time", | |
"clock", | |
"monotonic", | |
"perf_counter", |
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
def stimulus_size_as_visual_angles(stim_size, screen_size, screen_angles): | |
"""Convert stimulus size (in pixels) to visual viewing angle (in degree). | |
Parameters | |
---------- | |
stim_size : (int, int) | |
the size of the stimulus in pixels (width, height) | |
screen_dims : (int, int) | |
the pixel dimensions of the screen (width, height) | |
screen_angles : (float, float) |
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 | |
"""Summary of module. | |
Description of module. | |
Can contain multiple lines. | |
""" | |
__author__ = 'Name Surname <Email address>' |
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 email import message_from_string | |
from pkg_resources import get_distribution | |
def get_pkg_info(package, extras=False): | |
"""Get information about an installed package. | |
This function will also attempt to get the licence text from a bundled | |
licence file, if available. | |
Parameters |
Script demonstrating differences in GLM modelling approaches between SPM and FSL:
import numpy as np
from nipy.modalities.fmri.glm import GeneralLinearModel
# Simulated data (20 'rest' volumes followed by 20 'task' volumes)
Y = np.hstack((np.random.normal(4200, 50, size=20),
np.random.normal(4300, 50, size=20)))