- embeddings.js: word2vec in Javascript
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
#include <iostream> | |
using namespace std; | |
struct Node { | |
int val; | |
Node *next; | |
}; | |
void print(Node* n) { |
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
''' | |
Linear Regression From First Principles | |
Author: Gaurav Menghani ([email protected]) | |
''' | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def linear_sum(X, W, b): | |
return X.dot(W) + b |
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
import torch | |
import torchvision | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision.transforms as transforms | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import torch.optim as optim | |
from torch.autograd import Variable |
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
import gym | |
import logging | |
import sys | |
import numpy as np | |
from gym import wrappers | |
import torch | |
import torchvision | |
import torch.nn as nn | |
import torch.nn.functional as F |
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
import gym | |
import logging | |
import sys | |
import numpy as np | |
from gym import wrappers | |
import torch | |
import torchvision | |
import torch.nn as nn | |
import torch.nn.functional as F |
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
import gym | |
import logging | |
import sys | |
import numpy as np | |
from gym import wrappers | |
import torch | |
import torchvision | |
import torch.nn as nn | |
import torch.nn.functional as F |
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
import os | |
import sys | |
import urllib2 | |
def normalize_path(path): | |
if path[-1] == '/': | |
path = path[:-1] | |
return path | |
def get_dir_name(path): |
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
import gym | |
import logging | |
import sys | |
import numpy as np | |
from gym import wrappers | |
SEED = 0 | |
NUM_EPISODES = 3000 | |
# Hyperparams |
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
import gym | |
import logging | |
import sys | |
import numpy as np | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
import cPickle as pickle | |
import os |