Skip to content

Instantly share code, notes, and snippets.

Avatar
🥷
At work

amitabhadey amitabhadey

🥷
At work
View GitHub Profile
@amitabhadey
amitabhadey / dijkstraalgorithm.py
Created Apr 26, 2019
Dijkstra's Algorithm in Python
View dijkstraalgorithm.py
# =============================================================================
# We will create a dictionary to represent the graph
# =============================================================================
graph = {
'a':{'b':3,'c':4, 'd':7},
'b':{'c':1,'f':5},
'c':{'f':6,'d':2},
'd':{'e':3, 'g':6},
'e':{'g':3, 'h':4},
@amitabhadey
amitabhadey / Email Personal Assistant
Created Aug 26, 2018
A personal assistant to send mails
View Email Personal Assistant
import os
import webbrowser
import time
from gtts import gTTS
import speech_recognition as sr
import smtplib
content = None
receiver = None
@amitabhadey
amitabhadey / data_preprocessing_template.py
Created Jul 22, 2018
Steps followed for preprocessing the data for ML
View data_preprocessing_template.py
# Data Preprocessing Template
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('Data.csv')
X = dataset.iloc[:, :-1].values
View Sentiment via TextBlob
from textblob import TextBlob
wiki = TextBlob("I am very happy but also a little sad.")
print(wiki.sentiment.polarity)