# Feature Engineering in Python

We are living in a data-driven economy. It’s a world where having tons of data, understanding it and knowing what to do with data is power. Understanding your data is not one of the most difficult things in data science, but it is time-consuming. Interpretation of data is effective when we know about the source of data.

## Data

In God we trust. All others must bring data.” — W. Deming
First, we need to understand our data. There are 3 types of data:

1. Numerical
This represents some sort of quantitative measurement. Example: height of people, stock price, page load time etc. It…

# Introduction to Machine Learning for Beginners

“Aim for simplicity in Data Science. Real creativity won’t make things more complex. Instead, it will simplify them.”
Damian Duffy Mingle

So, Advertisement budget (Y) is known as Dependent Variable or response, and Television(X1), Radio(X2), Social Media(X3), Newspaper(X4) are known as Independent variable or predictors.

## Prediction

Relationship:- Y = f(X) + e is our real observed values.
f
is the target function that best maps input variables (X) to an output variable (Y).
Our prediction of Y…

# Statistics for Data Scientists in 5 mins

Facts are stubborn things, but statistics are pliable.”― Mark Twain

# Skew and Kurtosis: 2 Important Statistics terms you need to know in Data Science

If you don’t know some of the other frequently used terms in data science. Then click here.

# Skewness

It is the degree of distortion from the symmetrical bell curve or the normal distribution. It measures the lack of symmetry in data distribution.
It differentiates extreme values in one versus the other tail. A symmetrical distribution will have a skewness of 0.

There are two types of Skewness: Positive and Negative

# GIFs for Programmers

0. Java Developers be like

1. Programming languages in Human-form

2. When your code doesn’t & then does work

3. When bugs come with a “race-around” condition

4. Life as a Programmer

5. </coffee>

6. How it should be done in 2 weeks

7. Last minute“It’s a no big deal change”

8. “Sorry, but we have a deadline..”

9. When you are in the zone but — “Sorry to interrupt, just had a quick question.”

10. When your client says — “This isn’t what I wanted.”

11…

# How You can Write 100 lines of code in 1 Minute!

This is what I learnt from my Google sponsored scholarship for Front-End Web Development in Udacity on how to write code faster.

I’ve noticed that coding is repetitive in nature and sometimes we just have to write the same code in 10 different lines. The format of HTML is too tedious to repeat, especially when you’ve to deal with it on a day-to-day basis. So to write your code faster read ahead. This is the basic format of HTML 5.

I am using Sublime Text 3 to write codes.

## HTML format

`<!DOCTYPE html><html lang=”en”><head> <meta charset=”UTF-8"> <title></title></head><body><p>Lorem ipsum dolor sit amet, consectetur…`

# What is Jinja 2?

Jinja2 is a modern day templating language for Python developers. It was made after Django’s template. It is used to create HTML, XML or other markup formats that are returned to the user via an HTTP request. You can read more here.

## How To Get Jinja 2

`pip install jinja2easy_install jinja2`

# Why do we need Jinja 2?

1. Sandboxed Execution: It provides a protected framework for automation of testing programs, whose behaviour is unknown and must be investigated.
2. HTML Escaping: Jinja 2 has a powerful automatic HTML Escaping, which helps preventing Cross-site Scripting (XSS Attack). There are special characters like >,<,&, etc. which carry special meanings in the templates. So, if…

# Back-end Web Framework: Flask (Part-3: How to make a simple Login Page using Get and Post)

For previous posts Part-1 and Part-2

HTTP protocol is the core basis of data communication in (WWW) world wide web. It is designed to communicate between clients and servers. It works as a request-respond protocol. HTTP has different methods of data retrieval from specified URL and those methods have been defined in this protocol.

GET: Browser requests server to get data in an unencrypted form stored on that page and send it. It’s the default method. It can be cached and remains in browser history.

HEAD: It is only interested in the headers and not the content of the page…

# Back-end Web Framework: Flask (Part-2: Routing & URL Binding)

Web frameworks nowadays use the routing technique to help users to navigate through a web without having to remember application URLs. It is useful to access the desired page directly without having to navigate from the home page.

` from flask import Flask app = Flask(__name__) @app.route('/')     def index():     return 'This is homepage' @app.route('/about')      def about():      return '<h2> About page </h2>'  if __name__ == "__main__":     app.run(debug = True)`

Route() decorator can be used to inject additional functionality to one or more functions.

`app.route(rule, option)` Rule represents the URL binding with the function and option is a list of parameters to be…

# Back-end Web Framework: Flask (Part-1: Beginning )

Flask is a micro web framework written in Python and based on the Werkzeug toolkit and Jinja2 template engine. In this post, I’m going to use the stable version of Flask 0.12.2

`1. from flask import Flask2. app = Flask(__name__)3. if __name__ == "__main__":4.     app.run()`
2. We create the app object as an instance of class `Flask` imported from the flask package. The `__name__` variable passed to the `Flask` class is a Python predefined variable, which is set to the…