Skip to content

Instantly share code, notes, and snippets.

Will willpatera

Block or report user

Report or block willpatera

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View network_api.py
import time
# https://github.com/pupil-labs/pyndsi/tree/v1.0
import ndsi # Main requirement
GAZE_TYPE = "gaze" # Type of sensors that we are interested in
SENSORS = {} # Will store connected sensors
def main():
View scan_path_no_flow.py
'''
(*)~----------------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2016 Pupil Labs
Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0).
License details are in the file license.txt, distributed as part of this software.
----------------------------------------------------------------------------------~(*)
'''
View install_ffmpeg_ubuntu.sh
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev yasm
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@willpatera
willpatera / pupil_data_to_csv.py
Last active Sep 18, 2018
Read `pupil_data` pickle file and export as `.csv` file
View pupil_data_to_csv.py
# coding=utf-8
import pickle
import numpy as np
import sys
# open the pickled file
# replace with your path to pupil_data
if sys.version_info >= (3, 0):
pupil_data = pickle.load(open("/Users/wrp/recordings/2016_01_28/001/pupil_data","rb"),encoding='latin1')
else:
@willpatera
willpatera / _readme.md
Last active Aug 29, 2015
Demo code for Pupil Google Group
View _readme.md

Eye Image Screen Capture and Apparent Pupil Size

This gist contains modified source code and an example plugin for the Pupil Google Group as a demonstration of concept. This code runs, but is not intended for distribution (only as one potential starting point for other users who might want to further develop a plugin that saves eye images in real-time along with pupil data.

Changes

screen_cap_eye.py

  • the very rough example of the plugin that could be developed to achieve eye screen captures along with other pupil data.

eye.py

View random_walk_glumpy.py
#!/usr/bin/env python
import numpy as np
import scipy.spatial.distance as spd
import OpenGL.GL as gl
from glumpy import figure, Trackball
if __name__ == '__main__':
View .bash_profile
export EDITOR=slime
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"
# Set architecture flags
# export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
# path for node.js
@willpatera
willpatera / Google-Sheet-Form-Post.md
Last active Oct 3, 2019
Post to google spreadsheet from html form
View Google-Sheet-Form-Post.md

Overview

This collection of files serves as a simple static demonstration of how to post to a google spreadsheet from an external html <form> following the example by Martin Hawksey

Run example

You should be able to just open index.html in your browser and test locally.

However if there are some permissions errors you can make a quick html server with python. Open terminal and cd to the directory where the gist files are located and enter python -m SimpleHTTPServer. By default this creates a local server at localhost:8000

@willpatera
willpatera / marker_detector.py
Created Apr 11, 2014
Hacky modification of marker_detector plugin to demonstrate how one could save gaze positions on surface
View marker_detector.py
'''
(*)~----------------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2014 Pupil Labs
Distributed under the terms of the CC BY-NC-SA License.
License details are in the file license.txt, distributed as part of this software.
----------------------------------------------------------------------------------~(*)
'''
@willpatera
willpatera / Readme.md
Last active Jan 2, 2016
Debugging marker tracker plugin from Pupil forum post
View Readme.md
You can’t perform that action at this time.