text
stringlengths
0
1.05M
meta
dict
import os.path as op from nose.tools import assert_true import numpy as np from numpy.testing import assert_allclose from mne import Epochs, read_evokeds, pick_types from mne.io.compensator import make_compensator, get_current_comp from mne.io import Raw from mne.utils import _TempDir, requires_mne, run_subprocess b...
{ "repo_name": "trachelr/mne-python", "path": "mne/io/tests/test_compensator.py", "copies": "21", "size": "2641", "license": "bsd-3-clause", "hash": 7839780865193153000, "line_mean": 35.6805555556, "line_max": 73, "alpha_frac": 0.6410450587, "autogenerated": false, "ratio": 2.9344444444444444, "...
import os.path as op from nose.tools import assert_true from numpy.testing import assert_array_almost_equal from nose.tools import assert_raises import numpy as np from scipy import linalg import warnings from mne.cov import regularize, whiten_evoked from mne import (read_cov, write_cov, Epochs, merge_events, ...
{ "repo_name": "effigies/mne-python", "path": "mne/tests/test_cov.py", "copies": "1", "size": "9068", "license": "bsd-3-clause", "hash": 2355721487476759000, "line_mean": 40.0316742081, "line_max": 79, "alpha_frac": 0.6301279224, "autogenerated": false, "ratio": 3.0583473861720067, "config_test"...
import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_almost_equal) from nose.tools import assert_true, assert_raises import warnings from mne.datasets import testing from mne import read_forward_solution from mne.simulatio...
{ "repo_name": "alexandrebarachant/mne-python", "path": "mne/simulation/tests/test_evoked.py", "copies": "2", "size": "3750", "license": "bsd-3-clause", "hash": 6148970045337752000, "line_mean": 38.4736842105, "line_max": 79, "alpha_frac": 0.6037333333, "autogenerated": false, "ratio": 3.125, "c...
import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal, assert_allclose) from nose.tools import assert_true, assert_raises import warnings from mne.datasets import testing from mne import read_forward_solution from mne...
{ "repo_name": "jaeilepp/mne-python", "path": "mne/simulation/tests/test_evoked.py", "copies": "1", "size": "3512", "license": "bsd-3-clause", "hash": -6713431779630030000, "line_mean": 36.7634408602, "line_max": 79, "alpha_frac": 0.6272779043, "autogenerated": false, "ratio": 3.219065077910174, ...
import os.path as op import numpy as np from numpy.testing import assert_array_almost_equal from nose.tools import assert_true, assert_raises import warnings from mne.datasets import testing from mne import read_label, read_forward_solution from mne.time_frequency import morlet from mne.simulation import generate_sp...
{ "repo_name": "matthew-tucker/mne-python", "path": "mne/simulation/tests/test_evoked.py", "copies": "7", "size": "3120", "license": "bsd-3-clause", "hash": 7096174052178008000, "line_mean": 37.5185185185, "line_max": 79, "alpha_frac": 0.6205128205, "autogenerated": false, "ratio": 3.0439024390243...
import warnings import os.path as op from nose.tools import assert_true from mne import io, Epochs, read_events, pick_types from mne.utils import requires_sklearn from mne.decoding import time_generalization data_dir = op.join(op.dirname(__file__), '..', '..', 'io', 'tests', 'data') raw_fname = op.join(data_dir, 't...
{ "repo_name": "effigies/mne-python", "path": "mne/decoding/tests/test_time_gen.py", "copies": "2", "size": "1373", "license": "bsd-3-clause", "hash": -482678710559433600, "line_mean": 31.6904761905, "line_max": 75, "alpha_frac": 0.6394756009, "autogenerated": false, "ratio": 3.0715883668903805, ...
import warnings import os.path as op from nose.tools import assert_true from mne import io, Epochs, read_events, pick_types from mne.utils import _TempDir, requires_sklearn from mne.decoding import time_generalization tempdir = _TempDir() data_dir = op.join(op.dirname(__file__), '..', '..', 'io', 'tests', 'data') ...
{ "repo_name": "jaeilepp/eggie", "path": "mne/decoding/tests/test_time_gen.py", "copies": "2", "size": "1415", "license": "bsd-2-clause", "hash": -7174546397776386000, "line_mean": 31.1590909091, "line_max": 75, "alpha_frac": 0.6374558304, "autogenerated": false, "ratio": 3.0760869565217392, "co...
import numpy as np from ..utils import logger, verbose @verbose def is_equal(first, second, verbose=None): """Check if 2 python structures are the same. Designed to handle dict, list, np.ndarray etc. """ all_equal = True # Check all keys in first dict if type(first) != type(second): ...
{ "repo_name": "adykstra/mne-python", "path": "mne/io/diff.py", "copies": "10", "size": "1231", "license": "bsd-3-clause", "hash": -3715550367287711000, "line_mean": 29.775, "line_max": 70, "alpha_frac": 0.5613322502, "autogenerated": false, "ratio": 3.8348909657320873, "config_test": false, "...
import numpy as np from ..utils import logger, verbose @verbose def is_equal(first, second, verbose=None): """ Says if 2 python structures are the same. Designed to handle dict, list, np.ndarray etc. """ all_equal = True # Check all keys in first dict if type(first) != type(second): ...
{ "repo_name": "Odingod/mne-python", "path": "mne/io/diff.py", "copies": "25", "size": "1230", "license": "bsd-3-clause", "hash": 7805532882965248000, "line_mean": 30.5384615385, "line_max": 70, "alpha_frac": 0.5609756098, "autogenerated": false, "ratio": 3.8198757763975157, "config_test": false...
from copy import deepcopy import numpy as np from scipy import linalg, signal from ..source_estimate import SourceEstimate from ..minimum_norm.inverse import combine_xyz, _prepare_forward from ..forward import compute_orient_prior, is_fixed_orient, _to_fixed_ori from ..io.pick import pick_channels_evoked from .mxne_o...
{ "repo_name": "jaeilepp/eggie", "path": "mne/inverse_sparse/mxne_inverse.py", "copies": "3", "size": "16230", "license": "bsd-2-clause", "hash": -7868014449688966000, "line_mean": 36.5694444444, "line_max": 80, "alpha_frac": 0.5980899569, "autogenerated": false, "ratio": 3.7037882245549976, "co...
import numpy as np from .utils import logger, verbose @verbose def read_dip(fname, verbose=None): """Read .dip file from Neuromag/xfit or MNE Parameters ---------- fname : str The name of the .dip file. verbose : bool, str, int, or None If not None, override default verbose leve...
{ "repo_name": "effigies/mne-python", "path": "mne/dipole.py", "copies": "4", "size": "1336", "license": "bsd-3-clause", "hash": -2855935113749935000, "line_mean": 28.0434782609, "line_max": 79, "alpha_frac": 0.6017964072, "autogenerated": false, "ratio": 3.4081632653061225, "config_test": false...
import os.path as op from nose.tools import assert_true, assert_raises import numpy as np from numpy.testing import assert_array_almost_equal from mne import io, Epochs, read_events, pick_types from mne.decoding.csp import CSP from mne.utils import requires_sklearn data_dir = op.join(op.dirname(__file__), '..', '.....
{ "repo_name": "aestrivex/mne-python", "path": "mne/decoding/tests/test_csp.py", "copies": "6", "size": "3498", "license": "bsd-3-clause", "hash": -6284642169471464000, "line_mean": 35.8210526316, "line_max": 78, "alpha_frac": 0.6309319611, "autogenerated": false, "ratio": 3.229916897506925, "co...
import os.path as op import pytest import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from mne import io, Epochs, read_events, pick_types from mne.decoding.csp import CSP, _ajd_pham, SPoC from mne.utils import requires_sklearn data_d...
{ "repo_name": "adykstra/mne-python", "path": "mne/decoding/tests/test_csp.py", "copies": "3", "size": "10603", "license": "bsd-3-clause", "hash": -7507074701161823000, "line_mean": 36.5992907801, "line_max": 79, "alpha_frac": 0.6247288503, "autogenerated": false, "ratio": 3.0993861444022217, "c...
import os.path as op from nose.tools import assert_true, assert_raises, assert_equal import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal from mne import io, Epochs, read_events, pick_types from mne.decoding.csp import CSP, _ajd_pham from mne.utils import requires_sklearn, slow_...
{ "repo_name": "nicproulx/mne-python", "path": "mne/decoding/tests/test_csp.py", "copies": "2", "size": "8007", "license": "bsd-3-clause", "hash": -4774235602375425000, "line_mean": 38.4433497537, "line_max": 79, "alpha_frac": 0.6331959535, "autogenerated": false, "ratio": 3.1449332285938727, "c...
import os.path as op from nose.tools import assert_true, assert_raises import numpy as np from numpy.testing import assert_array_almost_equal from mne import io, Epochs, read_events, pick_types from mne.decoding.csp import CSP from mne.utils import requires_sklearn data_dir = op.join(op.dirname(__file__), '..', '.....
{ "repo_name": "antiface/mne-python", "path": "mne/decoding/tests/test_csp.py", "copies": "2", "size": "3829", "license": "bsd-3-clause", "hash": -4078091132965676500, "line_mean": 34.785046729, "line_max": 78, "alpha_frac": 0.6291459911, "autogenerated": false, "ratio": 3.283876500857633, "conf...
__author__ = 'alexandre' #from .. import strings # def test_filter_objlist(olist, fieldname, fieldval): # """ # Returns a list with of the objetcts in olist that have a fieldname valued as fieldval # # @param olist: list of objects # @param fieldname: string # @param fieldval: anything # # @r...
{ "repo_name": "Neurita/boyle", "path": "tests/test_strings.py", "copies": "1", "size": "4299", "license": "bsd-3-clause", "hash": 4505393461648565000, "line_mean": 27.4768211921, "line_max": 91, "alpha_frac": 0.5545475692, "autogenerated": false, "ratio": 3.168017686072218, "config_test": false...
__author__ = 'Alexandre' import cPickle import numpy as np import os import random from math import exp from time import time, sleep from GSkernel import load_AA_matrix, GS_kernel, compute_psi_dict from GSkernel_fast import GS_gram_matrix_fast def GS_kernel_naive(str1, str2, sigmaPos, sigmaAA, L, amino_acids, aa_des...
{ "repo_name": "aldro61/microbiome-summer-school-2017", "path": "exercises/code/GSkernel_source/benchmark/bench.py", "copies": "2", "size": "9314", "license": "mit", "hash": -411378807522712060, "line_mean": 31.1206896552, "line_max": 119, "alpha_frac": 0.5155679622, "autogenerated": false, "ratio...
__author__ = 'alexandre' import os import os.path as op import logging import subprocess from boyle.nifti.storage import save_niigz from boyle.files.names import get_temp_file, get_temp_dir log = logging.getLogger(__name__) class FslViewCaller(object): fslview_bin = op.join(os.environ['FSLDIR'], 'bi...
{ "repo_name": "Neurita/cajal", "path": "cajal/fslview.py", "copies": "1", "size": "1857", "license": "bsd-3-clause", "hash": 1731205962660581400, "line_mean": 29.95, "line_max": 69, "alpha_frac": 0.5875067313, "autogenerated": false, "ratio": 3.3580470162748646, "config_test": false, "has_no_...
__author__ = 'alexandre' import os.path as op from datetime import datetime, timedelta from collections import Counter from operator import itemgetter import dataset import sqlalchemy class VoterAlreadyVoted(Exception): pass class VoteRoundNotFound(Exception): pass class VoteRoundIsFinis...
{ "repo_name": "PythonSanSebastian/pyper_the_bot", "path": "implants/vote_rounds.py", "copies": "1", "size": "10736", "license": "bsd-3-clause", "hash": -7630368859046469000, "line_mean": 35.8934707904, "line_max": 118, "alpha_frac": 0.5397727273, "autogenerated": false, "ratio": 4.063588190764572...
__author__ = 'alexandre' import pandas as pd from gdrive import get_spreadsheet, get_worksheet, worksheet_to_dict def get_ws_data(api_key_file, doc_key, ws_tab_idx, header=None): """ Return the content of the spreadsheet in the ws_tab_idx tab of the spreadsheet with doc_key as a pandas DataFrame. Pa...
{ "repo_name": "PythonSanSebastian/pyper_the_bot", "path": "implants/sponsors_agreements_factory.py", "copies": "1", "size": "1979", "license": "bsd-3-clause", "hash": -9207512832977489000, "line_mean": 26.8873239437, "line_max": 99, "alpha_frac": 0.6109146033, "autogenerated": false, "ratio": 3.4...
__author__ = 'Alexandre' import ply.lex as lex reserved_words = ( 'color', 'point', 'line', 'circle', 'rect', 'ellipse', 'customshape', 'text', 'rotate', 'scale', 'translate', 'hide', 'if', 'while', 'for', 'step', 'apply', 'rgb', 'hex', 'name', 'x', 'y', 'p1', 'p2', 'f...
{ "repo_name": "thedarkmammouth/PNP", "path": "lex.py", "copies": "2", "size": "2038", "license": "mit", "hash": 6396340051251862000, "line_mean": 14.8062015504, "line_max": 75, "alpha_frac": 0.5574092247, "autogenerated": false, "ratio": 2.5036855036855035, "config_test": false, "has_no_keywo...
__author__ = "Alexan Mardigian" __version__ = "1.0.0" import os import time import tingbot from tingbot import * SAVEFILE = 'saved_font.sav' def load_fonts(): x = 0 f = {} path = "./fonts/" files = os.listdir(path) for filename in files: if filename.endswith(".ttf"): ...
{ "repo_name": "Techno-Hwizrdry/clok", "path": "clok.tingapp/main.py", "copies": "1", "size": "1938", "license": "mit", "hash": -3928323641208251400, "line_mean": 19.6170212766, "line_max": 83, "alpha_frac": 0.560371517, "autogenerated": false, "ratio": 3.2246256239600664, "config_test": false, ...
__author__ = "Alexan Mardigian" __version__ = "1.2.3" from argparse import ArgumentParser from time import sleep import json import requests import sys PWNED_API_URL = "https://haveibeenpwned.com/api/v3/%s/%s?truncateResponse=%s" HEADERS = { "User-Agent": "checkpwnedemails", "hibp-api-key...
{ "repo_name": "Techno-Hwizrdry/checkpwnedemails", "path": "checkpwnedemails.py", "copies": "1", "size": "7719", "license": "mit", "hash": -1498258399363076900, "line_mean": 31.2970711297, "line_max": 253, "alpha_frac": 0.6798808136, "autogenerated": false, "ratio": 2.9327507598784193, "config_t...
__author__ = "alex balzer <abalzer22@gmail.com>" __version__ = "0.1.0" # TODO: need to come up with different ways that you can mess with the vectors for each node so that you can create various matrices that all have relavance to specific applications. class vectree(object): def __init__(self,root): self.root = r...
{ "repo_name": "baallezx/vectree", "path": "src/tree/vectree.py", "copies": "1", "size": "3455", "license": "apache-2.0", "hash": 2798091200344644000, "line_mean": 27.7916666667, "line_max": 303, "alpha_frac": 0.6541244573, "autogenerated": false, "ratio": 2.6194086429112966, "config_test": fals...
__author__ = "Alex Baranov" from oriented_packing import oriented_packer, oriented_container_selector from copy import deepcopy from box import Box class RPacker(object): """ Class is used to rectangular elements to the rectangular containers. """ def __init__(self, **kwargs): """ Cr...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/packing/rectangular/rpacker.py", "copies": "1", "size": "7958", "license": "apache-2.0", "hash": -1953455592599639600, "line_mean": 37.8243902439, "line_max": 120, "alpha_frac": 0.547373712, "autogenerated": false, "ratio": 5.02398989898989...
__author__ = 'Alex Baranov' import numpy as np import itertools as iter __PRINT_DEBUG = False class InequalitiesSolver(object): last_system = None last_found_fundamental_system = None min_random = 1 max_random = 1000 def find_foundamental_system_of_solution(self, system): """ Se...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/discrete/inequalities/chernikov.py", "copies": "1", "size": "14199", "license": "apache-2.0", "hash": -7417542188763899000, "line_mean": 36.2677165354, "line_max": 124, "alpha_frac": 0.5744066484, "autogenerated": false, "ratio": 3.45895249...
__author__ = 'Alex Baranov' import unittest from time import * import numpy as np from ..discrete.inequalities import chernikov as c class TestFind_system_of_fundamental_solutions(unittest.TestCase): def _test_pulp(self): import pulp as p prob = p.LpProblem("The Whiskas Problem", p.LpMinimize) ...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/tests/test_find_system_of_fundamental_solutions.py", "copies": "1", "size": "2808", "license": "apache-2.0", "hash": 4999355709457662000, "line_mean": 38, "line_max": 88, "alpha_frac": 0.4405270655, "autogenerated": false, "ratio": 3.072210...
__author__ = 'Alex Baranov' from copy import deepcopy from json import JSONEncoder class Box(object): """Represents the box element""" @staticmethod def from_json_dict(d): """ Parses the box from the JSON dict """ return Box(d['size'], bottom_left=d['polus'], ...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/packing/rectangular/box.py", "copies": "1", "size": "8885", "license": "apache-2.0", "hash": -6329059491010484000, "line_mean": 27.3234323432, "line_max": 119, "alpha_frac": 0.4794597636, "autogenerated": false, "ratio": 4.261390887290168, ...
__author__ = 'Alex Baranov' from box import Box from itertools import permutations from operator import itemgetter from copy import deepcopy def orthogonal_packer(container, rect, axes_priorities=None, allowed_rotation_axes=None, **kwargs): """ Packs rect to the container. Rotation of packed are al...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/packing/rectangular/orthogonal_packing.py", "copies": "1", "size": "1968", "license": "apache-2.0", "hash": 7729018379292422000, "line_mean": 31.9310344828, "line_max": 100, "alpha_frac": 0.6524390244, "autogenerated": false, "ratio": 4.057...
__author__ = "Alex Baranov" from inequalities import chernikov as c from permutations import * import numpy as np def find_minimum(goal_func, constraints_system, combinatorial_set, add_constraints=True, series_count=3, e...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/discrete/randomsearch.py", "copies": "1", "size": "6894", "license": "apache-2.0", "hash": -6910973765954224000, "line_mean": 36.3, "line_max": 134, "alpha_frac": 0.5999419785, "autogenerated": false, "ratio": 4.115820895522388, "config_t...
__author__ = 'Alex Baranov' from oriented_packing import oriented_packer from operator import itemgetter from itertools import ifilter def get_non_blocking_boxes(current_box, all_boxes, packed_boxes): """ Get boxes that are not allowed to block with the current box. """ result = [] ...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/packing/rectangular/pdp_packing.py", "copies": "1", "size": "7157", "license": "apache-2.0", "hash": 745417469527810700, "line_mean": 38.6647727273, "line_max": 122, "alpha_frac": 0.6033254157, "autogenerated": false, "ratio": 3.91520787746...
__author__ = "Alex Baranov" from random import randrange from visual import * from reports import ReportsBuilder class BoxDrawer(object): """ Draws the boxes """ def __init__(self, packing_params=None, display_labels=True, **kwargs): """ Start the box drawing. ...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/packing/rectangular/drawer.py", "copies": "1", "size": "6596", "license": "apache-2.0", "hash": 1516229222471202000, "line_mean": 34.2417582418, "line_max": 110, "alpha_frac": 0.4810491207, "autogenerated": false, "ratio": 4.244530244530244...
__author__ = 'Alex Baranov' from reports import ReportsBuilder from pdp_packing import stable_non_blocking_container_selector from orthogonal_packing import orthogonal_packer from drawer import BoxDrawer from rpacker import RPacker from box import Box from optparse import OptionParser # define the command...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/packing/rectangular/pdphelper.py", "copies": "1", "size": "8217", "license": "apache-2.0", "hash": -3984635566719759000, "line_mean": 39.085, "line_max": 115, "alpha_frac": 0.5635876841, "autogenerated": false, "ratio": 3.935344827586207, ...
__author__ = "Alex Baranov" import itertools as it from combinatorial_set import CombinatorialSet class PermutationSet(CombinatorialSet): """ Describes the set of permutations """ def __init__(self, s=()): super(PermutationSet, self).__init__(s) def __iter__(self): ...
{ "repo_name": "stonelake/pyoptimization", "path": "pyopt/discrete/permutations.py", "copies": "1", "size": "1611", "license": "apache-2.0", "hash": 3052014972508641000, "line_mean": 28.3962264151, "line_max": 113, "alpha_frac": 0.5834885164, "autogenerated": false, "ratio": 4.120204603580563, "...
__author__ = 'Alex Berriman <aberriman@formcorp.com.au>' import sys import formcorp.api # FormCorp configurations public_key = '' private_key = '' form_id = 0 # Initialise the module formcorp.api.init(private_key, public_key) # Set the form id formcorp.api.set_form_id(form_id) print "==============================...
{ "repo_name": "formcorp/python-formcorp", "path": "sample-app.py", "copies": "1", "size": "1392", "license": "apache-2.0", "hash": 5252192670987343000, "line_mean": 25.7692307692, "line_max": 82, "alpha_frac": 0.6293103448, "autogenerated": false, "ratio": 3.462686567164179, "config_test": fals...
__author__ = 'Alex Breshears' __license__ = ''' Copyright (C) 2012 Alex Breshears Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to us...
{ "repo_name": "t3hi3x/p-k.co", "path": "shorturls/admin.py", "copies": "1", "size": "1450", "license": "mit", "hash": -3901632474489135000, "line_mean": 38.2162162162, "line_max": 79, "alpha_frac": 0.7875862069, "autogenerated": false, "ratio": 4.178674351585014, "config_test": false, "has_no...
__author__ = 'Alex Breshears' from shorturls.utils import * from django.http import Http404, HttpResponse, HttpResponseRedirect from django.template import Context, RequestContext from django.template.loader import get_template from chartit import PivotChart, PivotDataPool from django.db.models import Count from djang...
{ "repo_name": "t3hi3x/p-k.co", "path": "ajax/views.py", "copies": "1", "size": "6081", "license": "mit", "hash": 9220784576119864000, "line_mean": 33.9540229885, "line_max": 168, "alpha_frac": 0.6625555007, "autogenerated": false, "ratio": 2.949078564500485, "config_test": false, "has_no_keyw...
__author__ = 'alexei' from telnetlib import Telnet class JamesHelper: def __init__(self, app): self.app = app def ensure_user_exists(self, username, password): james_config = self.app.config['james'] session = JamesHelper.Session( james_config['host'], james_config['port'...
{ "repo_name": "barancev/python_training_mantis", "path": "fixture/james.py", "copies": "1", "size": "1732", "license": "apache-2.0", "hash": 320728738823281300, "line_mean": 32.9803921569, "line_max": 107, "alpha_frac": 0.5750577367, "autogenerated": false, "ratio": 3.848888888888889, "config_t...
__author__ = 'alexei' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("username").click() wd.find_element_by_name("username").clear() wd.find_e...
{ "repo_name": "barancev/python_training_mantis", "path": "fixture/session.py", "copies": "1", "size": "1456", "license": "apache-2.0", "hash": 5158036655489781000, "line_mean": 29.3541666667, "line_max": 78, "alpha_frac": 0.5776098901, "autogenerated": false, "ratio": 3.466666666666667, "config...
__author__ = 'Alexendar Perez' ##################### # # # Introduction # # # ##################### """check which genes the gRNAs used for training data in CRISPR ML task are hitting in mm10""" ################# # # # Libraries # # # #########...
{ "repo_name": "lzamparo/crisprML", "path": "src/gRNA_data_gene_check.py", "copies": "1", "size": "4157", "license": "bsd-3-clause", "hash": -6554842826290211000, "line_mean": 30.9769230769, "line_max": 178, "alpha_frac": 0.6050036084, "autogenerated": false, "ratio": 3.5867126833477134, "config...
__author__ = 'Alexendar Perez' ##################### # # # Introduction # # # ##################### """compute specificity score, Hamming, and Levinstein distance neighborhoods for strings""" ################# # # # Libraries # # # ############...
{ "repo_name": "lzamparo/crisprML", "path": "src/specificity_score_distance_neighbors.py", "copies": "1", "size": "16743", "license": "bsd-3-clause", "hash": 1234933588811401200, "line_mean": 33.1018329939, "line_max": 150, "alpha_frac": 0.6780146927, "autogenerated": false, "ratio": 2.99624194702...
__author__ = 'Alexendar Perez' ##################### # # # Introduction # # # ##################### """extract candidate gRNAs for cutting efficiency screen""" ################# # # # Libraries # # # ################# import sys import argpars...
{ "repo_name": "lzamparo/crisprML", "path": "src/extract_screening_gRNAs.py", "copies": "1", "size": "4855", "license": "bsd-3-clause", "hash": 9107329105069600000, "line_mean": 30.7320261438, "line_max": 224, "alpha_frac": 0.5274974253, "autogenerated": false, "ratio": 3.5155684286748734, "conf...
__author__ = 'Alexendar Perez' ##################### # # # Introduction # # # ##################### """select gRNAs from a set that meet certain annotation requirements""" ################# # # # Libraries # # # ################# import sys im...
{ "repo_name": "lzamparo/crisprML", "path": "src/gRNA_from_annotations.py", "copies": "1", "size": "9584", "license": "bsd-3-clause", "hash": 6337414569868282000, "line_mean": 37.0317460317, "line_max": 162, "alpha_frac": 0.6044449082, "autogenerated": false, "ratio": 4.0507185122569735, "config...
import numpy as np from scipy import sparse import igraph from sklearn.base import BaseEstimator, RegressorMixin from sklearn.utils.validation import NotFittedError, check_X_y, check_array class MultiIsotonicRegressor(BaseEstimator, RegressorMixin): """Regress a target value as a non-decreasing function of each ...
{ "repo_name": "alexfields/multiisotonic", "path": "multiisotonic.py", "copies": "1", "size": "4968", "license": "bsd-3-clause", "hash": 4078524916012369000, "line_mean": 40.7478991597, "line_max": 142, "alpha_frac": 0.5841384863, "autogenerated": false, "ratio": 3.8098159509202456, "config_test...
__author__ = 'Alex Frank' from scipy import stats import numpy as np import json def main(): timestamps = [] bottom_norms = [] top_norms = [] # expects norms.dat in same directory. Can be changed to be a command-line arg f = open('norms.dat', 'r') for line in f: words = line.split(' '...
{ "repo_name": "acic2015/findr", "path": "deprecated/linearReg.py", "copies": "1", "size": "1037", "license": "mit", "hash": -6715648850382036000, "line_mean": 24.2926829268, "line_max": 130, "alpha_frac": 0.5949855352, "autogenerated": false, "ratio": 3.575862068965517, "config_test": false, ...
import re import os import numpy as np import pandas as pd from operator import itemgetter from itertools import groupby # ========================================= Loads the skeletal data and labels ================================================================= # Returns: a dataframe with the whole training set f...
{ "repo_name": "AlexGidiotis/Multimodal-Gesture-Recognition-with-LSTMs-and-CTC", "path": "skeletal_network/skeletal_feature_extraction.py", "copies": "1", "size": "14319", "license": "mit", "hash": -7257514341169482000, "line_mean": 45.1903225806, "line_max": 145, "alpha_frac": 0.6271387667, "autoge...
__author__ = 'Alex Gusev <alex@flancer64.com>' from prxgt.const import ATTR_TYPE_INT from prxgt.domain.attribute import Attribute from prxgt.domain.meta.entity import Entity ATTR_ID_NAME = "id" class Instance(Entity): """ Entity instance representation. """ def __init__(self, id_=None, attrs=None): ...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/domain/instance.py", "copies": "1", "size": "1217", "license": "mit", "hash": 4806697462854603000, "line_mean": 21.5555555556, "line_max": 60, "alpha_frac": 0.5579293344, "autogenerated": false, "ratio": 3.733128834355828, "con...
__author__ = 'Alex Gusev <alex@flancer64.com>' from prxgt.domain.filter.filter import Filter from prxgt.domain.filter.filter_rule import FilterRule from prxgt.domain.filter.condition import Condition class ConditionRule(FilterRule): """ ConditionRule представляет собой логическое условие (AND, OR, NOT), приме...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/domain/filter/condition_rule.py", "copies": "1", "size": "1305", "license": "mit", "hash": -1540374810823010000, "line_mean": 28.1463414634, "line_max": 112, "alpha_frac": 0.622278057, "autogenerated": false, "ratio": 3.125654450...
__author__ = 'Alex Gusev <alex@flancer64.com>' import json import logging class Config: _filename = None _data = None def __init__(self, filename='config.json'): self._filename = filename def load(self): cfg_file = open(self._filename) self._data = json.load(cfg_file) ...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/config.py", "copies": "1", "size": "1262", "license": "mit", "hash": -7290052338089364000, "line_mean": 29.7804878049, "line_max": 79, "alpha_frac": 0.6283676704, "autogenerated": false, "ratio": 3.5649717514124295, "config_tes...
__author__ = 'Alex Gusev <alex@flancer64.com>' import prxgt.const as const from prxgt.domain.meta.attribute import Attribute as AttributeBase class Attribute(AttributeBase): """ Attribute model contains data. """ def __init__(self, name=None, type_=None, value=None): super(Attribute, self).__...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/domain/attribute.py", "copies": "1", "size": "1049", "license": "mit", "hash": 5439268651677813000, "line_mean": 25.25, "line_max": 75, "alpha_frac": 0.5510009533, "autogenerated": false, "ratio": 3.870848708487085, "config_tes...
__author__ = 'Alex Gusev <alex@flancer64.com>' import unittest import os from mock import Mock from prxgt.config import Config from prxgt.repo.repository import Repository from prxgt.domain.instance import Instance from prxgt.domain.attribute import Attribute ATTR_NAME = "a0" INST_ID = 0 ATTR_TYPE = "som type" ATTR...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/repo/test_repository.py", "copies": "1", "size": "3483", "license": "mit", "hash": 1471161916735666700, "line_mean": 28.7777777778, "line_max": 95, "alpha_frac": 0.6032156187, "autogenerated": false, "ratio": 3.7858695652173915, ...
__author__ = 'Alex Gusev <alex@flancer64.com>' import unittest from prxgt.domain.filter.alias import Alias from prxgt.domain.filter.condition import Condition from prxgt.domain.filter.condition_rule import ConditionRule from prxgt.domain.filter.filter import Filter from prxgt.domain.filter.function import Function fro...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/domain/filter/test_condition_rule.py", "copies": "1", "size": "1902", "license": "mit", "hash": -6450459622406062000, "line_mean": 34.2407407407, "line_max": 95, "alpha_frac": 0.6388012618, "autogenerated": false, "ratio": 3.5418...
__author__ = 'Alex Gusev <alex@flancer64.com>' import unittest import prxgt.const as const from prxgt.repo.generator import Generator class Test(unittest.TestCase): def test_init(self): # tests gene = Generator() self.assertIsNotNone(gene) return def test_get_value(self): ...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/repo/test_generator.py", "copies": "1", "size": "1512", "license": "mit", "hash": 9222583931975565000, "line_mean": 29.26, "line_max": 64, "alpha_frac": 0.6302910053, "autogenerated": false, "ratio": 3.7241379310344827, "config...
__author__ = 'Alex Gusev <alex@flancer64.com>' from prxgt.domain.filter.expression import Expression from prxgt.domain.filter.filter_rule import FilterRule from prxgt.domain.filter.function import Function class FunctionRule(Expression, FilterRule): """ FunctionRule представляет собой функцию с некоторым на...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/domain/filter/function_rule.py", "copies": "1", "size": "1309", "license": "mit", "hash": 2784788847880604000, "line_mean": 25.6222222222, "line_max": 78, "alpha_frac": 0.6135225376, "autogenerated": false, "ratio": 3.12793733681...
__author__ = 'Alex Gusev <alex@flancer64.com>' from prxgt.domain.filter.filter import Filter from prxgt.domain.instance import Instance from prxgt.proc.base import ProcessorBase from prxgt.repo.repository import Repository from prxgt.proc.filtrator import Filtrator class RepoProcessor(ProcessorBase): """ Sim...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/proc/repo.py", "copies": "1", "size": "1573", "license": "mit", "hash": 1691764970543538700, "line_mean": 32.4680851064, "line_max": 78, "alpha_frac": 0.6649713922, "autogenerated": false, "ratio": 3.8935643564356437, "config_t...
__author__ = 'Alex Gusev <alex@flancer64.com>' import random import string import prxgt.const as const TYPE_DEC = const.ATTR_TYPE_DEC TYPE_INT = const.ATTR_TYPE_INT TYPE_STR = const.ATTR_TYPE_STR TYPE_TXT = const.ATTR_TYPE_TXT class Generator(object): """ Values generator for various types data. Прос...
{ "repo_name": "praxigento/teq_test_db_schema_attrs", "path": "prxgt/repo/generator.py", "copies": "1", "size": "1946", "license": "mit", "hash": 4943983617352146000, "line_mean": 23.4782608696, "line_max": 79, "alpha_frac": 0.6477205447, "autogenerated": false, "ratio": 2.5475113122171944, "con...
__author__ = 'alexis.koalla@orange.com' from flask import request from S3.bucket import S3Bucket from Log import Log from subprocess import PIPE, Popen import simplejson as json from model.chunk import Chunk from model.osd import OSD from model.pg import PG from model.S3Object import S3Object import requests import r...
{ "repo_name": "inkscope/inkscope", "path": "inkscopeCtrl/S3ObjectCtrl.py", "copies": "1", "size": "22021", "license": "apache-2.0", "hash": 6564030995216200000, "line_mean": 44.7817047817, "line_max": 251, "alpha_frac": 0.5517914718, "autogenerated": false, "ratio": 3.52392382781245, "config_te...
__author__ = 'Alexis.Koalla@orange.com' import json class PG: #""" Definition de la classe """ def __init__(self,pgid,state,acting, up, acting_primary, up_primary): self.pgid=pgid self.state= state self.up = up self.acting=acting self.acting_primary=acting_primary ...
{ "repo_name": "abrefort/inkscope-debian", "path": "inkscopeCtrl/model/pg.py", "copies": "2", "size": "1030", "license": "apache-2.0", "hash": 8806410706835295000, "line_mean": 24.1219512195, "line_max": 147, "alpha_frac": 0.6038834951, "autogenerated": false, "ratio": 3.388157894736842, "config...
from .cygmm import cy_gmm import numpy as np def gmm(x, n_clusters=10, max_num_iterations=100, covariance_bound=None, init_mode='rand', init_priors=None, init_means=None, init_covars=None, n_repetitions=1, verbose=False): """Fit a Gaussian mixture model Parameters ---------- x : [n_sa...
{ "repo_name": "menpo/cyvlfeat", "path": "cyvlfeat/gmm/gmm.py", "copies": "1", "size": "5190", "license": "bsd-2-clause", "hash": 4039682227487087600, "line_mean": 43.7413793103, "line_max": 80, "alpha_frac": 0.6337186898, "autogenerated": false, "ratio": 3.9709257842387147, "config_test": false...
from .cygmm import cy_gmm import numpy as np def gmm(X, n_clusters=10, max_num_iterations=100, covariance_bound=None, init_mode='rand', init_priors=None, init_means=None, init_covars=None, n_repetitions=1, verbose=False): """Fit a Gaussian mixture model Parameters ---------- X : [n_sa...
{ "repo_name": "simmimourya1/cyvlfeat", "path": "cyvlfeat/gmm/gmm.py", "copies": "1", "size": "5191", "license": "bsd-2-clause", "hash": -7215718410456610000, "line_mean": 43.75, "line_max": 80, "alpha_frac": 0.6337892506, "autogenerated": false, "ratio": 3.971690895179801, "config_test": false,...
import numpy as np from numpy.testing import assert_allclose from nose.tools import raises from cyvlfeat.gmm import gmm np.random.seed(1) X = np.random.randn(1000, 2) X[500:] *= (2, 3) X[500:] += (4, 4) def test_gmm_2_clusters_rand_init(): means, covars, priors, LL, posteriors = gmm(X, n_clusters=2) assert_...
{ "repo_name": "simmimourya1/cyvlfeat", "path": "cyvlfeat/gmm/tests/test_gmm.py", "copies": "1", "size": "1063", "license": "bsd-2-clause", "hash": -4474160106751692300, "line_mean": 29.3714285714, "line_max": 67, "alpha_frac": 0.6208842897, "autogenerated": false, "ratio": 2.513002364066194, "c...
__author__ = 'alexjch' import signal try: import bluetooth as bt except: pass BUFF_SIZE = 1024 def find_device(device_name): discovered = bt.discover_devices() target = [d for d in discovered if bt.lookup_name(d) == device_name] return target.pop() if len(target) else None class BTAgent(object):...
{ "repo_name": "alexjch/car_monitor", "path": "src/CarMonitor/bt_spp_comm.py", "copies": "1", "size": "1174", "license": "mit", "hash": -5435883681817516000, "line_mean": 23.9787234043, "line_max": 72, "alpha_frac": 0.5868824532, "autogenerated": false, "ratio": 3.811688311688312, "config_test":...
__author__ = 'alexjch' import sys import time import signal import argparse from bt_spp_comm import BTAgent as bta, find_device SLEEP_TIME = 5 def arguments_parser(): ap = argparse.ArgumentParser(description="ODBII communication tool") device_id_group = ap.add_mutually_exclusive_group(required=True) devi...
{ "repo_name": "alexjch/car_monitor", "path": "src/CarMonitor/main.py", "copies": "1", "size": "2724", "license": "mit", "hash": -4279480341377723000, "line_mean": 33.05, "line_max": 114, "alpha_frac": 0.6196769457, "autogenerated": false, "ratio": 3.788595271210014, "config_test": false, "has...
__author__ = 'alexjch' import os import sqlite3 CREATE_DB = '''CREATE TABLE telemetry (ID INTEGER PRIMARY KEY AUTOINCREMENT, STREAM TEXT, Timestamp DATETIME DEFAULT CURRENT_TIMESTAMP)''' DB_INSERT = '''INSERT INTO telemetry (STREAM) value...
{ "repo_name": "alexjch/car_monitor", "path": "src/CarMonitor/db.py", "copies": "1", "size": "1131", "license": "mit", "hash": 4809279743270470000, "line_mean": 28.7631578947, "line_max": 87, "alpha_frac": 0.5862068966, "autogenerated": false, "ratio": 3.913494809688581, "config_test": false, ...
import web from web import http import pycurl, random, re, cStringIO, types, urllib import urlparse as _urlparse from lxml import etree from md5 import md5 from datetime import datetime def url_encode(url): return http.urlencode(url) def url_unquote(url): return urllib.unquote_plus(url) def url_parse(url)...
{ "repo_name": "Nitecon/webframe", "path": "webframe/view/helpers/utils.py", "copies": "1", "size": "2775", "license": "apache-2.0", "hash": -3515031585155694600, "line_mean": 26.76, "line_max": 98, "alpha_frac": 0.6299099099, "autogenerated": false, "ratio": 3.2685512367491167, "config_test": f...
# TODO: # - if the module submitted is in quoted HTML then it must unquoted # - bad idea to catch generic exceptions import web, os, sys from app.models import modules from app.helpers import utils from app.helpers import image def submit(module_url, tags=''): success, err_msg = False, '' try: ...
{ "repo_name": "Nitecon/webframe", "path": "models/submission.py", "copies": "4", "size": "3556", "license": "apache-2.0", "hash": -7427854764305517000, "line_mean": 33.1923076923, "line_max": 109, "alpha_frac": 0.6217660292, "autogenerated": false, "ratio": 3.9776286353467563, "config_test": fa...
from config import db from app.helpers import tag_cloud import re, sets def get_tags(module_id): return db.select('tags', vars = dict(id=module_id), what = 'tag', where = 'module_id=$id') def get_tag_cloud(): """Return a tag cloud of most popular modules.""" tags...
{ "repo_name": "minixalpha/SourceLearning", "path": "webpy/sample/googlemodules/src/app/models/tags.py", "copies": "4", "size": "1344", "license": "apache-2.0", "hash": -1345021795168026000, "line_mean": 27.8666666667, "line_max": 69, "alpha_frac": 0.556547619, "autogenerated": false, "ratio": 3.3...
import web from config import db def add(module_id, vote, user_ip): if already_voted(module_id, user_ip): success = True else: success = False if module_id and -5 <= vote <= 5: db.insert('votes', module_id=module_id, vote=vote, ip=user_ip, ...
{ "repo_name": "Nitecon/webframe", "path": "models/votes.py", "copies": "4", "size": "1315", "license": "apache-2.0", "hash": 1158601321032302600, "line_mean": 30.925, "line_max": 84, "alpha_frac": 0.5209125475, "autogenerated": false, "ratio": 3.53494623655914, "config_test": false, "has_no_k...
import web from config import db def get_latest(offset=0, limit=20): has_next = False t = list(db.select('forum_threads', what = 'id, id as idd, title, author, content, datetime_created,\ (select count(id) from forum_threads where reply_to = idd) as no_replies,\ (select max(d...
{ "repo_name": "minixalpha/SourceLearning", "path": "webpy/sample/googlemodules/src/app_forum/models/threads.py", "copies": "3", "size": "1573", "license": "apache-2.0", "hash": -200995408655756960, "line_mean": 26.6, "line_max": 103, "alpha_frac": 0.5715193897, "autogenerated": false, "ratio": 3....
import web from config import db from app.helpers import utils def get_latest(): """Get latest comments on modules.""" return db.select('comments', what = 'content, module_id', order = 'datetime_created desc', limit = 4) def get_comments(module_id): return db.sel...
{ "repo_name": "minixalpha/SourceLearning", "path": "webpy/sample/googlemodules/src/app/models/comments.py", "copies": "4", "size": "1453", "license": "apache-2.0", "hash": 3135923185789532000, "line_mean": 30.2888888889, "line_max": 84, "alpha_frac": 0.5911906401, "autogenerated": false, "ratio":...
# TODO: # - should be made into a class import Image, cStringIO, os def save(fi, filename, min_width=30, min_height=20, max_width=460, max_height=420, max_kb=40): im = get_image_object(fi) width, height = im.size if min_width <= width <= max_width and min_height <= height <= max_height: ...
{ "repo_name": "minixalpha/SourceLearning", "path": "webpy/sample/googlemodules/src/app/helpers/image.py", "copies": "4", "size": "1038", "license": "apache-2.0", "hash": -7869711781367444000, "line_mean": 26.1081081081, "line_max": 94, "alpha_frac": 0.5712909441, "autogenerated": false, "ratio": ...
"""Framework & steps: # 1. Parse XML, retrieve all book titles / authors / Get books from Gutenberg (desc) wget geonames (wget -r -np -k -nd http://download.geonames.org/export/dump/) """ if __name__ == "__main__": from os import chdir from os import walk import logging import psycopg2 # Se...
{ "repo_name": "Bixbeat/gutenberg-place-mentions", "path": "main.py", "copies": "1", "size": "1650", "license": "mit", "hash": -5208668671090769000, "line_mean": 32.6734693878, "line_max": 98, "alpha_frac": 0.6878787879, "autogenerated": false, "ratio": 3.459119496855346, "config_test": false, ...
__author__ = 'Alex Malyshev <malyshevalex@gmail.com>' from collections import MutableSet from .serializers import JsonSerializer DEFAULT_SERIALIZER = JsonSerializer() class StringSet(MutableSet): def __init__(self, *args): self.data = set() for arg in args: self.add(arg) def ad...
{ "repo_name": "malyshevalex/django-stringset", "path": "__init__.py", "copies": "1", "size": "1234", "license": "mit", "hash": -8970118726305730000, "line_mean": 25.2553191489, "line_max": 116, "alpha_frac": 0.5875202593, "autogenerated": false, "ratio": 4.140939597315437, "config_test": false,...
__author__ = 'Alex' from PyQt4.QtGui import * from PyQt4.phonon import Phonon import sys from PyQt4 import uic class Window(QMainWindow): def __init__(self, parent=None): super(Window, self).__init__(parent) #SE CARGA LA VISTA O INTERFAZ GRAFICA uic.loadUi("window.ui",self) #LLAM...
{ "repo_name": "AlexEnriquez/PyQtPlayer", "path": "app.py", "copies": "1", "size": "1540", "license": "bsd-3-clause", "hash": -6670854179914911000, "line_mean": 27, "line_max": 113, "alpha_frac": 0.6181818182, "autogenerated": false, "ratio": 3.484162895927602, "config_test": false, "has_no_ke...
__author__ = 'Alex' from PyQt4.QtGui import * import sys import json import requests,base64 from PyQt4 import uic import threading class Window(QWidget): def __init__(self,parent=None): QWidget.__init__(self) authThread=threading.Thread(target=self.Auth()) uiThread=threading.Thread(target=s...
{ "repo_name": "AlexEnriquez/PyQtMail", "path": "PyQtMail/app.py", "copies": "1", "size": "3071", "license": "mit", "hash": 2534850358112260600, "line_mean": 33.1222222222, "line_max": 138, "alpha_frac": 0.5789645067, "autogenerated": false, "ratio": 3.513729977116705, "config_test": false, "h...
__author__ = 'Alex' from sys import maxsize class Infos: def __init__(self, firstname = None ,middelname = None,lastname = None,nickname = None, title = None,company = None,address = None,home = None,mobile = None, fax= None,homepage = None,day_Birthday= None,month_Birthday= None,year_Bi...
{ "repo_name": "Alex-Chizhov/python_training", "path": "home_works/model/info_contact.py", "copies": "1", "size": "2232", "license": "apache-2.0", "hash": -2943863213501133000, "line_mean": 41.9423076923, "line_max": 225, "alpha_frac": 0.5389784946, "autogenerated": false, "ratio": 3.7014925373134...
__author__ = 'Alex' from sys import maxsize class Infos: def __init__(self, firstname = None ,middelname = None,lastname = None,nickname = None, title = None,company = None,address = None,home = None,mobile = None, fax= None,homepage = None,day_Birthday= None,month_Birthday= None,year_B...
{ "repo_name": "Alex-Chizhov/python_training", "path": "error/home_works/model/info_contact.py", "copies": "1", "size": "1888", "license": "apache-2.0", "hash": 9159035586713218000, "line_mean": 39.1914893617, "line_max": 161, "alpha_frac": 0.5391949153, "autogenerated": false, "ratio": 3.86094069...
_author__ = 'alex' import sys import xml.dom.minidom as dom from floyd import floyd_algs def get_Res_Matrix(length,nodes,nets_d,elem_type): Res = [[[] for j in range(length)] for i in range(length)] for i in range(nodes.length): if nodes[i].nodeType != elem_type: continue name = nodes[i].nodeName if name == "d...
{ "repo_name": "BaydinAlexey/proglangs_baydin", "path": "main.py", "copies": "1", "size": "2159", "license": "mit", "hash": -703794670920265500, "line_mean": 29.4084507042, "line_max": 119, "alpha_frac": 0.6215840667, "autogenerated": false, "ratio": 2.604342581423402, "config_test": false, "h...
__author__ = 'Alex' class Infos: def __init__(self, firstname,middelname,lastname,nickname, title,company,addres,home,mobile, fax,homepage,day_Birthday,month_Birthday,year_Birthday,day_Anniversary, month_Anniversary,year_Anniversary,address2,phone2,notes,work,ph...
{ "repo_name": "Alex-Chizhov/python_training", "path": "home_work_6/model/info_contact.py", "copies": "5", "size": "1267", "license": "apache-2.0", "hash": 5434086529490704000, "line_mean": 37.3939393939, "line_max": 97, "alpha_frac": 0.5272296764, "autogenerated": false, "ratio": 3.92260061919504...
__author__ = 'alex' from cement.core import foundation, controller from SearchManager import SearchManager from InteractionManager import OutputInteraction import time # define an application base controller class FindForMeBasedController(controller.CementBaseController): # Define command line arguments and defa...
{ "repo_name": "masterpiece91/FindForMe", "path": "FindForMe/FindForMe.py", "copies": "1", "size": "4916", "license": "mit", "hash": -5424051461285300000, "line_mean": 35.1544117647, "line_max": 118, "alpha_frac": 0.5374288039, "autogenerated": false, "ratio": 4.5602968460111315, "config_test": ...
__author__ = 'Alex' from datetime import date, timedelta import pyFWI.FWIFunctions as FWI import sqlite3 conn = sqlite3.connect('FWI.db') cur = conn.cursor() start = date(2015, 8, 19) end = date(2015, 8, 22) for i in range(1,(end-start).days+1): yesterday = start + timedelta(days=i-1) today = start + timedel...
{ "repo_name": "parko636/pyfwi", "path": "fwi_batch.py", "copies": "1", "size": "1241", "license": "bsd-3-clause", "hash": -9044822394350220000, "line_mean": 33.5, "line_max": 140, "alpha_frac": 0.5938759065, "autogenerated": false, "ratio": 2.537832310838446, "config_test": false, "has_no_key...
__author__ = 'alex' from gmail import Gmail import datetime import re class EmailHandler(): def __init__(self, username, password ): self.g = Gmail() self.g.login(username, password) def logout(self): self.g.logout() def get_sent_mail(self): return self.g.sent_mail() ...
{ "repo_name": "aparij/EmailGrammar", "path": "email_handler.py", "copies": "1", "size": "1362", "license": "mit", "hash": 6391883427681816000, "line_mean": 29.2666666667, "line_max": 108, "alpha_frac": 0.5007342144, "autogenerated": false, "ratio": 4.242990654205608, "config_test": false, "ha...
__author__ = 'Alex' from lexer import * from ast import * import exception class Parser(object): def __init__(self, tokens): self.tokens = tokens self.position = 0 self.length = len(tokens) def error(self, message, *args): line, col = self.token.line_col raise excepti...
{ "repo_name": "AlexYukikaze/JSONx", "path": "JSONx/parser.py", "copies": "1", "size": "5847", "license": "mit", "hash": -6650881494309548000, "line_mean": 32.0338983051, "line_max": 98, "alpha_frac": 0.5560116299, "autogenerated": false, "ratio": 4.004794520547946, "config_test": false, "has_...
__author__ = 'Alex' from Movement import Movement class BaseCommand: def __init__(self, movement): assert isinstance(movement, Movement) self.name = 'unknown' self.m = movement def execute(selfself):pass class Forward(BaseCommand): def __init__(self, movement): assert isi...
{ "repo_name": "RobotTurtles/mid-level-routines", "path": "Apps/TurtleCommands.py", "copies": "1", "size": "1101", "license": "apache-2.0", "hash": 749848484552750600, "line_mean": 21.9375, "line_max": 45, "alpha_frac": 0.6076294278, "autogenerated": false, "ratio": 3.682274247491639, "config_te...
__author__ = 'alex' import glob import os import itertools import fnmatch import mmap import re import contextlib import InteractionManager from Common import Common from os.path import join, getsize # This object will contain all properties for a result item class ResultController: def __init__(self): s...
{ "repo_name": "masterpiece91/FindForMe", "path": "FindForMe/SearchManager.py", "copies": "1", "size": "21841", "license": "mit", "hash": -26934375619215664, "line_mean": 51.5048076923, "line_max": 121, "alpha_frac": 0.524609679, "autogenerated": false, "ratio": 5.208919627951348, "config_test":...
__author__ = 'Alex' import JSONx.utils as utils import JSONx import os class JSONxLoaderException(Exception): def __init__(self, message, file_path): super(JSONxLoaderException, self).__init__(message) self.message = message self.file = file_path class JSONxLoader(object): def __in...
{ "repo_name": "AlexYukikaze/JSONx", "path": "JSONxLoader/loader.py", "copies": "1", "size": "3574", "license": "mit", "hash": -2078804446673174800, "line_mean": 33.0380952381, "line_max": 119, "alpha_frac": 0.5540011192, "autogenerated": false, "ratio": 3.6845360824742266, "config_test": true, ...
__author__ = 'alex' import os import subprocess from colorama import Style, init, Back, Fore from Common import Common class OutputInteraction: def __init__(self): self.common_tools = Common() def request_result_item(self, search_directory, result_dictionary, input_message): message_tool = N...
{ "repo_name": "masterpiece91/FindForMe", "path": "FindForMe/InteractionManager.py", "copies": "1", "size": "4029", "license": "mit", "hash": -7291795230444833000, "line_mean": 50, "line_max": 120, "alpha_frac": 0.5395879871, "autogenerated": false, "ratio": 4.9496314496314495, "config_test": fa...
__author__ = 'alex' import requests from collections import Counter from lxml import objectify from xml.etree import ElementTree class Error: """ AtD Error Object These are to be returned in a list by checkText() Available properties are: string, description, precontext, type, url and suggestions. ...
{ "repo_name": "aparij/EmailGrammar", "path": "atd_processing.py", "copies": "1", "size": "2191", "license": "mit", "hash": 2498054354055019500, "line_mean": 29.8591549296, "line_max": 79, "alpha_frac": 0.5960748517, "autogenerated": false, "ratio": 3.7452991452991453, "config_test": false, "h...
__author__ = 'alex' import requests from lxml import objectify class GrammarChecker(): USELESS_RULES = ["WHITESPACE_RULE", "EN_UNPAIRED_BRACKETS", "EN_QUOTES", 'COMMA_PARENTHESIS_WHITESPACE'] USELESS_CATEGORY = ["Capitalization"] def __init__(self, url, lang='en-US'): self.url = url self...
{ "repo_name": "aparij/EmailGrammar", "path": "check_grammar.py", "copies": "1", "size": "1311", "license": "mit", "hash": 7479280391510994000, "line_mean": 35.4166666667, "line_max": 123, "alpha_frac": 0.5751334859, "autogenerated": false, "ratio": 3.8558823529411765, "config_test": false, "h...
__author__ = 'alex' import requests from .market import Market from private_markets import cryptsy class Cryptsy(Market): def __init__(self): super(Cryptsy, self).__init__() self.update_rate = 60 self.fees = {"buy": {"fee": 0.002, "coin": "s_coin"}, "sell": {"fee": 0.003, "coin": "s_coin"...
{ "repo_name": "acontry/altcoin-arbitrage", "path": "arbitrage/public_markets/cryptsy.py", "copies": "1", "size": "1609", "license": "mit", "hash": -6515328082566921000, "line_mean": 37.3095238095, "line_max": 103, "alpha_frac": 0.5599751398, "autogenerated": false, "ratio": 3.5755555555555554, ...
__author__ = 'alex' import requests from .market import Market class Vircurex(Market): def __init__(self): super(Vircurex, self).__init__() self.update_rate = 60 self.update_prices() # self.triangular_arbitrage() def update_depth(self): url = 'https://api.vircurex.com/...
{ "repo_name": "acontry/altcoin-arbitrage", "path": "arbitrage/public_markets/vircurex.py", "copies": "1", "size": "1456", "license": "mit", "hash": -9162045229499139000, "line_mean": 31.3555555556, "line_max": 74, "alpha_frac": 0.5350274725, "autogenerated": false, "ratio": 3.3781902552204177, ...
__author__ = 'Alex' # noinspection PyMethodMayBeStatic class JSONxVisitor(object): def visit(self, node): method_name = 'visit_' + node.__class__.__name__ method = getattr(self, method_name, self.visit_generic) return method(node) def visit_generic(self, node): raise RuntimeEr...
{ "repo_name": "AlexYukikaze/JSONx", "path": "JSONx/ast.py", "copies": "1", "size": "3242", "license": "mit", "hash": 247735780426796380, "line_mean": 24.5275590551, "line_max": 75, "alpha_frac": 0.578038248, "autogenerated": false, "ratio": 3.8321513002364065, "config_test": false, "has_no_ke...
__author__ = 'alex' # This function is terrible don't use it def triangular_arbitrage(self): self.prices.pop('current', None) self.prices.pop('last_updated', None) for pair1 in self.prices: pair1_name = pair1 if pair1_name[1] != 'BTC': continue for pair2 in self.prices...
{ "repo_name": "acontry/altcoin-arbitrage", "path": "arbitrage/observers/triangulartraderbot.py", "copies": "1", "size": "2230", "license": "mit", "hash": 697730117431501400, "line_mean": 42.7450980392, "line_max": 110, "alpha_frac": 0.4502242152, "autogenerated": false, "ratio": 3.741610738255033...
__author__ = 'alex parij' import requests import simplejson as json class API(object): def __init__(self, base_url=None, api_key=None, cid=None, minor_rev=None, locale='en_US', currency_code='USD'): self._base_url = base_url self._store = { "apiKey": api_key, "cid": ci...
{ "repo_name": "aparij/eanapi", "path": "eanapi/api.py", "copies": "1", "size": "4328", "license": "mit", "hash": -4297231479979952600, "line_mean": 26.7435897436, "line_max": 115, "alpha_frac": 0.530961183, "autogenerated": false, "ratio": 3.67402376910017, "config_test": false, "has_no_keywo...
__author__ = 'Alex Parkinson, Matt van Breugel' global version version = 'v0.1' import urllib2 from lxml import html from datetime import datetime, date, timedelta import pytz import pyFWI.FWIFunctions as FWI import sqlite3 def is_dst(zonename): """ Description ----------- Hmm... ...
{ "repo_name": "parko636/pyfwi", "path": "bomScrape.py", "copies": "1", "size": "3734", "license": "bsd-3-clause", "hash": -3095798737715038700, "line_mean": 38.7340425532, "line_max": 164, "alpha_frac": 0.5747188002, "autogenerated": false, "ratio": 3.0961857379767825, "config_test": false, "...
__author__ = 'Alex P' from google.appengine.ext import ndb class user(ndb.Model): uniqueGivenID = ndb.StringProperty() #good for checking isCurrentUser. nickname = ndb.StringProperty() picture = ndb.BlobKeyProperty() pictureURL = ndb.StringProperty() numSlogans = ndb.IntegerProperty() email = ...
{ "repo_name": "petestreet/raygun-app-backend", "path": "models.py", "copies": "1", "size": "1735", "license": "mit", "hash": -3978981187050640400, "line_mean": 41.3414634146, "line_max": 115, "alpha_frac": 0.734870317, "autogenerated": false, "ratio": 3.6914893617021276, "config_test": false, ...
__author__ = 'Alex P' import os import logging import webapp2 import models import jinja2 template_path = os.path.join(os.path.dirname(__file__)) jinja2_env = jinja2.Environment( loader=jinja2.FileSystemLoader(template_path), autoescape=True ) #a helper class class Handler(webapp2.RequestHandler): def...
{ "repo_name": "petestreet/raygun-app-backend", "path": "frontsite.py", "copies": "1", "size": "1516", "license": "mit", "hash": -2402039631711540000, "line_mean": 26.0892857143, "line_max": 82, "alpha_frac": 0.6965699208, "autogenerated": false, "ratio": 3.429864253393665, "config_test": false,...
__author__ = 'alexrdz' import unicodecsv, csv import xlrd import datetime from models import MonederoUser from models import PreAccountStatement from StatementProcessor import StatementProcessor def parse(xlsfile, name_of_sheet): """ :param xlsfile: Excel file to be read :param name_of_sheet: Name of...
{ "repo_name": "EnriqueRE/Estado-de-Cuenta", "path": "Transaction Uploader/UserList.py", "copies": "1", "size": "4232", "license": "apache-2.0", "hash": 1684654630050975500, "line_mean": 28.3888888889, "line_max": 97, "alpha_frac": 0.6368147448, "autogenerated": false, "ratio": 3.7551020408163267,...
from natto import MeCab # 31 + 32 with open("verbs.txt", "w+"): pass text = open("neko.txt","r+") res_file = open("verbs.txt", "a+") reader = text.readlines() for line in reader: with MeCab('-F%f[0],%f[6]') as nm: for n in nm.parse(line, as_nodes=True): if not n.is_eos() and n.is_nor(...
{ "repo_name": "yasutaka/nlp_100", "path": "alex/31-33.py", "copies": "1", "size": "1258", "license": "mit", "hash": 8824542614189609000, "line_mean": 27.3170731707, "line_max": 66, "alpha_frac": 0.46921797, "autogenerated": false, "ratio": 2.6770601336302895, "config_test": false, "has_no_key...
__author__ = 'Alex Rogozhnikov' import functools from ..einops import TransformRecipe, _prepare_transformation_recipe from .. import EinopsError class RearrangeMixin: """ Rearrange layer behaves identically to einops.rearrange operation. :param pattern: str, rearrangement pattern :param axes_length...
{ "repo_name": "arogozhnikov/einops", "path": "einops/layers/__init__.py", "copies": "1", "size": "2689", "license": "mit", "hash": 3885976044842920400, "line_mean": 34.3815789474, "line_max": 120, "alpha_frac": 0.6355522499, "autogenerated": false, "ratio": 3.9955423476968797, "config_test": fa...