Skip to content

Instantly share code, notes, and snippets.

View linearregression's full-sized avatar

edwardttril linearregression

  • San Francisco Bay Area, CA
View GitHub Profile
This is a quick sample on how I have used websocket_client to test Erlang WebSocket-based applications. To
taste it you will need to have a copy of websocket_client from my fork, available at:
https://github.com/leandrosilva/erlang_websocket/blob/master/src/websocket_client.erl
The websocket_client module was made by Dave Bryson on erlang_websocket project:
https://github.com/davebryson/erlang_websocket
Enjoy!
-module(et).
% $ erl -make ; erl -sname eu -noshell -eval 'eunit:test(".", []).' -s init stop
-include_lib("eunit/include/eunit.hrl").
pattern1_test_no()->
{inparallel,
[
{setup, local,
  1. General Background and Overview
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
//==================================================================
// SPARK INSTRUMENTATION
//==================================================================
import com.codahale.metrics.{MetricRegistry, Meter, Gauge}
import org.apache.spark.{SparkEnv, Accumulator}
import org.apache.spark.metrics.source.Source
import org.joda.time.DateTime
import scala.collection.mutable
# alteRyx_install_packages.R
# > code to install packages via R Developer tool in Alteryx(R) module
# > note call to custom Alteryx-R function wrte.Alteryx()
altx.repo <- getOption("repos")
altx.repo["CRAN"] <- "http://cran.rstudio.com" # set your primary repo if you haven't already
options(repos = altx.repo)
#write.Alteryx(getOption("repos"), 1) # DEBUG
install.packages("XML")
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown)
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96.
This combination of tools provides an exciting improvement in usability for
[reproducible analysis](http://stats.stackexchange.com/a/15006/183).
Specifically, this post
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96;
(2) provides a basic example of producing console output and plots using R Markdown;
(3) highlights several code chunk options such as caching and controlling how input and output is displayed;
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and
(5) discusses the implications of R Markdown.

On master node

wget http://archive.cloudera.com/cdh5/one-click-install/redhat/6/x86_64/cloudera-cdh-5-0.x86_64.rpm
sudo yum --nogpgcheck localinstall cloudera-cdh-5-0.x86_64.rpm
sudo yum clean all
sudo yum install hadoop-hdfs-namenode
sudo yum install R git
sudo yum install spark-core spark-master spark-python

cd
  1. General Background and Overview
@linearregression
linearregression / xvfb
Last active August 29, 2015 14:13 — forked from jterrace/xvfb
XVFB=/usr/bin/Xvfb
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset"
PIDFILE=/var/run/xvfb.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)