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/sh | |
export IPYTHON_OPTS="notebook --profile=yannis_spark" | |
unset SPARK_JAVA_OPTS | |
export SPARK_DAEMON_JAVA_OPTS="\ | |
-Dspark.default.parallelism=128 \ | |
-Dspark.cores.max=32 \ | |
-Dspark.worker.timeout=500 \ |
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 rlcompleter, readline | |
readline.parse_and_bind('tab: complete') |
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
#ifdef _MSC_VER | |
# include <intrin.h> | |
# define CAS(ptr, oldval, newval) \ | |
_InterlockedCompareExchange(ptr, newval, oldval) | |
#elif __GNUC__ | |
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) | |
# error "requires GCC 4.1 or greater" | |
# endif | |
# define CAS(ptr, oldval, newval) \ | |
__sync_val_compare_and_swap(ptr, oldval, newval) |
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
#include <time.h> | |
clock_t start, end; | |
double elapsed; | |
start = clock(); | |
... /* Do the work. */ | |
end = clock(); | |
elapsed = ((double) (end - start)) / CLOCKS_PER_SEC; |
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
\begin{algorithm}[tb] | |
\caption{Bubble Sort} | |
\label{alg:example} | |
\begin{algorithmic} | |
\STATE {\bfseries Input:} data $x_i$, size $m$ | |
\REPEAT | |
\STATE Initialize $noChange = true$. | |
\FOR{$i=1$ {\bfseries to} $m-1$} | |
\IF{$x_i > x_{i+1}$} | |
\STATE Swap $x_i$ and $x_{i+1}$ |
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
\begin{table}[t] | |
\caption{Classification accuracies for naive Bayes and flexible | |
Bayes on various data sets.} | |
\label{sample-table} | |
\vskip 0.15in | |
\begin{center} | |
\begin{small} | |
\begin{sc} | |
\begin{tabular}{lcccr} | |
\hline |
OlderNewer