Skip to content

Instantly share code, notes, and snippets.

View ishwor2048's full-sized avatar

Ishwor Bhusal ishwor2048

View GitHub Profile
# 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
@ishwor2048
ishwor2048 / MNIST_Digit_Recognizer_Full_Code.py
Created July 18, 2019 21:22
This project gives start to end python code to build a model to recognize hand-written digits. Thanks to Siraj Rawal for the amazing tutorial.
# 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
@ishwor2048
ishwor2048 / App_Social_Media_User_Unsupervised_ML.py
Created July 17, 2019 21:08
This project is about predicting the usage of social media by different age category of the people based on various parameters.
######################
# Importing new libraries into the terminal to run models
######################
from sklearn.preprocessing import StandardScaler # standard scaler
from sklearn.decomposition import PCA # principal component analysis
############################
#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
#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
@ishwor2048
ishwor2048 / Real_Spam_Detecting_Algorithm_High_Accuracy.py
Created June 7, 2019 21:16
Spam Filtering Model on scikit learn based on tfidf and countvectorizer
# -*- 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
@ishwor2048
ishwor2048 / hackerrank_word_count_Ishwor.py
Created June 7, 2019 13:40
HackerRank Word Order Solution
# 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
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