Skip to content

Instantly share code, notes, and snippets.

connerbrooks /
Created April 13, 2019 19:29
Script to read chase statement CSV and show running sum. Ignores payments.
#!/usr/bin/env python
import sys
import csv
if len(sys.argv) != 2:
print "Usage: chase_running_sum <chase_csv>"
with open(sys.argv[1], 'rb') as csvfile:
connerbrooks / cgd-werc.service
Last active January 8, 2018 09:15
cgd for swerc or werc with systemd
Description=Job that runs cgd for my cool swerc site.
ExecStart=/home/cbrooks/develop/bin/cgd -f -c /home/cbrooks/swerc/bin/werc.rc
connerbrooks / ViveController.js
Created June 21, 2016 21:14
Three.js ViveController with button events.
THREE.ViveController = function ( id ) { this );
this.matrixAutoUpdate = false;
this.standingMatrix = new THREE.Matrix4();
var scope = this;

Keybase proof

I hereby claim:

  • I am connerbrooks on github.
  • I am connerbrooks ( on keybase.
  • I have a public key ASAfhwmlmtoIuKkRbx6CDlAsF4uJlSgcEnj6QT_eBA0_eAo

To claim this, I am signing this object:

# - Find OpenNI
# This module defines
# OpenNI_INCLUDE_DIR, where to find OpenNI include files
# OpenNI_LIBRARIES, the libraries needed to use OpenNI
# OpenNI_FOUND, If false, do not try to use OpenNI.
# also defined, but not for general use are
# OpenNI_LIBRARY, where to find the OpenNI library.
set(OPEN_NI_ROOT "C:/Program\ Files/OpenNI2" CACHE FILEPATH "Root directory of OpenNI2")
* DAC.cpp
* Created on: Mar 23, 2016
* Author: conne
#include "DAC.h"
volatile struct DAC_REGS *DAC_PTR[4] = {0x0,&DacaRegs,&DacbRegs,&DaccRegs};
connerbrooks / makefile.conf
Created January 14, 2016 03:55
LibDAI makefile for VS 2015
# This file is part of libDAI -
# Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
# This template contains configurations for compiling libDAI with Visual C++
# under Windows (and GNU Make)
<script src=""></script>
<script src=""></script>
<script src="libs/threex.keyboardstate.js"></script>
<script src="libs/physi.js"></script>
<script src="libs/OrbitControls.js"></script>
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
connerbrooks /
Last active August 29, 2015 22:47
1D Kalman Filter
# Write a program that will iteratively update and
# predict based on the location measurements
# and inferred motions shown below.
def update(mean1, var1, mean2, var2):
new_mean = float(var2 * mean1 + var1 * mean2) / (var1 + var2)
new_var = 1./(1./var1 + 1./var2)
return [new_mean, new_var]
def predict(mean1, var1, mean2, var2):
connerbrooks /
Last active August 29, 2015 22:45
2D Monte Carlo Localizer
# The function localize takes the following arguments:
# colors:
# 2D list, each entry either 'R' (for red cell) or 'G' (for green cell)
# measurements:
# list of measurements taken by the robot, each entry either 'R' or 'G'
# motions:
# list of actions taken by the robot, each entry of the form [dy,dx],