This file contains hidden or 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
import java.io.BufferedReader; | |
import java.io.DataInputStream; | |
import java.io.EOFException; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.InputStreamReader; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.logging.Logger; |
This file contains hidden or 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
WRITE-MIME_MULTIPART=./bin/write-mime-multipart | |
.PHONY: clean | |
cloud-config.txt: ubuntu-config.txt hadoop-setup.sh | |
$(WRITE-MIME_MULTIPART) --output=$@ $^ | |
clean: | |
$(RM) cloud-config.txt |
This file contains hidden or 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
#!/usr/bin/env Rscript | |
# | |
# Usage: $0 <apache_access_log> | |
# | |
# Generate hit statistics bar chart from Apache httpd access logs | |
# | |
d <- read.table ("access.dat") | |
colnames(d) <- c("ip", "path", "agent") |
This file contains hidden or 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
# Write column headers to data file | |
$ echo "t lt ts s lb rc rm tn dt by" > $DATAFILE | |
# Extract values in quotes | |
$ sed -n '/^<httpSample/{s/[^"]*\("[^"]*"\)[^"]*/\1 /gp}' $JTLFILE >> $DATAFILE | |
# Data file looks something like this... | |
$ head $DATAFILE | |
t lt ts s lb rc rm tn dt by |
This file contains hidden or 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
#!/usr/bin/env Rscript | |
# | |
# Usage: $0 <datafile> | |
# | |
# Expected data file format: t lt ts s lb rc rm tn dt by | |
# | |
myspan = 0.1 | |
myargs <- commandArgs(TRUE) | |
file <- myargs[1] |
This file contains hidden or 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
#!/usr/bin/python -u | |
# | |
# Usage: ./trace.py <tweetId> | |
# | |
import sys | |
import tweepy | |
import Queue | |
import time | |
import json |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script type="text/javascript" src="d3.js"></script> | |
<style> | |
.link { | |
stroke: #ccc; | |
stroke-width: 2 | |
} |
This file contains hidden or 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
for i in {1..1000}; do curl -o /dev/null -s -w "%{time_total}\n" http://mybaselineurl.com | |
for i in {1..100}; do curl -o /dev/null -s -w "%{time_total}\n" http://mynewurl.com |