python: cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!
DESCRIPTION
apresentação de Rodrigo Senra no 7Masters - Encontro iMasters de Especialistas em Python - abril/2012.TRANSCRIPT
![Page 1: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/1.jpg)
Python:Cabe no seu bolso,cabe no seu micro,
cabe no seu cérebro!
Rodrigo Dias Arruda Senra iMasters 2012 - SP
![Page 2: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/2.jpg)
Python:Cabe no seu bolso,cabe no seu micro,
cabe no seu cérebro!
Rodrigo Dias Arruda Senra iMasters 2012 - SP
![Page 3: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/3.jpg)
•Python na prática:
•Geoprocessamento
•Automação Industrial
•Bibliotecas Digitais
•Por que Python
Anatomia do Blá
![Page 4: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/4.jpg)
Geoprocessamento
![Page 5: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/5.jpg)
Geoprocessamento
![Page 6: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/6.jpg)
NDVI: Índice de Vegetacão
![Page 7: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/7.jpg)
NDVI: Índice de Vegetacão
Fonte:Perfis temporais NDVI MODIS, na cana-soca, de maturação tardia.Fernando L. P. Ramme; Rubens A. C. Lamparelli; Jansle V. Rocha.
Eng. Agríc. vol.30 no.3 Jaboticabal June 2010
![Page 8: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/8.jpg)
6
Operações Espaciais
![Page 9: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/9.jpg)
Exemplo: Extração da Geometria
shp = ogr.Open(filepath)
# Layer correspondente ao Estado de São paulolayer = vf.shp.GetLayerByName('35mu500gc')
# Feature correspondente ao município de Campinasfeature = layer.GetFeature(501)
# Extração dos pontos de controle do perímetrogeometry = feature.GetGeometryRef() poly = geometry.GetGeometryRef(0) centroid = geometry.Centroid() centroid_geo = centroid.GetX(), centroid.GetY()
# Definição do Retângulo Envoltório Mínimo (MBR) lg_left, lg_right, lt_bot, lt_up = poly.GetEnvelope() ul_geo, lr_geo = (lg_left, lt_up), (lg_right, lt_bot)
![Page 10: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/10.jpg)
Automação Industrial
![Page 11: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/11.jpg)
Automação Industrial
![Page 12: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/12.jpg)
CLPs controlando Elevação de Óleo
![Page 13: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/13.jpg)
CLPs controlando Elevação de Óleo
![Page 19: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/19.jpg)
SoluçãoIDE
CompiladorPython
TC6 XML
SFC+ST
SFC+ST→Ladder
Modelo de Dados + Mapa de Variáveis
Código Nativo
![Page 20: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/20.jpg)
Bibliotecas Digitais
![Page 21: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/21.jpg)
Bibliotecas Digitais
![Page 22: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/22.jpg)
MFN: 169: Paper on: <plant physiology><plant transpiration><measurement and instruments>
70: Magalhaes, A.C.70: Franco, C.M.44: Methodology of plant eco-physiology: proceedings of the Montpellier Symposium
50: Incl. bibl.24: Techniques for the measurement of transpiration of individual plants26: ^aParis^bUnesco^c-196530: ^ap. 211-224^billus.
![Page 23: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/23.jpg)
MFN: 169: Paper on: <plant physiology><plant transpiration><measurement and instruments>
70: Magalhaes, A.C.70: Franco, C.M.44: Methodology of plant eco-physiology: proceedings of the Montpellier Symposium
50: Incl. bibl.24: Techniques for the measurement of transpiration of individual plants26: ^aParis^bUnesco^c-196530: ^ap. 211-224^billus.
![Page 24: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/24.jpg)
MFN: 169: Paper on: <plant physiology><plant transpiration><measurement and instruments>
70: Magalhaes, A.C.70: Franco, C.M.44: Methodology of plant eco-physiology: proceedings of the Montpellier Symposium
50: Incl. bibl.24: Techniques for the measurement of transpiration of individual plants26: ^aParis^bUnesco^c-196530: ^ap. 211-224^billus.
![Page 25: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/25.jpg)
Projeto ISIS-NBP
Engine
Database
Console Gateway
http://reddes.bvsalud.org/projects/isisnbp
![Page 26: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/26.jpg)
Projeto ISIS-NBP
Engine
Database
Console GatewayIPython
http://reddes.bvsalud.org/projects/isisnbp
![Page 27: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/27.jpg)
Projeto ISIS-NBP
Engine
Database
Console Gateway
PyOpenSSL, PyCrypto
IPython TwistedSSH
HTTP
http://reddes.bvsalud.org/projects/isisnbp
![Page 28: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/28.jpg)
Projeto ISIS-NBP
Engine
Database
Console Gateway
PyOpenSSL, PyCrypto
IPython Twisted
OIM
SSH
HTTP
ISIS native DB
http://reddes.bvsalud.org/projects/isisnbp
![Page 29: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/29.jpg)
Projeto ISIS-NBP
Engine
Database
Console Gateway
PyOpenSSL, PyCrypto
IPython TwistedDjango
OIM
SSH
HTTPXML-RPC
ISIS native DB
http://reddes.bvsalud.org/projects/isisnbp
![Page 30: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/30.jpg)
Projeto ISIS-NBP
Engine
Database
Console Gateway
PyOpenSSL, PyCrypto
IPython TwistedDjangoPLY
OIM
SSH
HTTPXML-RPC
ISIS native DB
http://reddes.bvsalud.org/projects/isisnbp
![Page 31: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/31.jpg)
Projeto ISIS-NBP
Engine
Database
Console Gateway
PyOpenSSL, PyCrypto
IPython TwistedDjangoPLY
nosetest
OIM
SSH
HTTPXML-RPC
ISIS native DB
http://reddes.bvsalud.org/projects/isisnbp
![Page 32: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/32.jpg)
Projeto ISIS-NBP
Engine
Database
Console Gateway
PyOpenSSL, PyCrypto
IPython TwistedDjangoPLY
nosetest
OIM
SSH
HTTPXML-RPC
ZODB, Durus,...
ISIS native DBBDB, XML,...
RSS, OAI-PMH
JSON
WebDAV
http://reddes.bvsalud.org/projects/isisnbp
![Page 33: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/33.jpg)
Exemplo: Compiladordef t_VFIELD(t): r'[vV]([0-9]+)' try: t.value = int(t.lexer.lexmatch.groups()[1]) except ValueError: print "Field accessor", t.value t.value = 0 return t
def p_field_subfield(p): """field : VFIELD "^" "*" | VFIELD "^" SUBCHAR """ ch = p[3].lower() if ch=="*": p[0] = record[p[1]].subfields.value(pos=0) else: p[0] = record[p[1]].subfields[ch]
![Page 34: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/34.jpg)
Por que Python ?
Produtividade do desenvolvedor Legibilidade Portabilidade Integração: C, C++, C#, Java,... Biblioteca Padrão Tecno-diversidade Maturidade
![Page 35: Python: Cabe no seu bolso, cabe no seu micro, cabe no seu cérebro!](https://reader034.vdocuments.pub/reader034/viewer/2022042700/559b68d41a28ab877f8b4633/html5/thumbnails/35.jpg)
Obrigado a todos pela atenção.
Rodrigo Dias Arruda Senrahttp://rodrigo.senra.nom.br
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.