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 asyncio | |
from bson import ObjectId | |
class MongoAuthPlugin(BaseAuthPlugin): | |
def __init__(self, context): | |
super().__init__(context) | |
self._db = db | |
@asyncio.coroutine |
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 urllib2 | |
import argparse | |
import facebook | |
import time | |
import random | |
import re | |
from lxml import html |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- ***************************************************--> | |
<!-- *** Schema juristec XML ***--> | |
<!-- *** Lab804 http://www.lab804.com.br ***--> | |
<!-- ***************************************************--> | |
<IRQL> | |
<script/> | |
<header> | |
<statistics> | |
<irqlDuration>00:00:00</irqlDuration> |
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
class CyclePostTest(TestCase): | |
def setUp(self): | |
user = User.objects.create_user('murilo', '[email protected]', 'murilo') | |
farm = Farm.objects.create(user=user, name='teste', full_area='123.45', uncultivated_area='0.00') | |
self.client.login(username='murilo', password='murilo') | |
data = dict(farm=farm, user=user, name='2014') | |
self.resp = self.client.post('/ciclo/cadastrar/', data) | |
def test_post(self): | |
'Valid Post should redirect to /ciclo/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
# encoding: utf-8 | |
from django.test import TestCase | |
from django.contrib.auth.models import User | |
from django.test.client import Client | |
from django.template.defaultfilters import slugify | |
from django.test.client import RequestFactory | |
from fazenda.core.models import Fazenda | |
from fazenda.core.views import FazendaDetail |
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
{% extends 'base.html' %} | |
{% load breadcrumbs %} | |
{% block breadcrumbs %} | |
{% breadcrumb 'Upload' %} | |
{% endblock %} | |
{% block css_especifico %} | |
<link rel="stylesheet" href="{{ STATIC_URL }}assets/css/dropzone.css"> | |
{% endblock %} | |
{% block title %}Upload{% endblock %} |
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
from base64 import b32encode | |
from hashlib import sha1 | |
from random import random | |
def pkgen(): | |
rude = ('lol',) | |
bad_pk = True | |
while bad_pk: | |
pk = b32encode(sha1(str(random())).digest()).lower()[:32] | |
bad_pk = 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
from south.modelsinspector import add_introspection_rules | |
from django.db import models | |
from django.db.models import permalink | |
from django.contrib.auth.models import User | |
from core.models import Cliente | |
from biblioteca.models import Imagem | |
from base64 import b32encode | |
from hashlib import sha1 | |
from random import random |
NewerOlder