Python short videos for interview preparations

Python #2 handling file not found error

Python # 15 Lambda function in Python 3 onwards

Python #7 Exceptions | AttributeError — happens when an attribute reference or assignment fails

Paython #8 Exception |IOError — happens when I/O operation open() function fails like file not found

Python #9 Exception | ImportError happens when import statement cannot locate the module definition

Python # 10 Exception | IndexError  happens when a sequence subscript is out of range

Python #11 Exception KeyError :happens when a dictionary key isn’t found in the set it existing keys

Python # 12 Exception | NameError happens when a local or global name can’t be found

Python # 14 Nested If statements to check multiple conditions

Python # 16 How to find highest value in an array

Python #13 What is if __name__ == “__main__”: in python

Python # 6 if elif else condtion code example for python | code logic

Python #5 How to define own function code example | python automation | programming

Python #4 argparse standard library for taking commandline arguments into python program

Python #1 for looping  | Python programming

Python #3 logging usage | import logging

Python # 19 Python 3.9 features | new features in Python 3.9

DevOps tool chain and important tools and frameworks

  1. Source code management:
    GitHub, BitBucket, GitLab
  2. Programming Languages:
    Java, Python,JavaScript,
    Typescript
  3. Build management tools:
    Gradle, Maven, Ant
  4. Configuration management:
    Ansible, Chef, Puppet,
    Salt Stack
  5. Container:
    Docker, LXC, RKT
  6. Container orchastrators:
    Kubernetes, Docker swarm,
    Openshift, NoMad
  7. Infrastructure Provisioning:
    Terraform, Azure template,
    AWS cloud formation,
    Google Deployment Manager
  8. Monitoring :
    DataDog, Grafana, Zabbix,
    Prometheus, Checkmk,
    New Relic
  9. Logging:
    Splunk, ELK, Graylog
  10. Clouds:
    Azure, AWS, GCP, OpenStack ,
    IBM Bluemix, Alicloud
  11. CI/CD:
    Jenkins, Travis CI, Circle CI
    TeamCity, AWS CodePipeline,
    Google Cloudbuild, Gitlab CI
    Bitbucket pipeline, Github action
  12. Web Server:
    Apache, Nginx, IIS,
    Jetty, Tomcat
  13. Caching Server:
    MemCache, Redis
  14. NoSQL Database:
    MongoDB, Cassandra,
    Google datastore,
    AWS Dynamo db
  15. SQL Database:
    Oracle, MySQL, MsSQL
    PstgreSQL

Kubernetes concepts, cluster, nodes, docker container, image, Dockerfile

Kubernetes concepts to remember:

1. Kubernetes Cluster: combination of large number of node machines

2. node machines:where Kubernetes software is installed and docker containers are hosted

3. docker container:each node machines contain large number of docker containers

4. docker image:Docker instructions are build and stored as image

5.Dockerfile:Docker instructions are written in markup language and stored in Dockerfile

Docker more info:

  1. Docker image can be run in terminal interactive mode while container started.
  2. While running in the terminal interactive mode, any program runtime, or filesystem can be added to the live container.
  3. A commit on container can create another fresh image.
    4.Fresh image from container can be tagged for easy use.
  4. Now the fresh image will have ubundu and the additional file system, runtime(like Java runtime) associated.

Git basic concepts to remeber

Git basic concepts
to remeber:

  1. working directory:
    this is local folder where
    coding is done using IDE
  2. staging area:
    git add command move
    code from working directory (1)
    to staging area
  3. local repository:
    git commit command will move
    code to local repo with a commit id
  4. remote repository :
    During git push code will get moved to remote repo that will be git/bitbucket

git fetch will move remote
repo commits to local repo

git merge moves code from local
repo to working directory

What is JUnit and what are the mostly used Annotations

JUnit is a unit testing library.

@Test – is an Annotation to mark test method in a class to act like test.

@TestFactory – Annotation for creating test method on run time, done by creating ranodmized tests or tests from external data

@DisplayName – to make reports readable with repoet name

@Disabled – to skip junit tests

@BeforeAll/@BeforeEach – lofe cycle mthods meant to run before tests

@AfterAll/@AfterEach – method to do clean up/tear down, meant execute after tests

#shorts#JUnit#Annotations

What are the new features in Python 3.9

Python 3.9 features:

1. High performance andflexibility – PEG basedparser (replaced currentLL(1) ) has high performanceand stability.

2. New 2 operatorsmerge “|”, and “|=” updateare introduced forDictionary operations

3. new two string functionsadded to string object for easy coding experience.they are ‘removeprefix(string)’and removesuffix(string) as below’prefix-n’. removeprefix(‘prefix-‘)’n-suffix’. removesuffix(‘-suffix’)both code provides ‘n’ as result

4. Type hinting for built-in generictypes for easy coding & understanding

What is single and double slash for xpath

#shorts
What is Single slash ‘/’
in Xpath in selenium:

Single slash ‘/’ is used
when absolute Xpath
is considered for Element
identification for Selenium
WebDriver

What is Double slash ‘//’
in Xpath in selenium:

Double slash ‘//’ is used
when relative Xpath
is considered for Element
identification for Selenium
WebDriver

Relative Xpath ‘//’
is better Element
identification strategy

Java access modifiers:default, public, privateand protected

Java access modifiers:default, public, privateand protected.

1. default access modifier:here variables and methodsare accessible with in samepakage and not in other pakages

2. public access modifier:variables and methods are acce-ssible in same & other pakages

3. private access modifier:does not allow accessoutside to class or file

4. protected access modifier:here same pakage accessis allowed and other pakageaccess is allowed throughsubclass by extending theclass having protectedvariables and methods

#shorts#javaaccessmodifiers#access#modifiers#default#public#private#protected