Skip to content

Instantly share code, notes, and snippets.

View udoprog's full-sized avatar

John-John Tedro udoprog

View GitHub Profile
@udoprog
udoprog / consumer.py
Last active December 10, 2015 20:28
Celery and Distribution using routing_keys
import logging
from celery import Celery
from kombu import Exchange
from kombu import Queue
# modify this to select which routing_key to consume.
SITE = 'sto'
celery = Celery()
@udoprog
udoprog / bashin.sh
Created January 9, 2012 17:52
bashin implemented in bash
#!/bin/bash
FILE=$1
[[ ! -f $FILE ]] && exit 1
function create_args() {
while [[ $# -gt 1 ]]; do
shift
echo -n " \"$1\""
done
@udoprog
udoprog / morse.py
Created May 7, 2011 19:28
A morse code transscriber
import sys
lookup_map={
'A': ".-",
'B': "-...",
'C': "-.-.",
'D': "-..",
'E': ".",
'F': "..-.",
'G': "--.",