This file contains hidden or 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.batanga.eng.interop | |
import java.util.function.{BiFunction, BiPredicate, Function => JFunction, Predicate => JPredicate} | |
import java.util.stream.{Stream => JStream} | |
import scala.collection.JavaConverters._ | |
/** Interoperability with java functional interfaces and stream api. | |
* Created by f on 10/30/14. | |
*/ |
This file contains hidden or 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
#Contoller configuration | |
#Mon Dec 29 22:50:54 UYST 2014 | |
# ~/Library/Application Support/.ultratron_3.03/controls.txt | |
controller2.button.7=start | |
controller2.button.6=back | |
controller2.button.5=action | |
controller2.button.4=firebutton | |
controller2.axis.4=fireaxis | |
controller2.axis.3=aimX | |
controller2.axis.2=aimY |
This file contains hidden or 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 hidden or 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
f@Motoko:~$ ping google.com | |
PING google.com (200.40.0.90): 56 data bytes | |
Request timeout for icmp_seq 0 | |
64 bytes from 200.40.0.90: icmp_seq=0 ttl=57 time=1632.718 ms | |
64 bytes from 200.40.0.90: icmp_seq=1 ttl=57 time=1169.396 ms | |
64 bytes from 200.40.0.90: icmp_seq=2 ttl=57 time=165.587 ms | |
64 bytes from 200.40.0.90: icmp_seq=3 ttl=57 time=157.983 ms | |
64 bytes from 200.40.0.90: icmp_seq=4 ttl=57 time=81.226 ms | |
64 bytes from 200.40.0.90: icmp_seq=5 ttl=57 time=1147.733 ms | |
64 bytes from 200.40.0.90: icmp_seq=6 ttl=57 time=473.100 ms |
This file contains hidden or 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 util.{Solutions, ScalaMeetupSpec} | |
/** Tests to validate your implementation | |
* | |
*/ | |
class FinancialReaderTest extends ScalaMeetupSpec with Solutions { | |
import FinancialReader._ | |
"Financial" should "for get correct files for a list symbols " in { |
This file contains hidden or 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 scalax.collection | |
import scala.collection.mutable.ListBuffer | |
/** FoldTransformers and the views based on them are a Scala | |
* adaptation, and to some degree an extension, of Rich Hickey's | |
* transducers for Clojure. They show that the concepts can be | |
* implemented in a type-safe way, and that the implementation is | |
* quite beautiful. | |
*/ | |
object FoldingViews { |
This file contains hidden or 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
POST /logstash-batanga-*/_search?search_type=count | |
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": { | |
"and": { | |
"filters": [ |
This file contains hidden or 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
POST /logstash-batanga-*/_search?search_type=count | |
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": { | |
"exists": { | |
"field": "btng.elapsedtime" |
This file contains hidden or 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
POST _search | |
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": {} | |
} | |
} |
This file contains hidden or 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 spark.SparkContext | |
import SparkContext._ | |
/** | |
* A port of [[http://blog.echen.me/2012/02/09/movie-recommendations-and-more-via-mapreduce-and-scalding/]] | |
* to Spark. | |
* Uses movie ratings data from MovieLens 100k dataset found at [[http://www.grouplens.org/node/73]] | |
*/ | |
object MovieSimilarities { |