- 12oz bag of Ritual coffee (or a bag of Samovar tea for tea drinkers)
- 1 Dandelion chocolate bar (any origin)
- 90g bag of Dang toasted coconut chips
- 8oz bag of CC Made spiced almond caramel popcorn
- 1 Boccalone soppressata salumi
- 1 regular sized bag of 4505 Meats chicharrones
- 4pc Recchiuti salted caramels
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 django import template | |
register = template.Library() | |
class UpdateQuerystringNode(template.Node): | |
def __init__(self, **kwargs): | |
self.kwargs = kwargs | |
def render(self, context): | |
query_dict = context['request'].GET.copy() |
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 __future__ import division | |
import json | |
import os | |
import urlparse | |
from collections import defaultdict | |
from datetime import datetime | |
from dateutil.relativedelta import relativedelta | |
from requests import HTTPError | |
from requests_oauthlib import OAuth1Session |
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 __future__ import division | |
import os | |
import subprocess | |
try: | |
from cStringIO import StringIO | |
except ImportError: | |
from StringIO import StringIO |
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 datetime | |
import re | |
HAPROXY_LOG_PATH = '/path/to/haproxy.log' | |
haproxy_re = re.compile( | |
r'haproxy\[(?P<pid>\d+)\]: ' | |
r'(?P<client_ip>(\d{1,3}\.){3}\d{1,3}):(?P<client_port>\d{1,5}) ' | |
r'\[(?P<date>\d{2}/\w{3}/\d{4}(:\d{2}){3}\.\d{3})\] ' | |
r'(?P<listener_name>\S+) (?P<server_name>\S+) ' | |
r'(?P<Tq>(-1|\d+))/(?P<Tw>(-1|\d+))/(?P<Tc>(-1|\d+))/(?P<Tr>(-1|\d+))/' |
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
class FrealCountdownTask(task.Task): | |
abstract = True | |
@classmethod | |
def apply_async(self, args=None, kwargs=None, | |
task_id=None, producer=None, connection=None, router=None, | |
link=None, link_error=None, publisher=None, add_to_parent=True, | |
**options): | |
try: |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from requests import Session | |
from requests.adapters import BaseAdapter | |
from requests.auth import HTTPBasicAuth | |
from requests.models import Response | |
from suds.properties import Unskin | |
from suds.transport import Transport, TransportError, Reply |
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
try: | |
from django.contrib.auth import get_user_model | |
except ImportError: | |
from django.contrib.auth.models import User as UserModel | |
else: | |
UserModel = get_user_model() |
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 django.contrib.auth.models import User | |
user_ids = list(User.objects.values_list('id', flat=True)[:10]) | |
reverse_user_ids = user_ids[::-1] | |
values_str_parts = ['(%s, %s)' % (i, id) for i, id in enumerate(reverse_user_ids)] | |
values_str = 'VALUES %s' % ' '.join(values_str_parts) | |
users = User.objects.raw(""" | |
SELECT u.* | |
FROM auth_user AS u | |
JOIN (%s) AS i (ordering, id) on u.id = i.id |
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
Monospaced fonts still have plenty of valid uses, so I BEG. TO. DIFFER. |
NewerOlder