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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.network.urlrequest import UrlRequest | |
KV = ''' | |
BoxLayout: | |
orientation: 'vertical' | |
Label: | |
id: result |
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
# -*- coding: utf-8 -*- | |
from pprint import pprint | |
from bs4 import BeautifulSoup | |
import requests | |
import json | |
URL = 'http://informeperros.com/lista-de-todas-las-razas-de-perros-por-orden-alfabetico/' | |
def main(): |
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
f = open('UFRJ.txt') | |
dic = {} | |
for linha in f: | |
id_servidor, nome, valor = linha.strip().split(',') | |
dic[id_servidor] = [nome, float(valor)] | |
f.close() | |
def salário(a): return a[1][1] | |
maiores = sorted(dic.items(), key=salário, reverse=True) | |
for f in maiores[:50]: |
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
CursoPyQt_Linux |
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 kivy.animation import Animation | |
from kivy.network.urlrequest import UrlRequest | |
from functools import partial | |
from kivy.uix.image import Image | |
from kivy.properties import StringProperty | |
from kivy.clock import Clock | |
from kivy.core.image import Image as CoreImage | |
from io import BytesIO | |
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 kivy | |
from kivy.network.urlrequest import UrlRequest | |
def on_success(req, request): | |
print "success: ", request | |
def on_redirect(req, request): | |
print "redirect: ", req, request |
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 bs4 import BeautifulSoup | |
from urllib3 import PoolManager | |
from time import sleep | |
BASE_URL = 'http://www.chicagoreader.com' | |
def make_soup(url): | |
html = urlopen(section_url).read() | |
return BeautifulSoup(html, 'lxml') | |
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 kivy.app import App | |
from kivy.uix.floatlayout import FloatLayout | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.label import Label | |
from kivy.network.urlrequest import UrlRequest | |
class Example(FloatLayout): | |
def __init__(self, **kwargs): | |
super(Example, self).__init__(**kwargs) |