Skip to content

Instantly share code, notes, and snippets.

View jdevoo's full-sized avatar

JP de Vooght jdevoo

View GitHub Profile
@jdevoo
jdevoo / fcm.R
Created September 1, 2015 12:41
# Copyright 2015 JP de Vooght <jp@vooght.de>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# AMIDST Notes
mvn clean dependency:copy-dependencies package
## core
java -Xmx5G -cp ./core/target/*:./core/target/dependency/* eu.amidst.core.learning.parametric.bayesian.DriftSVB
java -Xmx5G -cp ./core/target/*:./core/target/dependency/* eu.amidst.core.learning.parametric.bayesian.MultiDriftSVB
#!/bin/bash
cat list | while read -r file url; do
post=$(basename "$file")
image=$(basename "$url")
outfile="${post%.*}.${image##*.}"
if [ -f ${outfile} ] ; then
count=$( find . -name "${post%.*}*" 2> /dev/null | wc -l )
outfile="${post%.*}-${count}.${image##*.}"
fi
wget ${url} -O ${outfile}
@jdevoo
jdevoo / _ecoviz.html
Last active July 6, 2016 08:31
ecoviz widget
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>Data</title>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://vooght.de/raphael-min.js"></script>
<script src="http://vooght.de/morris.min.js"></script>
@jdevoo
jdevoo / slog.html
Last active July 6, 2016 08:27
slog data
<p>I use this section to display hard sensing data. It is what UCLA <a href="http://research.cens.ucla.edu/">CENS</a> would call a “Slog” or Sensor Log and a playground for experimenting with visualization and sensor technologies.</p>
<p>More details about the <a href="https://plus.google.com/105774606404573622287?rel=author">instrument and methodology</a> will follow. As data is stored in Google <a href="http://www.google.com/drive/apps.html#fusiontables">Fusion Tables</a>, it is subject to access restrictions and may not appear if quotas are exceeded.</p>
<form>
<select onchange="document.getElementById('ecoviz').contentWindow.postMessage(this[this.selectedIndex].value,'http://vooght.de');">
<option value="1EJZdBgl8rslSsSbvsc9AC_eqtANoJHWGC7ADEEc">Sensor on Dashboard</option>
<option value="1DajIRDHb298ugvCItAO5TWYtfPKmHRctfRaNn_U">Lausanne Bus+Walking</option>
<option value="1uCR2YDxOTDwGN-yCdYQev9I6EyoY2-LUP5L0ThA">Walking through UCLA Campus</option>
<option value="1_ag8bMnnrSgnKmOJus1C2g45-S1W
@jdevoo
jdevoo / env_create.sh
Created April 23, 2016 06:03
plotting sensor data with RRDtool
# expected format
#{
# "location": "92882",
# "Air": 166,
# "Carbon-Monoxide": 208,
# "Hexane": 227,
# "Methane": 253,
# "Benzine": 245,
# "Alcohol": 256,
# "LPG": 274
(ns cascalab.webgraph
(:use [cascalog api])
(:require [cascalog.cascading.tap :as tap]
[cascalog.logic.ops :as c])
(:gen-class))
(defn- parse-str [^String s]
(seq (clojure.string/split s #"\s+")))
(defmapcatfn mk-node [from to]
@jdevoo
jdevoo / scan.sh
Created October 1, 2012 06:02
scan processes for AS
#!/bin/bash
if [ "$1" = "" ]; then
process="firefox"
else
process="$1"
fi
echo "Scanning for connections established by '$process'. Press CTRL-C to exit."
@jdevoo
jdevoo / gist:3775189
Created September 24, 2012 09:48
SMS_Gateway
#include <Ethernet.h>
#include <EthernetDHCP.h>
#include <GSM.h>
#include <ctype.h>
long last_poll = 0;
long poll_interval = 0;
byte server[] = { 192, 168, 1, 100 };
GSM telit;
@jdevoo
jdevoo / Pachube.R
Created April 27, 2012 10:32
Pachube R Functions
library(rjson)
library(RCurl)
Pachube.query <- function(feed='504')
{
json<-getURL(
paste('http://api.pachube.com/v2/feeds/',feed,sep=''),
netrc='optional')
data<-fromJSON(json)
if (data$private == "true" || !is.null(data$error)) stop(data)