This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sips -s format jpeg path_in --out path_out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define FASTADC 1 | |
// defines for setting and clearing register bits | |
#ifndef cbi | |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | |
#endif | |
#ifndef sbi | |
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); //HTTP Server | |
var url = require("url"); // URL Handling | |
var fs = require('fs'); // Filesystem Access (writing files) | |
var express = require('express'), //App Framework (similar to web.py abstraction) | |
app = express.createServer(); | |
app.use(express.bodyParser()); | |
app.use(app.router); | |
io = require('socket.io').listen(app); //Socket Creations | |
io.set('log level', 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<LINK REL=StyleSheet HREF="/flot/style.css" TYPE="text/css" MEDIA=screen> | |
<style> | |
</style> | |
</head> | |
<body> | |
<script src="/socket.io/socket.io.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Circular Progressbar</title> | |
<script type="text/javascript" src="http://paperjs.org/static/js/paper.js"></script> | |
<script type="text/paperscript" canvas="canvas"> | |
project.currentStyle = { | |
strokeColor: 'red', | |
strokeWidth: 60, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var exec = require('child_process').exec; | |
var child; | |
//Put path to mongoexport here | |
mel = "/Users/ardustat/Downloads/mongodb-osx-x86_64-2.0.2/bin/mongoexport" | |
function mongoexport(collection) | |
{ | |
out_string = mel + " -csv -o "+collection+".csv -d ardustat -c "+collection+" -f time,cell_potential,working_potential,current" | |
child = exec(out_string, function (error, stdout, stderr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//First make placeholders for results as globals | |
results = {} | |
processes = {} | |
//Now Spawn Processes within code you need, where index is an identifier | |
spawn_list[index] = spawn(/*file here*/) | |
processes[index] = spawn_list[index].pid | |
results[processes[index]] = {} | |
results[processes[index]]['index'] = index //funny looking but important | |
results[processes[index]]['stdout'] = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code to set set current here | |
for i in range(120): | |
#code to get data here | |
time.sleep(.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
from glob import glob | |
from time import sleep | |
port = glob("/dev/tty.usb*")[0] | |
ard = serial.Serial(port,57600) | |
print "waiting to start" | |
for i in range(3,0,-1): | |
print i, | |
sleep(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
from glob import glob | |
port = glob("/dev/tty.u*")[0] | |
ser = serial.Serial(port,57600) | |
ser.open() | |
ser.timeout = .5 | |
def write(string): |
OlderNewer