This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| from functools import wraps | |
| from getpass import getpass | |
| import sys | |
| from db import Users | |
| Logged = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def feliz(number, results=None): | |
| if results is None: | |
| results = [] | |
| next_number = sum(int(a) ** 2 for a in str(number)) | |
| if next_number in results: | |
| return False | |
| if next_number != 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| import os | |
| class ModelBase(type): | |
| models = [] | |
| def __new__(cls, name, bases, attrs): | |
| attrs.update({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: Log in django admin | |
| Scenario: Log in django admin with correct user and password | |
| Given I have the user admin and password admin | |
| When I fill the form and submit | |
| Then I see the text "Encerrar sessão" | |
| Scenario: Log in django admin with incorrect user and password | |
| Given I have the user invald_admin and password invalid_password | |
| When I fill the form and submit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # language: pt-br | |
| Funcionalidade: Log in no admin do django | |
| Cenário: Login no admin do django com usuário e senha corretos | |
| Dado o usuário "admin" e a senha "admin" | |
| Quando eu preencher o formulário de login e enviar os dados | |
| Então devo ver na tela a mensagem "Encerrar sessão" | |
| Cenário: Login no admin do django com usuário e senha incorretos | |
| Dado o usuário "usuario_invalido" e a senha "senha_invalida" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| class Character(object): | |
| NINJA_NAMES = ['Yumiko Reptile', 'Yori Ninja', 'Yuuko Zero'] | |
| def __init__(self, name, skills): | |
| self.name = name | |
| self.skills = skills |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| play_file="play-2.2.3" | |
| playurl="http://downloads.typesafe.com/play/2.2.3/$play_file.zip" | |
| platform="`uname`" | |
| downloader="" | |
| if [[ $platform == 'Linux' ]]; then | |
| downloader='wget' | |
| elif [[ $platform == 'Darwin' ]]; then | |
| downloader='curl -O' | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://www.nike.com.br/Camisa-Masculina-CBF-I-Brasil-Jogador-252077.html | |
| # https://www.facebook.com/photo.php?v=683981728322039&fref=nf | |
| curl "http://www.nikedigitalsis.com.br/nikeid/_loja/admin/ws/blacklist.aspx?c=builder.callback_text&s=DILMA&sku=575276-703&id_sku=252079&_=1405046222159" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| from glob import iglob | |
| import re | |
| def get_locale(filename): | |
| locale_re = re.match(r'Resources_(?P<locale>[^\.]+).properties', filename) | |
| if locale_re: | |
| return locale_re.group('locale') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| import fnmatch | |
| import argparse | |
| import re | |
| try: | |
| import i18n_conf | |
| except: |
OlderNewer