Submit Search
Upload
Introduciton to Python
•
1 like
•
419 views
Moshe Kaplan
Follow
Learning python as part of the Tel Aviv University MBA Data Science program
Read less
Read more
Technology
Report
Share
Report
Share
1 of 51
Download now
Download to read offline
Recommended
Introduction to Big Data
Introduction to Big Data
Moshe Kaplan
Creating Big Data: Methodology
Creating Big Data: Methodology
Moshe Kaplan
Big Data Workshop
Big Data Workshop
Moshe Kaplan
Web systems architecture, Performance and More
Web systems architecture, Performance and More
Moshe Kaplan
Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?
Moshe Kaplan
VP R&D Open Seminar: Caching
VP R&D Open Seminar: Caching
Moshe Kaplan
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
Moshe Kaplan
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Moshe Kaplan
Recommended
Introduction to Big Data
Introduction to Big Data
Moshe Kaplan
Creating Big Data: Methodology
Creating Big Data: Methodology
Moshe Kaplan
Big Data Workshop
Big Data Workshop
Moshe Kaplan
Web systems architecture, Performance and More
Web systems architecture, Performance and More
Moshe Kaplan
Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?
Moshe Kaplan
VP R&D Open Seminar: Caching
VP R&D Open Seminar: Caching
Moshe Kaplan
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
Moshe Kaplan
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
Moshe Kaplan
Optimizely Developer Showcase
Optimizely Developer Showcase
Optimizely
TechEvent Advanced Service Worker / PWA with Google Workbox
TechEvent Advanced Service Worker / PWA with Google Workbox
Trivadis
Scale and Cloud Design Patterns
Scale and Cloud Design Patterns
Moshe Kaplan
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
Paul Calvano
Staying in the fast lane - tools to keep your site speedy and light
Staying in the fast lane - tools to keep your site speedy and light
stefanjudis
Velocity Report 2009
Velocity Report 2009
Naoya Nakazawa
Bespoke Software Development UK
Bespoke Software Development UK
Nathan Wynne
Hackference
Hackference
Doug Sillars
Operational Excellence & Mobile
Operational Excellence & Mobile
Unvired Inc.
Big Data, Analytics & its impact on asset management
Big Data, Analytics & its impact on asset management
John Wentzel
BIG Data and Methodology-A review
BIG Data and Methodology-A review
Shilpa Soi
Asset management-cda
Asset management-cda
John B. Cook, PE, CEO
Connecting assets and facilities with IoT
Connecting assets and facilities with IoT
EPC Blockchain Sdn Bhd, Kainos Technology Sdn Bhd
Pengurusan asset dan fasiliti (a+f)
Pengurusan asset dan fasiliti (a+f)
deriliumboy
Asset & Facility Management Consulting Services
Asset & Facility Management Consulting Services
Rosmiman Asset Management
Big Data: It’s all about the Use Cases
Big Data: It’s all about the Use Cases
James Serra
Innovation in Facilities Management
Innovation in Facilities Management
chrisdpayne
Predictive Analytics: Extending asset management framework for multi-industry...
Predictive Analytics: Extending asset management framework for multi-industry...
Capgemini
Big Data Analytics in Energy & Utilities
Big Data Analytics in Energy & Utilities
Anders Quitzau
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
Volker Hirsch
Spark and C Integration
Spark and C Integration
Moshe Kaplan
More Related Content
What's hot
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
Moshe Kaplan
Optimizely Developer Showcase
Optimizely Developer Showcase
Optimizely
TechEvent Advanced Service Worker / PWA with Google Workbox
TechEvent Advanced Service Worker / PWA with Google Workbox
Trivadis
Scale and Cloud Design Patterns
Scale and Cloud Design Patterns
Moshe Kaplan
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
Paul Calvano
Staying in the fast lane - tools to keep your site speedy and light
Staying in the fast lane - tools to keep your site speedy and light
stefanjudis
Velocity Report 2009
Velocity Report 2009
Naoya Nakazawa
Bespoke Software Development UK
Bespoke Software Development UK
Nathan Wynne
Hackference
Hackference
Doug Sillars
What's hot
(9)
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
Optimizely Developer Showcase
Optimizely Developer Showcase
TechEvent Advanced Service Worker / PWA with Google Workbox
TechEvent Advanced Service Worker / PWA with Google Workbox
Scale and Cloud Design Patterns
Scale and Cloud Design Patterns
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
Web Unleashed '19 - Measuring the Adoption of Web Performance Techniques
Staying in the fast lane - tools to keep your site speedy and light
Staying in the fast lane - tools to keep your site speedy and light
Velocity Report 2009
Velocity Report 2009
Bespoke Software Development UK
Bespoke Software Development UK
Hackference
Hackference
Viewers also liked
Operational Excellence & Mobile
Operational Excellence & Mobile
Unvired Inc.
Big Data, Analytics & its impact on asset management
Big Data, Analytics & its impact on asset management
John Wentzel
BIG Data and Methodology-A review
BIG Data and Methodology-A review
Shilpa Soi
Asset management-cda
Asset management-cda
John B. Cook, PE, CEO
Connecting assets and facilities with IoT
Connecting assets and facilities with IoT
EPC Blockchain Sdn Bhd, Kainos Technology Sdn Bhd
Pengurusan asset dan fasiliti (a+f)
Pengurusan asset dan fasiliti (a+f)
deriliumboy
Asset & Facility Management Consulting Services
Asset & Facility Management Consulting Services
Rosmiman Asset Management
Big Data: It’s all about the Use Cases
Big Data: It’s all about the Use Cases
James Serra
Innovation in Facilities Management
Innovation in Facilities Management
chrisdpayne
Predictive Analytics: Extending asset management framework for multi-industry...
Predictive Analytics: Extending asset management framework for multi-industry...
Capgemini
Big Data Analytics in Energy & Utilities
Big Data Analytics in Energy & Utilities
Anders Quitzau
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
Volker Hirsch
Viewers also liked
(12)
Operational Excellence & Mobile
Operational Excellence & Mobile
Big Data, Analytics & its impact on asset management
Big Data, Analytics & its impact on asset management
BIG Data and Methodology-A review
BIG Data and Methodology-A review
Asset management-cda
Asset management-cda
Connecting assets and facilities with IoT
Connecting assets and facilities with IoT
Pengurusan asset dan fasiliti (a+f)
Pengurusan asset dan fasiliti (a+f)
Asset & Facility Management Consulting Services
Asset & Facility Management Consulting Services
Big Data: It’s all about the Use Cases
Big Data: It’s all about the Use Cases
Innovation in Facilities Management
Innovation in Facilities Management
Predictive Analytics: Extending asset management framework for multi-industry...
Predictive Analytics: Extending asset management framework for multi-industry...
Big Data Analytics in Energy & Utilities
Big Data Analytics in Energy & Utilities
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
Similar to Introduciton to Python
Spark and C Integration
Spark and C Integration
Moshe Kaplan
Automatic and Interpretable Machine Learning with H2O and LIME
Automatic and Interpretable Machine Learning with H2O and LIME
Jo-fai Chow
Introduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdf
AnassElHousni
An Introduction to CMake
An Introduction to CMake
ICS
CS4961-L9.ppt
CS4961-L9.ppt
MarlonMagtibay2
Complete C programming Language Course
Complete C programming Language Course
Vivek chan
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
NEHARAJPUT239591
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
meharikiros2
Static PIE, How and Why - Metasploit's new POSIX payload: Mettle
Static PIE, How and Why - Metasploit's new POSIX payload: Mettle
Brent Cook
ODU ACM Python & Memento Presentation
ODU ACM Python & Memento Presentation
ScottAinsworth
Verification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed Systems
Mykola Novik
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
CherryBerry2
MongoDB Best Practices for Developers
MongoDB Best Practices for Developers
Moshe Kaplan
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
Preferred Networks
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
MayurWagh46
Processes And Job Control
Processes And Job Control
ahmad bassiouny
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
KubeAcademy
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...
bhargavi804095
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
Vincenzo Barone
"Deployment for free": removing the need to write model deployment code at St...
"Deployment for free": removing the need to write model deployment code at St...
Stefan Krawczyk
Similar to Introduciton to Python
(20)
Spark and C Integration
Spark and C Integration
Automatic and Interpretable Machine Learning with H2O and LIME
Automatic and Interpretable Machine Learning with H2O and LIME
Introduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdf
An Introduction to CMake
An Introduction to CMake
CS4961-L9.ppt
CS4961-L9.ppt
Complete C programming Language Course
Complete C programming Language Course
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Static PIE, How and Why - Metasploit's new POSIX payload: Mettle
Static PIE, How and Why - Metasploit's new POSIX payload: Mettle
ODU ACM Python & Memento Presentation
ODU ACM Python & Memento Presentation
Verification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed Systems
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
MongoDB Best Practices for Developers
MongoDB Best Practices for Developers
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
Processes And Job Control
Processes And Job Control
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
"Deployment for free": removing the need to write model deployment code at St...
"Deployment for free": removing the need to write model deployment code at St...
More from Moshe Kaplan
Git Tutorial
Git Tutorial
Moshe Kaplan
Redis training for java software engineers
Redis training for java software engineers
Moshe Kaplan
MongoDB training for java software engineers
MongoDB training for java software engineers
Moshe Kaplan
MongoDB from Basics to Scale
MongoDB from Basics to Scale
Moshe Kaplan
The api economy
The api economy
Moshe Kaplan
Introduction to MongoDB
Introduction to MongoDB
Moshe Kaplan
MySQL Multi Master Replication
MySQL Multi Master Replication
Moshe Kaplan
mongoDB Performance
mongoDB Performance
Moshe Kaplan
MySQL crash course by moshe kaplan
MySQL crash course by moshe kaplan
Moshe Kaplan
Expert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project Management
Moshe Kaplan
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Moshe Kaplan
Database2011 MySQL Sharding
Database2011 MySQL Sharding
Moshe Kaplan
Cloud Computing Design Best Practices
Cloud Computing Design Best Practices
Moshe Kaplan
Better Gantts and Project Management
Better Gantts and Project Management
Moshe Kaplan
Better Gantts and Project Management
Better Gantts and Project Management
Moshe Kaplan
Better gantts and project management
Better gantts and project management
Moshe Kaplan
Extract The Traffic From The Db
Extract The Traffic From The Db
Moshe Kaplan
Organization Wide Performance Methodology (ITIL)
Organization Wide Performance Methodology (ITIL)
Moshe Kaplan
More from Moshe Kaplan
(18)
Git Tutorial
Git Tutorial
Redis training for java software engineers
Redis training for java software engineers
MongoDB training for java software engineers
MongoDB training for java software engineers
MongoDB from Basics to Scale
MongoDB from Basics to Scale
The api economy
The api economy
Introduction to MongoDB
Introduction to MongoDB
MySQL Multi Master Replication
MySQL Multi Master Replication
mongoDB Performance
mongoDB Performance
MySQL crash course by moshe kaplan
MySQL crash course by moshe kaplan
Expert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project Management
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Database2011 MySQL Sharding
Database2011 MySQL Sharding
Cloud Computing Design Best Practices
Cloud Computing Design Best Practices
Better Gantts and Project Management
Better Gantts and Project Management
Better Gantts and Project Management
Better Gantts and Project Management
Better gantts and project management
Better gantts and project management
Extract The Traffic From The Db
Extract The Traffic From The Db
Organization Wide Performance Methodology (ITIL)
Organization Wide Performance Methodology (ITIL)
Recently uploaded
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Enjoy Anytime
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
Hyundai Motor Group
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
null - The Open Security Community
The transition to renewables in India.pdf
The transition to renewables in India.pdf
Competition Advisory Services (India) LLP
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
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
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Neo4j
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
null - The Open Security Community
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
Recently uploaded
(20)
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
The transition to renewables in India.pdf
The transition to renewables in India.pdf
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
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...
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Slack Application Development 101 Slides
Slack Application Development 101 Slides
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Introduciton to Python
1.
Creating Big Data: Introduction
to Python Moshe Kaplan moshe.kaplan@brightaqua.com
2.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Moshe Kaplan > Scale Hacker: Architecture (Sys and Data) R&D Solving Problems > Blogs: http://top-performance.blogspot.com http://blogs.microsoft.co.il/vprnd 2
3.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com About Me: It’s all About Scale 3
4.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com INTRODUCTION Background 4 http://geekandpoke.typepad.com/geekandpoke/2008/07/one-day-in-the.html
5.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Wny Python? Simple and readable Indentation: hard to mess OOP and functional Dynamic and auto memory management Can be packaged Cross platform Wide number of libraries Works great w/ Java, C, .Net 5
6.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Who is Behind? Python Software Foundation ~1M USD annual budget Created at 1989 Top 10 from 2008 6 https://en.wikipedia.org/wiki/Python_(programming_language)
7.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Who is Using? 7 http://www.dhruvb.com/blog/images/slides/python/using-python.png
8.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Python Version 2.X Existing Projects 3.X New Projects Not so backwards compatible 8
9.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Materials 9 https://www.tocode.co.il 10% Discount Coupon Code: PyApplied
10.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com IDEs You can use Notepad++ 10
11.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com HELLO WORLD Background 11
12.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com 12 http://www.dhruvb.com/blog/presentations/python/#/2
13.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com 13 http://www.dhruvb.com/blog/presentations/python/#/2
14.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com VARIABLES, NUMBERS AND STRINGS Python 14
15.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com C:>Python Type "help", "copyright", "credits" or "license" for more information. >>> a = "hello" >>> print(a) hello >>> print(type(a)) <class 'str'> >>> a = 1 >>> print(type(a)) <class 'int'> >>> Variables 15 Auto Declaration Auto type assignment
16.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Numbers Integer (int) Floating Complex (a+ib) 16 http://www.slideshare.net/TahaniAlManie/python-3-programming-language
17.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Strings Immutable (cannot modify) Char is a single char string Starts w/ 0 and support –N 17 >>> a = "hello" >>> a[0] 'h' >>> a[-1] 'o'
18.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Strings Methods 18 http://www.slideshare.net/TahaniAlManie/python-3-programming-language
19.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Strings Operators 19 http://www.slideshare.net/TahaniAlManie/python-3-programming-language
20.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com LISTS AND TUPLES Python 20
21.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Lists Basics Mutable Support multi types Again 0–N 21 >>> l = [1, 'b', 'ccc'] >>> print(l[0]) 1 >>> print(l[1:2]); ['b'] >>> l[2] = 3 >>> print(l) >>> del(l[0]) >>> print(l) ['b', 3]
22.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Lists Magic Supports list in a list For each: 22 >>> a = [1, 2, 3] >>> [x ** 2 for x in a] [1, 4, 9] http://www.slideshare.net/TahaniAlManie/python-3-programming-language
23.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Tuples Similar functionality to lists Immutable (cannot modify) Faster than lists Perfect for functional programming 23 >>> t = (1, 'b', 'ccc') >>> t[0] = 2 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'tuple' object does not support item assignment
24.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Dictionaries Basics Key/Value pairs (JSON like) Mutable (cannot modify) 24 >>> d = {'name':'moshe', 'course':'PySpark'} >>> print(d['name']) moshe >>> print(d.keys()) dict_keys(['name', 'course']) >>> print(d.values()) dict_values(['moshe', 'PySpark']) >>> print(d.items()) dict_items([('name', 'moshe'), ('course', 'PySpark')])
25.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Dictionaries Methods 25 http://www.slideshare.net/TahaniAlManie/python-3-programming-language
26.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com FUNCTIONS Python 26
27.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Functions Basics Flexible parameters: 27 >>> def a(name = "moshe", course = "pycourse"): ... print(name + ": " + course) ... >>> a() moshe: pycourse >>> a("roni") roni: pycourse >>> a(course = "spark") moshe: spark
28.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Variable Length Parameters and Refs Not ByVal and not ByRef: Mutuable: Object Reference (array) Immutable: Change pointer each time (string) 28 >>> def f(*tup): ... for t in tup: ... print(t) ... >>> >>> >>> f(1, "b", "ccc") 1 b ccc is vs ==
29.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com IF STATEMENTS AND LOOPS Python 29
30.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com if True or False conditions (no null) Non Null True Non Zero True 30 >>> b = True >>> if b: ... print(1) ... elif b != True: ... print(2) ... else: ... print(3) 1 >>> x = 'correct' if b == True else 'wrong'
31.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com For Loops: Strings 31 >>> for letter in 'python': ... print(letter) p y t h o n
32.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com For Loops: For Each 32 >>> for x in range(1, 5): ... print(x) ... 1 2 3 4
33.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com While continue: Well, continue break: Well, break pass: Void, due to indentation 33 >>> while (x < 5): ... print(x) ... x = x + 1 0 1 2 3 4
34.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com INPUT AND BASIC TERMINAL APPS Python 34
35.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Files f = open(“file_name” [, access_mode] [,buffering]) “r” read “w” recreate “a” append “b” add for binary reading i = f.read() All at once line = f.readline() Single line lines = f.readlines() All at once to a list f.write(string) f.close() 35
36.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com I/O Immutable (cannot modify) Char is a single char string Starts w/ 0 and support –N 36 shuffelBlocks = (raw_input("Shuffel Blocks (y/n): ") == 'y') print(shuffelBlocks) assert(type(a) == type(1))
37.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com CLASSES AND ENTERPRISE LEVEL PROGRAMMING Python 37
38.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Classes 38 > Python class.py Moshe is earning too much Roni is earning 100 Total Employees: 2 Static variable Constructor Object var
39.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Inheritance By default Everything public __attribute Turn to private Reflection++: Multiple inheritance is supported 39 class shape: ... class Circle(shape): ...
40.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Modules and Imports Use 3rd party code: Functions Classes Attributes 40 >>> import module1 [, module2] >>> from module3 import name1 [, name2] Only specific attributes
41.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Creating Modules Simple header And we are done… 41 """file my_module.py Module 'my_module': my special module """ def my_func(a): if __name__ == '__main__': print my_func(1)
42.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Packaging 42 def is_number(s): try: int(s) return True except ValueError: return False if __name__ == '__main__': COLOR_BREAK = 'blue' COLOR_HEADER_FOOTER = 'darkCyan';
43.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Python Compiler See also .pyc file in your stack 43
44.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Python Integration 44
45.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com EXCEPTIONS Python 45
46.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Try and Except Common: NameError TypeError IndexError KeyError 46 try: print(getattr(moshe, "course")) except NameError: print("no attribute1")
47.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com TESTING Python 47
48.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com How to Do that? 48 import my_module import unittest class my_module_test(unittest.TestCase): def test_method1(self): self.assertFalse(method1(1)) if __name__ == '__main__': unittest.main()
49.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com PREPARE FOR SPARK Python 49
50.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Functions are Objects 50 # Evil Code… >> log, exp = exp, log >> r = [ -1, 0, 1] >> map(abs, r) [1, 0, 1] >> def sum(x, y): return x+y >> reduce(sum, r) 0 >> def large(x): return x > 0 >> filter(large, r) [1]
51.
© All rights
reserved: Moshe Kaplan http://top-performance.blogspot.com Thank You ! Moshe Kaplan moshe.kaplan@brightaqua.com 054-2291978
Download now