Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/r/e/reddit-HEAD/r2/r2/lib/captcha.py   reddit(Download)
import random, string
from pylons import g
from Captcha.Base import randomIdentifier
from Captcha.Visual import Text, Backgrounds, Distortions, ImageCaptcha
 
def get_iden():
    return randomIdentifier(length=IDEN_LENGTH)
 
def make_solution():
    return randomIdentifier(alphabet=string.ascii_letters, length = SOL_LENGTH).upper()

src/l/e/lesswrong-HEAD/r2/r2/lib/captcha.py   lesswrong(Download)
#TODO find a better way to cache the captchas
from r2.config import cache
from Captcha.Base import randomIdentifier
from Captcha.Visual import Text, Backgrounds, Distortions, ImageCaptcha
from pylons import g
def get_iden():
    return randomIdentifier(length=IDEN_LENGTH)
 
def make_solution():
    return randomIdentifier(alphabet=string.ascii_letters, length = SOL_LENGTH).upper()