Skip to content

Instantly share code, notes, and snippets.

View harkabeeparolus's full-sized avatar

traal harkabeeparolus

View GitHub Profile
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@harkabeeparolus
harkabeeparolus / Typer_cheat_sheet.md
Last active August 28, 2025 13:29
Typer — my attempt at reference documentation
@GhostofGoes
GhostofGoes / .gitignore
Created November 24, 2018 17:08
Global GitIgnore
# Pre-commit config (https://pre-commit.com/)
.pre-commit-config.yaml
# Editors/IDEs/etc
.idea
.vscode
.vagrant
.classpath
.project
@GhostofGoes
GhostofGoes / .pylintrc
Last active October 2, 2022 08:07
PyLint configuration for Google Python Code Style Guide. Slightly modified version of this: https://raw.githubusercontent.com/google/seq2seq/master/pylintrc
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Add files or directories to the blacklist. They should be base names, not
@supposedly
supposedly / arg-parsers.md
Last active December 16, 2021 09:53
This list is probably out of date. It hasn't been updated since September 2019.

Big ol' list of third-party Python 3 argparse alternatives

Bold+italics means the lib is probably worth checking out above the rest. joffrey is my own.

argparse wrappers

@0x4D31
0x4D31 / beautiful_idiomatic_python.md
Last active November 6, 2025 07:27 — forked from JeffPaine/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@xquery
xquery / gist:7643288
Last active July 29, 2021 06:36
webdav the api you never knew existed
add file
curl -X PUT --anyauth --user 'admin:admin' -T cluster1.xml 'http://localhost:8005/testfile.xml'
make directory
curl -X MKCOL --anyauth --user 'admin:admin' 'http://localhost:8005/testdir'
move a file
curl -X MOVE --anyauth --user 'admin:admin' --header 'Destination: http://localhost:8005/testfile1.xml' 'http://localhost:8005/testfile.xml'
list all files in webdav