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 breeze.linalg._ | |
import breeze.stats._ | |
import scala.math.sqrt | |
/** | |
* Effecient for sparse vectors. Scales in O(activeSize) | |
*/ | |
// Must take SparseVector, for implicits to be linked correctly | |
def pearson(a: SparseVector[Double], b: SparseVector[Double]): Double = { |
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
#!/bin/bash | |
echo "SPARK_WORKER_DIR=/tmp/sparktest/file/" > $SPARK_HOME/conf/spark-env.sh | |
#echo "" > $SPARK_HOME/conf/spark-env.sh | |
LOCAL_HOSTNAME=`hostname` | |
$SPARK_HOME/sbin/start-master.sh | |
echo "sleeping for 10 s" | |
sleep 10 |