Skip to content

Instantly share code, notes, and snippets.

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()
@ahaas
ahaas / gist:3a91b2bba63808d3acf0
Created March 9, 2015 07:19
Go Stacks and Queues
// 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]
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'