Skip to content

Instantly share code, notes, and snippets.

View telamonian's full-sized avatar

Max Klein telamonian

View GitHub Profile
@telamonian
telamonian / register-jupyter-env
Last active March 3, 2021 11:46 — forked from thvitt/register-jupyter-env
Register a jupyter kernel for the current pyenv (with fix for Jupyter servers running in virtualenvs).
#!/bin/sh
if [ "$PYENV_VERSION" -ne "" ]
then
name=`pyenv version-name`
python=`pyenv which python`
else
name=`basename "$VIRTUAL_ENV"`
python="$VIRTUALENV/bin/python"
fi
@telamonian
telamonian / xbox-one-wireless-protocol.md
Created June 16, 2020 03:57 — forked from alfredkrohmer/xbox-one-wireless-protocol.md
XBox One Wireless Controller Protocol

Physical layer

The dongle itself is sending out data using 802.11a (5 GHz WiFi) with OFDM and 6 Mbit/s data rate:

Radiotap Header v0, Length 38
    Header revision: 0
    Header pad: 0
    Header length: 38
    Present flags
@telamonian
telamonian / singleton.py
Created November 29, 2017 20:24 — forked from werediver/singleton.py
A thread safe implementation of singleton pattern in Python. Based on tornado.ioloop.IOLoop.instance() approach.
import threading
# Based on tornado.ioloop.IOLoop.instance() approach.
# See https://github.com/facebook/tornado
class SingletonMixin(object):
__singleton_lock = threading.Lock()
__singleton_instance = None
@classmethod