SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
‫‪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

Mais conteúdo relacionado

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Destaque

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
 

Destaque (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