Python Content
Python Content
Flat No: 212, 2nd Floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyd. And #101, Sree Swathi Anukar.
[email protected] www.kellytechno.com Ph & Whatsapp: 998 570 6789, Online: 001 973 780 6789
PYTHON
○ Ordering a list ● Sets are hashable but Lists or
■ sort() unhashable
■ reverse() ● Set Use-Cases
○ Finding index of an element - ● Dictionary
index() ○ Introduction of Dictionary -
○ List of lists Associative data structure
○ Comparing lists ○ Creating a Dictionary
○ Adding elements to Dictionary
● Homogeneous data ○ Deleting key value pair
○ Built-in array.array() ○ Updating / extending a Dictionary
○ numpy.array() ○ Iterating through a Dictionary
● Tuple ○ Tuple unpacking method
○ Introduction of Tuple ○ Converting list/tuples of tuples/lists
○ Tuple Slicing into Dictionary
○ -ve indexing ○ Converting Dictionary to List of
○ Iterating through a Tuple tuples
○ List of tuples Vs Tuple of Lists ○ Lambda introduction
○ Purpose of a tuple ○ Sorting List of tuples and dictionaries
○ Finding max(), min() in a dict
● List Vs Tuple - An interviewer’s ○ Wherever you go, dictionary follows
question you!
● Set ● Counter() - simplest counting algorithm
○ Introduction of set ● DefaultDict - Always has a value
○ How to remove duplicates in ● OrderedDict - Maintains order
list? ● Dequeue - Short time memory loss
○ How set removes duplicates? ● Forzenset() – hashable set
○ Set functions ● namedtuple() – hashable dict
■ Searching for an ● Heapq - efficient in-memory min-heap()
element ○ heapify()
■ In - The fastest ○ nlargest()
■ Adding an element ○ nsmallest()
■ add() ○ heappush()
■ Removing an element ○ heappop()
■ remove()
■ discard() ● Importance of Hashability
■ pop() ● Packing and Unpacking
○ Relation between two sets ○ Swapping two values
■ intersection() ○ List packing and Unpacking
■ union() ○ Tuple packing and Unpacking
■ difference() ○ String packing and Unpacking
■ isdisjoint() ○ Set packing and Unpacking
■ issubset() ○ Iterator using iter() and next()
■ issuperset()
○ Merging two sets
■ update()
Flat No: 212, 2nd Floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyd. And #101, Sree Swathi Anukar.
[email protected] www.kellytechno.com Ph & Whatsapp: 998 570 6789, Online: 001 973 780 6789
PYTHON
Functions ● Folders Vs Packages
● Purpose of a function ● __init__.py
● Defining a function ● Namespace
● Calling a function ● __all__
● Function parameter passing ● Import *
○ Formal arguments ● Private global variables and
○ Actual arguments functions
○ Positional arguments ● __butiltins__
○ Keyword arguments ● Recursive imports
○ Variable arguments ● Use Case: Project Structure
○ Variable keyword arguments
○ Use-Case *args, **kwargs
● Function call stack Comprehensions
○ locals() ● List comprehension
○ globals() ● Tuple comprehension
○ Stackframe ● Set comprehension
● Dictionary comprehension
● Call-by-object-reference ● enumerate
○ Shallow copy - copy.copy() ● Zip and unzip
○ Deep copy - copy.deepcopy()
Functional programming
Decorators and Generators ● Procedural vs Functional
● Passing one function to another ● Pure functions
function ● Map()
● Defining one function within another ● Reduce()
function ● Filter()
● Returning a function from another ● Lambdas
function ● Loop vs Comprehension vs Map
● Passing a function to another function
File - IO
along with its arguments
● Call-back functions and delegation ● Creating file
● Decorators ● File reading
○ Creating decorators ● File writing
○ Multiple decorators ● File modes
○ Use case - TimeIt ● Line by line file reading
● Generator ● Writing multiple lines
○ Creating custom generators ● seek()
○ Use Case - lazy evaluation ● tell()
● Binary files
Modules ○ Pickling
● Python Code Files ● Use Case - Cleaning text
● Importing functions from another file
Pet Project – Students and Faculties
● __name__: Preventing unwanted code
execution
● Importing from a folder
Flat No: 212, 2nd Floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyd. And #101, Sree Swathi Anukar.
[email protected] www.kellytechno.com Ph & Whatsapp: 998 570 6789, Online: 001 973 780 6789
PYTHON
Advanced Python Exception Handling
Object Orientation ● Purpose of Exception Handling
● try block
● Purpose of Object Orientation
● except block
● Design starts with Data Binding
● Else block
● Abstraction - What the world sees
● finally block
● Data hiding - What is hidden
● Built-in exceptions
● Encapsulation - Boundary between
● Order of ‘except’ statements
Abstraction and Data hiding
● Exception - mother of all exceptions
● Class - Classification of type
● Writing Custom exceptions
● Creating a class type
● Stack Unwinding
● Creating multiple instances of a
● Use Case - finally
functionality
● Interview Questions
● Object - The physical existence of a
● Summary
class
● __init__() - the initializer
Descriptors
● Data members
● Member functions(methods) ● Abstract
● Method invocation ● Definition and Introduction
● Printing objects ● Descriptor Protocol
● __str__() ● Invoking Descriptors
● __repr__() ● Descriptor Example
● Inheritance ● Properties
○ Use Case - 4 wheeler ● Functions and Methods
○ Types of inheritance ● Static Methods and Class Methods
○ Diamond problem
○ MRO Multi-Threading
● Private members ● Program Memory Layout
● Creating inline objects, classes, types ● Concurrency
● Class method ● Parallelism
● Static method and static variables ● Process
● Function Objects(Functor) - Callable ● Thread of execution
Objects ● Creating a thread
● Class as decorator and Context ● Joining a thread
manager ● Critical section
● Polymorphism - Incorporating ● Lock and Conditional variable
changes ● Wait, notify, notify all
● Operator Overloading ● How much concurrency is required?
○ __lt__() ● GIL
○ __add__() ● Multiprocessing
○ __hash__() ● Python on JVM - jython and threading
○ __eq__() ● Producer - consumer: 1 dad - 2 Sons
● Lock-free Programming Intro
● Function Overloading in python ● Interview Questions
● Sorting objects ● Exercise Programs
● Hashing objects ● Summary
Flat No: 212, 2nd Floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyd. And #101, Sree Swathi Anukar.
[email protected] www.kellytechno.com Ph & Whatsapp: 998 570 6789, Online: 001 973 780 6789
PYTHON
Database connections ● json parsing and construction -
● Database introduction json, simplejson
● MYSQL database connection setup ● Interview Questions
● Installing connector ● Exercise Programs
● Cursor ● Summary
● Running a query Unit testing
● Iterating a cursor
● Fetching data ● Purpose of Unit testing
● Closing a connection ● Unittest2 module
● Mongo DB setup ● Test case
● Creating collections ● Test Suit
● CRUD operations ● assert()
● Interview Questions ● nosetests module
● Exercise Programs ● Coverage module - Code coverage
● Mocking – faking
Regular Expressions ● Profiling
● Functions ● Interview Questions
○ re.match() ● Exercise Programs
■ start() ● Summary
■ end()
Logging
■ group()
○ re.search() ● Purpose of logging
○ re.findall() ● Logging levels
○ Regex symbols ● Types of logging
● Logging format
● Greedy and non-greedy ● Logging Handlers
● Interview Questions ● Use-Case- Rotating File Logger
● Exercise Programs ● Disadvantages of excessive logging
● Summary ● Custom loggers
● Interview Questions
Useful modules ● Exercise Programs
● datetime ● Summary
● time
ORM Object relational mapping
● pytz
(optional)
● sys
● os ● Purpose
● random ● Creating engine
● Create a schema
Serialization pickling, XML & JSON ● Declare mapping
● Connecting
● Introduction to Serialization
● Create session
● Structure and Container
● Adding and Updating records
● Pickle Module
● Rolling back
● pickling built-in data structures
● Building a relationship
○ byte strings
● Querying
○ binary
● Deleting
● xml parsing and construction - xml,
lxml
Flat No: 212, 2nd Floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyd. And #101, Sree Swathi Anukar.
[email protected] www.kellytechno.com Ph & Whatsapp: 998 570 6789, Online: 001 973 780 6789
PYTHON
Networking (optional) Assigning a column to the data frame
● TCP/IP Basics Adding a new column
● 3 way and 4 way Handshake Deleting a column
● Socket programming Slicing
● Simple TCP Client – Server Indexing and Advanced indexing
● Simple UDP Client – Server Boolean indexing
● Emailing - smtplib Transposing
● FTP Sort by
Pet Project – Students & Faculties with OOPS Concatenate
Merge
Data analysis 1. Inner join
2. Outer join
Numpy
3. Left outer join
○ Numpy arrays
4. Right outer join
Double dimension arrays
5. Merge on columns
■ Resizing, reshaping
Join
■ Vector multiplication
Group By- Aggregation
■ Boolean filtering
Data Munging
■ Querying using where()
6. Working with missing data
function
Reading Data from CSV, Excel, JSON
■ Indexing
Writing Data to CSV, Excel, JSON, HTML
■ Slicing
Reading data from database and storing in
■ Mean, median, standard
data frame
deviation, average
Writing data frame to database
■ Transpose
Handling PDF files - tabula-py
■ broadcasting
○ Numpy matrix Matplotlib
■ Addition, multiplication
b. Basic Plotting
■ Transpose, inverse
i. Colors
○ Numpy random module
ii. Styles
iii. Seaborn themes
Pandas
c. labels
l. Series
d. Title
Constructing from dictionaries
e. Legend
Custom index
f. Axis
Data filtering
g. Bar chart
m. Data Frames
h. Histogram
Constructing from a dictionary
i. Scatter Plot
with values as lists
j. Box Plot
Custom indexing
k. Pie Chart
Rearranging the columns
Interview Questions
Accessing values loc(), iloc(),
Exercise Programs
at()&iat()
Summary
Setting values
Sum
Pet Project – 911 Data Analysis &
umulative sum
Visualization
Flat No: 212, 2nd Floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyd. And #101, Sree Swathi Anukar.
[email protected] www.kellytechno.com Ph & Whatsapp: 998 570 6789, Online: 001 973 780 6789
PYTHON
Django with REST Webservices
● Client Server architecture
● MVC and MVT
● Web Application
● Website
● Web server – Apache, nginx, node
● Web client
● Web framework
● Introduction to Ubuntu Linux
● Installaing mysql and virtualenv
● Creating virtual environments for python3
● Installing Django modules
● Creating first basic Django Project – Web-news Use-Case
● Process of Migrations
● Request response cycle
● Understanding ORM
● Creating Model classes
● Admin Interface
● Adding Data through Admin Interface
● Templating and rendering
● Creating Django Apps
● URL Routing
● Django Template tags and template programming
● Django rest framework
● Understanding REST Architecture
● HTTP GET, PUT, POST, DELETE and UPDATE
● Serializer classes
● JSON serialization
● Writing REST API
● Testing with Postman
● Nginx Setup & AWS Deployment walkthrough
● Working with domain names setting public IP walkthrough
● Real-Time Project Explanation
● Summary
Flat No: 212, 2nd Floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyd. And #101, Sree Swathi Anukar.
[email protected] www.kellytechno.com Ph & Whatsapp: 998 570 6789, Online: 001 973 780 6789