This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.Properties; | |
import kafka.server.KafkaConfig; | |
import kafka.server.KafkaServerStartable; | |
public class KafkaLocal { | |
public KafkaServerStartable kafka; | |
public ZooKeeperLocal zookeeper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.datastax.spark.demo; | |
import com.datastax.driver.core.Session; | |
import com.datastax.spark.connector.cql.CassandraConnector; | |
import com.google.common.base.Optional; | |
import org.apache.spark.SparkConf; | |
import org.apache.spark.api.java.JavaPairRDD; | |
import org.apache.spark.api.java.JavaRDD; | |
import org.apache.spark.api.java.JavaSparkContext; | |
import org.apache.spark.api.java.function.FlatMapFunction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package thunder.streaming | |
import org.apache.spark.{SparkConf, Logging} | |
import org.apache.spark.rdd.RDD | |
import org.apache.spark.SparkContext._ | |
import org.apache.spark.streaming._ | |
import org.apache.spark.streaming.dstream.DStream | |
import org.apache.spark.mllib.clustering.KMeansModel | |
import scala.util.Random.nextDouble |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(recommenderlab) # Install this if you don't have it already | |
require(devtools) # Install this if you don't have this already | |
# Get additional recommendation algorithms | |
install_github("sanealytics", "recommenderlabrats") | |
data(MovieLense) # Get data | |
# Divvy it up | |
scheme <- evaluationScheme(MovieLense, method = "split", train = .9, | |
k = 1, given = 10, goodRating = 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.spark.mllib.linalg.distributed.RowMatrix | |
import org.apache.spark.mllib.linalg._ | |
import org.apache.spark.{SparkConf, SparkContext} | |
// To use the latest sparse SVD implementation, please build your spark-assembly after this | |
// change: https://github.com/apache/spark/pull/1378 | |
// Input tsv with 3 fields: rowIndex(Long), columnIndex(Long), weight(Double), indices start with 0 | |
// Assume the number of rows is larger than the number of columns, and the number of columns is | |
// smaller than Int.MaxValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project(GraphLab) | |
add_executable(lp labelprop.cpp) |