Skip to content

Instantly share code, notes, and snippets.

View asimjalis's full-sized avatar

Asim Jalis asimjalis

View GitHub Profile
# Build and run then open browser to http://localhost:9000/hello.html.
# Then open browser console. It has an error message like this:
# Uncaught TypeError: Cannot read property 'Jf' of undefined hello.js:6587
# Also the REPL hangs.
# If I replace :advanced with :whitespace in project.clj then the browser
# console reports no errors. Also the REPL works fine.
# Make test directory.
mkdir -p $HOME/tmp/cljs-test
@asimjalis
asimjalis / README.md
Last active August 29, 2015 14:19
R bar plots for time series of HBase region server writes

Region Server Writes

Uses R to create bar plots of region server writes.

Steps

  1. Save the sample data into ~/tmp/region-data.csv

  2. Install R and start R console

import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.crunch.DoFn;
import org.apache.crunch.Emitter;
import org.apache.crunch.PipelineResult;
import org.apache.crunch.io.From;
import org.apache.crunch.io.To;
import org.apache.crunch.types.writable.Writables;
import org.apache.crunch.util.CrunchTool;
; Note: This script requires lein exec
; Follow instructions for installing lein and lein-exec
; Then run this as lein exec snipr.clj FILE.md
(require '[clojure.string :as str])
(require '[clojure.java.io :as io])
(defn load-script [script]
(load-file
(->> [(System/getenv "HOME") "Dropbox" "Env" "clj" script] (str/join "/"))))
@asimjalis
asimjalis / spark-mllib-twitter.scala
Created January 27, 2016 21:52
Spark MLlib Twitter Quickstart
// Load tweets.
import scala.util.control.Breaks._
import scala.collection.JavaConversions._
import twitter4j.{Twitter,Query,TwitterFactory}
val twitter = TwitterFactory.getSingleton
val query = new twitter4j.Query("lang:en")
query.setCount(100)
query.setSince("2016-01-13")
@asimjalis
asimjalis / Spark Neural Network.ipynb
Created February 18, 2016 23:44
Spark Scala example of creating and using Neural Networks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Data Science Workshop

Moved to

#!/bin/sh
# vim: filetype=sh
## Init.
# Define variables.
source_bucket=asimj-lambda-test
lambda_name=helloworld
lambda_execution_role_name=lambda-${lambda_name}-execution

This is a test.