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
/* Analog proximity sensor array scanner code | |
* | |
* EE 4951W Spring 2014 | |
* Group 10: Optical Guitar | |
* Advisor: Dr. James Leger | |
* Group members: Sandra Arnold, Justin Buth, Matthew Lewis, Steffen Moeller, Anh Nguyen | |
* | |
* Target device: Teensy 2.0 | |
* Program Teensy 2.0 with this sketch using Arduino software | |
*/ |
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
queries = { | |
activities: squel.select() | |
.from('strava_activities') | |
.field('name') | |
.field('type') | |
.field('start_date') | |
.field('distance_mi') | |
.field('pace_mins_per_mi') | |
.field('polyline') | |
.order('start_date', false) |
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 <Foundation/Foundation.h> | |
@interface PTDIntelHex : NSObject | |
@property (nonatomic, strong) NSString* name; | |
+ (PTDIntelHex*)intelHexFromHexString:(NSString*)hexString; | |
+ (PTDIntelHex*)intelHexFromFileURL:(NSURL*)file; | |
- (id)initWithHexString:(NSString*)hexString; |
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 json | |
PER_SIDE = 12 # The size of the square wall, in pixels per side | |
TIGHTNESS = 20 # A higher number places dots closer together | |
half = int(PER_SIDE / 2) | |
axis = [(x + 0.5) / TIGHTNESS for x in range(-half, half)] | |
# We reverse the array and plot them z, then x because gl_server's layouts | |
# are weird when used with the Fadecandy examples |
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
const int MAX_CHARS = 64; | |
char data[MAX_CHARS] = {0}; | |
uint8_t out[MAX_CHARS] = {0}; | |
void setup() | |
{ | |
Serial.begin(57600); | |
} |
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 java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import javax.annotation.Generated; | |
import com.fasterxml.jackson.annotation.JsonAnyGetter; | |
import com.fasterxml.jackson.annotation.JsonAnySetter; | |
import com.fasterxml.jackson.annotation.JsonIgnore; | |
import com.fasterxml.jackson.annotation.JsonInclude; | |
import com.fasterxml.jackson.annotation.JsonProperty; |
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
#!/usr/bin/env python3 | |
import appdirs | |
from imgurpython import ImgurClient | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
from pync import Notifier | |
import os | |
import json |
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
# Arduino makefile | |
# | |
# This makefile allows you to build sketches from the command line | |
# without the Arduino environment (or Java). | |
# | |
# The Arduino environment does preliminary processing on a sketch before | |
# compiling it. If you're using this makefile instead, you'll need to do | |
# a few things differently: | |
# | |
# - Give your program's file a .cpp extension (e.g. foo.cpp). |
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
def coordsFromRaw(raw): | |
return raw.split(',') | |
lat, lng = getCoordsFromRaw('-87.142,60.330') | |
print(lat, lng) |
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
#!/bin/bash | |
# From https://www.calazan.com/docker-cleanup-commands/ | |
echo '==============================' | |
echo 'Deleting stopped containers...' | |
echo '==============================' | |
docker rm $(docker ps -a -q) |