This file contains 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 | |
from inspect import getouterframes, currentframe | |
from copy import copy | |
from django.shortcuts import render_to_response | |
#def render_to_response(*args, **kw): | |
# print args, kw |
This file contains 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 fab | |
# vim:ts=4:sw=4:tw=120:et:sm:foldmethod=indent | |
import os | |
import time | |
from fabric.api import * | |
from fabric.contrib import files | |
# Global Settings |
Olá amigos Pythonistas,
Perdoem-nos pelo longo email mas nessa semana que passou muita coisa aconteceu na nossa comunidade.
Como muitos devem saber a 7ª edição da PythonBrasil aconteceu entre os dias 29/09 e 01/10 em São Paulo e foi sensacional.
Além de ter sido sensacional tivemos uma assembléia para eleger a nova diretoria da Associação Python Brasil e começamos a discutir sobre a próxima edição da PythonBrasil. Esse email trata desses dois assuntos.
This file contains 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
// ==UserScript== | |
// @name remove folha's paywall | |
// @namespace http://folha.uol.com.br/ | |
// @version 0.1 | |
// @description just remove folha's paywall | |
// @include http://*.folha*/* | |
// @match http://*.folha*/* | |
// @include http://*.blogfolha*/* | |
// @match http://*.blogfolha*/* | |
// @copyright 2012+, Me |
This file contains 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 | |
""" | |
The following test should pass, but it fails: | |
>>> def spam(): | |
... print("eggs") | |
... | |
>>> assert spam(), "Print 'eggs' before AssertionError" |
I hereby claim:
- I am osantana on github.
- I am osantana (https://keybase.io/osantana) on keybase.
- I have a public key whose fingerprint is E4CD AE5B C3ED A864 0BBC F51F 5AAE A8B5 35B4 53D3
To claim this, I am signing this object:
This file contains 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
# -*- coding: utf-8 -*- | |
# | |
import re | |
from django.contrib.sites.models import get_current_site | |
from app.models.store import Store | |
from django.conf import settings |
This file contains 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
# coding: utf-8 | |
import os | |
import re | |
import posixpath | |
import email.charset | |
from email.mime.image import MIMEImage | |
from urllib.parse import unquote |
This file contains 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
# Modo sugerido pela documentação do Django | |
def create(request, template_name="my_app/my_form.html"): | |
if request.method == 'POST': | |
form = MyForm(request.POST, request.FILES) | |
if form.is_valid(): | |
instance = form.save(commit=False) | |
do_x() # custom logic here | |
instance.save() | |
return redirect('home') | |
else: |
OlderNewer