Skip to content

Instantly share code, notes, and snippets.

View SharanSMenon's full-sized avatar
🎯
Focusing

SharanSMenon

🎯
Focusing
View GitHub Profile
@SharanSMenon
SharanSMenon / neural_network_numpy.ipynb
Created August 23, 2021 14:43
Neural network from Scratch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SharanSMenon
SharanSMenon / dqn_cartpole.ipynb
Created August 21, 2020 17:22
Playing Cartpole using DQN in PyTorch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SharanSMenon
SharanSMenon / actor_critic-cartpole.ipynb
Created August 21, 2020 17:21
Playing Cartpole using Actor-Critic methods in PyTorch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SharanSMenon
SharanSMenon / README.md
Last active May 10, 2020 21:32
Taylor Series calculation

Taylor Series Calculation

Binder

This notebook demonstrates calculating taylor series for certain polynomials.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SharanSMenon
SharanSMenon / README.md
Last active January 28, 2020 21:38
List that filters HTML UI

Filter List

This is a simple application in which you can type items and make a list that can be filtered. It is very simple and I made it like 4 years ago when I was learning Web Development.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SharanSMenon
SharanSMenon / Apple Time Series.md
Last active August 23, 2021 14:45
PyTorch Time Series

PyTorch Time Series Prediction

This is my attempt to predict time series using PyTorch. It is not too good for I am still learning and I hope that this can be improved in the future.

Run the notebook in sequential order.

@SharanSMenon
SharanSMenon / sentiment_analysis.py
Created December 4, 2019 20:35
Performs sentiment analysis to determine whether a string is positive or negative
import pickle
from urllib.request import Request, urlopen
modelreq = Request("https://raw.githubusercontent.com/SharanSMenon/ml-models/master/sentiment_analysis/scikit-learn/sentiment_model.p") # Getting the model
vectorreq = Request("https://raw.githubusercontent.com/SharanSMenon/ml-models/master/sentiment_analysis/scikit-learn/vectorizer.p") # Getting the vectorizer
m = urlopen(modelreq)
v = urlopen(vectorreq)
model = pickle.load(m)
vectorizer = pickle.load(v)
def predict(s):
transformed = vectorizer.transform([s]).toarray()
@SharanSMenon
SharanSMenon / numericalIntegration.py
Created November 20, 2019 21:42
Gives two functions for integrating definite integrals. Also tests the performance of both functions.
import math
import timeit # For performance testing
# Function on line below
f = lambda x: x**2 # Replace the function seen here with your function
def integrate_rectangular(N, a, b):
"""
Integrates the function given the bounds b and a, by using Riemann Sums.
"""
value = 0
value2 = 0