Python Concept (1) - PowerPoint PPT Presentation

About This Presentation
Title:

Python Concept (1)

Description:

Python is a multi-paradigm programming language. Meaning, it supports different programming approach. One of the popular approach to solve a programming problem is by creating objects. This is known as Object-Oriented Programming (OOP). – PowerPoint PPT presentation

Number of Views:368

less

Transcript and Presenter's Notes

Title: Python Concept (1)


1
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 youve 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, well 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 doesnt 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

7
Socket Programming in Python
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
  • Well start the tutorial by looking at a simple
    socket server and client.
  • Once youve seen the API and how things work in
    this initial example, well look at an improved
    version that handles multiple connections
    simultaneously.
  • Finally, well 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

9
Itertools in Python 3
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

11
Python Metaclasses
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 dont 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 isnt 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
    doesnt 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, youll sometimes want copies that
    you can modify without automatically modifying
    the original at the same time. In this article
    Im 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

17
  • Thank you
  • https//www.gangboard.com/app-programming-scriptin
    g-training/python-training
Write a Comment
User Comments (0)
About PowerShow.com