Skip to content

Instantly share code, notes, and snippets.

View papr's full-sized avatar
🏠
Working from home

Pablo Prietz papr

🏠
Working from home
View GitHub Profile
import logging
from collections import Counter
from enum import Enum
from time import perf_counter, gmtime, strftime
from pyglui import ui
from plugin import Plugin
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2019 Pupil Labs
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
---------------------------------------------------------------------------~(*)
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@papr
papr / surface_data_extraction.ipynb
Created November 27, 2019 21:17
Extract recorded "gaze positions on surface"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pathlib
import numpy as np
import OpenGL.GL as gl
from pyglui import ui, pyfontstash
from pyglui.cygl import utils as cygl_utils
import gl_utils
from plugin import Plugin
from pupil_recording import PupilRecording
@papr
papr / vis_hemianopsia.py
Last active April 1, 2020 10:42
Pupil Player plugin to visualize left/right hemianopsia
import enum
import cv2
from plugin import Visualizer_Plugin_Base
import numpy as np
from pyglui import ui
from methods import denormalize
import logging
@papr
papr / frame_index.py
Created April 2, 2020 09:32
Pupil Player plugin that renders the current scene video frame index into the scene video
import logging
import cv2
from plugin import Plugin
logger = logging.getLogger(__name__)
class Frame_Index(Plugin):
@papr
papr / monitor_network.ipynb
Created May 13, 2020 13:36
Replay HMD recording
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@papr
papr / load_pldata_files.py
Created June 23, 2020 15:13
Externalized examples to read Pupil Core recording data. Code taken from https://github.com/pupil-labs/pupil
import os
import collections
import msgpack
import numpy as np
PLData = collections.namedtuple("PLData", ["data", "timestamps", "topics"])