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 functools import wraps | |
def my_decorator(f): | |
@wraps(f) | |
def wrapper(*args, **kwds): | |
print('Calling decorated function') | |
return f(*args, **kwds) | |
return wrapper |
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
import unittest | |
from unittest.mock import patch, call | |
class MyQueue(object): | |
def send(self, message): | |
pass | |
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 bash | |
hash docker &>/dev/null; | |
if [ $? -eq 0 ]; then | |
alias d="docker" | |
function docker-rm-untagged-imgs() { | |
[[ $1 == "force" ]] && OPTS="--force" || OPTS=""; | |
docker images | grep "^<none>" | awk '{print "docker rmi '$OPTS' "$3}' | sh | |
} |
OlderNewer