This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import gensim | |
import numpy as np | |
W2V_PATH = sys.argv[1] | |
def avg_sentence(sentence, wv): | |
v = np.zeros(300) | |
for w in sentence: | |
if w in wv: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import gensim | |
import numpy as np | |
W2V_PATH = sys.argv[1] | |
def avg_sentence(sentence, wv): | |
v = np.zeros(300) | |
for w in sentence: | |
if w in wv: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def sigmoid(X): | |
return 1. / (1. + np.exp(-X)) | |
def sigmoid_deriv(X): | |
return sigmoid(X) * (1. - sigmoid(X)) | |
def vec(X): | |
return X.T.reshape(-1, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Angular Material Design | |
* https://github.com/angular/material | |
* @license MIT | |
* v0.6.0-rc3 | |
*/ | |
angular.module('ngMaterial', ["ng","ngAnimate","ngAria","material.core","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.checkbox","material.components.content","material.components.dialog","material.components.divider","material.components.icon","material.components.list","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.textField","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.whiteframe"]); | |
(function() { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Angular Material Design | |
* https://github.com/angular/material | |
* @license MIT | |
* v0.6.0-rc3 | |
*/ | |
*, *:before, *:after { | |
box-sizing: border-box; } | |
:focus { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import std.regex; | |
void main() | |
{ | |
auto ctr = regex(`foreach(\w+; \w+)`); | |
writeln(match(`foreach(foo; bar)`, ctr).hit); | |
} | |
// Runtime |