Skip to content

Instantly share code, notes, and snippets.

@jcassiojr
jcassiojr / notebook.ipynb
Created August 18, 2020 21:42 — forked from cosmincatalin/notebook.ipynb
The SageMaker attached notebook that allows building an MXNet model that counts shapes in an image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

mainly record pytorch implementations for NLI and similarity computing

REPOSITORY REFERENCE
baidu/SimNet SEVERAL
NTSC-Community/awaresome-neural-models-for-semantic-match SEVERAL
lanwuwei/SPM_toolkit:
 ①DecAtt
 ②ESIM
 ③PWIM
 ④SSE
Neural Network Models for Paraphrase Identification, Semantic Textual Similarity, Natural Language Inference, and Question Answering
MatchZoo (Keras Implementation):
 ①DSSM
 ②CDSSM
 ③ARC-I
 ④ARC-II
 ⑤MV-LSTM
 ⑥DRMM
 ⑦K-NRM
 ⑧CONV-KNRM
 ⑨DRMM-TKS
 ⑩BiMPM
 ...
MatchZoo: A Toolkit for Deep Text Matching
...
[likejazz/Si
@jcassiojr
jcassiojr / SimplePolicy.ipynb
Created January 4, 2020 01:04 — forked from awjuliani/SimplePolicy.ipynb
Policy gradient method for solving n-armed bandit problems.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcassiojr
jcassiojr / gist:04668a75ea8979399a57dbffbae8f6c7
Created November 23, 2019 00:38 — forked from GerardBCN/gist:9e0357c70873a2cfe5788d610b2d8261
Using temporal-difference - TD(0) or one-step TD to solve the gridworld task
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcassiojr
jcassiojr / policy_iterator_RL_gridworld.ipynb
Created November 23, 2019 00:36 — forked from GerardBCN/policy_iterator_RL_gridworld.ipynb
Policy iterator for RL applied to gridworld
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcassiojr
jcassiojr / monte_carlo.ipynb
Created November 23, 2019 00:36 — forked from GerardBCN/monte_carlo.ipynb
State-value function approximation for the gridworld task using Monte Carlo simulations
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import gym
import numpy as np
import matplotlib.pyplot as plt
import copy
#Hyperparameters
NUM_EPISODES = 10000
LEARNING_RATE = 0.000025
GAMMA = 0.99
import gym
import numpy as np
import sklearn.pipeline
from sklearn.kernel_approximation import RBFSampler
import matplotlib.pyplot as plt
import copy
#Hyperparameters
NUM_EPISODES = 10000
LEARNING_RATE = 0.000025
"""
Solving FrozenLake8x8 environment using Policy iteration.
Author : Moustafa Alzantot (malzantot@ucla.edu)
"""
import numpy as np
import gym
from gym import wrappers
def run_episode(env, policy, gamma = 1.0, render = False):
@jcassiojr
jcassiojr / pyparsing tutorial draft.md
Created September 5, 2018 11:23 — forked from ralsina/pyparsing tutorial draft.md
Creating DSLs for Dummies

Intro

I don't have the usual programmer's education. I studied maths, and then dropped out of that, and am mostly self-taught. So, there are some parts of programming I always saw wearily, thinking to myself that I really should go to school to learn them. One remarkable such area is parsing and implementing languages.

Well... sure, school is always a good idea, but this is not that hard. In this article I will explain how to go from nothing to a functioning, extensible language, using Python and PyParsing. If you are as scared of grammars, parsers and all that jazz as I used to be, come along, it's pretty simple,

Grammar (part I)

What is a grammar? It's what defines what is and what is not valid in our language, and it's the hardest part to get right, mostly because it's all about making decisions.