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 | |
WhatThisIS=""" | |
This is a hacked together script to connect to all of your running EC2 instances, and to provide a single SSH prompt amongst all of them, and to assist in uploading, splitting, and downloading files. email me at winniningham at and email server called gmail.com :P | |
""" | |
import paramiko | |
from numpy import * |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JRuby IRB</title> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
.code {font-family: "Courier New", Courier, mono;} | |
</style> | |
</head> | |
<body> |
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
estimatePi <- function(numDraws){ | |
r <- .5 #radius... in case the unit circle is too boring | |
x <- runif(numDraws, min=-r, max=r) | |
y <- runif(numDraws, min=-r, max=r) | |
inCircle <- ifelse( (x^2 + y^2)^.5 < r , 1, 0) | |
return(sum(inCircle) / length(inCircle) * 4) | |
} |
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
require 'java' | |
require 'twitter4j-core-2.1.8-SNAPSHOT.jar' | |
include_class 'twitter4j.TwitterFactory' | |
include_class 'twitter4j.http.AccessToken' | |
ck = "XXX" | |
cs = "XXX" | |
ak = "XXX" | |
as = "XXX" |
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
0% jruby -rubygems trouble/twitter/twitter4j.rb | |
Rehearsal ----------------------------------------------- | |
twitter gem 5.856000 0.000000 5.856000 ( 5.856000) | |
rubytter 5.844000 0.000000 5.844000 ( 5.845000) | |
twitter4j 1.730000 0.000000 1.730000 ( 1.730000) | |
------------------------------------- total: 13.430000sec | |
user system total real | |
twitter gem 4.850000 0.000000 4.850000 ( 4.850000) | |
rubytter 5.110000 0.000000 5.110000 ( 5.111000) |
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
FASTQC_VERSION=0.4.3 | |
SRCDIR=/usr/local/src/ | |
cd $SRCDIR && mkdir -p fastqc && cd fastqc | |
wget http://www.bioinformatics.bbsrc.ac.uk/projects/fastqc/fastqc_v${FASTQC_VERSION}.zip | |
unzip fastqc_v${FASTQC_VERSION}.zip | |
cd FastQC && chmod a+x fastqc |
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/env python | |
# encoding: utf-8 | |
""" | |
parse_delicious_xml.py | |
First download your bookmarks and restrict to specific tags if desired: | |
$ curl --user 'username':'password' -o delicious.xml 'https://api.del.icio.us/v1/posts/all' | |
Extract and count most common domains: |
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
diff -Naur ../tmp/hadoop-0.20.1+169.68/src/contrib/cloud/src/py/hadoop/cloud/cli.py src/hadoop/src/contrib/cloud/src/py/hadoop/cloud/cli.py | |
--- ../tmp/hadoop-0.20.1+169.68/src/contrib/cloud/src/py/hadoop/cloud/cli.py 2010-03-18 17:29:55.000000000 -0700 | |
+++ src/hadoop/src/contrib/cloud/src/py/hadoop/cloud/cli.py 2010-05-17 15:00:26.000000000 -0700 | |
@@ -292,7 +292,7 @@ | |
opt.get('public_key'), opt.get('user_data_file'), | |
opt.get('availability_zone'), opt.get('user_packages'), | |
opt.get('auto_shutdown'), opt.get('env'), | |
- opt.get('security_group')) | |
+ opt.get('security_group'), opt.get('spot_price')) | |
service.launch_master(template, config_dir, opt.get('client_cidr')) |
You are most likely to get good help with your R problem if you provide a reproducible example. A reproducible example allows someone else to recreate your problem by just copying and pasting R code.
There are four things you need to include to make your example reproducible: required packages, data, code, and a description of your R environment.
-
Packages should be loaded at the top of the script, so it's easy to see which ones the example needs.
-
The easiest way to include data in an email is to use dput() to generate