Skip to content

Instantly share code, notes, and snippets.

@althonos
althonos / setup.cfg
Last active Sep 18, 2021
A `setup.cfg` template for my Python projects
View setup.cfg
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c
[metadata]
name = {name}
version = file: {name}/_version.txt
author = Martin Larralde
author_email = martin.larralde@embl.de
url = https://github.com/althonos/{name}
description = {description}
long_description = file: README.md
@hathawsh
hathawsh / reram.py
Last active Nov 17, 2017
Alter Original Prusa i3 MMU tool changes to stop internal stringing
View reram.py
#!/usr/bin/env python
"""Alter Original Prusa i3 MMU tool changes to stop internal stringing.
This changes the filament unload procedure so that right after pulling out,
the extruder pauses (for a little cooling), pushes back in
(to compress the string), and pulls out again (to break the string.)
See: https://github.com/prusa3d/Slic3r/issues/396
"""
@walkermatt
walkermatt / debounce.py
Created Jun 4, 2012
A debounce function decorator in Python similar to the one in underscore.js, tested with 2.7
View debounce.py
from threading import Timer
def debounce(wait):
""" Decorator that will postpone a functions
execution until after wait seconds
have elapsed since the last time it was invoked. """
def decorator(fn):
def debounced(*args, **kwargs):
def call_it():