https://github.com/ueshin/docker
$ docker run -it -p 14040:4040 spark:1.1.0-rc4
package cassandra; | |
import java.util.Iterator; | |
import com.netflix.astyanax.ColumnListMutation; | |
import com.netflix.astyanax.serializers.AsciiSerializer; | |
import com.netflix.astyanax.serializers.LongSerializer; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
curl -XDELETE 'http://localhost:9200/media' | |
curl -XPUT 'http://localhost:9200/media' -d' | |
{ | |
"mappings": { | |
"movie": { | |
"properties": { | |
"genre": { | |
"type": "string", | |
"analyzer": "keyword" |
#!/bin/bash | |
# To use: | |
# wget https://gist.githubusercontent.com/indapublic/11370314/raw/7cf3d956a02d90679988a1f1ca660104ec8e1fbc/amazon-install-redis.sh | |
# chmod 777 amazon-install-redis.sh | |
# ./amazon-install-redis.sh | |
############################################### | |
echo "*****************************************" | |
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" | |
echo "*****************************************" | |
#sudo yum -y update |
import org.apache.spark._ | |
import org.apache.spark.SparkContext._ | |
import org.json4s.jackson.JsonMethods | |
import org.json4s.jackson.JsonMethods._ | |
import org.json4s.JsonAST._ | |
object UserInterestsExample { | |
def main(args: Array[String]): Unit = { | |
val sc = new SparkContext("local[8]", "UserInterestsExample") |
https://github.com/ueshin/docker
$ docker run -it -p 14040:4040 spark:1.1.0-rc4
2014-03-04 | 15dfb8e6cc4111e3a5bb600308919594 | 11 | |
---|---|---|---|
2014-03-06 | 81da510acc4111e387f3600308919594 | 61 |
A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)
I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.
A functor is something that supports map
.
<?xml version="1.0" encoding="UTF-8" ?> | |
<schema name="wikipedia" version="1.2"> | |
<types> | |
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> | |
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> | |
<fieldType name="text" class="solr.TextField" positionIncrementGap="100"> | |
<analyzer type="index"> | |
<tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="1"/> |
<?php | |
$a[] = array( | |
"name" => "emre", | |
"price" => 99, | |
); | |
$a[] = array( | |
"name" => "ali", | |
"price" => 15, |