Skip to content

Instantly share code, notes, and snippets.

View mohneesh7's full-sized avatar

Mohneesh S mohneesh7

  • Nuzvid
View GitHub Profile
@mohneesh7
mohneesh7 / Anime_Recommendation_Engine.ipynb
Last active November 3, 2019 06:55
knn_recommendation_engine
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mohneesh7
mohneesh7 / LSTM_mnist.py
Last active October 21, 2020 07:06
LSTM using MNIST Data
import tensorflow.keras as keras
from tensorflow.keras.datasets import mnist
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, LSTM
from tensorflow.keras.optimizers import Adam
from tensorflow.compat.v1.keras.layers import CuDNNLSTM
#Importing the data
(X_train, y_train),(X_test, y_test) = mnist.load_data() # unpacks images to x_train/x_test and labels to y_train/y_test
#Normalizing the data
@mohneesh7
mohneesh7 / RDP.py
Created September 20, 2021 02:47
Ramer Douglas Peucker Algorithm
from math import sqrt
def distance(a, b):
return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
def point_line_distance(point, start, end):
if (start == end):
return distance(point, start)
else:
import streamlit as st
import pandas as pd
import numpy as np
from sklearn.svm import SVC
from joblib import dump, load
from sklearn.model_selection import train_test_split
# from sklearn.metrics import ConfusionMatrixDisplay
from sklearn.metrics import plot_confusion_matrix
from sklearn.metrics import precision_score, recall_score, f1_score
@mohneesh7
mohneesh7 / savgol_filter.py
Last active December 20, 2022 06:35
savgol_filter
import pandas as pd
import plotly.graph_objects as go
from scipy.signal import savgol_filter
data = pd.read_csv('DOGE-USD.csv', index_col=0, parse_dates=True)
data.head()
# Savitzky-Golay filter
y_filtered = savgol_filter(data.High, 11, 2)