Skip to content

Instantly share code, notes, and snippets.

Avatar
😁

Daniel Amaro danielalejandroamaro

😁
View GitHub Profile
@ruanbekker
ruanbekker / cheatsheet-elasticsearch.md
Last active Nov 25, 2021
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
View cheatsheet-elasticsearch.md
@awesomebytes
awesomebytes / threaded_function_python.md
Last active Nov 25, 2021
Make a function or method threaded in python with a decorator
View threaded_function_python.md

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"""