Skip to content

Instantly share code, notes, and snippets.

View treeherder's full-sized avatar

Brendan Reddy-Best treeherder

View GitHub Profile
@treeherder
treeherder / rpc_cli.py
Last active August 29, 2015 14:03
fledgling rpc for some automated tasks.. works great so far.
import xmlrpclib, time
server = xmlrpclib.ServerProxy('http://localhost:8000',allow_none=True)
print(server.system.listMethods())
server.capture(time.time())
server.tx("/1Z5000R")
@treeherder
treeherder / README.md
Last active August 29, 2015 14:05
instructions for operating the camera tower

Camera Tower

to reboot the pi, press ctrl -alt - backspace and then type sudo reboot or to shutdown sudo shutdown -h now

login: pi
password: raspberry

-when finished booting, type startx to begin the graphical desktop session
-open LXTermnial icon from the desktop
-type sudo ./camera into the terminal to begin the app.

@treeherder
treeherder / yasnac.py
Last active August 29, 2015 14:06
a python interface for controlling the yasnac motoman
import serial, time
Class YASNAC(): # a classs to handle the yasnac
def __init__(self):
self.com = serial.Serial("port=/dev/ttyS0, baudrate=4800, bytesize=EIGHTBITS, parity=PARITY_EVEN, stopbits=STOPBITS_ONE")
#initialize the class a connection to the serial port
time.sleep(4)# wait for the port to be ready (this is an arbitrary period)
@treeherder
treeherder / walker.py
Created October 5, 2014 11:00
walker notes
#!/usr/bin/python
from Adafruit_PWM_Servo_Driver import PWM
import time
# ===========================================================================
# Example Code
# ===========================================================================
# Initialise the PWM device using the default address
#!/usr/bin/python
# based on monitor-bluetooth
# Changes by Domen Puncer <[email protected]>
import gobject
import dbus
import dbus.mainloop.glib
import os
@treeherder
treeherder / EDISON.md
Last active October 4, 2015 05:26
intel edison quickstart for magnitude.io hackathon

##intel Edison Yocto linux

###setup on the arduino breakout module:

  • the barrel jack wants 7-17 Volts DC. The official documentation suggests ~12
  • the USB A and the micro USB nearest it are configured with the microswitch between them
    • when the micro USB port is selected, the device is in CLIENT MODE
    • when the USB A port is connected, the device is in HOST MODE
  • the last micro USB port is access to the linux serial terminal
@treeherder
treeherder / app.js
Last active August 29, 2015 14:14
twilio server in express
var express = require('express');
var app = express();
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(app.router);
app.post('/upload', function(req, res){
if(req.files.myUpload){
var python = require('child_process').spawn(
'python',
// second argument is array of parameters, e.g.:
@treeherder
treeherder / munchery.md
Last active August 29, 2015 14:15
people organization app for delivery of munchery meals

MUNCHERY

####munchery meals need to be sorted more capably

  1. logistics
  • how to organize drivers based on changeable timeframe with minimal reconfiguring
  • getting there on time consistently
  • meeting the donor's requirement
  • bringing new people into the mix without disasters
  1. dissemination of information
@treeherder
treeherder / ffxiv-app-curl.vbs
Last active August 29, 2015 14:15
a small visual basic script for curling the most recent meter capture to paste/click
Option Explicit
Function execStdOut(cmd)
Dim goWSH : Set goWSH = CreateObject( "WScript.Shell" )
Dim aRet: Set aRet = goWSH.exec(cmd)
execStdOut = aRet.StdOut.ReadAll()
End Function
@treeherder
treeherder / gp.md
Created March 19, 2015 03:52
genetic programming

asssuming a cell has some logical sequence DNA == algorithm and data (as a string in src code) data can be stored in the genome a change in the phenotype may change the genotype (and thereby ruin the data) what pathways we already have the power to control -> promoter systems terp pathway -- list of pathways and how are they controlled

write an algorithm that is the