This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to Jose Portilla on Udemy for giving me amazing idea for this model | |
# Performing keras basics based on Iris dataset | |
# First of all, importing basic libraries, numpy and pandas | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import keras |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Working on MNIST dataset, handwritten digits predictions | |
# Python 2 and 3 compatibility | |
from __future__ import print_function | |
# Importing tensorflow as tf | |
import tensorflow as tf | |
# Importing keras, simplified interface for building models | |
import keras |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Importing required packages | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
from sklearn.model_selection import train_test_split # train/test split | |
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.model_selection import cross_val_score | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.model_selection import GridSearchCV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Importing Required Libraries and Packages | |
import pandas as pd | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import statsmodels.api as sm | |
import os | |
from sklearn.model_selection import train_test_split # train/test split | |
from sklearn.neighbors import KNeighborsRegressor # KNN for Regression | |
import statsmodels.formula.api as sm # regression modeling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue May 28 15:04:39 2019 | |
@author: Ishwor Bhusal | |
""" | |
# Importing basic packages | |
import numpy as np | |
import pandas as pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Problem is solved under python3: | |
""" | |
You are given words. Some words may repeat. For each word, output its number of occurrences. The output order should correspond with the input order of appearance of the word. See the sample input/output for clarification. | |
Note: Each input line ends with a "\n" character. | |
Constraints: | |
1 <= n = 10^5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JOINING DATA IN POSTGRESQL | |
Target is to join two or more database together in a single table | |
Innerjoin in SQL | |
Select p1.country, p1.continent, | |
Prime_minister, president | |
FROM prime_ministers AS p1 | |
INNER JOIN presidents AS p2 | |
ON p1.country = p2.country; | |
===================================================================== | |
Inner join |