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
| #Uploaded in response to query on psychopy list: https://groups.google.com/group/psychopy-users/browse_thread/thread/c65e453edf530f8 | |
| #asking for code to input a string. | |
| #Program flashes string on screen, and user tries to type it in. Supports backspace but no other editing special characters. | |
| #Checks whether subject got it right | |
| #Alex Holcombe [email protected] 21 August 2012 | |
| #licensing: CC-BY whch means do whatever you want with it, with an attribution to the author. If you want permission to use it without | |
| #attribution, just contact me. | |
| from psychopy import monitors, visual, event, data, logging, core, sound, gui | |
| import psychopy.info |
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
| /** | |
| * Filters an array of objects using custom predicates. | |
| * | |
| * @param {Array} array: the array to filter | |
| * @param {Object} filters: an object with the filter criteria | |
| * @return {Array} | |
| */ | |
| function filterArray(array, filters) { | |
| const filterKeys = Object.keys(filters); | |
| return array.filter(item => { |