Artificial Intelligence (AI) has become a common phrase in current day and it no longer surprises us what some of the AI based systems used in our daily lives can achieve. However, this is a result of decades of progress. In this article, I present to you a brief history of AI. Pretty much all of it is a summary of a chapter in the book “Artificial Intelligence A Modern Approach” by Stuart J. Russell and Peter Norvig. It can be found here:

Image for post
Image for post

What is AI?

Before we define artificial intelligence, let us define intelligence. There are many ways to…


Image for post
Image for post
(Image Source)

Python provides a very strong module for manipulating date and time. This is specially useful in financial data since most financial data is time series data. Let’s start by import the module.

import datetime

The first step would be to check the time right now:

print(datetime.datetime.now())

We can also create a datetime object by passing in the year, month and day. So if we had to create an object for today’s date, we will do as follow:

today = datetime.datetime(2021, 1, 13)print(today)

Similary you can also add time. For example, we can add 3:15 pm to the date above:


Image for post
Image for post
(Image Source)

This article is a continuation to the first one, in which we learned how to create data frames and load data into data frames from CSV and Excel files.

In today’s tutorial, we will learn how to select data from a data frame. Let’s download stocks data from Yahoo Finance by clicking the download link on the page, which lets you download the data as a CSV file. This is historic data of S&P 500 stocks. I renamed the file to stocks.csv. Let’s start by importing pandas and load data from the CSV file. …


Image for post
Image for post
(Image Source)

This pandemic has completely changed our perception of the world we live in. At this point, almost all of us have been affected by it in one way of another. A lot of unfortunate souls have been lost to it and the struggle is still ongoing.

A lot of patients when they come into a hospital, may have episodes of confusion often termed as hospital delirium. Many things play a role in causing hospital delirium, like being ill, in unfamiliar surroundings, lack of quality sleep, lack of social stimulation and certain medications. Things like social interactions, family visits, and familiar…


Image for post
Image for post
(Image Source)

What is pandas Data Frame?

The simplest way of describing Data Frame is to think of it as a spreadsheet or table, with rows and columns. Columns are labeled by column names and row have an index column. However, Data Frame is very efficient for large amount of data. It makes applying functions to the data very efficient, both in terms of coding as well as runtime. It is probably the most commonly used pandas data object.

First of all we will import pandas as pd:

import pandas as pd

Creating a Data Frame object:

There are a few ways…


Update (1/25/2021): It seems like the code no longer works, response is error 429 from instagram, which means too many requests. I will update it as soon as I can but until then, wanted to warn readers. I think having the code up might still help some and one can always make changes oneself so I am no taking the tutorial down for now but I will definitely get around to fixing it, thanks!

Disclaimer: Most of this code was obtained from other tutorials, I do not take credit for writing the selenium code. The purpose of this tutorial is…


Image for post
Image for post
(Image Source)

As a beginner in Python, lists have to be my favorite objects to work with. List comprehension reduces multiple lines of code to one line. However, if you have to work with big data, lists may not be the most efficient objects to work with. Therefore we need a more efficient alternative. Say hello to Python arrays.

Arrays behave much like lists but the content is type constrained. You have to specify the content type. Python arrays are much like arrays in C language. Consider using an array specially if your list is going to contain only numbers. When creating…


Image for post
Image for post

New York is the greatest city in the world, is something you hear often. However, this great city has been slowly dying over the last year due to the ongoing pandemic. Having said that, a city like New York, does not fade easily. It will get back it’s chaotic yet charming vibes back soon, I have faith in that. I had written an answer to a question on Quora.com, “What’s it like to live in New York City?” and I thought this would be a good time to revisit my fond memories.

I lived in NYC for 4 years (2012–2016)…


(Disclaimer: This is not actual money-making advice but my satirical take on all the money-making tips online.)

Image for post
Image for post
Image Source

Making money online is easy, all you need is a laptop that works and a half decent internet connection. Which is why all the people who spend so much time on the internet are so rich. Let us deliberately ignore the fact that only very few of the thousands of people online make enough money to qualify to be termed as “significant”, without having to move to a cheaper country. Not to deny that persistence is the key and this will require multiple…


I do not think of myself as someone who knows about money. After reading some of the articles on here, I have realized that I never really “planned” my finances and have lived just day to day. I thought about it a lot and reached the conclusion that there are broadly two types of people when it comes to spending money.

Image for post
Image for post

The Careful Investor:

My ex-roommate, who happens to be one of my closest friends, an engineer, is very good with money. In discussions with him, phrases like “maximizing potential” and “getting my money’s worth” are commonly heard. He is…

K. Nawab

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store