Skip to content

Instantly share code, notes, and snippets.


Antoine Rozo entwanne

View GitHub Profile
entwanne /
Created Jul 31, 2018
Celery warm shutdown solo taskpool
import asyncio
import time
from celery import Celery
app = Celery('tasks')
class TaskBackend:
#!/usr/bin/env python
import itertools
import random
from collections import Counter
from enum import IntEnum
card_ranks = range(2, 15)
card_colors = '♠♥♦♣'
cards = list(itertools.product(card_ranks, card_colors))
View gist:42050b38a35597f21601
class tail_rec:
inside = False
def __init__(self, func):
self.func = func
def __call__(self, *args, **kwargs):
if tail_rec.inside:
self.args = args
self.kwargs = kwargs
#!/usr/bin/env python2
from glob import glob
#logins = glob('*.jpg')
#print '\n'.join(["'%s' : ''," % l.replace('.jpg', '') for l in logins])
logins = {
'arambu_b' : 'benjamin',
You can’t perform that action at this time.