Skip to content

Instantly share code, notes, and snippets.

View mkassner's full-sized avatar

Moritz Kassner mkassner

View GitHub Profile
@mkassner
mkassner / gist:8c10f473ed27bdecb95b666a7c1c5d2f
Last active November 19, 2018 09:15
gmail classic with hidden inbox
/* remove everything else inbox message list */
.ae4.UI:nth-of-type(1) {
display: none;
}
/* remove controls on top of everything else inbox */
.D.E.G-atb.bP {
display: none;
}
# -*- coding: utf-8 -*-
import logging
from glfw import *
from OpenGL.GL import *
import numpy as np
# create logger for the context of this function
import time
'''
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2018 Pupil Labs
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
---------------------------------------------------------------------------~(*)
'''
from __future__ import print_function
from sys import getsizeof, stderr
from itertools import chain
from collections import deque
try:
from reprlib import repr
except ImportError:
pass
def total_size(o, handlers={}, verbose=False):
{'index': 0, 'structVersion': 2, 'name': 'Built-in Microph', 'hostApi': 0, 'maxInputChannels': 2, 'maxOutputChannels': 0, 'defaultLowInputLatency': 0.00199546485260771, 'defaultLowOutputLatency': 0.01, 'defaultHighInputLatency': 0.012154195011337868, 'defaultHighOutputLatency': 0.1, 'defaultSampleRate': 44100.0}
{'index': 2, 'structVersion': 2, 'name': 'Logitech Webcam C930e', 'hostApi': 0, 'maxInputChannels': 2, 'maxOutputChannels': 0, 'defaultLowInputLatency': 0.0063125, 'defaultLowOutputLatency': 0.01, 'defaultHighInputLatency': 0.0343125, 'defaultHighOutputLatency': 0.1, 'defaultSampleRate': 16000.0}
{'index': 3, 'structVersion': 2, 'name': 'NoMachine Audio Adapter', 'hostApi': 0, 'maxInputChannels': 2, 'maxOutputChannels': 2, 'defaultLowInputLatency': 0.01, 'defaultLowOutputLatency': 0.0014512471655328798, 'defaultHighInputLatency': 0.1, 'defaultHighOutputLatency': 0.011609977324263039, 'defaultSampleRate': 44100.0}
{'index': 4, 'structVersion': 2, 'name': 'NoMachine Microphone Adapter', 'hostApi': 0, 'm
@mkassner
mkassner / chin_rest_calibration.py
Last active June 1, 2017 17:44
Chin rest calibration plugin
'''
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2017 Pupil Labs
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
---------------------------------------------------------------------------~(*)
'''
import logging
logger = logging.getLogger()
import numpy as np
from scipy.interpolate import UnivariateSpline
import sys
def sanitize_timestamps(ts):
logger.debug("Checking %s timestamps for monotony in direction and smoothness"%ts.shape[0])
avg_frame_time = (ts[-1] - ts[0])/ts.shape[0]
logger.debug('average_frame_time: %s'%(1./avg_frame_time))
This file has been truncated, but you can view the full file.
Last login: Tue Feb 21 10:22:39 on ttys004
⌘ ~/ cd Pupil/
⌘ ~/Pupil/ rm -r build/
⌘ ~/Pupil/ rm -r dist/
⌘ ~/Pupil/ workon py3
(py3) ⌘ ~/Pupil/ pyinstaller myapp.py
77 INFO: PyInstaller: 3.3.dev0+g56bf488
78 INFO: Python: 3.6.0
82 INFO: Platform: Darwin-13.4.0-x86_64-i386-64bit
82 INFO: wrote /Users/mkassner/Pupil/myapp.spec
This file has been truncated, but you can view the full file.
Last login: Tue Feb 21 10:22:39 on ttys004
⌘ ~/ cd Pupil/
⌘ ~/Pupil/ rm -r build/
⌘ ~/Pupil/ rm -r dist/
⌘ ~/Pupil/ workon py3
(py3) ⌘ ~/Pupil/ pyinstaller myapp.py
77 INFO: PyInstaller: 3.3.dev0+g56bf488
78 INFO: Python: 3.6.0
82 INFO: Platform: Darwin-13.4.0-x86_64-i386-64bit
82 INFO: wrote /Users/mkassner/Pupil/myapp.spec
This file has been truncated, but you can view the full file.
(py3) ⌘ ~/Pupil/pupil_code/deployment/deploy_capture/ [master] ./dist/Pupil\ Capture.app/Contents/MacOS/pupil_capture
PyInstaller Bootloader 3.x
LOADER: executable is /Users/mkassner/Pupil/pupil_code/deployment/deploy_capture/dist/Pupil Capture.app/Contents/MacOS/pupil_capture
LOADER: homepath is /Users/mkassner/Pupil/pupil_code/deployment/deploy_capture/dist/Pupil Capture.app/Contents/MacOS
LOADER: _MEIPASS2 is NULL
LOADER: archivename is /Users/mkassner/Pupil/pupil_code/deployment/deploy_capture/dist/Pupil Capture.app/Contents/MacOS/pupil_capture
LOADER: /Users/mkassner/Pupil/pupil_code/deployment/deploy_capture/dist/Pupil Capture.app/Contents/MacOS/pupil_capture contains a digital signature
LOADER: Extracting binaries
LOADER: Executing self as child
LOADER: set _MEIPASS2 to /Users/mkassner/Pupil/pupil_code/deployment/deploy_capture/dist/Pupil Capture.app/Contents/MacOS