Skip to content

Instantly share code, notes, and snippets.

View willpatera's full-sized avatar

Will willpatera

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Test Sidebar</title>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Google Translate Integration for Missive, by Matthew Delmarter</title>
<script src="https://integrations.missiveapp.com/missive.js"></script>
<link href="https://integrations.missiveapp.com/missive.css" rel="stylesheet">
<style>
.translator-heading {
background-color: var(--missive-light-active-color);
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():
@willpatera
willpatera / scan_path_no_flow.py
Created December 22, 2016 06:13
Scan Path Without Flow
'''
(*)~----------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------~(*)
'''
#!/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 September 18, 2018 18:03
Read `pupil_data` pickle file and export as `.csv` file
# 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 August 29, 2015 14:14
Demo code for Pupil Google Group

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

@willpatera
willpatera / random_walk_glumpy.py
Created August 20, 2014 01:03
Python Random Walk 3D
#!/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__':
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 November 20, 2023 06:53
Post to google spreadsheet from html form

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

Depreciation Warning: This code is not maintained, and should be seen as reference implementation only. If you're looking to add features or update, fork the code and update as needed.

Run example

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