Skip to content

Instantly share code, notes, and snippets.

View lucasjinreal's full-sized avatar
🎯
Focusing

MagicSource lucasjinreal

🎯
Focusing
  • Google
  • Sanfancisco
View GitHub Profile
@ajfisch
ajfisch / interactive.py
Created May 8, 2017 15:55
Interactive drqa model with ParlAI
# Run: python path/to/file --pretrained_model path/to/model
#
# Example interaction:
# Context: I was thirsty today. So I went to the market and bought some water.
# Question: What did I buy?
# Reply: some water
import torch
import logging
from parlai.agents.drqa.agents import DocReaderAgent
@gocarlos
gocarlos / Eigen Cheat sheet
Last active May 31, 2024 18:30
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.