module purge -f
module load apps/git compilers/gcc/4.8.5 apps/buildtools
git clone https://github.com/google/protobuf.git
cd protobuf
export CXXFLAGS='-fPIC'
export CFLAGS='-fPIC'
./configure
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
from ctypes import CDLL | |
from ctypes.util import find_library | |
LIBPAM = CDLL(find_library("pam")) | |
PAM_STRERROR = LIBPAM.pam_strerror |
Compile Bazel 0.3.0
module purge -f
module load compilers/gcc/4.8.5 compilers/java/1.8 apps/buildtools
cd /software6/apps/bazel
wget https://github.com/bazelbuild/bazel/archive/0.3.0.tar.gz
tar xvf 0.3.0.tar.gz
mv {bazel-,}0.3.0
Compile Bazel 0.2.3
module purge -f
module load compilers/gcc/4.8.5 compilers/java/1.8 apps/buildtools
cd /software-gpu/src/
mkdir bazel023_tensorflow0.8
cd bazel023_tensorflow0.8
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 -f | |
#PBS -N apache-spark | |
#PBS -l nodes=2:ppn=8 | |
#PBS -l walltime=00:01:00:00 | |
#PBS -A <specify account> | |
# Define variables | |
SPARK_MASTER="spark://$HOSTNAME:7077" | |
SPARK_HOME=<specify where is spark installed> |
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
from deap import base | |
from deap import creator | |
def hash_ind_list(self): | |
return hash(tuple(self)) | |
creator.create("FitnessMin", base.Fitness, weights=(-1.0,)) | |
creator.create("Individual", list, fitness=creator.FitnessMin, __hash__=hash_ind_list) |
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 numpy | |
from deap import tools | |
logbook1 = tools.Logbook() | |
logbook2 = tools.Logbook() | |
logbook3 = tools.Logbook() | |
# Filling the logbooks [...] |
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
from cpython.mem cimport PyMem_Malloc, PyMem_Free | |
# Declare the few types and functions we need | |
cdef extern from "gsl/gsl_qrng.h": | |
ctypedef struct gsl_qrng | |
ctypedef struct gsl_qrng_type | |
gsl_qrng_type* gsl_qrng_sobol | |
gsl_qrng* gsl_qrng_alloc(gsl_qrng_type* T, unsigned int d) | |
void gsl_qrng_free(gsl_qrng* q) |