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

All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
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
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Último (20)

All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
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
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Destacado

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
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

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...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

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