text
stringlengths
0
1.05M
meta
dict
'''Barst Measurement Computing DAQ Wrapper ========================================== ''' from functools import partial from pybarst.mcdaq import MCDAQChannel from kivy.properties import NumericProperty, ObjectProperty from moa.threads import ScheduledEventLoop from moa.device.digital import ButtonViewPort from cplco...
{ "repo_name": "matham/cplcom", "path": "cplcom/moa/device/mcdaq.py", "copies": "1", "size": "5220", "license": "mit", "hash": -8178048931565285000, "line_mean": 34.2702702703, "line_max": 79, "alpha_frac": 0.6136015326, "autogenerated": false, "ratio": 3.945578231292517, "config_test": false, ...
'''Barst RTV Wrapper ======================= ''' from pybarst.rtv import RTVChannel from kivy.properties import ( StringProperty, ObjectProperty, NumericProperty, BooleanProperty, OptionProperty) from ffpyplayer.pic import Image from moa.device import Device from moa.threads import ScheduledEventLoop from cp...
{ "repo_name": "matham/cplcom", "path": "cplcom/moa/device/rtv.py", "copies": "1", "size": "4825", "license": "mit", "hash": -3988744672650233000, "line_mean": 31.5945945946, "line_max": 79, "alpha_frac": 0.6136787565, "autogenerated": false, "ratio": 3.429282160625444, "config_test": false, "...
'''Barst Serial AALBORG MFC Wrapper ====================================== ''' import re from kivy.properties import ObjectProperty, StringProperty, NumericProperty from pybarst.serial import SerialChannel from moa.threads import ScheduledEventLoop from moa.device.analog import NumericPropertyViewChannel from cplcom...
{ "repo_name": "matham/cplcom", "path": "cplcom/moa/device/mfc.py", "copies": "1", "size": "4606", "license": "mit", "hash": 8288986129706888000, "line_mean": 32.1366906475, "line_max": 79, "alpha_frac": 0.5753365176, "autogenerated": false, "ratio": 3.4093264248704664, "config_test": false, "...
'''Barst Server Wrapper ======================= ''' import time import re from pybarst.core.server import BarstServer from moa.threads import ScheduledEventLoop from moa.device import Device from cplcom.moa.device import DeviceExceptionBehavior from kivy.properties import BooleanProperty, StringProperty, ObjectPrope...
{ "repo_name": "matham/cplcom", "path": "cplcom/moa/device/barst_server.py", "copies": "1", "size": "3167", "license": "mit", "hash": -3899403373601090600, "line_mean": 31.6494845361, "line_max": 79, "alpha_frac": 0.6116198295, "autogenerated": false, "ratio": 4.102331606217617, "config_test": f...
"""Bartlett's transmission chain experiment from Remembering (1932).""" import logging from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from dall...
{ "repo_name": "Dallinger/Dallinger", "path": "demos/dlgr/demos/bartlett1932/experiment.py", "copies": "1", "size": "3877", "license": "mit", "hash": 1939744328602661000, "line_mean": 32.7130434783, "line_max": 81, "alpha_frac": 0.6187774052, "autogenerated": false, "ratio": 4.24644030668127, "c...
"""Bartlett's trasmission chain experiment from Remembering (1932).""" from dallinger.networks import Chain from dallinger.experiment import Experiment class IteratedDrawing(Experiment): """Define the structure of the experiment.""" def __init__(self, session=None): """Call the same function in the ...
{ "repo_name": "Dallinger/Dallinger", "path": "demos/dlgr/demos/iterated_drawing/experiment.py", "copies": "1", "size": "1835", "license": "mit", "hash": 38498156553450870, "line_mean": 31.1929824561, "line_max": 81, "alpha_frac": 0.6217983651, "autogenerated": false, "ratio": 4.327830188679245, ...
"""Bartlett's trasmission chain experiment from Remembering (1932).""" from dallinger.networks import Empty from dallinger.experiment import Experiment from dallinger.models import Info from jinja2 import TemplateNotFound from flask import ( abort, Blueprint, jsonify, render_template ) import json cl...
{ "repo_name": "jcpeterson/Dallinger", "path": "demos/dlgr/demos/sheep_market/experiment.py", "copies": "1", "size": "1418", "license": "mit", "hash": -6772065373295624000, "line_mean": 23.8771929825, "line_max": 81, "alpha_frac": 0.6565585331, "autogenerated": false, "ratio": 3.9943661971830986, ...
"""Bartlett's trasmission chain experiment from Remembering (1932).""" from wallace.networks import Chain from wallace.nodes import Source from wallace.experiments import Experiment import random class Bartlett1932(Experiment): """Define the structure of the experiment.""" def __init__(self, session): ...
{ "repo_name": "berkeley-cocosci/Wallace", "path": "examples/bartlett1932/experiment.py", "copies": "2", "size": "2419", "license": "mit", "hash": -314221303459080450, "line_mean": 30.0128205128, "line_max": 79, "alpha_frac": 0.5886730054, "autogenerated": false, "ratio": 4.01827242524917, "conf...
# Bar version ### TO FIX: import Tkinter as tk import modularui as m import time import csv # Button actions num = 2 def countdown(): global num countervar.set("Wait " + str(num) + " more seconds.") num -= 1 if num >= 0: root.after(1000, countdown) else: num = 2 set_label() countervar.set("") def s...
{ "repo_name": "jasongtz/RataTAT-Tkinter", "path": "RataTAT/rfproom.py", "copies": "2", "size": "4570", "license": "mit", "hash": -5490328506596071000, "line_mean": 23.0526315789, "line_max": 85, "alpha_frac": 0.6525164114, "autogenerated": false, "ratio": 2.776427703523694, "config_test": false...
## Basado en: http://pytorch.org/tutorials/beginner/nlp/sequence_models_tutorial.html import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np def read_file(filename): sentence,tags,sentences = [],[],[] for line in open...
{ "repo_name": "josdaza/deep-toolbox", "path": "PyTorch/LSTM_Char_Tagger.py", "copies": "1", "size": "10871", "license": "mit", "hash": -3969389968241127400, "line_mean": 40.3346007605, "line_max": 127, "alpha_frac": 0.6226658081, "autogenerated": false, "ratio": 3.2675082657048393, "config_test...
# Basado en: http://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html # RNN_Char_NameClassifier: Codifica (ENCODES) los nombres en vectores de char_embeddings asociados a su clase # Luego evalua la red probando con nombres y rectificando que la red prediga la clase correcta # (verifica que la re...
{ "repo_name": "josdaza/deep-toolbox", "path": "PyTorch/RNN_Encoder.py", "copies": "1", "size": "7844", "license": "mit", "hash": -6014779863968233000, "line_mean": 34.7899543379, "line_max": 139, "alpha_frac": 0.6652207196, "autogenerated": false, "ratio": 3.398959236773634, "config_test": fals...
# Basado en: http://www.marekrei.com/blog/theano-tutorial/ import numpy as np import theano import theano.tensor as T # Parametros de la Red x = T.fvector('x') target = T.fscalar('target') learning_rate = 0.1 W = theano.shared(np.asarray([0.2, 0.7]), 'W') y = (x * W).sum() # El costo se calcula con el Mean Square E...
{ "repo_name": "josdaza/deep-toolbox", "path": "Theano/1_min_training.py", "copies": "1", "size": "1670", "license": "mit", "hash": 5181268037263239000, "line_mean": 37.8372093023, "line_max": 104, "alpha_frac": 0.6688622754, "autogenerated": false, "ratio": 2.7926421404682276, "config_test": fa...
"""Basal Area correction factor estimators""" # TODO: validate that none of the variables taken from kwargs are missing import logging import numpy as np from pygypsy.basal_area_simulate import ( sim_basal_area_aw, sim_basal_area_sw, sim_basal_area_sb, sim_basal_area_pl, ) LOGGER = logging.getLogger(...
{ "repo_name": "tesera/pygypsy", "path": "pygypsy/basal_area_factor.py", "copies": "1", "size": "12607", "license": "mit", "hash": 3659881498887658000, "line_mean": 39.6677419355, "line_max": 93, "alpha_frac": 0.5743634489, "autogenerated": false, "ratio": 3.6383838383838385, "config_test": fals...
"""Basal Area Simulation""" #pylint: disable=no-member # these functions can be improved because the increment is not # autoregressive, so we can calculate it as a vector operation using # the other arrays then the actual values are just the cumulative sums # TODO: change initial age to data age # TODO: change present...
{ "repo_name": "tesera/pygypsy", "path": "pygypsy/basal_area_simulate.py", "copies": "1", "size": "18052", "license": "mit", "hash": 1710593007302475300, "line_mean": 49.9943502825, "line_max": 153, "alpha_frac": 0.5901839131, "autogenerated": false, "ratio": 4.1308924485125855, "config_test": f...
"""Base 1.0.0 CTFd database Revision ID: cb3cfcc47e2f Revises: Create Date: 2017-01-17 15:39:42.804290 """ from CTFd import create_app from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cb3cfcc47e2f' down_revision = None branch_labels = None depends_on = None def u...
{ "repo_name": "gibsonnathan/CTFd", "path": "migrations/versions/cb3cfcc47e2f_base.py", "copies": "2", "size": "6956", "license": "apache-2.0", "hash": -879346906969039200, "line_mean": 38.9770114943, "line_max": 72, "alpha_frac": 0.6065267395, "autogenerated": false, "ratio": 3.6629805160610847, ...
# base11172.py import itertools from enum import IntEnum from collections import deque # import numpy as np # BASE = 11172 # dt = np.dtype('i2') class Sign(IntEnum): Positive = 1 Zero = 0 Negative = -1 class Base11172: BASE = 11172 @classmethod def base(cls, base): cls.BASE = base ...
{ "repo_name": "pueue/base11172", "path": "base11172.py", "copies": "1", "size": "13530", "license": "mit", "hash": 25810533837342570, "line_mean": 28.8017621145, "line_max": 103, "alpha_frac": 0.4906134516, "autogenerated": false, "ratio": 3.768802228412256, "config_test": false, "has_no_keyw...
BASE2 = "01" BASE10 = "0123456789" BASE16 = "0123456789ABCDEF" BASE62 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz" def baseconvert(number,fromdigits,todigits): """ converts a "number" between two bases of arbitrary digits The input number is assumed to be a string of digits from the ...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/111286_Numeric_base_converter_that_accepts_arbitrary/recipe-111286.py", "copies": "1", "size": "1976", "license": "mit", "hash": 4300269756022509600, "line_mean": 25.3466666667, "line_max": 82, "alpha_frac": 0.6437246964, "autogenerated": fa...
BASE36_ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' BASE32_ALPHABET = '0123456789ABCDEFGHJKMNPQRSTVWXYZ' def _encode(number, alphabet): if number == 0: return alphabet[0] base = len(alphabet) rv = [] inverse = False if number < 0: number = -number inverse = True ...
{ "repo_name": "mitsuhiko/sentry", "path": "src/sentry/utils/numbers.py", "copies": "1", "size": "1171", "license": "bsd-3-clause", "hash": 5102563639884187000, "line_mean": 17.8870967742, "line_max": 56, "alpha_frac": 0.5815542272, "autogenerated": false, "ratio": 3.454277286135693, "config_tes...
""" base58 encoding / decoding functions """ import unittest import hashlib import ctypes import ctypes.util import sys import binascii alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' base_count = len(alphabet) ''' Example: >>> import base58Encoder >>> base58Encoder.encode...
{ "repo_name": "negedzuregal/Base58Encoder", "path": "base58Encoder.py", "copies": "1", "size": "3870", "license": "mit", "hash": -5747340220206331000, "line_mean": 24.9798657718, "line_max": 122, "alpha_frac": 0.634625323, "autogenerated": false, "ratio": 3.359375, "config_test": true, "has_n...
"""Base58 encoding Copy from: https://github.com/keis/base58 Implementations of Base58 and Base58Check endcodings that are compatible with the bitcoin network. """ # This module is based upon base58 snippets found scattered over many bitcoin # tools written in python. From what I gather the original source is from a...
{ "repo_name": "StellarCN/py-stellar-base", "path": "stellar_sdk/vendor/base58.py", "copies": "1", "size": "3521", "license": "apache-2.0", "hash": 8293317327865380000, "line_mean": 22.0130718954, "line_max": 86, "alpha_frac": 0.617722238, "autogenerated": false, "ratio": 3.4587426326129664, "co...
'''Base58 encoding Implementations of Base58 and Base58Check encodings that are compatible with the bitcoin network. ''' # This module is based upon base58 snippets found scattered over many bitcoin # tools written in python. From what I gather the original source is from a # forum post by Gavin Andresen, so direct y...
{ "repo_name": "keis/base58", "path": "base58/__init__.py", "copies": "1", "size": "4068", "license": "mit", "hash": 2123992798098233300, "line_mean": 24.5849056604, "line_max": 79, "alpha_frac": 0.6307767945, "autogenerated": false, "ratio": 3.2965964343598055, "config_test": false, "has_no_k...
'''Base58 encoding Implementations of Base58 and Base58Check endcodings that are compatible with the bitcoin network. ''' from hashlib import sha256 # 58 character alphabet used alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' iseq = lambda s: s bseq = bytes buffer = lambda s: s.buffer def b...
{ "repo_name": "backpacker69/pypeerassets", "path": "pypeerassets/base58.py", "copies": "1", "size": "1780", "license": "bsd-3-clause", "hash": 5952417292899389000, "line_mean": 20.975308642, "line_max": 72, "alpha_frac": 0.5876404494, "autogenerated": false, "ratio": 3.4429400386847195, "config...
'''Base58 encoding Implementations of Base58 and Base58Check endcodings that are compatible with the bitcoin network. ''' # This module is based upon base58 snippets found scattered over many bitcoin # tools written in python. From what I gather the original source is from a # forum post by Gavin Andresen, so direct ...
{ "repo_name": "mnahm5/django-estore", "path": "Lib/site-packages/base58.py", "copies": "3", "size": "3201", "license": "mit", "hash": -184548249716041060, "line_mean": 22.0287769784, "line_max": 78, "alpha_frac": 0.5929397063, "autogenerated": false, "ratio": 3.5448504983388704, "config_test": ...
# base58.py # Original source: git://github.com/joric/brutus.git # which was forked from git://github.com/samrushing/caesure.git # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import absolute_import, divisio...
{ "repo_name": "obulpathi/bitcoinpy", "path": "bitcoinpy/lib/base58.py", "copies": "1", "size": "2874", "license": "mit", "hash": -3871590209299115500, "line_mean": 26.1132075472, "line_max": 105, "alpha_frac": 0.6078636047, "autogenerated": false, "ratio": 3.3811764705882354, "config_test": fal...
"""Base64 plugin for Babbage. Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by app...
{ "repo_name": "tomscript/babbage", "path": "backend/plugins/base_64.py", "copies": "1", "size": "2950", "license": "apache-2.0", "hash": -5237625938461638000, "line_mean": 27.640776699, "line_max": 82, "alpha_frac": 0.6922033898, "autogenerated": false, "ratio": 3.922872340425532, "config_test"...
BASE = 9 BLOCK_HEIGHT = 3 BLOCK_WIDTH = 3 field = [ [1, 2, 3, 4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 9, 1, 2, 3], [7, 8, 9, 1, 2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 7, 8, 9, 1], [5, 6, 7, 8, 9, 1, 2, 3, 4], [8, 9, 1, 2, 3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 8, 9, 1, 2], [6, 7, 8, 9, 1, 2, 3, 4, 5], [9, 1, 2, 3, 4, 5, 6, 7, 8] ] def ...
{ "repo_name": "dgelessus/pythonista-scripts", "path": "BaseNSudoku.py", "copies": "1", "size": "8747", "license": "mit", "hash": 3730677954531984000, "line_mean": 39.3087557604, "line_max": 143, "alpha_frac": 0.4462101292, "autogenerated": false, "ratio": 4.319506172839506, "config_test": false...
"""Base actions for the players to take.""" from csrv.model.actions import action from csrv.model import appropriations from csrv.model import cost from csrv.model import errors from csrv.model import events from csrv.model import game_object from csrv.model import parameters from csrv.model.cards import card_info c...
{ "repo_name": "mrroach/CentralServer", "path": "csrv/model/actions/install_program.py", "copies": "1", "size": "1919", "license": "apache-2.0", "hash": 5248488296807453000, "line_mean": 35.2075471698, "line_max": 80, "alpha_frac": 0.7144346014, "autogenerated": false, "ratio": 3.740740740740741, ...
"""Base actions for the players to take.""" from csrv.model.actions import action from csrv.model import cost from csrv.model import errors from csrv.model import events from csrv.model import game_object from csrv.model import modifiers from csrv.model import parameters class StealAgenda(action.Action): DESCRIPT...
{ "repo_name": "mrroach/CentralServer", "path": "csrv/model/actions/steal_agenda.py", "copies": "1", "size": "1115", "license": "apache-2.0", "hash": 2719068467191657500, "line_mean": 28.3421052632, "line_max": 80, "alpha_frac": 0.7237668161, "autogenerated": false, "ratio": 3.318452380952381, "...
"""Base actions for the players to take.""" from csrv.model import cost from csrv.model import errors from csrv.model import events from csrv.model import game_object from csrv.model import parameters class Action(game_object.PlayerObject): COST_CLASS = cost.NullCost REQUEST_CLASS = parameters.NullRequest DESC...
{ "repo_name": "mrroach/CentralServer", "path": "csrv/model/actions/action.py", "copies": "1", "size": "1130", "license": "apache-2.0", "hash": -7533253262944908000, "line_mean": 24.1111111111, "line_max": 80, "alpha_frac": 0.703539823, "autogenerated": false, "ratio": 3.5646687697160884, "confi...
"""Base ActivityProvider class""" class ActivityProvider(object): """ Base class for activity providers (networks that provide social activity) """ def get_activity(self): """Returns a list of ActivityInfo objects representing the provider's activity""" raise NotImplementedError d...
{ "repo_name": "intuinno/vistalk", "path": "activitysync/providers/__init__.py", "copies": "1", "size": "1289", "license": "mit", "hash": -7013234620204202000, "line_mean": 32.9210526316, "line_max": 120, "alpha_frac": 0.6578743212, "autogenerated": false, "ratio": 4.957692307692308, "config_tes...
"""Base admin models.""" from django.db import models from django.utils import timezone from modoboa.lib.permissions import ( grant_access_to_object, ungrant_access_to_object ) class AdminObject(models.Model): """Abstract model to support dates. Inherit from this model to automatically add the "dates" ...
{ "repo_name": "carragom/modoboa", "path": "modoboa/admin/models/base.py", "copies": "1", "size": "1161", "license": "isc", "hash": 1109066344567271800, "line_mean": 26, "line_max": 68, "alpha_frac": 0.6589147287, "autogenerated": false, "ratio": 4.045296167247387, "config_test": false, "has_n...
"""Base admin models.""" from __future__ import unicode_literals from django.db import models from django.utils import timezone from modoboa.lib.permissions import ( grant_access_to_object, ungrant_access_to_object ) class AdminObject(models.Model): """Abstract model to support dates. Inherit from thi...
{ "repo_name": "bearstech/modoboa", "path": "modoboa/admin/models/base.py", "copies": "1", "size": "1635", "license": "isc", "hash": 3581070642628328400, "line_mean": 27.6842105263, "line_max": 75, "alpha_frac": 0.6422018349, "autogenerated": false, "ratio": 4.037037037037037, "config_test": fal...
# Base agent for Azure CITest scenario # pylint: disable=W0311 """Adapts citest CliAgent to interact with Microsoft Azure using AZ 2.0 CLI""" # Python modules import logging # CITest Modules import citest.service_testing.cli_agent as cli_agent class AzAgent(cli_agent.CliAgent): """ The Agent that uses az 2.0 cl...
{ "repo_name": "google/citest", "path": "citest/azure_testing/az_agent.py", "copies": "1", "size": "1108", "license": "apache-2.0", "hash": -2639161078581782500, "line_mean": 29.7777777778, "line_max": 78, "alpha_frac": 0.6714801444, "autogenerated": false, "ratio": 3.705685618729097, "config_te...
""" Base analysis class for analysing DOS and BLOCHSF data """ import os import sys import inspect import math import time from operator import itemgetter from scipy import integrate from scipy.optimize import curve_fit # Add extra libraries' directories to import list baseLibDir = os.path.join(os.path.realpath(os.pat...
{ "repo_name": "nelsyeung/half-metals-analysis", "path": "lib/analysis.py", "copies": "1", "size": "16103", "license": "mit", "hash": 2277914134484057300, "line_mean": 37.4319809069, "line_max": 79, "alpha_frac": 0.5376016891, "autogenerated": false, "ratio": 3.882111861137898, "config_test": fa...
"""Base and fundamental classes used all over the library. Besides classes, several constants are defined here. We designed python-openflow in a manner to make it easy to create new messages and OpenFlow structs. You can realize that when you see a message class definition. A **struct** here is a group of basic attri...
{ "repo_name": "kytos/python-openflow", "path": "pyof/foundation/base.py", "copies": "1", "size": "32654", "license": "mit", "hash": -2475044292655666700, "line_mean": 34.111827957, "line_max": 79, "alpha_frac": 0.5858700312, "autogenerated": false, "ratio": 4.528359450838996, "config_test": fal...
"""Base and mixin classes for nearest neighbors""" # Authors: Jake Vanderplas <vanderplas@astro.washington.edu> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl> # Multi-output...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/scikit-learn-master/sklearn/neighbors/base.py", "copies": "1", "size": "30597", "license": "mit", "hash": -8438701877993874000, "line_mean": 37.3902132999, "line_max": 79, "alpha_frac": 0.5383861163, "autogenerated": false, "ratio": 4....
# base annotation policy for specialization from rpython.annotator.specialize import default_specialize as default from rpython.annotator.specialize import ( specialize_argvalue, specialize_argtype, specialize_arglistitemtype, specialize_arg_or_var, memo, specialize_call_location) from rpython.flowspace.operati...
{ "repo_name": "oblique-labs/pyVM", "path": "rpython/annotator/policy.py", "copies": "1", "size": "4296", "license": "mit", "hash": -6551360259409762000, "line_mean": 41.96, "line_max": 93, "alpha_frac": 0.6131284916, "autogenerated": false, "ratio": 4.126801152737752, "config_test": false, "h...
"""Base API for Lasco.""" from datetime import datetime import logging import os.path from sqlalchemy.orm import join as orm_join from lasco.ext import exif from lasco.models import Album from lasco.models import AlbumViewer from lasco.models import Gallery from lasco.models import GalleryAdministrator from lasco.mo...
{ "repo_name": "dbaty/Lasco", "path": "lasco/api.py", "copies": "1", "size": "7234", "license": "bsd-3-clause", "hash": -2627317214950731000, "line_mean": 34.8118811881, "line_max": 74, "alpha_frac": 0.6101741775, "autogenerated": false, "ratio": 3.5374083129584353, "config_test": false, "has_...
BASE_API = "https://api.linkedin.com/v1/" """ Profile resources Documentation: http://developer.linkedin.com/documents/profile-api """ PROFILE = BASE_API + "people" """ Groups resources Documentation: http://developer.linkedin.com/documents/groups """ GROUP_MEMBERSHIPS = BASE_API + "people/~/group-memberships:(grou...
{ "repo_name": "kylemcc/pylinkedin", "path": "pylinkedin/endpoints.py", "copies": "1", "size": "1389", "license": "mit", "hash": 3147492573393209000, "line_mean": 46.9310344828, "line_max": 324, "alpha_frac": 0.7609791217, "autogenerated": false, "ratio": 3.171232876712329, "config_test": false,...
"""Base API Module.""" from __future__ import absolute_import import logging from concurrent.futures import ThreadPoolExecutor import requests from . import meta from .accounts import Account from .market import Market from .orders import Orders from .quotes import Quotes from .receive import Receive from .utils imp...
{ "repo_name": "grantstephens/pyluno", "path": "pyluno/api.py", "copies": "1", "size": "5211", "license": "mit", "hash": 8431387014772854000, "line_mean": 36.2214285714, "line_max": 76, "alpha_frac": 0.6140855882, "autogenerated": false, "ratio": 4.011547344110855, "config_test": false, "has_n...
"""Base API resource.""" from __future__ import absolute_import import collections import logging import math import re from apispec import utils from flask import request, current_app, abort, Response from flask._compat import with_metaclass from flask.json import dumps from flask.views import View from . import A...
{ "repo_name": "klen/flask-restler", "path": "flask_restler/resource.py", "copies": "1", "size": "14660", "license": "mit", "hash": -7363736981795281000, "line_mean": 32.856812933, "line_max": 99, "alpha_frac": 0.562005457, "autogenerated": false, "ratio": 4.204186980212217, "config_test": false...
"""Base apollo client """ import json import logging import requests try: from shlex import quote except ImportError: from pipes import quote log = logging.getLogger() class Client(object): """ Base client class implementing methods to make requests to the server """ CLIENT_BASE = '/' de...
{ "repo_name": "erasche/python-apollo", "path": "apollo/client.py", "copies": "1", "size": "3325", "license": "mit", "hash": -9194137594868901000, "line_mean": 31.9207920792, "line_max": 110, "alpha_frac": 0.5398496241, "autogenerated": false, "ratio": 4.251918158567775, "config_test": false, ...
"""Base application database model class. Provides the base for application models. Defines the base required fields. Defines the base required functions of application object classes to be synced. Usage: See app_model.py License: The MIT License (MIT), see LICENSE.txt for more details. Copyright: Copyr...
{ "repo_name": "gavingc/TuckerSync", "path": "base_model.py", "copies": "1", "size": "2094", "license": "mit", "hash": -4237607981918108700, "line_mean": 25.8461538462, "line_max": 79, "alpha_frac": 0.5463228271, "autogenerated": false, "ratio": 4.073929961089494, "config_test": false, "has_no...
"Base app" import urllib import datetime from flask import Blueprint, after_this_request, request, redirect, current_app base = Blueprint("base", __name__) @base.before_app_request def detect_user_locale(): request_args = request.args.to_dict() locale = request_args.pop("locale", None) if locale is not ...
{ "repo_name": "ministryofjustice/cla_public", "path": "cla_public/apps/base/__init__.py", "copies": "1", "size": "1057", "license": "mit", "hash": -4634351275354178000, "line_mean": 31.0303030303, "line_max": 79, "alpha_frac": 0.6490066225, "autogenerated": false, "ratio": 4.049808429118774, "c...
""" Base association measure estimators. """ from numpy import mean, prod, triu, ones, dot, sum, maximum, all from scipy.special import binom from ite.cost.x_initialization import InitX from ite.cost.x_verification import VerOneDSubspaces, VerCompSubspaceDims from ite.shared import copula_transformation class BASpe...
{ "repo_name": "gdikov/vae-playground", "path": "third_party/ite/cost/base_a.py", "copies": "1", "size": "19263", "license": "mit", "hash": 8382078373014410000, "line_mean": 33.7081081081, "line_max": 79, "alpha_frac": 0.5816331828, "autogenerated": false, "ratio": 3.928819090352845, "config_tes...
"""Base async HTTP client implementation.""" from __future__ import absolute_import, unicode_literals import sys from vine import Thenable, promise, maybe_promise from kombu.exceptions import HttpError from kombu.five import items, python_2_unicode_compatible from kombu.utils.compat import coro from kombu.utils.enco...
{ "repo_name": "cloudera/hue", "path": "desktop/core/ext-py/kombu-4.3.0/kombu/asynchronous/http/base.py", "copies": "4", "size": "9501", "license": "apache-2.0", "hash": -7670849563594553000, "line_mean": 34.9886363636, "line_max": 79, "alpha_frac": 0.6113040733, "autogenerated": false, "ratio": 4...
"""Base async HTTP client implementation.""" import sys from http.client import responses from vine import Thenable, promise, maybe_promise from kombu.exceptions import HttpError from kombu.utils.compat import coro from kombu.utils.encoding import bytes_to_str from kombu.utils.functional import maybe_list, memoize ...
{ "repo_name": "celery/kombu", "path": "kombu/asynchronous/http/base.py", "copies": "1", "size": "9244", "license": "bsd-3-clause", "hash": -6226154969626899000, "line_mean": 34.8294573643, "line_max": 79, "alpha_frac": 0.6069883167, "autogenerated": false, "ratio": 4.246210381258613, "config_te...
"""Base async HTTP client implementation.""" import sys from vine import Thenable, promise, maybe_promise from kombu.exceptions import HttpError from kombu.utils.compat import coro from kombu.utils.encoding import bytes_to_str from kombu.utils.functional import maybe_list, memoize try: # pragma: no cover from ...
{ "repo_name": "ZoranPavlovic/kombu", "path": "kombu/asynchronous/http/base.py", "copies": "1", "size": "9334", "license": "bsd-3-clause", "hash": 8269893302137081000, "line_mean": 34.7624521073, "line_max": 79, "alpha_frac": 0.6077780159, "autogenerated": false, "ratio": 4.242727272727273, "con...
"""Base authorization API. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import json import http.client import flask import flask_restplus as restplus from treadmill import webutils _LOGGER = l...
{ "repo_name": "Morgan-Stanley/treadmill", "path": "lib/python/treadmill/rest/api/authz/authz_base.py", "copies": "2", "size": "2083", "license": "apache-2.0", "hash": -6379348529045450000, "line_mean": 27.9305555556, "line_max": 77, "alpha_frac": 0.6313010082, "autogenerated": false, "ratio": 4.2...
"""Base backend for traces See the docstring for pymc3.backends for more information (including creating custom backends). """ import numpy as np from ..model import modelcontext class BackendError(Exception): pass class BaseTrace(object): """Base trace object Parameters ---------- name : str ...
{ "repo_name": "kmather73/pymc3", "path": "pymc3/backends/base.py", "copies": "13", "size": "8778", "license": "apache-2.0", "hash": -3317011535465474600, "line_mean": 27.9702970297, "line_max": 77, "alpha_frac": 0.5758714969, "autogenerated": false, "ratio": 4.494623655913978, "config_test": fa...
"""Base backend for traces See the docstring for pymc3.backends for more information (including creating custom backends). """ import numpy as np from ..model import modelcontext, TransformedRV class BackendError(Exception): pass class BaseTrace(object): """Base trace object Parameters ---------- ...
{ "repo_name": "wanderer2/pymc3", "path": "pymc3/backends/base.py", "copies": "1", "size": "8790", "license": "apache-2.0", "hash": 8879535762955980000, "line_mean": 27.9144736842, "line_max": 77, "alpha_frac": 0.5766780432, "autogenerated": false, "ratio": 4.493865030674846, "config_test": fals...
"""Base backend for traces See the docstring for pymc3.backends for more information (includng creating custom backends). """ import numpy as np from ..model import modelcontext class BackendError(Exception): pass class BaseTrace(object): """Base trace object Parameters ---------- name : str ...
{ "repo_name": "MCGallaspy/pymc3", "path": "pymc3/backends/base.py", "copies": "1", "size": "8671", "license": "apache-2.0", "hash": -192101740283867000, "line_mean": 28.2939189189, "line_max": 76, "alpha_frac": 0.5744435475, "autogenerated": false, "ratio": 4.527937336814621, "config_test": fal...
"""Base backend for traces See the docstring for pymc.backends for more information (includng creating custom backends). """ import numpy as np from ..model import modelcontext class BaseTrace(object): """Base trace object Parameters ---------- name : str Name of backend model : Model ...
{ "repo_name": "nmmarquez/pymc", "path": "pymc3/backends/base.py", "copies": "1", "size": "7378", "license": "apache-2.0", "hash": 5402439260986790000, "line_mean": 27.0532319392, "line_max": 77, "alpha_frac": 0.5773922472, "autogenerated": false, "ratio": 4.568421052631579, "config_test": false...
"""Base backend interface.""" import os import stat import sys class JobSourceFile(object): """Describes a source code file for a job. Parameters ---------- path : str Path to write the source file to. task : Task Task the source file corresponds to. job_code : str Jo...
{ "repo_name": "jgosmann/psyrun", "path": "psyrun/backend/base.py", "copies": "1", "size": "6736", "license": "mit", "hash": 5008179260922566000, "line_mean": 29.0714285714, "line_max": 79, "alpha_frac": 0.5653206651, "autogenerated": false, "ratio": 4.402614379084968, "config_test": false, "h...
#baseballtest import random inning_results = {0:0, 1:0, 2:0, 3:0, 4:0} game_results = {} max_strikes = 3 max_outs = 3 max_hits = 4 max_innings = 9 max_games = 1000 def play_inning (deck): random.shuffle (deck) outs = 0 i = 0 hits = 0 strikes = 0 while outs < max_outs and hits < max_hi...
{ "repo_name": "SkyTruth/scraper", "path": "nrc/nrc/baseball.py", "copies": "1", "size": "1165", "license": "mit", "hash": -1533845706380372700, "line_mean": 19.1034482759, "line_max": 46, "alpha_frac": 0.4969957082, "autogenerated": false, "ratio": 3.1149732620320854, "config_test": false, "h...
_base_ = '../_base_/default_runtime.py' # dataset settings dataset_type = 'CocoDataset' data_root = 'data/coco/' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) # In mstrain 3x config, img_scale=[(1333, 640), (1333, 800)], # multiscale_mode='range' train_pipeline = [ ...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/common/mstrain-poly_3x_coco_instance.py", "copies": "1", "size": "2516", "license": "apache-2.0", "hash": -715757551040519200, "line_mean": 30.45, "line_max": 77, "alpha_frac": 0.5989666137, "autogenerated": false, "ratio": 3.29750982961992...
"""Base body storage class used in simulations """ import numpy as np import copy class Bodies(object): def __init__(self, r=None, v=None, m=None, t=0, tags=None): self.r = r self.v = v self.m = m self.t = t self.tags = tags def to_array(self): array = np.conca...
{ "repo_name": "kostassabulis/nbody-workshop-2015", "path": "nbody/bodies.py", "copies": "1", "size": "1915", "license": "mit", "hash": -663622556329557200, "line_mean": 28.0151515152, "line_max": 111, "alpha_frac": 0.5154046997, "autogenerated": false, "ratio": 3.191666666666667, "config_test":...
"""Base Bolt classes.""" from collections import defaultdict import os import signal import sys import threading import time from base import Component from ipc import read_handshake, read_tuple, send_message, json, _stdout, Tuple class Bolt(Component): """The base class for all streamparse bolts. For more ...
{ "repo_name": "thedrow/streamparse", "path": "streamparse/bolt.py", "copies": "1", "size": "9355", "license": "apache-2.0", "hash": 840779990850583800, "line_mean": 36.123015873, "line_max": 94, "alpha_frac": 0.5954035275, "autogenerated": false, "ratio": 4.379681647940075, "config_test": false...
"""Base Bolt classes.""" from __future__ import absolute_import, print_function, unicode_literals from collections import defaultdict import os import signal import sys import threading import time import warnings import logging from six import iteritems, reraise, PY3 from .base import Component from .ipc import (re...
{ "repo_name": "scrapinghub/streamparse", "path": "streamparse/bolt.py", "copies": "1", "size": "16373", "license": "apache-2.0", "hash": 1854375394141361200, "line_mean": 37.2546728972, "line_max": 130, "alpha_frac": 0.579185244, "autogenerated": false, "ratio": 4.375467664350615, "config_test"...
"""Base bolt classes.""" from __future__ import absolute_import, print_function, unicode_literals import logging from collections import defaultdict from six import iteritems, itervalues from .component import Component, Tuple log = logging.getLogger(__name__) class Bolt(Component): """The base class for all...
{ "repo_name": "phanib4u/streamparse", "path": "streamparse/storm/bolt.py", "copies": "2", "size": "17034", "license": "apache-2.0", "hash": 622586621845771100, "line_mean": 39.1745283019, "line_max": 167, "alpha_frac": 0.5874721146, "autogenerated": false, "ratio": 4.349846782431052, "config_te...
"""Base bolt classes.""" from __future__ import absolute_import, print_function, unicode_literals import logging import os import re import signal import sys import threading import time from collections import defaultdict, namedtuple from six import iteritems, itervalues, reraise from .component import Component, T...
{ "repo_name": "pystorm/pystorm", "path": "pystorm/bolt.py", "copies": "1", "size": "20941", "license": "apache-2.0", "hash": -6290104934008726000, "line_mean": 37.3534798535, "line_max": 167, "alpha_frac": 0.5898954205, "autogenerated": false, "ratio": 4.352733319476201, "config_test": false, ...
"""Base bolt classes.""" from __future__ import absolute_import, print_function, unicode_literals import logging import sys from collections import defaultdict from six import iteritems, itervalues, string_types, reraise from six.moves import range from .component import Component, Tuple log = logging.getLogger(__...
{ "repo_name": "petchat/streamparse", "path": "streamparse/storm/bolt.py", "copies": "4", "size": "17010", "license": "apache-2.0", "hash": 9062401166686428000, "line_mean": 39.1179245283, "line_max": 167, "alpha_frac": 0.5906525573, "autogenerated": false, "ratio": 4.332654100866021, "config_te...
"""Base BS """ import logging import time from twork.errors import ArgumentEmptyError from twork.utils.object_likefy import ObjectLikefy from twork_app.module import Module gen_logger = logging.getLogger('twork.general') class BaseBS(object): """Base BS """ INPUT_ARGUMENTS = ('queryid', ) INNER_AR...
{ "repo_name": "bufferx/twork", "path": "scaffold/twork_app/twork_app/domain/bs/base.py", "copies": "1", "size": "1844", "license": "apache-2.0", "hash": 2800691955285103600, "line_mean": 21.487804878, "line_max": 69, "alpha_frac": 0.5417570499, "autogenerated": false, "ratio": 4.008695652173913, ...
"Base Cache class." from __future__ import unicode_literals import time import warnings from django.core.exceptions import DjangoRuntimeWarning, ImproperlyConfigured from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRun...
{ "repo_name": "frdb194/django", "path": "django/core/cache/backends/base.py", "copies": "66", "size": "9678", "license": "bsd-3-clause", "hash": 1914885521668080600, "line_mean": 34.9776951673, "line_max": 91, "alpha_frac": 0.6121099401, "autogenerated": false, "ratio": 4.3732489832806145, "con...
"Base Cache class." from __future__ import unicode_literals import time import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.module_loading import import_by_path class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRu...
{ "repo_name": "TimBuckley/effective_django", "path": "django/core/cache/backends/base.py", "copies": "8", "size": "8747", "license": "bsd-3-clause", "hash": 1383132267322072000, "line_mean": 34.2701612903, "line_max": 91, "alpha_frac": 0.614153424, "autogenerated": false, "ratio": 4.3366385721368...
"Base Cache class." from __future__ import unicode_literals import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.importlib import import_module class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): p...
{ "repo_name": "RaoUmer/django", "path": "django/core/cache/backends/base.py", "copies": "4", "size": "7901", "license": "bsd-3-clause", "hash": -3338039213068735000, "line_mean": 34.4304932735, "line_max": 87, "alpha_frac": 0.608150867, "autogenerated": false, "ratio": 4.2754329004329, "config_...
"Base Cache class." from __future__ import unicode_literals import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.module_loading import import_by_path class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning...
{ "repo_name": "jgeskens/django", "path": "django/core/cache/backends/base.py", "copies": "7", "size": "7842", "license": "bsd-3-clause", "hash": 9061437863067312000, "line_mean": 32.9480519481, "line_max": 87, "alpha_frac": 0.6062229023, "autogenerated": false, "ratio": 4.289934354485776, "conf...
"Base Cache class." import time import warnings from django.core.exceptions import DjangoRuntimeWarning, ImproperlyConfigured from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): pass # Stub class to ...
{ "repo_name": "bak1an/django", "path": "django/core/cache/backends/base.py", "copies": "6", "size": "9688", "license": "bsd-3-clause", "hash": 4321672568833922000, "line_mean": 35.1492537313, "line_max": 91, "alpha_frac": 0.6122006606, "autogenerated": false, "ratio": 4.381727725011307, "config...
"Base Cache class." import time import warnings from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(RuntimeWarning): pass class InvalidCacheKey(ValueError): pass ...
{ "repo_name": "elena/django", "path": "django/core/cache/backends/base.py", "copies": "18", "size": "10322", "license": "bsd-3-clause", "hash": 2316181298266403000, "line_mean": 34.3493150685, "line_max": 91, "alpha_frac": 0.6155783763, "autogenerated": false, "ratio": 4.362637362637362, "confi...
"Base Cache class." from django.core.exceptions import ImproperlyConfigured class InvalidCacheBackendError(ImproperlyConfigured): pass class BaseCache(object): def __init__(self, params): timeout = params.get('timeout', 300) try: timeout = int(timeout) except (ValueError, ...
{ "repo_name": "diofeher/django-nfa", "path": "build/lib/django/core/cache/backends/base.py", "copies": "5", "size": "1997", "license": "bsd-3-clause", "hash": -3974992380225139700, "line_mean": 29.2575757576, "line_max": 78, "alpha_frac": 0.5938908363, "autogenerated": false, "ratio": 4.612009237...
"Base Cache class." import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.encoding import smart_str from django.utils.importlib import import_module class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKe...
{ "repo_name": "pwoodworth/intellij-community", "path": "python/lib/Lib/site-packages/django/core/cache/backends/base.py", "copies": "232", "size": "7960", "license": "apache-2.0", "hash": 2958513758460299300, "line_mean": 34.5357142857, "line_max": 87, "alpha_frac": 0.6099246231, "autogenerated": f...
"Base Cache class." import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.encoding import smart_text from django.utils.importlib import import_module class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): ...
{ "repo_name": "vsajip/django", "path": "django/core/cache/backends/base.py", "copies": "1", "size": "7930", "license": "bsd-3-clause", "hash": 7201202930609392000, "line_mean": 34.5605381166, "line_max": 87, "alpha_frac": 0.6090794451, "autogenerated": false, "ratio": 4.268030139935415, "config...
"Base Cache class." import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): pass # Memcached does not accept keys longer than this. MEMCACHE_MAX_KEY_LENGTH = 250 cl...
{ "repo_name": "SRabbelier/Melange", "path": "thirdparty/google_appengine/lib/django_1_2/django/core/cache/backends/base.py", "copies": "46", "size": "4723", "license": "apache-2.0", "hash": -9220941798000891000, "line_mean": 31.7986111111, "line_max": 80, "alpha_frac": 0.5905145035, "autogenerated"...
"Base Cache class." import warnings from google.appengine._internal.django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): pass # Memcached does not accept keys longer than this. MEMCAC...
{ "repo_name": "GdZ/scriptfile", "path": "software/googleAppEngine/google/appengine/_internal/django/core/cache/backends/base.py", "copies": "23", "size": "4750", "license": "mit", "hash": 8115661927362747000, "line_mean": 31.9861111111, "line_max": 104, "alpha_frac": 0.592, "autogenerated": false, ...
"Base Cache class." from __future__ import unicode_literals import time import warnings from django.core.exceptions import DjangoRuntimeWarning, ImproperlyConfigured from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRun...
{ "repo_name": "letouriste001/SmartForest_2.0", "path": "python3.4Smartforest/lib/python3.4/site-packages/django/core/cache/backends/base.py", "copies": "1", "size": "9775", "license": "mit", "hash": 7511996124702477000, "line_mean": 35.3382899628, "line_max": 91, "alpha_frac": 0.6138107417, "autoge...
"Base Cache class." from __future__ import unicode_literals import time import warnings from django.core.exceptions import DjangoRuntimeWarning, ImproperlyConfigured from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWar...
{ "repo_name": "diego-d5000/MisValesMd", "path": "env/lib/python2.7/site-packages/django/core/cache/backends/base.py", "copies": "1", "size": "9042", "license": "mit", "hash": 8886558060482284000, "line_mean": 34.313253012, "line_max": 91, "alpha_frac": 0.596107056, "autogenerated": false, "ratio"...
"Base Cache class." from django.core.exceptions import ImproperlyConfigured class InvalidCacheBackendError(ImproperlyConfigured): pass class BaseCache(object): def __init__(self, params): timeout = params.get('timeout', 300) try: timeout = int(timeout) except (...
{ "repo_name": "greggian/TapdIn", "path": "django/core/cache/backends/base.py", "copies": "1", "size": "3033", "license": "apache-2.0", "hash": -2614740060100240400, "line_mean": 30.6129032258, "line_max": 80, "alpha_frac": 0.5694032311, "autogenerated": false, "ratio": 4.616438356164384, "confi...
"Base Cache class." import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.encoding import smart_str from django.utils.importlib import import_module class InvalidCacheBackendError(ImproperlyConfigured): pass c...
{ "repo_name": "rimbalinux/LMD3", "path": "django/core/cache/backends/base.py", "copies": "3", "size": "8184", "license": "bsd-3-clause", "hash": -7263210723632236000, "line_mean": 34.5357142857, "line_max": 87, "alpha_frac": 0.593230694, "autogenerated": false, "ratio": 4.376470588235295, "conf...
"Base Cache class." import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): pass # Memcached does not accept keys longer than this. MEMCACHE_MAX_KEY_LEN...
{ "repo_name": "egenerat/flight-manager", "path": "django/core/cache/backends/base.py", "copies": "9", "size": "5274", "license": "mit", "hash": -4128707916522810400, "line_mean": 31.8076923077, "line_max": 80, "alpha_frac": 0.5703450891, "autogenerated": false, "ratio": 4.566233766233767, "conf...
"""BaseCache for foundation of app-specific caching strategy.""" from calendar import timegm from datetime import date, datetime, timedelta from pytz import utc import json from django.conf import settings from django.db.models.loading import get_model from .models import PkOnlyModel, PkOnlyQueryset class BaseCach...
{ "repo_name": "fpruitt/drf-cached-instances", "path": "drf_cached_instances/cache.py", "copies": "1", "size": "10759", "license": "mpl-2.0", "hash": -5378721982671563000, "line_mean": 35.2255892256, "line_max": 79, "alpha_frac": 0.5634352635, "autogenerated": false, "ratio": 4.2626782884310614, ...
_base_ = ['./cascade_mask_rcnn_r50_fpn_1x_coco.py'] model = dict( backbone=dict( norm_cfg=dict(requires_grad=False), norm_eval=True, style='caffe', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://detectron2/resnet50_caffe'))) img_norm_cfg = dict( ...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/cascade_rcnn/cascade_mask_rcnn_r50_caffe_fpn_1x_coco.py", "copies": "1", "size": "1426", "license": "apache-2.0", "hash": -8514247631474514000, "line_mean": 33.7804878049, "line_max": 77, "alpha_frac": 0.5890603086, "autogenerated": false, ...
_base_ = '../cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py' model = dict( backbone=dict( _delete_=True, type='HRNet', extra=dict( stage1=dict( num_modules=1, num_branches=1, block='BOTTLENECK', num_blocks=(4, ), ...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/hrnet/cascade_mask_rcnn_hrnetv2p_w32_20e_coco.py", "copies": "1", "size": "1296", "license": "apache-2.0", "hash": -6851308429503793000, "line_mean": 31.4, "line_max": 76, "alpha_frac": 0.4452160494, "autogenerated": false, "ratio": 3.70285...
_base_ = '../cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py' model = dict( backbone=dict( _delete_=True, type='HRNet', extra=dict( stage1=dict( num_modules=1, num_branches=1, block='BOTTLENECK', num_blocks=(4, ), ...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/hrnet/cascade_rcnn_hrnetv2p_w32_20e_coco.py", "copies": "1", "size": "1291", "license": "apache-2.0", "hash": 2735966187154478000, "line_mean": 31.275, "line_max": 76, "alpha_frac": 0.443841983, "autogenerated": false, "ratio": 3.7097701149...
_base_ = './cascade_rcnn_r50_fpn_1x_coco.py' model = dict( backbone=dict( norm_cfg=dict(requires_grad=False), style='caffe', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://detectron2/resnet50_caffe'))) # use caffe img_norm img_norm_cfg = dict( mean=[...
{ "repo_name": "open-mmlab/mmdetection", "path": "configs/cascade_rcnn/cascade_rcnn_r50_caffe_fpn_1x_coco.py", "copies": "1", "size": "1389", "license": "apache-2.0", "hash": -483998045570156500, "line_mean": 32.0714285714, "line_max": 72, "alpha_frac": 0.5903527718, "autogenerated": false, "ratio...
'''Base CGI module. ''' # # Copyright (c) 2005,2006 shinGETsu Project. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # no...
{ "repo_name": "shingetsu/saku-ex", "path": "shingetsu/basecgi.py", "copies": "1", "size": "3235", "license": "bsd-2-clause", "hash": 7743352114553003000, "line_mean": 28.4090909091, "line_max": 76, "alpha_frac": 0.6145285935, "autogenerated": false, "ratio": 4.1157760814249365, "config_test": f...
"""Base chado client """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re from chado.exceptions import RecordNotFoundError from chakin.io import warn from future import standard_library standard_library.in...
{ "repo_name": "abretaud/python-chado", "path": "chado/client.py", "copies": "1", "size": "15262", "license": "mit", "hash": 5532116552060476000, "line_mean": 42.1129943503, "line_max": 201, "alpha_frac": 0.5959245184, "autogenerated": false, "ratio": 3.704368932038835, "config_test": false, "...
"""Base class and common code for :py:mod:`dirq` package. It is used internally by :py:mod:`dirq` modules and should not be used elsewhere. Author ------ Konstantin Skaburskas \<konstantin.skaburskas@gmail.com\> License and Copyright --------------------- ASL 2.0 Copyright (C) 2010-2012 """ import dirq __author_...
{ "repo_name": "StratusLab/client", "path": "api/code/src/main/python/dirq/QueueBase.py", "copies": "1", "size": "9810", "license": "apache-2.0", "hash": -305705174557640800, "line_mean": 27.6842105263, "line_max": 80, "alpha_frac": 0.5608562691, "autogenerated": false, "ratio": 4.113207547169812,...
"""Base class and common objects for webdb drivers Drivers written for webdb should subclass ``driver_base``. """ from ... import container import datetime import errno import collections rerrorcode = dict(zip(errno.errorcode.values(), errno.errorcode.keys())) def make_IOError(code, message): e = IOError(rerr...
{ "repo_name": "orbnauticus/silk", "path": "silk/webdb/drivers/base.py", "copies": "1", "size": "20885", "license": "bsd-3-clause", "hash": 3528316708546300400, "line_mean": 35.704745167, "line_max": 78, "alpha_frac": 0.5907110366, "autogenerated": false, "ratio": 3.8647298297557366, "config_tes...
'''Base class and framework for intermediate representation ''' import sys import new import operator from functools import partial from ..runtime.func import identity from ..runtime.collections import OrderedSet from ..runtime.multimethod import MultiMethod, defmethod from ..runtime.ports import (Port, connect, disc...
{ "repo_name": "matthagy/Jamenson", "path": "jamenson/compiler/irbase.py", "copies": "1", "size": "11017", "license": "apache-2.0", "hash": 6739170040078012000, "line_mean": 28.0686015831, "line_max": 102, "alpha_frac": 0.5849142235, "autogenerated": false, "ratio": 3.703193277310924, "config_te...
"""Base class and functions for compilers""" from itertools import product from collections import namedtuple, OrderedDict from compilertools._utils import import_class, BaseClass from compilertools._config import CONFIG from compilertools.processors import get_processor, get_arch __all__ = ["CompilerBase", "get_compi...
{ "repo_name": "JGoutin/compilertools", "path": "compilertools/compilers/_core.py", "copies": "1", "size": "8138", "license": "bsd-2-clause", "hash": -8884811720571190000, "line_mean": 27.2569444444, "line_max": 87, "alpha_frac": 0.5844187761, "autogenerated": false, "ratio": 4.893565844858689, ...
"""Base class and functions for CPU""" from platform import machine from compilertools._utils import import_class, BaseClass from compilertools._config import CONFIG __all__ = ["ProcessorBase", "get_processor", "get_arch"] def get_arch(arch=None): """Checks architecture name and returns fixed name. Paramet...
{ "repo_name": "JGoutin/compilertools", "path": "compilertools/processors/_core.py", "copies": "1", "size": "1982", "license": "bsd-2-clause", "hash": -8512978023606142000, "line_mean": 23.1707317073, "line_max": 82, "alpha_frac": 0.5807265388, "autogenerated": false, "ratio": 4.375275938189845, ...
"""Base class and original SMOTE methods for over-sampling""" # Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com> # Fernando Nogueira # Christos Aridas # Dzianis Dudnik # License: MIT import math from collections import Counter import numpy as np from scipy import sparse from scipy impo...
{ "repo_name": "fmfn/UnbalancedDataset", "path": "imblearn/over_sampling/_smote/base.py", "copies": "2", "size": "26828", "license": "mit", "hash": -8210677648125665000, "line_mean": 35.0591397849, "line_max": 99, "alpha_frac": 0.6088415089, "autogenerated": false, "ratio": 3.8183888414460574, "...
"""Base class and task for commands.""" import traceback from .tasks import Task class CommandFailedException(BaseException): """Class to represent a failure in a command. Used to avoid printing multiple tracebacks on nested commands.""" pass class _CommandMeta(type): """ Metaclass (object that rep...
{ "repo_name": "javitonino/tosh", "path": "tosh/command.py", "copies": "1", "size": "2434", "license": "bsd-3-clause", "hash": -5032326358619354000, "line_mean": 29.049382716, "line_max": 115, "alpha_frac": 0.6109285127, "autogenerated": false, "ratio": 4.46605504587156, "config_test": false, ...
"""Base Class and Utilities for Cake Tools. @see: Cake Build System (http://sourceforge.net/projects/cake-build) @copyright: Copyright (c) 2010 Lewis Baker, Stuart McMahon. @license: Licensed under the MIT license. """ class ToolMetaclass(type): """This metaclass ensures that new instance variables can only be adde...
{ "repo_name": "lewissbaker/cake", "path": "src/cake/library/__init__.py", "copies": "1", "size": "3461", "license": "mit", "hash": 4267497560903026700, "line_mean": 27.6033057851, "line_max": 76, "alpha_frac": 0.6503900607, "autogenerated": false, "ratio": 3.849833147942158, "config_test": fals...
"""Base class copy from sklearn.base.""" # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Romain Trachel <trachelr@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Jean-Remi King <jeanremi.king@gmail.com> # # License: BSD (3-clause) import numpy as np import time im...
{ "repo_name": "cjayb/mne-python", "path": "mne/decoding/base.py", "copies": "2", "size": "19366", "license": "bsd-3-clause", "hash": -1162759462641552100, "line_mean": 34.4688644689, "line_max": 79, "alpha_frac": 0.5963027987, "autogenerated": false, "ratio": 4.185433326129242, "config_test": t...
"""Base class copy from sklearn.base""" # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Romain Trachel <trachelr@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # # License: BSD (3-clause) import inspect import warnings import six import numpy as np class BaseE...
{ "repo_name": "trachelr/mne-python", "path": "mne/decoding/base.py", "copies": "2", "size": "26267", "license": "bsd-3-clause", "hash": 7012649183751242000, "line_mean": 41.3661290323, "line_max": 79, "alpha_frac": 0.5588761564, "autogenerated": false, "ratio": 4.594542592268672, "config_test":...
"""base class creation for all the schemas that exist.""" from functools import lru_cache from pyramid.view import ( view_config, ) from pyramid.security import ( # ALL_PERMISSIONS, Allow, Authenticated, Deny, # DENY_ALL, Everyone, ) from pyramid.traversal import find_root import snovault # ...
{ "repo_name": "4dn-dcic/fourfront", "path": "src/encoded/types/base.py", "copies": "2", "size": "22234", "license": "mit", "hash": -70287169313562320, "line_mean": 36.7419354839, "line_max": 139, "alpha_frac": 0.597705803, "autogenerated": false, "ratio": 3.9548123109766946, "config_test": fals...
""" Base class defining common code for EnamlTaskPane and EnamlEditor. """ # Enthought library imports. from traits.api import HasTraits, Instance class EnamlPane(HasTraits): """ Base class defining common code for EnamlTaskPane and EnamlEditor. """ ##########################################################...
{ "repo_name": "geggo/pyface", "path": "pyface/tasks/enaml_pane.py", "copies": "5", "size": "2407", "license": "bsd-3-clause", "hash": 8454620480787186000, "line_mean": 32.4305555556, "line_max": 79, "alpha_frac": 0.5625259659, "autogenerated": false, "ratio": 5.1875, "config_test": false, "ha...
"""Base classes and convenience functions for writing filters""" from functools import wraps from funcy import identity from dxr.utils import is_in # Domain constants: FILE = 'file' LINE = 'line' class Filter(object): """A provider of search strategy and highlighting Filter classes, which roughly corresp...
{ "repo_name": "jbradberry/dxr", "path": "dxr/filters.py", "copies": "9", "size": "9618", "license": "mit", "hash": 6247135508616626000, "line_mean": 38.0975609756, "line_max": 96, "alpha_frac": 0.6403618216, "autogenerated": false, "ratio": 4.488100793280448, "config_test": false, "has_no_key...
"""Base classes and convenience functions for writing indexers and skimmers""" from collections import namedtuple from operator import itemgetter from os.path import join, islink from warnings import warn from funcy import group_by, decorator, imapcat from dxr.utils import build_offset_map, split_content_lines STR...
{ "repo_name": "jbradberry/dxr", "path": "dxr/indexers.py", "copies": "1", "size": "22661", "license": "mit", "hash": 2013881436380509000, "line_mean": 38.0034423408, "line_max": 185, "alpha_frac": 0.6287454216, "autogenerated": false, "ratio": 4.247610121836926, "config_test": true, "has_no_k...