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
| from numpy.random import randn,randint | |
| from numpy.ma.core import reshape, mean | |
| from shogun.Features import RegressionLabels, RealFeatures | |
| from shogun.Regression import LeastAngleRegression, LinearRidgeRegression, LeastSquaresRegression | |
| from shogun.Evaluation import CrossValidation, CrossValidationResult, \ | |
| CrossValidationSplitting, MeanSquaredError | |
| import time | |
| n=250 | |
| n_class=6 |
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
| /* | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 3 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * Written (W) 2013 Thoralf Klein | |
| * Written (W) 2013 Soumyajit De | |
| */ |
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
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
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
| from collections import Counter | |
| MOD, N = 10**9 + 7, 10**5 + 2 | |
| fact = [1] + [j for j in [1] for i in xrange(1, N) for j in [(j * i) % MOD]] | |
| n, d = raw_input(), Counter(map(int, raw_input().split())).most_common() | |
| print (reduce(lambda x, y: (x * fact[d[0][1]] * pow(fact[d[0][1] - y[1]], MOD - 2, MOD)) % MOD, d, 1) * pow(fact[d[0][1]], MOD - 2, MOD)) % MOD |
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
| // @flow | |
| import React from 'react'; | |
| import ReactList from 'react-list'; | |
| type Props = { | |
| messages: Array<string>, | |
| ..., | |
| }; | |
| export class MessageLog extends React.Component<Props> { |