This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "" ]; then | |
process="firefox" | |
else | |
process="$1" | |
fi | |
echo "Scanning for connections established by '$process'. Press CTRL-C to exit." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Leiningen 2.5.0 | |
javac 1.7.0_15 (for hadoop) | |
javac 1.6.0_45 (for cascalog) | |
OpenSSH_6.7p1, OpenSSL 1.0.1k 8 Jan 2015 | |
---my mapred-site.xml | |
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns spatialog.core | |
(:use [cascalog api]) | |
(:require [cascalog.cascading.tap :as tap])) | |
(defn parse-log-str [str] | |
(rest (re-find #"^(\S+) (\S+) (\S+) \[([\w:/]+\s[+\-]\d{4})\] \"(.+?)\" (\S+) (\S+) \"([^\"]*)\" \"([^\"]*)\"" str))) | |
(def apache-logs-tap | |
(let [src (tap/hfs-textline "resources/" | |
:compression :enable :source-pattern "Site?-access.log.gz") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2015 JP de Vooght <[email protected]> | |
# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creator "yFiles" | |
Version "2.12" | |
graph | |
[ | |
hierarchic 1 | |
label "" | |
directed 1 | |
node | |
[ | |
id 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FCM iteration function | |
# returns a table of (iterations x state vectors) | |
fcm.iterate = function(mat, init, peg, iter, trans, fn, ...) { | |
acc = matrix(0, iter, ncol(mat)) | |
acc[1,] = init | |
if(!missing(peg)) { | |
acc[1,which(!is.na(peg))] = peg[!is.na(peg)] | |
} | |
for(i in 2:iter) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# expected format | |
#{ | |
# "location": "92882", | |
# "Air": 166, | |
# "Carbon-Monoxide": 208, | |
# "Hexane": 227, | |
# "Methane": 253, | |
# "Benzine": 245, | |
# "Alcohol": 256, | |
# "LPG": 274 |
OlderNewer