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
/* | |
* This is the Towers of Hanoi example from the prolog tutorial [1] | |
* converted into Scala, using implicits to unfold the algorithm at | |
* compile-time. | |
* | |
* [1] http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_3.html | |
*/ | |
object TowersOfHanoi { | |
import scala.reflect.Manifest |
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.util.Properties | |
import kafka.server.KafkaServer | |
import kafka.server.KafkaConfig | |
import kafka.producer.ProducerConfig | |
import kafka.producer.Producer | |
import kafka.message.Message | |
import kafka.producer.ProducerData | |
import kafka.consumer.ConsumerConfig | |
import kafka.consumer.Consumer | |
import kafka.utils.Utils |
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
/* | |
* This code snippet will help break Blob Leases in Windows Azure Storage. | |
* | |
* I did not write this code, it was found at the website below. | |
* | |
* @see http://blogs.msdn.com/b/interoperability/archive/2012/08/01/node-js-script-for-releasing-a-windows-azure-blob-lease.aspx | |
*/ | |
// updated 3/3/2014 for latest version of Azure CLI | |
// Import required modules from Windows Azure Cross Platform Tool's library |
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
//================================================================== | |
// SPARK INSTRUMENTATION | |
//================================================================== | |
import com.codahale.metrics.{MetricRegistry, Meter, Gauge} | |
import org.apache.spark.{SparkEnv, Accumulator} | |
import org.apache.spark.metrics.source.Source | |
import org.joda.time.DateTime | |
import scala.collection.mutable |