Design patterns with Python samples