text
stringlengths
0
1.05M
meta
dict
import copy import numpy as np from ..event import find_events class MockRtClient(object): """Mock Realtime Client Parameters ---------- raw : instance of Raw object The raw object which simulates the RtClient verbose : bool, str, int, or None If not None, override default verbos...
{ "repo_name": "matthew-tucker/mne-python", "path": "mne/realtime/mockclient.py", "copies": "9", "size": "6255", "license": "bsd-3-clause", "hash": -4493460829994220500, "line_mean": 31.4093264249, "line_max": 77, "alpha_frac": 0.5597122302, "autogenerated": false, "ratio": 4.243554952510176, "c...
import os import os.path as op import glob import warnings import shutil from nose.tools import assert_true, assert_equal, assert_raises from mne import Epochs, read_events, pick_types, read_evokeds from mne.io import Raw from mne.datasets import testing from mne.report import Report from mne.utils import (_TempDir, ...
{ "repo_name": "rajegannathan/grasp-lift-eeg-cat-dog-solution-updated", "path": "python-packages/mne-python-0.10/mne/tests/test_report.py", "copies": "1", "size": "10209", "license": "bsd-3-clause", "hash": 218394256087039500, "line_mean": 37.3796992481, "line_max": 79, "alpha_frac": 0.637574689, "a...
import glob import os import os.path as op import shutil import warnings from nose.tools import assert_true, assert_equal, assert_raises from mne import Epochs, read_events, read_evokeds from mne.io import read_raw_fif from mne.datasets import testing from mne.report import Report from mne.utils import (_TempDir, re...
{ "repo_name": "nicproulx/mne-python", "path": "mne/tests/test_report.py", "copies": "2", "size": "10586", "license": "bsd-3-clause", "hash": 8217816333904624000, "line_mean": 38.0627306273, "line_max": 79, "alpha_frac": 0.6407519365, "autogenerated": false, "ratio": 3.358502538071066, "config_t...
from __future__ import division import warnings from math import sqrt import numpy as np from scipy import sparse from ..externals.six.moves import xrange from .hierarchical import AgglomerativeClustering from ..base import TransformerMixin, ClusterMixin, BaseEstimator from ..exceptions import NotFittedError from .....
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/scikit-learn-master/sklearn/cluster/birch.py", "copies": "1", "size": "22756", "license": "mit", "hash": -5466023145108589000, "line_mean": 36.0618892508, "line_max": 87, "alpha_frac": 0.6063895236, "autogenerated": false, "ratio": 3.9...
from __future__ import division import warnings import numpy as np from scipy import sparse from math import sqrt from ..metrics.pairwise import euclidean_distances from ..base import TransformerMixin, ClusterMixin, BaseEstimator from ..externals.six.moves import xrange from ..utils import check_array from ..utils.ex...
{ "repo_name": "ankurankan/scikit-learn", "path": "sklearn/cluster/birch.py", "copies": "1", "size": "22780", "license": "bsd-3-clause", "hash": -7970757026922992000, "line_mean": 36.1615008157, "line_max": 79, "alpha_frac": 0.6068042142, "autogenerated": false, "ratio": 4.0119760479041915, "con...
import warnings import numbers import numpy as np from scipy import sparse from math import sqrt from ..metrics import pairwise_distances_argmin from ..metrics.pairwise import euclidean_distances from ..base import TransformerMixin, ClusterMixin, BaseEstimator from ..utils.extmath import row_norms from ..utils import...
{ "repo_name": "anntzer/scikit-learn", "path": "sklearn/cluster/_birch.py", "copies": "2", "size": "25555", "license": "bsd-3-clause", "hash": 2742336513430115300, "line_mean": 36.1438953488, "line_max": 79, "alpha_frac": 0.6056740364, "autogenerated": false, "ratio": 4.042872963138744, "config_...
import warnings import numpy as np from scipy import sparse from math import sqrt from ..metrics.pairwise import euclidean_distances from ..base import TransformerMixin, ClusterMixin, BaseEstimator from ..utils import check_array from ..utils.extmath import row_norms, safe_sparse_dot from ..utils.validation import ch...
{ "repo_name": "chrsrds/scikit-learn", "path": "sklearn/cluster/birch.py", "copies": "2", "size": "23299", "license": "bsd-3-clause", "hash": -1802509679004000800, "line_mean": 36.0413354531, "line_max": 79, "alpha_frac": 0.6084381304, "autogenerated": false, "ratio": 4.02053494391717, "config_t...
import numpy as np from scipy import optimize, sparse from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_array_almost_equal from sklearn.datasets import make_regression from sklearn.linear_model import ( HuberRegr...
{ "repo_name": "kevin-intel/scikit-learn", "path": "sklearn/linear_model/tests/test_huber.py", "copies": "3", "size": "7545", "license": "bsd-3-clause", "hash": 7851527258336350000, "line_mean": 34.9285714286, "line_max": 78, "alpha_frac": 0.6579191518, "autogenerated": false, "ratio": 3.098562628...
import numpy as np from scipy import optimize, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_greater ...
{ "repo_name": "fabioticconi/scikit-learn", "path": "sklearn/linear_model/tests/test_huber.py", "copies": "25", "size": "6981", "license": "bsd-3-clause", "hash": 644167253204982700, "line_mean": 37.3571428571, "line_max": 81, "alpha_frac": 0.6685288641, "autogenerated": false, "ratio": 3.02732003...
import numpy as np from scipy import optimize from ..base import BaseEstimator, RegressorMixin from ._base import LinearModel from ..utils import axis0_safe_slice from ..utils.validation import _check_sample_weight from ..utils.extmath import safe_sparse_dot from ..utils.optimize import _check_optimize_result def ...
{ "repo_name": "kevin-intel/scikit-learn", "path": "sklearn/linear_model/_huber.py", "copies": "2", "size": "11113", "license": "bsd-3-clause", "hash": -7751426823129404000, "line_mean": 34.8483870968, "line_max": 79, "alpha_frac": 0.6090164672, "autogenerated": false, "ratio": 3.7417508417508416,...
import numpy as np from scipy import optimize from ..base import BaseEstimator, RegressorMixin from .base import LinearModel from ..utils import check_X_y from ..utils import check_consistent_length from ..utils import axis0_safe_slice from ..utils.extmath import safe_sparse_dot from ..utils.optimize import _check_o...
{ "repo_name": "chrsrds/scikit-learn", "path": "sklearn/linear_model/huber.py", "copies": "1", "size": "11148", "license": "bsd-3-clause", "hash": 5527853868994535000, "line_mean": 34.9612903226, "line_max": 79, "alpha_frac": 0.6088984571, "autogenerated": false, "ratio": 3.743451981195433, "con...
import numpy as np from scipy import optimize, sparse from ..base import BaseEstimator, RegressorMixin from .base import LinearModel from ..utils import check_X_y from ..utils import check_consistent_length from ..utils import axis0_safe_slice from ..utils.extmath import safe_sparse_dot def _huber_loss_and_gradien...
{ "repo_name": "ishank08/scikit-learn", "path": "sklearn/linear_model/huber.py", "copies": "51", "size": "10265", "license": "bsd-3-clause", "hash": 5540346283241035000, "line_mean": 34.8916083916, "line_max": 78, "alpha_frac": 0.6076960546, "autogenerated": false, "ratio": 3.8145670754366408, "...
import numpy as np import scipy.sparse as sp from .sparsefuncs_fast import ( csr_mean_variance_axis0 as _csr_mean_var_axis0, csc_mean_variance_axis0 as _csc_mean_var_axis0, incr_mean_variance_axis0 as _incr_mean_var_axis0) from .fixes import sparse_min_max, bincount def _raise_typeerror(X): """Raises...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/scikit-learn-master/sklearn/utils/sparsefuncs.py", "copies": "1", "size": "13504", "license": "mit", "hash": 4442950323118261000, "line_mean": 27.7931769723, "line_max": 79, "alpha_frac": 0.5867150474, "autogenerated": false, "ratio": ...
import scipy.sparse as sp import numpy as np from .validation import _deprecate_positional_args from .sparsefuncs_fast import ( csr_mean_variance_axis0 as _csr_mean_var_axis0, csc_mean_variance_axis0 as _csc_mean_var_axis0, incr_mean_variance_axis0 as _incr_mean_var_axis0) from ..utils.validation import _c...
{ "repo_name": "xuewei4d/scikit-learn", "path": "sklearn/utils/sparsefuncs.py", "copies": "7", "size": "19229", "license": "bsd-3-clause", "hash": -2704953841276064300, "line_mean": 30.5229508197, "line_max": 79, "alpha_frac": 0.5929585522, "autogenerated": false, "ratio": 3.5399484536082473, "c...
import scipy.sparse as sp import numpy as np from .fixes import sparse_min_max, bincount from .sparsefuncs_fast import ( csr_mean_variance_axis0 as _csr_mean_var_axis0, csc_mean_variance_axis0 as _csc_mean_var_axis0, incr_mean_variance_axis0 as _incr_mean_var_axis0) def _raise_typeerror(X): """Raises...
{ "repo_name": "ssaeger/scikit-learn", "path": "sklearn/utils/sparsefuncs.py", "copies": "85", "size": "13505", "license": "bsd-3-clause", "hash": 8517165829961752000, "line_mean": 27.7340425532, "line_max": 79, "alpha_frac": 0.5866716031, "autogenerated": false, "ratio": 3.556755333157756, "con...
import scipy.sparse as sp import numpy as np from .fixes import sparse_min_max from .sparsefuncs_fast import ( csr_mean_variance_axis0 as _csr_mean_var_axis0, csc_mean_variance_axis0 as _csc_mean_var_axis0, incr_mean_variance_axis0 as _incr_mean_var_axis0) def _raise_typeerror(X): """Raises a TypeErr...
{ "repo_name": "BiaDarkia/scikit-learn", "path": "sklearn/utils/sparsefuncs.py", "copies": "2", "size": "13500", "license": "bsd-3-clause", "hash": -8247929472101347000, "line_mean": 27.7234042553, "line_max": 79, "alpha_frac": 0.5848888889, "autogenerated": false, "ratio": 3.560126582278481, "c...
import scipy.sparse as sp import numpy as np from .sparsefuncs_fast import ( csr_mean_variance_axis0 as _csr_mean_var_axis0, csc_mean_variance_axis0 as _csc_mean_var_axis0, incr_mean_variance_axis0 as _incr_mean_var_axis0) from ..utils.validation import _check_sample_weight def _raise_typeerror(X): "...
{ "repo_name": "kevin-intel/scikit-learn", "path": "sklearn/utils/sparsefuncs.py", "copies": "3", "size": "19150", "license": "bsd-3-clause", "hash": -1038727365607461400, "line_mean": 30.4967105263, "line_max": 79, "alpha_frac": 0.5919582245, "autogenerated": false, "ratio": 3.537125969708164, ...
# License: BSD 3 clause import scipy.sparse as sp import numpy as np from .fixes import sparse_min_max, bincount from .sparsefuncs_fast import csr_mean_variance_axis0 as _csr_mean_var_axis0 from .sparsefuncs_fast import csc_mean_variance_axis0 as _csc_mean_var_axis0 def _raise_typeerror(X): """Raises a TypeErro...
{ "repo_name": "spallavolu/scikit-learn", "path": "sklearn/utils/sparsefuncs.py", "copies": "220", "size": "11424", "license": "bsd-3-clause", "hash": -6075114900915401000, "line_mean": 27.2772277228, "line_max": 79, "alpha_frac": 0.587797619, "autogenerated": false, "ratio": 3.5456238361266292, ...
# License: BSD 3 clause import scipy.sparse as sp import numpy as np from .fixes import sparse_min_max from .sparsefuncs_fast import csr_mean_variance_axis0 as _csr_mean_var_axis0 from .sparsefuncs_fast import csc_mean_variance_axis0 as _csc_mean_var_axis0 def _raise_typeerror(X): """Raises a TypeError if X is ...
{ "repo_name": "Garrett-R/scikit-learn", "path": "sklearn/utils/sparsefuncs.py", "copies": "2", "size": "9739", "license": "bsd-3-clause", "hash": 7696360911559394000, "line_mean": 27.3110465116, "line_max": 79, "alpha_frac": 0.5863024951, "autogenerated": false, "ratio": 3.5765699596033786, "co...
# License: BSD 3 clause import scipy.sparse as sp import numpy as np from .fixes import sparse_min_max from .sparsefuncs_fast import (csr_mean_variance_axis0, csc_mean_variance_axis0) def _raise_typeerror(X): """Raises a TypeError if X is not a CSR or CSC matrix""" input_type ...
{ "repo_name": "eickenberg/scikit-learn", "path": "sklearn/utils/sparsefuncs.py", "copies": "6", "size": "7638", "license": "bsd-3-clause", "hash": 6836117741907536000, "line_mean": 26.2785714286, "line_max": 76, "alpha_frac": 0.586017282, "autogenerated": false, "ratio": 3.536111111111111, "con...
from contextlib import nullcontext import itertools import os.path as op import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal import pytest from mne import (pick_channels, pick_types, Epochs, read_events, set_eeg_reference, set_bipolar_reference, ...
{ "repo_name": "bloyl/mne-python", "path": "mne/io/tests/test_reference.py", "copies": "4", "size": "29830", "license": "bsd-3-clause", "hash": -7187628156254887000, "line_mean": 43.3898809524, "line_max": 822, "alpha_frac": 0.6268521623, "autogenerated": false, "ratio": 3.02014781816341, "confi...
from copy import deepcopy import numpy as np from scipy import linalg from .constants import FIFF from .meas_info import _check_ch_keys from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .proj import setup_proj from .pick import pick_types, pick_channels, pick_channels_forward from .base impo...
{ "repo_name": "larsoner/mne-python", "path": "mne/io/reference.py", "copies": "4", "size": "20363", "license": "bsd-3-clause", "hash": 1639062112807713800, "line_mean": 39.0846456693, "line_max": 79, "alpha_frac": 0.5945587585, "autogenerated": false, "ratio": 3.738388103543235, "config_test": ...
from copy import deepcopy import numpy as np from scipy import linalg from .constants import FIFF from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .proj import setup_proj from .pick import pick_types, pick_channels, pick_channels_forward from .base import BaseRaw from ..evoked import Evoked...
{ "repo_name": "cjayb/mne-python", "path": "mne/io/reference.py", "copies": "1", "size": "19913", "license": "bsd-3-clause", "hash": 2350084066968553000, "line_mean": 38.9058116232, "line_max": 79, "alpha_frac": 0.5962938784, "autogenerated": false, "ratio": 3.7828647416413372, "config_test": fa...
from copy import deepcopy import numpy as np from .constants import FIFF from .meas_info import _check_ch_keys from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .proj import setup_proj from .pick import pick_types, pick_channels, pick_channels_forward from .base import BaseRaw from ..evoked ...
{ "repo_name": "pravsripad/mne-python", "path": "mne/io/reference.py", "copies": "3", "size": "20282", "license": "bsd-3-clause", "hash": 3019677020712918500, "line_mean": 38.8467583497, "line_max": 79, "alpha_frac": 0.5935312099, "autogenerated": false, "ratio": 3.72556943423953, "config_test":...
import itertools import os.path as op import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal import pytest from mne import (pick_channels, pick_types, Epochs, read_events, set_eeg_reference, set_bipolar_reference, add_reference_channels, creat...
{ "repo_name": "kambysese/mne-python", "path": "mne/io/tests/test_reference.py", "copies": "4", "size": "29916", "license": "bsd-3-clause", "hash": -6211387500486640000, "line_mean": 43.1890694239, "line_max": 822, "alpha_frac": 0.6266880599, "autogenerated": false, "ratio": 3.0187689202825427, ...
import numpy as np from .constants import FIFF from .meas_info import _check_ch_keys from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .proj import setup_proj from .pick import pick_types, pick_channels, pick_channels_forward from .base import BaseRaw from ..evoked import Evoked from ..epoch...
{ "repo_name": "rkmaddox/mne-python", "path": "mne/io/reference.py", "copies": "4", "size": "21870", "license": "bsd-3-clause", "hash": -3276060010021388300, "line_mean": 39.0549450549, "line_max": 79, "alpha_frac": 0.5954275263, "autogenerated": false, "ratio": 3.699255751014885, "config_test":...
from copy import deepcopy import numpy as np from .constants import FIFF from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .proj import setup_proj from .pick import pick_types, pick_channels from .base import BaseRaw from ..evoked import Evoked from ..epochs import BaseEpochs from ..utils im...
{ "repo_name": "jaeilepp/mne-python", "path": "mne/io/reference.py", "copies": "1", "size": "23099", "license": "bsd-3-clause", "hash": 2960003987201273000, "line_mean": 40.1014234875, "line_max": 79, "alpha_frac": 0.6171695744, "autogenerated": false, "ratio": 4.058151791988756, "config_test": ...
import itertools import os.path as op import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal import pytest from mne import (pick_channels, pick_types, Epochs, read_events, set_eeg_reference, set_bipolar_reference, add_reference_channels, creat...
{ "repo_name": "adykstra/mne-python", "path": "mne/io/tests/test_reference.py", "copies": "2", "size": "22438", "license": "bsd-3-clause", "hash": -2779823950511880700, "line_mean": 42.0671785029, "line_max": 79, "alpha_frac": 0.6303592121, "autogenerated": false, "ratio": 3.0842611683848795, "c...
import numpy as np from .constants import FIFF from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .pick import pick_types from .base import _BaseRaw from ..evoked import Evoked from ..epochs import _BaseEpochs from ..utils import logger def _apply_reference(inst, ref_from, ref_to=None, copy...
{ "repo_name": "cmoutard/mne-python", "path": "mne/io/reference.py", "copies": "1", "size": "14614", "license": "bsd-3-clause", "hash": -9017038546877729000, "line_mean": 36.7622739018, "line_max": 79, "alpha_frac": 0.6168742302, "autogenerated": false, "ratio": 3.9274388605213653, "config_test"...
import numpy as np from .constants import FIFF from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .pick import pick_types from .base import BaseRaw from ..evoked import Evoked from ..epochs import BaseEpochs from ..utils import logger, warn, verbose def _apply_reference(inst, ref_from, ref_...
{ "repo_name": "nicproulx/mne-python", "path": "mne/io/reference.py", "copies": "2", "size": "19557", "license": "bsd-3-clause", "hash": -1944172525475103700, "line_mean": 39.659043659, "line_max": 79, "alpha_frac": 0.6202382779, "autogenerated": false, "ratio": 4.054945054945055, "config_test":...
import numpy as np from .constants import FIFF from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj from .pick import pick_types from .base import _BaseRaw from ..evoked import Evoked from ..epochs import Epochs from ..utils import logger def _apply_reference(inst, ref_from, ref_to=None, copy=True...
{ "repo_name": "Odingod/mne-python", "path": "mne/io/reference.py", "copies": "2", "size": "14676", "license": "bsd-3-clause", "hash": -4305503123385451500, "line_mean": 36.7275064267, "line_max": 79, "alpha_frac": 0.6148814391, "autogenerated": false, "ratio": 3.9198717948717947, "config_test":...
import os.path as op import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal import pytest from mne import (pick_channels, pick_types, Epochs, read_events, set_eeg_reference, set_bipolar_reference, add_reference_channels) from mne.epochs import...
{ "repo_name": "teonlamont/mne-python", "path": "mne/io/tests/test_reference.py", "copies": "3", "size": "20436", "license": "bsd-3-clause", "hash": -5789615988509730000, "line_mean": 41.9327731092, "line_max": 79, "alpha_frac": 0.6307007242, "autogenerated": false, "ratio": 3.103888213851762, "...
import warnings import os.path as op import numpy as np from nose.tools import assert_true, assert_equal, assert_raises from numpy.testing import assert_array_equal, assert_allclose from mne import pick_types, Evoked, Epochs, read_events from mne.io.constants import FIFF from mne.io import (set_eeg_reference, set_bi...
{ "repo_name": "dimkal/mne-python", "path": "mne/io/tests/test_reference.py", "copies": "10", "size": "13045", "license": "bsd-3-clause", "hash": 4932808770302703000, "line_mean": 41.4918566775, "line_max": 79, "alpha_frac": 0.6291299348, "autogenerated": false, "ratio": 3.0386675984160263, "con...
import copy as cp import os.path as op import pytest from numpy.testing import assert_array_equal, assert_allclose import numpy as np import mne from mne.datasets import testing from mne.beamformer import (make_dics, apply_dics, apply_dics_epochs, apply_dics_csd, read_beamformer, Beamform...
{ "repo_name": "rkmaddox/mne-python", "path": "mne/beamformer/tests/test_dics.py", "copies": "4", "size": "29286", "license": "bsd-3-clause", "hash": 6622706543496761000, "line_mean": 42.3224852071, "line_max": 79, "alpha_frac": 0.6322474903, "autogenerated": false, "ratio": 3.3050445773614716, ...
import os.path as op import copy as cp import pytest from pytest import raises from numpy.testing import assert_array_equal, assert_allclose import numpy as np import mne from mne.datasets import testing from mne.beamformer import (make_dics, apply_dics, apply_dics_epochs, apply_dics_csd,...
{ "repo_name": "teonlamont/mne-python", "path": "mne/beamformer/tests/test_dics.py", "copies": "2", "size": "22249", "license": "bsd-3-clause", "hash": 2085097848443284500, "line_mean": 42.7111984283, "line_max": 79, "alpha_frac": 0.6357589105, "autogenerated": false, "ratio": 3.4260856174930705, ...
from copy import deepcopy from os import remove import os.path as op from shutil import copy import warnings import numpy as np from nose.tools import assert_raises, assert_true from numpy.testing import assert_equal, assert_allclose from mne import (make_bem_model, read_bem_surfaces, write_bem_surfaces, ...
{ "repo_name": "nicproulx/mne-python", "path": "mne/tests/test_bem.py", "copies": "8", "size": "16018", "license": "bsd-3-clause", "hash": -3673815147041856000, "line_mean": 41.2638522427, "line_max": 78, "alpha_frac": 0.6043825696, "autogenerated": false, "ratio": 3.1012584704743467, "config_te...
from copy import deepcopy from os import remove import os.path as op from shutil import copy import numpy as np import pytest from numpy.testing import assert_equal, assert_allclose from mne import (make_bem_model, read_bem_surfaces, write_bem_surfaces, make_bem_solution, read_bem_solution, write_be...
{ "repo_name": "teonlamont/mne-python", "path": "mne/tests/test_bem.py", "copies": "3", "size": "15971", "license": "bsd-3-clause", "hash": -5507136902236938000, "line_mean": 41.1398416887, "line_max": 78, "alpha_frac": 0.6017156095, "autogenerated": false, "ratio": 3.108407940833009, "config_te...
import os.path as op from copy import deepcopy import numpy as np from nose.tools import assert_raises, assert_true from numpy.testing import assert_equal, assert_allclose from mne import (make_bem_model, read_bem_surfaces, write_bem_surfaces, make_bem_solution, read_bem_solution, write_bem_solution...
{ "repo_name": "cmoutard/mne-python", "path": "mne/tests/test_bem.py", "copies": "1", "size": "12235", "license": "bsd-3-clause", "hash": 8223311512214387000, "line_mean": 39.9197324415, "line_max": 78, "alpha_frac": 0.6025337148, "autogenerated": false, "ratio": 3.0269668480950025, "config_test...
from __future__ import division ## removes integer division import numpy as np from scipy import sparse from scipy.spatial.distance import pdist from Mmani.geometry.cyflann.index import Index import subprocess, os, sys, warnings def _row_col_from_condensed_index(N,compr_ind): # convert from pdist compressed index ...
{ "repo_name": "Jerryzcn/Mmani", "path": "Mmani/geometry/distance.py", "copies": "1", "size": "6975", "license": "bsd-2-clause", "hash": 7661960849290114000, "line_mean": 38.8571428571, "line_max": 97, "alpha_frac": 0.637562724, "autogenerated": false, "ratio": 3.6556603773584904, "config_test":...
from flask import redirect, render_template, render_template_string, Blueprint from flask import request, url_for from flask_user import current_user, login_required, roles_accepted from app.init_app import app, db from app.models import User, Role, UsersRoles # from app.models import UserProfileForm from flask_user...
{ "repo_name": "marcuskelly/recover", "path": "app/views.py", "copies": "1", "size": "6065", "license": "bsd-2-clause", "hash": -7701223004239821000, "line_mean": 33.2655367232, "line_max": 187, "alpha_frac": 0.6425391591, "autogenerated": false, "ratio": 3.203909138932911, "config_test": false,...
# License: BSD (3-clause) from __future__ import division import numpy as np from scipy import linalg from math import factorial import inspect from .. import pick_types from ..forward._compute_forward import _concatenate_coils from ..forward._make_forward import _prep_meg_channels from ..io.write import _generate_...
{ "repo_name": "rajegannathan/grasp-lift-eeg-cat-dog-solution-updated", "path": "python-packages/mne-python-0.10/mne/preprocessing/maxwell.py", "copies": "1", "size": "25210", "license": "bsd-3-clause", "hash": -1733030217104201000, "line_mean": 38.1459627329, "line_max": 79, "alpha_frac": 0.599166997...
# License: BSD (3-clause) from __future__ import division from os import path as op import numpy as np from scipy.linalg import pinv from math import factorial from .. import pick_types, pick_info from ..io.constants import FIFF from ..forward._compute_forward import _concatenate_coils from ..forward._make_forward ...
{ "repo_name": "trachelr/mne-python", "path": "mne/preprocessing/maxwell.py", "copies": "3", "size": "20214", "license": "bsd-3-clause", "hash": 5095994424983719000, "line_mean": 34.588028169, "line_max": 79, "alpha_frac": 0.6038883942, "autogenerated": false, "ratio": 3.5802337938363444, "confi...
# License: BSD (3-clause) from __future__ import division import numpy as np from scipy.linalg import pinv from math import factorial from ..forward._compute_forward import _concatenate_coils from ..forward._make_forward import _prep_meg_channels from ..io.write import _generate_meas_id, _date_now from ..utils impo...
{ "repo_name": "rajul/mne-python", "path": "mne/preprocessing/maxwell.py", "copies": "1", "size": "18428", "license": "bsd-3-clause", "hash": 1439921661510570000, "line_mean": 35.3471400394, "line_max": 79, "alpha_frac": 0.6006077708, "autogenerated": false, "ratio": 3.6020328381548086, "config_...
# License: BSD (3-clause) from __future__ import division import numpy as np from scipy.linalg import pinv from math import factorial from .. import pick_types from ..forward._compute_forward import _concatenate_coils from ..forward._make_forward import _prep_meg_channels from ..io.write import _generate_meas_id, _...
{ "repo_name": "dimkal/mne-python", "path": "mne/preprocessing/maxwell.py", "copies": "3", "size": "19103", "license": "bsd-3-clause", "hash": -7137156015406971000, "line_mean": 35.7365384615, "line_max": 79, "alpha_frac": 0.5961367325, "autogenerated": false, "ratio": 3.588765733608867, "config...
import os.path as op import numpy as np from numpy.testing import assert_allclose import pytest from mne import pick_types from mne.io import read_raw_fif from mne.datasets import testing from mne.io.tag import _loc_to_coil_trans from mne.preprocessing import (read_fine_calibration, write_fine_calibration, ...
{ "repo_name": "cjayb/mne-python", "path": "mne/preprocessing/tests/test_fine_cal.py", "copies": "1", "size": "6097", "license": "bsd-3-clause", "hash": 7794832249254080000, "line_mean": 43.8308823529, "line_max": 79, "alpha_frac": 0.6419550599, "autogenerated": false, "ratio": 2.8773006134969323,...
import os.path as op from copy import deepcopy import numpy as np from numpy.testing import assert_allclose, assert_array_equal import pytest from mne import (read_source_spaces, pick_types, read_trans, read_cov, make_sphere_model, create_info, setup_volume_source_space, find_events...
{ "repo_name": "adykstra/mne-python", "path": "mne/simulation/tests/test_raw.py", "copies": "1", "size": "24904", "license": "bsd-3-clause", "hash": 5946442349709974000, "line_mean": 44.4452554745, "line_max": 79, "alpha_frac": 0.5962897527, "autogenerated": false, "ratio": 3.194458696767573, "c...
from functools import partial from inspect import getmembers import numpy as np from scipy.fftpack import fftfreq from .utils import check_indices from ..fixes import _get_args from ..parallel import parallel_func from ..source_estimate import _BaseSourceEstimate from ..epochs import BaseEpochs from ..time_frequency...
{ "repo_name": "jaeilepp/mne-python", "path": "mne/connectivity/spectral.py", "copies": "1", "size": "43085", "license": "bsd-3-clause", "hash": -7270263943360127000, "line_mean": 37.8503155996, "line_max": 79, "alpha_frac": 0.5658581873, "autogenerated": false, "ratio": 3.7011425135297653, "con...
from functools import partial from inspect import getmembers import numpy as np from .utils import check_indices from ..fixes import _get_args from ..parallel import parallel_func from ..source_estimate import _BaseSourceEstimate from ..epochs import BaseEpochs from ..time_frequency.multitaper import (_mt_spectra, _...
{ "repo_name": "teonlamont/mne-python", "path": "mne/connectivity/spectral.py", "copies": "3", "size": "42476", "license": "bsd-3-clause", "hash": -8827476862137683000, "line_mean": 38.0404411765, "line_max": 79, "alpha_frac": 0.5659195781, "autogenerated": false, "ratio": 3.678849818118829, "co...
from functools import partial from inspect import getmembers import numpy as np from .utils import check_indices from ..utils import _check_option from ..fixes import _get_args, _import_fft from ..parallel import parallel_func from ..source_estimate import _BaseSourceEstimate from ..epochs import BaseEpochs from ..t...
{ "repo_name": "drammock/mne-python", "path": "mne/connectivity/spectral.py", "copies": "7", "size": "42443", "license": "bsd-3-clause", "hash": 5381850685619240000, "line_mean": 37.8316559927, "line_max": 79, "alpha_frac": 0.5667365643, "autogenerated": false, "ratio": 3.6350633778691335, "conf...
from functools import partial from inspect import getmembers import numpy as np from .utils import check_indices from ..utils import _check_option from ..fixes import _get_args from ..parallel import parallel_func from ..source_estimate import _BaseSourceEstimate from ..epochs import BaseEpochs from ..time_frequency...
{ "repo_name": "adykstra/mne-python", "path": "mne/connectivity/spectral.py", "copies": "1", "size": "40947", "license": "bsd-3-clause", "hash": 8945545816856438000, "line_mean": 37.9971428571, "line_max": 79, "alpha_frac": 0.5683932889, "autogenerated": false, "ratio": 3.663177670424047, "confi...
from functools import partial from inspect import getmembers import numpy as np from .utils import check_indices from ..utils import _check_option from ..fixes import _get_args, rfftfreq from ..parallel import parallel_func from ..source_estimate import _BaseSourceEstimate from ..epochs import BaseEpochs from ..time...
{ "repo_name": "larsoner/mne-python", "path": "mne/connectivity/spectral.py", "copies": "6", "size": "42420", "license": "bsd-3-clause", "hash": 5220588452457784000, "line_mean": 38.0598526703, "line_max": 79, "alpha_frac": 0.5676229991, "autogenerated": false, "ratio": 3.638305171970152, "confi...
from ..externals.six.moves import zip import copy import numpy as np from ..utils import logger, verbose from .spectral import spectral_connectivity @verbose def phase_slope_index(data, indices=None, sfreq=2 * np.pi, mode='multitaper', fmin=None, fmax=np.inf, tmin=None, t...
{ "repo_name": "teonlamont/mne-python", "path": "mne/connectivity/effective.py", "copies": "4", "size": "6588", "license": "bsd-3-clause", "hash": 6883683973438979000, "line_mean": 39.6666666667, "line_max": 79, "alpha_frac": 0.6376745598, "autogenerated": false, "ratio": 3.5687973997833153, "co...
import numpy as np def check_indices(indices): """Check indices parameter.""" if not isinstance(indices, tuple) or len(indices) != 2: raise ValueError('indices must be a tuple of length 2') if len(indices[0]) != len(indices[1]): raise ValueError('Index arrays indices[0] and indices[1] mus...
{ "repo_name": "wmvanvliet/mne-python", "path": "mne/connectivity/utils.py", "copies": "15", "size": "2957", "license": "bsd-3-clause", "hash": -5826297188299216000, "line_mean": 30.7956989247, "line_max": 79, "alpha_frac": 0.6141359486, "autogenerated": false, "ratio": 4.112656467315716, "confi...
import numpy as np def check_indices(indices): """Check indices parameter""" if not isinstance(indices, tuple) or len(indices) != 2: raise ValueError('indices must be a tuple of length 2') if len(indices[0]) != len(indices[1]): raise ValueError('Index arrays indices[0] and indices[1] mus...
{ "repo_name": "andyh616/mne-python", "path": "mne/connectivity/utils.py", "copies": "29", "size": "1196", "license": "bsd-3-clause", "hash": 2161845973999084800, "line_mean": 25.5777777778, "line_max": 71, "alpha_frac": 0.6245819398, "autogenerated": false, "ratio": 3.986666666666667, "config_t...
from ..externals.six import string_types from inspect import getmembers import numpy as np from scipy.fftpack import fftfreq from .utils import check_indices from ..fixes import tril_indices, partial, _get_args from ..parallel import parallel_func from ..source_estimate import _BaseSourceEstimate from ..epochs impor...
{ "repo_name": "ARudiuk/mne-python", "path": "mne/connectivity/spectral.py", "copies": "4", "size": "41506", "license": "bsd-3-clause", "hash": 1159133162822191000, "line_mean": 38.1196983977, "line_max": 79, "alpha_frac": 0.5463547439, "autogenerated": false, "ratio": 3.8089382398825364, "confi...
from ..externals.six import string_types from warnings import warn from inspect import getargspec, getmembers import numpy as np from scipy.fftpack import fftfreq from .utils import check_indices from ..fixes import tril_indices, partial from ..parallel import parallel_func from ..source_estimate import _BaseSourceE...
{ "repo_name": "effigies/mne-python", "path": "mne/connectivity/spectral.py", "copies": "3", "size": "41291", "license": "bsd-3-clause", "hash": 6404810913027974000, "line_mean": 37.9170593779, "line_max": 80, "alpha_frac": 0.5503136277, "autogenerated": false, "ratio": 3.791295565145533, "confi...
from ..externals.six import string_types from warnings import warn from inspect import getmembers import numpy as np from scipy.fftpack import fftfreq from .utils import check_indices from ..fixes import tril_indices, partial, _get_args from ..parallel import parallel_func from ..source_estimate import _BaseSourceEs...
{ "repo_name": "cmoutard/mne-python", "path": "mne/connectivity/spectral.py", "copies": "1", "size": "41513", "license": "bsd-3-clause", "hash": -8960145771459558000, "line_mean": 38.0894538606, "line_max": 79, "alpha_frac": 0.5464553272, "autogenerated": false, "ratio": 3.810629704424454, "conf...
from functools import partial from inspect import getmembers import numpy as np from scipy.fftpack import fftfreq from .utils import check_indices from ..fixes import _get_args from ..parallel import parallel_func from ..source_estimate import _BaseSourceEstimate from ..epochs import BaseEpochs from ..time_frequency...
{ "repo_name": "nicproulx/mne-python", "path": "mne/connectivity/spectral.py", "copies": "2", "size": "41514", "license": "bsd-3-clause", "hash": -154956221753801340, "line_mean": 37.7619047619, "line_max": 79, "alpha_frac": 0.5452618394, "autogenerated": false, "ratio": 3.8082744702320888, "con...
import copy import numpy as np from ..utils import logger, verbose from .spectral import spectral_connectivity @verbose def phase_slope_index(data, indices=None, sfreq=2 * np.pi, mode='multitaper', fmin=None, fmax=np.inf, tmin=None, tmax=None, mt_bandwidth=None, ...
{ "repo_name": "mne-tools/mne-python", "path": "mne/connectivity/effective.py", "copies": "14", "size": "6416", "license": "bsd-3-clause", "hash": -5430914496757996000, "line_mean": 39.1, "line_max": 79, "alpha_frac": 0.6349750623, "autogenerated": false, "ratio": 3.556541019955654, "config_test...
__author__ = 'smartschat' class CorefMultigraphCreator: def __init__(self, positive_features, negative_features, weighting_function, relation_weights, construct_when_negative=False): self.positive_features = positive_feat...
{ "repo_name": "smartschat/cort", "path": "cort/coreference/multigraph/multigraphs.py", "copies": "2", "size": "3132", "license": "mit", "hash": 4286816954963982000, "line_mean": 30.6363636364, "line_max": 80, "alpha_frac": 0.5657726692, "autogenerated": false, "ratio": 4.204026845637584, "confi...
__author__ = 'smartschat' class MultigraphDecoder: def __init__(self, multigraph_creator): self.coref_multigraph_creator = multigraph_creator def decode(self, corpus): for doc in corpus: for mention in doc.system_mentions: mention.attributes["set_id"] = None ...
{ "repo_name": "smartschat/cort", "path": "cort/coreference/multigraph/decoders.py", "copies": "2", "size": "1601", "license": "mit", "hash": -7471679639505907000, "line_mean": 36.2325581395, "line_max": 79, "alpha_frac": 0.5965021861, "autogenerated": false, "ratio": 4.042929292929293, "config_...
""" ========================================= Plot Hierarchical Clustering Dendrogram ========================================= This example plots the corresponding dendrogram of a hierarchical clustering using AgglomerativeClustering and the dendrogram method available in scipy. """ import numpy as np from matplotli...
{ "repo_name": "bnaul/scikit-learn", "path": "examples/cluster/plot_agglomerative_dendrogram.py", "copies": "23", "size": "1732", "license": "bsd-3-clause", "hash": 1848407666673786400, "line_mean": 32.3076923077, "line_max": 77, "alpha_frac": 0.67147806, "autogenerated": false, "ratio": 3.9633867...
import logging import json import telepot logger = logging.getLogger(__name__) defaultBotUserSettings = {'enabled': True, 'notifications': True} class TelegramBot: def __init__(self, token, irc): self.telegram = telepot.Bot(token) logger.debug('starting telegram msg loop.') self.teleg...
{ "repo_name": "mpunkenhofer/irc-telegram-bot", "path": "telegrambot.py", "copies": "1", "size": "5694", "license": "mit", "hash": -1485655149641286700, "line_mean": 42.1363636364, "line_max": 115, "alpha_frac": 0.5402177731, "autogenerated": false, "ratio": 4.0042194092827, "config_test": false...
import numpy as np import pylab as pl from setup import * from sklearn.decomposition import PCA, KernelPCA from sklearn.datasets import make_circles np.random.seed(0) X, y = make_circles(n_samples=400, factor=.3, noise=.05) kpca = KernelPCA(kernel="rbf", fit_inverse_transform=True, gamma=10) X_kpca = kpca.fit_tran...
{ "repo_name": "AndreasMadsen/grace", "path": "Code/figures/pca_kernel_example.py", "copies": "1", "size": "1867", "license": "mit", "hash": 5346799080493974000, "line_mean": 28.171875, "line_max": 76, "alpha_frac": 0.6679164435, "autogenerated": false, "ratio": 2.4630606860158313, "config_test"...
""" Class for reading and writing numpy arrays from / to binary files """ import sys import numpy as np __all__ = ['sys_endian_code', 'npfile'] sys_endian_code = (sys.byteorder == 'little') and '<' or '>' class npfile(object): ''' Class for reading and writing numpy arrays to/from files Inputs: fil...
{ "repo_name": "huard/scipy-work", "path": "scipy/io/npfile.py", "copies": "2", "size": "8176", "license": "bsd-3-clause", "hash": 8125958531044385000, "line_mean": 34.2413793103, "line_max": 77, "alpha_frac": 0.541462818, "autogenerated": false, "ratio": 4.1820971867007675, "config_test": false...
__authors__ = ["Matthias Feurer"] import numpy as np import scipy.stats import sklearn.cluster import sklearn.manifold import sklearn.preprocessing import sklearn.utils class GMeans(object): def __init__(self, minimum_samples_per_cluster=2, n_init=10, significance=4, restarts=10, random_state=No...
{ "repo_name": "hmendozap/auto-sklearn", "path": "autosklearn/metalearning/metalearning/clustering/gmeans.py", "copies": "1", "size": "3508", "license": "bsd-3-clause", "hash": -2671809588806584300, "line_mean": 37.9777777778, "line_max": 88, "alpha_frac": 0.4717787913, "autogenerated": false, "ra...
# The computations in this code were primarily derived from Matti Hämäläinen's # C code. from collections import OrderedDict from functools import partial import glob import os import os.path as op import shutil from copy import deepcopy import numpy as np from .io.constants import FIFF, FWD from .io._digitization ...
{ "repo_name": "bloyl/mne-python", "path": "mne/bem.py", "copies": "2", "size": "81008", "license": "bsd-3-clause", "hash": 7159269123889141000, "line_mean": 36.4657724329, "line_max": 79, "alpha_frac": 0.5684868088, "autogenerated": false, "ratio": 3.387462361993978, "config_test": false, "ha...
# The computations in this code were primarily derived from Matti Hämäläinen's # C code. from functools import partial import glob import os import os.path as op import shutil from copy import deepcopy import numpy as np from scipy import linalg from .io.constants import FIFF, FWD from .io._digitization import _dig...
{ "repo_name": "olafhauk/mne-python", "path": "mne/bem.py", "copies": "4", "size": "74177", "license": "bsd-3-clause", "hash": 4780944563070036000, "line_mean": 36.2713567839, "line_max": 79, "alpha_frac": 0.5636375893, "autogenerated": false, "ratio": 3.404948813294771, "config_test": false, ...
# The computations in this code were primarily derived from Matti Hämäläinen's # C code. from copy import deepcopy from contextlib import contextmanager import os import os.path as op import numpy as np from ._compute_forward import _compute_forwards from ..io import read_info, _loc_to_coil_trans, _loc_to_eeg_loc, ...
{ "repo_name": "bloyl/mne-python", "path": "mne/forward/_make_forward.py", "copies": "14", "size": "30593", "license": "bsd-3-clause", "hash": 1241965821223875300, "line_mean": 37.5226700252, "line_max": 79, "alpha_frac": 0.5907084709, "autogenerated": false, "ratio": 3.5745004090218533, "config...
# The computations in this code were primarily derived from Matti Hämäläinen's # C code. from time import time from copy import deepcopy import re import numpy as np from scipy import sparse import shutil import os from os import path as op import tempfile from ..io import RawArray, Info from ..io.constants import...
{ "repo_name": "cjayb/mne-python", "path": "mne/forward/forward.py", "copies": "1", "size": "73746", "license": "bsd-3-clause", "hash": -2880703840255505000, "line_mean": 36.9320987654, "line_max": 79, "alpha_frac": 0.5717249797, "autogenerated": false, "ratio": 3.704410730433035, "config_test":...
# The computations in this code were primarily derived from Matti Hämäläinen's # C code. from time import time from copy import deepcopy import re import numpy as np import shutil import os from os import path as op import tempfile from ..io import RawArray, Info from ..io.constants import FIFF from ..io.open impo...
{ "repo_name": "mne-tools/mne-python", "path": "mne/forward/forward.py", "copies": "1", "size": "74446", "license": "bsd-3-clause", "hash": 8153890565818525000, "line_mean": 37.0183861083, "line_max": 79, "alpha_frac": 0.5710908114, "autogenerated": false, "ratio": 3.694292803970223, "config_tes...
# Many of the computations in this code were derived from Matti Hämäläinen's # C code. from copy import deepcopy from distutils.version import LooseVersion from functools import partial, lru_cache from glob import glob from os import path as op from struct import pack import warnings import numpy as np from .channe...
{ "repo_name": "bloyl/mne-python", "path": "mne/surface.py", "copies": "2", "size": "61761", "license": "bsd-3-clause", "hash": -7062352747725824000, "line_mean": 34.066439523, "line_max": 146, "alpha_frac": 0.5478041197, "autogenerated": false, "ratio": 3.4608529955724934, "config_test": false,...
# Many of the computations in this code were derived from Matti Hämäläinen's # C code. from copy import deepcopy from distutils.version import LooseVersion from glob import glob from functools import partial import os from os import path as op import warnings from struct import pack import numpy as np from scipy.spa...
{ "repo_name": "larsoner/mne-python", "path": "mne/surface.py", "copies": "4", "size": "65829", "license": "bsd-3-clause", "hash": -4854420799811581000, "line_mean": 34.7328990228, "line_max": 146, "alpha_frac": 0.5503798238, "autogenerated": false, "ratio": 3.4174454828660434, "config_test": fa...
# Many of the computations in this code were derived from Matti Hämäläinen's # C code. import os import os.path as op import numpy as np from .io.constants import FIFF from .io.open import fiff_open from .io.tag import find_tag from .io.tree import dir_tree_find from .io.write import (start_block, end_block, write_...
{ "repo_name": "drammock/mne-python", "path": "mne/morph_map.py", "copies": "4", "size": "9180", "license": "bsd-3-clause", "hash": 6408151871001787000, "line_mean": 38.5301724138, "line_max": 78, "alpha_frac": 0.6061498201, "autogenerated": false, "ratio": 3.2440749911567033, "config_test": fal...
# Many of the computations in this code were derived from Matti Hämäläinen's # C code. from copy import deepcopy from functools import partial from gzip import GzipFile import os import os.path as op import numpy as np from scipy import sparse, linalg from .io.constants import FIFF from .io.meas_info import create_...
{ "repo_name": "Eric89GXL/mne-python", "path": "mne/source_space.py", "copies": "3", "size": "125513", "license": "bsd-3-clause", "hash": -2753095413879890000, "line_mean": 37.4754751686, "line_max": 79, "alpha_frac": 0.5564789215, "autogenerated": false, "ratio": 3.5364046210200057, "config_tes...
# The computations in this code were primarily derived from Matti Hämäläinen's # C code. import os import os.path as op import numpy as np from numpy.polynomial import legendre from ..fixes import einsum from ..parallel import parallel_func from ..utils import logger, verbose, _get_extra_data_path, fill_doc #####...
{ "repo_name": "olafhauk/mne-python", "path": "mne/forward/_lead_dots.py", "copies": "10", "size": "18952", "license": "bsd-3-clause", "hash": -6792430455760441000, "line_mean": 35.5048169557, "line_max": 79, "alpha_frac": 0.5704634224, "autogenerated": false, "ratio": 3.0642083131166102, "confi...
# The computations in this code were primarily derived from Matti Hämäläinen's # C code. import os import os.path as op import numpy as np from numpy.polynomial import legendre from ..parallel import parallel_func from ..utils import logger, verbose, _get_extra_data_path, fill_doc ################################...
{ "repo_name": "rkmaddox/mne-python", "path": "mne/forward/_lead_dots.py", "copies": "4", "size": "18952", "license": "bsd-3-clause", "hash": -7324027621941174000, "line_mean": 35.5752895753, "line_max": 79, "alpha_frac": 0.5701995144, "autogenerated": false, "ratio": 3.063712807244502, "config_...
__author__ = 'smck' import json import requests from ifind.search.engine import Engine from ifind.search.response import Response from ifind.search.exceptions import EngineAPIKeyException, QueryParamException, EngineConnectionException from ifind.utils.encoding import encode_symbols from string import maketrans API_E...
{ "repo_name": "leifos/ifind", "path": "ifind/search/engines/neutrinogeoaddress.py", "copies": "1", "size": "8686", "license": "mit", "hash": 100518723702244850, "line_mean": 34.5983606557, "line_max": 119, "alpha_frac": 0.5964770896, "autogenerated": false, "ratio": 4.521603331598126, "config_t...
from __future__ import print_function import theano import numbers import numpy as np import theano.tensor as T from theano.tensor.signal.downsample import max_pool_2d def _relu(x): return T.maximum(x, 0) def _identity(x): return x ACTIVATIONS = {'sigmoid': T.nnet.sigmoid, 'identity': _iden...
{ "repo_name": "JesseLivezey/sklearn-theano", "path": "sklearn_theano/base.py", "copies": "7", "size": "20301", "license": "bsd-3-clause", "hash": 2907664373663387600, "line_mean": 36.045620438, "line_max": 82, "alpha_frac": 0.5612531402, "autogenerated": false, "ratio": 4.009678056488248, "conf...
import os import theano # Required to avoid fuse errors... very strange theano.config.floatX = 'float32' import zipfile import numpy as np from sklearn.base import BaseEstimator, TransformerMixin from .overfeat_class_labels import get_overfeat_class_label from .overfeat_class_labels import get_all_overfeat_labels from...
{ "repo_name": "kastnerkyle/sklearn-theano", "path": "sklearn_theano/feature_extraction/overfeat.py", "copies": "2", "size": "20679", "license": "bsd-3-clause", "hash": 4920201388587353000, "line_mean": 35.4708994709, "line_max": 81, "alpha_frac": 0.5316021084, "autogenerated": false, "ratio": 4.0...
import os import zipfile import theano import numpy as np from sklearn.externals.joblib import load from sklearn.utils import check_random_state from ..base import (Feedforward, fuse) from ..datasets import get_dataset_dir, download GENERATORS_PATH = get_dataset_dir("adversarial_weights") MNIST_NETWORK_FILE = os.pa...
{ "repo_name": "JesseLivezey/sklearn-theano", "path": "sklearn_theano/datasets/generators.py", "copies": "9", "size": "4460", "license": "bsd-3-clause", "hash": -8189453845780850000, "line_mean": 31.3188405797, "line_max": 90, "alpha_frac": 0.63632287, "autogenerated": false, "ratio": 3.3787878787...
import theano import numbers import numpy as np import theano.tensor as T from theano.tensor.signal.downsample import max_pool_2d def _relu(x): return T.maximum(x, 0) def _identity(x): return x ACTIVATIONS = {'sigmoid': T.nnet.sigmoid, 'identity': _identity, 'linear': _identi...
{ "repo_name": "eickenberg/sklearn-theano", "path": "sklearn_theano/base.py", "copies": "2", "size": "20305", "license": "bsd-3-clause", "hash": 5018707340699999000, "line_mean": 36.052919708, "line_max": 82, "alpha_frac": 0.5597143561, "autogenerated": false, "ratio": 4.016815034619189, "config...
from __future__ import generators Any = None from rdflib.term import BNode from rdflib.store import Store class IOMemory(Store): """\ An integer-key-optimized-context-aware-in-memory store. Uses nested dictionaries to store triples and context. Each triple is stored in six such indices as follows cs...
{ "repo_name": "alcides/rdflib", "path": "rdflib/store/IOMemory.py", "copies": "1", "size": "14379", "license": "bsd-3-clause", "hash": 1014150899694771500, "line_mean": 35.1281407035, "line_max": 92, "alpha_frac": 0.5070589053, "autogenerated": false, "ratio": 4.2031569716457176, "config_test":...
__author__ = 'SmileyBarry' from .core import APIConnection, SteamObject, chunker from .app import SteamApp from .decorators import cached_property, INFINITE, MINUTE, HOUR from .errors import * import datetime import itertools class SteamUserBadge(SteamObject): def __init__(self, badge_id, level, completion_tim...
{ "repo_name": "smiley/steamapi", "path": "steamapi/user.py", "copies": "1", "size": "16340", "license": "mit", "hash": 5277093850970363000, "line_mean": 31.3564356436, "line_max": 104, "alpha_frac": 0.54124847, "autogenerated": false, "ratio": 4.186523187291827, "config_test": false, "has_no_...
__author__ = 'SmileyBarry' from .core import APIConnection, SteamObject from .app import SteamApp from .decorators import cached_property, INFINITE, MINUTE, HOUR from .errors import * import datetime class SteamUserBadge(SteamObject): def __init__(self, badge_id, level, completion_time, xp, scarcity, appid=Non...
{ "repo_name": "James-Firth/steam-download-notifier", "path": "steamapi/user.py", "copies": "1", "size": "13089", "license": "mit", "hash": -2432565235210457600, "line_mean": 31.6433915212, "line_max": 114, "alpha_frac": 0.5417526167, "autogenerated": false, "ratio": 4.222258064516129, "config_t...
__author__ = 'SmileyBarry' from .core import APIConnection, SteamObject, store from .decorators import cached_property, INFINITE class SteamApp(SteamObject): def __init__(self, appid, name=None, owner=None): self._id = appid if name is not None: import time self._cache = d...
{ "repo_name": "James-Firth/steam-download-notifier", "path": "steamapi/app.py", "copies": "1", "size": "5327", "license": "mit", "hash": -5497057292712649000, "line_mean": 37.6086956522, "line_max": 118, "alpha_frac": 0.5445841937, "autogenerated": false, "ratio": 4.40976821192053, "config_test...
__author__ = 'SmileyBarry' from .decorators import debug class APIException(Exception): """ Base class for all API exceptions. """ pass class AccessException(APIException): """ You are attempting to query an object that you have no permission to query. (E.g.: private user, hidden screen...
{ "repo_name": "smiley/steamapi", "path": "steamapi/errors.py", "copies": "1", "size": "3290", "license": "mit", "hash": 2921715295660746000, "line_mean": 26.1900826446, "line_max": 111, "alpha_frac": 0.6425531915, "autogenerated": false, "ratio": 4.363395225464191, "config_test": false, "has_...
__author__ = 'SmileyBarry' from .decorators import debug class APIException(Exception): """ Base class for all API exceptions. """ pass class APIUserError(APIException): """ An API error caused by a user error, like wrong data or just empty results for a query. """ pass class User...
{ "repo_name": "James-Firth/steam-download-notifier", "path": "steamapi/errors.py", "copies": "1", "size": "1961", "license": "mit", "hash": -2062507403276751600, "line_mean": 21.5402298851, "line_max": 105, "alpha_frac": 0.6455889852, "autogenerated": false, "ratio": 4.137130801687764, "config_...
__author__ = 'SmileyBarry' import requests import sys import time from .consts import API_CALL_DOCSTRING_TEMPLATE, API_CALL_PARAMETER_TEMPLATE, IPYTHON_PEEVES, IPYTHON_MODE from .decorators import Singleton, cached_property, INFINITE from .errors import APIException, APIUnauthorized, APIKeyRequired, APIPrivate, APICo...
{ "repo_name": "smiley/steamapi", "path": "steamapi/core.py", "copies": "1", "size": "27034", "license": "mit", "hash": -5120185184894570000, "line_mean": 38.4656934307, "line_max": 120, "alpha_frac": 0.5747207221, "autogenerated": false, "ratio": 4.535906040268457, "config_test": false, "has_...
__author__ = 'SmileyBarry' import threading import time class debug(object): @staticmethod def no_return(originalFunction, *args, **kwargs): def callNoReturn(*args, **kwargs): originalFunction(*args, **kwargs) # This code should never return! raise AssertionError("...
{ "repo_name": "balohmatevz/steamapi", "path": "steamapi/decorators.py", "copies": "1", "size": "3834", "license": "mit", "hash": -31086386285991290, "line_mean": 31.7777777778, "line_max": 78, "alpha_frac": 0.6171100678, "autogenerated": false, "ratio": 4.548042704626335, "config_test": false, ...
__author__ = 'SmileyBarry' class Enum(object): def __init__(self): raise TypeError("Enums cannot be instantiated, use their attributes instead") class CommunityVisibilityState(Enum): PRIVATE = 1 FRIENDS_ONLY = 2 FRIENDS_OF_FRIENDS = 3 USERS_ONLY = 4 PUBLIC = 5 class OnlineState(Enu...
{ "repo_name": "balohmatevz/steamapi", "path": "steamapi/consts.py", "copies": "1", "size": "1119", "license": "mit", "hash": 4020544255870311400, "line_mean": 23.8888888889, "line_max": 117, "alpha_frac": 0.6657730116, "autogenerated": false, "ratio": 3.262390670553936, "config_test": false, ...
__author__ = 'SmileyBarry' class Enum(object): def __init__(self): raise TypeError( "Enums cannot be instantiated, use their attributes instead") class CommunityVisibilityState(Enum): PRIVATE = 1 FRIENDS_ONLY = 2 FRIENDS_OF_FRIENDS = 3 USERS_ONLY = 4 PUBLIC = 5 class On...
{ "repo_name": "smiley/steamapi", "path": "steamapi/consts.py", "copies": "1", "size": "1144", "license": "mit", "hash": 187071039163490000, "line_mean": 22.8333333333, "line_max": 117, "alpha_frac": 0.6512237762, "autogenerated": false, "ratio": 3.2873563218390807, "config_test": false, "has_...
from m5.objects import * class Port0_FU(FUDesc): opList = [ OpDesc(opClass="IntAlu", opLat=1), OpDesc(opClass="IntDiv", opLat=20, pipelined=True), OpDesc(opClass="FloatMult", opLat=5), OpDesc(opClass="FloatCvt", opLat=3), OpDesc(opClass="FloatDiv", opLat=...
{ "repo_name": "alianmohammad/pd-gem5-latest", "path": "configs/common/Nehalem.py", "copies": "2", "size": "4722", "license": "bsd-3-clause", "hash": 181839231029388600, "line_mean": 26.9408284024, "line_max": 66, "alpha_frac": 0.5965692503, "autogenerated": false, "ratio": 3.040566645202833, "c...
__authors__ = ["M Sanchez del Rio - ESRF ISDD Advanced Analysis and Modelling"] __license__ = "MIT" __date__ = "12/01/2017" # # load/write files and plot facilities for the undul_phot and undul_cdf shadow3/undulator preprocessors # import numpy import h5py import time class SourceUndulatorInputOutput(object): ...
{ "repo_name": "srio/minishadow", "path": "minishadow/undulator/source_undulator_input_output.py", "copies": "1", "size": "13362", "license": "mit", "hash": -5672264668205481000, "line_mean": 30.7387173397, "line_max": 148, "alpha_frac": 0.5011974255, "autogenerated": false, "ratio": 3.10599721059...
__authors__ = ["M Sanchez del Rio - ESRF ISDD Advanced Analysis and Modelling"] __license__ = "MIT" __date__ = "12/01/2017" # # SHADOW Undulator preprocessors implemented in python # # this code replaces SHADOW's undul_phot and undul_cdf # # It calculates the undulator radiation as a function of energy, theta and phi....
{ "repo_name": "srio/minishadow", "path": "minishadow/undulator/source_undulator_factory.py", "copies": "1", "size": "9970", "license": "mit", "hash": 9055067470325614000, "line_mean": 39.0401606426, "line_max": 184, "alpha_frac": 0.5171514544, "autogenerated": false, "ratio": 2.7872518870561924, ...
__authors__ = ["M Sanchez del Rio - ESRF ISDD Advanced Analysis and Modelling"] __license__ = "MIT" __date__ = "30-08-2018" """ """ import numpy from srxraylib.util.inverse_method_sampler import Sampler1D, Sampler2D import scipy.constants as codata from scipy import interpolate from scipy.interpolate import inte...
{ "repo_name": "srio/minishadow", "path": "minishadow/bending_magnet/source_bending_magnet.py", "copies": "1", "size": "27423", "license": "mit", "hash": 4895192648452276000, "line_mean": 39.268722467, "line_max": 148, "alpha_frac": 0.5022061773, "autogenerated": false, "ratio": 3.296429859358096,...
__authors__ = ["M Sanchez del Rio - ESRF ISDD Advanced Analysis and Modelling"] __license__ = "MIT" __date__ = "30-08-2018" """ Undulator code: computes undulator radiation distributions and samples rays according to them. Fully replaces and upgrades the shadow3 undulator model. The radiation is calculating using o...
{ "repo_name": "srio/minishadow", "path": "minishadow/undulator/source_undulator.py", "copies": "1", "size": "35609", "license": "mit", "hash": -5923595346378268000, "line_mean": 40.5992990654, "line_max": 156, "alpha_frac": 0.5355387683, "autogenerated": false, "ratio": 3.4010506208213944, "con...
__authors__ = ["M Sanchez del Rio - ESRF ISDD Advanced Analysis and Modelling"] __license__ = "MIT" __date__ = "30-08-2018" """ Wiggler code: computes wiggler radiation distributions and samples rays according to them. Fully replaces and upgrades the shadow3 wiggler model. The radiation is calculating using sr-xray...
{ "repo_name": "srio/minishadow", "path": "minishadow/wiggler/source_wiggler.py", "copies": "1", "size": "40959", "license": "mit", "hash": -3847336538029610000, "line_mean": 38.7274490786, "line_max": 158, "alpha_frac": 0.4788935277, "autogenerated": false, "ratio": 3.2471063897257015, "config_...
__author__ = 'smurpheus' import sqlite3 from listing_manager import Listing class DBConnector(object): def __init__(self): self.con = sqlite3.connect('itemstorage.db') def create_listing(self, listing): statement = "INSERT INTO listings VALUES(%s,%s,%s,'%s',%s,%s,%s,%s,%s, '%s', %s)" % ( ...
{ "repo_name": "smurpheus/sneakyfloat", "path": "dbconnector.py", "copies": "1", "size": "8332", "license": "mit", "hash": -8260576308249118000, "line_mean": 36.7013574661, "line_max": 114, "alpha_frac": 0.5081613058, "autogenerated": false, "ratio": 3.7379991027366533, "config_test": false, "...
__author__ = 'smurpheus' import struct from getpass import getpass from steam import SteamClient from steam.enums import EResult from steam.enums.emsg import EMsg from eventemitter import EventEmitter import gevent from listing_manager import Listing, ListingReceiver from csgo.enums import ECsgoGCMsg from dbconnector i...
{ "repo_name": "smurpheus/sneakyfloat", "path": "manager.py", "copies": "1", "size": "12038", "license": "mit", "hash": 8435013463615468000, "line_mean": 41.3873239437, "line_max": 130, "alpha_frac": 0.5431965443, "autogenerated": false, "ratio": 3.3476084538375974, "config_test": false, "has_...