You want to use Jupyter remotely. X11 forwarding is too slow for this.
SSH port forwarding!
| pub struct EdgeTableRow { | |
| pub id: EdgeId, | |
| pub left: Position, | |
| pub right: Position, | |
| pub parent: NodeId, | |
| pub child: NodeId, | |
| pub metadata: Option<Vec<u8>>, | |
| } |
| import demes | |
| import demesdraw | |
| import matplotlib.pyplot as plt | |
| import msprime | |
| import numpy as np | |
| import tskit | |
| dmodel = """ | |
| time_units: generations | |
| demes: |
| import sqlite3 | |
| import pickle | |
| import codecs | |
| x = {'a':1,2:'b'} | |
| xp = pickle.dumps(x, -1) | |
| xps = codecs.encode(xp, "base64").decode() | |
| print(xps,type(xps),len(xps)) | |
| with sqlite3.connect("test.db") as conn: |
| // Usage: | |
| // c++ -std=c++11 -o order order.cc | |
| // ./order | |
| // | |
| // A "standard library*"-like implementation of R's order. | |
| // To back-port this to C++98, one would need to | |
| // replace the lambda closures with functors. But there's no need | |
| // to do such silliness anymore. | |
| // | |
| // The implementation is in terms of sorting iterators and then |
| # Test code writing fwdpy11 | |
| # pop data to hdf5 via PyTables. | |
| # GOAL IS COMPRESSION!!!! | |
| # Instead of using ragged arrays | |
| # (not compressable), we use carrays, | |
| # and simply concacenate gamete data. | |
| # In longer-term, this would be | |
| # abstracted into some sort of GameteTable | |
| # class that interacts with an hdf5 object. |
| #!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 |
| library(Rcpp) | |
| Sys.setenv("PKG_CXXFLAGS" = "-std=c++11") | |
| sourceCpp("tuple.cc",verbose=TRUE) |
| #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"); |
| ////////////////////////////////////////////////////////////////// | |
| // // | |
| // 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 // | |
| // // | |
| ////////////////////////////////////////////////////////////////// |