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
alias rsync="rsync -h -v -r -P -t" |
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 | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.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
mpirun -n 2 /opt/X11/bin/xterm -hold -e lldb -o run -ex ex1 -- inpfile |
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
mpiexec -n 4 valgrind --tool=memcheck -q --num-callers=20 --track-origins=yes --log-file=valgrind.log.%p --dsymutil=yes ./ex1 -malloc off inpfile |
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
1. open-mpi | |
I. use --with-tm=no | |
II. export CXX,CC,GCC with the correct gcc path | |
2. boost | |
I. give the correct path for CXX,MPICXX | |
II. using mpi in the project-*.jam file | |
III. use ldd to verify that the correct libraries are being used | |
IV. otherwise change LD_LIBRARY_PATH to point to the correct libraries | |
V. one must also use this to invoke b2: ./b2 install --user-config=user-config.jam --with-filesystem --with-system -j4 --with-mpi --with-program_options --with-serialization stage | |
3. Block |
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
#!/usr/bin/env python | |
import numpy | |
from numpy import linalg as LA | |
print "numpy version=",numpy.version.version | |
# set up the Heisenberg hamiltonian for interaction between two spins S=5/2 and S=3/2 spins | |
array = numpy.zeros((4,4)) |
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
awk '/[0-9]+\.[0-9]*/ { print }' |
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 | |
#git log --stat --decorate --oneline | awk '$5 ~"insertions" {COUNT++;print COUNT,$4,$4-$6} $2 ~ "origin" {print $2; }' >/tmp/additions | |
git log --stat --decorate --oneline | awk '$5 ~"insertions" {COUNT++;print COUNT,$4,$4-$6}' >/tmp/additions | |
gnuplot<<EOF | |
set terminal dumb | |
set multiplot | |
plot 'additions' u 1:2 with lines lt 1 | |
exit | |
EOF |
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
hu[n_]:=t*(AdjacencyMatrix@CycleGraph[n]-SparseArray[{{1,n}->1,{n,1}->1}]); | |
hu[5]//MatrixForm |
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
Nest[Transpose@DeleteCases[#, {(0 | 0.) ..}] &, m, 2] | |
(* | |
Remove 0 and 0. columns and rows from a given matrix and reduce the size to contain only non-zero rows and columns | |
*) |
NewerOlder