Posts

Showing posts from March, 2022

Multivariate Linear Regression Program in Python

Image
 Multivariate Linear Regression Program in Python Here, There are many dependent variables and only one independent variable # Importing packages import pandas as pd import numpy as np import math from word2number import w2n from sklearn import linear_model # Read the csv File (Input File/Train data) df = pd . read_csv ( "D:\hiring.csv" ) df # Filling the experience column considering that experience as zero df .experience = df .experience.fillna( "zero" ) df # To fill the Test score column, we will take mean of all test_score and replace NaN with that value median_test_score = math . floor ( df [ 'test_score(out of 10)' ]. mean ()) median_test_score df [ 'test_score(out of 10)' ] = df [ 'test_score(out of 10)' ]. fillna ( median_test_score ) df # Converting the experience column from string(str) to Value(num) df .experience = df .experience.astype( str ) df .experience = df .experience.apply( w2n . word_to_num ) df # Train the...

Simple Linear Regression Program in Python

 Simple Linear Regression Program in Python Here. There is only one dependent variable and one independent variable. # Import Packages import pandas as pd import numpy as np import matplotlib . pyplot as mlt from sklearn import linear_model # Read the csv File (Input File/Train data) df = pd . read_csv ( "D:\canada_per_capita_income.csv" ) df # Plotting the data in graph %matplotlib inline mlt . xlabel ( 'Years' )     # Dependent variable mlt . ylabel ( 'Per Capita Income' )     # Independent variable mlt . scatter ( df .year, df .per_capita_income, color = 'red' , marker = '.' ) # Train the model using Linear Regression reg = linear_model . LinearRegression () reg . fit ( df [[ 'year' ]], df .per_capita_income) reg . predict ([[ 2017 ]]) # Here Years will be present in CSV file pred_df = pd . read_csv ( "D:\Years.csv" ) pred_df # Train the model future_pred = reg . predict ( pred_df ) future_pred # Output will...

Automation with Gulp Quiz

  1.  How does installing Gulp globally help? Answer: Helps to run 2.  Before installation of Gulp, installation of _____________ acts as pre-requisite Answer: node 3.  Between Grunt and Gulp, which is relatively fast? Answer: Gulp 4.  Which Streams provide ability to both read and write? Answer: Transform 5.  Streams are Asynchronous. Is this True or False? Answer: True 6.  While installing gulp, the first installation step would be __ ______. Answer: $npm install gulp g 7.  Streams which play vital role in gulp, has its origin from __ ________. Answer: Unix 8.  The default task representation in gulp will be like _________. Answer: {} 9.  Streams are represented as _________. Answer: .pipe() 10. While installing gulp with $npm install gulp --save-dev, what does --save-dev represents? Answer: .json updated 11. Which plugin notifies whenever there is any change in file? Answer: gulp-watch 12. Which command in the CLI will trigger the 'de...

Continuous Integration with Jenkins Quiz

  1. Jenkins allows you to : Answer: All of the options 2. Jabber is a : Answer: Messaging plugin 3. Project type supported by Jenkins is/are: Answer: All of the options 4. Which of the following statement is true about Jenkins? Answer: Jenkins supports plugins to showcase both metrics and trends   5. Which of the following functionality is not supported by Jenkins Answer: Code 6. Which of the following is an artifact repository that can be configured as a plugin for Jenkins Answer: Nexus 7. Jenkins can manage job dependencies using Answer: File Fingerprinting 8. Job status notifications can be sent in JSON or XML formats from Jenkins, with out extending it's functionality. Answer: False   9. Record of multiple builds is displayed using a Answer: Weather icon 10. Jenkins build job cannot be triggered manually? Answer: False   11. In the build status images, which of the following statement is correct? Answer: Partial Sun with clouds icon in the status means 20-40% of...

Continuous Integration Quiz

  1. Feature branching is used to _. Answer: Work on user stories 2. Release branches are created for resolving merge conflicts. Answer: False 3. Which is NOT a benefit of CI ? Answer: Bugs and defects no longer occur 4. Activities that are part of continuous integration. Answer: All of the Options 5. Which is not a CI practice ? Answer: Deploy to production 6. Which is NOT true about continuous integration ? Answer: Involves moving code in large amounts 7. Work Branch is also known as_. Answer: Codeline 8. Git is a _ version control system. Answer: Distributed 9. Time taken to fix a broken build is measured using __. Answer: Build repair rate 10. __ is a .Net build tool. Answer: NAnt 11. Pipeline break and build break is one and the same. Answer: False 12. Capablility of your build system to handle an increase in the amount of code that it integrates and analyzes is known as . Answer: Build scalability 13. Complexity of a code is determined based on ___. Answer: Cyclomatic Complex...

Advanced Probability Quiz

  1. Multivariate data analysis helps us to__   Answer: both 2. What is multivariate statistics?   Answer: All options 3. Multivariate data analysis is application of__ Answer: All options 4. Use of only one variable to describe the data is known as__ Answer: Uni 5. What are the features of multivariate random variable? Answer: both 6. Independent variables refers to those variables__   Answer: which act as 7. __ is an example of Multivariate analysis in which relationship exist between a dependent variable and independent variable/s. Answer: partial least 8. Pattern such as group or trend in the data table can not be studied using Multivariate data analysis. Answer: Incorrect 9. Dependent variables refer to those variables__   Answer: variation is analyzed 10. Lurking variable remains__ Answer: Hidden 11. Amalgamation paradox is also known as__   Answer: Simpson's 12. Principal component analysis reduces__   Answer: large no of correlated ...

DevOps Culture Quiz

  1. Understanding of what we are deploying and how we are deploying comes under which habit of DevOps Answer: Configuration Management 2. __ __________ is the primary measure of progress according to Agile Manifesto. Answer: Working Software 3. DevOps encompasses _ Answer: Automation 4. DevOps is the union of ___ , __ __ and __ to enable continuous delivery of value to end users. Answer: People, Processes and Products. 5. Improve quality and performance of the applications is a major driver for switching to DevOps Answer: True 6. Which of the following is a value of DevOps Answer: DevOps goals span the entire delivery pipeline 7. DevOps encompasses culture and collaboration Answer: True 8. Product Management is one of the 7 DevOps practices Answer: False 9. Which of the following can slow down your ability to deliver code effectively ? Answer: Technical Debt 10. What is the desire in the organization to push things to production termed as ? Answer: Live Site Culture 11. ...

Service Discovery Quiz

  1. Identify the key aspects for a successful service discovery solution Answer: All the options mentioned 2. Service Discovery can perform the following for the services Answer: All the options mentioned 3. Which of the registration patterns is best suited for complex architecture Answer: Third party registration pattern 4. Identify the right service registry solutions that supports discovery Answer: Zookeeper 5. In _ pattern, clients connect with the backend services directly Answer: Client side discovery pattern 6. _ supports load balancing in addition to service discovery Answer: Ribbon 7. Is it possible for any service discovery tool to satisfy all the three guarantees (Consistency, Availability, Partition) in a distributed environment? Answer: No. Only two of the guarantees can be achieved 8. In distributed systems, to service any Read / Write request, a leader node is mandatory. Is this statement correct Answer: No. Leader node is required for only for write request...

Microservices Architecture Quiz

  1. Agile development & Deployment is difficult in case of __ __ Answer: Monolithic 2. Software built as microservices can, by definition, be broken down into multiple component services ? Answer: True 3. Separating components with conflicting resource requirements falls under the bucket of _ Answer: Microservices 4. Complexity of developing, testing & deploying distributed system, Handling partial failures account to disadvantages of Answer: Microservices 5. Benefits of Microservices include - Answer: All the options 6. Decomposition of Microservices based on 2 categories namely Answer: Business capability , Subdomain 7. Simple to Develop, Test, Deploy, Scale represents __ __ Answer: Monolithic 8. Is Microservice is considered as subset of SOA ? Answer: True 9. The 3Cs of Microservices includes all these except Answer: Control 10. Microservice Architecture adapts following concepts Answer: All the options 11. The client expects a timely response from the servic...

Probability Quiz

  1.  An essential component of the Central Limit Theorem is that Answer: All the options 2.  A failing student is passed by an examiner, it is an example of Answer: Type-II error/ Unbiased decision 3.  The dividing point between the region where the null hypothesis is rejected and the region where it is not rejected is said to be Answer: critical value 4.  An advertising agency wants to test the hypothesis that the proportion of adults in a country who read a Sunday Magazine is 25 percent. The null hypothesis is that the proportion reading the Sunday Magazine is: Answer: Equal to 25% 5.  In which examples could binomial distribution be used? Answer: Modelling the number of failures in a trial 6.  Any hypothesis which is tested for the purpose of rejection under the assumption that it is true is called? Answer: Null hypothesis 7.  A statistician calculates a 95% confidence interval for Mean when Standard Deviation is known. The confidence interval...

Digital Marketing Primer Quiz

  1. Digital Marketing helps to improve __ ________ Answer: All the options mentioned 2. Paid Search Marketing is about Bidding and Buying relevant keywords. Answer: True 3. Retargeting platforms enable advertisers to _____ Answer: All the options mentioned 4. Which of the following aims at influencing users who have already begun their research on sites like Google, but not necessary that they have visited a brand site. Answer: Search Retargeting 5. Customizing ads to people who had earlier visited the site is ___ Answer: Remarketing 6. Real time Biding is a form of Programmatic Buying. Answer: True 7. Facebook Adverts is an advertising platform that can deliver ads on ___ Answer: Both Facebook and Instagram 8. Google Ad Auction rewards advertisers with _ Answer: High Ad Rank 9. Which of the following design approaches help in building sites that are optimized for varied screen sizes? Answer: Responsive Web Design 10. Which of the following capabilities are offered by We...

Grunt.js Quiz

  1. Presence of _ Answer: is must is to proceed ahead with installation of grunt Node.js 2. Which takes care of performing the repetitive mundane work in Grunt.js? Answer: TaskRunner 3. Registering of tasks happens within Answer: Gruntfile 4. The 3 main actions to be performed in gruntfile include Answer: Configurations , loading plug-ins, Register tasks 5. Grunt.js helps with simplification through automation. Is this true or false ? Answer: True 6. Grunt does not allow users to add their custom developed plug-ins and publish them to npm. Answer: False 7. Which of these is officially maintained grunt plug in? Answer: contrib-less 8. The number of plug-ins available in grunt is Answer: around 6000+ 9. CSS with superpowers' : This refers to _ Answer: SASS 10. Which plug-in assists with cleaning of the unwanted folders & files Answer: grunt-contrib-clean 11. The grunt plug-in to remove any unwanted CSS within project is Answer: grunt-uncss 12. After installing any pl...

Docker Quiz - Part 3

  1. Docker registry is a Answer: Storage house for the Docker images 2. Image from the host machine can be deleted by using Answer: docker rmi imageName 3. How will you check the version of installed Docker? Answer: docker –version 4. Which sub-command helps you to verify the downloaded images? Answer: docker images   5. Which sub command is used to download images from a registry? Answer: docker pull 6. Which of the following is not a Docker Registry? Answer: none 7. Application running in a VM is hidden from the host OS with the help of Hypervisor/ VMM. Answer: true 8. Why Docker Networking is needed? Answer: small 9. Which of the following is not a component of Docker Engine? Answer: none 10. Docker hub images can be accessed at Answer: docker 11. Container can alter host filesystem without any restriction. Answer: true 12. Which of the following statements is true about containerization Answer: all 13. Docker Daemon and Docker client use same binary. Answer: ...

Docker Quiz - Part 2

 1. Manager node can also act as a worker node Answer: true 2. Swarm task is Answer: Unidirectional 3. Worker Node is responsible for container Orchestration Answer: False 4. Docker swarm command to inspect the new swarm service created Answer: docker service inspect <service-name> 5. Docker swarm command to remove a service Answer: docker service rm <service-name> 6. Which is not a correct type of service deployments for Docker Swarm Answer: Series 7. bridge network that connects hosts ports to container ports in overlay network. Answer: docker bridge network 8. Swarm task status when the task is initialized Answer: New 9. $docker service create --name Test --secret secret1 redis. Which of the following is incorrect w.r.t the output for this command Answer: create a service with secret for redis image 10. in the worker node executes the task on behalf of the worker node Answer: Executor 11. Docker command to list the secrets Answer: docker secret ls 12. Global service ...

Docker Quiz - Part 1

  1. Docker images have a different state and change with time. Answer: true 2. Which of the following is true? Answer: docker ps shows all running containers by default. 3. Which is the Docker command to show the version information of the docker components Answer: docker version 4. Which Dockerfile instruction can be used to install packages to our new image Answer: apt-get install  XXX 5. Which of the following is another term to describe container virtualization? Answer: Hypervisor vitualization 6. Which of the following is the correct way to name a docker file Answer: Dockerfile 7. Virtual machines are a form of __ __________ type of virtualization Answer: Container 8. What is the command to stop a container Answer: docker stop <Container> 9. What happens when you execute the command? Docker run debian /bin/sh Answer: A prompt from shell of created container will be thrown to you 10. Three events that are captured in docker diff command are Answer: ADC 11....

Data Mining Methods Basics Quiz

  1. Which of the following is not applicable to Data Mining? Answer: Involves working with known information 2. The process of extracting valid, useful, unknown info from data and using it to make proactive knowledge driven business is called Answer: Data mining 3. What is the other name for Data Preparation stage of Knowledge Discovery Process? Answer: ETL 4. Which of the following role is responsible for performing validation on analysis datasets? Answer: Statisticians 5. Which of the following activities is performed as part of data pre processing? Answer: Detect Missing Values 6. Which of the following modelling type should be used for Labelled data? Answer: Predictive Modelling  7. Noisy values are the values that are valid for the dataset, but are incorrectly recorded Answer: True 8. Which statistical technique deals with finding a structure in a collection of unlabeled data? Answer: Clustering 9. Probability of theft in an area is 0.03 with expected loss of 20% or 30% ...