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 | |
echo Setting CPU to performance | |
for c in $(seq 0 8 192) | |
do | |
sudo cpufreq-set -c $c -r -g performance | |
done |
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
#!/usr/bin/python | |
# Input: CSV file with headers, column names | |
# x,y,z | |
# 1,2,3 | |
# 4,5,6 | |
# Output: CSV file | |
# Usage: | |
# ./split-columns.py [IN_CSV] [COLUMN NAMES] | |
# Example: ./split-columns.py in.csv x z | |
import sys |
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
#!/usr/bin/Rscript | |
# Input: CSV file with headers | |
# x,y,z | |
# 1,2,3 | |
# 4,5,6 | |
# Output: CSV file | |
# Usage: | |
# ./split-columns.R [IN_CSV] [COLUMN NAMES] | |
# Example: ./split-columns.R in.csv x z |
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 | |
# Input = CSV file with timestamp as 3rd field | |
# 1,2,Wed Apr 29 09:46:58 CDT 2015 | |
# 3,4,Wed Apr 29 09:46:58 CDT 2015 | |
# Converts timestamp to linux time | |
while read line | |
do | |
A=$(echo $line | cut -d, -f1-2) | |
D=$(echo $line | cut -d, -f3) |
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
#!/usr/bin/python | |
import sys | |
import random | |
def main(argList): | |
if '-edges' in argList: | |
a = argList.index('-edges') | |
edges = int(argList[a+1]) |
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
# http://stackoverflow.com/questions/12818864/how-to-write-to-json-with-children-from-r | |
# example input | |
# year month size | |
# 2007 1 100 | |
# ... | |
# 2007 12 850 | |
# 2008 1 432 | |
# ... | |
makeList <- function(x){ |
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 | |
[[ $# -lt 1 ]] && echo Usage: $0 INTERFACE && exit 1 | |
IFACE=$1 | |
cat /proc/interrupts | grep "$IFACE-" | cut -d':' -f1 > tmp.interfaces | |
echo Reading affinity of $IFACE | |
for IRQ in $(cat tmp.interfaces) |
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 | |
[[ $# -lt 1 ]] && echo "Usage: $0 [INTERFACE] [RESET]" && exit 1 | |
IFACE=$1 | |
# Tweak the CPUSTART to fit your system | |
CPUSTART=32 | |
[[ $IFACE == "eth2" ]] && CPUSTART=8 | |
[[ $IFACE == "eth3" ]] && CPUSTART=16 | |
[[ $IFACE == "eth4" ]] && CPUSTART=24 |
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 | |
# Test sequential IO (read and write) and read IOPS | |
# Creates CSV and HTML output | |
# Usegu: ./measure_io.sh [DIRECTORY] | |
CWD=$1 | |
[ $# -lt 1 ] && CWD=$(pwd) | |
ioping -h 2> tmpfile | |
[ $? -ne 0 ] && echo ioping not found--"sudo apt-get install ioping" or download here: https://code.google.com/p/ioping/ && exit 1 | |
rm tmpfile |
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
#!/usr/bin/python | |
''' | |
Read wordpress post and parse out handle and email | |
Uses requests and BeautifulSoup | |
''' | |
import requests | |
from bs4 import BeautifulSoup | |
r = requests.get('http://arlab093.austin.ibm.com/blog/?p=2742') |
OlderNewer