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
from pdfminer.pdfinterp import PDFResourceManager, process_pdf | |
from pdfminer.converter import TextConverter | |
from pdfminer.layout import LAParams | |
from io import StringIO | |
from io import open | |
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
import csv |
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 -*- | |
# PyGTK 3 é incompatível com Pole | |
try: | |
# Caso tiver PyGTK 2 | |
import pygtk | |
pygtk.require("2.0") | |
import gtk | |
PixbufLoader = gtk.gdk.PixbufLoader |
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
MIT License | |
Copyright (c) 2018 Jason Sperske | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 -*- | |
import math | |
import re | |
# dado um título e lista de listas no formato | |
# ('<variável>', '<tipo>', '<descricao>', '<fórmula>') | |
# pede-se qual variável calcular, pede os valores e dá o resultado | |
# qualquer valor vazio saida da função |
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
import xmltodict | |
secundario = """<Pessoa> | |
<Nome>rayane</Nome> | |
<Idade>20</Idade> | |
<Endereco>avenida1</Endereco> | |
<Cidade>bh</Cidade> | |
<CPF>111.111.111-11</CPF> | |
<E-mail>[email protected]</E-mail> | |
</Pessoa>""" |
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
<div django-formset-child> | |
{{form.as_p}} | |
<button django-formset-remove>Remove</button> | |
</div> |
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 | |
""" | |
NAO FUNCIONA MAIS. O sistema de CAPTCHA foi trocado. | |
**Implementa um Webcrawler para extracao de dados da pesquisa de media de precos realizada periodicamente pela ANP** | |
Desenvolvido por Fabio C. Barrionuevo da Luz. - 2013 | |
Simple crawler to ANP site | |
Copyright (C) 2013 Fabio C. Barrionuevo da Luz. | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License |
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
import urllib2 | |
import urllib | |
from cookielib import CookieJar | |
from xml.dom.minidom import parseString | |
cj = CookieJar() | |
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) | |
response = opener.open("http://192.168.1.100/astmanager/asterisk/mxml?action=login&username=user&secret=senha") | |
var = response.read() |
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
import urllib2, requests, json, sys | |
reload(sys) | |
sys.setdefaultencoding("utf-8") | |
r=requests.get('https://graph.facebook.com/me/friends?access_token=CAAAAAITEghMBALwFqDAZBkD7ptrp00ZBoLVWavPBd736XH8bekkuv7y9UYjyoAQFVjIZB7cXkQbnC4uLrc8XjAZAHAonohN339yFTkA2QhkcTqhP9Br1d1HLbt4HXLclHAWyjqEinnLrJpDTTcXFhFZBZCftBzoTkZD') | |
users = r.json() | |
i=0 | |
for user in users['data']: | |
print '############ User ############' |
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
import urlparse | |
import re | |
from django import forms | |
from django.db import models | |
from django.utils.translation import ugettext_lazy as _ | |
def validate_youtube_url(value): | |
'''El patron lo saque de http://stackoverflow.com/questions/2964678/jquery-youtube-url-validation-with-regex''' |
NewerOlder