SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
Potter x Voldemort:
Lições Ofidiglotas da Prática
         Pythonica


            Rodrigo Senra - rsenra@acm.org
             PythonBrasil[6] - Curitiba - PR
                                           1
Anatomia do Blá

• Eu, Vocês e Python
• Potter x Voldemort: o porquê !
• Hack Maligno: Depurador Omnisciente
• 1 palavra dos patrocinadores

                                        2
• Engenheiro de Computação
  Graduação-MSc-(PhD quase acabando) IC-Unicamp


• Desenvolvedor e Projetista de Software
  na HI Tecnologia (desde 2008)
  (no mercado desde 1996 )


• Entusiasta deem 1997)
  (primeiro contato
                    Python



                         3
                                                  3
Cenas dos últimos capítulos...

[1] 2005 - BigKahuna
[2] 2006 - Show Pyrotécnico
          Iteradores, Geradores,Hooks,Decoradores
[3] 2007 - Show Pyrotécnico II
          Routing, RTSP, Twisted, GIS
[4] 2008 - ISIS-NBP
         Bibliotecas Digitais
[5] 2009 - Rest, Gtw e Compiladores
        SFC(Rede Petri) + ST(Pascal) > Ladder
                                                    4
Python: 1001 utilidades




                          5
Python: 1001 utilidades
 Interface IPTABLES (Python > Linux Kernel)
                        Alta-disponibilidade para Clusters Linux
Servidor de Streaming (RTSP)

                    Sintetizador de Voz (CPqD’s TextoFala, MRCP)

   Monitoramento Remoto (Zenoss before Zenoss)
                                Gerador de tráfego - TCP/UDP

Automação de Força de Vendas
                          Rastreamento de pornografia em Intranet
 Bibliotecas Digitais
                        Sistemas de Cadastros Governamentais
 Gerenciamento de Riscos (Com JS)

                                                                    5
Python: 1001 utilidades
Interface IPTABLES (Python > Linux Kernel)
Alta-disponibilidade para Clusters Linux
Servidor de Streaming (RTSP)
Sintetizador de Voz (CPqD’s TextoFala, MRCP)
Monitoramento Remoto (Zenoss before Zenoss)
Gerador de tráfego - TCP/UDP
Automação de Força de Vendas
Rastreamento de pornografia em Intranet
Bibliotecas Digitais
Sistemas de Cadastros Governamentais
Gerenciamento de Riscos (Com JS)


                                               6
Quem está aí ?




                 7
Quem está aí ?
✓Profissionais de
  Informática




                          7
Quem está aí ?
✓Profissionais de
  Informática

✓Desenvolvedores




                          7
Quem está aí ?
✓Profissionais de
  Informática

✓Desenvolvedores
✓Estudantes




                          7
Quem está aí ?
✓Profissionais de
  Informática

✓Desenvolvedores
✓Estudantes
✓Professores



                          7
Quem está aí ?
✓Profissionais de
  Informática

✓Desenvolvedores
✓Estudantes
✓Professores
✓1ª vez na PyConBrasil


                          7
Quem está aí ?
✓Profissionais de
  Informática

✓Desenvolvedores
✓Estudantes
✓Professores
✓1ª vez na PyConBrasil
✓Membros APyBr

                          7
Quem está aí ?
✓Profissionais de
    Informática

✓Desenvolvedores
✓Estudantes
✓Professores
✓1ª vez na PyConBrasil
✓Membros APyBr
•   Nenhuma resposta acima!


                              7
O porquê do título !


                       8
Duelo de linguagens




                      9
Duelo de linguagens




                      9
Duelo de linguagens




                      10
11
Java
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));



                                                      11
Java
                                         C#
importSystem;
using java.io.*;
importApp {
class java.util.*;
import static int Main(String[] args) {
public java.text.*;
public class sumcol {
     int count = 0;
public static void main(String[] args) {
     for (String line = Console.In.ReadLine();
     int count != 0;
           line = null;
     String line; Console.In.ReadLine())
           line =
     try {count += System.Convert.ToInt32(line); }
       {
         BufferedReader in = new BufferedReader(
     Console.WriteLine(count.ToString());
     return(0); new InputStreamReader(System.in));
   }     while ((line = in.readLine()) != null) {
            count = count + Integer.parseInt(line);
         }
     } catch (IOException e) { }
     System.out.println(Integer.toString(count));



                                                      11
Python
                                      Java
                                       C#
importSystem;
import java.io.*;
using sys
importApp {
class java.util.*;
count = 0
import1:
public java.text.*;
while static int Main(String[] args) {
public class sumcol {
   line = count = 0;
       int sys.stdin.readline().strip()
public static void main(String[] args) {
       for (String line = Console.In.ReadLine();
   if not line:
       int count != 0;
       break line = null;
   count += line; Console.In.ReadLine())
       String int(line)
             line =
print try {count += System.Convert.ToInt32(line); }
         {
       count
           BufferedReader in = new BufferedReader(
       Console.WriteLine(count.ToString());
       return(0); new InputStreamReader(System.in));
   }       while ((line = in.readLine()) != null) {
              count = count + Integer.parseInt(line);
           }
       } catch (IOException e) { }
       System.out.println(Integer.toString(count));



                                                        11
Python
                                      Java
                                       C#
importSystem;
import java.io.*;
using sys
importApp { itertools
count java.util.*;
class sys,
import= 0
import1:
public java.text.*;
while static int Main(String[] args) {
print sum(itertools.imap(int, sys.stdin))
public class sumcol {
   line = count = 0;
       int sys.stdin.readline().strip()
public static void main(String[] args) {
       for (String line = Console.In.ReadLine();
   if not line:
       int count != 0;
       break line = null;
   count += line; Console.In.ReadLine())
       String int(line)
             line =
print try {count += System.Convert.ToInt32(line); }
         {
       count
           BufferedReader in = new BufferedReader(
       Console.WriteLine(count.ToString());
       return(0); new InputStreamReader(System.in));
   }       while ((line = in.readLine()) != null) {
              count = count + Integer.parseInt(line);
           }
       } catch (IOException e) { }
       System.out.println(Integer.toString(count));



                                                        11
Truth lies on statistics!



                            12
13
40          50         60        70         80         90        2000

Plankalkü    Fortran    COBOL      Pascal     Ada      Javascript    D
              LISP      SIMULA       C        C++      Python        C#
                         BASIC    Smalltalk   Perl        Java       Go
                         LOGO      Prolog     SQL         PHP

                         ITS       UNIX           LISA     BeOS    Mac OSX
                        OS360      CP/M         Macintosh  Linux    Linux
                       MULTICS     VMS           UNIX     Solaris
                                                MS-DOS OpenBSD Windows
                                                                     ME
                                                Windows Windows
                                                                    2000
                                                 1.0-2.0  2.0 - 98
                                     Ethernet                        XP
                         RS-232                   OS/2              Vista
                                      TCP/IP     MINIX
                       ARPANET PONG                                   7
                                                  AIX
              Circuito Virt.Mem                  HPUX
                                       Micro-
             Integrado Interrupções processador   SCO
                                                  GNU     WWW
Transistor   Harddisk     Mouse       Floppy
                                                  RISC      ISA


                                                                             13
http://www.tiobe.com
                   14
http://www.tiobe.com
                   14
x86 Ubuntu™ Intel® Q6600® one core - http://shootout.alioth.debian.org/ 
                                                                           15
Hack Maligno
Depurador Omnisciente
                        16
Omniscient Debugger
  “... describes the concept that debuggers should
  know everything about the run of a program,
  that they should remember every state change,
  and be able to present to you the value of
  any variable at any point in time.
  Essentially, omniscient debugging means
  that you can go backwards in time.”




                                                       Bil Lewis
In 1969, Bob Balzer implemented a version of
omniscient debugging for Fortran that ran on
                                                       2006-01-11
 a mainframe and had a TTY interface                   http://video.google.com/videoplay?docid=3897010229726822034#
(see “EXDAMS—Extendible Debugging and Monitoring
System,” ACM Spring Joint Computer Conference, 1969)

                                                                                                                      17
18
Quem assistiu (ontem)
     a palestra
MetaPython Reciclado
      do JS ?

 Vamos ter que usar
   aquela fábrica
  de metaclasses ?


                        19
Hora da Demo
 Dá tempo de ver
o Python em ação ?
    É possível ?
Seria pedir muito ?




                      20
Uma palavra dos patrocinadores...




                                    21
Uma palavra dos patrocinadores...




                                    21
Perguntas ?
Comentários ?

                22
Até crianças
podem lidar com Python!



                          23
Até crianças
podem lidar com Python!



                          23
Obrigado a todos
                         pela atenção.

                            Rodrigo Dias Arruda Senra
                                 http://rodrigo.senra.nom.br
                                      rsenra@acm.org


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.

                                                                                                               24

Weitere ähnliche Inhalte

Was ist angesagt?

Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Charles Nutter
 
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析Mr. Vengineer
 
What the &~#@<!? (Pointers in Rust)
What the &~#@<!? (Pointers in Rust)What the &~#@<!? (Pointers in Rust)
What the &~#@<!? (Pointers in Rust)David Evans
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksDavid Evans
 
Learn Python 3 for absolute beginners
Learn Python 3 for absolute beginnersLearn Python 3 for absolute beginners
Learn Python 3 for absolute beginnersKingsleyAmankwa
 
Exploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernelExploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernelVitaly Nikolenko
 
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
A Brief History of UniRx/UniTask, IUniTaskSource in DepthA Brief History of UniRx/UniTask, IUniTaskSource in Depth
A Brief History of UniRx/UniTask, IUniTaskSource in DepthYoshifumi Kawai
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from DataMosky Liu
 
Secure coding for developers
Secure coding for developersSecure coding for developers
Secure coding for developerssluge
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23DefconRussia
 
Practicing Python 3
Practicing Python 3Practicing Python 3
Practicing Python 3Mosky Liu
 
sizeof(Object): how much memory objects take on JVMs and when this may matter
sizeof(Object): how much memory objects take on JVMs and when this may mattersizeof(Object): how much memory objects take on JVMs and when this may matter
sizeof(Object): how much memory objects take on JVMs and when this may matterDawid Weiss
 
Gpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaGpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaFerdinand Jamitzky
 
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...sanghwan ahn
 
grsecurity and PaX
grsecurity and PaXgrsecurity and PaX
grsecurity and PaXKernel TLV
 
Kernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtKernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtDavid Evans
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackKernel TLV
 
Boost.Python - domesticating the snake
Boost.Python - domesticating the snakeBoost.Python - domesticating the snake
Boost.Python - domesticating the snakeSławomir Zborowski
 
Parsing JSON Really Quickly: Lessons Learned
Parsing JSON Really Quickly: Lessons LearnedParsing JSON Really Quickly: Lessons Learned
Parsing JSON Really Quickly: Lessons LearnedDaniel Lemire
 

Was ist angesagt? (20)

Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
 
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
 
What the &~#@<!? (Pointers in Rust)
What the &~#@<!? (Pointers in Rust)What the &~#@<!? (Pointers in Rust)
What the &~#@<!? (Pointers in Rust)
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
 
Down the Rabbit Hole
Down the Rabbit HoleDown the Rabbit Hole
Down the Rabbit Hole
 
Learn Python 3 for absolute beginners
Learn Python 3 for absolute beginnersLearn Python 3 for absolute beginners
Learn Python 3 for absolute beginners
 
Exploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernelExploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernel
 
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
A Brief History of UniRx/UniTask, IUniTaskSource in DepthA Brief History of UniRx/UniTask, IUniTaskSource in Depth
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from Data
 
Secure coding for developers
Secure coding for developersSecure coding for developers
Secure coding for developers
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23
 
Practicing Python 3
Practicing Python 3Practicing Python 3
Practicing Python 3
 
sizeof(Object): how much memory objects take on JVMs and when this may matter
sizeof(Object): how much memory objects take on JVMs and when this may mattersizeof(Object): how much memory objects take on JVMs and when this may matter
sizeof(Object): how much memory objects take on JVMs and when this may matter
 
Gpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaGpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cuda
 
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
 
grsecurity and PaX
grsecurity and PaXgrsecurity and PaX
grsecurity and PaX
 
Kernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtKernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring Naught
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
 
Boost.Python - domesticating the snake
Boost.Python - domesticating the snakeBoost.Python - domesticating the snake
Boost.Python - domesticating the snake
 
Parsing JSON Really Quickly: Lessons Learned
Parsing JSON Really Quickly: Lessons LearnedParsing JSON Really Quickly: Lessons Learned
Parsing JSON Really Quickly: Lessons Learned
 

Andere mochten auch

Cases de Python no 7Masters 2012
Cases de Python no 7Masters 2012Cases de Python no 7Masters 2012
Cases de Python no 7Masters 2012Rodrigo Senra
 
Rest, Gateway e Compiladores
Rest, Gateway e CompiladoresRest, Gateway e Compiladores
Rest, Gateway e CompiladoresRodrigo Senra
 
Organicer: Organizando informação com Python
Organicer: Organizando informação com PythonOrganicer: Organizando informação com Python
Organicer: Organizando informação com PythonRodrigo Senra
 
Python: Cabe no seu bolso, no seu micro, no seu cérebro.
Python: Cabe no seu bolso, no seu micro, no seu cérebro.Python: Cabe no seu bolso, no seu micro, no seu cérebro.
Python: Cabe no seu bolso, no seu micro, no seu cérebro.Rodrigo Senra
 
Depurador onisciente
Depurador oniscienteDepurador onisciente
Depurador oniscienteRodrigo Senra
 
Brainiak: Um plano maligno de dominação semântica hipermídia
Brainiak: Um plano maligno de dominação semântica hipermídiaBrainiak: Um plano maligno de dominação semântica hipermídia
Brainiak: Um plano maligno de dominação semântica hipermídiaRodrigo Senra
 
Uma breve história no tempo...da computação
Uma breve história no tempo...da computaçãoUma breve história no tempo...da computação
Uma breve história no tempo...da computaçãoRodrigo Senra
 
Tech talk about iswc2013
Tech talk about iswc2013Tech talk about iswc2013
Tech talk about iswc2013Rodrigo Senra
 
Rupy2014 - Show Pyrotécnico
Rupy2014 - Show PyrotécnicoRupy2014 - Show Pyrotécnico
Rupy2014 - Show PyrotécnicoRodrigo Senra
 
Show Pyrotécnico - Keynote PythonBrasil[9] 2013
Show Pyrotécnico - Keynote PythonBrasil[9] 2013Show Pyrotécnico - Keynote PythonBrasil[9] 2013
Show Pyrotécnico - Keynote PythonBrasil[9] 2013Rodrigo Senra
 
Linked data at globo.com
Linked data at globo.comLinked data at globo.com
Linked data at globo.comRodrigo Senra
 
Rest - Representational State Transfer (EMC BRDC Internal Tech talk)
Rest - Representational State Transfer (EMC BRDC Internal Tech talk)Rest - Representational State Transfer (EMC BRDC Internal Tech talk)
Rest - Representational State Transfer (EMC BRDC Internal Tech talk)Rodrigo Senra
 
Brainiak - uma API REST Hipermedia
Brainiak - uma API REST Hipermedia Brainiak - uma API REST Hipermedia
Brainiak - uma API REST Hipermedia Rodrigo Senra
 
Python: A Arma Secreta do Cientista de Dados
Python: A Arma Secreta do Cientista de DadosPython: A Arma Secreta do Cientista de Dados
Python: A Arma Secreta do Cientista de DadosRodrigo Senra
 
Python: a arma secreta do Cientista de Dados
Python: a arma secreta do Cientista de DadosPython: a arma secreta do Cientista de Dados
Python: a arma secreta do Cientista de DadosRodrigo Senra
 
Cientista de Dados - A profissão mais sexy do século 21
Cientista de Dados - A profissão mais sexy do século 21Cientista de Dados - A profissão mais sexy do século 21
Cientista de Dados - A profissão mais sexy do século 21Rodrigo Senra
 

Andere mochten auch (17)

Cases de Python no 7Masters 2012
Cases de Python no 7Masters 2012Cases de Python no 7Masters 2012
Cases de Python no 7Masters 2012
 
Rest, Gateway e Compiladores
Rest, Gateway e CompiladoresRest, Gateway e Compiladores
Rest, Gateway e Compiladores
 
Organicer: Organizando informação com Python
Organicer: Organizando informação com PythonOrganicer: Organizando informação com Python
Organicer: Organizando informação com Python
 
Python: Cabe no seu bolso, no seu micro, no seu cérebro.
Python: Cabe no seu bolso, no seu micro, no seu cérebro.Python: Cabe no seu bolso, no seu micro, no seu cérebro.
Python: Cabe no seu bolso, no seu micro, no seu cérebro.
 
Depurador onisciente
Depurador oniscienteDepurador onisciente
Depurador onisciente
 
Brainiak: Um plano maligno de dominação semântica hipermídia
Brainiak: Um plano maligno de dominação semântica hipermídiaBrainiak: Um plano maligno de dominação semântica hipermídia
Brainiak: Um plano maligno de dominação semântica hipermídia
 
Uma breve história no tempo...da computação
Uma breve história no tempo...da computaçãoUma breve história no tempo...da computação
Uma breve história no tempo...da computação
 
Tech talk about iswc2013
Tech talk about iswc2013Tech talk about iswc2013
Tech talk about iswc2013
 
Rupy2014 - Show Pyrotécnico
Rupy2014 - Show PyrotécnicoRupy2014 - Show Pyrotécnico
Rupy2014 - Show Pyrotécnico
 
Cientista de Dados
Cientista de DadosCientista de Dados
Cientista de Dados
 
Show Pyrotécnico - Keynote PythonBrasil[9] 2013
Show Pyrotécnico - Keynote PythonBrasil[9] 2013Show Pyrotécnico - Keynote PythonBrasil[9] 2013
Show Pyrotécnico - Keynote PythonBrasil[9] 2013
 
Linked data at globo.com
Linked data at globo.comLinked data at globo.com
Linked data at globo.com
 
Rest - Representational State Transfer (EMC BRDC Internal Tech talk)
Rest - Representational State Transfer (EMC BRDC Internal Tech talk)Rest - Representational State Transfer (EMC BRDC Internal Tech talk)
Rest - Representational State Transfer (EMC BRDC Internal Tech talk)
 
Brainiak - uma API REST Hipermedia
Brainiak - uma API REST Hipermedia Brainiak - uma API REST Hipermedia
Brainiak - uma API REST Hipermedia
 
Python: A Arma Secreta do Cientista de Dados
Python: A Arma Secreta do Cientista de DadosPython: A Arma Secreta do Cientista de Dados
Python: A Arma Secreta do Cientista de Dados
 
Python: a arma secreta do Cientista de Dados
Python: a arma secreta do Cientista de DadosPython: a arma secreta do Cientista de Dados
Python: a arma secreta do Cientista de Dados
 
Cientista de Dados - A profissão mais sexy do século 21
Cientista de Dados - A profissão mais sexy do século 21Cientista de Dados - A profissão mais sexy do século 21
Cientista de Dados - A profissão mais sexy do século 21
 

Ähnlich wie Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pythonica

Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeDmitri Nesteruk
 
python presentation
python presentationpython presentation
python presentationVaibhavMawal
 
Skiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in DSkiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in DMithun Hunsur
 
Python For Scientists
Python For ScientistsPython For Scientists
Python For Scientistsaeberspaecher
 
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...Andrey Karpov
 
14.jun.2012
14.jun.201214.jun.2012
14.jun.2012Tech_MX
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processorsRISC-V International
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemSages
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source codePVS-Studio
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source codeAndrey Karpov
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#Bertrand Le Roy
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Evel xf
 
Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administrationvceder
 
Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?Davide Carboni
 

Ähnlich wie Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pythonica (20)

Using Parallel Computing Platform - NHDNUG
Using Parallel Computing Platform - NHDNUGUsing Parallel Computing Platform - NHDNUG
Using Parallel Computing Platform - NHDNUG
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
python presentation
python presentationpython presentation
python presentation
 
Skiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in DSkiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in D
 
Python For Scientists
Python For ScientistsPython For Scientists
Python For Scientists
 
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
PVS-Studio 5.00, a solution for developers of modern resource-intensive appl...
 
A Gomez T Tat Cesga
A Gomez T Tat CesgaA Gomez T Tat Cesga
A Gomez T Tat Cesga
 
What is Python?
What is Python?What is Python?
What is Python?
 
14.jun.2012
14.jun.201214.jun.2012
14.jun.2012
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processors
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
 
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
 
Next .NET and C#
Next .NET and C#Next .NET and C#
Next .NET and C#
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eve
 
Playing Nice with Others
Playing Nice with OthersPlaying Nice with Others
Playing Nice with Others
 
Flink internals web
Flink internals web Flink internals web
Flink internals web
 
Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administration
 
Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?
 

Kürzlich hochgeladen

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pythonica

  • 1. Potter x Voldemort: Lições Ofidiglotas da Prática Pythonica Rodrigo Senra - rsenra@acm.org PythonBrasil[6] - Curitiba - PR 1
  • 2. Anatomia do Blá • Eu, Vocês e Python • Potter x Voldemort: o porquê ! • Hack Maligno: Depurador Omnisciente • 1 palavra dos patrocinadores 2
  • 3. • Engenheiro de Computação Graduação-MSc-(PhD quase acabando) IC-Unicamp • Desenvolvedor e Projetista de Software na HI Tecnologia (desde 2008) (no mercado desde 1996 ) • Entusiasta deem 1997) (primeiro contato Python 3 3
  • 4. Cenas dos últimos capítulos... [1] 2005 - BigKahuna [2] 2006 - Show Pyrotécnico Iteradores, Geradores,Hooks,Decoradores [3] 2007 - Show Pyrotécnico II Routing, RTSP, Twisted, GIS [4] 2008 - ISIS-NBP Bibliotecas Digitais [5] 2009 - Rest, Gtw e Compiladores SFC(Rede Petri) + ST(Pascal) > Ladder 4
  • 6. Python: 1001 utilidades Interface IPTABLES (Python > Linux Kernel) Alta-disponibilidade para Clusters Linux Servidor de Streaming (RTSP) Sintetizador de Voz (CPqD’s TextoFala, MRCP) Monitoramento Remoto (Zenoss before Zenoss) Gerador de tráfego - TCP/UDP Automação de Força de Vendas Rastreamento de pornografia em Intranet Bibliotecas Digitais Sistemas de Cadastros Governamentais Gerenciamento de Riscos (Com JS) 5
  • 7. Python: 1001 utilidades Interface IPTABLES (Python > Linux Kernel) Alta-disponibilidade para Clusters Linux Servidor de Streaming (RTSP) Sintetizador de Voz (CPqD’s TextoFala, MRCP) Monitoramento Remoto (Zenoss before Zenoss) Gerador de tráfego - TCP/UDP Automação de Força de Vendas Rastreamento de pornografia em Intranet Bibliotecas Digitais Sistemas de Cadastros Governamentais Gerenciamento de Riscos (Com JS) 6
  • 9. Quem está aí ? ✓Profissionais de Informática 7
  • 10. Quem está aí ? ✓Profissionais de Informática ✓Desenvolvedores 7
  • 11. Quem está aí ? ✓Profissionais de Informática ✓Desenvolvedores ✓Estudantes 7
  • 12. Quem está aí ? ✓Profissionais de Informática ✓Desenvolvedores ✓Estudantes ✓Professores 7
  • 13. Quem está aí ? ✓Profissionais de Informática ✓Desenvolvedores ✓Estudantes ✓Professores ✓1ª vez na PyConBrasil 7
  • 14. Quem está aí ? ✓Profissionais de Informática ✓Desenvolvedores ✓Estudantes ✓Professores ✓1ª vez na PyConBrasil ✓Membros APyBr 7
  • 15. Quem está aí ? ✓Profissionais de Informática ✓Desenvolvedores ✓Estudantes ✓Professores ✓1ª vez na PyConBrasil ✓Membros APyBr • Nenhuma resposta acima! 7
  • 16. O porquê do título ! 8
  • 20. 11
  • 21. Java 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)); 11
  • 22. Java C# importSystem; using java.io.*; importApp { class java.util.*; import static int Main(String[] args) { public java.text.*; public class sumcol { int count = 0; public static void main(String[] args) { for (String line = Console.In.ReadLine(); int count != 0; line = null; String line; Console.In.ReadLine()) line = try {count += System.Convert.ToInt32(line); } { BufferedReader in = new BufferedReader( Console.WriteLine(count.ToString()); return(0); new InputStreamReader(System.in)); } while ((line = in.readLine()) != null) { count = count + Integer.parseInt(line); } } catch (IOException e) { } System.out.println(Integer.toString(count)); 11
  • 23. Python Java C# importSystem; import java.io.*; using sys importApp { class java.util.*; count = 0 import1: public java.text.*; while static int Main(String[] args) { public class sumcol { line = count = 0; int sys.stdin.readline().strip() public static void main(String[] args) { for (String line = Console.In.ReadLine(); if not line: int count != 0; break line = null; count += line; Console.In.ReadLine()) String int(line) line = print try {count += System.Convert.ToInt32(line); } { count BufferedReader in = new BufferedReader( Console.WriteLine(count.ToString()); return(0); new InputStreamReader(System.in)); } while ((line = in.readLine()) != null) { count = count + Integer.parseInt(line); } } catch (IOException e) { } System.out.println(Integer.toString(count)); 11
  • 24. Python Java C# importSystem; import java.io.*; using sys importApp { itertools count java.util.*; class sys, import= 0 import1: public java.text.*; while static int Main(String[] args) { print sum(itertools.imap(int, sys.stdin)) public class sumcol { line = count = 0; int sys.stdin.readline().strip() public static void main(String[] args) { for (String line = Console.In.ReadLine(); if not line: int count != 0; break line = null; count += line; Console.In.ReadLine()) String int(line) line = print try {count += System.Convert.ToInt32(line); } { count BufferedReader in = new BufferedReader( Console.WriteLine(count.ToString()); return(0); new InputStreamReader(System.in)); } while ((line = in.readLine()) != null) { count = count + Integer.parseInt(line); } } catch (IOException e) { } System.out.println(Integer.toString(count)); 11
  • 25. Truth lies on statistics! 12
  • 26. 13
  • 27. 40 50 60 70 80 90 2000 Plankalkü Fortran COBOL Pascal Ada Javascript D LISP SIMULA C C++ Python C# BASIC Smalltalk Perl Java Go LOGO Prolog SQL PHP ITS UNIX LISA BeOS Mac OSX OS360 CP/M Macintosh Linux Linux MULTICS VMS UNIX Solaris MS-DOS OpenBSD Windows ME Windows Windows 2000 1.0-2.0 2.0 - 98 Ethernet XP RS-232 OS/2 Vista TCP/IP MINIX ARPANET PONG 7 AIX Circuito Virt.Mem HPUX Micro- Integrado Interrupções processador SCO GNU WWW Transistor Harddisk Mouse Floppy RISC ISA 13
  • 30. x86 Ubuntu™ Intel® Q6600® one core - http://shootout.alioth.debian.org/  15
  • 32. Omniscient Debugger “... describes the concept that debuggers should know everything about the run of a program, that they should remember every state change, and be able to present to you the value of any variable at any point in time. Essentially, omniscient debugging means that you can go backwards in time.” Bil Lewis In 1969, Bob Balzer implemented a version of omniscient debugging for Fortran that ran on 2006-01-11 a mainframe and had a TTY interface http://video.google.com/videoplay?docid=3897010229726822034# (see “EXDAMS—Extendible Debugging and Monitoring System,” ACM Spring Joint Computer Conference, 1969) 17
  • 33. 18
  • 34. Quem assistiu (ontem) a palestra MetaPython Reciclado do JS ? Vamos ter que usar aquela fábrica de metaclasses ? 19
  • 35. Hora da Demo Dá tempo de ver o Python em ação ? É possível ? Seria pedir muito ? 20
  • 36. Uma palavra dos patrocinadores... 21
  • 37. Uma palavra dos patrocinadores... 21
  • 39. Até crianças podem lidar com Python! 23
  • 40. Até crianças podem lidar com Python! 23
  • 41. Obrigado a todos pela atenção. Rodrigo Dias Arruda Senra http://rodrigo.senra.nom.br rsenra@acm.org 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. 24