Skip to content

Instantly share code, notes, and snippets.

John Ott jbott

Block or report user

Report or block jbott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jbott / acc_to_angles.ino
Last active Jul 7, 2016
Set of scripts to do get angles from the 9dof sensor stick
View acc_to_angles.ino
#include <Wire.h>
#include <I2Cdev.h>
#include <ADXL345.h>
ADXL345 acc;
void setup() {
View Install Miniconda for Python 2.7 on
  1. Download latest Miniconda for Python 2.7
  1. Open terminal

  2. Change to download folder location

jbott / docker-container@.service
Last active Feb 9, 2016
A docker container systemd service file. This has no support for container dependencies.
View docker-container@.service
Description=Docker %i container
ExecStart=/usr/bin/docker start -a %I
ExecStop=/usr/bin/docker stop -t 2 %I
jbott /
Created Nov 12, 2015
Scikit-learn iris data set classification using TensorFlow
import sklearn
import tensorflow as tf
from sklearn import datasets
iris = datasets.load_iris()
# Convert targets to one hot
targets_onehot = [0] * len(
for i,target in enumerate(
targets_onehot[i] = [0] * 3
# How this works:
# Curl -> Grabs the organization repos from the github api
# grep -> Filter to only clone_url's
# grep -> Select the url from that line
# xargs -> For each line, run git clone [line]
curl -s "${1}/repos?per_page=200" | grep clone_url | grep -oh "https.*git" | xargs -L1 git clone
jbott /
Last active Aug 29, 2015 — forked from advorak/
appify — create the simplest possible Mac app from a shell script (adds an application icon) (Working with ZSH with spaces in the name)
if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF
appify v3.0.0 for Mac OS X -
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"`
View VoltageRead.ino
#define READ_COUNT 5
float volts[READ_COUNT];
void setup()
void loop()
jbott /
Created Jun 19, 2015
Minecraft init script for tmux
# Go to script directory
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
### Configuration ###
jbott /
Last active Aug 29, 2015
MQTT Tree in python, very rough
#pip install paho-mqtt
#pip install git+
import asciitree
import paho.mqtt.client as mqtt
import sys
from collections import defaultdict
from time import sleep
tr = asciitree.LeftAligned()
You can’t perform that action at this time.