Skip to content

Instantly share code, notes, and snippets.

View joegle's full-sized avatar
hacking the gibson

Joseph Wright joegle

hacking the gibson
View GitHub Profile
joegle /
Created December 23, 2015 00:32
Flask + gensim word2vec
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)
from flask import Flask, jsonify, request
app = Flask(__name__)
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
import serial
stream = serial.Serial("/dev/ttyUSB0", 115200)
rr_intervals = []
while True:
raw_line = stream.readline()
beat_time = int(str(raw_line))
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;
joegle / lab4cpp
Last active January 3, 2016 12:38
Ice cream cone + sonic rings
// g++ -o test -lglut -lGLU lab4_start.cpp
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cstring>
#include <GL/glut.h>
using namespace std;
joegle / mic_websocket.go
Created October 29, 2013 21:23
A server that starts and stops audio recording with websocket messages
package main
import (
joegle / gist:7150757
Last active December 26, 2015 12:19
My interests according to Google