Skip to content

Instantly share code, notes, and snippets.

Avatar

damian sanroman alerigi sanromd

View GitHub Profile
@sanromd
sanromd / py_numerics_setup.sh
Created Feb 11, 2021
This script is a work-in-progress. It helps with installing dependencies and # packages for numerical analytics and simulation.
View py_numerics_setup.sh
# This script is a work-in-progress. THe goal is to help others install a
# numerical platform for analytics and simulation.
#
# It will install the libraries needed to work with mpich in python. It also
# compiles OpenBLAS and uses it to build the latest release of numpy and scipy.
# ------------------------------------------------------------------------------ #
# This version uses github and bitbucket sources, alternatively you may select
# non-git sources, supported via wget
# ------------------------------------------------------------------------------ #
# ------------------------------------------------------------------------------ #
View rvn.md

RPL3RjWPgYzZoMjMbySbwXx4H4fkfJodCq

View XMR address
87j1uSVckNxP23dDYqYcg8JgKjuw9n2jR5kn4PhefmUZMwNEHnChMviFtSXQuGA6hz9pBsXVgsHEb3A2BaEnTNojT7Nz6v6
@sanromd
sanromd / hpc_setup.md
Last active Jan 29, 2021
setup an hpc & learning environment using miniconda, openblas, mpich, petsc, and tensorflow
View hpc_setup.md

setting up an hpc environment

preamble

create a sandbox, a place to store sources, compile, and develop

mkdir -p <path to sandbox>\opt\src
@sanromd
sanromd / analytic_wfm.py
Created Apr 15, 2017 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
View analytic_wfm.py
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
View acoustics_3d_scaling_profiler.py
#!/usr/bin/env python
# encoding: utf-8
import numpy as np
from mpi4py import MPI
from petsc4py import PETSc
import os
timeVec1 = PETSc.Vec().createWithArray([0])
timeVec2 = PETSc.Vec().createWithArray([0])
timeVec3 = PETSc.Vec().createWithArray([0])
View q_read_split.py
from clawpack.pyclaw import Solution
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import glob
import os
visdir = './_ntf'
def plane_cut(path='./output',cutplane='z',qn=1,outdir='results',saveq=False,saveplot=False,splitall=False,planecutplot=False):
if not os.path.exists(os.path.join(path,outdir)):
@sanromd
sanromd / acoustics_test_submit
Created Jul 16, 2014
submission script example for Shaheen
View acoustics_test_submit
#!/usr/bin/env bash
#
# @ job_name = test_pyclaw_convergence
# @ job_type = bluegene
# @ output = ./$(job_name)_$(jobid).out
# @ error = ./$(job_name)_$(jobid).err
# @ environment = COPY_ALL;
# @ wall_clock_limit = 24:00:00,24:00:00
# @ notification = always
# @ bg_size = 512
@sanromd
sanromd / pyclaw_profiler.py
Last active Aug 29, 2015
pyclaw_profiler.py
View pyclaw_profiler.py
#!/usr/bin/env python
# This code is originally taken from
# http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/table_demo.py
# It is modified here to generate the required plot.
# This code was originally developed by Amal AlGhamdi
import matplotlib
from matplotlib import pyplot
import os
from pylab import *
@sanromd
sanromd / petscxmf.py
Created Apr 27, 2014
PETSc xmf hyperslab descriptor (in progress)
View petscxmf.py
import sys
import os
from glob import glob
import pickle
def xmdf_write(path,pkl_base='claw.pkl',ptc_base='claw.ptc',xmf_base='claw.meta',debug=False):
pkl_file_name = glob(os.path.join(path,'*.pkl*'))
if debug:
print pkl_file_name