Skip to content

Instantly share code, notes, and snippets.

@Entity2D
Entity2D / kulog_k8581.txt
Created April 26, 2012 21:15
Kulog K8581 (DCPU-16 sound chip spec sheet proposal)
KULOG_K8581 (v.1.1)
|| //
||//
||\\
|| \\ULOG HARDWARE TECHNOLOGIES
"Bringing 'fun' back into functionality"
package computer;
// Referenced classes of package computer:
// KeyMapping
public class AWTKeyMapping extends KeyMapping
{
public AWTKeyMapping()
package computer;
// Referenced classes of package computer:
// KeyMapping
public class AWTKeyMapping extends KeyMapping
{
public AWTKeyMapping()
@rygorous
rygorous / gist:00b85cd98be3c53e17ab77d931493609
Last active July 29, 2017 01:25
FFT via ring morphisms.
Pick a 2n-element periodic sequence of complex numbers. This is isomorphic to a polynomial p in
C[x] / (x^2n - 1)
(x^2n = 1 = x^0, which encodes the 2n-periodicity).
Computing the 2n-element DFT of the original sequence is just evaluating p at the roots of unity
(\omega_{2n}^0, \omega_{2n}^1, ..., \omega_{2n}^{2n+1}).
Now, (x^2n - 1) = (x^n - 1) (x^n + 1). This implies that the given p mod (x^2n - 1) is uniquely
determined by the remainders p mod (x^n - 1) and p mod (x^n + 1) [via CRT]. That is, there is
an isomorphism between C[x] / (x^2n - 1) and (C[x] / (x^n - 1)) x (C[x] / (x^n + 1)).
import numpy as np
from numpy.linalg import norm, solve
from scipy.spatial.distance import cdist
from sklearn.neighbors import kneighbors_graph
def phi(l, mu):
return (mu * (np.sqrt(l) - 1)**2)
@JackNova
JackNova / JavascriptMonads.js
Created December 19, 2012 18:28
Monads Implementation in javascript, as seen in crockford presentation at yui conf 2012
//BASIC PIECES, 3 functions: unit, bind and the bind argument
//function unit(value)
//function bind(monad, function(value))
//all three functions return a monad
/* The unit function is a constructor (returns a monad object)
* The magic is in the bind function
*
* There are AXIOMS:
* bind(unit(value)), f) === f(value)
@kylemcdonald
kylemcdonald / Class similarity.ipynb
Last active May 13, 2019 13:58
Finding similarities with a neural network that trained for object classification.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alertedsnake
alertedsnake / gist:7dd9b87e47b1246fab93
Last active August 17, 2020 08:08
Use custom node + npm for Jenkins job
# setup python virtualenv and install nodeenv
virtualenv .python
. .python/bin/activate
pip install nodeenv
# setup nodeenv with the node of your choice, and upgrade npm to latest
nodeenv --node=0.10.37 --prebuilt .node
. .node/bin/activate
npm install -g npm
@shagunsodhani
shagunsodhani / KeyValueMemNN.md
Last active April 30, 2023 04:13
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