Skip to content

Instantly share code, notes, and snippets.

@blandinw
blandinw / WitNLUHTTPInterpreter.py
Last active October 29, 2017 19:03
Wit.ai as a Rasa.ai NaturalLanguageInterpreter
import logging
import requests
from rasa_core.interpreter import NaturalLanguageInterpreter
logger = logging.getLogger(__name__)
class WitNLUHTTPInterpreter(NaturalLanguageInterpreter):
WIT_API_HOST = 'https://api.wit.ai'

Keybase proof

I hereby claim:

  • I am blandinw on github.
  • I am blandinw (https://keybase.io/blandinw) on keybase.
  • I have a public key whose fingerprint is ADBA 3E4A 5FB7 B743 CCD3 EBB0 080F 771B 1671 22EC

To claim this, I am signing this object:

@blandinw
blandinw / gist:4258990
Created December 11, 2012 14:35
Coursera: Neural Net Learning
% https://class.coursera.org/ml-2012-002
for i = 1:m
% actual class for this example
actual = zeros(1, num_labels);
actual(y(i)) = 1;
% compute activation vectors for the 3 layers
a1 = X(i,:);
z2 = [1 a1] * Theta1';
@blandinw
blandinw / gist:4257310
Created December 11, 2012 09:31
CoffeeScript binary search
# binary search
bi = (event, divs) ->
value = event.from.split(" ")[0]
min = 0
max = divs.length - 1
elem = null
edate = null
return if not $(divs[min]).data('date')