SlideShare a Scribd company logo
Advanced Topics with Python
Topics
 Advanced Git Tips for Python Developers
 Pure Python vs NumPy vs TensorFlow Performance Comparison
 Socket Programming in Python
 Itertools in Python 3
 Python Metaclasses
 What is the Python Global Interpreter Lock (GIL)?
 Shallow vs Deep Copying of Python Objects
Advanced Git Tips for Python Developers
 If you’ve done a little work in Git and are starting to understand the basics
we covered in Our Introduction to Git, but you want to learn to be more
efficient and have more control, then this is the place for you!
 In this tutorial, we’ll talk about how to address specific commits and entire
ranges of commits, using the stash to save temporary work, comparing
different commits, changing history, and how to clean up the mess if
something doesn’t work out.
 Python training in Chennai
Pure Python vs NumPy vs TensorFlow
Performance Comparison
 Python has a design philosophy that stresses allowing programmers to
express concepts readably and in fewer lines of code.
 It is technically possible to implement scalar and matrix calculations using
Python lists. However, this can be unwieldy, and performance is poor when
compared to languages suited for numerical computation, such as
MATLAB or Fortran, or even some general purpose languages, such as C
or C++.
 Numpy provides support for large multidimensional arrays and matrices
along with a collection of mathematical functions to operate on these
elements.
 TensorFlow is an open-source library for numerical computation originally
developed by researchers and engineers working at the Google Brain team.
 Python training in Bangalore
Socket Programming in Python
 Sockets and the socket API are used to send messages across a network.
They provide a form of Inter process Communication (IPC).
 This tutorial has three different iterations of building a socket server and
client with Python:
 We’ll start the tutorial by looking at a simple socket server and client.
 Once you’ve seen the API and how things work in this initial example,
we’ll look at an improved version that handles multiple connections
simultaneously.
 Finally, we’ll progress to building an example server and client that
functions like a full-fledged socket application, complete with its own
custom header and content.
 Python training in Pune
Itertools in Python 3
 It has been called a ”gem” and “Pretty much the coolest thing ever,” and if
you have not heard of it, then you are missing out on one of the greatest
corners of the Python 3 standard library: itertools.
 A handful of excellent resources exist for learning what functions are
available in the itertools module. The docs themselves are a great place to
start. So is this post.
 The thing about itertools, though, is that it is not enough to just know the
definitions of the functions it contains. The real power lies in composing
these functions to create fast, memory-efficient, and good-looking code.
 Python training institute in Chennai
Python Metaclasses
 The term metaprogramming refers to the potential for a program to have
knowledge of or manipulate itself. Python supports a form of
metaprogramming for classes called metaclasses.
 Metaclasses are an esoteric OOP concept, lurking behind virtually all
Python code. You are using them whether you are aware of it or not. For the
most part, you don’t need to be aware of it. Most Python programmers
rarely, if ever, have to think about metaclasses.
 Python training institute in Bangalore
What is the Python Global Interpreter Lock
(GIL)?
 The Python Global Interpreter Lock or GIL, in simple words, is a
mutex (or a lock) that allows only one thread to hold the control of the
Python interpreter.
 This means that only one thread can be in a state of execution at any
point in time. The impact of the GIL isn’t visible to developers who
execute single-threaded programs, but it can be a performance
bottleneck in CPU-bound and multi-threaded code.
 Python training institute in Pune
Shallow vs Deep Copying of Python Objects
 Assignment Statement in python do not create copies of objects, they only
bind names to an object. For immutable objects, that usually doesn’t make
a difference.
 But for working with mutable objects or collections of mutable objects, you
might be looking for a way to create “real copies” or “clones” of these
objects.
 Essentially, you’ll sometimes want copies that you can
modify without automatically modifying the original at the same time. In
this article I’m going to give you the rundown on how to copy or “clone”
objects in Python 3 and some of the caveats involved.
 Python training in USA
Thank you
https://www.gangboard.com/app-programming-scripting-training/python-
training

More Related Content

PPTX
Python Programming
PPTX
Python | What is Python | History of Python | Python Tutorial
PPT
Introduction to python
PDF
Functional Programming with Python (RuPy 2008)
PPTX
Python Programming Course
PDF
Python indroduction
 
PDF
Python training in delhi, request demo class (3)
PPTX
Python Programming
Python | What is Python | History of Python | Python Tutorial
Introduction to python
Functional Programming with Python (RuPy 2008)
Python Programming Course
Python indroduction
 
Python training in delhi, request demo class (3)

What's hot (19)

PDF
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
DOCX
Python Programming Language
PDF
Python an-intro v2
PDF
Raspberry using Python Session 3
PPTX
Best Way to Learn Python for Non Programmer | Python Programming for Absolute...
PDF
Python an-intro youtube-livestream-day1
PPTX
The Python outside of your textbook
PPTX
Listen and look at your PHP code
PDF
Python training in delhi, request demo class (2)
PDF
Scientific Programming in Python
PDF
Py tut-handout
PDF
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
PDF
Python training in delhi, request demo class (1)
PPTX
A brief primer on OpenAI's GPT-3
PPT
Learn python
PDF
Python training in delhi, request demo class
PPTX
Introduction to Python Basics Programming
PDF
Response to uspto on the first topic v5
PDF
Python training in hyderabad, request demo class (2)
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Programming Language
Python an-intro v2
Raspberry using Python Session 3
Best Way to Learn Python for Non Programmer | Python Programming for Absolute...
Python an-intro youtube-livestream-day1
The Python outside of your textbook
Listen and look at your PHP code
Python training in delhi, request demo class (2)
Scientific Programming in Python
Py tut-handout
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python training in delhi, request demo class (1)
A brief primer on OpenAI's GPT-3
Learn python
Python training in delhi, request demo class
Introduction to Python Basics Programming
Response to uspto on the first topic v5
Python training in hyderabad, request demo class (2)
Ad

Similar to Advanced topics with python (20)

PDF
Python 3.5: An agile, general-purpose development language.
PDF
25 must know python for Interview by Tutort Academy
PDF
summer training report on python
PDF
Introduction to Python Objects and Strings
PPT
Pythonintroduction
PDF
A tour of Python
PDF
An overview of Python 2.7
PPTX
intro to python.pptx
PPT
FALLSEM2022-23_ITA3007_ETH_VL2022230100613_Reference_Material_I_23-09-2022_py...
PPTX
What is python
PDF
silver gemstone sun pendant silver pendant gemstones
PPT
Python basics to advanced in on ppt is available
PDF
IRJET- Why Python Rocks for Research....???
ODP
Programming Under Linux In Python
PDF
Python Crash Course
PPT
Master Python Basics Easily – From Zero to Real-World Applications for UG Stu...
PDF
Introduction to python
PPTX
Introduction To Python
PPTX
Python Mastery: A Comprehensive Guide to Setting Up Your Development Environment
ODP
James Jesus Bermas on Crash Course on Python
Python 3.5: An agile, general-purpose development language.
25 must know python for Interview by Tutort Academy
summer training report on python
Introduction to Python Objects and Strings
Pythonintroduction
A tour of Python
An overview of Python 2.7
intro to python.pptx
FALLSEM2022-23_ITA3007_ETH_VL2022230100613_Reference_Material_I_23-09-2022_py...
What is python
silver gemstone sun pendant silver pendant gemstones
Python basics to advanced in on ppt is available
IRJET- Why Python Rocks for Research....???
Programming Under Linux In Python
Python Crash Course
Master Python Basics Easily – From Zero to Real-World Applications for UG Stu...
Introduction to python
Introduction To Python
Python Mastery: A Comprehensive Guide to Setting Up Your Development Environment
James Jesus Bermas on Crash Course on Python
Ad

Recently uploaded (20)

PDF
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
PDF
Open folder Downloads.pdf yes yes ges yes
PDF
Business Ethics Teaching Materials for college
PPTX
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PPTX
Introduction and Scope of Bichemistry.pptx
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Insiders guide to clinical Medicine.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
Open folder Downloads.pdf yes yes ges yes
Business Ethics Teaching Materials for college
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Renaissance Architecture: A Journey from Faith to Humanism
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Anesthesia in Laparoscopic Surgery in India
Cardiovascular Pharmacology for pharmacy students.pptx
Introduction and Scope of Bichemistry.pptx
Revamp in MTO Odoo 18 Inventory - Odoo Slides
O7-L3 Supply Chain Operations - ICLT Program
Insiders guide to clinical Medicine.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Open Quiz Monsoon Mind Game Prelims.pptx

Advanced topics with python

  • 2. Topics  Advanced Git Tips for Python Developers  Pure Python vs NumPy vs TensorFlow Performance Comparison  Socket Programming in Python  Itertools in Python 3  Python Metaclasses  What is the Python Global Interpreter Lock (GIL)?  Shallow vs Deep Copying of Python Objects
  • 3. Advanced Git Tips for Python Developers
  • 4.  If you’ve done a little work in Git and are starting to understand the basics we covered in Our Introduction to Git, but you want to learn to be more efficient and have more control, then this is the place for you!  In this tutorial, we’ll talk about how to address specific commits and entire ranges of commits, using the stash to save temporary work, comparing different commits, changing history, and how to clean up the mess if something doesn’t work out.  Python training in Chennai
  • 5. Pure Python vs NumPy vs TensorFlow Performance Comparison
  • 6.  Python has a design philosophy that stresses allowing programmers to express concepts readably and in fewer lines of code.  It is technically possible to implement scalar and matrix calculations using Python lists. However, this can be unwieldy, and performance is poor when compared to languages suited for numerical computation, such as MATLAB or Fortran, or even some general purpose languages, such as C or C++.  Numpy provides support for large multidimensional arrays and matrices along with a collection of mathematical functions to operate on these elements.  TensorFlow is an open-source library for numerical computation originally developed by researchers and engineers working at the Google Brain team.  Python training in Bangalore
  • 8.  Sockets and the socket API are used to send messages across a network. They provide a form of Inter process Communication (IPC).  This tutorial has three different iterations of building a socket server and client with Python:  We’ll start the tutorial by looking at a simple socket server and client.  Once you’ve seen the API and how things work in this initial example, we’ll look at an improved version that handles multiple connections simultaneously.  Finally, we’ll progress to building an example server and client that functions like a full-fledged socket application, complete with its own custom header and content.  Python training in Pune
  • 10.  It has been called a ”gem” and “Pretty much the coolest thing ever,” and if you have not heard of it, then you are missing out on one of the greatest corners of the Python 3 standard library: itertools.  A handful of excellent resources exist for learning what functions are available in the itertools module. The docs themselves are a great place to start. So is this post.  The thing about itertools, though, is that it is not enough to just know the definitions of the functions it contains. The real power lies in composing these functions to create fast, memory-efficient, and good-looking code.  Python training institute in Chennai
  • 12.  The term metaprogramming refers to the potential for a program to have knowledge of or manipulate itself. Python supports a form of metaprogramming for classes called metaclasses.  Metaclasses are an esoteric OOP concept, lurking behind virtually all Python code. You are using them whether you are aware of it or not. For the most part, you don’t need to be aware of it. Most Python programmers rarely, if ever, have to think about metaclasses.  Python training institute in Bangalore
  • 13. What is the Python Global Interpreter Lock (GIL)?
  • 14.  The Python Global Interpreter Lock or GIL, in simple words, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter.  This means that only one thread can be in a state of execution at any point in time. The impact of the GIL isn’t visible to developers who execute single-threaded programs, but it can be a performance bottleneck in CPU-bound and multi-threaded code.  Python training institute in Pune
  • 15. Shallow vs Deep Copying of Python Objects
  • 16.  Assignment Statement in python do not create copies of objects, they only bind names to an object. For immutable objects, that usually doesn’t make a difference.  But for working with mutable objects or collections of mutable objects, you might be looking for a way to create “real copies” or “clones” of these objects.  Essentially, you’ll sometimes want copies that you can modify without automatically modifying the original at the same time. In this article I’m going to give you the rundown on how to copy or “clone” objects in Python 3 and some of the caveats involved.  Python training in USA