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 pygtk | |
pygtk.require("2.0") | |
import gtk | |
import glib | |
class Projeto(gtk.Window): | |
def __init__(self): |
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 -*- | |
''' | |
Author: Junior Polegato | |
Date: 29 May 2013 | |
Description: This program gets a list of packages from repositories | |
files in /var/lib/apt/lists and a list of installed | |
packages. Then, list the packages/versions which not in | |
files with stable in your name. | |
''' |
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
#!/bin/env python | |
# -*- coding: utf-8 -*- | |
# Author.....: Junior Polegato | |
# Date.......: 13 Jun 2013 | |
# Description: Input with filter by type and characters with | |
# Python in a Linux terminal | |
import sys, tty, termios | |
import locale |
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 | |
import sys | |
ESPACO = ' ' | |
caracter = raw_input("Caracter: ")[0] | |
altura = int(raw_input("Altura (ímpar maior ou igual a 3): ")) | |
if altura < 3 or altura % 2 == 0: |
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 sys | |
class SemCaixa(Exception): | |
pass | |
# Lista com valor da nota e quantidade disponível no caixa | |
caixa = {50: 10, 20: 10, 10: 10, 5: 10} |
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 sys | |
# quantidade de notas de 50 disponível em notas_50_disponiveis | |
notas_50_disponiveis = 10 | |
# quantidade de notas de 20 disponível em notas_20_disponiveis | |
notas_20_disponiveis = 10 |
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 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 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 -*- | |
MIN = 0 | |
MAX = 255 | |
MAX_ERROS = 3 | |
QTD = 4 | |
def pedir_inteiro(min, max, max_erros): | |
erros = 0 |
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 pole | |
import re | |
import urllib2 | |
import os | |
conexao = pole.http.Conexao('www.receita.fazenda.gov.br') | |
dados = conexao.obter_dados('/aplicacoes/atcta/cpf/ConsultaPublica.asp') |
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 -*- | |
# PyGTK 3 é incompatível com Pole | |
try: | |
# Caso tiver PyGTK 2 | |
import pygtk | |
pygtk.require("2.0") | |
import gtk | |
PixbufLoader = gtk.gdk.PixbufLoader |
OlderNewer