text
stringlengths
0
1.05M
meta
dict
__author__ = "Sergey Aganezov" __email__ = "aganezov(at)cs.jhu.edu" __status__ = "production" import unittest from bg.genome import BGGenome, BGGenome_JSON_SCHEMA_JSON_KEY, post_load class BGGenomeTestCase(unittest.TestCase): def test_initialization_incorrect(self): # empty genomes are not allowed, a na...
{ "repo_name": "aganezov/bg", "path": "tests/test_genome.py", "copies": "1", "size": "4827", "license": "mit", "hash": 3560383228524708400, "line_mean": 39.5630252101, "line_max": 125, "alpha_frac": 0.6192251916, "autogenerated": false, "ratio": 3.557111274871039, "config_test": true, "has_no_...
__author__ = "Sergey Karakovskiy" __date__ = "$Mar 18, 2010 10:48:28 PM$" class Inspectable(object): """ All derived classes gains the ability to print the names and values of all their fields""" def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, dict([(x, ...
{ "repo_name": "kavanj/marioai", "path": "src/amico/python/agents/evaluationinfo.py", "copies": "1", "size": "1597", "license": "bsd-3-clause", "hash": 5710164127201321000, "line_mean": 35.2954545455, "line_max": 105, "alpha_frac": 0.5767063244, "autogenerated": false, "ratio": 3.1686507936507935,...
__author__="Sergey Karakovskiy, sergey at idsia fullstop ch" __date__ ="$May 2, 2009 7:54:12 PM$" class MarioAgent: # class MarioAgent(Agent): """ An agent is an entity capable of producing actions, based on previous observations. Generally it will also learn from experience. It can interact directly wi...
{ "repo_name": "pgkaila/marioai", "path": "src/ch/idsia/agents/controllers/marioagent.py", "copies": "28", "size": "1054", "license": "bsd-3-clause", "hash": 7300116598563870000, "line_mean": 26.7368421053, "line_max": 91, "alpha_frac": 0.6091081594, "autogenerated": false, "ratio": 3.977358490566...
__author__="Sergey Karakovskiy, sergey at idsia fullstop ch" __date__ ="$May 2, 2009 7:54:12 PM$" import numpy as np class MarioAgent(object): """ An agent is an entity capable of producing actions, based on previous observations. Generally it will also learn from experience. It can interact directly wit...
{ "repo_name": "hunse/mario-ai", "path": "src/amico/python/agents/marioagent.py", "copies": "1", "size": "3416", "license": "bsd-3-clause", "hash": -7142293253190240000, "line_mean": 28.7043478261, "line_max": 93, "alpha_frac": 0.5518149883, "autogenerated": false, "ratio": 3.588235294117647, "c...
__author__ = "Sergey Karakovskiy, sergey at idsia fullstop ch" __date__ = "$May 2, 2009 7:54:12 PM$" class MarioAgent: # class MarioAgent(Agent): """ An agent is an entity capable of producing actions, based on previous observations. Generally it will also learn from experience. It can interact dir...
{ "repo_name": "kavanj/marioai", "path": "src/ch/idsia/agents/controllers/marioagent.py", "copies": "1", "size": "1062", "license": "bsd-3-clause", "hash": 7191100334923447000, "line_mean": 26.2307692308, "line_max": 91, "alpha_frac": 0.604519774, "autogenerated": false, "ratio": 3.992481203007519...
__author__ = 'Sergey Matyunin' import numpy as np def interp2linear(z, xi, yi, extrapval=np.nan): """ Linear interpolation equivalent to interp2(z, xi, yi,'linear') in MATLAB @param z: function defined on square lattice [0..width(z))X[0..height(z)) @param xi: matrix of x coordinates wher...
{ "repo_name": "serge-m/pyinterp2", "path": "interp2.py", "copies": "1", "size": "1870", "license": "mit", "hash": -624157563122852200, "line_mean": 24.338028169, "line_max": 77, "alpha_frac": 0.5272727273, "autogenerated": false, "ratio": 3.1856899488926746, "config_test": false, "has_no_keyw...
__author__ = 'Sergey Matyunin' import theano import theano.tensor as T class TrainFunction(object): def __init__(self, u0, v0, rate, num_steps, **kwargs): self.rate = rate self.gu, self.gv = None, None self.E = None self.count = 0 self.num_steps = n...
{ "repo_name": "serge-m/py_optical_flow", "path": "train_function.py", "copies": "1", "size": "2491", "license": "mit", "hash": -2312745331358085600, "line_mean": 28.4024390244, "line_max": 104, "alpha_frac": 0.5194700923, "autogenerated": false, "ratio": 3.2100515463917527, "config_test": false...
__author__ = 'Sergey Matyunin' import unittest import numpy as np from interp2 import interp2linear from numpy import nan from StringIO import StringIO class Interp2TestCase(unittest.TestCase): def test_interp2linear(self): i1 = np.array([ [0.5, 0., 0.], [1., 0., 0.],...
{ "repo_name": "serge-m/pyinterp2", "path": "test/test_interp2.py", "copies": "1", "size": "3569", "license": "mit", "hash": -3073268612419549700, "line_mean": 28.7672413793, "line_max": 98, "alpha_frac": 0.3816195013, "autogenerated": false, "ratio": 3.8293991416309012, "config_test": true, "...
__author__ = 'sergey' import os import sys import subprocess from distutils.core import setup from distutils.extension import Extension CYTHON_BUILD = 0 if "--cython-build" in sys.argv: # Support compiling with Cython CYTHON_BUILD = 1 sys.argv.remove("--cython-build") from Cython.Distutils import bu...
{ "repo_name": "sergey-dryabzhinsky/dedupsqlfs", "path": "setup.py", "copies": "1", "size": "7206", "license": "mit", "hash": 4871487943452490000, "line_mean": 32.2073732719, "line_max": 129, "alpha_frac": 0.6498751041, "autogenerated": false, "ratio": 3.3942534149788037, "config_test": false, ...
__author__ = 'Sergey' import shutil import os import stat def read_all_directory_path(root_folder, final_directory_list=[], folder_for_remove='.svn'): under_files_and_folders = os.listdir(root_folder) if os.path.split(root_folder)[1] == folder_for_remove: final_directory_list.append(root_folder) ...
{ "repo_name": "sdenisen/python", "path": "remove_svn_folder.py", "copies": "2", "size": "1656", "license": "unlicense", "hash": -8296082132990228000, "line_mean": 29.1090909091, "line_max": 92, "alpha_frac": 0.6322463768, "autogenerated": false, "ratio": 3.6157205240174672, "config_test": false...
__author__ = 'sergey' class AbstractDuck: def __init__(self, name): self.name = name print "I'm " + name def setFly(self, method): self.fly = method def setQuack(self, method): self.quack = method def swim(self): print "\tAll ducks float!" # to call a metho...
{ "repo_name": "Sergey010289/Design_Patterns_Python", "path": "strategy.py", "copies": "1", "size": "1879", "license": "mit", "hash": -6780965194756426000, "line_mean": 21.369047619, "line_max": 69, "alpha_frac": 0.5992549228, "autogenerated": false, "ratio": 3.131666666666667, "config_test": fa...
__author__ = 'Sergey Ragatsky' import string from nose.tools import nottest, ok_, assert_equal, assert_false, assert_in from nose.plugins.attrib import attr from nose_ittr import IttrMultiplier, ittr class TestMetaClassIttrMultiplayer(object): def setup(self): self.test_class_one = test_class_one() ...
{ "repo_name": "taykey/nose-ittr", "path": "nose_ittr/test/test_ittr_multiplayer.py", "copies": "1", "size": "6099", "license": "apache-2.0", "hash": -1989849863923183000, "line_mean": 31.6203208556, "line_max": 77, "alpha_frac": 0.5856697819, "autogenerated": false, "ratio": 3.1006609049313676, ...
__author__ = 'sergio' import os import re __all__ = ['PLANO_REFERENCIAL_PJ_RESUMIDO'] PLANO_REFERENCIAL_PJ_RESUMIDO = [] path_tabelas = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'tabelas') # tabela = 'SPEDCONTABIL_DINAMICO_2014$SPEDECF_DINAMICA_P100$12$389' tabela = 'SPEDCONTABIL_DINAMICO_2014$SPEDE...
{ "repo_name": "odoo-brazil/python-sped", "path": "sped/ecd/tabelas.py", "copies": "2", "size": "1193", "license": "mit", "hash": -8472694926494701000, "line_mean": 38.7333333333, "line_max": 112, "alpha_frac": 0.6845637584, "autogenerated": false, "ratio": 2.4628099173553717, "config_test": fal...
__author__ = 'Sergio Sicari' __email__ = "sergiosicari@gmail.com" import sublime, sublime_plugin import sys,os libraries = ["evernote", "oauth2", "httplib2", "pygments"] abspath = os.path.abspath(os.path.dirname(__file__)) basepath = abspath #abspath = os.path.dirname(__file__) for library in libraries: if abspath+"...
{ "repo_name": "sergioska/EvernoteSyntaxHighlight", "path": "ever.py", "copies": "1", "size": "2681", "license": "apache-2.0", "hash": -5362664912667784000, "line_mean": 28.7888888889, "line_max": 110, "alpha_frac": 0.6967549422, "autogenerated": false, "ratio": 3.2695121951219512, "config_test"...
__author__ = 'Sergio Sykes' """ Usage: Add this script to your maya/scripts directory In maya, from the Python Command line, enter: import cogswellCoupler; reload(cogswellCoupler).GUI() This script assumes your rig skeleton is parented directly under your world/main controller """ import pymel.core as pmc class C...
{ "repo_name": "taozenforce/cogswelladvancedrigging2014", "path": "cogswellCoupler.py", "copies": "2", "size": "3070", "license": "mit", "hash": 5576010464290777000, "line_mean": 33.8977272727, "line_max": 113, "alpha_frac": 0.6228013029, "autogenerated": false, "ratio": 3.7167070217917675, "con...
import numpy as np import vtk def generate_annulus(r=None, theta=None, z=None): """ Generate points for structured grid for a cylindrical annular volume. This method is useful for generating a structured cylindrical mesh for VTK (and perhaps other tools). Parameters ---------- r : ar...
{ "repo_name": "kayarre/Tools", "path": "vtk/annulus_grid.py", "copies": "1", "size": "3518", "license": "bsd-2-clause", "hash": 8073407990048151000, "line_mean": 32.1981132075, "line_max": 71, "alpha_frac": 0.6398521887, "autogenerated": false, "ratio": 3.20985401459854, "config_test": false, ...
from functools import partial import os import numpy as np from scipy import sparse, linalg, stats from numpy.testing import (assert_equal, assert_array_equal, assert_array_almost_equal, assert_allclose) import pytest from mne import (SourceEstimate, VolSourceEstimate, MixedSourceEstimate,...
{ "repo_name": "larsoner/mne-python", "path": "mne/stats/tests/test_cluster_level.py", "copies": "4", "size": "29479", "license": "bsd-3-clause", "hash": 3321422974797714000, "line_mean": 41.6613603473, "line_max": 79, "alpha_frac": 0.5770209302, "autogenerated": false, "ratio": 3.3903392754456583...
import os.path as op from ..base import BaseRaw from ..utils import _read_segments_file, _file_size from ..meas_info import create_info from ...utils import logger, verbose, warn, fill_doc, _check_fname @fill_doc def read_raw_eximia(fname, preload=False, verbose=None): """Reader for an eXimia EEG file. Par...
{ "repo_name": "rkmaddox/mne-python", "path": "mne/io/eximia/eximia.py", "copies": "7", "size": "3002", "license": "bsd-3-clause", "hash": -5578335259080797000, "line_mean": 31.6304347826, "line_max": 77, "alpha_frac": 0.5596269154, "autogenerated": false, "ratio": 3.170010559662091, "config_tes...
import os.path as op from ..base import BaseRaw from ..utils import _read_segments_file, _file_size from ..meas_info import create_info from ...utils import logger, verbose, warn, fill_doc @fill_doc def read_raw_eximia(fname, preload=False, verbose=None): """Reader for an eXimia EEG file. Parameters --...
{ "repo_name": "adykstra/mne-python", "path": "mne/io/eximia/eximia.py", "copies": "2", "size": "3021", "license": "bsd-3-clause", "hash": 1674436064453842700, "line_mean": 31.8369565217, "line_max": 77, "alpha_frac": 0.5666997683, "autogenerated": false, "ratio": 3.220682302771855, "config_test...
import os.path as op from ..base import BaseRaw from ..utils import _read_segments_file, _file_size from ..meas_info import create_info from ...utils import logger, verbose, warn def read_raw_eximia(fname, preload=False, verbose=None): """Reader for an eXimia EEG file. Parameters ---------- fname :...
{ "repo_name": "teonlamont/mne-python", "path": "mne/io/eximia/eximia.py", "copies": "3", "size": "3177", "license": "bsd-3-clause", "hash": -2612525697982883000, "line_mean": 33.5326086957, "line_max": 77, "alpha_frac": 0.5725527227, "autogenerated": false, "ratio": 3.2888198757763973, "config_...
import glob import os.path as op import numpy as np import pytest from mne import what, create_info from mne.datasets import testing from mne.io import RawArray from mne.preprocessing import ICA from mne.utils import requires_sklearn data_path = testing.data_path(download=False) @pytest.mark.slowtest @requires_sk...
{ "repo_name": "drammock/mne-python", "path": "mne/io/tests/test_what.py", "copies": "4", "size": "1725", "license": "bsd-3-clause", "hash": -1130718299946159000, "line_mean": 32.1730769231, "line_max": 77, "alpha_frac": 0.5976811594, "autogenerated": false, "ratio": 3.298279158699809, "config_t...
from functools import partial import numpy as np from ..defaults import _handle_default from ..fixes import _safe_svd from ..utils import warn, logger, sqrtm_sym, eigh # For the reference implementation of eLORETA (force_equal=False), # 0 < loose <= 1 all produce solutions that are (more or less) # the same as free...
{ "repo_name": "Eric89GXL/mne-python", "path": "mne/minimum_norm/_eloreta.py", "copies": "12", "size": "7272", "license": "bsd-3-clause", "hash": -8815944659869095000, "line_mean": 37.6808510638, "line_max": 78, "alpha_frac": 0.5793454345, "autogenerated": false, "ratio": 3.1358344113842174, "co...
from functools import partial import os.path as op from ...utils import verbose from ..utils import (has_dataset, _data_path, _get_version, _version_doc, _data_path_doc) has_brainstorm_data = partial(has_dataset, name='brainstorm') _description = u""" URL: http://neuroimage.usc.edu/brainstorm/...
{ "repo_name": "jmontoyam/mne-python", "path": "mne/datasets/brainstorm/bst_phantom_ctf.py", "copies": "3", "size": "1562", "license": "bsd-3-clause", "hash": 1636638205010275600, "line_mean": 30.24, "line_max": 79, "alpha_frac": 0.6069142125, "autogenerated": false, "ratio": 3.351931330472103, ...
from functools import partial from ...utils import verbose from ..utils import (has_dataset, _data_path, _get_version, _version_doc, _data_path_doc_accept) has_brainstorm_data = partial(has_dataset, name='brainstorm.bst_phantom_ctf') _description = u""" URL: http://neuroimage.usc.edu/brainstor...
{ "repo_name": "larsoner/mne-python", "path": "mne/datasets/brainstorm/bst_phantom_ctf.py", "copies": "12", "size": "1410", "license": "bsd-3-clause", "hash": 4310856760582543000, "line_mean": 30.3333333333, "line_max": 79, "alpha_frac": 0.6453900709, "autogenerated": false, "ratio": 3.15436241610...
from functools import partial from ...utils import verbose from ..utils import (has_dataset, _data_path, _get_version, _version_doc, _data_path_doc) has_brainstorm_data = partial(has_dataset, name='brainstorm.bst_phantom_ctf') _description = u""" URL: http://neuroimage.usc.edu/brainstorm/Tutor...
{ "repo_name": "cjayb/mne-python", "path": "mne/datasets/brainstorm/bst_phantom_ctf.py", "copies": "5", "size": "1423", "license": "bsd-3-clause", "hash": 7525018696221057000, "line_mean": 30.6222222222, "line_max": 79, "alpha_frac": 0.6148981026, "autogenerated": false, "ratio": 3.271264367816091...
from functools import partial import numpy as np from scipy import linalg, fftpack from .io.pick import pick_types, pick_channels from .io.constants import FIFF from .forward import (_magnetic_dipole_field_vec, _create_meg_coils, _concatenate_coils, _read_coil_defs) from .cov import make_ad_hoc...
{ "repo_name": "jniediek/mne-python", "path": "mne/chpi.py", "copies": "3", "size": "26930", "license": "bsd-3-clause", "hash": 585946823801364600, "line_mean": 40.3671274962, "line_max": 79, "alpha_frac": 0.5408837727, "autogenerated": false, "ratio": 3.2270820850808866, "config_test": false, ...
import copy import os from os import path as op import shutil import numpy as np from numpy import array_equal from numpy.testing import assert_allclose, assert_array_equal import pytest import mne from mne import (pick_types, read_annotations, create_info, events_from_annotations, make_forward_solu...
{ "repo_name": "wmvanvliet/mne-python", "path": "mne/io/ctf/tests/test_ctf.py", "copies": "3", "size": "19724", "license": "bsd-3-clause", "hash": 6485848066146222000, "line_mean": 45.0841121495, "line_max": 79, "alpha_frac": 0.6001825188, "autogenerated": false, "ratio": 2.9342457601904197, "co...
import datetime as dt import re import numpy as np from ..base import BaseRaw from ..constants import FIFF from ..meas_info import create_info from ..nirx.nirx import _read_csv_rows_cols from ..utils import _mult_cal_one from ...utils import (logger, verbose, fill_doc, warn, _check_fname, _chec...
{ "repo_name": "rkmaddox/mne-python", "path": "mne/io/hitachi/hitachi.py", "copies": "4", "size": "10281", "license": "bsd-3-clause", "hash": -6266578948806054000, "line_mean": 35.3286219081, "line_max": 78, "alpha_frac": 0.4825406089, "autogenerated": false, "ratio": 3.712892741061755, "config_...
import numpy as np from numpy.fft import rfft, irfft from .utils import sizeof_fmt, logger, get_config, warn, _explain_exception # Support CUDA for FFTs; requires scikits.cuda and pycuda _cuda_capable = False _multiply_inplace_c128 = _halve_c128 = _double_c128 = None def _get_cudafft(): """Deal with scikit-cu...
{ "repo_name": "teonlamont/mne-python", "path": "mne/cuda.py", "copies": "2", "size": "14924", "license": "bsd-3-clause", "hash": -3391024496655843300, "line_mean": 37.168797954, "line_max": 79, "alpha_frac": 0.5706244975, "autogenerated": false, "ratio": 3.737540696218382, "config_test": true, ...
import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_array_equal from scipy import linalg from .. import pick_types, Evoked from ..io import BaseRaw from ..io.constants import FIFF from ..bem import fit_sphere_to_headshape def _get_data(x, ch_idx): """Get the (n_ch, n_times) data ...
{ "repo_name": "teonlamont/mne-python", "path": "mne/tests/common.py", "copies": "4", "size": "4529", "license": "bsd-3-clause", "hash": -7052686565818186000, "line_mean": 41.7264150943, "line_max": 78, "alpha_frac": 0.5886509163, "autogenerated": false, "ratio": 3.047779273216689, "config_test"...
import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_array_equal from scipy import linalg from .. import pick_types, Evoked from ..io import _BaseRaw from ..io.constants import FIFF from ..bem import fit_sphere_to_headshape def _get_data(x, ch_idx): """Helper to get the (n_ch, n_t...
{ "repo_name": "jmontoyam/mne-python", "path": "mne/tests/common.py", "copies": "8", "size": "5332", "license": "bsd-3-clause", "hash": 751050167178045000, "line_mean": 40.9842519685, "line_max": 79, "alpha_frac": 0.6003375844, "autogenerated": false, "ratio": 3.166270783847981, "config_test": f...
import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_array_equal from scipy import linalg from .. import pick_types, Evoked from ..io import BaseRaw from ..io.constants import FIFF from ..bem import fit_sphere_to_headshape def _get_data(x, ch_idx): """Helper to get the (n_ch, n_ti...
{ "repo_name": "nicproulx/mne-python", "path": "mne/tests/common.py", "copies": "5", "size": "5327", "license": "bsd-3-clause", "hash": 2171307211807102500, "line_mean": 40.6171875, "line_max": 78, "alpha_frac": 0.6054064201, "autogenerated": false, "ratio": 3.150206978119456, "config_test": fal...
import numpy as np from numpy.testing import assert_allclose, assert_equal from .. import pick_types, Evoked from ..io import _BaseRaw from ..io.constants import FIFF from ..bem import fit_sphere_to_headshape def _get_data(x, ch_idx): """Helper to get the (n_ch, n_times) data array""" if isinstance(x, _Base...
{ "repo_name": "cmoutard/mne-python", "path": "mne/tests/common.py", "copies": "1", "size": "2915", "license": "bsd-3-clause", "hash": 6304353307285652000, "line_mean": 38.3918918919, "line_max": 74, "alpha_frac": 0.5996569468, "autogenerated": false, "ratio": 2.880434782608696, "config_test": f...
import numpy as np from os import path as op from scipy import linalg from .io.pick import pick_types, pick_channels from .io.base import _BaseRaw from .io.constants import FIFF from .forward import (_magnetic_dipole_field_vec, _create_meg_coils, _concatenate_coils) from .cov import make_ad_hoc_...
{ "repo_name": "cmoutard/mne-python", "path": "mne/chpi.py", "copies": "1", "size": "19468", "license": "bsd-3-clause", "hash": -3275448209936837000, "line_mean": 39.643006263, "line_max": 79, "alpha_frac": 0.5404766797, "autogenerated": false, "ratio": 3.131917631917632, "config_test": false, ...
import numpy as np from os import path as op from .pick import pick_types from .base import _BaseRaw from ..utils import verbose from ..externals.six import string_types @verbose def get_chpi_positions(raw, t_step=None, verbose=None): """Extract head positions Note that the raw instance must have CHPI chan...
{ "repo_name": "antiface/mne-python", "path": "mne/io/chpi.py", "copies": "12", "size": "4695", "license": "bsd-3-clause", "hash": 5123663161728791000, "line_mean": 34.3007518797, "line_max": 76, "alpha_frac": 0.5710330138, "autogenerated": false, "ratio": 3.372844827586207, "config_test": false...
import numpy as np from scipy.fftpack import fft, ifft from .utils import sizeof_fmt, logger, get_config # Support CUDA for FFTs; requires scikits.cuda and pycuda _cuda_capable = False _multiply_inplace_c128 = _halve_c128 = _real_c128 = None def get_cuda_memory(): """Get the amount of free memory for CUDA ope...
{ "repo_name": "Odingod/mne-python", "path": "mne/cuda.py", "copies": "3", "size": "14260", "license": "bsd-3-clause", "hash": -3026360379545724400, "line_mean": 37.8555858311, "line_max": 79, "alpha_frac": 0.5664796634, "autogenerated": false, "ratio": 3.7915448019143843, "config_test": true, ...
import numpy as np from scipy.fftpack import fft, ifft try: import pycuda.gpuarray as gpuarray from pycuda.driver import mem_get_info from scikits.cuda import fft as cudafft except (ImportError, OSError): # need OSError because scikits.cuda throws it if cufft not found pass from .utils import size...
{ "repo_name": "effigies/mne-python", "path": "mne/cuda.py", "copies": "1", "size": "13806", "license": "bsd-3-clause", "hash": 3376977842394831000, "line_mean": 37.7808988764, "line_max": 79, "alpha_frac": 0.569317688, "autogenerated": false, "ratio": 3.7876543209876545, "config_test": false, ...
import numpy as np from scipy.fftpack import fft, ifft, rfft, irfft from .utils import sizeof_fmt, logger, get_config, warn, _explain_exception # Support CUDA for FFTs; requires scikits.cuda and pycuda _cuda_capable = False _multiply_inplace_c128 = _halve_c128 = _real_c128 = None def _get_cudafft(): """Deal w...
{ "repo_name": "nicproulx/mne-python", "path": "mne/cuda.py", "copies": "3", "size": "15322", "license": "bsd-3-clause", "hash": -385450249221753340, "line_mean": 37.8883248731, "line_max": 79, "alpha_frac": 0.5629160684, "autogenerated": false, "ratio": 3.6965018094089266, "config_test": true, ...
import numpy as np from scipy import linalg, fftpack from .io.pick import pick_types, pick_channels from .io.base import _BaseRaw from .io.constants import FIFF from .forward import (_magnetic_dipole_field_vec, _create_meg_coils, _concatenate_coils, _read_coil_defs) from .cov import make_ad_hoc_...
{ "repo_name": "wronk/mne-python", "path": "mne/chpi.py", "copies": "2", "size": "27605", "license": "bsd-3-clause", "hash": 645893909027766700, "line_mean": 39.3581871345, "line_max": 79, "alpha_frac": 0.547835537, "autogenerated": false, "ratio": 3.278114238213989, "config_test": false, "has...
import numpy as np from scipy import linalg, fftpack from .io.pick import pick_types, pick_channels from .io.constants import FIFF from .forward import (_magnetic_dipole_field_vec, _create_meg_coils, _concatenate_coils, _read_coil_defs) from .cov import make_ad_hoc_cov, _get_whitener_data from ....
{ "repo_name": "alexandrebarachant/mne-python", "path": "mne/chpi.py", "copies": "3", "size": "24853", "license": "bsd-3-clause", "hash": 3013125602009355000, "line_mean": 39.7426229508, "line_max": 79, "alpha_frac": 0.5397738704, "autogenerated": false, "ratio": 3.2289203585812656, "config_test...
import numpy as np import pytest from mne import create_info from mne.io import RawArray from mne.utils import logger, catch_logging, run_tests_if_main def bad_1(x): """Fail.""" return # bad return type def bad_2(x): """Fail.""" return x[:-1] # bad shape def bad_3(x): """Fail.""" retur...
{ "repo_name": "adykstra/mne-python", "path": "mne/io/tests/test_apply_function.py", "copies": "2", "size": "1942", "license": "bsd-3-clause", "hash": -7775078403417984000, "line_mean": 27.5588235294, "line_max": 75, "alpha_frac": 0.6441812564, "autogenerated": false, "ratio": 3.4432624113475176, ...
import numpy as np from ..annotations import _annotations_starts_stops, Annotations from ..io import BaseRaw from ..io.pick import _picks_to_idx from ..utils import (_validate_type, verbose, logger, _pl, _mask_to_onsets_offsets, ProgressBar) @verbose def annotate_flat(raw, bad_percent=5., min_d...
{ "repo_name": "Eric89GXL/mne-python", "path": "mne/preprocessing/flat.py", "copies": "12", "size": "4302", "license": "bsd-3-clause", "hash": 9063035851091252000, "line_mean": 39.9523809524, "line_max": 79, "alpha_frac": 0.5918604651, "autogenerated": false, "ratio": 3.7005163511187606, "config...
import numpy as np from ..annotations import _annotations_starts_stops from ..io import BaseRaw from ..io.pick import _picks_to_idx from ..utils import (_validate_type, verbose, logger, _pl, _mask_to_onsets_offsets, ProgressBar) @verbose def mark_flat(raw, bad_percent=5., min_duration=0.005, pi...
{ "repo_name": "cjayb/mne-python", "path": "mne/preprocessing/flat.py", "copies": "2", "size": "4273", "license": "bsd-3-clause", "hash": -7035439548041356000, "line_mean": 40.0673076923, "line_max": 79, "alpha_frac": 0.5902598923, "autogenerated": false, "ratio": 3.6598114824335903, "config_tes...
import numpy as np from ..defaults import _handle_default from ..fixes import _safe_svd from ..utils import warn, logger, sqrtm_sym, eigh # For the reference implementation of eLORETA (force_equal=False), # 0 < loose <= 1 all produce solutions that are (more or less) # the same as free orientation (loose=1) and qui...
{ "repo_name": "cjayb/mne-python", "path": "mne/minimum_norm/_eloreta.py", "copies": "2", "size": "6990", "license": "bsd-3-clause", "hash": -446005704841424400, "line_mean": 38.4915254237, "line_max": 78, "alpha_frac": 0.573676681, "autogenerated": false, "ratio": 3.1903240529438612, "config_te...
import numpy as np from ..epochs import BaseEpochs from ..io.pick import _picks_to_idx from ..io.base import BaseRaw from ..utils import _check_preload, _validate_type, _check_option, verbose @verbose def regress_artifact(inst, picks=None, picks_artifact='eog', betas=None, copy=True, verbose=No...
{ "repo_name": "larsoner/mne-python", "path": "mne/preprocessing/_regress.py", "copies": "5", "size": "3402", "license": "bsd-3-clause", "hash": 1837960521152907, "line_mean": 38.1034482759, "line_max": 93, "alpha_frac": 0.6378600823, "autogenerated": false, "ratio": 3.562303664921466, "config_t...
import numpy as np from ..io import BaseRaw from ..io.pick import _picks_to_idx from ..utils import (_validate_type, verbose, logger, _pl, _mask_to_onsets_offsets, ProgressBar) @verbose def mark_flat(raw, bad_percent=5., min_duration=0.005, picks=None, verbose=None): r"""Mark ...
{ "repo_name": "adykstra/mne-python", "path": "mne/preprocessing/flat.py", "copies": "1", "size": "4008", "license": "bsd-3-clause", "hash": -2572319409584508000, "line_mean": 39.4646464646, "line_max": 79, "alpha_frac": 0.5788816775, "autogenerated": false, "ratio": 3.7474275023386343, "config_...
import numpy as np from scipy import linalg from ..defaults import _handle_default from ..fixes import _safe_svd from ..utils import warn, logger # For the reference implementation of eLORETA (force_equal=False), # 0 < loose <= 1 all produce solutions that are (more or less) # the same as free orientation (loose=1...
{ "repo_name": "adykstra/mne-python", "path": "mne/minimum_norm/_eloreta.py", "copies": "6", "size": "6031", "license": "bsd-3-clause", "hash": -5013574865267384000, "line_mean": 39.75, "line_max": 79, "alpha_frac": 0.5708837672, "autogenerated": false, "ratio": 3.2285867237687365, "config_test"...
import os from os import path as op import shutil import warnings import numpy as np from nose.tools import assert_raises, assert_true, assert_false from numpy.testing import assert_allclose, assert_array_equal, assert_equal from mne import pick_types from mne.tests.common import assert_dig_allclose from mne.transfo...
{ "repo_name": "alexandrebarachant/mne-python", "path": "mne/io/ctf/tests/test_ctf.py", "copies": "5", "size": "10354", "license": "bsd-3-clause", "hash": 4175182335623569400, "line_mean": 47.3831775701, "line_max": 79, "alpha_frac": 0.579679351, "autogenerated": false, "ratio": 3.0372543267820475...
import os.path as op from ...utils import verbose from ...fixes import partial from ..utils import (has_dataset, _data_path, _get_version, _version_doc, _data_path_doc) has_brainstorm_data = partial(has_dataset, name='brainstorm') _description = u""" URL: http://neuroimage.usc.edu/brainstorm/T...
{ "repo_name": "alexandrebarachant/mne-python", "path": "mne/datasets/brainstorm/bst_phantom_ctf.py", "copies": "2", "size": "1561", "license": "bsd-3-clause", "hash": -9044289993659191000, "line_mean": 30.22, "line_max": 79, "alpha_frac": 0.6047405509, "autogenerated": false, "ratio": 3.342612419...
import os.path as op import pytest import numpy as np from numpy.fft import rfft, rfftfreq from mne import create_info from mne.datasets import testing from mne.io import RawArray, read_raw_fif from mne.io.pick import _pick_data_channels from mne.preprocessing import oversampled_temporal_projection from mne.utils i...
{ "repo_name": "wmvanvliet/mne-python", "path": "mne/preprocessing/tests/test_otp.py", "copies": "17", "size": "3871", "license": "bsd-3-clause", "hash": -4067715987699951600, "line_mean": 36.2211538462, "line_max": 79, "alpha_frac": 0.6238698011, "autogenerated": false, "ratio": 3.074662430500397...
import numpy as np import os.path as op import itertools from distutils.version import LooseVersion from numpy.testing import assert_allclose import pytest import matplotlib import matplotlib.pyplot as plt from mne import read_events, pick_types, Annotations, create_info from mne.datasets import testing from mne.io ...
{ "repo_name": "cjayb/mne-python", "path": "mne/viz/tests/test_raw.py", "copies": "1", "size": "21152", "license": "bsd-3-clause", "hash": 6253209279162296000, "line_mean": 39.7475915222, "line_max": 79, "alpha_frac": 0.6000094572, "autogenerated": false, "ratio": 3.0224381877947692, "config_tes...
import os.path as op import itertools import numpy as np from numpy.testing import assert_allclose import pytest import matplotlib import matplotlib.pyplot as plt from mne import read_events, pick_types, Annotations, create_info from mne.datasets import testing from mne.fixes import _close_event from mne.io import r...
{ "repo_name": "mne-tools/mne-python", "path": "mne/viz/tests/test_raw.py", "copies": "2", "size": "31759", "license": "bsd-3-clause", "hash": 3854354668758932500, "line_mean": 41.5402144772, "line_max": 79, "alpha_frac": 0.6205766504, "autogenerated": false, "ratio": 3.0502691272587468, "config...
import os.path as op import warnings from numpy.testing import assert_raises from mne import io, read_events, pick_types from mne.utils import requires_version, run_tests_if_main from mne.viz.utils import _fake_click # Set our plotters to test mode import matplotlib matplotlib.use('Agg') # for testing don't use X ...
{ "repo_name": "rajegannathan/grasp-lift-eeg-cat-dog-solution-updated", "path": "python-packages/mne-python-0.10/mne/viz/tests/test_raw.py", "copies": "1", "size": "4667", "license": "bsd-3-clause", "hash": 5461002826466056000, "line_mean": 36.336, "line_max": 79, "alpha_frac": 0.611527748, "autogen...
import numpy as np from numpy.testing import assert_allclose import pytest from scipy.signal import hilbert from mne.connectivity import envelope_correlation def _compute_corrs_orig(data): # This is the version of the code by Sheraz and Denis. # For this version (epochs, labels, time) must be -> (labels, ti...
{ "repo_name": "olafhauk/mne-python", "path": "mne/connectivity/tests/test_envelope.py", "copies": "4", "size": "3228", "license": "bsd-3-clause", "hash": 3394203897486447000, "line_mean": 42.6216216216, "line_max": 79, "alpha_frac": 0.6366171004, "autogenerated": false, "ratio": 3.359001040582726...
import numpy as np from ..filter import next_fast_len from ..source_estimate import _BaseSourceEstimate from ..utils import verbose, _check_combine, _check_option @verbose def envelope_correlation(data, combine='mean', orthogonalize="pairwise", log=False, absolute=True, verbose=None): "...
{ "repo_name": "drammock/mne-python", "path": "mne/connectivity/envelope.py", "copies": "8", "size": "6302", "license": "bsd-3-clause", "hash": 145122297214886000, "line_mean": 40.4605263158, "line_max": 79, "alpha_frac": 0.5964773088, "autogenerated": false, "ratio": 3.963522012578616, "config_...
import numpy as np from ..filter import next_fast_len from ..source_estimate import _BaseSourceEstimate from ..utils import verbose, _check_combine @verbose def envelope_correlation(data, combine='mean', verbose=None): """Compute the envelope correlation. Parameters ---------- data : array-like, sh...
{ "repo_name": "adykstra/mne-python", "path": "mne/connectivity/envelope.py", "copies": "1", "size": "4787", "license": "bsd-3-clause", "hash": -3061883553630158000, "line_mean": 41.6964285714, "line_max": 79, "alpha_frac": 0.6114596403, "autogenerated": false, "ratio": 3.6869699306090977, "conf...
import os from os import 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 ############################################################################## # FAST LEGENDRE (DERI...
{ "repo_name": "teonlamont/mne-python", "path": "mne/forward/_lead_dots.py", "copies": "5", "size": "18857", "license": "bsd-3-clause", "hash": -2680866822702062600, "line_mean": 35.6155339806, "line_max": 79, "alpha_frac": 0.5697088614, "autogenerated": false, "ratio": 3.0822164105916965, "conf...
import os from os import path as op import numpy as np from numpy.polynomial import legendre from ..parallel import parallel_func from ..utils import logger, _get_extra_data_path ############################################################################## # FAST LEGENDRE (DERIVATIVE) POLYNOMIALS USING LOOKUP TAB...
{ "repo_name": "matthew-tucker/mne-python", "path": "mne/forward/_lead_dots.py", "copies": "7", "size": "19257", "license": "bsd-3-clause", "hash": 1181619228166365200, "line_mean": 36.247582205, "line_max": 79, "alpha_frac": 0.5538765124, "autogenerated": false, "ratio": 3.1424608355091386, "co...
import os from os import 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 ############################################################################## # FAST LEGENDRE (DERIVATIVE) POLYNOMIALS USING L...
{ "repo_name": "nicproulx/mne-python", "path": "mne/forward/_lead_dots.py", "copies": "3", "size": "18857", "license": "bsd-3-clause", "hash": -6416217600729951000, "line_mean": 35.686770428, "line_max": 79, "alpha_frac": 0.5694437079, "autogenerated": false, "ratio": 3.081712698153293, "config_...
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 ############################################################################## # FAST LEGENDRE (DERIVATIV...
{ "repo_name": "adykstra/mne-python", "path": "mne/forward/_lead_dots.py", "copies": "1", "size": "18846", "license": "bsd-3-clause", "hash": -9124618697016250000, "line_mean": 35.6653696498, "line_max": 79, "alpha_frac": 0.5698291415, "autogenerated": false, "ratio": 3.0763956904995102, "config...
__author__ = 'seriouschicken' # This file serve as a data extractor from the gdp_overtime. This file will open the file and scan through the # Data of countries and their GDP overtime. Then, we will inject these data into the existing geoJSON # The resulting geoJSON will contains the countries, their geographic data a...
{ "repo_name": "ExtremelySeriousChicken/WorldInD3", "path": "data_extractor.py", "copies": "1", "size": "1610", "license": "mit", "hash": 8224374997291042000, "line_mean": 30.5882352941, "line_max": 111, "alpha_frac": 0.6776397516, "autogenerated": false, "ratio": 3.561946902654867, "config_test...
__author__ = "Services team" import ceilometerclient.client import argparse import os import datetime dir_path = os.environ['PWD']+"/billing/" parser = argparse.ArgumentParser() parser.add_argument("--project_id", dest='project_id', help="write id of project, which statistics you want to get") parser.add_argument("--...
{ "repo_name": "vkuspits/ceilometer-billing", "path": "billing.py", "copies": "1", "size": "6244", "license": "apache-2.0", "hash": -5658521248269627000, "line_mean": 49.3548387097, "line_max": 118, "alpha_frac": 0.6356502242, "autogenerated": false, "ratio": 3.584385763490241, "config_test": fa...
__author__ = 'Servy' import re with open("FullSpellList.txt") as f: lines = f.readlines() def normalize_name(s): res = [] buf = "" for c in str(s): if c.isupper(): res.append(buf) buf = str(c) elif c != ' ': buf += c res.append(buf) buf = st...
{ "repo_name": "servy/dnd5spellbook", "path": "util/ocr_spells_to_html.py", "copies": "1", "size": "2126", "license": "mit", "hash": 7725387014813634000, "line_mean": 21.6276595745, "line_max": 88, "alpha_frac": 0.4557855127, "autogenerated": false, "ratio": 3.2808641975308643, "config_test": fa...
__author__ = 'setten' import numpy from pymatgen.util.testing import PymatgenTest from pymatgen.util.convergence import determine_convergence class ConvergenceTest(PymatgenTest): def test_determine_convergence(self): self.maxDiff = None xs = [1, 2, 3, 4, 5, 6] # a converging example: ...
{ "repo_name": "mbkumar/pymatgen", "path": "pymatgen/util/tests/test_convergence.py", "copies": "4", "size": "1603", "license": "mit", "hash": 7092957331557844000, "line_mean": 43.5277777778, "line_max": 91, "alpha_frac": 0.5664379289, "autogenerated": false, "ratio": 3.2253521126760565, "config...
__author__ = "setten" import numpy from pymatgen.util.convergence import determine_convergence from pymatgen.util.testing import PymatgenTest class ConvergenceTest(PymatgenTest): def test_determine_convergence(self): self.maxDiff = None xs = [1, 2, 3, 4, 5, 6] # a converging example: ...
{ "repo_name": "vorwerkc/pymatgen", "path": "pymatgen/util/tests/test_convergence.py", "copies": "5", "size": "1643", "license": "mit", "hash": 5605358941273443000, "line_mean": 36.3409090909, "line_max": 78, "alpha_frac": 0.5526475959, "autogenerated": false, "ratio": 3.2215686274509805, "confi...
__author__ = 'Sevak Mardirosian' import sys from PyQt4 import QtGui, uic class DialogDemo(QtGui.QWidget): #---------------------------------------------------------------------- def __init__(self): """Constructor""" # super(DialogDemo, self).__init__() QtGui.QWidget.__init__(self) ...
{ "repo_name": "sevmardi/University-of-Applied-Sciences-Leiden", "path": "Python/ifscp_Opdrachten/Opdracht3.py", "copies": "1", "size": "1376", "license": "mit", "hash": -635427473694955500, "line_mean": 27.6666666667, "line_max": 83, "alpha_frac": 0.5443313953, "autogenerated": false, "ratio": 4....
__author__ = 'SEVAK MARDIROSIAN' import os import sys import sqlite3 from PyQt4.QtGui import * from PyQt4.QCore import * import re import logging class Main(QMainWindow ): dbPath = "data.db" dbConn = sqlite3.connect(dbPath) def __init__(self, parant=None): super(Main, self).__init__(parant) ...
{ "repo_name": "sevmardi/University-of-Applied-Sciences-Leiden", "path": "Python/iscp_keuzemodule/Controller/main.py", "copies": "1", "size": "2982", "license": "mit", "hash": 8288776370551684000, "line_mean": 27.4, "line_max": 109, "alpha_frac": 0.619047619, "autogenerated": false, "ratio": 3.755...
__author__ = 'sevas' from BeautifulSoup import BeautifulSoup from geholexceptions import * TYPE_TO_DESCR = { 'THE':u'Theorie', 'EXE':u'Exercices', 'EXC':u'Excursion', 'GDC':u'Guidance', 'STG':u'Stage', 'TPR':u'Laboratoire', 'AGD':u'Agenda', 'GLB':u'Theorie ou Exercices', 'PRS':u'T...
{ "repo_name": "sevas/geholimportapp", "path": "dependencies/gehol/basecalendar.py", "copies": "2", "size": "3621", "license": "mit", "hash": 7921870828939956000, "line_mean": 28.4390243902, "line_max": 113, "alpha_frac": 0.5887876277, "autogenerated": false, "ratio": 4.096153846153846, "config_...
__author__ = 'sevas' from datetime import datetime import json def make_dict_keys_str(a_dict): """ Takes a dictionary with unicode strings as keys and returns a new dict with str keys instead """ items = [(str(k), v) for (k, v) in a_dict.items()] return dict(items) class ProviderStats(objec...
{ "repo_name": "sevas/csxj-crawler", "path": "csxj/db/providerstats.py", "copies": "1", "size": "2579", "license": "mit", "hash": -3049225006810453000, "line_mean": 29.7142857143, "line_max": 78, "alpha_frac": 0.5746413339, "autogenerated": false, "ratio": 3.81508875739645, "config_test": false,...
__author__ = 'sevas' from datetime import datetime, timedelta from StringIO import StringIO class Event(object): def __init__(self): self.summary = "" self.organizer = "" self.location = "" self.description = "" self.dtstart = None self.dtend = None self.dt...
{ "repo_name": "Psycojoker/geholparser", "path": "src/gehol/converters/rfc5545icalwriter.py", "copies": "2", "size": "3959", "license": "mit", "hash": 342836418449509600, "line_mean": 32.2773109244, "line_max": 104, "alpha_frac": 0.5791866633, "autogenerated": false, "ratio": 3.326890756302521, ...
__author__ = 'sevas' import os, os.path import argparse from csxj.db.providerstats import ProviderStats def print_report(stats): print 'Number of articles :', stats.n_articles print 'Number of links : ', stats.n_links print 'Number of errors ', stats.n_errors print 'Start date : ', stats....
{ "repo_name": "sevas/csxj-crawler", "path": "scripts/show_stats.py", "copies": "1", "size": "1590", "license": "mit", "hash": -1966225983940230700, "line_mean": 29, "line_max": 104, "alpha_frac": 0.6301886792, "autogenerated": false, "ratio": 3.3473684210526318, "config_test": false, "has_no_...
__author__ = 'seyriz' from json import loads, dumps from flask import * from naver_login import flask_naver app = Flask(__name__) app.config['CLIENT_ID'] = "t4zhYRQ2RoZwVXAXzL5V" app.config['CLIENT_SECRET'] = "iqANBHZRnq" app.config['CALLBACK'] = '/callback' app.config['SECRET_KEY'] = 'THIS_IS_NOT_SECRET_KEY' naver ...
{ "repo_name": "seyriz/flask-naver", "path": "test.py", "copies": "1", "size": "1592", "license": "bsd-3-clause", "hash": -1172644828605585700, "line_mean": 34.4, "line_max": 112, "alpha_frac": 0.608040201, "autogenerated": false, "ratio": 3.365750528541226, "config_test": false, "has_no_keywo...
__author__ = 'seyriz' """ Flask-Naver ----------- Oauth2 wraper for Naver login """ from setuptools import setup setup( name='Flask-naver', version='1.0', url='http://github.com/seyriz/flask-naver', license='BSD', author='HanWool Lee', author_email='kudnya@gmail.com', description='Oauth2 ...
{ "repo_name": "seyriz/flask-naver", "path": "setup.py", "copies": "1", "size": "1046", "license": "bsd-3-clause", "hash": 4211457237002715000, "line_mean": 25.175, "line_max": 70, "alpha_frac": 0.6051625239, "autogenerated": false, "ratio": 3.8036363636363637, "config_test": false, "has_no_ke...
import math import warnings import numpy as np from scipy import interpolate from scipy.stats import spearmanr from ._isotonic import _isotonic_regression, _make_unique from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import as_float_array, check_array, check_consistent_length from .util...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/scikit-learn-master/sklearn/isotonic.py", "copies": "1", "size": "14182", "license": "mit", "hash": -4142135416599950000, "line_mean": 31.6774193548, "line_max": 79, "alpha_frac": 0.5744605838, "autogenerated": false, "ratio": 3.883351...
import numpy as np from scipy import interpolate from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import as_float_array, check_arrays from ._isotonic import _isotonic_regression import warnings def isotonic_regression(y, sample_weight=None, y_min=None, y_max=None, ...
{ "repo_name": "JT5D/scikit-learn", "path": "sklearn/isotonic.py", "copies": "10", "size": "8166", "license": "bsd-3-clause", "hash": 7121951687345838000, "line_mean": 30.6511627907, "line_max": 79, "alpha_frac": 0.5489835905, "autogenerated": false, "ratio": 3.9430226943505553, "config_test": f...
import numpy as np from scipy import interpolate from scipy.stats import spearmanr from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import as_float_array, check_array, check_consistent_length from ._isotonic import _inplace_contiguous_isotonic_regression, _make_unique import warnings impor...
{ "repo_name": "vortex-ape/scikit-learn", "path": "sklearn/isotonic.py", "copies": "9", "size": "13391", "license": "bsd-3-clause", "hash": -4119819817062420000, "line_mean": 33.2480818414, "line_max": 79, "alpha_frac": 0.5805391681, "autogenerated": false, "ratio": 3.897264260768335, "config_te...
import numpy as np from scipy import interpolate from scipy.stats import spearmanr from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import as_float_array, check_arrays from ._isotonic import _isotonic_regression import warnings import math def check_increasing(x, y): """Determine whe...
{ "repo_name": "chaluemwut/fbserver", "path": "venv/lib/python2.7/site-packages/sklearn/isotonic.py", "copies": "2", "size": "12370", "license": "apache-2.0", "hash": -3987862562301471000, "line_mean": 30.881443299, "line_max": 79, "alpha_frac": 0.5619240097, "autogenerated": false, "ratio": 3.905...
import numpy as np from scipy import interpolate from scipy.stats import spearmanr from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import check_array, check_consistent_length from ._isotonic import _inplace_contiguous_isotonic_regression, _make_unique import warnings import math __all__...
{ "repo_name": "chrsrds/scikit-learn", "path": "sklearn/isotonic.py", "copies": "2", "size": "14210", "license": "bsd-3-clause", "hash": -8104718181716458000, "line_mean": 32.9140811456, "line_max": 79, "alpha_frac": 0.5781843772, "autogenerated": false, "ratio": 3.8772169167803545, "config_test...
import numpy as np from scipy import interpolate from scipy.stats import spearmanr import warnings import math from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import check_array, check_consistent_length from .utils.validation import _check_sample_weight, _deprecate_positional_args from ....
{ "repo_name": "huzq/scikit-learn", "path": "sklearn/isotonic.py", "copies": "2", "size": "14050", "license": "bsd-3-clause", "hash": -3408147856248194000, "line_mean": 33.1019417476, "line_max": 79, "alpha_frac": 0.5910320285, "autogenerated": false, "ratio": 3.8962839711591792, "config_test": ...
import numpy as np from scipy import interpolate from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import as_float_array, check_arrays from ._isotonic import _isotonic_regression def isotonic_regression(y, weight=None, y_min=None, y_max=None): """Solve the isotonic regression model:: ...
{ "repo_name": "florian-f/sklearn", "path": "sklearn/isotonic.py", "copies": "3", "size": "6601", "license": "bsd-3-clause", "hash": 2541344111893143000, "line_mean": 29.0045454545, "line_max": 79, "alpha_frac": 0.5559763672, "autogenerated": false, "ratio": 3.742063492063492, "config_test": fal...
import numpy as np from scipy import interpolate from ..base import BaseEstimator, TransformerMixin, RegressorMixin from ..utils import as_float_array, check_arrays def isotonic_regression(y, weight=None, y_min=None, y_max=None): """Solve the isotonic regression model: min sum w[i] (y[i] - y_[i]) ** 2 ...
{ "repo_name": "pradyu1993/scikit-learn", "path": "sklearn/linear_model/isotonic_regression_.py", "copies": "1", "size": "7808", "license": "bsd-3-clause", "hash": -7462030916173699000, "line_mean": 30.232, "line_max": 82, "alpha_frac": 0.549692623, "autogenerated": false, "ratio": 3.7592681752527...
import numpy as np from scipy import interpolate from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import as_float_array, check_arrays def isotonic_regression(y, weight=None, y_min=None, y_max=None): """Solve the isotonic regression model: min sum w[i] (y[i] - y_[i]) ** 2 ...
{ "repo_name": "seckcoder/lang-learn", "path": "python/sklearn/sklearn/isotonic.py", "copies": "1", "size": "7816", "license": "unlicense", "hash": -6959316593877802000, "line_mean": 30.1394422311, "line_max": 79, "alpha_frac": 0.5491299898, "autogenerated": false, "ratio": 3.7613089509143407, "...
import numpy as np from .base import LinearClassifierMixin, SparseCoefMixin from ..feature_selection.from_model import _LearntSelectorMixin from ..svm.base import BaseLibLinear class LogisticRegression(BaseLibLinear, LinearClassifierMixin, _LearntSelectorMixin, SparseCoefMixin): """Logi...
{ "repo_name": "treycausey/scikit-learn", "path": "sklearn/linear_model/logistic.py", "copies": "1", "size": "5401", "license": "bsd-3-clause", "hash": 7550543199677424000, "line_mean": 36.5069444444, "line_max": 78, "alpha_frac": 0.6574708387, "autogenerated": false, "ratio": 4.317346123101519, ...
from collections import OrderedDict from datetime import datetime, timezone from pathlib import Path import numpy as np from ...utils import fill_doc, logger, verbose, warn, _check_fname from ..base import BaseRaw from ..meas_info import create_info from ...annotations import Annotations from ..utils import _mult_ca...
{ "repo_name": "drammock/mne-python", "path": "mne/io/nihon/nihon.py", "copies": "1", "size": "14267", "license": "bsd-3-clause", "hash": 2604703604825078000, "line_mean": 35.3954081633, "line_max": 79, "alpha_frac": 0.548748861, "autogenerated": false, "ratio": 3.3704228679423576, "config_test"...
from collections import OrderedDict from datetime import datetime, timezone from pathlib import Path import numpy as np from ...utils import fill_doc, logger, verbose, warn from ..base import BaseRaw from ..meas_info import create_info from ...annotations import Annotations from ..utils import _mult_cal_one def _e...
{ "repo_name": "olafhauk/mne-python", "path": "mne/io/nihon/nihon.py", "copies": "5", "size": "13801", "license": "bsd-3-clause", "hash": -598941590953933000, "line_mean": 35.2230971129, "line_max": 79, "alpha_frac": 0.5544525759, "autogenerated": false, "ratio": 3.3255421686746987, "config_test...
import numpy as np from math import * def arc_distance_python_nested_for_loops(a, b): """ Calculates the pairwise arc distance between all points in vector a and b. """ a_nrows = a.shape[0] b_nrows = b.shape[0] distance_matrix = np.zeros([a_nrows, b_nrows]) for i in range(a_nrows): ...
{ "repo_name": "numfocus/python-benchmarks", "path": "arc_distance/arc_distance_python.py", "copies": "1", "size": "2068", "license": "mit", "hash": -4007261665644278300, "line_mean": 28.1267605634, "line_max": 78, "alpha_frac": 0.5299806576, "autogenerated": false, "ratio": 2.933333333333333, "...
""" Auxiliary transforms mainly to be used by Writer components. This module is called "writer_aux" because otherwise there would be conflicting imports like this one:: from docutils import writers from docutils.transforms import writers """ __docformat__ = 'reStructuredText' from docutils import nodes, ut...
{ "repo_name": "santisiri/popego", "path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/docutils-0.4-py2.5.egg/docutils/transforms/writer_aux.py", "copies": "6", "size": "1390", "license": "bsd-3-clause", "hash": -2016183546753311200, "line_mean": 25.7307692308, "line_max": 67, "alpha_frac": 0.61798...
""" Auxiliary transforms mainly to be used by Writer components. This module is called "writer_aux" because otherwise there would be conflicting imports like this one:: from docutils import writers from docutils.transforms import writers """ __docformat__ = 'reStructuredText' from docutils imp...
{ "repo_name": "mogotest/selenium", "path": "selenium/src/py/lib/docutils/transforms/writer_aux.py", "copies": "5", "size": "1442", "license": "apache-2.0", "hash": -4273884996950406700, "line_mean": 25.7307692308, "line_max": 67, "alpha_frac": 0.5957004161, "autogenerated": false, "ratio": 4.3963...
__author__ = 'sfranky' try: import ujson as json except ImportError: import json import logging import sys from qtop_py.serialiser import StatExtractor, GenericBatchSystem from xml.etree import ElementTree as etree import qtop_py.fileutils as fileutils class SGEStatExtractor(StatExtractor): def __init__(s...
{ "repo_name": "sfranky/qtop", "path": "qtop_py/plugins/sge.py", "copies": "3", "size": "14194", "license": "mit", "hash": 9064954991036475000, "line_mean": 42.4067278287, "line_max": 125, "alpha_frac": 0.5498802311, "autogenerated": false, "ratio": 3.84244721169464, "config_test": true, "has_...
import theano import theano.tensor as tensor def arc_distance_theano_alloc_prepare(dtype='float64'): """ Calculates the pairwise arc distance between all points in vector a and b. """ a = tensor.matrix(dtype=str(dtype)) b = tensor.matrix(dtype=str(dtype)) # Theano don't implement all case of t...
{ "repo_name": "numfocus/python-benchmarks", "path": "arc_distance/arc_distance_theano.py", "copies": "1", "size": "2175", "license": "mit", "hash": 2800028464632271000, "line_mean": 31.9545454545, "line_max": 82, "alpha_frac": 0.5448275862, "autogenerated": false, "ratio": 3.3931357254290173, "...
import time import json import gspread from oauth2client.client import SignedJwtAssertionCredentials from sneakers.modules import Channel, Parameter class GoogleSpread(Channel): description = """\ Posts data to Google Spreadsheets. """ params = { 'sending': [ Parameter('clien...
{ "repo_name": "DakotaNelson/sneaky-creeper", "path": "sneakers/channels/googleSpread.py", "copies": "1", "size": "2909", "license": "mit", "hash": 8002043135516924000, "line_mean": 40.5571428571, "line_max": 202, "alpha_frac": 0.6428325885, "autogenerated": false, "ratio": 4.017955801104972, "c...
from myapp.models import Mode, State from rest_framework import viewsets from django.shortcuts import render_to_response from django.template import RequestContext from myapp.serializers import ModeSerializer, StateSerializer import requests import json class ModeViewSet(viewsets.ModelViewSet): queryset = Mode.ob...
{ "repo_name": "gabimachado/cooktop-IoT", "path": "views.py", "copies": "1", "size": "2902", "license": "mit", "hash": -4034952807924310500, "line_mean": 32.7441860465, "line_max": 67, "alpha_frac": 0.5727084769, "autogenerated": false, "ratio": 3.803407601572739, "config_test": false, "has_no...
import time import datetime import sqlite3 import os import glob import RPi.GPIO as GPIO import httplib, urllib os.system('modprobe w1-gpio') os.system('modprobe w1-therm') base_dir = '/sys/bus/w1/devices/' device_folder = glob.glob(base_dir + '28*')[0] device_file = device_folder + '/w1_slave' # Initialize SQLite ...
{ "repo_name": "gabimachado/cooktop-IoT", "path": "controller.py", "copies": "1", "size": "3734", "license": "mit", "hash": -2338988457264141300, "line_mean": 22.9358974359, "line_max": 86, "alpha_frac": 0.6751472951, "autogenerated": false, "ratio": 2.7618343195266273, "config_test": false, "...
import math import numpy as np import pytest import scipy.stats from sklearn.utils._testing import assert_array_equal from sklearn.utils.fixes import _joblib_parallel_args from sklearn.utils.fixes import _object_dtype_isnan from sklearn.utils.fixes import loguniform from sklearn.utils.fixes import linspace, parse_v...
{ "repo_name": "kevin-intel/scikit-learn", "path": "sklearn/utils/tests/test_fixes.py", "copies": "2", "size": "4164", "license": "bsd-3-clause", "hash": -1705870794047414300, "line_mean": 33.7, "line_max": 79, "alpha_frac": 0.5958213256, "autogenerated": false, "ratio": 3.5109612141652615, "con...
import numpy as np from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_true from numpy.testing import (assert_almost_equal, assert_array_almost_equal) from sklearn.utils.fixes import astype from sklearn.utils.fixes import divide, expit def ...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/scikit-learn-master/sklearn/utils/tests/test_fixes.py", "copies": "1", "size": "1828", "license": "mit", "hash": -4015477119821063700, "line_mean": 33.4905660377, "line_max": 80, "alpha_frac": 0.6794310722, "autogenerated": false, "rat...
import numpy as np from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_true from numpy.testing import (assert_almost_equal, assert_array_almost_equal) from sklearn.utils.fixes import divide, expit from sklearn.utils.fixes import astype de...
{ "repo_name": "JeanKossaifi/scikit-learn", "path": "sklearn/utils/tests/test_fixes.py", "copies": "281", "size": "1829", "license": "bsd-3-clause", "hash": -6774058060806427000, "line_mean": 32.2545454545, "line_max": 79, "alpha_frac": 0.6790595954, "autogenerated": false, "ratio": 3.073949579831...
import numpy as np from numpy.testing import (assert_almost_equal, assert_array_almost_equal) from sklearn.utils.fixes import divide, expit from sklearn.utils.fixes import astype from sklearn.utils.testing import assert_equal, assert_false, assert_true def test_expit(): # Check numeri...
{ "repo_name": "giorgiop/scikit-learn", "path": "sklearn/utils/tests/test_fixes.py", "copies": "2", "size": "1795", "license": "bsd-3-clause", "hash": -2754112918705978400, "line_mean": 33.5192307692, "line_max": 79, "alpha_frac": 0.6763231198, "autogenerated": false, "ratio": 3.0631399317406145, ...
import pickle import numpy as np import math from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_equal from sklearn.utils.fixes import divide from sklearn.utils.fixes import astype f...
{ "repo_name": "wlamond/scikit-learn", "path": "sklearn/utils/tests/test_fixes.py", "copies": "3", "size": "2492", "license": "bsd-3-clause", "hash": 67900575195911630, "line_mean": 31.3636363636, "line_max": 73, "alpha_frac": 0.6512841091, "autogenerated": false, "ratio": 2.9808612440191387, "c...
import pickle import numpy as np from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import asse...
{ "repo_name": "glennq/scikit-learn", "path": "sklearn/utils/tests/test_fixes.py", "copies": "8", "size": "2324", "license": "bsd-3-clause", "hash": -51542771912559544, "line_mean": 33.1764705882, "line_max": 79, "alpha_frac": 0.6966437177, "autogenerated": false, "ratio": 3.1278600269179004, "c...
import pickle import numpy as np import pytest from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_allclose from sklearn.utils.fixes import divide from sklearn.utils.fixes import MaskedArray from sklearn.utils.fixes import nanm...
{ "repo_name": "vortex-ape/scikit-learn", "path": "sklearn/utils/tests/test_fixes.py", "copies": "7", "size": "1778", "license": "bsd-3-clause", "hash": -3886781721488860000, "line_mean": 29.1355932203, "line_max": 73, "alpha_frac": 0.6484814398, "autogenerated": false, "ratio": 3.0761245674740483...