text stringlengths 0 1.05M | meta dict |
|---|---|
from ebu_tt_live.errors import SemanticValidationError, RegionExtendingOutsideDocumentError
from ebu_tt_live.strings import ERR_SEMANTIC_STYLE_MISSING, ERR_SEMANTIC_VALIDATION_EXPECTED, \
ERR_SEMANTIC_REGION_MISSING
import re
class SizingValidationMixin(object):
"""
This is meant to validate that the sizing... | {
"repo_name": "bbc/ebu-tt-live-toolkit",
"path": "ebu_tt_live/bindings/validation/presentation.py",
"copies": "1",
"size": "8787",
"license": "bsd-3-clause",
"hash": 3039310996566664000,
"line_mean": 41.04784689,
"line_max": 124,
"alpha_frac": 0.6456128371,
"autogenerated": false,
"ratio": 4.5765... |
from ebu_tt_live import bindings
from ebu_tt_live.documents import SubtitleDocument
from ebu_tt_live.documents.base import EBUTTDocumentBase
from ebu_tt_live.documents.time_utils import TimelineUtilMixin
from .base import TimeBase
from pyxb import BIND
class EBUTT1Document(TimelineUtilMixin, SubtitleDocument, EBUTTDoc... | {
"repo_name": "bbc/ebu-tt-live-toolkit",
"path": "ebu_tt_live/documents/ebutt1.py",
"copies": "1",
"size": "3235",
"license": "bsd-3-clause",
"hash": -447268211499500300,
"line_mean": 29.2336448598,
"line_max": 115,
"alpha_frac": 0.6145285935,
"autogenerated": false,
"ratio": 3.819362455726092,
... |
from ebu_tt_live.node.deduplicator import DeDuplicatorNode
from ebu_tt_live.node.base import AbstractCombinedNode
from ebu_tt_live.documents import EBUTT3Document
from ebu_tt_live.bindings import style_type, region_type
from ebu_tt_live.carriage.interface import IProducerCarriage, IConsumerCarriage
from mock import Mag... | {
"repo_name": "ebu/ebu-tt-live-toolkit",
"path": "testing/bdd/test_deduplicator.py",
"copies": "2",
"size": "3638",
"license": "bsd-3-clause",
"hash": 1230879844399044900,
"line_mean": 45.0506329114,
"line_max": 95,
"alpha_frac": 0.7380428807,
"autogenerated": false,
"ratio": 3.2569382273948073,
... |
from ebu_tt_live.node.delay import BufferDelayNode
from ebu_tt_live.clocks.local import LocalMachineClock
from ebu_tt_live.bindings._ebuttdt import LimitedClockTimingType
from ebu_tt_live.carriage.filesystem import FilesystemProducerImpl
from ebu_tt_live.adapters.node_carriage import ProducerNodeCarriageAdapter
from eb... | {
"repo_name": "ebu/ebu-tt-live-toolkit",
"path": "testing/bdd/test_bufferDelayNode.py",
"copies": "1",
"size": "3852",
"license": "bsd-3-clause",
"hash": -2439552529214404600,
"line_mean": 34.3394495413,
"line_max": 95,
"alpha_frac": 0.7196261682,
"autogenerated": false,
"ratio": 3.71456123432979... |
from ebu_tt_live.node.delay import RetimingDelayNode
from ebu_tt_live.clocks.local import LocalMachineClock
from ebu_tt_live.bindings._ebuttdt import LimitedClockTimingType
from ebu_tt_live.carriage.interface import IProducerCarriage
from ebu_tt_live.documents import EBUTT3Document
from ebu_tt_live.errors import Unexpe... | {
"repo_name": "ebu/ebu-tt-live-toolkit",
"path": "testing/bdd/test_retimingDelayNode.py",
"copies": "2",
"size": "12126",
"license": "bsd-3-clause",
"hash": 5539819583641922000,
"line_mean": 39.2857142857,
"line_max": 144,
"alpha_frac": 0.7088899885,
"autogenerated": false,
"ratio": 3.37208008898... |
from ebu_tt_live.node.distributing import DistributingNode
from ebu_tt_live.carriage.interface import IProducerCarriage
from ebu_tt_live.node.delay import BufferDelayNode
from ebu_tt_live.utils import compare_xml
from ebu_tt_live.documents import EBUTT3Document
from mock import MagicMock
from pytest_bdd import given, w... | {
"repo_name": "ebu/ebu-tt-live-toolkit",
"path": "testing/bdd/test_passive_node_shall_not_modify_documents.py",
"copies": "2",
"size": "2379",
"license": "bsd-3-clause",
"hash": -5382564497245776000,
"line_mean": 35.6,
"line_max": 138,
"alpha_frac": 0.7431693989,
"autogenerated": false,
"ratio": ... |
from ec2ssh import ec2ssh
import sys, getopt
from optparse import OptionParser
def main():
from optparse import OptionParser
usage = "usage: %prog [command] [name] [options] arg1 arg2"+"\n"+"AWS configuration is REQUIRED"
parser = OptionParser(usage)
parser.add_option("-c", "--commands", dest="commands",act... | {
"repo_name": "bjtox/ec2ssh-manager",
"path": "ec2ssh/__init__.py",
"copies": "1",
"size": "1604",
"license": "mit",
"hash": 3718645377529709600,
"line_mean": 35.4772727273,
"line_max": 98,
"alpha_frac": 0.6240648379,
"autogenerated": false,
"ratio": 3.9801488833746896,
"config_test": false,
... |
from ecc import EC
from df import DiffieHellman
from elgamal import ElGamal
from dsa import DSA
if __name__ == "__main__":
# shared elliptic curve system of examples
ec = EC(1, 18, 19)
g, _ = ec.at(7)
print ec.order(g)
assert ec.order(g) <= ec.q
# ElGamal enc/dec usage
eg = ElGamal(ec, g... | {
"repo_name": "gbanegas/KissECC",
"path": "main_ecc.py",
"copies": "1",
"size": "1540",
"license": "apache-2.0",
"hash": -7890007369436591000,
"line_mean": 22.3333333333,
"line_max": 79,
"alpha_frac": 0.5935064935,
"autogenerated": false,
"ratio": 2.7697841726618706,
"config_test": false,
"ha... |
from ecc import EC
from exceptions_ecc.signatureerror import SignatureError
from utils.inversion import Inverse
class DSA(object):
"""ECDSA
- ec: elliptic curve
- g: a point on ec
"""
def __init__(self, ec, g):
self.ec = ec
self.g = g
self.n = ec.order(g)
pass
d... | {
"repo_name": "gbanegas/KissECC",
"path": "dsa.py",
"copies": "1",
"size": "1454",
"license": "apache-2.0",
"hash": 2729384269060220000,
"line_mean": 30.6086956522,
"line_max": 82,
"alpha_frac": 0.5343878955,
"autogenerated": false,
"ratio": 3.2383073496659245,
"config_test": false,
"has_no_k... |
from ECDSA.ECDSA import GenerateKeyPair, VerifySignature, GenerateSignature
from pickle import dump, load
class GenerateKeysWrapper:
def __init__(self, bits):
self.gen = GenerateKeyPair(bits)
self.private, self.public = self.gen.generate_key()
def gen_private_wrapper(self):
return st... | {
"repo_name": "dev-alberto/Bachelor2017",
"path": "Code/WebApp/Wrappers/ecdsa.py",
"copies": "1",
"size": "1617",
"license": "apache-2.0",
"hash": 1352008681051077600,
"line_mean": 26.8793103448,
"line_max": 75,
"alpha_frac": 0.5875077304,
"autogenerated": false,
"ratio": 3.47741935483871,
"con... |
from .ecdsa import (Private_key, Public_key, Signature,
curve_192, generator_192,
digest_integer, ellipticcurve, point_is_valid)
from six import print_
import random
def test_ecdsa():
class TestFailure(Exception):
pass
def test_point_validity(generator, x, y, expected):... | {
"repo_name": "nedn/pybitcoin",
"path": "third_party/python-ecdsa/src/ecdsa/test_ecdsa.py",
"copies": "1",
"size": "14523",
"license": "mit",
"hash": -3296670713765894700,
"line_mean": 47.2491694352,
"line_max": 266,
"alpha_frac": 0.8258624251,
"autogenerated": false,
"ratio": 2.0968813167773606,... |
from ecdsa import SigningKey, SECP256k1
from ecdsa import util as ecdsaUtil
import binascii
import hashlib
def generate_pem():
sk = SigningKey.generate(curve=SECP256k1)
pem = sk.to_pem()
pem = pem.decode("utf-8")
return pem
def get_sin_from_pem(pem):
public_key = get_compressed_public_key_from_p... | {
"repo_name": "bitpay/bitpay-python-py2",
"path": "bitpay/bitpay_key_utils.py",
"copies": "1",
"size": "2010",
"license": "mit",
"hash": 8978361072110460000,
"line_mean": 24.4430379747,
"line_max": 72,
"alpha_frac": 0.6726368159,
"autogenerated": false,
"ratio": 3.185419968304279,
"config_test"... |
from ecdsa import SigningKey, SECP256k1, VerifyingKey
from ecdsa import util as ecdsaUtil
import binascii
import hashlib
def generate_pem():
sk = SigningKey.generate(curve=SECP256k1)
pem = sk.to_pem()
pem = pem.decode("utf-8")
return pem
def get_sin_from_pem(pem):
public_key = get_compressed_public_key_from... | {
"repo_name": "mammadori/bitpay-python",
"path": "bitpay/key_utils.py",
"copies": "5",
"size": "1905",
"license": "mit",
"hash": 882261542477795600,
"line_mean": 27.0147058824,
"line_max": 87,
"alpha_frac": 0.7160104987,
"autogenerated": false,
"ratio": 3,
"config_test": false,
"has_no_keywor... |
from ec_forum.sql import sqlQ
sqlQ = sqlQ()
event = {
'email_confirm_pass' : [ +1 ],
'article_add' : [ 0 ],
'article_recommend' : [ 0, +1 ],
'article_star' : [ 0, +1 ],
'article_del_other' : [-1, -1 ],
'comment_add' ... | {
"repo_name": "imxana/ec_forum",
"path": "ec_forum/reputation.py",
"copies": "1",
"size": "5978",
"license": "mit",
"hash": 6922764400924635000,
"line_mean": 34.5733333333,
"line_max": 74,
"alpha_frac": 0.4404047976,
"autogenerated": false,
"ratio": 2.454461821527139,
"config_test": false,
"h... |
from .ECG_Class import ECG_Class
from .take_average import average
from .HRinst import HRinst
from .tachybradycardia import bradycardia, tachycardia
from glob import glob
files = glob('test_data*.csv')
def test_unpack():
for f in files:
obj1 = ECG_Class(f)
assert obj1.name == f[:-4]
asser... | {
"repo_name": "polortiz4/bme590_assignment02",
"path": "test_class.py",
"copies": "1",
"size": "1419",
"license": "mit",
"hash": -6121707334801330000,
"line_mean": 26.8235294118,
"line_max": 71,
"alpha_frac": 0.6095842142,
"autogenerated": false,
"ratio": 2.95010395010395,
"config_test": true,
... |
from eche.eche_types import List, Symbol, Node, Vector
def eval_ast(ast, env):
if isinstance(ast, Node):
ast = ast.data
if isinstance(ast, str):
return Symbol(ast)
elif isinstance(ast, Vector):
return ast
elif isinstance(ast, List):
if len(ast) == 0:
return... | {
"repo_name": "skk/eche",
"path": "eche/eval.py",
"copies": "1",
"size": "1191",
"license": "mit",
"hash": 8499451708296817000,
"line_mean": 24.8913043478,
"line_max": 54,
"alpha_frac": 0.476070529,
"autogenerated": false,
"ratio": 4.238434163701068,
"config_test": false,
"has_no_keywords": f... |
from echidna.util import root_help
from echidna.output import root_style
import ROOT
from ROOT import TH1D, TH2D, TCanvas
def plot_projection(spectra, dimension, graphical=True, fig_num=1):
""" Plot the spectra as projected onto the dimension.
Args:
spectra (:class:`echidna.core.spectra`): The spectra ... | {
"repo_name": "mjmottram/echidna",
"path": "echidna/output/plot_root.py",
"copies": "1",
"size": "8594",
"license": "mit",
"hash": 7924711877819010000,
"line_mean": 39.9238095238,
"line_max": 76,
"alpha_frac": 0.5755178031,
"autogenerated": false,
"ratio": 3.7742643829600353,
"config_test": tru... |
from echidna.util import root_help
from ROOT import TH1D, TH2D
def plot_projection(spectra, dimension, graphical=True):
""" Plot the spectra as projected onto the dimension.
For example dimension == 0 will plot the spectra as projected onto the
energy dimension.
Args:
spectra (:class:`echidna.c... | {
"repo_name": "drjeannewilson/echidna",
"path": "echidna/output/plot_root.py",
"copies": "1",
"size": "10973",
"license": "mit",
"hash": -627617767498781800,
"line_mean": 42.5436507937,
"line_max": 148,
"alpha_frac": 0.5636562472,
"autogenerated": false,
"ratio": 3.8340321453529,
"config_test":... |
from echidna.util import root_help
import rat
from ROOT import RAT
from ROOT import TChain
import math
import echidna.core.spectra as spectra
def _scint_weights(times, T):
"""**CURRENTLY DISABLED**
This method applies to the scintillator backgrounds.
It produces the list of weights relative to each time ... | {
"repo_name": "EdLeming/echidna",
"path": "echidna/core/fill_spectrum.py",
"copies": "1",
"size": "10569",
"license": "mit",
"hash": 4856706207554366000,
"line_mean": 33.9966887417,
"line_max": 142,
"alpha_frac": 0.6323209386,
"autogenerated": false,
"ratio": 4.109253499222395,
"config_test": f... |
from echo_client import EchoClient
from xml.dom.minidom import parseString
class FeedsClient(EchoClient):
"""Client for managing the feeds polled by Echo"""
def list(self):
"""Lists the feeds registered for this account."""
opml_str = self.execute_query('feeds/list', {})
opml = parseString(opml_str)
def p... | {
"repo_name": "paulj/echo-streamserver-python",
"path": "streamserver/feeds_client.py",
"copies": "1",
"size": "1119",
"license": "isc",
"hash": 1037008134946045200,
"line_mean": 34,
"line_max": 98,
"alpha_frac": 0.6952636282,
"autogenerated": false,
"ratio": 3.4537037037037037,
"config_test": ... |
from echo import parameters
from echo import mutators
from echo import functions
class Context(object):
__slots__ = ["parameters"]
def __init__(self, *args):
self.parameters = list(args)
@classmethod
def standard(cls, actor=None, target_item=None):
return Context(parameters.Actor(act... | {
"repo_name": "ChrisLR/Python-Roguelike-Template",
"path": "echo/contexts.py",
"copies": "1",
"size": "1627",
"license": "mit",
"hash": -1849536465865488100,
"line_mean": 35.1555555556,
"line_max": 108,
"alpha_frac": 0.6472034419,
"autogenerated": false,
"ratio": 4.270341207349081,
"config_test... |
from echomesh.util.DefaultInstance import DefaultInstance
class Light(DefaultInstance):
""" Holds information about lighting to be used in shaders """
def __init__(self,
lightpos=(10, -10, 20),
lightcol=(1.0, 1.0, 1.0),
lightamb=(0.1, 0.1, 0.2)):
""" set light value... | {
"repo_name": "rec/echomesh",
"path": "code/python/external/pi3d/Light.py",
"copies": "1",
"size": "1272",
"license": "mit",
"hash": 5622195956908707000,
"line_mean": 28.5813953488,
"line_max": 75,
"alpha_frac": 0.6344339623,
"autogenerated": false,
"ratio": 3.7744807121661723,
"config_test": f... |
from echopoint.messaging import CallbackRegistry
import unittest
class Callback_tests(unittest.TestCase):
def setUp(self):
self.registry = CallbackRegistry()
self.target = Helperclass(self.registry)
def test_should_publish_without_args(self):
self.registry.publish('aTopic1')
s... | {
"repo_name": "nevtum/Echopoint",
"path": "tests/callbacks.py",
"copies": "1",
"size": "3342",
"license": "apache-2.0",
"hash": 8616268012670352000,
"line_mean": 36.9772727273,
"line_max": 79,
"alpha_frac": 0.6262716936,
"autogenerated": false,
"ratio": 3.859122401847575,
"config_test": true,
... |
from ec import (default_ec, default_ec_twist, y_for_x, AffinePoint,
JacobianPoint)
from fields import Fq, Fq2
from copy import deepcopy
class Signature:
"""
Signatures are G1 elements, which are elliptic curve points (x, y), where
each x, y is a (2*381) bit Fq2 element. The serialized repr... | {
"repo_name": "syscoin/syscoin",
"path": "src/chiabls/python-impl/signature.py",
"copies": "2",
"size": "5848",
"license": "mit",
"hash": 1760215525596015000,
"line_mean": 39.0547945205,
"line_max": 79,
"alpha_frac": 0.5902872777,
"autogenerated": false,
"ratio": 3.9380471380471382,
"config_tes... |
from ec import (generator_Fq, default_ec,
AffinePoint, JacobianPoint,
hash_to_point_prehashed_Fq2)
from util import hash_pks
from fields import Fq, Fq2, Fq12
from pairing import ate_pairing_multi
from keys import PrivateKey, PublicKey
from signature import Signature
from aggregation_info... | {
"repo_name": "zcoinofficial/zcoin",
"path": "src/bls-signatures/python-impl/bls.py",
"copies": "2",
"size": "10735",
"license": "mit",
"hash": 816081381678393900,
"line_mean": 39.3571428571,
"line_max": 79,
"alpha_frac": 0.5972985561,
"autogenerated": false,
"ratio": 4.086410354015988,
"config... |
from eclcli.common import command
from eclcli.bare import bare_utils
from eclcli.common import utils
class ListPort(command.Lister):
"""List all nic physical ports for a server"""
def get_parser(self, prog_name):
parser = super(ListPort, self).get_parser(prog_name)
parser.add_argument(
... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/bare/v2/port.py",
"copies": "1",
"size": "2335",
"license": "apache-2.0",
"hash": -2365675774272739300,
"line_mean": 30.1333333333,
"line_max": 80,
"alpha_frac": 0.5336188437,
"autogenerated": false,
"ratio": 4.214801444043322,
"config_test... |
from eclcli.common import command
from eclcli.bare import bare_utils
from eclcli.common import utils
class ListVersion(command.Lister):
"""List baremetal API versions"""
def get_parser(self, prog_name):
parser = super(ListVersion, self).get_parser(prog_name)
return parser
def take_action... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/bare/v2/version.py",
"copies": "1",
"size": "1506",
"license": "apache-2.0",
"hash": 4239418166323674000,
"line_mean": 25.4210526316,
"line_max": 63,
"alpha_frac": 0.5491367862,
"autogenerated": false,
"ratio": 4.1602209944751385,
"config_test": fa... |
from eclcli.common import command
from eclcli.common import utils
from eclcli.bare import bare_utils
class ListFlavor(command.Lister):
"""List all baremetal flavors"""
def get_parser(self, prog_name):
parser = super(ListFlavor, self).get_parser(prog_name)
return parser
def take_action(sel... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/bare/v2/flavor.py",
"copies": "1",
"size": "1830",
"license": "apache-2.0",
"hash": -5970597767923133000,
"line_mean": 25.1428571429,
"line_max": 74,
"alpha_frac": 0.5076502732,
"autogenerated": false,
"ratio": 4.216589861751152,
"config_te... |
from eclcli.common import command
from eclcli.common import utils
from eclcli.bare import bare_utils
class ListFlavor(command.Lister):
"""List all baremetal flavors"""
def get_parser(self, prog_name):
parser = super(ListFlavor, self).get_parser(prog_name)
return parser
def take_action(se... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/bare/v2/flavor.py",
"copies": "1",
"size": "1658",
"license": "apache-2.0",
"hash": 2405238580335373000,
"line_mean": 23.7462686567,
"line_max": 75,
"alpha_frac": 0.5162846803,
"autogenerated": false,
"ratio": 4.093827160493827,
"config_test": fals... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListColoLogicalLink(command.Lister):
def get_parser(self, prog_name):
parser = super(ListColoLogicalLink, self).get_parser(prog_name)
parser.add_argument(
'--colo... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/colocation_logical_link.py",
"copies": "1",
"size": "8093",
"license": "apache-2.0",
"hash": 1679773888576840400,
"line_mean": 34.4956140351,
"line_max": 110,
"alpha_frac": 0.5685160015,
"autogenerated": false,
"ratio": 4.11648016276704,
... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListColoPhysicalLink(command.Lister):
def get_parser(self, prog_name):
parser = super(ListColoPhysicalLink, self).get_parser(prog_name)
parser.add_argument(
'--ba... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/colocation_physical_link.py",
"copies": "1",
"size": "4474",
"license": "apache-2.0",
"hash": -9067798927705291000,
"line_mean": 35.3739837398,
"line_max": 113,
"alpha_frac": 0.5688421994,
"autogenerated": false,
"ratio": 3.897212543554007... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListColoSpace(command.Lister):
def get_parser(self, prog_name):
parser = super(ListColoSpace, self).get_parser(prog_name)
parser.add_argument(
'--description',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/colocation_space.py",
"copies": "1",
"size": "2495",
"license": "apache-2.0",
"hash": -2032894071583739400,
"line_mean": 30.1875,
"line_max": 89,
"alpha_frac": 0.5503006012,
"autogenerated": false,
"ratio": 4.090163934426229,
"config_tes... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListCommonFunction(command.Lister):
def get_parser(self, prog_name):
parser = super(ListCommonFunction, self).get_parser(prog_name)
return parser
def take_action(self, pa... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/network/v2/common_function.py",
"copies": "1",
"size": "1624",
"license": "apache-2.0",
"hash": -5052227393048915000,
"line_mean": 29.0740740741,
"line_max": 92,
"alpha_frac": 0.5905172414,
"autogenerated": false,
"ratio": 4.080402010050252,
... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListCommonFunctionGateway(command.Lister):
def get_parser(self, prog_name):
parser = super(ListCommonFunctionGateway, self).get_parser(prog_name)
parser.add_argument(
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/common_function_gateway.py",
"copies": "1",
"size": "6839",
"license": "apache-2.0",
"hash": -7769513842832378000,
"line_mean": 34.4352331606,
"line_max": 97,
"alpha_frac": 0.5794706828,
"autogenerated": false,
"ratio": 4.331222292590247,
... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListCommonFunctionPool(command.Lister):
def get_parser(self, prog_name):
parser = super(ListCommonFunctionPool, self).get_parser(prog_name)
parser.add_argument(
'-... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/common_function_pool.py",
"copies": "1",
"size": "2413",
"license": "apache-2.0",
"hash": -5093416382305313000,
"line_mean": 31.6081081081,
"line_max": 107,
"alpha_frac": 0.5723166183,
"autogenerated": false,
"ratio": 4.189236111111111,
... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListFICGateway(command.Lister):
def get_parser(self, prog_name):
parser = super(ListFICGateway, self).get_parser(prog_name)
return parser
def take_action(self, parsed_arg... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/fic_gateway.py",
"copies": "1",
"size": "1569",
"license": "apache-2.0",
"hash": 2012210649122166800,
"line_mean": 28.0555555556,
"line_max": 80,
"alpha_frac": 0.5729764181,
"autogenerated": false,
"ratio": 3.8740740740740742,
"config_te... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListFICInterface(command.Lister):
def get_parser(self, prog_name):
parser = super(ListFICInterface, self).get_parser(prog_name)
return parser
def take_action(self, parsed... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/fic_interface.py",
"copies": "1",
"size": "1614",
"license": "apache-2.0",
"hash": -4801576263271654000,
"line_mean": 28.3454545455,
"line_max": 75,
"alpha_frac": 0.5768277571,
"autogenerated": false,
"ratio": 3.995049504950495,
"config_... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListFICService(command.Lister):
def get_parser(self, prog_name):
parser = super(ListFICService, self).get_parser(prog_name)
return parser
def take_action(self, parsed_arg... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/fic_service.py",
"copies": "1",
"size": "1553",
"license": "apache-2.0",
"hash": 8577706412482942000,
"line_mean": 27.7592592593,
"line_max": 74,
"alpha_frac": 0.5698647778,
"autogenerated": false,
"ratio": 3.8825,
"config_test": false,
... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListFirewall(command.Lister):
def get_parser(self, prog_name):
parser = super(ListFirewall, self).get_parser(prog_name)
parser.add_argument(
'--admin_username',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/firewall.py",
"copies": "1",
"size": "8759",
"license": "apache-2.0",
"hash": -4617062388556209000,
"line_mean": 31.9285714286,
"line_max": 94,
"alpha_frac": 0.561479621,
"autogenerated": false,
"ratio": 4.264362220058422,
"config_test":... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListFirewallInterface(command.Lister):
def get_parser(self, prog_name):
parser = super(ListFirewallInterface, self).get_parser(prog_name)
parser.add_argument(
'--... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/firewall_interface.py",
"copies": "1",
"size": "6507",
"license": "apache-2.0",
"hash": 6549046000285858000,
"line_mean": 34.7527472527,
"line_max": 101,
"alpha_frac": 0.5567850008,
"autogenerated": false,
"ratio": 4.352508361204014,
"co... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListFirewallPlan(command.Lister):
def get_parser(self, prog_name):
parser = super(ListFirewallPlan, self).get_parser(prog_name)
parser.add_argument(
'--enabled',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/firewall_plan.py",
"copies": "1",
"size": "2782",
"license": "apache-2.0",
"hash": 2778689085068893700,
"line_mean": 29.9111111111,
"line_max": 86,
"alpha_frac": 0.5420560748,
"autogenerated": false,
"ratio": 4.146050670640834,
"config_t... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListGwInterface(command.Lister):
def get_parser(self, prog_name):
parser = super(ListGwInterface, self).get_parser(prog_name)
parser.add_argument(
'--name',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/gateway_interface.py",
"copies": "1",
"size": "11562",
"license": "apache-2.0",
"hash": -6662924737937677000,
"line_mean": 34.6851851852,
"line_max": 83,
"alpha_frac": 0.5455803494,
"autogenerated": false,
"ratio": 4.101454416459737,
"co... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListInterDCGateway(command.Lister):
def get_parser(self, prog_name):
parser = super(ListInterDCGateway, self).get_parser(prog_name)
parser.add_argument(
'--descrip... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/interdc_gateway.py",
"copies": "1",
"size": "2967",
"license": "apache-2.0",
"hash": -315086056217220860,
"line_mean": 32.7159090909,
"line_max": 92,
"alpha_frac": 0.5665655544,
"autogenerated": false,
"ratio": 4.0422343324250685,
"confi... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListInterDCInterface(command.Lister):
def get_parser(self, prog_name):
parser = super(ListInterDCInterface, self).get_parser(prog_name)
parser.add_argument(
'--de... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/interdc_interface.py",
"copies": "1",
"size": "9387",
"license": "apache-2.0",
"hash": 1581033719668678000,
"line_mean": 34.026119403,
"line_max": 98,
"alpha_frac": 0.5570469799,
"autogenerated": false,
"ratio": 4.186886708296164,
"confi... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListInterDCService(command.Lister):
def get_parser(self, prog_name):
parser = super(ListInterDCService, self).get_parser(prog_name)
parser.add_argument(
'--descrip... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/interdc_service.py",
"copies": "1",
"size": "2526",
"license": "apache-2.0",
"hash": -7956025977809950000,
"line_mean": 30.1851851852,
"line_max": 92,
"alpha_frac": 0.554631829,
"autogenerated": false,
"ratio": 4.140983606557377,
"config... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListInternetGateway(command.Lister):
def get_parser(self, prog_name):
parser = super(ListInternetGateway, self).get_parser(prog_name)
parser.add_argument(
'--name... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/internet_gateway.py",
"copies": "1",
"size": "6884",
"license": "apache-2.0",
"hash": 4361586071473457000,
"line_mean": 34.1224489796,
"line_max": 104,
"alpha_frac": 0.5785880302,
"autogenerated": false,
"ratio": 4.167070217917676,
"conf... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListInternetService(command.Lister):
def get_parser(self, prog_name):
parser = super(ListInternetService, self).get_parser(prog_name)
parser.add_argument(
'--name'... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/internet_service.py",
"copies": "1",
"size": "2673",
"license": "apache-2.0",
"hash": -851999534670012500,
"line_mean": 30.4470588235,
"line_max": 94,
"alpha_frac": 0.5570520015,
"autogenerated": false,
"ratio": 4.183098591549296,
"confi... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListLoadBalancer(command.Lister):
def get_parser(self, prog_name):
parser = super(ListLoadBalancer, self).get_parser(prog_name)
parser.add_argument(
'--admin_usern... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/load_balancer.py",
"copies": "1",
"size": "9417",
"license": "apache-2.0",
"hash": -1465924050156055800,
"line_mean": 33.1195652174,
"line_max": 92,
"alpha_frac": 0.5737496018,
"autogenerated": false,
"ratio": 4.323691460055096,
"config_... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListLoadBalancerInterface(command.Lister):
def get_parser(self, prog_name):
parser = super(ListLoadBalancerInterface, self).get_parser(prog_name)
parser.add_argument(
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/load_balancer_interface.py",
"copies": "1",
"size": "6743",
"license": "apache-2.0",
"hash": -6680900187628794000,
"line_mean": 36.0494505495,
"line_max": 114,
"alpha_frac": 0.5671066291,
"autogenerated": false,
"ratio": 4.370058327932599,... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListLoadBalancerPlan(command.Lister):
def get_parser(self, prog_name):
parser = super(ListLoadBalancerPlan, self).get_parser(prog_name)
parser.add_argument(
'--ena... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/load_balancer_plan.py",
"copies": "1",
"size": "3097",
"license": "apache-2.0",
"hash": -1102138603800197800,
"line_mean": 31.6,
"line_max": 99,
"alpha_frac": 0.551501453,
"autogenerated": false,
"ratio": 4.259972489683632,
"config_test"... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListNetwork(command.Lister):
def get_parser(self, prog_name):
parser = super(ListNetwork, self).get_parser(prog_name)
parser.add_argument(
'--description',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/network.py",
"copies": "1",
"size": "7457",
"license": "apache-2.0",
"hash": 913502746324646700,
"line_mean": 31.2813852814,
"line_max": 77,
"alpha_frac": 0.5341290063,
"autogenerated": false,
"ratio": 4.312897628687103,
"config_test": f... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListPhysicalPort(command.Lister):
def get_parser(self, prog_name):
parser = super(ListPhysicalPort, self).get_parser(prog_name)
return parser
def take_action(self, parsed... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/physical_port.py",
"copies": "1",
"size": "1572",
"license": "apache-2.0",
"hash": 1427170492058894000,
"line_mean": 28.1111111111,
"line_max": 78,
"alpha_frac": 0.5756997455,
"autogenerated": false,
"ratio": 4.010204081632653,
"config_t... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListPort(command.Lister):
def get_parser(self, prog_name):
parser = super(ListPort, self).get_parser(prog_name)
return parser
def take_action(self, parsed_args):
... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/network/v2/port.py",
"copies": "1",
"size": "10101",
"license": "apache-2.0",
"hash": 5023280326016932000,
"line_mean": 34.9466192171,
"line_max": 93,
"alpha_frac": 0.535986536,
"autogenerated": false,
"ratio": 4.214017521902378,
"config_te... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListPubicIP(command.Lister):
def get_parser(self, prog_name):
parser = super(ListPubicIP, self).get_parser(prog_name)
return parser
def take_action(self, parsed_args):
... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/network/v2/public_ip.py",
"copies": "1",
"size": "4476",
"license": "apache-2.0",
"hash": 2298323945208923600,
"line_mean": 29.6575342466,
"line_max": 84,
"alpha_frac": 0.5567470956,
"autogenerated": false,
"ratio": 3.9194395796847634,
"con... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListQosOption(command.Lister):
def get_parser(self, prog_name):
parser = super(ListQosOption, self).get_parser(prog_name)
parser.add_argument(
'--id',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/qos_option.py",
"copies": "1",
"size": "4377",
"license": "apache-2.0",
"hash": -8862784697141258000,
"line_mean": 34.016,
"line_max": 83,
"alpha_frac": 0.5453506968,
"autogenerated": false,
"ratio": 4.075418994413408,
"config_test": fal... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListReservedAddress(command.Lister):
def get_parser(self, prog_name):
parser = super(ListReservedAddress, self).get_parser(prog_name)
return parser
def take_action(self, ... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/network/v2/reserved_address.py",
"copies": "2",
"size": "1612",
"license": "apache-2.0",
"hash": -4210429030266911000,
"line_mean": 28.8518518519,
"line_max": 91,
"alpha_frac": 0.5862282878,
"autogenerated": false,
"ratio": 4.10178117048346,
... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListStaticRoute(command.Lister):
def get_parser(self, prog_name):
parser = super(ListStaticRoute, self).get_parser(prog_name)
parser.add_argument(
'--name',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/static_route.py",
"copies": "1",
"size": "8525",
"license": "apache-2.0",
"hash": 4004302176015522300,
"line_mean": 33.1,
"line_max": 83,
"alpha_frac": 0.5451026393,
"autogenerated": false,
"ratio": 4.120347994200096,
"config_test": fals... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListSubnet(command.Lister):
def get_parser(self, prog_name):
parser = super(ListSubnet, self).get_parser(prog_name)
parser.add_argument(
'--cidr',
met... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/subnet.py",
"copies": "1",
"size": "13292",
"license": "apache-2.0",
"hash": -1025131768268292100,
"line_mean": 35.1195652174,
"line_max": 109,
"alpha_frac": 0.5276858261,
"autogenerated": false,
"ratio": 4.238520408163265,
"config_test"... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListVPNGateway(command.Lister):
def get_parser(self, prog_name):
parser = super(ListVPNGateway, self).get_parser(prog_name)
return parser
def take_action(self, parsed_arg... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/network/v2/vpn_gateway.py",
"copies": "2",
"size": "1568",
"license": "apache-2.0",
"hash": -2840496630265420300,
"line_mean": 28.037037037,
"line_max": 84,
"alpha_frac": 0.5733418367,
"autogenerated": false,
"ratio": 3.824390243902439,
"co... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListVPNInterface(command.Lister):
def get_parser(self, prog_name):
parser = super(ListVPNInterface, self).get_parser(prog_name)
return parser
def take_action(self, parsed... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/vpn_interface.py",
"copies": "2",
"size": "1600",
"license": "apache-2.0",
"hash": 2138063752039732500,
"line_mean": 28.6296296296,
"line_max": 88,
"alpha_frac": 0.581875,
"autogenerated": false,
"ratio": 3.9215686274509802,
"config_test... |
from eclcli.common import command
from eclcli.common import utils
from ..networkclient.common import utils as to_obj
class ListVPNService(command.Lister):
def get_parser(self, prog_name):
parser = super(ListVPNService, self).get_parser(prog_name)
return parser
def take_action(self, parsed_arg... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/network/v2/vpn_service.py",
"copies": "2",
"size": "1552",
"license": "apache-2.0",
"hash": -6261380728264311000,
"line_mean": 27.7407407407,
"line_max": 84,
"alpha_frac": 0.5702319588,
"autogenerated": false,
"ratio": 3.7946210268948657,
"config_t... |
from eclcli.common import command
from eclcli.common import utils
class CreateKeypair(command.ShowOne):
"""Create/Import keypair with/without a SSH public key"""
def get_parser(self, prog_name):
parser = super(CreateKeypair, self).get_parser(prog_name)
parser.add_argument(
"keypair... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/bare/v2/keypair.py",
"copies": "1",
"size": "3068",
"license": "apache-2.0",
"hash": 7915387703365880000,
"line_mean": 27.4074074074,
"line_max": 76,
"alpha_frac": 0.5616036506,
"autogenerated": false,
"ratio": 4.174149659863946,
"config_te... |
from eclcli.common import command
from eclcli.common import utils
from ..bareclient.v2 import stocks
class ShowStock(command.ShowOne):
"""Display flavor's stock details"""
def get_parser(self, prog_name):
parser = super(ShowStock, self).get_parser(prog_name)
parser.add_argument(
... | {
"repo_name": "anythingrandom/eclcli",
"path": "eclcli/bare/v2/stock.py",
"copies": "1",
"size": "1232",
"license": "apache-2.0",
"hash": -1379833980975697000,
"line_mean": 29.0487804878,
"line_max": 82,
"alpha_frac": 0.5771103896,
"autogenerated": false,
"ratio": 4.248275862068965,
"config_tes... |
from eclcli.common import command
from eclcli.common import utils
class CreateKeypair(command.ShowOne):
"""Create/Import keypair with/without a SSH public key"""
def get_parser(self, prog_name):
parser = super(CreateKeypair, self).get_parser(prog_name)
parser.add_argument(
"keypai... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/bare/v2/keypair.py",
"copies": "1",
"size": "2941",
"license": "apache-2.0",
"hash": 5919649463170757000,
"line_mean": 26.4859813084,
"line_max": 77,
"alpha_frac": 0.5426725604,
"autogenerated": false,
"ratio": 4.268505079825834,
"config_test": fal... |
from eclcli.common import command
from eclcli.common import utils
class ListGroup(command.Lister):
"""List all groups"""
def get_parser(self, prog_name):
parser = super(ListGroup, self).get_parser(prog_name)
parser.add_argument(
"--contract-id",
metavar="<contract-id>"... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/iam/v1/group.py",
"copies": "1",
"size": "6542",
"license": "apache-2.0",
"hash": 1208920498087805000,
"line_mean": 27.0772532189,
"line_max": 79,
"alpha_frac": 0.513145827,
"autogenerated": false,
"ratio": 4.153650793650794,
"config_test": false,
... |
from eclcli.common import command
from eclcli.common import utils
class ListLicense(command.Lister):
def get_parser(self, prog_name):
parser = super(ListLicense, self).get_parser(prog_name)
parser.add_argument(
"--license-type",
help="License type name as string of whi... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/dh/v2/license.py",
"copies": "1",
"size": "3138",
"license": "apache-2.0",
"hash": 7591304429977276000,
"line_mean": 24.9338842975,
"line_max": 83,
"alpha_frac": 0.5497131931,
"autogenerated": false,
"ratio": 4.128947368421053,
"config_test": false... |
from eclcli.common import command
from eclcli.common import utils
class ListUsage(command.Lister):
def get_parser(self, prog_name):
parser = super(ListUsage, self).get_parser(prog_name)
parser.add_argument(
"--From",
help="Date to list usage from",
metavar='<f... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/dh/v2/usage.py",
"copies": "1",
"size": "2614",
"license": "apache-2.0",
"hash": -6590202331192376000,
"line_mean": 24.1346153846,
"line_max": 95,
"alpha_frac": 0.5172149962,
"autogenerated": false,
"ratio": 4.162420382165605,
"config_test": false,... |
from eclcli.common import command
from eclcli.common import utils
class ShowStock(command.ShowOne):
"""Display flavor's stock details"""
def get_parser(self, prog_name):
parser = super(ShowStock, self).get_parser(prog_name)
parser.add_argument(
"flavor",
metavar="<flav... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/bare/v2/stock.py",
"copies": "1",
"size": "1151",
"license": "apache-2.0",
"hash": -6174041176818441000,
"line_mean": 30.1081081081,
"line_max": 83,
"alpha_frac": 0.5569070374,
"autogenerated": false,
"ratio": 4.359848484848484,
"config_test": fals... |
from eclcli.common import command, utils
class ListServer(command.Lister):
def get_parser(self, prog_name):
parser = super(ListServer, self).get_parser(prog_name)
parser.add_argument(
"--detail",
help="Detailed view of server list",
action='store_true',
... | {
"repo_name": "nttcom/eclcli",
"path": "eclcli/dh/v2/server.py",
"copies": "1",
"size": "6846",
"license": "apache-2.0",
"hash": 8159631058937010000,
"line_mean": 26.7165991903,
"line_max": 79,
"alpha_frac": 0.4983932223,
"autogenerated": false,
"ratio": 4.527777777777778,
"config_test": false,... |
from eclipsegen.preset import Presets
from eclipsegen.generate import EclipseGenerator, EclipseMultiGenerator
class MetaborgEclipseGenerator(object):
spoofaxRepo = 'http://buildfarm.metaborg.org/job/metaborg/job/spoofax-releng/job/master/lastSuccessfulBuild/artifact/dist/spoofax/eclipse/site/'
spoofaxRepoLocal =... | {
"repo_name": "metaborg/spoofax-deploy",
"path": "releng/metaborg/releng/eclipse.py",
"copies": "1",
"size": "2429",
"license": "apache-2.0",
"hash": -8497057201348241000,
"line_mean": 38.8196721311,
"line_max": 146,
"alpha_frac": 0.7488678469,
"autogenerated": false,
"ratio": 2.940677966101695,
... |
from ecluster.node import Node
class NodeList():
def __init__(self, name, provider):
self.name = name
self.nodes = []
self.provider = provider
# Give next index number for type
def num_type(self, type, deleted=False):
num = 1
for node in self.nodes:
if deleted:
# Count only deleted nodes
i... | {
"repo_name": "tiwilliam/ecluster",
"path": "ecluster/nodelist.py",
"copies": "1",
"size": "1435",
"license": "mit",
"hash": 6950414444369611000,
"line_mean": 19.2112676056,
"line_max": 69,
"alpha_frac": 0.6480836237,
"autogenerated": false,
"ratio": 3.0402542372881354,
"config_test": false,
... |
from ecommerce import celery_app
from django.core.mail import send_mail, EmailMultiAlternatives
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.conf import settings
from .models import User
@celery_app.task
def send_acct_confirm_email(uid, url):
if settings... | {
"repo_name": "mikaelm1/ecommerce-api",
"path": "src/authentication/tasks.py",
"copies": "1",
"size": "1232",
"license": "mit",
"hash": 2633819761976698400,
"line_mean": 37.5,
"line_max": 77,
"alpha_frac": 0.6144480519,
"autogenerated": false,
"ratio": 4.134228187919463,
"config_test": false,
... |
from economic.utils import convert_from_camel_case
class EconomicSerializer(object):
id_property_name = 'id'
def __init__(self, auth, object_dict):
self._mutable_fields = {}
self._immutable_fields = {}
self._field_translator = {}
self.auth = auth
for field, value in ob... | {
"repo_name": "KristianOellegaard/python-economic-rest",
"path": "economic/serializer.py",
"copies": "1",
"size": "2267",
"license": "bsd-3-clause",
"hash": 1093653580917212800,
"line_mean": 38.0862068966,
"line_max": 124,
"alpha_frac": 0.5765328628,
"autogenerated": false,
"ratio": 4.09945750452... |
from .ecore import EProxy, EObject, EDataType
from .notification import Notification, Kind
from .ordered_set_patch import ordered_set
from collections.abc import MutableSet, MutableSequence
from typing import Iterable
class BadValueError(TypeError):
def __init__(self, got=None, expected=None, feature=None):
... | {
"repo_name": "pyecore/pyecore",
"path": "pyecore/valuecontainer.py",
"copies": "1",
"size": "15087",
"license": "bsd-3-clause",
"hash": -5503919381215434000,
"line_mean": 34.5825471698,
"line_max": 76,
"alpha_frac": 0.5419897925,
"autogenerated": false,
"ratio": 4.442579505300353,
"config_test... |
from .ecore import EReference, EProxy, EObject
from .notification import Notification, Kind
from .ordered_set_patch import ordered_set
from collections.abc import MutableSet, MutableSequence
class BadValueError(TypeError):
def __init__(self, got=None, expected=None):
msg = "Expected type {0}, but got type... | {
"repo_name": "aranega/pyecore",
"path": "pyecore/valuecontainer.py",
"copies": "1",
"size": "13679",
"license": "bsd-3-clause",
"hash": -6614930985624699000,
"line_mean": 34.2551546392,
"line_max": 76,
"alpha_frac": 0.5528912932,
"autogenerated": false,
"ratio": 4.350826972010178,
"config_test... |
from ecoreleve_server.Models import Base,DBSession
from sqlalchemy import Column, DateTime, Float, ForeignKey, Index, Integer, Numeric, String, Text, Unicode, text,Sequence,orm,and_,text
from sqlalchemy.dialects.mssql.base import BIT
from sqlalchemy.orm import relationship
FieldSizeToClass = {0:'col-md-3',1:'col-md-6'... | {
"repo_name": "NaturalSolutions/NS.Bootstrap",
"path": "Back/ecoreleve_server/GenericObjets/FrontModules.py",
"copies": "1",
"size": "2603",
"license": "mit",
"hash": 2595911798067899400,
"line_mean": 35.661971831,
"line_max": 135,
"alpha_frac": 0.6062235882,
"autogenerated": false,
"ratio": 3.86... |
from ecoreleve_server.Models import Base,DBSession
from sqlalchemy import (Column,
DateTime,
Float,
ForeignKey,
Index,
Integer,
Numeric,
String,
Text,
Unicode,
text,
Sequence,
orm,
and_,
func,
insert,
select,
UniqueConstraint)
from sqlalchemy.dialects.mssql.base import BIT
from sqlalchemy.orm import re... | {
"repo_name": "NaturalSolutions/NS.Bootstrap",
"path": "Back/ecoreleve_server/Models/Station.py",
"copies": "1",
"size": "4312",
"license": "mit",
"hash": 108526080448998740,
"line_mean": 31.9160305344,
"line_max": 116,
"alpha_frac": 0.7217068646,
"autogenerated": false,
"ratio": 3.66355140186915... |
from ecoreleve_server.Models import Base,DBSession,Station
from sqlalchemy import (
Column,
DateTime,
Float,
ForeignKey,
Index,
Integer,
Numeric,
String,
Text,
Unicode,
text,
Sequence,
orm,
and_,
func)
from sqlalchemy.dialects.mssql.base import BIT
... | {
"repo_name": "NaturalSolutions/NS.Bootstrap",
"path": "Back/ecoreleve_server/Models/Protocoles.py",
"copies": "1",
"size": "3821",
"license": "mit",
"hash": -7811661319525877000,
"line_mean": 34.7102803738,
"line_max": 128,
"alpha_frac": 0.721015441,
"autogenerated": false,
"ratio": 3.6529636711... |
from ecoreleve_server.Models import Base,DynPropNames
from sqlalchemy import Column, DateTime, Float, ForeignKey, Index, Integer, Numeric, String, Text, Unicode, text,Sequence
from sqlalchemy.dialects.mssql.base import BIT
from sqlalchemy.orm import relationship
from collections import OrderedDict
from datetime import ... | {
"repo_name": "NaturalSolutions/NS.Bootstrap",
"path": "Back/ecoreleve_server/GenericObjets/ObjectTypeWithDynProp.py",
"copies": "1",
"size": "4897",
"license": "mit",
"hash": 7763866821870181000,
"line_mean": 45.6285714286,
"line_max": 166,
"alpha_frac": 0.6107026144,
"autogenerated": false,
"ra... |
from ecoreleve_server.Models import Base
from sqlalchemy import Column, DateTime, Float, ForeignKey, Index, Integer, Numeric, String, Text, Unicode, text,Sequence
from sqlalchemy.dialects.mssql.base import BIT
from sqlalchemy.orm import relationship
from collections import OrderedDict
from datetime import datetime
from... | {
"repo_name": "NaturalSolutions/NS.Bootstrap",
"path": "Back/ecoreleve_server/GenericObjets/ObjectWithDynProp.py",
"copies": "1",
"size": "7411",
"license": "mit",
"hash": 1685543167115640000,
"line_mean": 38.335106383,
"line_max": 218,
"alpha_frac": 0.5845841785,
"autogenerated": false,
"ratio":... |
from ecoreleve_server.Models import Base
from sqlalchemy import (Column, DateTime, Float,
ForeignKey, Index, Integer, Numeric,
String, Text, Unicode, text,Sequence, select,and_,or_, exists)
from sqlalchemy.dialects.mssql.base import BIT
from sqlalchemy.orm import relationship
from collections import OrderedDict
from... | {
"repo_name": "NaturalSolutions/NS.Bootstrap",
"path": "Back/ecoreleve_server/GenericObjets/ListObjectWithDynProp.py",
"copies": "1",
"size": "5954",
"license": "mit",
"hash": 2433439701975814700,
"line_mean": 35.9813664596,
"line_max": 135,
"alpha_frac": 0.6340275445,
"autogenerated": false,
"ra... |
from ec.packet import *
import types
def test_ECPacketData():
assert ECPacketData((0x02,[(0x02, 3000),(0x01, 5)])) == '\x02\x02\x04\x03\x02\x0b\xb8\x02\x02\x01\x05'
def test_ECPacket():
assert ECPacket((0x02, [(0x02, 'test')])) == '\x00\x00\x00\x22\x00\x00\x00\x0A\x02\x01\x04\x06\x05test\x00'
def test_ECLogi... | {
"repo_name": "unclehook/py3amulecmd",
"path": "tests/packet_tests.py",
"copies": "1",
"size": "1078",
"license": "mit",
"hash": -756413286229740800,
"line_mean": 70.9333333333,
"line_max": 311,
"alpha_frac": 0.6985157699,
"autogenerated": false,
"ratio": 1.6584615384615384,
"config_test": true... |
from ecpy.curves import Curve,Point
ed = Curve.get_curve('Ed25519')
points = (
(0x2657b0657076d1a06becd2d9140aaa789ff605cf7a521c170587f9581c97b1f8, #Py
0x7808bee43e05caed6b84465285bbfbeec62a61b6063df506f4248cca3adb673f), #8Py
(0x3d03f6888c987e79a0ca6331741a0972c373277d00b7fbf7d4b16f67a8355570, #Py
0x3efd96f5fe... | {
"repo_name": "ubinity/ECPy",
"path": "src/ecsnipet/ed25519.py",
"copies": "1",
"size": "1382",
"license": "apache-2.0",
"hash": 7876979357774150000,
"line_mean": 23.6785714286,
"line_max": 74,
"alpha_frac": 0.5767004342,
"autogenerated": false,
"ratio": 2.503623188405797,
"config_test": false,... |
from ecpy.fields import FiniteField, ExtendedFiniteField
from ecpy.utils.util import is_enable_native, _native
from ecpy.utils import modular_square_root
from random import randint
def EllipticCurve(field, *args, **kwargs):
"""
Return Elliptic Curve Instance.
"""
if isinstance(field, FiniteField):
return F... | {
"repo_name": "elliptic-shiho/ecpy",
"path": "ecpy/elliptic_curve/EllipticCurve.py",
"copies": "1",
"size": "9767",
"license": "mit",
"hash": 249118958320135460,
"line_mean": 23.1160493827,
"line_max": 78,
"alpha_frac": 0.5114159926,
"autogenerated": false,
"ratio": 2.734322508398656,
"config_t... |
from ecpy import EllipticCurve, ExtendedFiniteField, symmetric_tate_pairing
import hashlib
import random
import cPickle
# PKI secret
secret = 0xdeadbeef
p = int("501794446334189957604282155189438160845433783392772743395579628617109"
"929160215221425142482928909270259580854362463493326988807453595748573"
... | {
"repo_name": "elliptic-shiho/ecpy",
"path": "examples/id_based_encryption.py",
"copies": "1",
"size": "2834",
"license": "mit",
"hash": -645066374090327700,
"line_mean": 28.8315789474,
"line_max": 79,
"alpha_frac": 0.6023288638,
"autogenerated": false,
"ratio": 2.530357142857143,
"config_test"... |
from ecpy import EllipticCurve, FiniteField, gcd, modinv
from ecpy import EllipticCurveRepository
F, E, G, n = EllipticCurveRepository('secp256k1')
secret = 0xdeadbeef
Q = secret * G
public_info = (E, n, G)
public_key = (Q, )
secret_key = (secret, )
def hash_int(m):
'''
Hashing message and convert to integer
... | {
"repo_name": "elliptic-shiho/ecpy",
"path": "examples/ecdsa.py",
"copies": "1",
"size": "1660",
"license": "mit",
"hash": 2112678330285462500,
"line_mean": 25.7741935484,
"line_max": 127,
"alpha_frac": 0.6042168675,
"autogenerated": false,
"ratio": 2.7759197324414715,
"config_test": false,
"... |
from ecpy import ExtendedFiniteField, EllipticCurve, MapToPoint
from ecpy import symmetric_tate_pairing
import hashlib
import cPickle
# some secret here
secret = 0xdeadbeef
p = int("519130854181216822940010183929228824799903608965854344652247095061840"
"171046331806216450362399027718738907160814923275136184823... | {
"repo_name": "elliptic-shiho/ecpy",
"path": "examples/boneh_lynn_shacham_short_signature.py",
"copies": "1",
"size": "2257",
"license": "mit",
"hash": 93759707790837300,
"line_mean": 29.0933333333,
"line_max": 79,
"alpha_frac": 0.6109880372,
"autogenerated": false,
"ratio": 2.7659313725490198,
... |
from ecpy.utils import gcd, lcm
from .Field import Field, FieldElement
class FractionField(Field):
def __init__(s, ring):
from ecpy.rings.Ring import Ring
assert issubclass(ring.__class__, Ring)
super(FractionField, s).__init__(FractionFieldElement)
s.ring = ring
def _add(s, a, b):
if a[1] ==... | {
"repo_name": "elliptic-shiho/ecpy",
"path": "ecpy/fields/FractionField.py",
"copies": "1",
"size": "2011",
"license": "mit",
"hash": -8058445170437493000,
"line_mean": 22.3837209302,
"line_max": 75,
"alpha_frac": 0.4888115365,
"autogenerated": false,
"ratio": 2.6495388669301714,
"config_test":... |
from ecpy.utils import is_prime, modinv
from .FiniteField import FiniteField
from .Field import Field, FieldElement
from .Zmod import Zmod, ZmodElement
class ExtendedFiniteField(FiniteField):
def __init__(s, p, poly="x^2+1"):
Field.__init__(s, ExtendedFiniteFieldElement)
s.p = s.n = p
if poly == "x^2+1":... | {
"repo_name": "elliptic-shiho/ecpy",
"path": "ecpy/fields/ExtendedFiniteField.py",
"copies": "1",
"size": "3054",
"license": "mit",
"hash": -5012195652154017000,
"line_mean": 22.6744186047,
"line_max": 71,
"alpha_frac": 0.4390962672,
"autogenerated": false,
"ratio": 2.534439834024896,
"config_t... |
from ecpy.utils import modinv, euler_phi
from .Field import Field, FieldElement
class Zmod(Field):
def __init__(s, n):
Field.__init__(s, ZmodElement)
s.n = n
def __repr__(s):
return "%s(%s)" % (s.__class__.__name__, s.n)
def __str__(s, var="n"):
return "%s : %s = %d" % (s.__class__.__name__, v... | {
"repo_name": "elliptic-shiho/ecpy",
"path": "ecpy/fields/Zmod.py",
"copies": "1",
"size": "1201",
"license": "mit",
"hash": 353134205517391740,
"line_mean": 19.0166666667,
"line_max": 60,
"alpha_frac": 0.4962531224,
"autogenerated": false,
"ratio": 2.539112050739958,
"config_test": false,
"h... |
from ecs_deplojo import utils
def test_find_missing_services(cluster, connection):
missing = utils.find_missing_services(
ecs=connection.ecs,
cluster=cluster["cluster"]["clusterName"],
services={"service-1", "service-2"},
)
assert missing == {"service-1", "service-2"}
def test_fi... | {
"repo_name": "LabD/ecs-deplojo",
"path": "tests/test_utils.py",
"copies": "1",
"size": "1766",
"license": "mit",
"hash": 4671852885715223000,
"line_mean": 32.320754717,
"line_max": 76,
"alpha_frac": 0.6642129105,
"autogenerated": false,
"ratio": 4.0691244239631335,
"config_test": false,
"has... |
from ed2d.assets.mtlloader import MTL
from ed2d import files
class OBJ(object):
def __init__(self, fileName):
''' Wavefront .obj file parser.'''
objPath = files.resolve_path('data', 'models', fileName + '.obj')
self.fmvnig = {}
# Shared temporary storage of data
self.tempV... | {
"repo_name": "explosiveduck/ed2d",
"path": "ed2d/assets/objloader.py",
"copies": "1",
"size": "2860",
"license": "bsd-2-clause",
"hash": 7133759034188219000,
"line_mean": 31.1348314607,
"line_max": 85,
"alpha_frac": 0.4727272727,
"autogenerated": false,
"ratio": 4.627831715210356,
"config_test... |
from ed2d import idgen
class View(object):
def __init__(self):
self.sids = idgen.IdGenerator()
self.programs = []
self.uniforms = []
self.uniformIds = []
self.pids = idgen.IdGenerator()
self.projections = []
self.projNames = []
self.progPerProj = [... | {
"repo_name": "explosiveduck/ed2d",
"path": "ed2d/view.py",
"copies": "1",
"size": "1793",
"license": "bsd-2-clause",
"hash": -3746949018288827400,
"line_mean": 27.4603174603,
"line_max": 65,
"alpha_frac": 0.5906302287,
"autogenerated": false,
"ratio": 3.5788423153692617,
"config_test": false,
... |
from ed2d import material
class MTL(object):
def __init__(self, filename):
''' Wavefront .mtl file parser. '''
self.data = {}
self.material = material.Material()
# The file name is passed in with the full path via OBJ parser.
self.__load(filename)
def __load(self, file... | {
"repo_name": "explosiveduck/ed2d",
"path": "ed2d/assets/mtlloader.py",
"copies": "1",
"size": "3028",
"license": "bsd-2-clause",
"hash": 8383964391337218000,
"line_mean": 36.85,
"line_max": 133,
"alpha_frac": 0.5297225892,
"autogenerated": false,
"ratio": 4.234965034965035,
"config_test": fals... |
from ed2d import window
from ed2d import context
from ed2d import sysevents
from ed2d.events import Events
from ed2d import timing
from ed2d.opengl import gl
from ed2d import scenegraph
class GameManager(object):
def __init__(self):
self.width = 800
self.height = 600
self.fullscreen = Fals... | {
"repo_name": "explosiveduck/ed2d",
"path": "framework/game/sgtest.py",
"copies": "1",
"size": "2271",
"license": "bsd-2-clause",
"hash": 7158668538478401000,
"line_mean": 26.6951219512,
"line_max": 71,
"alpha_frac": 0.5816820784,
"autogenerated": false,
"ratio": 3.680713128038898,
"config_test... |
from ed2d import window
from ed2d import sysevents
from ed2d.events import Events
from ed2d import context
from ed2d import timing
from ed2d import files
from ed2d import shaders
from ed2d.opengl import gl
from ed2d.opengl import pgl
from gem import matrix
from ed2d import text
from ed2d import view
from ed2d import me... | {
"repo_name": "explosiveduck/ed2d",
"path": "framework/game/gametestmanager.py",
"copies": "1",
"size": "3731",
"license": "bsd-2-clause",
"hash": -6308486484960668000,
"line_mean": 30.8888888889,
"line_max": 93,
"alpha_frac": 0.5984990619,
"autogenerated": false,
"ratio": 3.4323827046918125,
"... |
from ed2d.opengl import gl, pgl
from ed2d import files
from ed2d import typeutils
from gem import vector
class ShaderBase(object):
def create(self):
self.shader = gl.glCreateShader(self.shaderType)
pgl.glShaderSource(self.shader, self.shaderData)
gl.glCompileShader(self.shader)
st... | {
"repo_name": "explosiveduck/ed2d",
"path": "ed2d/shaders.py",
"copies": "1",
"size": "4380",
"license": "bsd-2-clause",
"hash": 7686225606239711000,
"line_mean": 30.0638297872,
"line_max": 77,
"alpha_frac": 0.597260274,
"autogenerated": false,
"ratio": 3.970988213961922,
"config_test": false,
... |
from ed2d.physics import rectangle
from ed2d.physics import quadtree
class PhysEngine(object):
def __init__(self):
# I would love to have width and height as global constants
self.quadTree = quadtree.QuadTree(0, rectangle.Rectangle(0.0, 0.0, width=800, height=600, flag='QT'))
self.quadTree... | {
"repo_name": "explosiveduck/ed2d",
"path": "ed2d/physics/physengine.py",
"copies": "1",
"size": "1474",
"license": "bsd-2-clause",
"hash": -4798301164195431000,
"line_mean": 30.3617021277,
"line_max": 109,
"alpha_frac": 0.5997286296,
"autogenerated": false,
"ratio": 3.848563968668407,
"config_... |
from ed2d.physics.rectangle import Rectangle
class QuadTree(object):
def __init__(self, lvl, bounds):
self.level = lvl
self.bounds = bounds
self.max_objects = 1
self.max_levels = 5
self.objects = []
self.nodes = []
def clear(self):
self.objects = []
for i in range(len(self.nodes)):
self.nodes[i].... | {
"repo_name": "explosiveduck/ed2d",
"path": "ed2d/physics/quadtree.py",
"copies": "1",
"size": "3263",
"license": "bsd-2-clause",
"hash": -2782977625897166000,
"line_mean": 28.6636363636,
"line_max": 107,
"alpha_frac": 0.6874042292,
"autogenerated": false,
"ratio": 3.0157116451016637,
"config_t... |
from ed2d.scenegraph import SceneGraph
from ed2d.mesh import Mesh
from ed2d import view
from ed2d import files
from ed2d import shaders
from gem import matrix
from ed2d.texture import Texture
from ed2d.events import Events
from ed2d.opengl import pgl, gl
class ElementManager(object):
def __init__(self):
se... | {
"repo_name": "explosiveduck/ed2d",
"path": "ed2d/menu.py",
"copies": "1",
"size": "4826",
"license": "bsd-2-clause",
"hash": 3134866305340051500,
"line_mean": 28.6073619632,
"line_max": 90,
"alpha_frac": 0.5922088686,
"autogenerated": false,
"ratio": 3.504720406681191,
"config_test": false,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.