Skip to content

Instantly share code, notes, and snippets.

@ceteri
ceteri / vagrant.sh
Created Jul 14, 2014
Getting started with Vagrant + IPython notebook for Just Enough Math tutorial
View vagrant.sh
vagrant up
vagrant ssh
cd jem
nbserver
View 0.textrank_init.py
import nltk
nltk.download()
## use nltk.download() within a Python prompt to
## download the `punkt` data
## Anaconda is recommended, to pick up NumPy, NLTK, etc.
## http://continuum.io/downloads
## this also requires TextBlob/PerceptronTagger
@ceteri
ceteri / multitool.wordcount
Created May 14, 2012
Word Count app run in Multitool
View multitool.wordcount
12/05/14 14:42:57 INFO multitool.Main: key: source
12/05/14 14:42:58 INFO multitool.Main: key: expr
12/05/14 14:42:58 INFO multitool.Main: key: gen
12/05/14 14:42:58 INFO multitool.Main: key: group
12/05/14 14:42:58 INFO multitool.Main: key: count
12/05/14 14:42:58 INFO multitool.Main: key: group
12/05/14 14:42:58 INFO multitool.Main: key: sink
12/05/14 14:43:01 INFO util.HadoopUtil: resolving application jar from found main method on: multitool.Main
12/05/14 14:43:01 INFO planner.HadoopPlanner: using application jar: /Users/paco/src/concur/cascading.multitool/./build/multitool.jar
12/05/14 14:43:01 INFO property.AppProps: using app.id: 1C9D0188E5018B980067AAC12AE43BBA
@ceteri
ceteri / mailchimp slice
Created May 25, 2012
WPE workaround for contacts
View mailchimp slice
<!-- Begin MailChimp Signup Form -->
<link href="http://cdn-images.mailchimp.com/embedcode/classic-081711.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
/* #mc_embed_signup { max-width: 50em; } */
#mc_embed_signup .mc-field-group { min-height: 1em; padding-bottom: 1em; max-width: 50em; }
</style>
<div id="mc_embed_signup">
View gist:2871273
#!/bin/bash
set -e -x
# Usage:
# --user-home - an alternative user to install into, default /home/hadoop
# --tmpdir - an alternative temporary directory, default TMPDIR or /tmp if not set
# --no-screen - do not install screen, screen is installed by default on the master as a convenience
# --latest - url to text file referencing the latest version
# --no-bash - do not update .bashrc
@ceteri
ceteri / Main.java
Created Jun 11, 2012
Cascading for the Impatient, Part 1
View Main.java
public class
Main
{
public static void
main( String[] args )
{
String inPath = args[ 0 ];
String outPath = args[ 1 ];
Properties properties = new Properties();
@ceteri
ceteri / EMR log
Created Jun 18, 2012
Cascading Sample Recommender
View EMR log
bash-3.2$ elastic-mapreduce --create --name "Sample Recommender" \
> --jar s3n://temp.cascading.org/sample/recommender.jar \
> --arg s3n://temp.cascading.org/sample/en.stop \
> --arg s3n://temp.cascading.org/sample/tweets/ \
> --arg s3n://temp.cascading.org/sample/out/token \
> --arg s3n://temp.cascading.org/sample/out/similarity
Created job flow j-2HA2BVCBJGMVX
bash-3.2$ elastic-mapreduce --list
j-2HA2BVCBJGMVX STARTING Sample Recommender
PENDING Example Jar Step
@ceteri
ceteri / Main.java
Created Jun 29, 2012
Cascading for the Impatient, Part 2
View Main.java
public class
Main
{
public static void
main( String[] args )
{
String docPath = args[ 0 ];
String wcPath = args[ 1 ];
Properties properties = new Properties();
@ceteri
ceteri / Main.java
Created Jun 30, 2012
Cascading for the Impatient, Part 3
View Main.java
public class
Main
{
public static void
main( String[] args )
{
String docPath = args[ 0 ];
String wcPath = args[ 1 ];
Properties properties = new Properties();
@ceteri
ceteri / Main.java
Last active Oct 6, 2015
Cascading for the Impatient, Part 4
View Main.java
public class
Main
{
public static void
main( String[] args )
{
String docPath = args[ 0 ];
String wcPath = args[ 1 ];
String stopPath = args[ 2 ];