Skip to content

Instantly share code, notes, and snippets.

💭
hacking the gibson

Joseph Wright joegle

💭
hacking the gibson
Block or report user

Report or block joegle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joegle
joegle / word-service.py
Created Dec 23, 2015
Flask + gensim word2vec
View word-service.py
from gensim.models import word2vec
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
model1 = word2vec.Word2Vec.load_word2vec_format('models/glove_model.txt', binary=False)
model1.init_sims(replace=True)
from flask import Flask, jsonify, request
app = Flask(__name__)
View activity_plot.py
import numpy as np
import datetime
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib.dates import date2num
import matplotlib.cbook as cbook
from matplotlib.ticker import MaxNLocator
f=open("files.txt","r")
dates=[]
View python-serial.py
import serial
stream = serial.Serial("/dev/ttyUSB0", 115200)
rr_intervals = []
while True:
raw_line = stream.readline()
beat_time = int(str(raw_line))
rr_intervals.append(beat_time)
View pulse-snippet.cpp
void setup(){
Serial.begin(115200); // we agree to talk fast!
pinMode(blinkPin,OUTPUT); // pin that will blink to your heartbeat!
interruptSetup(); // sets up to read Pulse Sensor signal every 2mS
}
void loop(){
if (QS == true){
Serial.println(IBI); // milliseconds: '660\n'
QS = false;
View blink.c
@joegle
joegle / lab4cpp
Last active Jan 3, 2016
Ice cream cone + sonic rings
View lab4cpp
// g++ -o test -lglut -lGLU lab4_start.cpp
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cstring>
#include <GL/glut.h>
using namespace std;
@joegle
joegle / mic_websocket.go
Created Oct 29, 2013
A server that starts and stops audio recording with websocket messages
View mic_websocket.go
package main
import (
"net/http"
"fmt"
"os/exec"
"time"
"code.google.com/p/go.net/websocket"
)
@joegle
joegle / gist:7150757
Last active Dec 26, 2015
My interests according to Google
View gist:7150757
You can’t perform that action at this time.