Sample lighttpd conf:
$HTTP["host"] == "d.gould.in" {
proxy.server = ( "" => ( ( "host" => "127.0.0.1",
"port" => 20020 ) ) )
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: |
https://www.votizen.com/matt-helt-for-us-house/ | |
https://www.votizen.com/phil-jennerjahn-for-us-house-1/ | |
https://www.votizen.com/candace-duval-for-us-house/ | |
https://www.votizen.com/brad-morris-for-us-house/ | |
https://www.votizen.com/robert-estes-for-us-house/ | |
https://www.votizen.com/henry-ross-for-us-house/ | |
https://www.votizen.com/jim-bourland-for-us-house/ | |
https://www.votizen.com/danny-bedwell-for-us-house/ | |
https://www.votizen.com/chris-potts-for-us-house/ | |
https://www.votizen.com/philip-scollo-for-us-house/ |
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+))/' |
Monospaced fonts still have plenty of valid uses, so I BEG. TO. DIFFER. |
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 |
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() |
- 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
I hereby claim:
To claim this, I am signing this object:
from collections import OrderedDict | |
def groupby_unsorted(iterable, key=None): | |
''' | |
An implementation of itertools.groupby which eager evaluates groups and | |
therefore does not require its iterable to be pre-sorted. Groups are | |
returned in the order they are seen. | |
''' | |
key = key or (lambda x: x) | |
groups = OrderedDict() |