{{ message }}

Instantly share code, notes, and snippets.

🤖
Too much to do, too little time.

# Gaurav Menghani reddragon

🤖
Too much to do, too little time.
Created Apr 21, 2017
List of Possible Pet Projects
View pet-projects.md
1. embeddings.js: word2vec in Javascript
Created Apr 5, 2017
Linear Regression in Python
View linear_regression.py
 ''' Linear Regression From First Principles Author: Gaurav Menghani (gaurav.menghani@gmail.com) ''' import numpy as np import matplotlib.pyplot as plt def linear_sum(X, W, b): return X.dot(W) + b
Created Mar 16, 2017
View reverse-nodes.cpp
 #include using namespace std; struct Node { int val; Node *next; }; void print(Node* n) {
Created Dec 22, 2016
Hash Function for unordered_map
View unordered_map.cpp
 struct Slope { int n, d; Slope(int nn, int dd) { int g = gcd(abs(nn), abs(dd)); // cout << "gcd of " << nn << ", " << dd << " is: " << g << endl; n = (g > 0 ? nn/g : nn); d = (g > 0 ? dd/g : dd); } };
Created Dec 8, 2016
A util file for misc algo problems
View util.h
 #pragma once #include #include #include #include #include #include #include #include
Created Dec 8, 2016
First node in a cycle in a Linked List
 #include #include #include #include #include #include #include #include #include #include
Created Dec 8, 2016