python: a arma secreta do cientista de dados

44
A Arma Secreta do Cientista de Dados Rodrigo Senra rsenra@acm.org Python

Upload: rodrigo-senra

Post on 12-Apr-2017

1.031 views

Category:

Software


3 download

TRANSCRIPT

Apenas um rapaz latino americano...

• Engenheiro de Software • GPr Sistemas (11 anos)

• HI Tecnologia (5 anos)

• Professor Universitário - PUC-Campinas (2 anos)

• Especialista - Globo.com (2 anos)

• Cientista Pesquisador - EMC2

• Engenheiro de Computação Grad-MSc-PhD IC-Unicamp

• Entusiasta de FLOSS(atuante na comunidade Python desde 2000)

• Estudantes ?

• Professores ?

• Profissionais ?

• Pythonistas ?

Quem está aqui ?

Vamos falar de…

• O dilúvio de dados

• Cientista de Dados

• O graal do desenvolvedor

• Escolhendo uma linguagem

• Vocabulário ofidiglota

fONTE: IDC Digital Universe Study, patrocinado pela EMC, 2011

20090.8 Zettabytes CRESCIMENTO

DA INFORMAÇÃO

2020

44X

MAIOR35.2 ZB

IN 2010 THE DIGITAL UNIVERSE WAS

1.2 ZETTABYTES1,200,000,000,000,000,000,000

Zetta Exa Peta Tera Giga Mega Kilo Byte

fonte: http://thehumanfaceofbigdata.com/

http://www.telegraph.co.uk/news/picturegalleries/picturesoftheday/2545407/Pictures-of-the-day-12-August-2008.html?image=8

Cientista de DadosRodrigo Senra

O que faz ?Quem é ?

Data Science is a newly emerging field dedicated to analyzing and manipulating data to derive insights and build data products.

https://beta.oreilly.com/ideas/what-is-data-science

It combines skill-sets ranging from computer science, to mathematics, to art.

http://images.fineartamerica.com/images-medium-large-5/1-pi-transition-paths-martin-krzywinski.jpg

http://drewconway.com/

http://i0.wp.com/sciencereview.berkeley.edu/wp-content/uploads/2014/04/spring_2014_azam_05.jpg

Truth lies on statistics !

Big Data a cada passo da exploração de petróleo

Navigation

Seismic: Pre-stack

Seismic: Post-stackLog Curves

Culture Data

Geologic Model

Pressure Data

Velocity Data Interpretation

40

Plankalkü

Transistor

50

FortranLISP

Harddisk

CircuitoIntegrado

60

COBOLSIMULABASICLOGO

ITSOS360

MULTICS

Mouse

InterrupçõesVirt.MemARPANET

RS-232

70

PascalC

SmalltalkProlog

UNIXCP/MVMS

Floppy

Micro-processador

PONGTCP/IP

Ethernet

80

AdaC++PerlSQL

LISAMacintosh

UNIXMS-DOSWindows1.0-2.0OS/2

MINIXAIX

HPUXSCOGNURISC

90

JavascriptPython

JavaPHP

BeOSLinuxSolaris

Windows2.0 - 98

OpenBSD

ISAWWW

2000

ScalaC#

Mac OSX

WindowsME

2000XP

Vista7

Go

Linux

Julia

A verdade dói...

# Edsger W.Dijkstra, 18 Junho 1975 http://www.cbi.umn.edu/inv/burros/ewd498.htm

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

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

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

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

Top 10 - SourceForge

http://githut.info/

http://sogrady-media.redmonk.com/sogrady/files/2015/07/lang-rank-615-wm.png

Who is using Python ?

Duelo de linguagens

Duelo de linguagens

import java.io.*;import java.util.*;import java.text.*;public class sumcol {public static void main(String[] args) { int count = 0; String line; try { BufferedReader in = new BufferedReader( new InputStreamReader(System.in)); while ((line = in.readLine()) != null) { count = count + Integer.parseInt(line); } } catch (IOException e) { } System.out.println(Integer.toString(count));

Javausing System;class App {public static int Main(String[] args) { int count = 0; for (String line = Console.In.ReadLine(); line != null; line = Console.In.ReadLine()) { count += System.Convert.ToInt32(line); } Console.WriteLine(count.ToString()); return(0); }

C#import syscount = 0while 1: line = sys.stdin.readline().strip() if not line: break count += int(line)print count

Pythonimport sys, itertoolsprint sum(itertools.imap(int, sys.stdin))

Python

Python é ...

• propósito geral

• foco em produtividade do desenvolvedor

• multi-plataforma e multi-paradigma

• pilhas incluídas

• floss software

• fácil de extender e embutir

• madura (criada em1989, liberada ao público 1991)

Interoperabiilidade✴ CPython (onde existir compilador C ISO/IEC 9899:1990)

✴ Jython (Python implementado em Java)

✴ IronPython (implementado em C# pela M$)

✴ PyPy (Python implementado em... Python)

✴ Py4J (ponte entre CPython e JVM)

✴ Python for .NET [Brian Lloyd]

✴ Win32all [Mark Hammond] (adeus VBA!)

✴ PyObjC (Mac OSX middleware)

✴ Python for Delphi [Morgan Marat]

✴ LunaticPython [Gustavo Niemeyer]

✴ Ruby/Python (importar módulos Python em Ruby)

✴ Python + Fortran

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

Hora da Demo

Dá tempo de vero Python em ação ?

É possível ?Seria pedir muito ?

Pygame

Python no celular S60

Referências

! http://python.org ! http://www.pythonbrasil.com.br ! http://associacao.pythonbrasil.org ! http://showmedo.com

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)

Conclusão

• Ágil, madura e moderna

• Fácil aprendizado

• Comunidade Ativa

• Fartura de documentação

• Divertida ;o)

Obrigado a todos pela atenção.

Rodrigo Dias Arruda Senra

http://rodrigo.senra.nom.br [email protected]

@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.