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 unittest | |
class SimplestCase(unittest.TestCase): | |
def test_simple(self): | |
self.assertEqual(1 + 1, 2) | |
if __name__ == '__main__': | |
unittest.main() |
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 pyPdf import PdfFileWriter, PdfFileReader | |
import os | |
def append_pdf(input, output): | |
[output.addPage(input.getPage(page_num)) \ | |
for page_num in range(input.numPages)] | |
output = PdfFileWriter() | |
for pdf in filter(lambda x: '.pdf' in x, os.listdir('.')): | |
append_pdf(PdfFileReader(file(pdf, "rb")), output) |
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
def rmdc(a, b): | |
return b and rmdc(b, a%b) or a | |
def mdc(a, b): | |
while a: | |
a, b = b%a, a | |
return b | |
if __name__ == '__main__': | |
a = input("Informe o primeiro valor: ") |
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 inspect as i;print i.stack()[0][4][0] |
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
*.pyc | |
.project | |
.pydevproject |
NewerOlder