text
stringlengths
0
1.05M
meta
dict
__author__ = 'srio' import json class GFile(object): def __init__(self,filename=None): if filename is None: self.gfile_as_dictionary = None else: self.load_gfile(filename) def load_gfile(self,filename,use_brackets_instead_parenthesis=True): fp = open(filena...
{ "repo_name": "srio/minishadow", "path": "minishadow/io/gfile.py", "copies": "1", "size": "2044", "license": "mit", "hash": 363612845685609700, "line_mean": 23.6265060241, "line_max": 77, "alpha_frac": 0.5151663405, "autogenerated": false, "ratio": 3.6565295169946332, "config_test": false, "h...
from PIL import Image print "Enter values between 0 and 255" lightcolor_red=input("Enter red value of light color: ") lightcolor_blue=input("Enter blue value of light color: ") lightcolor_green=input("Enter green value of light color: ") darkcolor_red=input("Enter red value of dark color: ") darkcolor_blue=input...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "BitonalAlgo.py", "copies": "1", "size": "1726", "license": "mit", "hash": -6684750578274544000, "line_mean": 35.7234042553, "line_max": 68, "alpha_frac": 0.6123986095, "autogenerated": false, "ratio": 3.143897996357013, "config_...
from PIL import Image i = Image.open("input.png") pixels = i.load() width, height = i.size j=Image.new(i.mode,i.size) blueLevelFloat=input("Enter the color level for blue which is ranging from 0 to 255: ") greenLevelFloat=input("Enter the color level for green which is ranging from 0 to 255: ") redLevelFloat=input("...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "ColourBalanceAlgo.py", "copies": "1", "size": "1713", "license": "mit", "hash": 4119975504008831500, "line_mean": 37.9318181818, "line_max": 89, "alpha_frac": 0.6152948044, "autogenerated": false, "ratio": 3.1316270566727606, "c...
from PIL import Image import random i = Image.open("input.png") blueShade = input("enter the ahdingfactor for blue range:0 to 1") redShade = input("enter the ahdingfactor for red range:0 to 1") greenShade = input("enter the ahdingfactor for green range:0 to 1") #pixel data is stored in pixels in form of two dimensi...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "ColourShadingAlgo.py", "copies": "1", "size": "1026", "license": "mit", "hash": -5626208601291593000, "line_mean": 33.2, "line_max": 68, "alpha_frac": 0.6452241715, "autogenerated": false, "ratio": 3.0176470588235293, "config_te...
from PIL import Image i = Image.open("input.png") print(i.format,i.size,i.mode) pixels = i.load() width, height = i.size j=Image.new(i.mode,i.size) blueTint=input("Enter the percentage of blue tint in fraction: ") greenTint=input("Enter the percentage of green tint in fraction: ") redTint=input("Enter the percentag...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "ColorTintAlgo.py", "copies": "1", "size": "1474", "license": "mit", "hash": -2822760286382927000, "line_mean": 36.7948717949, "line_max": 79, "alpha_frac": 0.6105834464, "autogenerated": false, "ratio": 2.9072978303747536, "conf...
from PIL import Image i = Image.open("input.png") #pixel data is stored in pixels in form of two dimensional array pixels = i.load() width, height = i.size j=Image.new(i.mode,i.size) contrast=input("enter contrast value range:-255 to 255") def Truncate(value): if(value < 0): value = 0 if(value > 255): ...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "ContrastAlgo.py", "copies": "1", "size": "1431", "license": "mit", "hash": 6549451475204713000, "line_mean": 35.6923076923, "line_max": 68, "alpha_frac": 0.6498951782, "autogenerated": false, "ratio": 2.9444444444444446, "config...
from PIL import Image import random i = Image.open("input.png") #pixel data is stored in pixels in form of two dimensional array pixels = i.load() width, height = i.size j=Image.new(i.mode,i.size) #selects the random no of shades between 2 to 256 including 2 and 256 NumberOfShades = int(random.random()*255)+2 Conv...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "CustomAlgo-BW.py", "copies": "1", "size": "1037", "license": "mit", "hash": 4031717604929134600, "line_mean": 36.0357142857, "line_max": 78, "alpha_frac": 0.6991321119, "autogenerated": false, "ratio": 3.0955223880597016, "confi...
from PIL import Image i = Image.open("input.png") #pixel data is stored in pixels in form of two dimensional array pixels = i.load() width, height = i.size j=Image.new(i.mode,i.size) threshold=128 for x in range(width): for y in range(height): cpixel = pixels[x, y] #cpixel[0] contains red value cpi...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "SolarisationAlgo.py", "copies": "1", "size": "1399", "license": "mit", "hash": 1258902001727141600, "line_mean": 26.431372549, "line_max": 71, "alpha_frac": 0.6633309507, "autogenerated": false, "ratio": 2.9145833333333333, "con...
__author__ = 'srkiyengar' import dynamixel import logging import time from datetime import datetime MOVE_TICKS = 130 MOVE_TICKS_SERVO4 = 70 POS_ERROR = 20 ndi_measurement = False # meaning we are not running polaris when False log_data_to_file = False # To collect servo data without ndi measureme...
{ "repo_name": "srkiyengar/NewGripper", "path": "src/reflex.py", "copies": "1", "size": "39009", "license": "mit", "hash": 3850495706678450000, "line_mean": 44.201622248, "line_max": 123, "alpha_frac": 0.5507703351, "autogenerated": false, "ratio": 3.5801211453744495, "config_test": false, "ha...
__author__ = 'srkiyengar' import dynamixel import logging POS_ERROR = 20 CALIBRATION_TICKS = 50 MAX_FINGER_MOVEMENT = 2000 MAX_PRESHAPE_MOVEMENT = 1200 MAX_SPEED = 350 # A max speed of 1023 is allowed # This logger is setup in the main python script my_logger = logging.getLogger("My_Logger") LOG_LEVEL = log...
{ "repo_name": "srkiyengar/Gripper", "path": "src/reflex.py", "copies": "1", "size": "17310", "license": "mit", "hash": -5768638374216309000, "line_mean": 38.7954022989, "line_max": 122, "alpha_frac": 0.550779896, "autogenerated": false, "ratio": 3.5276136132056246, "config_test": false, "has_...
__author__ = 'srkiyengar' import pygame import logging import logging.handlers from datetime import datetime import reflex import screen_print as sp import joystick as js import threading import time import data_collect as dc import random import tcp_client as tc import shutter import serial SOME_MIN_RANDOM_NUMBER =...
{ "repo_name": "srkiyengar/NewGripper", "path": "src/newgripper.py", "copies": "1", "size": "34768", "license": "mit", "hash": -8260173241608401000, "line_mean": 45.1726427623, "line_max": 138, "alpha_frac": 0.5532386102, "autogenerated": false, "ratio": 4.041850732387817, "config_test": false, ...
__author__ = 'srkiyengar' import random from datetime import datetime import logging # This logger is setup in the main python script my_logger = logging.getLogger("My_Logger") LOG_LEVEL = logging.DEBUG class displacement_file(): def __init__(self, rand): file_prefix = str(datetime.now())[:16] ...
{ "repo_name": "srkiyengar/NewGripper", "path": "src/data_collect.py", "copies": "1", "size": "1652", "license": "mit", "hash": -1353553387582203000, "line_mean": 29.0545454545, "line_max": 82, "alpha_frac": 0.6016949153, "autogenerated": false, "ratio": 3.606986899563319, "config_test": false, ...
__author__ = 'srkiyengar' import socket import logging import struct from datetime import datetime import time LOG_LEVEL = logging.DEBUG # Set up a logger with output level set to debug; Add the handler to the logger my_logger = logging.getLogger("My_Logger") class make_connection: def __init__(self, sock=No...
{ "repo_name": "srkiyengar/NewGripper", "path": "src/tcp_client.py", "copies": "1", "size": "8254", "license": "mit", "hash": 8019758161902969000, "line_mean": 35.6844444444, "line_max": 128, "alpha_frac": 0.5817785316, "autogenerated": false, "ratio": 3.6538291279327137, "config_test": false, ...
__author__ = 'srkiyengar' # Significant joystick code or the basis of it comes from pygame.joystick sample code import pygame import serial import sys JOY_DEADZONE_A0 = 0.2 JOY_DEADZONE_A1 = 0.1 # Before invoking this class pygame.init() needs to be called class ExtremeProJoystick(): def __init__( self): ...
{ "repo_name": "srkiyengar/NewGripper", "path": "src/joystick.py", "copies": "1", "size": "6451", "license": "mit", "hash": -1396018073613089300, "line_mean": 33.8702702703, "line_max": 110, "alpha_frac": 0.5323205705, "autogenerated": false, "ratio": 4.026841448189763, "config_test": false, "...
__author__ = 'srkiyengar' # Significant joystick code or the basis of it comes from pygame.joystick sample code import pygame JOY_DEADZONE_A0 = 0.2 JOY_DEADZONE_A1 = 0.1 MOVE_TICKS = 15 MOVE_TICKS_SERVO4 = 10 # Before invoking this class pygame.init() needs to be called class ExtremeProJoystick(): def __init_...
{ "repo_name": "srkiyengar/Gripper", "path": "src/joystick.py", "copies": "1", "size": "3801", "license": "mit", "hash": -4503911433272449000, "line_mean": 34.858490566, "line_max": 123, "alpha_frac": 0.531439095, "autogenerated": false, "ratio": 3.801, "config_test": false, "has_no_keywords":...
__author__ = 's' import os import sys #sys.path.append("c:/tdm-gcc-64/bin/") print os.environ['path'] import theano import theano.tensor as T print theano.config.device import numpy import scipy from scipy import ndimage import numpy as np from scipy import misc from PIL import Image import nu...
{ "repo_name": "serge-m/py_optical_flow", "path": "multiscale_of_test.py", "copies": "1", "size": "1525", "license": "mit", "hash": -7034552758676476000, "line_mean": 18.6351351351, "line_max": 86, "alpha_frac": 0.6439344262, "autogenerated": false, "ratio": 2.5501672240802677, "config_test": fa...
print(__doc__) import numpy as np import pylab as pl from sklearn.cluster import KMeans from sklearn.metrics import euclidean_distances from sklearn.datasets import load_sample_image from sklearn.utils import shuffle from time import time n_colors = 64 # Load the Summer Palace photo china = load_sample_image("china....
{ "repo_name": "efredine/colorviz", "path": "color_quantization.py", "copies": "1", "size": "2484", "license": "mit", "hash": 3739619017946599000, "line_mean": 28.5833333333, "line_max": 78, "alpha_frac": 0.6880032206, "autogenerated": false, "ratio": 2.918918918918919, "config_test": false, "...
import inspect from textwrap import dedent import pytest import numpy as np import os.path as op from mne import create_info, EvokedArray, events_from_annotations, Epochs from mne.channels import make_standard_montage from mne.datasets.testing import data_path, _pytest_param from mne.preprocessing.nirs import optica...
{ "repo_name": "kambysese/mne-python", "path": "mne/viz/conftest.py", "copies": "1", "size": "3861", "license": "bsd-3-clause", "hash": 7309442421906218000, "line_mean": 28.9302325581, "line_max": 79, "alpha_frac": 0.6275576276, "autogenerated": false, "ratio": 3.193548387096774, "config_test": ...
import numpy as np from ... import pick_types from ...io import BaseRaw from ...utils import _validate_type, verbose from ..nirs import _channel_frequencies, _check_channels_ordered from ...filter import filter_data @verbose def scalp_coupling_index(raw, l_freq=0.7, h_freq=1.5, l_trans_band...
{ "repo_name": "kambysese/mne-python", "path": "mne/preprocessing/nirs/_scalp_coupling_index.py", "copies": "10", "size": "1974", "license": "bsd-3-clause", "hash": 5214736075912720000, "line_mean": 28.9090909091, "line_max": 78, "alpha_frac": 0.5937183384, "autogenerated": false, "ratio": 3.53763...
import numpy as np from ...io import BaseRaw from ...io.constants import FIFF from ...utils import _validate_type, warn from ...io.pick import _picks_to_idx from ..nirs import _channel_frequencies, _check_channels_ordered def optical_density(raw): r"""Convert NIRS raw data to optical density. Parameters ...
{ "repo_name": "drammock/mne-python", "path": "mne/preprocessing/nirs/_optical_density.py", "copies": "3", "size": "1628", "license": "bsd-3-clause", "hash": -4753665651989821000, "line_mean": 30.9215686275, "line_max": 78, "alpha_frac": 0.6418918919, "autogenerated": false, "ratio": 3.30894308943...
import numpy as np from ...io import BaseRaw from ...io.constants import FIFF from ...utils import _validate_type, warn from ...io.pick import _picks_to_idx def optical_density(raw): r"""Convert NIRS raw data to optical density. Parameters ---------- raw : instance of Raw The raw data. ...
{ "repo_name": "Eric89GXL/mne-python", "path": "mne/preprocessing/nirs/_optical_density.py", "copies": "7", "size": "1458", "license": "bsd-3-clause", "hash": -338573887267269950, "line_mean": 30.0212765957, "line_max": 78, "alpha_frac": 0.6323731139, "autogenerated": false, "ratio": 3.29119638826...
import numpy as np from ...io import BaseRaw from ...io.constants import FIFF from ...utils import _validate_type, warn, verbose from ...io.pick import _picks_to_idx from ..nirs import _channel_frequencies, _check_channels_ordered @verbose def optical_density(raw, *, verbose=None): r"""Convert NIRS raw data to ...
{ "repo_name": "mne-tools/mne-python", "path": "mne/preprocessing/nirs/_optical_density.py", "copies": "1", "size": "1920", "license": "bsd-3-clause", "hash": -8653965412658346000, "line_mean": 31.5423728814, "line_max": 78, "alpha_frac": 0.6213541667, "autogenerated": false, "ratio": 3.3046471600...
import numpy as np from ...io import BaseRaw from ...utils import _validate_type, verbose from ..nirs import _channel_frequencies, _check_channels_ordered @verbose def scalp_coupling_index(raw, l_freq=0.7, h_freq=1.5, l_trans_bandwidth=0.3, h_trans_bandwidth=0.3, ve...
{ "repo_name": "mne-tools/mne-python", "path": "mne/preprocessing/nirs/_scalp_coupling_index.py", "copies": "1", "size": "1978", "license": "bsd-3-clause", "hash": 7174694667385581000, "line_mean": 28.5223880597, "line_max": 78, "alpha_frac": 0.6092012133, "autogenerated": false, "ratio": 3.318791...
import os.path as op import numpy as np from scipy import linalg from ...io import BaseRaw from ...io.constants import FIFF from ...utils import _validate_type from ..nirs import source_detector_distances, _channel_frequencies,\ _check_channels_ordered def beer_lambert_law(raw, ppf=0.1): r"""Convert NIRS o...
{ "repo_name": "olafhauk/mne-python", "path": "mne/preprocessing/nirs/_beer_lambert_law.py", "copies": "6", "size": "2729", "license": "bsd-3-clause", "hash": -5256050540476996000, "line_mean": 30.7325581395, "line_max": 78, "alpha_frac": 0.597288384, "autogenerated": false, "ratio": 3.21436984687...
import os.path as op import numpy as np from ...io import BaseRaw from ...io.constants import FIFF from ...utils import _validate_type from ..nirs import source_detector_distances, _channel_frequencies,\ _check_channels_ordered, _channel_chromophore def beer_lambert_law(raw, ppf=0.1): r"""Convert NIRS opti...
{ "repo_name": "bloyl/mne-python", "path": "mne/preprocessing/nirs/_beer_lambert_law.py", "copies": "4", "size": "2992", "license": "bsd-3-clause", "hash": 5083385780987537000, "line_mean": 31.8791208791, "line_max": 73, "alpha_frac": 0.609959893, "autogenerated": false, "ratio": 3.238095238095238...
import os.path as op import pytest import numpy as np from numpy.testing import assert_array_equal from mne import create_info from mne.datasets.testing import data_path from mne.io import read_raw_nirx, RawArray from mne.preprocessing.nirs import (optical_density, beer_lambert_law, ...
{ "repo_name": "drammock/mne-python", "path": "mne/preprocessing/nirs/tests/test_nirs.py", "copies": "4", "size": "16444", "license": "bsd-3-clause", "hash": -3514034801553144300, "line_mean": 42.7340425532, "line_max": 79, "alpha_frac": 0.6322062758, "autogenerated": false, "ratio": 2.86730601569...
import os.path as op import pytest import numpy as np from mne.datasets.testing import data_path from mne.io import read_raw_nirx, BaseRaw, read_raw_fif from mne.preprocessing.nirs import optical_density, beer_lambert_law from mne.utils import _validate_type from mne.datasets import testing from mne.externals.pymatr...
{ "repo_name": "wmvanvliet/mne-python", "path": "mne/preprocessing/nirs/tests/test_beer_lambert_law.py", "copies": "5", "size": "3707", "license": "bsd-3-clause", "hash": 7548549715952750000, "line_mean": 36.8265306122, "line_max": 76, "alpha_frac": 0.6196385217, "autogenerated": false, "ratio": 3...
import pytest import numpy as np import os.path as op from mne import create_info, EvokedArray, events_from_annotations, Epochs from mne.channels import make_standard_montage from mne.datasets.testing import data_path from mne.preprocessing.nirs import optical_density, beer_lambert_law from mne.io import read_raw_nir...
{ "repo_name": "cjayb/mne-python", "path": "mne/viz/tests/conftest.py", "copies": "1", "size": "1608", "license": "bsd-3-clause", "hash": -5059283885941625000, "line_mean": 34.7333333333, "line_max": 73, "alpha_frac": 0.6592039801, "autogenerated": false, "ratio": 2.782006920415225, "config_test...
import re import numpy as np from scipy import linalg from ...io.pick import _picks_to_idx from ...utils import fill_doc @fill_doc def source_detector_distances(info, picks=None): r"""Determine the distance between NIRS source and detectors. Parameters ---------- info : Info The measurement...
{ "repo_name": "olafhauk/mne-python", "path": "mne/preprocessing/nirs/nirs.py", "copies": "6", "size": "4857", "license": "bsd-3-clause", "hash": 6581877465298753000, "line_mean": 35.5187969925, "line_max": 79, "alpha_frac": 0.5834877496, "autogenerated": false, "ratio": 3.529796511627907, "conf...
import re import numpy as np from ...io.pick import _picks_to_idx from ...utils import fill_doc @fill_doc def source_detector_distances(info, picks=None): r"""Determine the distance between NIRS source and detectors. Parameters ---------- info : Info The measurement info. %(picks_all)s ...
{ "repo_name": "wmvanvliet/mne-python", "path": "mne/preprocessing/nirs/nirs.py", "copies": "1", "size": "4835", "license": "bsd-3-clause", "hash": 502128657741240770, "line_mean": 35.6287878788, "line_max": 79, "alpha_frac": 0.58221303, "autogenerated": false, "ratio": 3.521485797523671, "confi...
import re import numpy as np from ...io.pick import _picks_to_idx from ...utils import fill_doc # Standardized fNIRS channel name regexs _S_D_F_RE = re.compile(r'S(\d+)_D(\d+) (\d+\.?\d*)') _S_D_H_RE = re.compile(r'S(\d+)_D(\d+) (\w+)') @fill_doc def source_detector_distances(info, picks=None): r"""Determine ...
{ "repo_name": "drammock/mne-python", "path": "mne/preprocessing/nirs/nirs.py", "copies": "4", "size": "7555", "license": "bsd-3-clause", "hash": -6465750751141650000, "line_mean": 36.0343137255, "line_max": 79, "alpha_frac": 0.5868960953, "autogenerated": false, "ratio": 3.512319851231985, "con...
import numpy as np from ... import pick_types from ...io import BaseRaw from ...utils import _validate_type from ...io.pick import _picks_to_idx def temporal_derivative_distribution_repair(raw): """Apply temporal derivative distribution repair to data. Applies temporal derivative distribution repair (TDDR...
{ "repo_name": "cjayb/mne-python", "path": "mne/preprocessing/nirs/_tddr.py", "copies": "6", "size": "4673", "license": "bsd-3-clause", "hash": 8783741887785309000, "line_mean": 29.5424836601, "line_max": 79, "alpha_frac": 0.6392039375, "autogenerated": false, "ratio": 3.6281055900621118, "confi...
import numpy as np from ... import pick_types from ...io import BaseRaw from ...utils import _validate_type, verbose from ...io.pick import _picks_to_idx from ..nirs import _channel_frequencies, _check_channels_ordered @verbose def temporal_derivative_distribution_repair(raw, *, verbose=None): """Apply tempora...
{ "repo_name": "bloyl/mne-python", "path": "mne/preprocessing/nirs/_tddr.py", "copies": "3", "size": "4877", "license": "bsd-3-clause", "hash": 5040583277545473000, "line_mean": 30.0636942675, "line_max": 79, "alpha_frac": 0.6428132048, "autogenerated": false, "ratio": 3.6206384558277653, "confi...
import numpy as np from ... import pick_types from ...io import BaseRaw from ...utils import _validate_type, verbose from ...io.pick import _picks_to_idx @verbose def temporal_derivative_distribution_repair(raw, *, verbose=None): """Apply temporal derivative distribution repair to data. Applies temporal d...
{ "repo_name": "wmvanvliet/mne-python", "path": "mne/preprocessing/nirs/_tddr.py", "copies": "1", "size": "4708", "license": "bsd-3-clause", "hash": -7995200886157679000, "line_mean": 29.5714285714, "line_max": 79, "alpha_frac": 0.6397621071, "autogenerated": false, "ratio": 3.6271186440677967, ...
from configparser import ConfigParser, RawConfigParser import glob as glob import re as re import os.path as op import datetime as dt import numpy as np from ..base import BaseRaw from ..utils import _mult_cal_one from ..constants import FIFF from ..meas_info import create_info, _format_dig_points from ...annotation...
{ "repo_name": "kambysese/mne-python", "path": "mne/io/nirx/nirx.py", "copies": "3", "size": "14845", "license": "bsd-3-clause", "hash": -1039843328201241700, "line_mean": 40.5826330532, "line_max": 79, "alpha_frac": 0.536544291, "autogenerated": false, "ratio": 3.8250450914712704, "config_test"...
import os.path as op import pytest import numpy as np from numpy.testing import assert_allclose from mne.datasets.testing import data_path from mne.io import read_raw_nirx from mne.preprocessing.nirs import optical_density, tddr from mne.datasets import testing fname_nirx_15_2 = op.join(data_path(download=False), ...
{ "repo_name": "mne-tools/mne-python", "path": "mne/preprocessing/nirs/tests/test_temporal_derivative_distribution_repair.py", "copies": "1", "size": "1288", "license": "bsd-3-clause", "hash": 7550209424660786000, "line_mean": 31.2, "line_max": 68, "alpha_frac": 0.676242236, "autogenerated": false, ...
import os.path as op import pytest import numpy as np from mne.datasets.testing import data_path from mne.io import read_raw_nirx from mne.preprocessing.nirs import optical_density, tddr from mne.datasets import testing fname_nirx_15_2 = op.join(data_path(download=False), 'NIRx', 'nirscou...
{ "repo_name": "drammock/mne-python", "path": "mne/preprocessing/nirs/tests/test_temporal_derivative_distribution_repair.py", "copies": "12", "size": "1068", "license": "bsd-3-clause", "hash": 8425197416321507000, "line_mean": 30.4117647059, "line_max": 68, "alpha_frac": 0.6853932584, "autogenerated...
import re import numpy as np import datetime from ..base import BaseRaw from ..meas_info import create_info, _format_dig_points from ..utils import _mult_cal_one from ...annotations import Annotations from ...utils import logger, verbose, fill_doc, warn, _check_fname from ...utils.check import _require_version from ....
{ "repo_name": "mne-tools/mne-python", "path": "mne/io/snirf/_snirf.py", "copies": "1", "size": "17350", "license": "bsd-3-clause", "hash": 8632862589319479000, "line_mean": 43.6015424165, "line_max": 79, "alpha_frac": 0.4967723343, "autogenerated": false, "ratio": 4.069903823598405, "config_tes...
import re import numpy as np import datetime from ..base import BaseRaw from ..meas_info import create_info from ..utils import _mult_cal_one from ...annotations import Annotations from ...utils import logger, verbose, fill_doc, warn, _check_fname from ...utils.check import _require_version from ..constants import FI...
{ "repo_name": "bloyl/mne-python", "path": "mne/io/snirf/_snirf.py", "copies": "1", "size": "16414", "license": "bsd-3-clause", "hash": -6368891050409640000, "line_mean": 43.6032608696, "line_max": 79, "alpha_frac": 0.500304618, "autogenerated": false, "ratio": 4.072952853598015, "config_test": ...
import re import numpy as np from ..base import BaseRaw from ..meas_info import create_info from ...annotations import Annotations from ...utils import logger, verbose, fill_doc, warn from ...utils.check import _require_version from ..constants import FIFF from .._digitization import _make_dig_points from ...transfor...
{ "repo_name": "cjayb/mne-python", "path": "mne/io/snirf/_snirf.py", "copies": "1", "size": "10277", "license": "bsd-3-clause", "hash": -3334867924638294000, "line_mean": 39.9442231076, "line_max": 79, "alpha_frac": 0.4911939282, "autogenerated": false, "ratio": 3.9285168195718656, "config_test"...
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import SocketServer from signal import signal, SIGPIPE, SIG_DFL from urlparse import parse_qs import json import requests import time import datetime import threading, Queue import psutil import cPickle as pickle import zlib from os import listdir from os....
{ "repo_name": "pedrocruz/sensing_bus", "path": "fog/stress_tests/fog_stress_test.py", "copies": "1", "size": "6363", "license": "apache-2.0", "hash": -2590577598824076000, "line_mean": 31.6307692308, "line_max": 97, "alpha_frac": 0.6056891403, "autogenerated": false, "ratio": 3.701570680628272, ...
from .stochastic_gradient import BaseSGDClassifier from .stochastic_gradient import BaseSGDRegressor from .stochastic_gradient import DEFAULT_EPSILON class PassiveAggressiveClassifier(BaseSGDClassifier): """Passive Aggressive Classifier Parameters ---------- C : float Maximum step size (reg...
{ "repo_name": "smartscheduling/scikit-learn-categorical-tree", "path": "sklearn/linear_model/passive_aggressive.py", "copies": "18", "size": "9581", "license": "bsd-3-clause", "hash": -4570296171679554000, "line_mean": 34.2242647059, "line_max": 79, "alpha_frac": 0.5575618411, "autogenerated": fals...
from ._stochastic_gradient import BaseSGDClassifier from ._stochastic_gradient import BaseSGDRegressor from ._stochastic_gradient import DEFAULT_EPSILON class PassiveAggressiveClassifier(BaseSGDClassifier): """Passive Aggressive Classifier Read more in the :ref:`User Guide <passive_aggressive>`. Parame...
{ "repo_name": "kevin-intel/scikit-learn", "path": "sklearn/linear_model/_passive_aggressive.py", "copies": "2", "size": "17461", "license": "bsd-3-clause", "hash": 639101184835786500, "line_mean": 35.605870021, "line_max": 79, "alpha_frac": 0.6054636046, "autogenerated": false, "ratio": 4.1742768...
from .stochastic_gradient import BaseSGDClassifier from .stochastic_gradient import BaseSGDRegressor from .stochastic_gradient import DEFAULT_EPSILON class PassiveAggressiveClassifier(BaseSGDClassifier): """Passive Aggressive Classifier Read more in the :ref:`User Guide <passive_aggressive>`. Parameter...
{ "repo_name": "chrsrds/scikit-learn", "path": "sklearn/linear_model/passive_aggressive.py", "copies": "2", "size": "17064", "license": "bsd-3-clause", "hash": -5364305289353295000, "line_mean": 36.4210526316, "line_max": 79, "alpha_frac": 0.6095874355, "autogenerated": false, "ratio": 4.213333333...
from ..utils.validation import _deprecate_positional_args from ._stochastic_gradient import BaseSGDClassifier from ._stochastic_gradient import BaseSGDRegressor from ._stochastic_gradient import DEFAULT_EPSILON class PassiveAggressiveClassifier(BaseSGDClassifier): """Passive Aggressive Classifier Read more ...
{ "repo_name": "xuewei4d/scikit-learn", "path": "sklearn/linear_model/_passive_aggressive.py", "copies": "6", "size": "17375", "license": "bsd-3-clause", "hash": -6498191519883187000, "line_mean": 35.9680851064, "line_max": 79, "alpha_frac": 0.6074244604, "autogenerated": false, "ratio": 4.1796968...
from .stochastic_gradient import BaseSGDClassifier from .stochastic_gradient import BaseSGDRegressor from .stochastic_gradient import DEFAULT_EPSILON class PassiveAggressiveClassifier(BaseSGDClassifier): """Passive Aggressive Classifier Parameters ---------- C : float Maximum step size (reg...
{ "repo_name": "kmike/scikit-learn", "path": "sklearn/linear_model/passive_aggressive.py", "copies": "7", "size": "9780", "license": "bsd-3-clause", "hash": 7295000883031270000, "line_mean": 34.1798561151, "line_max": 79, "alpha_frac": 0.5599182004, "autogenerated": false, "ratio": 4.3777976723366...
import time import nmx from random import random from simpleOSC import initOSCClient, initOSCServer, setOSCHandler, sendOSCMsg, closeOSC, \ createOSCBundle, sendOSCBundle, startOSCServer ip = "127.0.0.1" client_port = 8001 # takes args : ip, port initOSCClient(ip=ip, port=client_port) # takes args : ip, po...
{ "repo_name": "trachelr/neural-mix", "path": "examples/play_osc_commands.py", "copies": "1", "size": "1340", "license": "artistic-2.0", "hash": -7352251961771325000, "line_mean": 31.6829268293, "line_max": 98, "alpha_frac": 0.6701492537, "autogenerated": false, "ratio": 3.4536082474226806, "con...
import time import numpy as np from random import random from simpleOSC import initOSCClient, initOSCServer, setOSCHandler, sendOSCMsg, closeOSC, \ createOSCBundle, sendOSCBundle, startOSCServer import mne from mne.realtime import FieldTripClient from mne.filter import band_pass_filter from mne.time_frequenc...
{ "repo_name": "trachelr/neural-mix", "path": "examples/mne_osc_bandpower.py", "copies": "1", "size": "1864", "license": "artistic-2.0", "hash": 2188131961857349000, "line_mean": 27.6769230769, "line_max": 90, "alpha_frac": 0.6464592275, "autogenerated": false, "ratio": 2.954041204437401, "confi...
import numpy as np from scipy import linalg from distutils.version import LooseVersion from .mixin import TransformerMixin class CSP(TransformerMixin): """M/EEG signal decomposition using the Common Spatial Patterns (CSP) This object can be used as a supervised decomposition to estimate spatial filters...
{ "repo_name": "effigies/mne-python", "path": "mne/decoding/csp.py", "copies": "1", "size": "8389", "license": "bsd-3-clause", "hash": 4736148207532665000, "line_mean": 38.2009345794, "line_max": 78, "alpha_frac": 0.5331982358, "autogenerated": false, "ratio": 4.273560876209883, "config_test": f...
import copy as cp import warnings import numpy as np from scipy import linalg from .mixin import TransformerMixin from ..cov import _regularized_covariance class CSP(TransformerMixin): """M/EEG signal decomposition using the Common Spatial Patterns (CSP). This object can be used as a supervised decomposit...
{ "repo_name": "lorenzo-desantis/mne-python", "path": "mne/decoding/csp.py", "copies": "6", "size": "21527", "license": "bsd-3-clause", "hash": 4444683564573748700, "line_mean": 45.096359743, "line_max": 79, "alpha_frac": 0.575695638, "autogenerated": false, "ratio": 4.3418717224687375, "config_...
import copy as cp import numpy as np from scipy import linalg from .mixin import TransformerMixin from ..cov import _regularized_covariance class CSP(TransformerMixin): """M/EEG signal decomposition using the Common Spatial Patterns (CSP). This object can be used as a supervised decomposition to estimate ...
{ "repo_name": "antiface/mne-python", "path": "mne/decoding/csp.py", "copies": "2", "size": "20954", "license": "bsd-3-clause", "hash": -3681649902619304400, "line_mean": 44.651416122, "line_max": 79, "alpha_frac": 0.5747828577, "autogenerated": false, "ratio": 4.335609352369129, "config_test": ...
__author__ = 'srwareham' __all__ = ['extract_file_from_tar', 'extract_file_from_tar'] """ Utility for managing archives """ from zipfile import ZipFile import tarfile def extract_file_from_zip(f, desired_file=None): """ Extracts desired file from zip file. If no desired file is specified, the first fi...
{ "repo_name": "srwareham/CampaignAdvisor", "path": "campaignadvisor/utilities/archiver.py", "copies": "1", "size": "1696", "license": "mit", "hash": 4290766000299703000, "line_mean": 27.7457627119, "line_max": 93, "alpha_frac": 0.6780660377, "autogenerated": false, "ratio": 3.73568281938326, "c...
__author__ = 'srwareham' """ Utility for downloading files. """ import urllib2 import contextlib import time import socket import StringIO def download_file(url, max_retries=3, pause=3, timeout=socket.getdefaulttimeout()): """ Attempt to download a file given a url. Note: this includes support for cont...
{ "repo_name": "srwareham/CampaignAdvisor", "path": "campaignadvisor/utilities/downloader.py", "copies": "1", "size": "2757", "license": "mit", "hash": -2059276914870380000, "line_mean": 33.049382716, "line_max": 101, "alpha_frac": 0.6401886108, "autogenerated": false, "ratio": 4.127245508982036, ...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from landlab import load_params from landlab.plot import imshow_grid from landlab.components import (PrecipitationDistribution, Radiation, PotentialEvapotranspiration, SoilMoisture, ...
{ "repo_name": "landlab/drivers", "path": "scripts/ecohydrology_flat_surface/ecohyd_functions_flat.py", "copies": "1", "size": "8090", "license": "mit", "hash": 7697456151862490000, "line_mean": 40.2755102041, "line_max": 84, "alpha_frac": 0.5915945612, "autogenerated": false, "ratio": 3.047080979...
""" adapted from: - Song and Geyer. "A neural circuitry that emphasizes spinal feedback generates diverse behaviours of human locomotion." The Journal of physiology, 2015. """ from __future__ import division # '/' always means non-truncating division import numpy as np from envs.control.loco_reflex_song2019 import Loc...
{ "repo_name": "stanfordnmbl/osim-rl", "path": "osim/control/osim_loco_reflex_song2019.py", "copies": "1", "size": "6521", "license": "mit", "hash": 8220973939617085000, "line_mean": 47.6641791045, "line_max": 115, "alpha_frac": 0.4628124521, "autogenerated": false, "ratio": 3.283484390735146, "...
""" adapted from: - Song and Geyer. "A neural circuitry that emphasizes spinal feedback generates diverse behaviours of human locomotion." The Journal of physiology, 2015. - The control doesn't use muscle states if not needed - still uses muscle force data for postivie force feedback - Removed some control pathways ...
{ "repo_name": "stanfordnmbl/osim-rl", "path": "envs/control/loco_reflex_song2019.py", "copies": "1", "size": "23705", "license": "mit", "hash": -102501654056675570, "line_mean": 42.1803278689, "line_max": 115, "alpha_frac": 0.4815439781, "autogenerated": false, "ratio": 2.7557544757033248, "con...
""" ... """ from __future__ import division # '/' always means non-truncating division import numpy as np from scipy import interpolate class VTgtField(object): nn_get = np.array([11, 11]) # vtgt_field_local data is nn_get*nn_get = 121 ver = {} # v00: constant forward velocities ver['ver00'] = {} ...
{ "repo_name": "stanfordnmbl/osim-rl", "path": "envs/target/v_tgt_field.py", "copies": "1", "size": "16837", "license": "mit", "hash": -4593181175045463000, "line_mean": 44.3827493261, "line_max": 115, "alpha_frac": 0.4430718061, "autogenerated": false, "ratio": 3.0657319737800437, "config_test"...
import numpy as np import pytest from sklearn.datasets import make_blobs from sklearn.cluster import OPTICS from sklearn.cluster._optics import _extend_region, _extract_xi_labels from sklearn.exceptions import DataConversionWarning from sklearn.metrics.cluster import contingency_matrix from sklearn.metrics.pairwise im...
{ "repo_name": "anntzer/scikit-learn", "path": "sklearn/cluster/tests/test_optics.py", "copies": "5", "size": "19230", "license": "bsd-3-clause", "hash": 1122240322598857200, "line_mean": 39.6553911205, "line_max": 79, "alpha_frac": 0.6084763391, "autogenerated": false, "ratio": 2.760155016506387,...
__author__ = 'sshejko' from PyQt4 import QtCore, QtGui from PyQt4.QtGui import QSystemTrayIcon import gold_time_lib import sys import os import datetime class MainWindow(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) # adding icon and systray icon #if os.path.ex...
{ "repo_name": "ssic7i/Gold-time", "path": "gold_time_main.py", "copies": "1", "size": "5381", "license": "mit", "hash": 442960616853864640, "line_mean": 49.2990654206, "line_max": 237, "alpha_frac": 0.6430031593, "autogenerated": false, "ratio": 3.083667621776504, "config_test": false, "has_n...
__author__ = 'sshejko' import httplib, urllib import os import xml.etree.ElementTree as ET class yandex_spellchecker: base_url = r'http://speller.yandex.net/services/spellservice/checkText' post_url = r'/services/spellservice/checkText' def __init__(self): pass def get_result_post(self, te...
{ "repo_name": "ssic7i/sy_spellchecker", "path": "sp_ch_lib.py", "copies": "1", "size": "1992", "license": "mit", "hash": -1561150063915190800, "line_mean": 33.9473684211, "line_max": 118, "alpha_frac": 0.578815261, "autogenerated": false, "ratio": 3.5256637168141594, "config_test": false, "ha...
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_spd_matrix import gauss_utils as gauss import pyprobml_utils as pml def main(): np.random.seed(12) data_dim = 8 n_data = 10 threshold_missing = 0.5 mu = np.random.randn(data_dim, 1) sigma = make_s...
{ "repo_name": "probml/pyprobml", "path": "scripts/gauss_imputation_known_params_demo.py", "copies": "1", "size": "1663", "license": "mit", "hash": -4271693219807021600, "line_mean": 33.4255319149, "line_max": 94, "alpha_frac": 0.6542393265, "autogenerated": false, "ratio": 2.867241379310345, "c...
from __future__ import division import logging import copy import numpy as np import scipy as sp from warnings import warn from scipy import sparse from scipy.sparse import lil_matrix, csr_matrix, vstack from numpy import random from scipy.sparse import issparse import numbers from sklearn.externals import six f...
{ "repo_name": "shubhomoydas/pyaad", "path": "pyalad/random_split_trees.py", "copies": "1", "size": "38022", "license": "mit", "hash": 3007675995184238600, "line_mean": 34.870754717, "line_max": 135, "alpha_frac": 0.5701962022, "autogenerated": false, "ratio": 3.8687423687423688, "config_test": ...
__authors__ = 'shuffleres, sinkdb' from character import Character enemy_health = 100000 enemy_energy = 100 enemy_attack = 100 enemy_heal = 40 health = 100000 energy = 100 attack = 150 heal = 30 round_count = 0 char = Character() print("Your stats: ", health, energy, attack, heal) print("Enemy stats: ", enemy_hea...
{ "repo_name": "scottshuffler/Game", "path": "game.py", "copies": "1", "size": "1176", "license": "mit", "hash": -4531118571993891000, "line_mean": 20, "line_max": 76, "alpha_frac": 0.5892857143, "autogenerated": false, "ratio": 3.230769230769231, "config_test": false, "has_no_keywords": false...
from PIL import Image import random i = Image.open("input.png") #pixel data is stored in pixels in form of two dimensional array pixels = i.load() width, height = i.size j=Image.new(i.mode,i.size) gamma=input("Enter the value of gamma range:0.25 to 2.0: ") for x in range(width): for y in range(height): cpixe...
{ "repo_name": "BhargavGamit/ImageManipulationAlgorithms", "path": "GammaCorrectionAlgo.py", "copies": "1", "size": "1211", "license": "mit", "hash": -3199115733037002000, "line_mean": 40.7586206897, "line_max": 68, "alpha_frac": 0.681255161, "autogenerated": false, "ratio": 3.042713567839196, "...
__authors__ = ['Stew Francis'] import csv import time import math import colorsys import pygame import os from DDRPi import FloorCanvas from VisualisationPlugin import VisualisationPlugin # from DDRPi import DDRPiPlugin #from lib.utils import ColourUtils import logging class Filter(object): def process(self,...
{ "repo_name": "fraz3alpha/led-disco-dancefloor", "path": "software/controller/visualisation_plugins/patterns.py", "copies": "2", "size": "15741", "license": "mit", "hash": -1760023774891280400, "line_mean": 34.0579064588, "line_max": 117, "alpha_frac": 0.5479956801, "autogenerated": false, "ratio...
__authors__ = ['Stew Francis'] import csv import time import math import colorsys from DDRPi import DDRPiPlugin from lib.utils import ColourUtils class Filter(object): def process(self, frame): raise NotImplementedError class Pattern(object): def __init__(self, patternFile): with open(patternFile) as csvFil...
{ "repo_name": "joel-wright/DDRPi", "path": "plugins/patterns.py", "copies": "1", "size": "8735", "license": "mit", "hash": 2683730695489037300, "line_mean": 25.7125382263, "line_max": 138, "alpha_frac": 0.65930166, "autogenerated": false, "ratio": 2.9155540720961284, "config_test": false, "ha...
__author__ = 'sstober' from deepthought.analysis.tempo.autocorrelation import * import scipy.stats as stats def sliding_window_tempo_analysis(trial, sfreq, bpm_min, bpm_max, start_sample, stop_sample, window_length, ...
{ "repo_name": "sstober/deepthought", "path": "deepthought/experiments/bcmi2015/tempo_prediction.py", "copies": "1", "size": "3381", "license": "bsd-3-clause", "hash": -3382258128420631000, "line_mean": 33.8659793814, "line_max": 122, "alpha_frac": 0.5811889973, "autogenerated": false, "ratio": 3....
__author__ = 'sstober' from deepthought.datasets.eeg.EEGEpochsDataset import DataFile class DataFileWithMetaClasses(DataFile): def __init__(self, filepath, meta_classes=dict()): super(DataFileWithMetaClasses, self).__init__(filepath) for class_name, classes in meta_classes.iteritems(): ...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/eeg/meta_class.py", "copies": "1", "size": "1503", "license": "bsd-3-clause", "hash": -9077261800644021000, "line_mean": 26.3272727273, "line_max": 63, "alpha_frac": 0.5409181637, "autogenerated": false, "ratio": 4.040322580645161...
__author__ = 'sstober' from pylearn2.train_extensions.best_params import MonitorBasedSaveBest from copy import deepcopy from pylearn2.utils import serial from pylearn2.utils.timing import log_timing import logging log = logging.getLogger(__name__) class MonitorBasedSaveBestMod(MonitorBasedSaveBest): def on_mo...
{ "repo_name": "sstober/deepthought", "path": "deepthought/pylearn2ext/best_params.py", "copies": "1", "size": "1573", "license": "bsd-3-clause", "hash": -2261956944791149000, "line_mean": 33.2173913043, "line_max": 77, "alpha_frac": 0.6185632549, "autogenerated": false, "ratio": 4.333333333333333...
__author__ = 'sstober' import logging from pylearn2.utils.logger import CustomFormatter, CustomStreamHandler def configure_custom(debug=False, stdout=None, stderr=None): """ copied from pylearn2.utils.logger to obtain similar behavior for deepthought extensions Configure the logging module to output logg...
{ "repo_name": "sstober/deepthought", "path": "deepthought/util/logging_util.py", "copies": "1", "size": "2139", "license": "bsd-3-clause", "hash": 5725851138043827000, "line_mean": 36.5438596491, "line_max": 91, "alpha_frac": 0.6979897148, "autogenerated": false, "ratio": 4.347560975609756, "co...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) from deepthought.datasets.openmiir.preprocessing.events import generate_beat_events from deepthought.datasets.openmiir.metadata import get_stimuli_version import deepthought.datasets.openmiir.preprocessing as preprocessing # alias preload = prep...
{ "repo_name": "sstober/deepthought", "path": "deepthought/experiments/bcmi2015/preprocessing.py", "copies": "1", "size": "1928", "license": "bsd-3-clause", "hash": 2547759787302493000, "line_mean": 36.8039215686, "line_max": 116, "alpha_frac": 0.5368257261, "autogenerated": false, "ratio": 4.5258...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) from deepthought.util.fs_util import load from deepthought.datasets.selection import DatasetMetaDB from pylearn2.utils.timing import log_timing import os class Datasource(object): def __init__(self, data, metadata, targets=None): s...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/datasources.py", "copies": "1", "size": "2379", "license": "bsd-3-clause", "hash": 1120393440154615800, "line_mean": 32.9857142857, "line_max": 86, "alpha_frac": 0.604035309, "autogenerated": false, "ratio": 3.8125, "config_test...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) from mne import pick_types import numpy as np import librosa import mne ## old interface from mne/filter.py: # def resample(self, sfreq, npad=100, window='boxcar', # stim_picks=None, n_jobs=1, verbose=None): def fast_resample_mne(ra...
{ "repo_name": "sstober/deepthought", "path": "deepthought/mneext/resample.py", "copies": "1", "size": "6815", "license": "bsd-3-clause", "hash": -7696827608279479000, "line_mean": 39.8083832335, "line_max": 109, "alpha_frac": 0.5973587674, "autogenerated": false, "ratio": 3.809390721073225, "co...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) from pylearn2.costs.cost import Cost, DefaultDataSpecsMixin from pylearn2.space import CompositeSpace, Conv2DSpace, VectorSpace import theano.tensor as T class MeanCrossCorrelation(DefaultDataSpecsMixin, Cost): def __init__(self, supervise...
{ "repo_name": "sstober/deepthought", "path": "deepthought/pylearn2ext/costs/correlation.py", "copies": "1", "size": "3880", "license": "bsd-3-clause", "hash": 5712632885647795000, "line_mean": 27.1231884058, "line_max": 103, "alpha_frac": 0.5309278351, "autogenerated": false, "ratio": 3.353500432...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) from pylearn2.costs.cost import DefaultDataSpecsMixin, Cost import theano.tensor as T from deepthought.util.axes_util import symbolic_to_b01c class MeanSquaredReconstructionError(DefaultDataSpecsMixin, Cost): """ for each input instan...
{ "repo_name": "sstober/deepthought", "path": "deepthought/pylearn2ext/costs/reconstruct.py", "copies": "1", "size": "5324", "license": "bsd-3-clause", "hash": 4716424403258711000, "line_mean": 25.8939393939, "line_max": 81, "alpha_frac": 0.5533433509, "autogenerated": false, "ratio": 3.6021650879...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) import mne from deepthought.datasets.openmiir.preprocessing.pipeline import load_raw, load_ica from deepthought.datasets.openmiir.preprocessing.events import generate_beat_events from deepthought.mneext.resample import fast_resample_mne, resample...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/openmiir/preprocessing/__init__.py", "copies": "1", "size": "3360", "license": "bsd-3-clause", "hash": 9011408628370962000, "line_mean": 39.0119047619, "line_max": 105, "alpha_frac": 0.5827380952, "autogenerated": false, "ratio": ...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) import numpy as np import mne from deepthought.datasets.openmiir.preprocessing.events \ import filter_trial_events, generate_beat_events, filter_beat_events from deepthought.datasets.openmiir.metadata \ import get_stimuli_version, load_st...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/openmiir/epochs.py", "copies": "1", "size": "4813", "license": "bsd-3-clause", "hash": 8223452683909073000, "line_mean": 28.3475609756, "line_max": 102, "alpha_frac": 0.5763557033, "autogenerated": false, "ratio": 3.62971342383107...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) import numpy as np import functools # from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix from pylearn2.datasets import Dataset from pylearn2.format.target_format import OneHotFormatter from pylearn2.space import CompositeSpace,...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/eeg/EEGEpochsDataset.py", "copies": "1", "size": "15136", "license": "bsd-3-clause", "hash": 1562818688248836900, "line_mean": 34.9548693587, "line_max": 112, "alpha_frac": 0.5529201903, "autogenerated": false, "ratio": 4.50074338...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) import numpy as np KEYSTROKE_BASE_ID = 2000 def get_event_id(stimulus_id, condition): return stimulus_id * 10 + condition def decode_event_id(event_id): if event_id < 1000: stimulus_id = event_id / 10 condition = event_...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/openmiir/events.py", "copies": "1", "size": "1421", "license": "bsd-3-clause", "hash": -8572622694799107000, "line_mean": 28.625, "line_max": 73, "alpha_frac": 0.5763546798, "autogenerated": false, "ratio": 3.690909090909091, "c...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) import os import datetime import numpy as np import mne from mne.io.edf.edf import read_raw_edf from scipy.io import loadmat from deepthought.util.fs_util import ensure_parent_dir_exists from deepthought.datasets.openmiir.preprocessing.keystr...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/openmiir/preprocessing/events.py", "copies": "1", "size": "20385", "license": "bsd-3-clause", "hash": -8217116019613545000, "line_mean": 34.8908450704, "line_max": 120, "alpha_frac": 0.5682609762, "autogenerated": false, "ratio": ...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) import os import numpy as np import xlrd import deepthought from deepthought.util.fs_util import ensure_parent_dir_exists from deepthought.datasets.openmiir.constants import STIMULUS_IDS DEFAULT_VERSION = 1 def get_stimuli_version(subject): ...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/openmiir/metadata.py", "copies": "1", "size": "5592", "license": "bsd-3-clause", "hash": -5838849774872429000, "line_mean": 31.8941176471, "line_max": 111, "alpha_frac": 0.55472103, "autogenerated": false, "ratio": 3.4928169893816...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) import os import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import mne from mne.io import read_raw_edf from mne.channels import rename_channels from mne.preprocessing import ICA, read_ica from mne.viz.top...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/openmiir/preprocessing/pipeline.py", "copies": "1", "size": "40580", "license": "bsd-3-clause", "hash": 6403651418171538000, "line_mean": 37.103286385, "line_max": 139, "alpha_frac": 0.5782897979, "autogenerated": false, "ratio": ...
__author__ = 'sstober' import logging log = logging.getLogger(__name__) from pylearn2.utils.timing import log_timing from pylearn2.train_extensions import TrainExtension from pylearn2.space import CompositeSpace import theano from sklearn.metrics import confusion_matrix, classification_report import numpy as np c...
{ "repo_name": "sstober/deepthought", "path": "deepthought/pylearn2ext/monitor/rnn.py", "copies": "1", "size": "4858", "license": "bsd-3-clause", "hash": -8027333924418754000, "line_mean": 31.8243243243, "line_max": 92, "alpha_frac": 0.5282009057, "autogenerated": false, "ratio": 4.089225589225589...
__author__ = 'sstober' import numpy as np import matplotlib.pyplot as plt from itertools import cycle from mne.io.pick import channel_type from mne.externals.six import string_types from mne.defaults import _handle_default from mne.viz.utils import tight_layout def plot_ica_overlay_evoked(evoked, evoked_cln, title, s...
{ "repo_name": "sstober/deepthought", "path": "deepthought/mneext/viz.py", "copies": "1", "size": "7947", "license": "bsd-3-clause", "hash": 2709513191120352000, "line_mean": 36.6682464455, "line_max": 89, "alpha_frac": 0.5467472002, "autogenerated": false, "ratio": 3.6238030095759233, "config_t...
__author__ = 'sstober' import numpy as np import theano class WindowingProcessor(object): def __init__(self, window_size, hop_size=None, stack_frames=False): if hop_size is None: hop_size = window_size // 4 self.hop_size = hop_size self.window_size = window_size self....
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/eeg/trial_processors.py", "copies": "1", "size": "9085", "license": "bsd-3-clause", "hash": -4295414609910383000, "line_mean": 31.5663082437, "line_max": 96, "alpha_frac": 0.5277930655, "autogenerated": false, "ratio": 4.055803571...
__author__ = 'sstober' import numpy as np # default settings from deepthought.datasets.eeg.biosemi64 import Biosemi64Layout as Biosemi64 def compute_plot_xy_mapping(xy_layout, layout=Biosemi64()): channel_xy_positions = np.zeros((layout.num_channels(),2), dtype=np.int) channel_name_to_number = dict() f...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/eeg/channel_util.py", "copies": "1", "size": "4997", "license": "bsd-3-clause", "hash": -8835042100520183000, "line_mean": 30.0434782609, "line_max": 78, "alpha_frac": 0.6331799079, "autogenerated": false, "ratio": 3.5667380442541...
__author__ = 'sstober' import numpy as np def compute_autocorrelation(data): # from pandas.tools.plotting import autocorrelation_plot # see http://pandas.pydata.org/pandas-docs/dev/visualization.html#autocorrelation-plot # see http://www.itl.nist.gov/div898/handbook/eda/section3/autocopl.htm from pan...
{ "repo_name": "sstober/deepthought", "path": "deepthought/analysis/tempo/autocorrelation.py", "copies": "1", "size": "2768", "license": "bsd-3-clause", "hash": -6333841718031703000, "line_mean": 29.7666666667, "line_max": 91, "alpha_frac": 0.6062138728, "autogenerated": false, "ratio": 3.06194690...
__author__ = 'sstober' import collections class DatasetMetaDB(object): def __init__(self, metadata, attributes): def multi_dimensions(n, dtype): """ Creates an n-dimension dictionary where the n-th dimension is of type 'type' """ if n == 0: return dtyp...
{ "repo_name": "sstober/deepthought", "path": "deepthought/datasets/selection.py", "copies": "1", "size": "1726", "license": "bsd-3-clause", "hash": 711897120121752300, "line_mean": 32.862745098, "line_max": 92, "alpha_frac": 0.5382387022, "autogenerated": false, "ratio": 4.590425531914893, "con...
__author__ = 'sstober' import logging logger = logging.getLogger('test') from mne.preprocessing import ICA from mne.preprocessing.ica import _check_start_stop, _reject_data_segments from mne.evoked import Evoked,EvokedArray from mne.io.pick import pick_types, pick_info class EvokedICA(ICA): def fit(self, inst, ...
{ "repo_name": "sstober/deepthought", "path": "deepthought/mneext/ica.py", "copies": "1", "size": "2403", "license": "bsd-3-clause", "hash": 7008167170156417000, "line_mean": 37.7741935484, "line_max": 101, "alpha_frac": 0.5530586767, "autogenerated": false, "ratio": 3.714064914992272, "config_t...
__author__ = 'sstreiner' import re import socket import nis import sys from collections import OrderedDict def checkdns(host): try: dnsraw = socket.gethostbyaddr(host) dns = dnsraw[2] if dns: return True except: return False def checkipaddr(host): try: ...
{ "repo_name": "sstreiner/nastools", "path": "cdotmigration/libcdotmigration/libcdotmigration.py", "copies": "1", "size": "7451", "license": "bsd-2-clause", "hash": 5687160616729370000, "line_mean": 29.412244898, "line_max": 116, "alpha_frac": 0.5412696282, "autogenerated": false, "ratio": 4.06270...
__author__ = "Stacy Smith" __credits__ = "Jeremy Schulman, Nitin Kumar" import unittest2 as unittest from nose.plugins.attrib import attr from jnpr.junos.facts.swver import version_info import jnpr.junos.facts.swver @attr('unit') class TestVersionInfo(unittest.TestCase): def test_version_info_after_type_len_els...
{ "repo_name": "spidercensus/py-junos-eznc", "path": "tests/unit/facts/test_swver.py", "copies": "1", "size": "2674", "license": "apache-2.0", "hash": 5894308679564512000, "line_mean": 35.1486486486, "line_max": 83, "alpha_frac": 0.5792819746, "autogenerated": false, "ratio": 3.15702479338843, "...
__author__ = "Stacy Smith" __credits__ = "Jeremy Schulman, Nitin Kumar" import unittest from nose.plugins.attrib import attr from mock import patch, MagicMock import os from lxml import etree from jnpr.junos import Device from jnpr.junos.exception import RpcError from ncclient.manager import Manager, make_device_han...
{ "repo_name": "spidercensus/py-junos-eznc", "path": "tests/unit/facts/test_get_software_information.py", "copies": "1", "size": "9963", "license": "apache-2.0", "hash": -2407025879152036000, "line_mean": 43.6771300448, "line_max": 80, "alpha_frac": 0.5666967781, "autogenerated": false, "ratio": 3...
__author__ = "Stacy Smith" __credits__ = "Jeremy Schulman, Nitin Kumar" import unittest from nose.plugins.attrib import attr from mock import patch, MagicMock import os from jnpr.junos import Device from ncclient.manager import Manager, make_device_handler from ncclient.transport import SSHSession @attr('unit') cl...
{ "repo_name": "spidercensus/py-junos-eznc", "path": "tests/unit/facts/test_current_re.py", "copies": "1", "size": "1810", "license": "apache-2.0", "hash": -4899721735222327000, "line_mean": 33.1698113208, "line_max": 78, "alpha_frac": 0.591160221, "autogenerated": false, "ratio": 3.80252100840336...
from collections import namedtuple from inspect import isgenerator import warnings from ..externals.six import string_types import numpy as np from scipy import linalg from ..source_estimate import SourceEstimate from ..epochs import _BaseEpochs from ..evoked import Evoked, EvokedArray from ..utils import logger, _r...
{ "repo_name": "antiface/mne-python", "path": "mne/stats/regression.py", "copies": "2", "size": "15231", "license": "bsd-3-clause", "hash": -7366613527551673000, "line_mean": 43.9292035398, "line_max": 79, "alpha_frac": 0.6172280218, "autogenerated": false, "ratio": 3.8001497005988023, "config_t...
from collections import namedtuple from inspect import isgenerator import warnings from ..externals.six import string_types import numpy as np from scipy import linalg, sparse from ..source_estimate import SourceEstimate from ..epochs import _BaseEpochs from ..evoked import Evoked, EvokedArray from ..utils import lo...
{ "repo_name": "rajegannathan/grasp-lift-eeg-cat-dog-solution-updated", "path": "python-packages/mne-python-0.10/mne/stats/regression.py", "copies": "3", "size": "14875", "license": "bsd-3-clause", "hash": -5020865233275059000, "line_mean": 43.1394658754, "line_max": 79, "alpha_frac": 0.6086722689, ...
from inspect import isgenerator from collections import namedtuple import numpy as np from scipy import linalg, sparse from ..externals.six import string_types from ..source_estimate import SourceEstimate from ..epochs import _BaseEpochs from ..evoked import Evoked, EvokedArray from ..utils import logger, _reject_da...
{ "repo_name": "ARudiuk/mne-python", "path": "mne/stats/regression.py", "copies": "4", "size": "17595", "license": "bsd-3-clause", "hash": -2331784790605169000, "line_mean": 43.6573604061, "line_max": 79, "alpha_frac": 0.6144359193, "autogenerated": false, "ratio": 3.7468057921635434, "config_te...
from inspect import isgenerator from collections import namedtuple import numpy as np from scipy import linalg, sparse from ..source_estimate import SourceEstimate from ..epochs import BaseEpochs from ..evoked import Evoked, EvokedArray from ..utils import logger, _reject_data_segments, warn, fill_doc from ..io.pick...
{ "repo_name": "adykstra/mne-python", "path": "mne/stats/regression.py", "copies": "2", "size": "17731", "license": "bsd-3-clause", "hash": -5213919070938516000, "line_mean": 43.5502512563, "line_max": 79, "alpha_frac": 0.6114714342, "autogenerated": false, "ratio": 3.725, "config_test": false, ...
from inspect import isgenerator from collections import namedtuple import numpy as np from ..source_estimate import SourceEstimate from ..epochs import BaseEpochs from ..evoked import Evoked, EvokedArray from ..utils import logger, _reject_data_segments, warn, fill_doc from ..io.pick import pick_types, pick_info, _p...
{ "repo_name": "kambysese/mne-python", "path": "mne/stats/regression.py", "copies": "7", "size": "17734", "license": "bsd-3-clause", "hash": -1958960874206965000, "line_mean": 43.4310776942, "line_max": 79, "alpha_frac": 0.6086416968, "autogenerated": false, "ratio": 3.723587481621508, "config_t...
from collections import namedtuple from inspect import isgenerator import warnings import numpy as np from scipy import linalg from ..source_estimate import SourceEstimate from ..epochs import _BaseEpochs from ..evoked import Evoked, EvokedArray from ..utils import logger from ..io.pick import pick_types def linea...
{ "repo_name": "Odingod/mne-python", "path": "mne/stats/regression.py", "copies": "5", "size": "5681", "license": "bsd-3-clause", "hash": -8515773475633695000, "line_mean": 40.7720588235, "line_max": 79, "alpha_frac": 0.6236578067, "autogenerated": false, "ratio": 3.725245901639344, "config_test...
from collections import namedtuple from inspect import isgenerator import warnings import numpy as np from scipy import linalg, stats from ..source_estimate import SourceEstimate from ..epochs import _BaseEpochs from ..evoked import Evoked, EvokedArray from ..utils import logger from ..io.pick import pick_types de...
{ "repo_name": "effigies/mne-python", "path": "mne/stats/regression.py", "copies": "2", "size": "5660", "license": "bsd-3-clause", "hash": 7437852305340747000, "line_mean": 40.9259259259, "line_max": 79, "alpha_frac": 0.6233215548, "autogenerated": false, "ratio": 3.7187910643889617, "config_tes...