Skip to content

Instantly share code, notes, and snippets.

View robinvanemden's full-sized avatar
🌳
⏩ ⏩

Robin van Emden robinvanemden

🌳
⏩ ⏩
View GitHub Profile
library(ggplot2)
library(jsonlite)
library(rmongodb)
setwd("C:/Users/User/Desktop/LiF")
BASE_URL = "http://localhost:8080"
key = "51fc58011"
question_nr = 2626
customers <- 4000
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import urllib,json,codecs
#change to pymongo for greater compatibility
import iopro
def getobs( x, max = 5, err=0 ):
if (err==0):
# -*- coding: utf-8 -*-
#from IPython import get_ipython
#get_ipython().magic('reset -sf')
import numpy as np
import matplotlib.pyplot as plt
import json
##############################################################################
@robinvanemden
robinvanemden / LiF_Permutation_Test.py
Last active December 3, 2015 10:03
Testing sensitivity of LiF to missing data and permutations
# -*- coding: utf-8 -*-
## IPython Reset
#from IPython import get_ipython
#get_ipython().magic('reset -sf')
##############################################################################
import numpy as np
##############################################################
#
# read_totem_data.R
#
# Import script
#
# Parses raw Totem Sensor accelerometer data in R
# And looks for peaks (steps, cycles, repeats)
#
####
#
# read_sensor_data.R
#
# Import script. Parses MLX sensor data
#
# Robin van Emden - [email protected] - 2015
#
####
<?php
/**
* A php implementation of the Hungarian algorithm for solving the assignment
* problem. An instance of the assignment problem consists of a number of
* workers along with a number of jobs and a cost matrix which gives the cost of
* assigning the i'th worker to the j'th job at position (i, j). The goal is to
* find an assignment of workers to jobs so that no job is assigned more than
* one worker and so that no worker is assigned to more than one job in such a
* manner so as to minimize the total cost of completing the jobs.
@robinvanemden
robinvanemden / UartService.java
Created September 1, 2015 13:41
Android BLE UART Service
package io.pavlov.bleuart;
import android.app.Service;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
@robinvanemden
robinvanemden / BabyService.java
Created July 2, 2015 17:02
Audio Detector and Recorder
package com.hollandhaptics.babyapp;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.SimpleDateFormat;
/* Control a Peltier Cooler over Arduino Motor Shield from Authorware
Developed for Arduino Uno with a Velleman VMA23 or KA03 Motor Shield
The circuit:
* Peltier elements connected to the motor outputs A and B
* 50 V (max.) external power supply connected to motor input
Created 2015
by Robin van Emden