Skip to content

Instantly share code, notes, and snippets.


Daniel Amaro danielalejandroamaro

View GitHub Profile
ruanbekker /
Last active Nov 25, 2021
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
awesomebytes /
Last active Nov 25, 2021
Make a function or method threaded in python with a decorator

How to make a python function or class method threaded

From this stack overflow question I got this great snippet.

# Threaded function snippet
def threaded(fn):
    """To use as decorator to make a function call threaded.
    Needs import
    from threading import Thread"""