Skip to main content

Posts

Machine Learning model for predicting 'Salary' of an Employee based on 'YearsofExperience'

“ Data really powers everything that we do .” — Jeff Weiner In the 21st century, Data is one of the most valuable entity anyone can have! There is loads-and-loads of data generated everyday. And to process this huge amount of data we need people who have expertise in it, who by the way are called as Data Engineers. Data Engineer collects the raw data, process it for further use; but we need an Analytic process which will automatically predict the data based on the previous one. And here's how 'Machine Learning' comes into the picture. "Machine Learning allows us to make highly accurate predictions based on the Historical Dataset which is used to train the machine learning model." Today let us look at a similar ML model to predict the 'Salary' of Employees based on 'YearsofExperience'. (P.S: I've provided pdf link at the very bottom of this page for clear understanding) 1) import the required modules 2) read the csv file 3) plot the graph 4) us

WHERE and ORDER BY clause

* WHERE clause is used as a filter on the table  to get a desired output. It is used to full fill a given condition.  Syntax : -  SELECT column_name  FROM table_name  WHERE search_condition ORDER BY expression; WHERE clause appears after the FROM clause but before the ORDER BY clause.  WHERE clause not only is used in SELECT statement but also in the UPDATE and DELETE clause. We use ORDER BY clause at the very end of the query. • Lets say we have the emp table: and we want the names of the employees who's salary is greater than 2000. • So we will write a query: As we can see, the data is now filtered out. Earlier there were 14 rows but now after using WHERE clause we have 6 rows.  We always use WHERE clause with comparison operators like:  Now lets see ORDER BY clause: • Say we have the same query viz " SELECT * FROM EMP WHERE SAL>2000;" but now we want the data to be sorted in ascending order of sal column then we write-- SELECT  *  FROM  EMP  WHERE  S

Introduction to SQL

 Q.)  What is SQL ? Ans.) SQL(Structured Query Language) is a standardized language to communicate with the database.  With the help of it we can retrieve data from the database. SQL not only allows us to read the data but also allows us to write the data in the database.  Data in the database is stored in the form of tables. We can Select, Insert, Update, Delete, Create, Alter, Drop and can perform many more operations on the table. And these are called as SQL Statements. * SQL Statements are classified mainly into 4 categories :- 1) DML (Data Manipulation Language) 2) DDL (Data Definition Language) 3) DCL (Data Control Language) 4) TCL (Transaction Control Language) * Under DML we have :-(No Autocommit) 1. Select  2. Insert  3. Update  4. Delete  5. Merge    * Under DDL :-(Allows Autocommit) 1. Create 2. Alter  3. Drop  4. Truncate  5. Flashback * Under DCL :-(Allows Autocommit) 1. Grant  2. Revoke  * Under TCL :-(No Autocommit) 1. Commit 2. Rollback 3. Save point From above, we ca

Progress bar using HTML/CSS

(switch to desktop mode for better experience)  # html code : <! DOCTYPE   html > < html   lang = "en" > < head >      < link   href = 'E:\html\testpro\style.css'   rel = 'stylesheet' >      < meta   charset = "UTF-8" >      < meta   http-equiv = "X-UA-Compatible"   content = "IE=edge" >      < meta   name = "viewport"   content = "width=device-width, initial-scale=1.0" >      < title > progress bar </ title > </ head > < body >      < div   class = "box" >          < h1 >< u > progress bar </ u > : </ h1 >          < h2   id = 'h1' > c </ h2 >              < span   class = 'c'   id = 'bar1' ></ span >          < h2   id = 'h2' > c++ </ h2 >              < span   class = 'cpp'   id = 'bar2' ></ span >          &

BMI Calculator

Today; in the era of fast changing world where we've prioritized our job, one thing that is being highly compromised is our Health. Recently we've been through the CORONA crisis where we've acknowledge that how weak our immune system is. Bad eating habits and lack of sleep can get you anxiety, stress, fatigue and weakness all over your body. So the question arise: What should we do? One little thing that we could do is to know our Body Mass Index ; the BMI score. BMI is a measurement of a person’s weight with respect to his or her height. It is more of an indicator than a direct measurement of a person’s total body fat. BMI correlates with total body fat. This means that as the BMI score increases, so does a person’s total body fat. The WHO defines an adult who has a BMI below 18.5 is considered Underweight, between 18.5 to 24.9 a Healthy weight, a BMI between 25 and 29.9 as Overweight, and an adult who has a BMI of 30 or higher is considered Obese. BMI

coding_round#1

==>> This is a coding question asked in Tech Mahindra coding round. Q.) Given an array of integers representing measurements in inches, write a program to calculate the total of measurements in feet. Ignore the measurements that are less than a foot (eg. 10). Note:- You are expected to write code in the findTotalFeet function only which will receive the first parameter as the number of items in the array and the second parameter as the array itself. You are not required to take input from the console Example:- Finding the total measurements in feet from a list of 5 numbers Input:- 5                  18 11 27 12 14 Output:- 5 Explanation:-  The first parameter (5) is the size of the array. Next is an array of measurements in inches. The total number of feet is 5 which is calculated as shown below: 18->1 11->0 27->2 12->1 14->1 ==>> I've provided a solution for the following problem:- click on the image and zoom-in for more clarity. ( Plz feel free to

Weather Web App

*This is a Weather Web App build using HTML/CSS and JS Note : Enter any city name of your choice to check the weather updates. You can even try city names from different countries (like New York, London, Tokyo, Toronto, Paris) and it will give you the weather updates of that particular city. #For Quote and Joke generator : click here #For Number Guessing Game : click here