This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Thanks goes to @pete-otaqui for the initial gist: | |
# https://gist.github.com/pete-otaqui/4188238 | |
# | |
# Original version modified by Marek Suscak | |
# | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" or even "1.2.3-beta+001.ab" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Convert Pipfile.lock into requirements.txt | |
It generates an output similar to `pipenv lock -r` | |
without the need to actually locking the file. | |
See https://github.com/pypa/pipenv/issues/3493 | |
This script was created to include the definition of sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# call once per file then retrieve with logging.getLogger(__file__) | |
import logging | |
def setup_logger(level): | |
log = logging.getLogger(__file__) | |
handler = logging.StreamHandler() | |
formatter = logging.Formatter(f'%(asctime)-15s {__file__} %(message)s') | |
handler.setFormatter(formatter) | |
log.addHandler(handler) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from threading import Timer | |
class Interval: | |
def __init__(self, func, secs): | |
# Fuction to be called back | |
self.func = func | |
# Interval | |
self.secs = secs | |
# Timer thread object |