Skip to content

Instantly share code, notes, and snippets.

View gabrielpjordao's full-sized avatar

Gabriel gabrielpjordao

  • www.jusbrasil.com.br
  • Salvador - BA
View GitHub Profile
@gabrielpjordao
gabrielpjordao / pyfunct_report.py
Last active December 31, 2015 01:39
pyfunct runner with screenshot
import nose
import time
import os
from nose.plugins import Plugin
css = """
body{
background: #f5f5f5;
def do_humanize_int(value, ignore_decimals=True):
if not value:
return value
number = float(value)
scales = [
(u'trilhão',u'trilhões'),
(u'bilhão', u'bilhões'),
(u'milhão', u'milhões'),
('mil', 'mil')
@gabrielpjordao
gabrielpjordao / urlproblem.py
Created December 11, 2012 15:03
Problem with special characters in URL
Traceback (most recent call last):
File "/env/lib/python2.7/site-packages/flask/app.py", line 1701, in __call__
return self.wsgi_app(environ, start_response)
File "/env/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/env/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/env/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/env/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request