Skip to content

Instantly share code, notes, and snippets.

@jmansour
jmansour / Dockerfile
Last active August 14, 2019 00:04
Polygon Rotations via Python in Underworld2
FROM underworldcode/underworld2:2.8.0b
COPY PolygonRotations.ipynb $NB_WORK
@jmansour
jmansour / Movable Circle.ipynb
Created August 25, 2017 04:22
Movable Circle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmansour
jmansour / usage_metrics_gpu.py
Last active February 4, 2018 22:09
This script extracts basic gpu usage metrics from data generated by nvidia-smi
#!/usr/bin/env python
# This script simply extracts some metrics from runtime gpu utilisation data
# This data is generated using:
# $ nvidia-smi --query-gpu=index,utilization.gpu,utilization.memory,memory.total,memory.free,memory.used --format=csv,nounits -l 10 > gpu-${SLURM_JOBID}.out
import numpy as np
import sys
try:
@jmansour
jmansour / weighted residual.ipynb
Created November 29, 2017 05:19
Weighted residual projection failings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmansour
jmansour / Jupyter kernel via containerised Python environment
Last active March 12, 2019 00:00
Jupyter kernel via containerised Python environment
Empty file just for gist title
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~##
## ##
## This file forms part of the Underworld geophysics modelling application. ##
## ##
## For full license and copyright information, please refer to the LICENSE.md file ##
## located at the project root, or contact the authors. ##
## ##
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~##
import underworld as uw
import underworld._stgermain as _stgermain
FROM underworldcode/underworld2:2.7.1b
COPY dual_system.ipynb $NB_WORK
@jmansour
jmansour / Dockerfile
Last active December 3, 2019 02:11
UW28 blog post dockerfile
FROM underworldcode/underworld2:2.8.1b
RUN git clone https://gist.github.com/jmansour/44de4b2e091f2235289e23785bcc3809 demo1
RUN git clone https://gist.github.com/jmansour/d2207371b0a0fc7ed26a7ca720ad8c6f demo2
RUN git clone https://gist.github.com/julesghub/cceef885ff00694edb8f217130dd211b demo3
@jmansour
jmansour / demo.ipynb
Created August 9, 2019 04:54
UW28 blog post demo1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.