Skip to content

Instantly share code, notes, and snippets.

View lindemann09's full-sized avatar
🐧

Oliver Lindemann lindemann09

🐧
View GitHub Profile
@lindemann09
lindemann09 / rexam2ans_demo.R
Last active May 27, 2022 10:52
How to export questions from r/exams to ANS?
# Example how to export r/exams questions to ANS
#
# The resulting zip file 'qti4ans.zip' can be imported to ANS via the web interface
#
library(exams)
#' Exporting exams to QTI (QTI 2.1) compatible with ANS
#'
exams2qti4ans <-function(file, name="qti4ans.zip", ...){
@lindemann09
lindemann09 / check_item.R
Last active November 4, 2021 15:53
Sheck Statsshare Item
check_item <- function(...) {
if (!("exams" %in% installed.packages()[ , "Package"])){
install.packages("exams")
}
file = rstudioapi::getSourceEditorContext()$path
exams::exams2html(file)
}
@lindemann09
lindemann09 / remindo_results.py
Last active August 21, 2020 09:46
Parser for Remindo JSON result files
__author__ = "Oliver Lindemann <lindemann@essb.eur.nl>"
"""
Parser for Remindo JSON result files
Example: Convert to csv
```
from remindo_results import RemindoResults
rr = RemindoResults("remindo_result_exam_A.json", 41, ignored_questions=[0])
rr.save_csv_files()

Keybase proof

I hereby claim:

  • I am lindemann09 on github.
  • I am olindemann (https://keybase.io/olindemann) on keybase.
  • I have a public key ASBmpekJTodOaBWMoNk2h07wuXb1z0Orpy5b7pACWmRhPAo

To claim this, I am signing this object:

@lindemann09
lindemann09 / data_description.json
Created October 10, 2019 14:26
Example Levels
{
"@type": "dataset",
"@context": "https://schema.org/",
"schemaVersion": "Psych-DS 0.1.0",
"name": "Dataset Demo",
"description": "",
"keywords": [],
"license": "",
"temporalCoverage": "",
"spatialCoverage": "",
@lindemann09
lindemann09 / testscript.py
Created March 26, 2019 16:38
Testscript Florian
import expyriment as xpy
def shape_test_case(size, line_width):
"""Compare manual rectangle with result from Shape class."""
from expyriment import stimuli
@lindemann09
lindemann09 / make_subject_trialwise.R
Last active October 22, 2018 15:59
minmax_rejection
library("dplyr")
library(matrixStats)
source("two_force_sensor_functions.R")
pre_process_xpd = function(xpd) {
# preprocessing xpd-files:
#
# adding variable
# small
# switch: mini-block switch
@lindemann09
lindemann09 / expyriment_pil_image.py
Last active April 23, 2018 12:04
Use PIL (Pillow) Images in Expyriment (will be soon avaiable via the stash)
from __future__ import absolute_import, print_function, division
from builtins import *
__author__ = 'Oliver Lindemann <oliver.lindemann@cognitive-psychology.eu>'
import pygame
from PIL.Image import isImageType
from expyriment.stimuli import Canvas
class ExprimentPILImage(Canvas):
@lindemann09
lindemann09 / vertex_representation_of_shape_contour.py
Last active October 4, 2017 12:50
vertex_representation_of_shape_contour
import expyriment
from expyriment.misc import geometry
import math as _math
def _contour_of_edge(node_A, node_B, node_C, line_width):
# using nodes in cartesian coordinates
BA = (node_B[0] - node_A[0], node_B[1] - node_A[1]) # vector B-A
BC = (node_B[0] - node_C[0], node_B[1] - node_C[1])
phi_BC = _math.atan2(BC[1], BC[0]) # polar coordinate phi (angle) from cartesian
@lindemann09
lindemann09 / gabor_surface.py
Created September 28, 2017 12:09
Idea: Gabor Patch without matplotlib dependency
import expyriment
import numpy as np
expyriment.control.set_develop_mode()
exp = expyriment.control.initialize()
expyriment.control.start(skip_ready_screen=True)
def canvas_with_gabor_patch(sigma,theta,Lambda,psi,gamma):
sigma_x = sigma