text
stringlengths
0
1.05M
meta
dict
from enum import Enum import itertools from tensorx.utils import as_list class AT(Enum): """ AT Enum with the moments in a training loop step START ~ STEP ~ END """ START = 0 END = 2 class Event: # __slots__ = [] def __eq__(self, other): """ equals. ...
{ "repo_name": "davidenunes/tensorx", "path": "tensorx/train/callbacks.py", "copies": "1", "size": "11601", "license": "apache-2.0", "hash": 334596218562372500, "line_mean": 27.7866004963, "line_max": 108, "alpha_frac": 0.573226446, "autogenerated": false, "ratio": 4.335201793721973, "config_tes...
from enum import Enum import itertools import copy # shapes must be regularly sized # each unique rotation has a separate entry here class Shapes(Enum): L0 = [(True, False, False), (True, True, True)] L1 = [(False, True), (False, True), (True, True)] L2 = [(True, True, True),...
{ "repo_name": "andrewzwicky/puzzles", "path": "FiveThirtyEightRiddler/2017-01-27/express_tetris.py", "copies": "1", "size": "4391", "license": "mit", "hash": 4344559276878791700, "line_mean": 20.014354067, "line_max": 89, "alpha_frac": 0.4750626281, "autogenerated": false, "ratio": 3.359602142310...
from enum import Enum import itertools import json import warnings from ._util import cheap_repr, for_json class CardClass(Enum): normal = 1 split = 2 flip = 3 double_faced = 4 BFM = 5 def for_json(self): return self.name class MultipartDB: ...
{ "repo_name": "jwodder/envec", "path": "envec/multipart.py", "copies": "1", "size": "2853", "license": "mit", "hash": -5071017781420074000, "line_mean": 26.9705882353, "line_max": 80, "alpha_frac": 0.5366281108, "autogenerated": false, "ratio": 4.245535714285714, "config_test": false, "has_no...
from enum import Enum import itertools import warnings import attr from attr._make import _CountingAttr from .utils import normalize_encoding, MAIN_CLOCK class VarType(Enum): VARIABLE = "variable" INDEX = "index" ON_DEMAND = "on_demand" OBJECT = "object" FOREIGN = "foreign" GROUP = "group" ...
{ "repo_name": "benbovy/xarray-simlab", "path": "xsimlab/variable.py", "copies": "1", "size": "19289", "license": "bsd-3-clause", "hash": -8335099975057868000, "line_mean": 32.0857632933, "line_max": 84, "alpha_frac": 0.638083882, "autogenerated": false, "ratio": 4.246807573756055, "config_test"...
from enum import Enum import itertools import numpy as np import ray from ray.experimental.serve.queues import (CentralizedQueues) from ray.experimental.serve.utils import logger class RandomPolicyQueue(CentralizedQueues): """ A wrapper class for Random policy.This backend selection policy is `Stateless...
{ "repo_name": "stephanie-wang/ray", "path": "python/ray/experimental/serve/policy.py", "copies": "1", "size": "7858", "license": "apache-2.0", "hash": -6982942529136417000, "line_mean": 40.7978723404, "line_max": 79, "alpha_frac": 0.6346398575, "autogenerated": false, "ratio": 4.6801667659321025,...
from enum import Enum import json from collections import namedtuple import requests try: from urllib.parse import urlencode except ImportError: from urllib import urlencode class VisualFeatures(Enum): Categories = "Categories" Tags = "Tags" Description = "Description" Faces = "Faces" Ima...
{ "repo_name": "icoxfog417/pyoxford", "path": "pyoxford/vision_api.py", "copies": "1", "size": "6462", "license": "mit", "hash": 7372367214944764000, "line_mean": 32.3092783505, "line_max": 120, "alpha_frac": 0.5995047973, "autogenerated": false, "ratio": 3.6570458404074704, "config_test": false...
from enum import Enum import json import os import re import youtube_dl from pressurecooker.youtube import YouTubeResource from ricecooker.config import LOGGER # CONSTANTS for YouTube cache ################################################################################ CHEFDATA_DIR = 'chefdata' DEFAULT_YOUTUBE_CACH...
{ "repo_name": "learningequality/ricecooker", "path": "ricecooker/utils/youtube.py", "copies": "1", "size": "6963", "license": "mit", "hash": 8136678336332817000, "line_mean": 42.7924528302, "line_max": 134, "alpha_frac": 0.5908372828, "autogenerated": false, "ratio": 4.159498207885305, "config_...
from enum import Enum import json import redis import fakeredis from solar import utils from solar import errors class RedisDB(object): COLLECTIONS = Enum( 'Collections', 'connection resource state_data state_log events' ) DB = { 'host': 'localhost', 'port': 6379, } ...
{ "repo_name": "dshulyak/solar", "path": "solar/solar/interfaces/db/redis_db.py", "copies": "2", "size": "3710", "license": "apache-2.0", "hash": -1849054424439037400, "line_mean": 25.1267605634, "line_max": 64, "alpha_frac": 0.5735849057, "autogenerated": false, "ratio": 3.7248995983935744, "co...
from enum import Enum import json import shlex import socket import subprocess import sys import os from time import sleep from kafka import KafkaConsumer, KafkaProducer DEBUG = True SOCKET_HOST = '192.168.1.50' SOCKET_PORT = 80 NAME = "" MASTER_NAME = "master" KAFKA_HOST = '192.168.1.50:9092' KAFKA_TOPIC = "clus...
{ "repo_name": "Mwerzen/cluster-controller", "path": "cluster-slave/controller/slavecontroller.py", "copies": "1", "size": "8745", "license": "mit", "hash": 4960175896184265000, "line_mean": 26.5867507886, "line_max": 194, "alpha_frac": 0.6361349342, "autogenerated": false, "ratio": 3.782439446366...
from enum import Enum import json import sys import mistune class State(Enum): INIT = 0 INFO = 1 HEADER = 2 KEYS = 3 ATTRIBUTES = 4 class JsonRenderer(mistune.Renderer): def __init__(self): super().__init__() self.description = [] self.item_name = None self.d...
{ "repo_name": "hryniuk/md2json", "path": "md2json.py", "copies": "1", "size": "2937", "license": "mit", "hash": -7212895018790301000, "line_mean": 21.6, "line_max": 78, "alpha_frac": 0.5447735785, "autogenerated": false, "ratio": 3.87467018469657, "config_test": false, "has_no_keywords": fals...
from enum import Enum import json import time from typing import Any, Optional, Union from .dumplingchef import DumplingChef from .exceptions import InvalidDumpling, InvalidDumplingPayload class DumplingDriver(Enum): """ The event driving the creation of a :class:`Dumpling`. ``DumplingDriver.packet`` ...
{ "repo_name": "mjoblin/netdumplings", "path": "netdumplings/dumpling.py", "copies": "1", "size": "5513", "license": "mit", "hash": 6420099256272037000, "line_mean": 31.8154761905, "line_max": 79, "alpha_frac": 0.5715581353, "autogenerated": false, "ratio": 4.428112449799197, "config_test": fals...
from enum import Enum import json import os import requests from logentries_api.exceptions import ConfigurationException, ServerException class ApiUri(Enum): TAGS = 'tags' ACTIONS = 'actions' HOOKS = 'hooks' class ApiActions(Enum): REGISTER = 'register' LIST = 'list' CREATE = 'create' D...
{ "repo_name": "micahhausler/python-logentries-api", "path": "logentries_api/base.py", "copies": "2", "size": "2485", "license": "mit", "hash": -7001744808393992000, "line_mean": 27.2386363636, "line_max": 94, "alpha_frac": 0.5971830986, "autogenerated": false, "ratio": 4.25513698630137, "config...
from enum import Enum import json class Status(Enum): """ Status problem enumeration. """ UNK = 0 PSN = 1 TOX = 2 PAR = 3 BRN = 4 SLP = 5 FRZ = 6 def infos_for_pokemon(pkm_name): """ Filtrate, regroup and translate data from json files. :param pkm_name: Pokemon's ...
{ "repo_name": "Synedh/showdown-battle-bot", "path": "src/pokemon.py", "copies": "1", "size": "5228", "license": "mit", "hash": 7355533437059445000, "line_mean": 29.0459770115, "line_max": 118, "alpha_frac": 0.536151492, "autogenerated": false, "ratio": 3.750358680057389, "config_test": false, ...
from enum import enum import json Types = enum('NUMERICAL', 'CATEGORICAL_BINARY', 'CATEGORICAL_ORDERED', 'CATEGORICAL_UNORDERED') class Column(object): def __init__(self, attribute=None, header='', type=None, categories=None): self.ATTRIBUTE = attribute self....
{ "repo_name": "nikhilnrng/german-credit-risk", "path": "src/defines.py", "copies": "1", "size": "1036", "license": "mit", "hash": -5895788362293068000, "line_mean": 36, "line_max": 78, "alpha_frac": 0.5492277992, "autogenerated": false, "ratio": 4.389830508474576, "config_test": false, "has_n...
from enum import Enum import libtcodpy as libtcod class FrameState(Enum): Okay = 1 Remove = 2 Hide = 3 Show = 4 class FrameManager: def __init__(self, parent_menu): self.frames = [] self.parent_menu = parent_menu self.should_measure = False def add_frame(self, frame): self.frames.append(frame) def h...
{ "repo_name": "RCIX/RogueP", "path": "ui/frame_manager.py", "copies": "1", "size": "1100", "license": "mit", "hash": 2245376041962663700, "line_mean": 24.5813953488, "line_max": 125, "alpha_frac": 0.6790909091, "autogenerated": false, "ratio": 2.9490616621983916, "config_test": false, "has_no...
from enum import Enum import logging from collections import OrderedDict LOG = logging.getLogger(__name__) class TransformationTypes(Enum): ECS = 'ecs' COMPOSE = 'compose' SYSTEMD = 'systemd' MARATHON = 'marathon' CHRONOS = 'chronos' KUBERNETES = 'kubernetes' class InputTransformationTypes(...
{ "repo_name": "ambitioninc/container-transform", "path": "container_transform/schema.py", "copies": "2", "size": "20981", "license": "mit", "hash": -1748670779892161300, "line_mean": 27.4681139756, "line_max": 63, "alpha_frac": 0.4810542872, "autogenerated": false, "ratio": 4.286210418794688, "...
from enum import Enum import logging import datetime import warnings log = logging.getLogger(__name__) class Attribute: def __init__(self, type, *, name=None): """ :type gives a type or function that parses. :name overrides the field name in the json response. Defaults to field name in cl...
{ "repo_name": "khazhyk/osuapi", "path": "osuapi/dictmodel.py", "copies": "1", "size": "2883", "license": "mit", "hash": 6464022178926266000, "line_mean": 26.7211538462, "line_max": 124, "alpha_frac": 0.6031911204, "autogenerated": false, "ratio": 4.112696148359486, "config_test": false, "has_...
from enum import Enum import logging import datetime log = logging.getLogger(__name__) class Attribute: def __init__(self, type, *, name=None): """ :type gives a type or function that parses. :name overrides the field name in the json response. Defaults to field name in class. """...
{ "repo_name": "Phxntxm/osuapi", "path": "osuapi/dictmodel.py", "copies": "1", "size": "2689", "license": "mit", "hash": -9068538140031456000, "line_mean": 27.0104166667, "line_max": 107, "alpha_frac": 0.598363704, "autogenerated": false, "ratio": 4.156105100463678, "config_test": false, "has_...
from enum import Enum import logging import json _log = logging.getLogger(__name__) ENGINEIO_PROTOCOL = 3; class PacketType(Enum): OPEN = 0; CLOSE = 1; PING = 2; PONG = 3; MESSAGE = 4; UPGRADE = 5; NOOP = 6; class MessageType(Enum): CONNECT = 0; DISCONNECT = 1; EVENT = 2; ...
{ "repo_name": "sarietta/socket.io-pyclient", "path": "socketIO_client/parser.py", "copies": "1", "size": "7503", "license": "mit", "hash": 1335350857791126300, "line_mean": 28.4235294118, "line_max": 94, "alpha_frac": 0.5341863255, "autogenerated": false, "ratio": 3.885551527705852, "config_tes...
from enum import Enum import logging import math import re from utils.messages import ColoredEmbed from discord.ext import commands import lavalink url_rx = re.compile('https?:\/\/(?:www\.)?.+') # noqa: W605 class NoTrackPlayingError(commands.CommandInvokeError): pass class NPEmbedSource(Enum): """Creati...
{ "repo_name": "r-robles/rd-bot", "path": "cogs/music.py", "copies": "1", "size": "14118", "license": "mit", "hash": -6512605365246378000, "line_mean": 34.9007633588, "line_max": 150, "alpha_frac": 0.5887731235, "autogenerated": false, "ratio": 4.061312607944732, "config_test": false, "has_no_...
from enum import Enum import logging import os from pathlib import Path import tempfile from github import UnknownObjectException, GithubException from swaggertosdk.SwaggerToSdkCore import ( get_context_tag_from_git_object, ) from swaggertosdk.SwaggerToSdkNewCLI import generate_sdk_from_git_object from azure_devt...
{ "repo_name": "lmazuel/swagger-to-sdk", "path": "swaggertosdk/restapi/github_handler.py", "copies": "1", "size": "9977", "license": "mit", "hash": 120132007370127180, "line_mean": 35.1485507246, "line_max": 120, "alpha_frac": 0.6123083091, "autogenerated": false, "ratio": 3.556862745098039, "co...
from enum import Enum import logging from ..address_translator import AT l = logging.getLogger(name=__name__) class SymbolType(Enum): """ ABI-agnostic symbol types """ TYPE_OTHER = 0 TYPE_NONE = 1 TYPE_FUNCTION = 2 TYPE_OBJECT = 3 TYPE_SECTION = 4 TYPE_TLS_OBJECT = 5 class Symb...
{ "repo_name": "angr/cle", "path": "cle/backends/symbol.py", "copies": "1", "size": "4158", "license": "bsd-2-clause", "hash": -5740829340367421000, "line_mean": 29.3503649635, "line_max": 121, "alpha_frac": 0.6168831169, "autogenerated": false, "ratio": 4.068493150684931, "config_test": false, ...
from enum import Enum import logging from .constants.codes import CatCode from .reader import Reader from .tokens import AncestryToken from .feedback import strep logger = logging.getLogger(__name__) # CatCodes that should just be made into a char-cat lex token. # That is to say, they do not immediately affect the l...
{ "repo_name": "eddiejessup/nex", "path": "nex/lexer.py", "copies": "1", "size": "10960", "license": "mit", "hash": -7592948756142123000, "line_mean": 39.1465201465, "line_max": 98, "alpha_frac": 0.5511861314, "autogenerated": false, "ratio": 3.9523981247746125, "config_test": false, "has_no_k...
from enum import Enum import logging import dbus try: from gi.repository import GObject except ImportError: import gobject as GObject from .dbus_bluez_interfaces import Characteristic, Service, string_to_dbus_array logger = logging.getLogger(__name__) class BluenetUuids(object): SERVICE = 'FBE51523-B3...
{ "repo_name": "getsenic/senic-hub", "path": "senic_hub/bluenet/bluenet_gatt_service.py", "copies": "1", "size": "8796", "license": "mit", "hash": -6428834500470124000, "line_mean": 34.756097561, "line_max": 106, "alpha_frac": 0.6674624829, "autogenerated": false, "ratio": 3.7239627434377645, "c...
from enum import Enum import logging logger = logging.getLogger(__name__) class MessageType(Enum): INDEX_AGENT = 'Agent' INDEX_CREATIVEWORK = 'CreativeWork' INDEX_TAG = 'Tag' INDEX_SUBJECT = 'Subject' INDEX_SUID = 'suid' class IndexableMessage: PROTOCOL_VERSION = None @classmethod ...
{ "repo_name": "aaxelb/SHARE", "path": "share/search/messages.py", "copies": "2", "size": "1869", "license": "apache-2.0", "hash": -8960895245605961000, "line_mean": 20.9882352941, "line_max": 84, "alpha_frac": 0.5901551632, "autogenerated": false, "ratio": 3.8065173116089612, "config_test": fal...
from enum import Enum import logging LOG = logging.getLogger(__name__) class TransformationTypes(Enum): ECS = 'ecs' FIG = 'fig' COMPOSE = 'compose' SYSTEMD = 'systemd' class InputTransformationTypes(Enum): ECS = 'ecs' FIG = 'fig' COMPOSE = 'compose' class OutputTransformationTypes(Enu...
{ "repo_name": "Inbot/container-transform", "path": "container_transform/schema.py", "copies": "5", "size": "9640", "license": "mit", "hash": -331923852497014340, "line_mean": 24.9139784946, "line_max": 44, "alpha_frac": 0.456846473, "autogenerated": false, "ratio": 4.315129811996419, "config_te...
from enum import Enum import logging log = logging.getLogger(__name__) class EventListenerTarget(Enum): self = 'self' wearer = 'wearer' owner = 'owner' class Rule: def __init__(self, function, direct_object, indirect_object=None): self.function = function self.direct_object = direc...
{ "repo_name": "eevee/flax", "path": "flax/event.py", "copies": "1", "size": "5952", "license": "mit", "hash": -8169871514671272000, "line_mean": 26.3027522936, "line_max": 78, "alpha_frac": 0.607358871, "autogenerated": false, "ratio": 4.133333333333334, "config_test": false, "has_no_keywords...
from enum import Enum import math import numpy as np import torch import warnings from .event_handling import combine_event_functions def _handle_unused_kwargs(solver, unused_kwargs): if len(unused_kwargs) > 0: warnings.warn('{}: Unexpected arguments {}'.format(solver.__class__.__name__, unused_kwargs)) ...
{ "repo_name": "rtqichen/torchdiffeq", "path": "torchdiffeq/_impl/misc.py", "copies": "1", "size": "11534", "license": "mit", "hash": 5092542558542558000, "line_mean": 31.6742209632, "line_max": 120, "alpha_frac": 0.6050806312, "autogenerated": false, "ratio": 3.469915764139591, "config_test": f...
from enum import Enum import math import random import numpy as np ############### # FUNCTIONS # ############### N_FUNS = 15 SUM = 0 SUB = 1 MUL = 2 DIV = 3 EQ = 4 GRT = 5 LRT = 6 ZER = 7 EXP = 8 LOG = 9 ABS = 10 MIN = 11 MAX = 12 POW = 13 AFF = 14 funs_names = {SUM: '+', SUB: '-', M...
{ "repo_name": "telmomenezes/synthetic", "path": "synthetic/prog.py", "copies": "1", "size": "16783", "license": "mit", "hash": -5421039259287486000, "line_mean": 29.0770609319, "line_max": 79, "alpha_frac": 0.4741107073, "autogenerated": false, "ratio": 3.866159870997466, "config_test": false, ...
from enum import Enum import math gameboy = [ (184, 216, 128), (136, 176, 88), (72, 104, 32), (40, 48, 24)] ega = [ (0,0,0), (0,0,170), (0,170,0), (0,170,170), (170,0,0), (170,0,170), (170,85,00), (170,170,170), (85,85,85), (85,85,255), (85,255,85), (...
{ "repo_name": "nicolebranagan/terraformer", "path": "terralib/palette.py", "copies": "1", "size": "1592", "license": "mit", "hash": -7447591672810570000, "line_mean": 15.7578947368, "line_max": 48, "alpha_frac": 0.4189698492, "autogenerated": false, "ratio": 2.2203626220362622, "config_test": f...
from enum import Enum import numpy as np from pyha import Hardware, Sfix, simulate, sims_close class CordicMode(Enum): VECTORING, ROTATION = range(2) class Cordic(Hardware): """ CORDIC algorithm. This is meant for internal use... as the outputs are not in standard format. readable paper -> http://w...
{ "repo_name": "petspats/pyhacores", "path": "pyhacores/cordic/cordic_core.py", "copies": "1", "size": "3592", "license": "apache-2.0", "hash": -4511387721440497000, "line_mean": 33.5384615385, "line_max": 120, "alpha_frac": 0.526169265, "autogenerated": false, "ratio": 3.1647577092511012, "conf...
from enum import Enum import numpy as np from scipy.optimize import minimize from oddt import random_seed from oddt.docking.MCMCUtils import MCMCUtils from oddt.docking.internal import generate_rotor_vector class OptimizationMethod(Enum): """ method of optimization (one of SIMPLEX/NO_OPTIM, NELDER_MEAD or LB...
{ "repo_name": "mkukielka/oddt", "path": "oddt/docking/MCMCAlgorithm.py", "copies": "1", "size": "4284", "license": "bsd-3-clause", "hash": 2717563683306295300, "line_mean": 30.7333333333, "line_max": 112, "alpha_frac": 0.5786647993, "autogenerated": false, "ratio": 3.540495867768595, "config_te...
from enum import Enum import numpy as np import pickle __author__ = 'Gyfis' class ScoringMatrix(Enum): BLOSUM62 = 1 PAM40 = 5 PAM80 = 6 PAM120 = 7 PAM250 = 8 def gap_opening_penalty(self): return { ScoringMatrix.BLOSUM62: -11, ScoringMatrix.PAM40: -10, ...
{ "repo_name": "Gyfis/sequence-comparison", "path": "Modules/alignment.py", "copies": "1", "size": "10399", "license": "mit", "hash": -1475962414816159700, "line_mean": 35.1076388889, "line_max": 159, "alpha_frac": 0.5187037215, "autogenerated": false, "ratio": 3.1937960687960687, "config_test":...
from enum import Enum import numpy as np import acpc_python_client as acpc from cfr.main import Cfr from tools.walk_trees import walk_trees from tools.io_util import read_strategy_from_file from tools.game_utils import copy_strategy from tools.game_tree.builder import GameTreeBuilder from tools.game_tree.node_provide...
{ "repo_name": "JakubPetriska/poker-cfr", "path": "weak_agents/action_tilted_agent.py", "copies": "1", "size": "3260", "license": "mit", "hash": -7890245362991722000, "line_mean": 32.9583333333, "line_max": 113, "alpha_frac": 0.6377300613, "autogenerated": false, "ratio": 3.717217787913341, "con...
from enum import Enum import numpy as np class KEY(Enum): UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3, PICKUP = 4, TRANSFORM = 5, USE_1 = 5, USE_2 = 6, USE_3 = 7, USE_4 = 8, USE_5 = 9, QUIT = 'q' WHITE = (255, 255, 255) LIGHT = (196, 196, 196) GREEN = (80, 160, 0) DARK = (1...
{ "repo_name": "srsohn/subtask-graph-execution-light", "path": "sge/utils.py", "copies": "1", "size": "1105", "license": "mit", "hash": -2781142511700183600, "line_mean": 19.8490566038, "line_max": 65, "alpha_frac": 0.563800905, "autogenerated": false, "ratio": 2.735148514851485, "config_test": ...
from enum import Enum import OperatingSystemClasses import re class OperatingSystemFamilies(Enum): WINDOWS = ("WINDOWS", OperatingSystemClasses.OperatingSystemClasses.DESKTOP) WINDOWSSERVER = ("WINDOWS SERVER", OperatingSystemClasses.OperatingSystemClasses.SERVER) WINDOWSMOBILE = ("WINDOWS Mobile", OperatingSystem...
{ "repo_name": "PC-fit-Christian-Rupp/Enumeration-OS", "path": "Python/OperatingSystemFamilies.py", "copies": "1", "size": "2219", "license": "mit", "hash": -2972849801338821000, "line_mean": 40.0925925926, "line_max": 97, "alpha_frac": 0.7634069401, "autogenerated": false, "ratio": 3.331831831831...
from enum import Enum import OperatingSystemFamilies import re class OperatingSystems(Enum): # WINDOWS Desktop Family XP = ("XP", '5.1', OperatingSystemFamilies.OperatingSystemFamilies.WINDOWS) VISTA = ("Vista", '6.0', OperatingSystemFamilies.OperatingSystemFamilies.WINDOWS) SEVEN = ("7", '6.1', OperatingSystemF...
{ "repo_name": "PC-fit-Christian-Rupp/Enumeration-OS", "path": "Python/OperatingSystems.py", "copies": "1", "size": "15063", "license": "mit", "hash": -8156951461821955000, "line_mean": 65.3568281938, "line_max": 342, "alpha_frac": 0.7849697935, "autogenerated": false, "ratio": 2.8751670166062224,...
from enum import Enum import operator from tinypy.AST.ast import Expression, MemoryContext from tinypy import runtime """ # Binary arithmetic, bitwise and logic operations """ class BinOp(Expression): def __init__(self, left:Expression, right:Expression): super().__init__() self.left = left ...
{ "repo_name": "maxmalysh/tiny-py-interpreter", "path": "tinypy/AST/expr.py", "copies": "1", "size": "7719", "license": "mit", "hash": 2800757003775650000, "line_mean": 22.9009287926, "line_max": 74, "alpha_frac": 0.5723539319, "autogenerated": false, "ratio": 3.8711133400200604, "config_test": ...
from enum import Enum import osClasses import re class osFamily(Enum): WINDOWS = ("WINDOWS", osClasses.osClasses.DESKTOP) WINDOWSSERVER = ("WINDOWS SERVER", osClasses.osClasses.SERVER) UBUNTU = ("Ubuntu", osClasses.osClasses.DESKTOP) UBUNTUSERVER = ("Ubuntu Server", osClasses.osClasses.SERVER) LINUX = ("Linux", ...
{ "repo_name": "PC-fit-Christian-Rupp/serverstatepage", "path": "code/testroutine/enums/osFamily.py", "copies": "1", "size": "1681", "license": "mit", "hash": -4069157173702479400, "line_mean": 51.53125, "line_max": 249, "alpha_frac": 0.747769185, "autogenerated": false, "ratio": 3.107208872458410...
from enum import Enum import osFamily class ops(Enum): # WINDOWS Desktop Family XP = ("XP", 5.1, osFamily.osFamily.WINDOWS) VISTA = ("Vista", 6.0, osFamily.osFamily.WINDOWS) SEVEN = ("7", 6.1, osFamily.osFamily.WINDOWS) EIGHT = ("8", 6.2, osFamily.osFamily.WINDOWS) EIGHTONE = ("8.1", 6.3, osFamily.osFamily.WIN...
{ "repo_name": "PC-fit-Christian-Rupp/serverstatepage", "path": "code/testroutine/enums/ops.py", "copies": "1", "size": "7611", "license": "mit", "hash": -2067746885198487800, "line_mean": 49.4039735099, "line_max": 205, "alpha_frac": 0.7252660623, "autogenerated": false, "ratio": 2.55745967741935...
from enum import Enum import os import Convert import ArduinoHelper import SerialController import GPIOController class ViewTypes(Enum): ARDUINO = 0 CONSOLE = 1 GPIO = 2 class ViewController: def __init__(self, type): self.view_type = type self.serial = None self.gpio = None ...
{ "repo_name": "fsikansi/simple-dash-pcars", "path": "ViewController.py", "copies": "1", "size": "2509", "license": "mit", "hash": -8718223439258291000, "line_mean": 42.2586206897, "line_max": 96, "alpha_frac": 0.4934236748, "autogenerated": false, "ratio": 4.059870550161812, "config_test": fals...
from enum import Enum import os import numpy as np import exdir try: import ruamel_yaml as yaml except ImportError: import ruamel.yaml as yaml from .mode import assert_file_open, OpenMode, assert_file_writable def _quote_strings(value): if isinstance(value, str): return yaml.scalarstring.DoubleQuo...
{ "repo_name": "CINPLA/exdir", "path": "exdir/core/attribute.py", "copies": "1", "size": "7047", "license": "mit", "hash": -4903050265826090000, "line_mean": 29.375, "line_max": 116, "alpha_frac": 0.5511565205, "autogenerated": false, "ratio": 4.283890577507599, "config_test": false, "has_no_k...
from enum import Enum import os import re import pkgutil import markdown from markdown.extensions import __path__ as extpath from markdown.extensions.headerid import slugify, unique from PyQt5.QtCore import Qt from PyQt5 import QtCore, QtGui, QtWidgets """ from PyQt4.QtCore import Qt, QFile, QRect from PyQt4.QtGui im...
{ "repo_name": "kekh/mikidown", "path": "mikidown/utils.py", "copies": "2", "size": "8346", "license": "mit", "hash": -2635659519879746600, "line_mean": 31.2239382239, "line_max": 122, "alpha_frac": 0.5821950635, "autogenerated": false, "ratio": 3.5712451861360717, "config_test": false, "has_n...
from enum import Enum import os import CLI directory = os.getcwd() class State(Enum): NOMINAL = 0 DEBUG_BASIC = 1 DEBUG_VERBOSE = 2 TEST = 3 class BuilderRequirements(Enum): AS_IS = 0 REQUIRES_ADDRESS = 1 REQUIRES_DESCRIPTION = 2 REQUIRES_COMPLETE = 3 class GlobalConstants: PYTE...
{ "repo_name": "DerekYu177/ExpenseManager", "path": "modules/shared.py", "copies": "1", "size": "1138", "license": "mit", "hash": -7649287669465029000, "line_mean": 26.756097561, "line_max": 78, "alpha_frac": 0.6748681898, "autogenerated": false, "ratio": 3.2514285714285713, "config_test": false...
from enum import Enum import os try: import pathlib except ImportError as e: try: import pathlib2 as pathlib except ImportError: raise e from . import constants as exob VALID_CHARACTERS = ("abcdefghijklmnopqrstuvwxyz1234567890_-.") class NamingRule(Enum): SIMPLE = 1 STRICT = 2 ...
{ "repo_name": "CINPLA/exdir", "path": "exdir/core/validation.py", "copies": "1", "size": "3271", "license": "mit", "hash": -4071785214946500600, "line_mean": 26.0330578512, "line_max": 96, "alpha_frac": 0.6218281871, "autogenerated": false, "ratio": 3.8392018779342725, "config_test": false, "...
from enum import Enum import os.path from .utils import get_bytes_needed class EncodedValue: def __init__(self, name, value): self.name = name self.value = value def nr_bytes(self): return len(self.encode()) def __repr__(self): return '{}(name={}, value={})'.format(self...
{ "repo_name": "eddiejessup/nex", "path": "nex/dampf/dvi_spec.py", "copies": "1", "size": "27379", "license": "mit", "hash": 1138065428770869200, "line_mean": 35.4567243675, "line_max": 134, "alpha_frac": 0.6172979291, "autogenerated": false, "ratio": 3.1666666666666665, "config_test": false, ...
from enum import Enum import pandas as pd class FeatureOpType(Enum): CATEGORICAL = 'categorical' CONTINUOUS = 'continuous' class FeatureType(Enum): DOUBLE = 'double' INT = 'integer' STRING = 'string' class InvalidValueTreatment(Enum): AS_IS = 'asIs' class Feature(object): def __init_...
{ "repo_name": "YuHuaCheng/sklearn-pmml", "path": "sklearn_pmml/convert/features.py", "copies": "2", "size": "5868", "license": "mit", "hash": -6705048664129206000, "line_mean": 27.7696078431, "line_max": 129, "alpha_frac": 0.6390593047, "autogenerated": false, "ratio": 4.469154607768469, "confi...
from enum import Enum import pandas as pd class PerfStats(Enum): ANN_RETURN = "annualised return" ANN_VOL = "annualised vol" SHARPE = "Sharpe ratio" MAX_DD = "max drawdown" CALMAR = "Calmar ratio" SKEWNESS = "skewness" KURTOSIS = "kurtosis" class Performance(object): def __init__(sel...
{ "repo_name": "nekopuni/adagio", "path": "adagio/stats/performance.py", "copies": "1", "size": "2444", "license": "mit", "hash": -170402584857160640, "line_mean": 31.1578947368, "line_max": 73, "alpha_frac": 0.5904255319, "autogenerated": false, "ratio": 3.2200263504611333, "config_test": false...
from enum import Enum import paramiko from paramiko import PasswordRequiredException from margaritashotgun.exceptions import AuthenticationMissingUsernameError from margaritashotgun.exceptions import AuthenticationMethodMissingError class AuthMethods(Enum): key = 'key' password = 'password' class Auth(): ...
{ "repo_name": "ThreatResponse/margaritashotgun", "path": "margaritashotgun/auth.py", "copies": "2", "size": "1768", "license": "mit", "hash": -7388794109382297000, "line_mean": 30.0175438596, "line_max": 75, "alpha_frac": 0.6131221719, "autogenerated": false, "ratio": 4.778378378378378, "config...
from enum import Enum import pdb from ctypes import c_int8 import drawille import logging logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(name='gpu') class GPU: """ GPU for the gameboy thanks to: https://github.com/zeta0134/luagb Attributes ---------- clock : int keeps...
{ "repo_name": "tomis007/pyboi", "path": "pyboi/gpu/gpu.py", "copies": "1", "size": "14590", "license": "mit", "hash": 8053471375406876000, "line_mean": 31.3503325942, "line_max": 96, "alpha_frac": 0.5155586018, "autogenerated": false, "ratio": 3.7574040690187998, "config_test": false, "has_no...
from enum import Enum import pyopencl as cl class CLArgType(Enum): """Type for the parameters of functions""" float32 = 1, float32_array = 2, int32 = 3, int32_array = 4, bool = 5, bool_array = 6 def get_element_byte_size(t): if t in [CLArgType.float32, CLArgType.float32_array, ...
{ "repo_name": "ToraxXx/pytocl", "path": "src/pytocl/descriptors.py", "copies": "1", "size": "6553", "license": "mit", "hash": 8958902735900660000, "line_mean": 33.6772486772, "line_max": 139, "alpha_frac": 0.6361971616, "autogenerated": false, "ratio": 3.838898652606913, "config_test": false, ...
from enum import Enum import PySide.QtGui as QtGui import sys import yaml class CONFIG(object): BROADCAST_IP = '' NETWORK_DRIVE = '' OTREE_EXEC = '' class Ternary(Enum): OFF = 0 ON = 1 UNKNOWN = 2 def loadYAML(path): with open(path, 'r') as f: try: content = yaml.lo...
{ "repo_name": "AWI-Lab/awidom", "path": "awidom/utils.py", "copies": "1", "size": "1054", "license": "mit", "hash": 8872736577194792000, "line_mean": 22.9545454545, "line_max": 63, "alpha_frac": 0.6707779886, "autogenerated": false, "ratio": 3.6982456140350877, "config_test": false, "has_no_k...
from enum import Enum import random from random import shuffle class CardColor(Enum): """Enumeration of colors of UNO cards.""" RED = 1 YELLOW = 2 GREEN = 3 BLUE = 4 BLACK = 5 class CardType(Enum): """Enumeration of types of UNO cards.""" ZERO = 0 ONE = 1 TWO = 2 THREE = ...
{ "repo_name": "UnlikeSuika/UNO", "path": "uno.py", "copies": "1", "size": "24046", "license": "mit", "hash": -1507959185287225300, "line_mean": 32.9632768362, "line_max": 80, "alpha_frac": 0.4634450636, "autogenerated": false, "ratio": 4.251414427157002, "config_test": false, "has_no_keywords...
from enum import Enum import random import bisect from math import log class Direction(Enum): LEFT = -1 START = 0 RIGHT = 1 class NotFoundException(Exception): pass class OrderException(Exception): pass class _State: def __init__(self, left, cursor, right): self.left = left s...
{ "repo_name": "Dicotomix/DicotomixNewSrv", "path": "dicotomix.py", "copies": "1", "size": "5078", "license": "mit", "hash": 6014252002845159000, "line_mean": 36.8955223881, "line_max": 104, "alpha_frac": 0.5675462781, "autogenerated": false, "ratio": 4.036565977742448, "config_test": false, "...
from enum import Enum import random import itertools import operator from functools import reduce Number = Enum('number', ('one', 'two', 'three')) Color = Enum('color', ('red', 'green', 'blue')) Shading = Enum('shading', ('empty', 'striped', 'solid')) Shape = Enum('shape', ('oval', 'diamond', 'squiggle')) game_attrs ...
{ "repo_name": "jharris119/set-game", "path": "app/setutils.py", "copies": "1", "size": "10812", "license": "mit", "hash": 5250632212921782000, "line_mean": 29.1169916435, "line_max": 113, "alpha_frac": 0.5820384758, "autogenerated": false, "ratio": 3.90465872156013, "config_test": false, "has...
from enum import Enum import random import math import functools class BaseCell: def __init__(self): pass def clk(self): pass class OutputType(Enum): async = 0 sync = 1 class CellType(Enum): _and = 0 _or = 1 _xor = 2 _xnor = 2 _nand = 3 _nor = 4 @staticmethod def randOpType(): ...
{ "repo_name": "nosnhojn/poser", "path": "model/model.py", "copies": "1", "size": "8454", "license": "bsd-3-clause", "hash": -7268290161099117000, "line_mean": 27.0863787375, "line_max": 152, "alpha_frac": 0.5744026496, "autogenerated": false, "ratio": 3.561078348778433, "config_test": false, ...
from enum import Enum import random class ResourceType(Enum): WOOD = 1 STONE = 2 IRON = 3 RABBIT = 4 DEER = 5 class ResourceDefinition: def __init__(self, type, successRate, min, maxUnproductive, maxProductive): self.type = type self.successRate = successRate self.min =...
{ "repo_name": "ldesrosi/king-of-the-jungle", "path": "kotj/resource.py", "copies": "1", "size": "1034", "license": "mit", "hash": 1321390297033728300, "line_mean": 23.619047619, "line_max": 79, "alpha_frac": 0.6015473888, "autogenerated": false, "ratio": 3.640845070422535, "config_test": false,...
from enum import Enum import random from django.db import models from django.db.models import signals from django.dispatch import receiver from django.utils.text import slugify from django.core.urlresolvers import reverse from . import public_name_data class Resource(models.Model): class Type(Enum): int...
{ "repo_name": "thomasleese/rooster", "path": "scheduler/models.py", "copies": "1", "size": "5414", "license": "mit", "hash": -5510639964390039000, "line_mean": 31.8121212121, "line_max": 77, "alpha_frac": 0.6287403029, "autogenerated": false, "ratio": 4.101515151515152, "config_test": false, ...
from enum import Enum import random class Action(Enum): UP = "U" DOWN = "D" NONE = " " """ This class is a template. Extensions of this class should implement the "step" method """ class Agent: def __init__(self): self.score = 0 self.bat_y = 0.5 # this value is a fraction of the screen height self.bat_hei...
{ "repo_name": "LewisSarcasm/PingAI", "path": "api/api.py", "copies": "1", "size": "2660", "license": "mit", "hash": 2588941463901382000, "line_mean": 24.8252427184, "line_max": 112, "alpha_frac": 0.612406015, "autogenerated": false, "ratio": 2.5825242718446604, "config_test": false, "has_no_k...
from enum import Enum import random, pdb from MTG import gameobject from MTG import cards from MTG import card from MTG import permanent from MTG import triggers class ZoneType(Enum): LIBRARY = 0 HAND = 1 BATTLEFIELD = 2 GRAVEYARD = 3 STACK = 4 EXILE = 5 # COMMAND = 6 def str_to_zone_typ...
{ "repo_name": "wanqizhu/mtg-python-engine", "path": "MTG/zone.py", "copies": "1", "size": "6596", "license": "mit", "hash": -6009863090153415000, "line_mean": 26.2561983471, "line_max": 103, "alpha_frac": 0.5513947847, "autogenerated": false, "ratio": 4.03671970624235, "config_test": false, "...
from enum import Enum import re import string import synonyms class OperationType(Enum): """An Enum representing the type of operation the user wants to perform""" SEARCH = 0 UPDATE = 1 UPDATE_INCREMENT = 2 ADD = 3 DELETE = 4 VIEW_LIST = 5 class UpdateModifier(Enum): """An Enum repr...
{ "repo_name": "amrishparmar/mal_cl_interface", "path": "nl_interface/query_processing.py", "copies": "1", "size": "20569", "license": "mit", "hash": 3572177570630456000, "line_mean": 41.5859213251, "line_max": 119, "alpha_frac": 0.5155817006, "autogenerated": false, "ratio": 3.938158146659008, ...
from enum import Enum import re class Color(Enum): # The first name on each line is the "canonical" name for the value. COLORLESS = 0 W = WHITE = 0b00001 U = BLUE = 0b00010 B = BLACK = 0b00100 R = RED = 0b01000 G = GREEN = 0b10000 WU = UW = AZORIUS = W | U WB = BW = ORZHOV ...
{ "repo_name": "jwodder/envec", "path": "envec/color.py", "copies": "1", "size": "4644", "license": "mit", "hash": -3950436769510294000, "line_mean": 25.8439306358, "line_max": 80, "alpha_frac": 0.5096899225, "autogenerated": false, "ratio": 2.9826589595375723, "config_test": false, "has_no_ke...
from enum import Enum import re class exists(object): def __init__(self, typ=None): self.typ = typ def __eq__(self, other): if self.typ: return bool(other) and isinstance(other, self.typ) else: return bool(other) class exact(object): def __init__(self, pattern): self.pattern = pattern class deepexa...
{ "repo_name": "dgreisen-cfpb/dc-code-prototype-tools", "path": "matchers.py", "copies": "1", "size": "5891", "license": "unlicense", "hash": 8883177459842278000, "line_mean": 23.143442623, "line_max": 135, "alpha_frac": 0.5920896282, "autogenerated": false, "ratio": 2.7592505854800935, "config_...
from enum import Enum import re class OutputTypes: """Class representing visible output types""" class Types(Enum): """Types""" Stdout = 1 Stderr = 2 Result = 3 Image = 4 Pdf = 5 def __init__(self, types_str): """Initialization from string""" ...
{ "repo_name": "jablonskim/jupyweave", "path": "jupyweave/settings/output_types.py", "copies": "1", "size": "1920", "license": "mit", "hash": -3632468921129241600, "line_mean": 26.0422535211, "line_max": 81, "alpha_frac": 0.5713541667, "autogenerated": false, "ratio": 3.9669421487603307, "config...
from enum import Enum import re try: import requests except ImportError: raise RuntimeError('Requests is required for hibp.') try: import gevent from gevent import monkey from gevent.pool import Pool except ImportError: raise RuntimeError('Gevent is required for hibp.') monkey.patch_all(threa...
{ "repo_name": "pegasos1/haveibeenpwned", "path": "hibp/hibp.py", "copies": "1", "size": "6889", "license": "apache-2.0", "hash": 3141243729446477300, "line_mean": 31.0418604651, "line_max": 96, "alpha_frac": 0.5874582668, "autogenerated": false, "ratio": 4.22638036809816, "config_test": false, ...
from enum import Enum import requests class Abroad(): URL_FORMAT = "http://webservice.recruit.co.jp/ab-road/{0}/v1/" def __init__(self, api_key): self.api_key = api_key def get_city(self, city_code): from application.models.spot import City url = self.URL_FORMAT.format("city") ...
{ "repo_name": "icoxfog417/enigma_abroad", "path": "application/service/abroad.py", "copies": "1", "size": "2286", "license": "mit", "hash": -3219476619841769000, "line_mean": 23.3191489362, "line_max": 87, "alpha_frac": 0.5069991251, "autogenerated": false, "ratio": 3.6930533117932147, "config_...
from enum import Enum import requests class Errors(Enum): CONNECTION_ERROR = (1000, "ConnectionError") INTEGRITY_ERROR = (1001, "IntegrityError") NOT_FOUND_ERROR = (1002, "NotFoundError") class Error(Exception): def __init__(self, code, message): self.code = code self.message = mess...
{ "repo_name": "leandroberetta/regis", "path": "regis/error.py", "copies": "1", "size": "1101", "license": "apache-2.0", "hash": 5595617866691485000, "line_mean": 21.02, "line_max": 65, "alpha_frac": 0.6203451408, "autogenerated": false, "ratio": 4.123595505617978, "config_test": false, "has_n...
from enum import Enum import string from io import IOBase from ..errors import * # # Constants # Node = None class Node: links = None token_type = None verify = None def __init__(self, links:[(Node, "func"),] = None, token_type = None, verify = None): links = links or [] self.links =...
{ "repo_name": "CameronLonsdale/jam", "path": "compiler/jam/lexer.py", "copies": "2", "size": "7865", "license": "mit", "hash": 4962932343393522000, "line_mean": 24.8717105263, "line_max": 159, "alpha_frac": 0.589955499, "autogenerated": false, "ratio": 3.220720720720721, "config_test": false, ...
from enum import Enum import sys from pymech.print import Latex from pymech.units.SI import * class Category(Enum): STEEL = 1 PLASTIC = 2 FLUID = 3 class Material: name: str = '' id: str category: Category _T = 293.15 * ureg['K'] _rho = {20.: 7800. * ureg['kg/m**3']} _density_fu...
{ "repo_name": "peer23peer/pymech", "path": "pymech/materials/Material.py", "copies": "1", "size": "3133", "license": "mit", "hash": -3701752485837287400, "line_mean": 26.4824561404, "line_max": 119, "alpha_frac": 0.510373444, "autogenerated": false, "ratio": 3.343649946638207, "config_test": fa...
from enum import Enum import sys import numpy as np from pymech.units.SI import ureg, g from pymech.materials.Fluid import Fluid from pymech.fluid.Pipe import * import pymech.print.Latex as Latex class Regime(Enum): LAMINAR = 1 TURBULENT = 2 TRANSITIONAL = 3 def Reynolds(v, D, rho=None, mu=None, nu=Non...
{ "repo_name": "peer23peer/pymech", "path": "pymech/fluid/Core.py", "copies": "1", "size": "5295", "license": "mit", "hash": 7607659199853028000, "line_mean": 28.5810055866, "line_max": 117, "alpha_frac": 0.4968838527, "autogenerated": false, "ratio": 2.9564489112227808, "config_test": false, ...
from enum import Enum import sys from graphene.commands.command import Command from graphene.utils import PrettyPrinter, CmdTimer from graphene.storage import GeneralStore from graphene.storage import StorageManager class ShowCommand(Command): class ShowType(Enum): TYPES = 1 RELATIONS = 2 def...
{ "repo_name": "PHB-CS123/graphene", "path": "graphene/commands/show_command.py", "copies": "1", "size": "2126", "license": "apache-2.0", "hash": 5610061879632821000, "line_mean": 34.4333333333, "line_max": 77, "alpha_frac": 0.6011288805, "autogenerated": false, "ratio": 4.31237322515213, "confi...
from enum import Enum import threading import random from battle_mode import * from battle_messaging import * from mon_type import * from pokemon import * from move import * class Battle(threading.Thread): def __init__(self, battle_mode, inverse = False): self.message_bu...
{ "repo_name": "TheWayADrillWorks/RMP", "path": "battle_engine/battle.py", "copies": "1", "size": "13666", "license": "mit", "hash": -3110142316332125000, "line_mean": 36.543956044, "line_max": 117, "alpha_frac": 0.5283184546, "autogenerated": false, "ratio": 4.124962269846061, "config_test": fa...
from enum import Enum import time from collections import defaultdict from nltk.corpus import stopwords from dataanalysis import nlp_utils as nlp from ontomatch import glove_api from ontomatch import ss_utils as SS from datasketch import MinHash, MinHashLSH from knowledgerepr.networkbuilder import LSHRandomProjectionsI...
{ "repo_name": "mitdbg/aurum-datadiscovery", "path": "ontomatch/matcher_lib.py", "copies": "1", "size": "71844", "license": "mit", "hash": -2789889399198793000, "line_mean": 42.3056057866, "line_max": 154, "alpha_frac": 0.544582707, "autogenerated": false, "ratio": 3.6799672181529477, "config_te...
from enum import Enum import time import copy import sys import subprocess import random from threading import Thread def monitorFile(connection, queue): while True: try: line = connection.readline() except: break if not line: queue.append(None) break line = line.rstrip("\n") queue.append(line)...
{ "repo_name": "HMProgrammingClub/NYCSL", "path": "problems/workers/Tron_Environment.py", "copies": "1", "size": "5979", "license": "mit", "hash": 2779986849030093300, "line_mean": 29.9792746114, "line_max": 199, "alpha_frac": 0.6736912527, "autogenerated": false, "ratio": 2.9294463498285155, "c...
from enum import Enum import time from fysom import Fysom, FysomError # WIP(joey): Fysom is not thread safe -- multiple threads could theoretically traverse # WIP(joey): the same state transition simultaneously. from app.util import log class BuildState(str, Enum): """Possible states for the FSM""" QUEUED =...
{ "repo_name": "box/ClusterRunner", "path": "app/master/build_fsm.py", "copies": "2", "size": "8965", "license": "apache-2.0", "hash": 3454948320217302000, "line_mean": 40.5046296296, "line_max": 113, "alpha_frac": 0.491912995, "autogenerated": false, "ratio": 4.5646639511201625, "config_test": ...
from enum import Enum import time PizzaProgress = Enum('PizzaProgress', 'queued preparation baking ready') PizzaDough = Enum('PizzaDough', 'thin thick') PizzaSauce = Enum('PizzaSauce', 'tomato creme_fraiche') PizzaTopping = Enum('PizzaTopping', 'mozzarella double_mozzarella bacon ham mushrooms red_onion oregano') STEP...
{ "repo_name": "wy36101299/Mastering-Python-Design-Patterns-Example", "path": "9324OS_02_code/builder.py", "copies": "1", "size": "4405", "license": "mit", "hash": 7200359191556653000, "line_mean": 35.3719008264, "line_max": 112, "alpha_frac": 0.6398545785, "autogenerated": false, "ratio": 3.34422...
from enum import Enum import typing from uuid import uuid4 from pydantic import BaseModel, Field, validator from opentrons.calibration.check import models as calibration_models from opentrons.calibration.check.session import CalibrationCheckTrigger from robot_server.service.json_api import \ ResponseDataModel, Re...
{ "repo_name": "OpenTrons/opentrons_sdk", "path": "robot-server/robot_server/service/session/models.py", "copies": "1", "size": "3451", "license": "apache-2.0", "hash": 500511766888120800, "line_mean": 28, "line_max": 77, "alpha_frac": 0.7090698348, "autogenerated": false, "ratio": 4.2343558282208...
from enum import Enum import uuid import logging from pydispatch import dispatcher from navi.core import (Navi, get_handler_for, get_intent_and_fill_slots) from navi import context as ctx from navi.intents import Intent from navi.handlers import IntentHandler from navi import responses logger = logging.getLogger(__...
{ "repo_name": "leosampaio/navi-framework", "path": "navi/conversational/__init__.py", "copies": "1", "size": "9910", "license": "bsd-3-clause", "hash": -3176629707655125500, "line_mean": 30.4603174603, "line_max": 76, "alpha_frac": 0.6114026236, "autogenerated": false, "ratio": 4.350307287093942,...
from enum import Enum import warnings import random import numpy as np from igraph import Graph, ALL, IN, OUT from synthetic.consts import DEFAULT_MAX_DIST import synthetic.prog as prog class GenVar(Enum): ORIGID = 0 TARGID = 1 ORIGDEG = 2 ORIGINDEG = 3 ORIGOUTDEG = 4 TARGDEG = 5 TARGINDEG...
{ "repo_name": "telmomenezes/synthetic", "path": "synthetic/generator.py", "copies": "1", "size": "8809", "license": "mit", "hash": 2391903648044379000, "line_mean": 31.1496350365, "line_max": 77, "alpha_frac": 0.5765694176, "autogenerated": false, "ratio": 3.4722112731572725, "config_test": fal...
from enum import Enum __all__ = ["Metric", "AbundanceMetric", "AlphaDiversityMetric", "BetaDiversityMetric"] class BaseEnum(str, Enum): @classmethod def has_value(cls, value): return value in cls.values() @classmethod def values(cls): return [e.value for e in cls] class AbundanceMe...
{ "repo_name": "onecodex/onecodex", "path": "onecodex/lib/enums.py", "copies": "2", "size": "1792", "license": "mit", "hash": 7611360910519487000, "line_mean": 20.8536585366, "line_max": 86, "alpha_frac": 0.6517857143, "autogenerated": false, "ratio": 3.111111111111111, "config_test": false, "...
from enum import Enum ALLURE_UNIQUE_LABELS = ['severity', 'thread', 'host'] class Severity(str, Enum): BLOCKER = 'blocker' CRITICAL = 'critical' NORMAL = 'normal' MINOR = 'minor' TRIVIAL = 'trivial' class LinkType(object): LINK = 'link' ISSUE = 'issue' TEST_CASE = 'test_case' clas...
{ "repo_name": "igogorek/allure-python", "path": "allure-python-commons/src/types.py", "copies": "1", "size": "1289", "license": "apache-2.0", "hash": -8917410002063678000, "line_mean": 21.6140350877, "line_max": 53, "alpha_frac": 0.5562451513, "autogenerated": false, "ratio": 3.0400943396226414, ...
from enum import Enum # An abstract class class MapSite: def Enter(self): raise NotImplementedError("Abstract Base Class Method") class Direction(Enum): North = 0 East = 1 South = 2 West = 3 class Room(MapSite): def __init__(self, roomNo): self._sides = [Map...
{ "repo_name": "ggaur10/pythonprojects", "path": "LearnDesignPatterns/MapSite.py", "copies": "1", "size": "2198", "license": "unlicense", "hash": 818303946625041400, "line_mean": 26.1481481481, "line_max": 91, "alpha_frac": 0.5532302093, "autogenerated": false, "ratio": 3.856140350877193, "confi...
from enum import Enum __author__ = 'Michael' from MTG.game_object import GameObject class ZoneType(Enum): LIBRARY = 0 HAND = 1 BATTLEFIELD = 2 GRAVEYARD = 3 STACK = 4 EXILE = 5 COMMAND = 6 class Zone(object): def __init___(self, elements:list=None): """ @param element...
{ "repo_name": "murgatroid99/Python-MTG", "path": "MTG/zone.py", "copies": "1", "size": "1344", "license": "mit", "hash": -5295565968311935000, "line_mean": 21.4166666667, "line_max": 76, "alpha_frac": 0.5639880952, "autogenerated": false, "ratio": 4.186915887850467, "config_test": false, "has...
from enum import Enum __author__ = 'Michael' from MTG.player import Player from MTG.zone import * class Phase(Enum): BEGINNING = 0 PRECOMBAT_MAIN = 1 COMBAT = 2 POSTCOMBAT_MAIN = 3 ENDING = 4 @property def steps(self): return { Phase.BEGINNING: (Step.UNTAP, Step.UPKE...
{ "repo_name": "murgatroid99/Python-MTG", "path": "MTG/game.py", "copies": "1", "size": "5142", "license": "mit", "hash": 6022131479975347000, "line_mean": 31.14375, "line_max": 94, "alpha_frac": 0.5698171918, "autogenerated": false, "ratio": 3.62112676056338, "config_test": false, "has_no_key...
from enum import Enum class Activity(Enum): ''' As defined here: https://developers.google.com/fit/rest/v1/reference/activity-types Only storing the ones I actually handle for now ''' in_vehicle = 0 biking = 1 on_foot = 2 still_not_moving = 3 unknown_unable_to_detect_activity = ...
{ "repo_name": "leohemsted/gfit2mfp", "path": "gfit2mfp/utils/activities.py", "copies": "1", "size": "3381", "license": "mit", "hash": -6598741379133350000, "line_mean": 22.6433566434, "line_max": 96, "alpha_frac": 0.5995267672, "autogenerated": false, "ratio": 3.279340446168768, "config_test": ...
from enum import Enum class AStren(Enum): D = 200 C = 500 B = 800 A = 1100 S = 1400 SS = 1700 F = 0 class Tags(Enum): POP = 0 WINTER = 1 GOTHIC = 2 SWORDS = 3 ARMY = 4 KIMONO = 5 FLORAL = 6 DANCER = 7 DENIM = 8 FAIRY = 9 EVGOWN = 10 LADY = 11 ROCK...
{ "repo_name": "janezdu/yokobot", "path": "clothing.py", "copies": "1", "size": "4146", "license": "mit", "hash": -5100013282209510000, "line_mean": 23.6845238095, "line_max": 93, "alpha_frac": 0.5793535938, "autogenerated": false, "ratio": 2.5451197053406998, "config_test": false, "has_no_key...
from enum import Enum class BooleanQueryParser(object): __queryTokens = [] def __init__(self, query): #query = query.replace("*", "STAR") self.__queryTokens = self.__tokenize(query, Operator.NOT) def __str__(self): tokens = [str(token) for token in self.__queryTokens] r...
{ "repo_name": "CodeLionX/CommentSearchEngine", "path": "cse/BooleanQueryParser.py", "copies": "1", "size": "1180", "license": "mit", "hash": 2957966692193658000, "line_mean": 20.8518518519, "line_max": 65, "alpha_frac": 0.543220339, "autogenerated": false, "ratio": 3.831168831168831, "config_te...
from enum import Enum class Bumps(Enum): NO_BUMPS = 1 LIGHT_BUMPS = 2 MEDIUM_BUMPS = 3 HEAVY_BUMPS = 4 class ApplianceFactor: K_a: float = 1.0 drivingmachine: Bumps = Bumps.NO_BUMPS machine: Bumps = Bumps.NO_BUMPS def __init__(self, drivingmachine: Bumps = Bumps.NO_BUMPS, machine: Bum...
{ "repo_name": "peer23peer/pymech", "path": "pymech/materials/ApplianceFactor.py", "copies": "1", "size": "1822", "license": "mit", "hash": 1510658895843453400, "line_mean": 32.1272727273, "line_max": 96, "alpha_frac": 0.4950603732, "autogenerated": false, "ratio": 3.041736227045075, "config_tes...
from enum import Enum class Colors(Enum): Pink = (255,96,96) Magenta = (255,0,192) Orange = (255,64,0) Yellow = (255,255,0) Green = (0,255,0) Turquoise = (0,255,255) Blue = (0,0,255) Purple = (96,0,255) color_list = [x for x in Colors] quad_teams_banned = { Colors.Pink : [Colors.M...
{ "repo_name": "aangert/PiParty", "path": "color_tests/quad_combo_test.py", "copies": "2", "size": "1073", "license": "mit", "hash": -7494692530210937000, "line_mean": 28.8333333333, "line_max": 111, "alpha_frac": 0.6076421249, "autogenerated": false, "ratio": 2.598062953995157, "config_test": f...
from enum import Enum class Component(Enum): button = 0 joystick = 1 speaker = 2 main_board = 3 hinge = 4 parting_line = 5 screen = 6 LED_ring = 7 potentiometer = 8 light_sensor = 9 gyro = 10 knob = 11 handle = 12 hasp = 13 servo_mount = 14 servo_move = 15 boss = 16 parting_line_cal...
{ "repo_name": "valkyriesavage/makers-marks", "path": "component.py", "copies": "1", "size": "2416", "license": "mit", "hash": 1782478576373092900, "line_mean": 22.2307692308, "line_max": 70, "alpha_frac": 0.5960264901, "autogenerated": false, "ratio": 3.1093951093951095, "config_test": false, ...
from enum import Enum class ContentType(Enum): Text = 100 Image = 101 ImageId = 102 InputReady = 103 Leave = 199 Exit = 999 class Message: def __init__(self, room_id, user_id, user_name, text, datetime, peer=None, by=None, attachment=None, is_private_chat=False): # used for Mafiaga...
{ "repo_name": "susemeee/Chunsabot-framework", "path": "chunsabot/messages.py", "copies": "1", "size": "1562", "license": "mit", "hash": -8861857983981855000, "line_mean": 28.4716981132, "line_max": 173, "alpha_frac": 0.5825864277, "autogenerated": false, "ratio": 3.525959367945824, "config_test...
from enum import Enum class Couleur(Enum): """ Enumération utilisée pour la couleur des feux # @author : Bonfante """ rouge = 0 vert = 1 class Feu(): """ Modélise un feu de signalisation. # intersection : Intersection sur laquelle agit le feu # c...
{ "repo_name": "Passaudage/PLD", "path": "simulateur/Feu.py", "copies": "1", "size": "1289", "license": "mit", "hash": 1237513759143222500, "line_mean": 24.1764705882, "line_max": 66, "alpha_frac": 0.5661993769, "autogenerated": false, "ratio": 3.7109826589595376, "config_test": false, "has_no...
from enum import Enum class EventTypes(object): TEST_STARTED = "event.test.started" TEST_LIFE_CYCLE = "event.test.lifecycle" TEST_FINISHED = "event.test.finished" TEST_SUITE_FINISHED = "event.suite.finished" class _BaseEvent(object): def __init__(self, name): self.__name = name @prop...
{ "repo_name": "xabierlaiseca/ansiblest", "path": "ansiblest/domain/model/events.py", "copies": "1", "size": "2856", "license": "apache-2.0", "hash": 8704578958984900000, "line_mean": 24.5, "line_max": 70, "alpha_frac": 0.56232493, "autogenerated": false, "ratio": 4.045325779036827, "config_test...
from enum import Enum class Field(Enum): ZERO = 0 ONE = 1 TWO = 2 THREE = 3 FOUR = 4 FIVE = 5 SIX = 6 SEVEN = 7 EIGHT = 8 MINE = 9 UNKNOWN = 10 NONE = 11 field_string_map = dict( [(Field.MINE,'*'), (Field.UNKNOWN,'#'), (Field.NONE, '_')] + [(Field(x),str(x)) for x in ra...
{ "repo_name": "karolciba/deminer", "path": "deminer.py", "copies": "1", "size": "6044", "license": "unlicense", "hash": -8193245929575237000, "line_mean": 30.4791666667, "line_max": 124, "alpha_frac": 0.4774983455, "autogenerated": false, "ratio": 3.692119731215638, "config_test": false, "has...
from enum import Enum class General(Enum): MUDAH_URL = "http://www.mudah.my" CHROME_PATH = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s' # If set to 10, it will retrieve 10 pages with latest properties. Set to -1 to get all available properties. PAGE_THRESHOLD = 3 class Region(Enum): K...
{ "repo_name": "yousoff92/data-collector", "path": "python/mudah/config.py", "copies": "1", "size": "5247", "license": "mit", "hash": -659931953580574500, "line_mean": 23.6384976526, "line_max": 112, "alpha_frac": 0.6754335811, "autogenerated": false, "ratio": 1.9651685393258427, "config_test": ...
from enum import Enum class OrderedEnum(Enum): """ an enumeration class that has a well ordering """ def __init__(self, value: int): self.value = value def __ge__(self, other): if self.__class__ is other.__class__: return self.value >= other.value return NotImpl...
{ "repo_name": "joshuamorton/PyMagic", "path": "color.py", "copies": "1", "size": "1396", "license": "mit", "hash": 635272637367137800, "line_mean": 26.92, "line_max": 72, "alpha_frac": 0.5551575931, "autogenerated": false, "ratio": 4.046376811594203, "config_test": false, "has_no_keywords": f...
from enum import Enum class OrderMode(Enum): NORMAL = "normal" FILL_OR_KILL = "fillOrKill" IMMEDIATE_OR_CACNEL = "immediateOrCancel" POST_ONLY = "postOnly" class Order(object): """ Initializes an Ordder object with the given atributes. @param pair: The currency pair to trade with. @p...
{ "repo_name": "GooTZ/poloTrader", "path": "app/util/Order.py", "copies": "1", "size": "1072", "license": "mit", "hash": -2323523467902662700, "line_mean": 30.5294117647, "line_max": 133, "alpha_frac": 0.6324626866, "autogenerated": false, "ratio": 3.735191637630662, "config_test": false, "has...
from enum import Enum class ParmNamingScheme(Enum): Base1 = 1 XYZW = 2 RGBA = 3 class ParmLookScheme(Enum): Regular = 1 class ParmTemplateType(Enum): Button = 1 Float = 2 Folder = 3 Int = 4 Label = 5 String = 6 Toggle = 7 Menu = 8 class StringParmType(Enum): Regular = 1 FileReference = 2 NodeReferenc...
{ "repo_name": "cinepost/Copperfield_FX", "path": "copper/core/parameter/parm_template.py", "copies": "1", "size": "3262", "license": "unlicense", "hash": 448367252805397100, "line_mean": 22.9926470588, "line_max": 134, "alpha_frac": 0.7155119559, "autogenerated": false, "ratio": 3.034418604651163...
from enum import Enum class Phase(Enum): BEGINNING = 0 PRECOMBAT_MAIN = 1 COMBAT = 2 POSTCOMBAT_MAIN = 3 ENDING = 4 @property def steps(self): return { Phase.BEGINNING: (Step.UNTAP, Step.UPKEEP, Step.DRAW), Phase.PRECOMBAT_MAIN: (Step.PRECOMBAT_MAIN,), ...
{ "repo_name": "wanqizhu/mtg-python-engine", "path": "MTG/gamesteps.py", "copies": "1", "size": "1704", "license": "mit", "hash": -3590159841609311000, "line_mean": 27.8983050847, "line_max": 66, "alpha_frac": 0.5610328638, "autogenerated": false, "ratio": 3.1323529411764706, "config_test": fals...
from enum import Enum class PvdType(Enum): UNKNOWN = 0 IMPLICIT = 1 EXPLICIT = 2 def __repr__(self): if (self == PvdType.IMPLICIT): return 'IMPLICIT' if (self == PvdType.EXPLICIT): return 'EXPLICIT' return 'UNKNOWN' def __str__(self): return repr(self) # https://tools.ietf.org...
{ "repo_name": "l30nard0/mif", "path": "pvdman/pvdinfo.py", "copies": "1", "size": "5201", "license": "mit", "hash": 8976598301543418000, "line_mean": 27.2663043478, "line_max": 104, "alpha_frac": 0.6602576428, "autogenerated": false, "ratio": 3.760665220535069, "config_test": false, "has_no_k...