You want to use Jupyter remotely. X11 forwarding is too slow for this.
SSH port forwarding!
/* | |
A function to check that a file both exists and is in .gz format. | |
It is done the easy way, using only C++ constructs instead of any lower-level calls | |
Requires the boost iostreams library | |
Programs compiled using this function need -lboost_iostreams | |
*/ |
/* | |
Example of how to write binary stuff in C++ | |
Illustrates some of the various quirks/annoyances | |
*/ | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> |
#!sh | |
#Must be executed with bash shell. | |
#If sh bwapetrick1.sh fails, then say bash bwapetrick1.sh | |
#bwa 0.7.5a-r405 | |
#samtools 0.1.19 | |
LEFTREADS=NY42_06_21_2010_54_1.fastq.gz | |
RIGHTREADS=NY42_06_21_2010_54_2.fastq.gz |
/* | |
sizeof(iterator) and sizeof(pointer) are the same. | |
They also act the same vis-a-vis dereferencing. | |
But, they do not act the same with respect to traversal of a range | |
Note that this example forces iterator and pointer invalidation to occur. | |
Thus, the specifics of the output may vary with the optimization level | |
used to compile. On OS X Mavericks, -O2 provides cleaner output |
//g++ -o readbgz readbgz.cc -lboost_iostreams -lz | |
#include <boost/iostreams/filtering_stream.hpp> | |
#include <boost/iostreams/device/file.hpp> | |
#include <boost/iostreams/filter/gzip.hpp> | |
#include <iostream> | |
#include <fstream> | |
#include <cstdlib> | |
#include <vector> |
////////////////////////////////////////////////////////////////// | |
// // | |
// PLINK (c) 2005-2008 Shaun Purcell // | |
// // | |
// This file is distributed under the GNU General Public // | |
// License, Version 2. Please see the file COPYING for more // | |
// details // | |
// // | |
////////////////////////////////////////////////////////////////// |
#include <boost/interprocess/sync/file_lock.hpp> | |
#include <boost/interprocess/sync/scoped_lock.hpp> | |
#include <fstream> | |
int main( int argc, char ** argv ) | |
{ | |
std::ofstream o("monkey.txt",std::ios_base::app); | |
boost::interprocess::file_lock ol("monkey.txt"); |
library(Rcpp) | |
Sys.setenv("PKG_CXXFLAGS" = "-std=c++11") | |
sourceCpp("tuple.cc",verbose=TRUE) |
#!sh | |
##collect the simulation results. This may have to be run as 'bash collate.sh' on some systems | |
echo "Simulation L time mem" > results.txt | |
paste <(find . -name "*.time" -type f ! -size 0 | sed 's/\.\///' | cut -d"." -f 1,2 | sed 's/\./ /') <(find . -name "*.time" -type f ! -size 0 | xargs cat) | sort -n -k 2,3 >> results.txt |