This file contains hidden or 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 codecs | |
from gensim.models import Word2Vec | |
def export_to_file(path_to_model, output_file): | |
output = codecs.open(output_file, 'w' , 'utf-8') | |
model = Word2Vec.load_word2vec_format(path_to_model, binary=True) | |
vocab = model.vocab | |
for word in vocab: | |
print(word) | |
vector = list() |
This file contains hidden or 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
// SOURCE: https://gist.github.com/moraes/2141121#comment-1361598 | |
type Queue []*Node | |
func (q *Queue) Push(n *Node) { | |
*q = append(*q, n) | |
} | |
func (q *Queue) Pop() (n *Node) { | |
n = (*q)[0] |
This file contains hidden or 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
set nocompatible " Disable vi-compatibility | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
"let Vundle manage Vundle | |
" required! | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'kien/ctrlp.vim' |