1. O documento apresenta Python como uma linguagem de programação versátil, de código aberto e multiplataforma.
2. Diversos exemplos demonstram como Python pode ser usado para desenvolvimento web, jogos, análise de dados e ciência.
3. O palestrante conclui destacando as vantagens de Python como facilidade de aprendizado, comunidade ativa e diversidade de aplicações.
11. A verdade dói...
# Edsger W.Dijkstra, 18 Junho 1975 http://www.cbi.umn.edu/inv/burros/ewd498.htm
12. A verdade dói...
# Edsger W.Dijkstra, 18 Junho 1975 http://www.cbi.umn.edu/inv/burros/ewd498.htm
FORTRAN --"the infantile
disorder"--, by now nearly
20 years old, is hopelessly
inadequate for whatever
computer application
you have in mind today:
it is now too clumsy, too
risky, and too expensive to
use
13. A verdade dói...
# Edsger W.Dijkstra, 18 Junho 1975 http://www.cbi.umn.edu/inv/burros/ewd498.htm
PL/1 --"the fatal
disease"-- belongs
more to the
problem set than to
the solution set
14. A verdade dói...
# Edsger W.Dijkstra, 18 Junho 1975 http://www.cbi.umn.edu/inv/burros/ewd498.htm
It is practically impossible
to teach good
programming to students
that have had a prior
exposure to BASIC: as
potential programmers
they are mentally
mutilated beyond hope of
regeneration
15. A verdade dói...
# Edsger W.Dijkstra, 18 Junho 1975 http://www.cbi.umn.edu/inv/burros/ewd498.htm
The use of COBOL
cripples the mind; its
teaching should,
therefore, be regarded as
a criminal offence
30. Fernando Perez, lead PI at BIDS and creator of IPython, demonstrates brain imaging analyses
performed using the IPython Notebook, an interactive web-based computational environment.
credit: Peg Skorpinski
40. Bancos de Dados
from psycopg import *
o = connect(“ dbname=teste user=fulano” )
c = o.cursor()
c.execute(“ SELECT * FROM nome_da_tabela” )
row = c.fetchone()
print row
x = [ ('valor_1', 'fulano', 0), ('valor_2', 'beltrano', 5),
('valor_3', 'ciclano', 15)]
c.executemany(" " " INSERT INTO outra_tabela
VALUES (%s, %s, %s)""", x)
c.commit()
41. Networking
from twisted.internet.protocol import Protocol, Factory
from twisted.internet import reactor
from time import asctime
class TimeServer(Protocol):
def dataReceived(self, data):
self.transport.write(asctime())
def main():
f = Factory()
f.protocol = TimeServer
reactor.listenTCP(8000, f)
reactor.run()
main()
42. Web Services
from SOAPpy import SOAPProxy
from SOAPpy import Types
google = SOAPProxy( 'http://api.google.com/search/beta2',
'urn:GoogleSearch')
results = google.doGetCachedPage('Pd6ke...ArQoX' ,
'www.owls.org')
of = open('cached_page_response.html', 'w')
of.write(results)
of.close()
43. SciPy
import view
from Numeric import *
x = arange(-3, 6, .04)
y = arange(-12, 12, .08)
y = sin(y)*exp(-y*y/18.0)
z = x * y[:,NewAxis]
view.view(z)
46. Referências
! Fluent Python: Luciano Ramalho (O’Reilly)
! Python in a Nutshell: Alex Martelli (O'Reilly)
! Python Cookbook: Alex Martelli, David Ascher (O'Reilly)
! Learning Python for Interactive Computing and Data
Visualisation: Cyrille Rossant (Packt)
47. Conclusão
• Ágil, madura e moderna
• Fácil aprendizado
• Comunidade Ativa
• Fartura de documentação
• Divertida ;o)
48.
49. Obrigado a todos
pela atenção.
Rodrigo Dias Arruda Senra
http://rodrigo.senra.nom.br
rodsenra@gmail.com
@rodsenra
As opiniões e conclusões expressas nesta apresentação são de exclusiva responsabilidade de Rodrigo Senra.
Não é necessário requisitar permissão do autor para o uso de partes ou do todo desta apresentação, desde que não sejam feitas
alterações no conteúdo reutilizado e que esta nota esteja presente na íntegra no material resultante.
Imagens e referências para outros trabalhos nesta apresentação permanecem propriedade daqueles que detêm seus direitos de
copyright. Agradecimento especial a Ana Oliveira e Diego Salomone que contribuíram com alguns slides de suas apresentações sobre
o mesmo tema.