Skip to content

Instantly share code, notes, and snippets.

@sidgan
sidgan / moods.md
Created October 31, 2015 02:08 — forked from kylemcdonald/moods.md
List of moods sorted by a TSP using euclidean distance in word2vec space.

old rushed dashed squashed crushed smothered suffocated trapped rescued saved

@sidgan
sidgan / gist:735cc2c4ee1b1e32edcc700c84527003
Created April 2, 2016 06:17 — forked from arvearve/gist:4158578
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@sidgan
sidgan / KeyValueMemNN.md
Created July 5, 2016 21:52 — forked from shagunsodhani/KeyValueMemNN.md
Summary of paper "Key-Value Memory Networks for Directly Reading Documents"

Key-Value Memory Networks for Directly Reading Documents

Introduction

  • Knowledge Bases (KBs) are effective tools for Question Answering (QA) but are often too restrictive (due to fixed schema) and too sparse (due to limitations of Information Extraction (IE) systems).
  • The paper proposes Key-Value Memory Networks, a neural network architecture based on Memory Networks that can leverage both KBs and raw data for QA.
  • The paper also introduces MOVIEQA, a new QA dataset that can be answered by a perfect KB, by Wikipedia pages and by an imperfect KB obtained using IE techniques thereby allowing a comparison between systems using any of the three sources.
  • Link to the paper.

Related Work

@sidgan
sidgan / gist:75cb2a53b065549e1cf3c1b42988033c
Created October 8, 2016 16:59 — forked from rygorous/gist:9124356
On "Understanding Sources of Inefficiency in General-Purpose Chips"
My problems with the paper:
- There is no comparison of resulting video quality. The amount of encode time (and power
expended) to produce a H.264 bit stream *dramatically* depends on the desired quality level;
e.g. for x264 (state of the art SW encoder, already in 2010 when the paper was written), the
difference between the fastest and best quality settings is close to 2 orders of magnitude
in both speed and power use. This is not negligible!
[NOTE: This is excluding quality-presets like "placebo", which are more demanding still.
Even just comparing between different settings usable for real-time encoding, we still have
at least an order of magnitude difference.]
- They have their encoder, which is apparently based on JM 8.6 (*not* a good encoder!), for
#####
# modifiled from https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/06_CIFAR-10.ipynb
#####
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
from sklearn.metrics import confusion_matrix
import time
from datetime import timedelta
import math
@sidgan
sidgan / printing-model-neuraltalk2
Created June 27, 2017 21:36
printing-model-neuraltalk2
[?1034h{
protos :
{
cnn :
{
gradInput : FloatTensor - empty
modules :
{
1 :
{
@sidgan
sidgan / ssd_keras2.py
Created August 23, 2017 23:32
ssd.py in for keras 2.0
"""Keras implementation of SSD."""
import keras.backend as K
from keras.layers import Activation
from keras.layers import AtrousConv2D
from keras.layers import Conv2D
from keras.layers import Dense
from keras.layers import Flatten
from keras.layers import GlobalAveragePooling2D
from keras.layers import Input
@sidgan
sidgan / nn4.py
Last active September 4, 2017 19:03
nn4 architecture for facenet implementation by David Sandberg
# MIT License
#
# Copyright (c) 2016 David Sandberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@sidgan
sidgan / file
Created September 17, 2017 18:37
import cv2
import string, random
vc = cv2.VideoCapture(0)
if vc.isOpened(): # try to get the first frame
rval, frame = vc.read()
else:
rval = False