# -*- coding: utf-8 -*-
import ast
import base64
import bson
import os
import random
import time
import urllib2

from boto.s3.key import Key
from bson.objectid import ObjectId
from cStringIO import StringIO
from Crypto.Cipher import AES
from PIL import Image
from pymongo import DESCENDING

import settings

AES = AES.new(settings.SECRET_KEY, AES.MODE_ECB)
BLOCK_SIZE = 16
IMAGE_WIDTH = 50
RGB = 255