Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
import time | |
import functools | |
def retry(wait, retries=3, reraise=True): | |
""" Decorator retries a function if an exception is raised during function | |
invocation, to an arbitrary limit. | |
:param wait: int, time in seconds to wait to try again | |
:param retries: int, number of times to retry function. If None, unlimited | |
retries. |
To use this bot:
ads_bot.py
and requirements.txt
.pip install -r requirements.txt
to install the requirements.Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.
Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!