Skip to content

Instantly share code, notes, and snippets.

View nilreml's full-sized avatar
💾
Core dump in progress

Merlin nilreml

💾
Core dump in progress
  • Hamburg, Germany
  • 09:38 (UTC +02:00)
View GitHub Profile
# Best practice pyproject.toml:
# https://github.com/airbytehq/airbyte/blob/master/airbyte-lib/pyproject.toml
[tool.coverage.run]
include = ["src/*"]
parallel = true
branch = true
[tool.coverage.paths]
check for bash version 4+ (POSIX-compliant) :
[ -z "${BASH_VERSINFO}" ] || [ -z "${BASH_VERSINFO[0]}" ] || [ ${BASH_VERSINFO[0]} -lt 4 ]
path to script even if symlinked:
SCRIPT_DIR="$( cd -P "$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )"
@nilreml
nilreml / docker
Last active April 17, 2024 17:33
Fast one-liner in current dir:
docker run -v $PWD:$PWD -w $PWD --net=[host|none] image cmd
Verbose docker info:
docker system df -v
Delete all build cache:
docker builder prune -af
PCIe diagnostics:
nvidia-smi dmon -s et -d 10 -o DT
@nilreml
nilreml / jupyter
Last active September 7, 2024 10:36
# Display all cell outputs
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all'
# Rich print
import rich.console
print = rich.console.Console(force_jupyter=False, width=220).print
# Render markdown/svg cells:
from IPython.display import display, Markdown, SVG
https://www.crazygames.com/game/compact-conflict
https://www.crazygames.com/game/hex-empire