I hereby claim:
- I am purukaushik on github.
- I am purush (https://keybase.io/purush) on keybase.
- I have a public key whose fingerprint is B732 7660 14DD EBD6 D44E 0712 008E C779 98DA BE90
To claim this, I am signing this object:
object AbInitio { | |
def map[T,U](f : T => U, xs: List[T]): List[U] ={ | |
def helper(acc: List[U], xs1: List[T]):List[U] = { | |
if(xs1.isEmpty) acc | |
else helper(acc :+ f(xs1.head), xs1.tail) | |
} | |
helper(List[U](), xs) | |
} | |
def filter[T](f: T => Boolean, xs: List[T]):List[T] = { | |
def helper(acc: List[T], xs1: List[T]): List[T] = { |
(defn map | |
"(map f coll) takes a function f and applies it to each element in coll and returns a collection" | |
([f coll] (map f coll [])) | |
([f coll acc] | |
(if (empty? coll) | |
acc | |
(map f (rest coll) (cons (f (first coll)) acc))))) | |
(defn filter | |
"(filter f coll) takes a function f that computes a predicate condition on each element in coll and filtered collection is returned" |
I hereby claim:
To claim this, I am signing this object:
(ns clojure-noob.prime | |
(:require [clojure.string :as string]) | |
(:gen-class)) | |
(defn N-stream [] | |
(defn from | |
[n] | |
(cons n (lazy-seq (from (inc n))))) | |
(from 1)) | |
(take 1000 (N-stream)) |
package io.purush.hadoop.giscup.script; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStreamWriter; | |
import java.io.PrintWriter; | |
public class Main { | |
private static int totalchars = 0, offset = 0; | |
private static InputStream stream; |
Download Hadoop and install.
Setup $HADOOP_HOME
Install openssh-server
and run
sudo /etc/init.d/ssh restart
Check if ssh is running on port 22 by:
netstat -tupln | grep 22
Steps to setup a local docker swarm cluster with Docker Machine, swarm.
1. docker-machine create -d virtualbox local
2. eval "$(docker-machine env local)"
3. docker run swarm create
install findspark ( pip install -e . after cloning https://github.com/minrk/findspark, and cd findspark)
fire a notebook (jupyter notebook)
enter the following:
import findspark
import os
findspark.init()