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
| /* | |
| * Example: spy("foobar.ppm", A); | |
| */ | |
| int spy(std::string const& ppmfile, arma::mat const& M) { | |
| ofstream ofs(ppmfile); | |
| if (!ofs.is_open()) | |
| return -1; | |
| ofs << "P3\n" << M.n_rows << " " << M.n_cols << "\n1\n"; |
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 <cstdlib> | |
| #include <iostream> | |
| #include <SuiteSparseQR.hpp> | |
| int main(int argc, char* argv[]) { | |
| cholmod_common common; | |
| cholmod_sparse *A; | |
| cholmod_dense *x, *b, *residual; |
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
| This file goes in /usr/lib/gnome-flashback/ | |
| #! /bin/sh | |
| exec gnome-session --session=gnome-flashback-stumpwm --disable-acceleration-check "$@" |
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
| .text | |
| .align 4,0x90 | |
| .globl __Z21matrix_vector_productPKdPd | |
| __Z21matrix_vector_productPKdPd: | |
| LFB18: | |
| movsd (%rdi), %xmm0 | |
| movsd 8(%rdi), %xmm4 | |
| movapd %xmm0, %xmm5 | |
| movsd 16(%rdi), %xmm3 | |
| mulsd %xmm0, %xmm5 |
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
| .text | |
| .align 4,0x90 | |
| .globl __Z21matrix_vector_productPKdPd | |
| __Z21matrix_vector_productPKdPd: | |
| LFB18: | |
| vmovsd 8(%rdi), %xmm2 | |
| vmovsd (%rdi), %xmm1 | |
| vmulsd %xmm2, %xmm2, %xmm3 | |
| vmovsd 16(%rdi), %xmm0 | |
| vmovsd 32(%rdi), %xmm6 |
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 | |
| sbcl --eval "(ql:quickload '(:swank :cl-mpi))" \ | |
| --eval "(defun toplevel () \ | |
| (push #'mpi:mpi-finalize *exit-hooks*) \ | |
| (mpi:mpi-init) \ | |
| (let ((port (+ swank::default-server-port (mpi:mpi-comm-rank)))) \ | |
| (swank:create-server :port port :dont-close t)) \ | |
| (sb-impl::toplevel-init))" \ | |
| --eval "(save-lisp-and-die \"mpisbcl\" :executable t :toplevel #'toplevel)" |
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
| ;;; StumpWM initialization file. | |
| (ql:quickload "swank") | |
| (in-package :stumpwm) | |
| (setf *window-border-style* :none | |
| *resize-hides-windows* nil) | |
| ;;; Redirect output to ~/.stumpwm.d/stumpwm.log |
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
| reset | |
| load '~/gnuplot-colorbrewer/qualitative/Set2.plt' # Optional | |
| set terminal push | |
| set terminal epslatex size 3.22in, 2.255in | |
| set output "fig-example.tex" | |
| unset key | |
| set border 3 |
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 as np | |
| import mdtraj as md | |
| import tqdm | |
| def compute_distance_matrix(trajectory: md.Trajectory) -> np.ndarray: | |
| """Compute distance matrix. | |
| """ | |
| topology = trajectory.topology |
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 typing import Tuple | |
| import numpy as np | |
| import scipy.spatial | |
| DEFAULT_NUM_EIGENPAIRS: int = 10 + 1 | |
| def diffusion_maps(points: np.ndarray, epsilon2: float, |