Skip to content

Instantly share code, notes, and snippets.

View AndiH's full-sized avatar
🤖
q|^_^|p

Andreas Herten AndiH

🤖
q|^_^|p
View GitHub Profile
@AndiH
AndiH / fauxshell.tex
Created August 23, 2017 08:56
LaTeX Fauxshell
% See: https://tex.stackexchange.com/a/387460/56326
% \usepackage[minted]{tcolorbox}
% \tcbuselibrary{skins}
\definecolor{topbar}{RGB}{220,220,220}
\definecolor{main}{RGB}{30,30,30}
\definecolor{quit}{RGB}{248,73,73}
\definecolor{min}{RGB}{252,182,37}
\definecolor{max}{RGB}{41,198,52}
\colorlet{offwhite}{white!96!black}
\newtcblisting{fauxshell}{%
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndiH
AndiH / tikz-arrows.pdf
Last active August 25, 2025 06:25
TikZ Arrow Tip Overview
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndiH
AndiH / simplecounter.py
Last active September 25, 2018 12:40
Python Simple Counter (decorator; explicit function call)
# import inspect
from __future__ import print_function
class Counter(object):
"""Simple counter, counting an invocation my means of a string (explicit call) or function name (decorator)"""
counters = {}
def __init__(self, *args, **kwargs):
"""Construct class. First, check if class is called via a decorator or directly. If true, defer incrementing counter until wrapped function is actually called (see __call__). If false, increment counter now."""
if callable(args[0]):
#!/bin/bash
# This file sets the environment variable CUDA_VISIBLE_DEVICES to the MPI local rank to enable multi-GPU usage of this benchmark. Note that this disables any GPU distribution handling by he batch scheduler.
# Background: Most/some batch schedulers set CUDA_VISIBLE_DEVICES to all available GPUs on a node. In that case, the Arbor benchmark would only use the first entry in the list, probably GPU#0. This script changes that.
# -Andreas Herten, Nov 2018
_verbose=1
localrank=$CUDA_VISIBLE_DEVICES
if [[ -n "$OMPI_COMM_WORLD_NODE_RANK" ]]; then
@AndiH
AndiH / 1.12.0.mk
Last active February 1, 2019 12:11
TensorFlow Build Script
#!/usr/bin/make -f
# Makefile for installing Tensorflow
#
# -Andreas Herten, 1 Feb 2019
SHELL = /bin/bash
NAME = tensorflow
VERSION = 1.12.0
#!/usr/bin/env bash
_SYSTEMNAME=$(cat /etc/FZJ/systemname)
USERSHELL=/bin/zsh
case $_SYSTEMNAME in
juron)
export SYSTEMNAME="JURON"
;;
juwels)
@AndiH
AndiH / .gitignore
Last active September 30, 2019 16:03
MPI Rank, OpenMP Thread ID, Core ID
omp_id
#!/usr/bin/make -f
# Makefile for installing OpenMPI
#
# -Andreas Herten, 15 Dec 2017
SHELL = /bin/bash
PRGNAME = openmpi
VERSION = 4.0.1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.