Skip to content

Instantly share code, notes, and snippets.

View Daviderikmollberg's full-sized avatar

Daviderikmollberg

View GitHub Profile
@fonic
fonic / python_dual_log_setup.py
Last active September 27, 2024 16:16
Python dual-logging setup (console and log file) supporting different log levels and colorized output
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# -
# Python dual-logging setup (console and log file), -
# supporting different log levels and colorized output -
# -
# Created by Fonic <https://github.com/fonic> -
# Date: 04/05/20 - 02/07/23 -
@alexandreelise
alexandreelise / README.md
Last active October 25, 2024 00:12
Install gcc 9 on Ubuntu LTS 12.04,14.04,16.04 and 18.04
@ctokheim
ctokheim / slurm_cheat_sheet.md
Last active December 20, 2025 23:13
A cheat sheet for the SLURM job scheduler

SLURM

Slurm is a job scheduler for computer clusters. This document is based on this tutorial. A useful guide showing the relationships between SGE and SLURM is available here.

Gathering information

Two commands may be useful:

  • sinfo provides information about the resouces of the cluster.
# Bash best practices and style-guide
Just simple methods to keep the code clean.
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/).
## Quick big rules
* All code goes in a function
* Always double quote variables