Skip to content

Instantly share code, notes, and snippets.

View eggie5's full-sized avatar
💭
Working on TensorFlow Ranking

Alex Egg eggie5

💭
Working on TensorFlow Ranking
View GitHub Profile
version: '2'
services:
pg:
image: postgres:9.4
ports:
- "5432"
mysql:
image: postgres:9.4
{
"expand": "full",
"id": 650669458,
"title": "Running: Trail",
"sport": 0,
"start_time": "2015-12-31T13:32:17.000Z",
"local_start_time": "2015-12-31T14:32:17.000+01:00",
"distance": 6.08037,
"duration": 2209.303,
"speed_avg": 9.90779988077688,
{
"version": 1,
"variables": [{
"names": ["id"],
"values": [[111], [121], [131], [141], [151], [161], [171], [181], [191], [201], [211], [221], [231], [241], [251], [261], [271], [281], [291], [301], [311], [321], [331], [341], [351], [361], [371], [381], [391], [401], [411], [421], [431], [441], [451], [461], [471], [481], [491], [501], [511], [521], [531], [541], [621], [631], [641], [651], [661], [671], [681], [691], [701], [711], [721], [731], [741], [751], [761], [771], [781], [791], [801], [811], [821], [831], [841], [851], [861], [871], [881], [891], [901], [911], [921], [931], [941], [951], [961], [971], [981], [991], [1001], [1011], [1021], [1031], [1041], [1051], [1061], [1071], [1081], [1091], [1101], [1111], [1121], [1131], [1141], [1151], [1161], [1171], [1181], [1191], [1201], [1211], [1221], [1231], [1241], [1251], [1261], [1271], [1281], [1291], [1301], [1311], [1321], [1331], [1341], [1351], [1361], [1371], [1381], [1391], [1401], [1411], [1421], [1431], [1441], [1451], [1461], [1
@eggie5
eggie5 / FastRunningMedian.h
Created May 1, 2014 19:17
shark beacon antenna
//
// Released to the public domain
//
// Remarks:
// This is a lean but fast version.
// Initially, the buffer is filled with a "default_value". To get real median values
// you have to fill the object with N values, where N is the size of the sliding window.
// For example: for(int i=0; i < 32; i++) myMedian.addValue(readSensor());
//
// Constructor:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <Adafruit_GPS.h>
#include "location.h"
#include <string>
#include <Sabertooth.h>
#include <LSM303.h>
#include <Wire.h>
#include <PID_v1.h>
#include <DueTimer.h>
#include <Servo.h> //must include here to to link in payloaddumper.cpp
#include "ProximitySensor.h"
@eggie5
eggie5 / async_ultrasonic.c
Created April 27, 2014 21:31
asynch (non-blocking) ultrasonic sensors for adruino due
#include <DueTimer.h>
#define trigPin1 13 // Pin 12 trigger output
#define trigPin2 11 // Pin 12 trigger output
#define trigPin3 9 // Pin 12 trigger output
#define echoPin1 12 // Pin 2 Echo input
#define echoPin2 10 // Pin 2 Echo input
#define echoPin3 8 // Pin 2 Echo input
@eggie5
eggie5 / loop.c
Created April 26, 2014 07:03
sharknado state machine loop
void loop() {
//next state logic
state=next_state;
if (state==START) start_routine();
else if(state==SEARCH) search_routine();
else if(state==BEACON) beacon_search_routine();
else if(state==ESCAPE) escape_routine();
else if(state==DONE_WAIT) done_wait();
@eggie5
eggie5 / serial_slave.cpp
Created March 29, 2014 17:41
connect to a USB host over serial arduino
uint8_t counter;
void setup() {
Serial.begin(115200);
SerialUSB.begin(115200); // speed is irrelevant for native port
counter = 0;
}
@eggie5
eggie5 / sweep.c
Created March 26, 2014 03:53
tank sweep sharknado
#include <SabertoothSimplified.h>
SabertoothSimplified ST;
void setup()
{
SabertoothTXPinSerial.begin(9600);