SlideShare una empresa de Scribd logo
1 de 36
Descargar para leer sin conexión
‫‪Play with Python‬‬
          ‫‪Orientation Session‬‬
‫كل الكتب والمراجع و البرامج موجودة على أجهزة معامل الكلية :ملحوظة‬




                                                                    ‫/‪www.python.org‬‬
Agenda

•   Why?

•   Interpreted vs Compiled languages

•   Dynamically typed vs Static typed languages

•   A Quick Tour of Python
•   Course Structure

•   Environment and Software
                                        Guido van
                                         Rossum
Why?
Easy, Productive, Extensible

Youtube: :"Python is fast enough for our site and allows us to
  produce maintainable features in record times, with a minimum of
  developers"


  "NASA code policy is to implement everything in Python, and leave
  performance critical pieces of code to C++"


Peter Norvig (AI Computer Scientist, Director of Search Quality at
  Google, recommends Python for his AI Class): "Today dozens of
  Google engineers use Python, and we're looking for more people
  with skills in this language."
Why?
Easy, Productive, Extensible

EVE Online : "Python enabled us to create EVE Online, a massive multiplayer
game, in record time. The EVE Online server cluster runs over 50,000
simultaneous players in a shared space simulation, most of which is created in
Python"



stackoverflow.com user: “If you are a programmer charging by the hour,
   you SHOULD NOT use Python, because it ensures you won't be able to
   charge your customer much”


   Mark Lutz (Python Books Author): "Today, I can safely say that Python
   has changed my life. I have moved to a different continent."
Why?
Who uses Python ?:




                       Watch this Google I/O video clip, Wesley
                       Chun listing the uses of python and what
                     companies use Python. (from 22:35 to 29:10 )
Why?
Who uses Python ?:
   Google
   NASA
   Yahoo
   Youtube                                      Watch this Google I/O video clip, Wesley
                                                Chun listing the uses of python and what
   Linux (RedHat, Ubuntu, ...)                companies use Python. (from 22:35 to 29:10 )

   Lots of researchers
   EVE online (Thousands of online players)
   MIT (Programming Intro. Course)
   etc...
Awards !
Why?
Who uses Python ?:
   Google
   NASA
   Yahoo
   Youtube                                      Watch this Google I/O video clip, Wesley
                                                Chun listing the uses of python and what
   Linux (RedHat, Ubuntu, ...)                companies use Python. (from 22:35 to 29:10 )

   Lots of researchers
   EVE online (Thousands of online players)
   MIT (Programming Intro. Course)
   etc...
Awards !
Why?
Who uses Python ?:
   Google
   NASA
   Yahoo
   Youtube
           is Open Source, free,
    even for commercial use !
                                                Watch this Google I/O video clip, Wesley
                                                Chun listing the uses of python and what
   Linux (RedHat, Ubuntu, ...)                companies use Python. (from 22:35 to 29:10 )

   Lots of researchers
   EVE online (Thousands of online players)
   MIT (Programming Intro. Course)
   etc...
Why?
Python Software Foundation (PSF), the organization that is devoted to advance
python, has these prestigious members
(and many other companies and organizations ....)
Why?
Python is mainly used in:
 • Rapid Prototyping and Experimenting
 • Scripting
 • Text Processing
 • Web applications
 • Game Development
 • System Administrations
 • Fun Stuff that need quick experiments:
    o like robotics or any scientific math

 • Teaching kids programming :)
Interpreted vs Compiled languages
• Python, Javascript and many other languages are
  "Interpreted" languages
   o   which means there is no compilation phase needed to run the
       program
   o   instead an interpreter interprets your code directly and
       executes it
   o   this means that you don't have to wait for long compilation
       times in big projects
• But the down side that is the language is slower
  than compiled ones like C/C++/C#/Java
   o   Often, productivity and development time is much important
       than language speed
   o   in some cases you may need special extra speed, here you
       can implement the time critical pieces in a C++ for example
Interpreted vs Compiled languages
• The python interpreter (Demo)
   o   one of the great advantages of any interpreted language, the
       interpreter allows you to instantly execute any piece of code
       you need to understand or test
Interpreted vs Compiled languages
•   This allows you to do quick experiments and prototypes for your ideas like
    simple programs or even scientific functions (like matlab, maple, octane ...
    but with much stronger and easier OOP language)
Interpreted vs Compiled languages
•   This allows you to do quick experiments and prototypes for your ideas like
    simple programs or even scientific functions (like matlab, maple, octane ...
    but with much stronger and easier OOP language)
This Makes Python Fun !
BUT, Python is not a replacement to other languages:
 A common error some people do, is they tend to put
 languages in struggle as if there must be only 1
 language to learn


THIS is WRONG!


Python/Javascript/Lisp are great, C++/C#/Java are great,
every language has its role in this world.
You can be a Pythonista and a C++er in the same time

And you can always mix them together to fit your needs
Dynamically typed vs Static typed
languages
•   In Java, C#, C/C++, types are explicit:
     • int n = 7;
     • String s = “Hi”;
     • var n = 3;

•   in Python, Ruby, Javascript, types are dynamic:
     • n=7
     • s = “Hi”
     • n = "hello"

No Static Types
A Quick Tour
A Sample Program:

   def greetings(name):
       if name == "":   #This is a comment
          msg = "Hello Guest. Welcome!"
       else:
          msg = "Hello " + name + ". Welcome!"
       return msg
====================================
>>> greetings("FCIS")
‘Hello FCIS. Welcome!’
  >>> greetings("")
  ‘Hello FCIS. Welcome!’
A Quick Tour
  A Sample Program:
   Function

          def greetings(name):
             if name == "":     #This is a comment
                msg = "Hello Guest. Welcome!"
Indentation  else:
                msg = "Hello " + name + ". Welcome!"
    return msg         Variable

    ====================================
    >>> greetings("FCIS")
    ‘Hello FCIS. Welcome!’
         >>> greetings("")
         ‘Hello FCIS. Welcome!’
Other Python Aspects
•   Generators
•   Map, Zip
•   Lambdas
•   List comprehensions
•   Closures
•   ...
Course Structure
•   Lecture 1, 2:
     • Python Language, Object Oriented
     • Lecture 1: Strings, Numbers, Loops, Functions, List, Tuple,
       Dictionary
     • Lecture 2: , importing packages, Sets, Sorting, Classes, Object
       Oriented, Constructors, Destructors, isinstance
•   Lecture 3, 4:
     • Exceptions
     • More Language Features (Map, Zip, Lambdas, Generators)
     • Saving and restoring from files
     • GUI with PyQt4
     • Diverse uses of Python: scientific computing with python,
       graphs, visualizations
•   Lecture 5, 6:
     • Web with Django
     • Game with PyGame
Environment and Software
•   Python language (The Python language)
     •   Version 2.7.3 http://www.python.org/download/
•   Aptana Studio 3 (our main IDE) :
     •   http://www.aptana.com/products/studio3/download (needs java)
•   Pythonxy (Scientific Computing):
     •   http://code.google.com/p/pythonxy/
•   PyGame (Games):
     •   http://www.pygame.org/download.shtml
•   Django (Web):
     •   https://www.djangoproject.com/download/
•   All Free !
(Note: PySide is deleted, we don't' need it, we will work with PyQt4 which is
already included in Pythonxy)
Note: If you want to use Python in visual studio 2010 and don't want
to download big downloads like Aptana, you can use Microsoft Official
"Python Tools for visual studio" at http://pytools.codeplex.com/,
only 4 MB beside python, and you have an excellent full IDE for
python.
References (‫)الترتيب حسب األهمية‬
This Presentation References:
 •   The Official The Python Tutorial: http://docs.python.org/tutorial/
 •   Official Python Library Reference: http://docs.python.org/library/
 •   Official Python Language Reference: http://docs.python.org/reference/
 •   Pyschools Python Intro: http://www.pyschools.com/downloads/A_Quick_Python_Tour.pdf
References (‫)الترتيب حسب األهمية‬
General References for the Course:
 •   Beginners:
      o Concentrated short introductions for the language (directly only to the language and
          examples, no other talk about anything else except the language, any one of the following is
          good):
                The Official The Python Tutorial (link in previous slide)
                A byte of Python, for Python 2.x (A Quick Book): http://www.swaroopch.org/notes/Python
                PySchools Python Quick Reference Guide (along with online interactive excercises to solve,
                 very useful): http://doc.pyschools.com/html/index.html, Exercises:
                 http://www.pyschools.com/quiz/view_summary

      o Online Interactive Tutorials (interactive exercising during reading, very enjoyable)
          University of Waterloo online Interactive Python Tutorial: http://cscircles.cemc.uwaterloo.ca/using-
                 this-website/
                Online Python Tutor (just excercises, I but it here shows automatic code tracing while exercising):
                 http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit
                learnpython.org's interactive Python tutorial: http://www.learnpython.org/
      o Beginners Books (not only language and examples, but everything you need to know about
          Python) (*):
                Python for Dummies (2006) (Fast short examples like "A byte of Python")
                Core Python Programming (2nd Edition) , Chun (2006) (longer examples and explanation)
                Learning Python, Mark Lutz (4th Edition) (For the very detailed explanation of everything about
                 Python, very good if you have time, or want to parachute on specific thing to understand deeply)
                 (*) https://docs.google.com/file/d/0B2Jt9cH9yJtraE1iOGR0X19zNFk/edit
THANK YOU

Más contenido relacionado

Último

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Último (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Play with python lecture 1

  • 1. ‫‪Play with Python‬‬ ‫‪Orientation Session‬‬ ‫كل الكتب والمراجع و البرامج موجودة على أجهزة معامل الكلية :ملحوظة‬ ‫/‪www.python.org‬‬
  • 2. Agenda • Why? • Interpreted vs Compiled languages • Dynamically typed vs Static typed languages • A Quick Tour of Python • Course Structure • Environment and Software Guido van Rossum
  • 3. Why? Easy, Productive, Extensible Youtube: :"Python is fast enough for our site and allows us to produce maintainable features in record times, with a minimum of developers" "NASA code policy is to implement everything in Python, and leave performance critical pieces of code to C++" Peter Norvig (AI Computer Scientist, Director of Search Quality at Google, recommends Python for his AI Class): "Today dozens of Google engineers use Python, and we're looking for more people with skills in this language."
  • 4. Why? Easy, Productive, Extensible EVE Online : "Python enabled us to create EVE Online, a massive multiplayer game, in record time. The EVE Online server cluster runs over 50,000 simultaneous players in a shared space simulation, most of which is created in Python" stackoverflow.com user: “If you are a programmer charging by the hour, you SHOULD NOT use Python, because it ensures you won't be able to charge your customer much” Mark Lutz (Python Books Author): "Today, I can safely say that Python has changed my life. I have moved to a different continent."
  • 5. Why? Who uses Python ?: Watch this Google I/O video clip, Wesley Chun listing the uses of python and what companies use Python. (from 22:35 to 29:10 )
  • 6. Why? Who uses Python ?: Google NASA Yahoo Youtube Watch this Google I/O video clip, Wesley Chun listing the uses of python and what Linux (RedHat, Ubuntu, ...) companies use Python. (from 22:35 to 29:10 ) Lots of researchers EVE online (Thousands of online players) MIT (Programming Intro. Course) etc...
  • 7. Awards ! Why? Who uses Python ?: Google NASA Yahoo Youtube Watch this Google I/O video clip, Wesley Chun listing the uses of python and what Linux (RedHat, Ubuntu, ...) companies use Python. (from 22:35 to 29:10 ) Lots of researchers EVE online (Thousands of online players) MIT (Programming Intro. Course) etc...
  • 8. Awards ! Why? Who uses Python ?: Google NASA Yahoo Youtube is Open Source, free, even for commercial use ! Watch this Google I/O video clip, Wesley Chun listing the uses of python and what Linux (RedHat, Ubuntu, ...) companies use Python. (from 22:35 to 29:10 ) Lots of researchers EVE online (Thousands of online players) MIT (Programming Intro. Course) etc...
  • 9. Why? Python Software Foundation (PSF), the organization that is devoted to advance python, has these prestigious members (and many other companies and organizations ....)
  • 10. Why? Python is mainly used in: • Rapid Prototyping and Experimenting • Scripting • Text Processing • Web applications • Game Development • System Administrations • Fun Stuff that need quick experiments: o like robotics or any scientific math • Teaching kids programming :)
  • 11. Interpreted vs Compiled languages • Python, Javascript and many other languages are "Interpreted" languages o which means there is no compilation phase needed to run the program o instead an interpreter interprets your code directly and executes it o this means that you don't have to wait for long compilation times in big projects • But the down side that is the language is slower than compiled ones like C/C++/C#/Java o Often, productivity and development time is much important than language speed o in some cases you may need special extra speed, here you can implement the time critical pieces in a C++ for example
  • 12. Interpreted vs Compiled languages • The python interpreter (Demo) o one of the great advantages of any interpreted language, the interpreter allows you to instantly execute any piece of code you need to understand or test
  • 13. Interpreted vs Compiled languages • This allows you to do quick experiments and prototypes for your ideas like simple programs or even scientific functions (like matlab, maple, octane ... but with much stronger and easier OOP language)
  • 14. Interpreted vs Compiled languages • This allows you to do quick experiments and prototypes for your ideas like simple programs or even scientific functions (like matlab, maple, octane ... but with much stronger and easier OOP language)
  • 15. This Makes Python Fun ! BUT, Python is not a replacement to other languages: A common error some people do, is they tend to put languages in struggle as if there must be only 1 language to learn THIS is WRONG! Python/Javascript/Lisp are great, C++/C#/Java are great, every language has its role in this world. You can be a Pythonista and a C++er in the same time And you can always mix them together to fit your needs
  • 16. Dynamically typed vs Static typed languages • In Java, C#, C/C++, types are explicit: • int n = 7; • String s = “Hi”; • var n = 3; • in Python, Ruby, Javascript, types are dynamic: • n=7 • s = “Hi” • n = "hello" No Static Types
  • 17. A Quick Tour A Sample Program: def greetings(name): if name == "": #This is a comment msg = "Hello Guest. Welcome!" else: msg = "Hello " + name + ". Welcome!" return msg ==================================== >>> greetings("FCIS") ‘Hello FCIS. Welcome!’ >>> greetings("") ‘Hello FCIS. Welcome!’
  • 18. A Quick Tour A Sample Program: Function def greetings(name): if name == "": #This is a comment msg = "Hello Guest. Welcome!" Indentation else: msg = "Hello " + name + ". Welcome!" return msg Variable ==================================== >>> greetings("FCIS") ‘Hello FCIS. Welcome!’ >>> greetings("") ‘Hello FCIS. Welcome!’
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Other Python Aspects • Generators • Map, Zip • Lambdas • List comprehensions • Closures • ...
  • 32. Course Structure • Lecture 1, 2: • Python Language, Object Oriented • Lecture 1: Strings, Numbers, Loops, Functions, List, Tuple, Dictionary • Lecture 2: , importing packages, Sets, Sorting, Classes, Object Oriented, Constructors, Destructors, isinstance • Lecture 3, 4: • Exceptions • More Language Features (Map, Zip, Lambdas, Generators) • Saving and restoring from files • GUI with PyQt4 • Diverse uses of Python: scientific computing with python, graphs, visualizations • Lecture 5, 6: • Web with Django • Game with PyGame
  • 33. Environment and Software • Python language (The Python language) • Version 2.7.3 http://www.python.org/download/ • Aptana Studio 3 (our main IDE) : • http://www.aptana.com/products/studio3/download (needs java) • Pythonxy (Scientific Computing): • http://code.google.com/p/pythonxy/ • PyGame (Games): • http://www.pygame.org/download.shtml • Django (Web): • https://www.djangoproject.com/download/ • All Free ! (Note: PySide is deleted, we don't' need it, we will work with PyQt4 which is already included in Pythonxy) Note: If you want to use Python in visual studio 2010 and don't want to download big downloads like Aptana, you can use Microsoft Official "Python Tools for visual studio" at http://pytools.codeplex.com/, only 4 MB beside python, and you have an excellent full IDE for python.
  • 34. References (‫)الترتيب حسب األهمية‬ This Presentation References: • The Official The Python Tutorial: http://docs.python.org/tutorial/ • Official Python Library Reference: http://docs.python.org/library/ • Official Python Language Reference: http://docs.python.org/reference/ • Pyschools Python Intro: http://www.pyschools.com/downloads/A_Quick_Python_Tour.pdf
  • 35. References (‫)الترتيب حسب األهمية‬ General References for the Course: • Beginners: o Concentrated short introductions for the language (directly only to the language and examples, no other talk about anything else except the language, any one of the following is good):  The Official The Python Tutorial (link in previous slide)  A byte of Python, for Python 2.x (A Quick Book): http://www.swaroopch.org/notes/Python  PySchools Python Quick Reference Guide (along with online interactive excercises to solve, very useful): http://doc.pyschools.com/html/index.html, Exercises: http://www.pyschools.com/quiz/view_summary o Online Interactive Tutorials (interactive exercising during reading, very enjoyable)  University of Waterloo online Interactive Python Tutorial: http://cscircles.cemc.uwaterloo.ca/using- this-website/  Online Python Tutor (just excercises, I but it here shows automatic code tracing while exercising): http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit  learnpython.org's interactive Python tutorial: http://www.learnpython.org/ o Beginners Books (not only language and examples, but everything you need to know about Python) (*):  Python for Dummies (2006) (Fast short examples like "A byte of Python")  Core Python Programming (2nd Edition) , Chun (2006) (longer examples and explanation)  Learning Python, Mark Lutz (4th Edition) (For the very detailed explanation of everything about Python, very good if you have time, or want to parachute on specific thing to understand deeply) (*) https://docs.google.com/file/d/0B2Jt9cH9yJtraE1iOGR0X19zNFk/edit