Skip to content

Instantly share code, notes, and snippets.

@yosemitebandit
yosemitebandit / udev.txt
Last active August 27, 2018 21:36
helpful udev / USB debugging commands
watch -n 1 "ls /dev"
watch -n 1 "ls /dev | grep unitek"
udevadm monitor
sudo service udev restart
udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0)
udevadm info --name=/dev/ttyACM0 --attribute-walk
udevadm info --name=/dev/ttyACM0 --attribute-walk | grep KERNELS
@yosemitebandit
yosemitebandit / sample.ino
Created April 12, 2017 18:43
sample sketch for review
/* Sample sketch for review.
*/
#define USB Serial
const int usbBaud = 57600;
const int ledPin = 13;
const int commandBufferLength = 80;
static char commandBuffer[commandBufferLength];
char *commandMode;
@yosemitebandit
yosemitebandit / pwm_stepper_control.ino
Last active November 23, 2023 19:00
controlling a stepper motor with PWM
/* Teensy LC sketch for controlling a stepper motor.
Reads comma-separate commands over serial. Sends back number of steps taken.
Commands are of the form:
step,300,800 -> stepper should move 300 sixteenth-steps forward at 800 steps per second
step,-124,100 -> stepper should move 124 sixteenth-steps backward at 100 steps per second
*/
@yosemitebandit
yosemitebandit / notes.md
Last active November 27, 2016 09:41
live streaming notes

youtube

  • create an event and setup custom ingestion so you get an rtmp url, then use something like to stream from a mac's webcam:
ffmpeg -f avfoundation -i "default" -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -acodec aac -ab 128k -g 50 -strict experimental -f flv -s 426x240 "<rtmp_path>/<stream_id>"

zencoder

@yosemitebandit
yosemitebandit / gene_expression_plotter.py
Last active April 22, 2016 20:57
plotting gene expression data
"""Plotting gene expression data from a csv"""
import os
import matplotlib
import matplotlib.pyplot as plt
import pylab
# Load data.
path = 'murine-placenta-gene-1-2.csv'
@yosemitebandit
yosemitebandit / two-player-go.html
Created March 12, 2016 20:18
go in the browser -- basically just a virtual board, no scoring or rule enforcement or..much of anything, really!
<!doctype html>
<html>
<head>
<style>
body, html, table {
margin: 0;
padding: 0;
}
body {
@yosemitebandit
yosemitebandit / 2_fullyconnected.ipynb
Last active March 12, 2016 03:07
assignment one from the Udacity Deep Learning course
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yosemitebandit
yosemitebandit / 1_notmnist.ipynb
Last active March 7, 2017 03:20
assignment two from the Udacity Deep Learning course
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yosemitebandit
yosemitebandit / 3_regularization.ipynb
Last active June 8, 2017 01:49
udacity neural network course -- assignment 3.4, 3-layer NN with regularization and dropout
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yosemitebandit
yosemitebandit / logistic_regression.ipynb
Last active January 22, 2016 08:23
notes from the udemy class
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.