Skip to content

Instantly share code, notes, and snippets.

View mrcljx's full-sized avatar

Marcel Jackwerth mrcljx

View GitHub Profile
@mrcljx
mrcljx / keybase.md
Created February 19, 2019 17:10
keybase.md

Keybase proof

I hereby claim:

  • I am sirlantis on github.
  • I am sirlantis (https://keybase.io/sirlantis) on keybase.
  • I have a public key ASDNk7zM33MNfuJ9gVPaqGfpSRtnIErSwY2G1AclF_c87Ao

To claim this, I am signing this object:

@mrcljx
mrcljx / eof_fixer.py
Created October 26, 2023 16:01
EOF Fixer (exactly one newline)
#!/usr/bin/env python3
"""
Check if files end with a single newline.
"""
import argparse
import io
import logging
import pathlib
import sys
from collections.abc import Iterator
class BooleanContainer(Container[_T]):
"""A container that supports boolean operations."""
def __init__(
self,
container: Container[_T] | None = None,
predicate: Callable[[object], _T] | None = None,
) -> None:
if container is not None:
assert predicate is None, "Cannot specify both container and predicate"
@mrcljx
mrcljx / migrate_to_uv.py
Created September 19, 2024 15:39
Poetry (1.3) to UV Migration Script
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "deepdiff",
# "editorconfig",
# "pathspec",
# "poetry-core",
# "rich",
# "tomlkit",
# "typer",