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
const _prop1 = Symbol('prop1'); | |
class Test{ | |
constructor(prop1, prop2){ | |
this[_prop1] = prop1; | |
this.prop2 = prop2; | |
} | |
} | |
const obj = new Test(1,2); | |
for(keys in obj){ | |
console.log(keys); //doesn print _prop1 property |
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
Symbol.for('abc') === Symbol.for('abc'); //returns true |
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
const symbolX = new Symbol('X'); // throws TypeError |
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
Symbol() == Symbol(); //returns false | |
Symbol('test') == Symbol('test'); //returns false |
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
#include <iostream> | |
#include <set> | |
#include <map> | |
#include <vector> | |
#include <fstream> | |
#include <sstream> | |
#include <iterator> | |
#include <algorithm> | |
using namespace std; |
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 | |
from gensim import matutils | |
from gensim.models.ldamodel import LdaModel | |
from sklearn.datasets import fetch_20newsgroups | |
from sklearn.feature_extraction.text import CountVectorizer | |
from gensim.sklearn_integration.SklearnWrapperGensimLdaModel import SklearnWrapperLdaModel | |
## class to execute fit_predict. Will later on add to lda wrapper. | |
class dummy(SklearnWrapperLdaModel): | |
def fit_predict(self,X): | |
corpus=matutils.Sparse2Corpus(X) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> | |
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html | |
# | |
""" | |
scikit learn interface for gensim for easy use of gensim with scikit-learn | |
""" | |
import numpy as np |
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
""" | |
scikit learn interface for gensim for easy use of gensim with scikit-learn | |
""" | |
import numpy as np | |
class BaseClass(object): | |
def __init__(self): | |
"""init""" | |
def run(self): |
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
""" | |
scikit learn interface for gensim for easy use of gensim with scikit-learn | |
""" | |
class BaseClass(object): | |
def __init__(self): | |
"""init""" | |
def run(self): | |
return 0 |
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
""" | |
scikit learn interface for gensim for easy use of gensim with scikit-learn | |
""" | |
class BaseClass(object): | |
def __init__(self): | |
"""init""" | |
def run(self): | |
return 0 |
NewerOlder