Skip to content

Instantly share code, notes, and snippets.

"""NavigationSensors - designed to parse data from devices such as the Microsoft
Kinect and ultrasonic sensors, in order to translate the data into
intuitively acceptable input (such as haptic feedback) for blind individuals.
The ideal use case is as such:
1) We have a vest with haptic feedback motors. We have a Kinect and an
ultrasonic sensor.
2) We parse data from the Kinect into subdivided segments - one
for every motor. For example, a vest with 4 motors would mean
to subdivide our image into 4 squares (likely in a 2x2 formation).
@tusing
tusing / Zeal60_UnderglowGuidePublic.md
Last active January 23, 2024 18:25
A guide detailing how to enable underglow on the Zeal60 with WS2812 LEDs.

RGB Underglow Strip on the Zeal60: A Guide

A. Connecting the strip

You might find the full PCB image helpful. Ignore the red boxes!

  1. Connect V+ to the receiving end of the thermistor labeled F1; connect GND to the board's GND pin. (Avoid connecting +V to the board's +5V pin - you will likely overload the thermistor, and you will limit your maximum brightness.)
" WARNING: Remember that /etc/vim/vimrc has priority!
set laststatus=2 " Always show statusline
set t_Co=256 " 256 colors
" ======== VUNDLE SETTINGS =========
" ---------- VUNDLE START ----------
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
@tusing
tusing / loggingMain.go
Last active July 4, 2017 08:23
Go logging boilerplate
package main
import (
"flag"
"github.com/op/go-logging"
"os"
)
func makeLogger(name string, minLevel logging.Level) logging.Logger {
log := logging.MustGetLogger(name)
@tusing
tusing / .bashrc
Created September 23, 2017 11:28
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKTLsyylwwytA+b33+3jSF0abp6IXwrkAzNRhEY/UvVrsJqpFvUYR5i/U8Dmo/CSF4PorrhRq9W2IGZTq06WVOf+iPmZRNo4mkYuu0td/yaMnWllooE0oqqu3ky9XaUF9pnxGLTg//LpaSwsxeM7HP9DEYb0cvewGklG5eSGcNxlZSr9b7KNtjyTIdvwv8gpEFctievsJA/rtPSz5E5FY3rTOZm5aElaebXCjGCiMAMZXUDOLl0UdJhBqJGCytWALQgW1641ncdVA5P/SLamXGY+1mbzX5gOZ08Ue0N9RKUoSHIIud2El/h6DKk5MT6qJmLV4kEjR5PvIJdq0Hm3TD tusing
@tusing
tusing / loop.py
Last active October 1, 2017 01:40
import moviepy.editor as mpy
from moviepy.video.tools.cuts import FramesMatches
import argparse
import dill
import glob
from multiprocessing import Process
def main():
parser = argparse.ArgumentParser(description='Find GIF loops in a video')
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@tusing
tusing / random_mental.py
Last active March 30, 2018 19:06
Mental-math random number
"""
by tusing
MOTIVATION:
Wanted a fast way to come up with reasonably pseudo-random numbers mentally.
Humans have a bias when guessing numbers: we tend to guess 7 and 17 most often:
http://scienceblogs.com/cognitivedaily/2007/02/05/is-17-the-most-random-number/
ALGORITHM:
1. Start with a seed (1). The seed serves to "balance" our output distribution,
@tusing
tusing / keybase.md
Created April 4, 2019 23:15
keybase.md

Keybase proof

I hereby claim:

  • I am tusing on github.
  • I am tusing (https://keybase.io/tusing) on keybase.
  • I have a public key ASCAb-us2xA-CQ3PHx1zRln-Yor5MKqk1HJejYTfJaPcSQo

To claim this, I am signing this object: