text
stringlengths
0
1.05M
meta
dict
from enum import Enum from .schema import EnumFromName, Identifier, Path, List, Dict from .loader import Loadable from .display import Displayable from .tags import Taggable from .combat import DamageType, Attack from .player import Attribute from .item import WieldSlot class Target(Enum): SELF = 1 FRIEND = 2...
{ "repo_name": "wirefish/amber", "path": "amber/guild.py", "copies": "1", "size": "1372", "license": "bsd-3-clause", "hash": 992117356519288200, "line_mean": 27.5833333333, "line_max": 66, "alpha_frac": 0.5874635569, "autogenerated": false, "ratio": 3.4129353233830844, "config_test": false, "h...
from enum import Enum from selenium.webdriver.common.by import By HOMEPAGE = "http://phptravels.net" class HeaderLocators(object): LOGO = (By.XPATH , "//div[@class='navbar']/div/a") class NAV(Enum): HOME = (By.XPATH, "//div[@class='navbar']/div/a[@href='%s/']" % HOMEPAGE) ...
{ "repo_name": "AButenko/selenium_tests", "path": "framework/gui/common/locators.py", "copies": "1", "size": "2809", "license": "bsd-3-clause", "hash": 2492382203668611000, "line_mean": 62.8409090909, "line_max": 118, "alpha_frac": 0.5354218583, "autogenerated": false, "ratio": 2.929092805005214, ...
from enum import Enum from .serialize import Serializable class AlarmSeverity(Enum): noAlarm, minorAlarm, majorAlarm, invalidAlarm, undefinedAlarm = range(5) class AlarmStatus(Enum): noStatus, deviceStatus, driverStatus, recordStatus, dbStatus, confStatus, \ undefinedStatus, clientStatus = range(8)...
{ "repo_name": "ulrikpedersen/malcolm", "path": "malcolm/core/alarm.py", "copies": "1", "size": "1723", "license": "apache-2.0", "hash": -6325232558062324000, "line_mean": 32.1346153846, "line_max": 79, "alpha_frac": 0.6186883343, "autogenerated": false, "ratio": 4.102380952380952, "config_test"...
from enum import Enum from SiddhiCEP4 import SiddhiLoader from SiddhiCEP4.DataTypes.DataWrapper import unwrapData, wrapData class ComplexEvent(object): class Type(Enum): CURRENT = SiddhiLoader._loadType("org.wso2.siddhi.pythonapi.proxy.core.event.complex_event.TypeProxy")().CURRENT(), EXPIRED = S...
{ "repo_name": "madhawav/SiddhiCEPPythonAPI", "path": "SiddhiCEP4/core/event/ComplexEvent.py", "copies": "1", "size": "3787", "license": "apache-2.0", "hash": 9006158051371216000, "line_mean": 41.5505617978, "line_max": 139, "alpha_frac": 0.6754687087, "autogenerated": false, "ratio": 3.7794411177...
from enum import Enum from singleton_decorator import singleton from optimus.io.abstract_driver import AbstractDriver from optimus.io.properties import DriverProperties @singleton class PostgreSQLDriver(AbstractDriver): """PostgreSQL Database""" def properties(self) -> Enum: return DriverProperties...
{ "repo_name": "ironmussa/Optimus", "path": "optimus/io/postgresql.py", "copies": "1", "size": "1289", "license": "apache-2.0", "hash": -7681939589474476000, "line_mean": 36.9117647059, "line_max": 127, "alpha_frac": 0.6268425136, "autogenerated": false, "ratio": 3.941896024464832, "config_test"...
from enum import Enum from singleton_decorator import singleton from optimus.io.abstract_driver import AbstractDriver from optimus.io.properties import DriverProperties @singleton class RedshiftDriver(AbstractDriver): """Redshift Database""" def properties(self) -> Enum: return DriverProperties.RED...
{ "repo_name": "ironmussa/Optimus", "path": "optimus/io/redshift.py", "copies": "1", "size": "1293", "license": "apache-2.0", "hash": -8557641264862161000, "line_mean": 37.0294117647, "line_max": 135, "alpha_frac": 0.6233565352, "autogenerated": false, "ratio": 3.894578313253012, "config_test": ...
from enum import Enum from sqlalchemy import text, select, Table, Column, Integer, String, ForeignKey, Date from sqlalchemy.ext.declarative import DeferredReflection from sqlalchemy.orm import relationship, backref from pycroft.model.base import ModelBase from pycroft.model.ddl import DDLManager, View class Tenancy...
{ "repo_name": "agdsn/pycroft", "path": "pycroft/model/swdd.py", "copies": "1", "size": "2833", "license": "apache-2.0", "hash": 3736908879201937400, "line_mean": 28.206185567, "line_max": 107, "alpha_frac": 0.6639604659, "autogenerated": false, "ratio": 3.2525832376578645, "config_test": false,...
from enum import Enum from src.db import Database class OrderType(Enum): AUTHOR = 1 TOTAL = 2 ACTIVE_TOTAL = 3 ACTIVE_NON_REPEALS_TOTAL = 4, ACTIVE_REPEALS_TOTAL = 5, REPEALED_TOTAL = 6 def generate_author_index(db: Database): bbcode = '' authors = db.authors[:] authors.extend(...
{ "repo_name": "auralia/nationstates-ga-resolutions-database", "path": "src/reports.py", "copies": "3", "size": "9329", "license": "mit", "hash": -4522578757697018400, "line_mean": 36.7692307692, "line_max": 79, "alpha_frac": 0.5272805231, "autogenerated": false, "ratio": 3.2929756441934344, "co...
from enum import Enum from stat import * class MoveCategory(Enum): status = 0 physical = 1 special = 2 def get_attack_stat(self): if self == MoveCategory.physical: return Stat.attack elif self == MoveCategory.special: return Stat.special_attack else:...
{ "repo_name": "TheWayADrillWorks/RMP", "path": "battle_engine/move.py", "copies": "1", "size": "7055", "license": "mit", "hash": -2169744844399754500, "line_mean": 28.0329218107, "line_max": 105, "alpha_frac": 0.5698086464, "autogenerated": false, "ratio": 4.152442613301942, "config_test": fals...
from enum import Enum from telegram.ext import ConversationHandler, MessageHandler, Filters, CommandHandler import model from converter import convert_to_ogg from custom_filters import is_in_database, is_audio_document from model import Meme from utils import download_file States = Enum('States', 'NAME') meme_sto...
{ "repo_name": "MelomanCool/telegram-audiomemes", "path": "handlers/_conversation.py", "copies": "1", "size": "1948", "license": "mit", "hash": 7629215374259517000, "line_mean": 22.756097561, "line_max": 85, "alpha_frac": 0.6555441478, "autogenerated": false, "ratio": 3.6007393715341958, "config...
from enum import Enum from .term import Term class Factor: class EvalMethod(Enum): UNKNOWN = 'unknown' LITERAL = 'literal' LOOKUP = 'lookup' PYTHON = 'python' class Kind(Enum): UNKNOWN = 'unknown' CONSTANT = 'constant' NUMERICAL = 'numerical' ...
{ "repo_name": "matthewwardrop/formulaic", "path": "formulaic/parser/types/factor.py", "copies": "1", "size": "1509", "license": "mit", "hash": 3181870920053009400, "line_mean": 22.9523809524, "line_max": 79, "alpha_frac": 0.5685884692, "autogenerated": false, "ratio": 4.013297872340425, "config...
from enum import Enum from treeherder.perf.models import ( BackfillRecord, ) class OutcomeStatus(Enum): SUCCESSFUL = 1 FAILED = 2 IN_PROGRESS = 3 class OutcomeChecker: """ Checks outcome of backfills """ def __init__(self): pass def check(self, record: BackfillRecord) ...
{ "repo_name": "mozilla/treeherder", "path": "treeherder/perf/auto_perf_sheriffing/outcome_checker.py", "copies": "2", "size": "1117", "license": "mpl-2.0", "hash": -1914794252335958500, "line_mean": 28.3947368421, "line_max": 74, "alpha_frac": 0.6051924799, "autogenerated": false, "ratio": 3.9330...
from enum import Enum from tree.nodes.operations.OperationType import OperationType class AssignmentType(Enum): ASSIGN = '=' MULTIPLY_ASSIGN = '*=' DIV_ASSIGN = '/=' MOD_ASSIGN = '%=' PLUS_ASSIGN = '+=' MINUS_ASSIGN = '-=' LEFT_SHIFT_ASSIGN = '<<=' RIGHT_SHIFT_ASSIGN = '>>=' A...
{ "repo_name": "wilima/herocomp", "path": "herocomp/tree/nodes/AssignmentType.py", "copies": "1", "size": "1381", "license": "mit", "hash": 4766450384972339000, "line_mean": 28.3829787234, "line_max": 61, "alpha_frac": 0.5937726285, "autogenerated": false, "ratio": 3.901129943502825, "config_tes...
from enum import Enum from typing import Callable, Iterator, List from prometheus_client import Counter, Histogram, REGISTRY from prometheus_client.core import GaugeMetricFamily http_request_duration_seconds = Histogram( # pylint: disable=no-value-for-parameter 'http_request_duration_seconds', 'Latency of ...
{ "repo_name": "box/ClusterRunner", "path": "app/common/metrics.py", "copies": "1", "size": "3578", "license": "apache-2.0", "hash": -4809738716738670000, "line_mean": 40.1264367816, "line_max": 105, "alpha_frac": 0.6643376188, "autogenerated": false, "ratio": 3.8849077090119435, "config_test": ...
from enum import Enum from upcloud_api.upcloud_resource import UpCloudResource class BackupDeletionPolicy(Enum): """ Class representation of backup deletion policies used on storage deletions. """ KEEP = 'keep' KEEP_LATEST = 'keep_latest' DELETE = 'delete' class Storage(UpCloudResource): ...
{ "repo_name": "UpCloudLtd/upcloud-python-api", "path": "upcloud_api/storage.py", "copies": "1", "size": "5217", "license": "mit", "hash": 5966213977744408000, "line_mean": 29.8698224852, "line_max": 140, "alpha_frac": 0.5794517922, "autogenerated": false, "ratio": 4.210653753026635, "config_tes...
from enum import Enum from .utils import Event from .exceptions import GroupSingleEntity class GroupEvent(Enum): ADDED = 1 REMOVED = 2 ADDED_OR_REMOVED = 3 class Group(object): """Use context.get_group(matcher) to get a group of entities which match the specified matcher. Calling context.get_gr...
{ "repo_name": "Aenyhm/entitas-python", "path": "entitas/group.py", "copies": "1", "size": "3428", "license": "mit", "hash": -7507636857152496000, "line_mean": 30.1636363636, "line_max": 78, "alpha_frac": 0.6143523921, "autogenerated": false, "ratio": 4.328282828282828, "config_test": false, "...
from enum import Enum from Xlib.display import Display from Xlib import X from Xlib.ext import record from Xlib.protocol import rq """ 0x1008ff17 media_next 0x1008ff16 media_previous 0x1008ff15 media_stop 0x1008ff14 media_play_pause """ disp = None class MediaKey(Enum): media_next = "0x1008ff17" media_pre...
{ "repo_name": "baifenbenniao/FeelUOwn", "path": "history_research/python-xlib-learn.py", "copies": "3", "size": "1906", "license": "mit", "hash": -2791382050260555300, "line_mean": 25.4722222222, "line_max": 65, "alpha_frac": 0.6054564533, "autogenerated": false, "ratio": 3.2975778546712804, "c...
from enum import Enum from yahtr.core.hex_lib import Hex from yahtr.utils import attr from yahtr.data.core import DataTemplate from yahtr.data.board_creator import build_parallelogram, build_triangle, build_hexagon, build_rectangle from yahtr.wall import Wall class BoardType(Enum): custom = 0 parallelogram =...
{ "repo_name": "fp12/yahtr", "path": "yahtr/data/board_template.py", "copies": "1", "size": "2279", "license": "mit", "hash": 1011097194326810600, "line_mean": 33.5303030303, "line_max": 128, "alpha_frac": 0.6195699868, "autogenerated": false, "ratio": 3.506153846153846, "config_test": false, ...
from enum import Enum from yahtr.data.core import DataTemplate from yahtr.localization.core import LocStr from yahtr.core.hex_lib import HexDir from yahtr.utils import attr class Effect(Enum): none = 0 hit_normal = 10 hit_through_shield = 11 hit_through_wall = 12 hit_shield_only = 13 hit_wall...
{ "repo_name": "fp12/yahtr", "path": "yahtr/data/skill_template.py", "copies": "1", "size": "4717", "license": "mit", "hash": -6175962807385483000, "line_mean": 31.3082191781, "line_max": 135, "alpha_frac": 0.6048335807, "autogenerated": false, "ratio": 3.340651558073654, "config_test": false, ...
from enum import Enum from yahtr.data.core import DataTemplate from yahtr.localization.core import LocStr from yahtr.utils import attr class WeaponType(Enum): sword = 1 daggers = 2 spear = 3 scythe = 4 grimoire = 5 class WeaponTemplate(DataTemplate): """ Weapon as defined in data """ _...
{ "repo_name": "fp12/yahtr", "path": "yahtr/data/weapon_template.py", "copies": "1", "size": "1699", "license": "mit", "hash": 980092647089078500, "line_mean": 30.462962963, "line_max": 110, "alpha_frac": 0.6333137139, "autogenerated": false, "ratio": 3.3118908382066277, "config_test": false, ...
from enum import Enum # How to keep track of what kind of an object a given entity # is... types! Types should act as constants... for now. # Type is a reserved word! class Spec(Enum): # Key types (1-1000) ENTITY = 1 CONTEXT = 2 PERSON = 3 PLACE = 4 THING = 5 CONTEX...
{ "repo_name": "Jerad-M/ubfs", "path": "classes/spec.py", "copies": "1", "size": "2393", "license": "apache-2.0", "hash": 4409455971158697500, "line_mean": 21.8, "line_max": 100, "alpha_frac": 0.5879648976, "autogenerated": false, "ratio": 2.9147381242387334, "config_test": false, "has_no_keyw...
from enum import Enum import ailment from ...block import Block from ...knowledge_plugins.functions.function_manager import Function from ..forward_analysis import FunctionGraphVisitor, SingleNodeGraphVisitor class SubjectType(Enum): Function = 1 Block = 2 CallTrace = 3 class Subject: def __init__...
{ "repo_name": "angr/angr", "path": "angr/analyses/reaching_definitions/subject.py", "copies": "1", "size": "1818", "license": "bsd-2-clause", "hash": 5983294892328433000, "line_mean": 28.3225806452, "line_max": 88, "alpha_frac": 0.6325632563, "autogenerated": false, "ratio": 4.318289786223278, ...
from enum import Enum import anipy from ..core import ( Entity, Updatable ) class ListEntry(Entity): """docstring for ListEntry""" def __init__(self, **kwargs): super().__init__(**kwargs) listStatus = kwargs.get('listStatus') if listStatus not in list(anipy.ListStatus) and li...
{ "repo_name": "twissell-/anipy", "path": "anipy/ani/list.py", "copies": "1", "size": "2900", "license": "mit", "hash": 3423136319974262300, "line_mean": 23.5762711864, "line_max": 88, "alpha_frac": 0.6244827586, "autogenerated": false, "ratio": 4.033379694019471, "config_test": false, "has_no...
from enum import Enum import attr class PgObjectType(Enum): """PostgreSQL object type.""" TABLE = 'TABLE' SEQUENCE = 'SEQUENCE' FUNCTION = 'FUNCTION' LANGUAGE = 'LANGUAGE' SCHEMA = 'SCHEMA' DATABASE = 'DATABASE' TABLESPACE = 'TABLESPACE' TYPE = 'TYPE' FOREIGN_DATA_WRAPPER = 'F...
{ "repo_name": "RazerM/pg_grant", "path": "pg_grant/types.py", "copies": "1", "size": "3667", "license": "mit", "hash": 1117264902075306100, "line_mean": 26.162962963, "line_max": 79, "alpha_frac": 0.622852468, "autogenerated": false, "ratio": 4.020833333333333, "config_test": false, "has_no_k...
from enum import Enum import boto.ec2 from boto.exception import EC2ResponseError from . import di class TagStatus(Enum): correct = 1 incorrect = 2 missing = 3 INSTANCE_ID_NOT_FOUND = 'InvalidInstanceID.NotFound' class InstanceNotFound(Exception): pass def _get_boto_error_type(exception): errors =...
{ "repo_name": "JuniorCru/coastline", "path": "coastline/tag.py", "copies": "1", "size": "2622", "license": "mit", "hash": -5770051435871573000, "line_mean": 26.8936170213, "line_max": 70, "alpha_frac": 0.6411136537, "autogenerated": false, "ratio": 3.577080491132333, "config_test": true, "has...
from enum import Enum import click import requests from bs4 import BeautifulSoup import agent from constants import ANIME_STATUS_MAP, ANIME_TYPE_MAP, MANGA_STATUS_MAP, MANGA_TYPE_MAP import network import ui class ListSearchStatusCode(Enum): """"An Enum represented the type of result of list searches""" NO_...
{ "repo_name": "amrishparmar/mal_cl_interface", "path": "nl_interface/update.py", "copies": "1", "size": "16808", "license": "mit", "hash": -9220467129005520000, "line_mean": 45.6888888889, "line_max": 120, "alpha_frac": 0.6052475012, "autogenerated": false, "ratio": 3.9372218318107284, "config_...
from enum import Enum import datetime import dbaccess class Action(Enum): PAUSE, FINISH, ARCHIVE, WORK, CREATE, DELETE = range(6) class Log(object): def __init__(self, action, problem_id, name, category_id, dt=None): self.action = action self.problem_id = problem_id self.name = name...
{ "repo_name": "thyagostall/apollo", "path": "src/log.py", "copies": "1", "size": "1525", "license": "mit", "hash": 5184692986244365000, "line_mean": 25.7543859649, "line_max": 139, "alpha_frac": 0.5895081967, "autogenerated": false, "ratio": 3.5966981132075473, "config_test": false, "has_no_k...
from enum import Enum import dateutil.parser class TransactionSource(Enum): DIRECT_CREDIT = "Direct Credit" DIRECT_DEBIT = "Direct Debit" DIRECT_DEBIT_DISPUTE = "Direct Debit Dispute" INTERNAL_TRANSFER = "Internal Transfer" MASTER_CARD = "MasterCard" FASTER_PAYMENTS_IN = "Faster Payments In" ...
{ "repo_name": "rdcrt/pystarling", "path": "pystarling/api_objects/transactions/BaseTransaction.py", "copies": "1", "size": "1198", "license": "mit", "hash": -7346892788619388000, "line_mean": 28.95, "line_max": 64, "alpha_frac": 0.67278798, "autogenerated": false, "ratio": 3.4825581395348837, "...
from enum import Enum import math from move import MoveDefinition, PokemonMove from stat import * class Nature(Enum): hardy = 1 lonely = 2 brave = 3 adamant = 4 naughty = 5 bold = 6 docile = 7 relaxed = 8 impish = 9 lax = 10 timid = 11 hasty = 12 serious = 13 ...
{ "repo_name": "TheWayADrillWorks/RMP", "path": "battle_engine/pokemon.py", "copies": "1", "size": "7193", "license": "mit", "hash": 8831791563735623000, "line_mean": 25.6407407407, "line_max": 86, "alpha_frac": 0.5349645489, "autogenerated": false, "ratio": 3.6475659229208923, "config_test": fa...
from enum import Enum import numpy as np from annotypes import Anno, Serializable, deserialize_object class AlarmSeverity(Enum): """An alarm severity""" NO_ALARM, MINOR_ALARM, MAJOR_ALARM, INVALID_ALARM, UNDEFINED_ALARM = np.arange( 5, dtype=np.int32 ) class AlarmStatus(Enum): """An alarm ...
{ "repo_name": "dls-controls/pymalcolm", "path": "malcolm/core/alarm.py", "copies": "1", "size": "2201", "license": "apache-2.0", "hash": -42764015551871420, "line_mean": 25.8414634146, "line_max": 85, "alpha_frac": 0.6383462063, "autogenerated": false, "ratio": 3.6867671691792294, "config_test"...
from enum import Enum import numpy as np from PIL import Image from _webp import ffi, lib class WebPPreset(Enum): DEFAULT = lib.WEBP_PRESET_DEFAULT # Default PICTURE = lib.WEBP_PRESET_PICTURE # Indoor photo, portrait-like PHOTO = lib.WEBP_PRESET_PHOTO # Outdoor photo with natural lighting DRAWING...
{ "repo_name": "anibali/pywebp", "path": "webp/__init__.py", "copies": "1", "size": "19725", "license": "mit", "hash": 5670505717374819000, "line_mean": 30.56, "line_max": 97, "alpha_frac": 0.6050190114, "autogenerated": false, "ratio": 3.50542029500622, "config_test": true, "has_no_keywords":...
from enum import Enum import numpy as np from PyEngine3D.Common import * from PyEngine3D.Render import TextRenderData class Align(Enum): NONE = 0 CENTER = 1 LEFT = 2 RIGHT = 3 TOP = 4 BOTTOM = 5 class Orientation(Enum): HORIZONTAL = 0 VERTICAL = 1 class Widget: core_manager =...
{ "repo_name": "ubuntunux/PyEngine3D", "path": "PyEngine3D/UI/Widget.py", "copies": "1", "size": "20698", "license": "bsd-2-clause", "hash": -4782796232075623000, "line_mean": 32.6006493506, "line_max": 137, "alpha_frac": 0.5556575515, "autogenerated": false, "ratio": 3.6724627395315825, "config...
from enum import Enum import numpy as np class Square(Enum): Otherwise = 0 GoToJail = 1 CommunityChest = 2 Chance = 3 RailRoad = 4 Utility = 5 Jail = 6 def solve(sides: int=4) -> str: board = [Square.Otherwise for i in range(40)] length = len(board) jail_index = 10 commu...
{ "repo_name": "cryvate/project-euler", "path": "project_euler/solutions/problem_84.py", "copies": "1", "size": "3488", "license": "mit", "hash": 4390836693006940700, "line_mean": 28.5593220339, "line_max": 73, "alpha_frac": 0.4492545872, "autogenerated": false, "ratio": 4.065268065268065, "conf...
from enum import Enum import output class TokenType(Enum): PROTO = -1 NAME = 0 STRING = 10 INTEGER = 11 CHAR = 12 LBRACE = 13 RBRACE = 14 COMMA = 15 DOT = 16 TRUE = 17 FALSE = 18 AMPER = 20 AT = 21 BANG = 22 PLU...
{ "repo_name": "fourohfour/RIPL", "path": "ripl/tokeniser.py", "copies": "1", "size": "12950", "license": "mit", "hash": -6962330252021570000, "line_mean": 36.5362318841, "line_max": 121, "alpha_frac": 0.4869498069, "autogenerated": false, "ratio": 4.407760381211709, "config_test": false, "has...
from enum import Enum import pandas as pd from api import Symbol class TickDirection(Enum): ZeroPlusTick = 'ZeroPlusTick' PlusTick = 'PlusTick' ZeroMinusTick = 'ZeroMinusTick' MinusTick = 'MinusTick' TICK_DIRECTION = { '--': TickDirection.MinusTick, '0-': TickDirection.ZeroMinusTick, '...
{ "repo_name": "felipemontefuscolo/bitme", "path": "common/trade.py", "copies": "1", "size": "1772", "license": "mpl-2.0", "hash": -9173351785222072000, "line_mean": 28.5333333333, "line_max": 77, "alpha_frac": 0.5553047404, "autogenerated": false, "ratio": 4, "config_test": false, "has_no_key...
from enum import Enum import ply.lex as lex def preproc(s): s = s.replace("¹", "**(1)") s = s.replace("²", "**(2)") s = s.replace("³", "**(3)") return s class assoc(Enum): left = 0 right = 1 operassoc = { "PLUS": assoc.left, "MINUS": assoc.left, "DIVIDE": assoc.left, "TIM...
{ "repo_name": "5225225/pycalc", "path": "lexer.py", "copies": "1", "size": "4444", "license": "mit", "hash": 3615430351315979000, "line_mean": 17.5041666667, "line_max": 97, "alpha_frac": 0.4953839225, "autogenerated": false, "ratio": 3.086170952050035, "config_test": false, "has_no_keywords"...
from enum import Enum import pyglet from pyglet.gl import GLubyte, glFlush import numpy as np from ctypes import POINTER # Setting this env variable was needed to let pyglet find libc: # export DYLD_FALLBACK_LIBRARY_PATH=/usr/lib class DKWMRenderer(object): """ A renderer for the DKWM gym. Holds and dis...
{ "repo_name": "Bleyddyn/malpi", "path": "malpi/dkwm/gym_envs/renderer.py", "copies": "1", "size": "3073", "license": "mit", "hash": 5471949092004178000, "line_mean": 27.7196261682, "line_max": 98, "alpha_frac": 0.5658965181, "autogenerated": false, "ratio": 3.8364544319600498, "config_test": fa...
from enum import Enum import pytest from extenum import EnumSet class Number(Enum): ONE = 1 TWO = 2 THREE = 3 FOUR = 4 FIVE = 5 @classmethod def set_of(cls, values): opts = EnumSet.none_of(cls) for value in values: opts.add(cls(value)) return opts cl...
{ "repo_name": "t2y/extenum", "path": "tests/test_enumset.py", "copies": "1", "size": "5034", "license": "apache-2.0", "hash": -7861664561093210000, "line_mean": 25.9197860963, "line_max": 75, "alpha_frac": 0.6535558204, "autogenerated": false, "ratio": 3.1640477686989317, "config_test": true, ...
from enum import Enum import pytest from marshmallow import Schema, fields, validate from marshmallow.validate import OneOf, Range from marshmallow_enum import EnumField from marshmallow_union import Union from marshmallow_jsonschema import JSONSchema, UnsupportedValueError from . import UserSchema, validate_and_dump...
{ "repo_name": "fuhrysteve/marshmallow-jsonschema", "path": "tests/test_validation.py", "copies": "1", "size": "5336", "license": "mit", "hash": 1977605629923532800, "line_mean": 25.5472636816, "line_max": 85, "alpha_frac": 0.6285607196, "autogenerated": false, "ratio": 3.7577464788732393, "conf...
from enum import Enum import pytest from Pegasus.api._utils import _chained, _get_class_enum_member_str, _get_enum_str def test__get_class_enum_member_str(): class _Constants(Enum): A = "a" B = "b" C = "c" class Grades: A = _Constants.A B = _Constants.B C = _...
{ "repo_name": "pegasus-isi/pegasus", "path": "packages/pegasus-api/test/api/test_utils.py", "copies": "1", "size": "1409", "license": "apache-2.0", "hash": 6705592559179037000, "line_mean": 17.7866666667, "line_max": 82, "alpha_frac": 0.5273243435, "autogenerated": false, "ratio": 3.5491183879093...
from enum import Enum import pytz from django.db import models from codepot import ( enum_to_model_choices, primary_key, ) _warsaw_tz = pytz.timezone('Europe/Warsaw') class TimeSlotTierDayName(Enum): FIRST = 'FIRST' SECOND = 'SECOND' class TimeSlotTier(models.Model): id = models.CharField(primary_ke...
{ "repo_name": "codepotpl/codepot-backend", "path": "codepot/models/timeslots.py", "copies": "1", "size": "1262", "license": "mit", "hash": 8911004872637456000, "line_mean": 29.0476190476, "line_max": 104, "alpha_frac": 0.6988906498, "autogenerated": false, "ratio": 3.1393034825870645, "config_t...
from enum import Enum import requests from bs4 import BeautifulSoup class GameStatus(Enum): unplayed = "(u)" unfinished = "(U)" beaten = "(B)" completed = "(C)" mastered = "(M)" null = "(-)" class GamePageParser: def parse_page(self, page_text): soup = BeautifulSoup(page_text) ...
{ "repo_name": "siddhi/game_site_tools", "path": "game_site_tools/backloggery.py", "copies": "1", "size": "3305", "license": "mit", "hash": -1964183788282462700, "line_mean": 26.3140495868, "line_max": 79, "alpha_frac": 0.5189107413, "autogenerated": false, "ratio": 3.7599544937428897, "config_t...
from enum import Enum import tensorflow as tf import cv2 regularizer_conv = 0.004 regularizer_dsconv = 0.0004 batchnorm_fused = True activation_fn = tf.nn.relu class CocoPart(Enum): Nose = 0 Neck = 1 RShoulder = 2 RElbow = 3 RWrist = 4 LShoulder = 5 LElbow = 6 LWrist = 7 RHip = ...
{ "repo_name": "ildoonet/tf-openpose", "path": "tf_pose/common.py", "copies": "1", "size": "4219", "license": "apache-2.0", "hash": 6476468981104671000, "line_mean": 30.2518518519, "line_max": 113, "alpha_frac": 0.5280872245, "autogenerated": false, "ratio": 2.5931161647203442, "config_test": fa...
from enum import Enum import tensorflow as tf from tfgraph.utils.math.vector_norm import VectorNorm class ConvergenceCriterion(Enum): """ Enum class that contains some convergence criteria. The class has lambda functions that can be accessed as static class methods because it inherits Enum class. The meth...
{ "repo_name": "tfgraph/tfgraph", "path": "tfgraph/utils/math/convergence_criterion.py", "copies": "1", "size": "1782", "license": "apache-2.0", "hash": 454260989296746240, "line_mean": 29.2033898305, "line_max": 88, "alpha_frac": 0.6902356902, "autogenerated": false, "ratio": 4.153846153846154, ...
from enum import Enum import time import random from battle_mode import BattleMode #---Messages from the engine to the scene--- class LocalizableText(object): #Note that localize_flags is not only optional but need only #indicate localization up to the last non-localized string in text def __init(sel...
{ "repo_name": "TheWayADrillWorks/RMP", "path": "battle_engine/battle_messaging.py", "copies": "1", "size": "6954", "license": "mit", "hash": -6690480391467603000, "line_mean": 27.2682926829, "line_max": 116, "alpha_frac": 0.5731952833, "autogenerated": false, "ratio": 4.343535290443473, "config...
from enum import Enum import time class TrackRequest: def __init__(self, departure_city, destination, duration, adults, start, end): self.departure_city = departure_city self.destination = destination self.duration = duration self.adults = adults self.start = start ...
{ "repo_name": "astone282/vactrack", "path": "vactrack/Vacation.py", "copies": "1", "size": "1573", "license": "apache-2.0", "hash": -2139127185237293600, "line_mean": 21.7971014493, "line_max": 123, "alpha_frac": 0.5804195804, "autogenerated": false, "ratio": 3.658139534883721, "config_test": f...
from enum import Enum import toolz from pyrsistent import PRecord, field, pmap_field try: basestring except NameError: basestring = str __all__ = ["Direction", "Glue", "add_transition", "join", "Tile", "format_tile", "new_tile", "dirbind", "eastbind", "westbind", "northbind",...
{ "repo_name": "luizirber/tam", "path": "src/tam/defs.py", "copies": "1", "size": "3707", "license": "bsd-2-clause", "hash": -6691712955590532000, "line_mean": 29.8916666667, "line_max": 96, "alpha_frac": 0.5861882924, "autogenerated": false, "ratio": 3.7672764227642275, "config_test": false, ...
from enum import Enum import tree from asm.Asm import * from asm.Registers import Registers from tree.nodes.types.VariableType import VariableType class OperationType(Enum): PLUS = '+' MINUS = '-' MULTIPLY = '*' DIVIDE = '/' MODULO = '%' LEFT_SHIFT = '<<' RIGHT_SHIFT = '>>' LESS = ...
{ "repo_name": "wilima/herocomp", "path": "herocomp/tree/nodes/operations/OperationType.py", "copies": "1", "size": "10559", "license": "mit", "hash": -2957056478274776600, "line_mean": 31.6904024768, "line_max": 111, "alpha_frac": 0.5677620987, "autogenerated": false, "ratio": 3.7589889640441436,...
from enum import Enum import typing from pydantic import BaseModel, Field, validator, create_model from opentrons.hardware_control import types class MotorName(str, Enum): # opentrons.hardware_control.types.Axis as an int enum. We need this to # be a string enum of the keys in Axis. We will use _ignore_ and...
{ "repo_name": "Opentrons/labware", "path": "robot-server/robot_server/service/legacy/models/motors.py", "copies": "3", "size": "1372", "license": "apache-2.0", "hash": 715575865546318500, "line_mean": 28.8260869565, "line_max": 78, "alpha_frac": 0.6734693878, "autogenerated": false, "ratio": 3.37...
from enum import Enum _MAX_INT = 2 ** 32 - 1 # Approximate circumference of the Earth in meters. EARTH_CIRCUMFERENCE = 40000000.0 # Maximum distance between Bluetooth networks to be considered close # enough to be from one consistent observation. MAX_BLUE_CLUSTER_METERS = 100.0 # Minimum number of Bluetooth network...
{ "repo_name": "mozilla/ichnaea", "path": "ichnaea/api/locate/constants.py", "copies": "1", "size": "3970", "license": "apache-2.0", "hash": 5711330359170248000, "line_mean": 28.8496240602, "line_max": 78, "alpha_frac": 0.6753148615, "autogenerated": false, "ratio": 3.7773549000951476, "config_t...
from enum import Enum _MAX_INT = 2 ** 32 - 1 EARTH_CIRCUMFERENCE = 40000000.0 """ Approximate circumference of the Earth in meters. """ MAX_WIFI_CLUSTER_METERS = 500 """ Maximum distance between WiFi networks to be considered close enough to be from one consistent observation. """ MIN_WIFIS_IN_QUERY = 2 """ Minimum...
{ "repo_name": "therewillbecode/ichnaea", "path": "ichnaea/api/locate/constants.py", "copies": "1", "size": "3019", "license": "apache-2.0", "hash": -4597638165819867000, "line_mean": 26.9537037037, "line_max": 79, "alpha_frac": 0.6323285856, "autogenerated": false, "ratio": 3.840966921119593, "...
from enum import Enum MessageType = Enum('done_sending', 'done_receiving', 'notify', 'request', 'exit') class Message(object): # NOTIFY, REQUEST, EXIT, DONE_SENDING, DONE_RECEIVING = range(5) SYSTEM_PRIORITY = 0 OTHER_PRIORITY = 1 def __init__(self, type_, sender_id, block_id, *payload): self...
{ "repo_name": "AAzza/overlay-network", "path": "overlay_network/message.py", "copies": "1", "size": "1062", "license": "bsd-2-clause", "hash": -7039749572148187000, "line_mean": 31.1818181818, "line_max": 85, "alpha_frac": 0.5979284369, "autogenerated": false, "ratio": 3.7132867132867133, "conf...
from enum import Enum __author__ = 'attakei' class _RadikoArea(Enum): """Behavior extension for RadikoArea. """ def get_id(self): return 'JP{}'.format(self.value) @property def area_id(self): return self.get_id() class RadikoArea(_RadikoArea): """Radiko Area id enumeration...
{ "repo_name": "attakei/radikowave", "path": "radikowave/api.py", "copies": "1", "size": "2182", "license": "mit", "hash": -2463037596786497000, "line_mean": 19.9807692308, "line_max": 84, "alpha_frac": 0.5751604033, "autogenerated": false, "ratio": 3.1216022889842634, "config_test": false, "h...
from enum import Enum BOARD_SIZE = 9 class TroopType(Enum): Swordsman = 1 Spearman = 2 Archer = 3 Horseman = 4 General = 5 class Color(Enum): Black = 0 White = 1 STARTING_BOARD = [[ TroopType.Spearman, TroopType.Swordsman, TroopType.Swordsman, TroopType.Horsem...
{ "repo_name": "diorge/game-cross", "path": "cross/game.py", "copies": "1", "size": "4673", "license": "mit", "hash": -7426457908411409000, "line_mean": 29.1483870968, "line_max": 78, "alpha_frac": 0.5471859619, "autogenerated": false, "ratio": 3.5946153846153845, "config_test": false, "has_no...
from enum import Enum CACHE = {} class WordDifficulty(Enum): """Difficulty rating of a word.""" BASIC = 0 EASY = 1 MED = 2 HARD = 3 class CorpusDatabase: FULL = 'corpora/en.txt' MIN = 'corpora/en_min.txt' class Corpus: """Database of word frequency in the English language.""" ...
{ "repo_name": "stephanos/subvoc", "path": "domain/corpus.py", "copies": "1", "size": "1242", "license": "mit", "hash": -8217116509919243000, "line_mean": 23.3529411765, "line_max": 68, "alpha_frac": 0.5636070853, "autogenerated": false, "ratio": 3.980769230769231, "config_test": false, "has_n...
from enum import Enum class AckType(Enum): ACCEPT = 'accept' DECLINE = 'decline' DEFER = 'defer' UNACKNOWLEDGED = 'unacknowledged' class ActionType(Enum): ACTIVATE_RELAY = 'activateRelay' ADJUST_TEMP = 'adjustTemp' DO_NOTHING = 'doNothing' SHUTDOWN_AC = 'shutdownAC' SHUTDOWN_AUX_...
{ "repo_name": "sfanous/Pyecobee", "path": "pyecobee/enumerations.py", "copies": "1", "size": "5577", "license": "mit", "hash": -6970278020233889000, "line_mean": 22.0454545455, "line_max": 56, "alpha_frac": 0.6444324906, "autogenerated": false, "ratio": 2.646891314665401, "config_test": false, ...
from enum import Enum class Actions(Enum): DELETE = 0 INVALID = 1 VALID = 2 class PagedMessage: DELETE = Actions.DELETE INVALID = Actions.INVALID VALID = Actions.VALID def __init__(self, pages, prev='◀', next_='▶', stop='⏹', accept=None, test_check=False, starting_idx=0...
{ "repo_name": "s0hvaperuna/Not-a-bot", "path": "bot/paged_message.py", "copies": "1", "size": "2163", "license": "mit", "hash": -4236283046382307300, "line_mean": 26.3037974684, "line_max": 110, "alpha_frac": 0.5326842837, "autogenerated": false, "ratio": 4.3053892215568865, "config_test": fals...
from enum import Enum class Activity(Enum): ''' As defined here: https://developers.google.com/fit/rest/v1/reference/activity-types ''' in_vehicle = 0 biking = 1 on_foot = 2 still_not_moving = 3 # unknown (Unable to detect activity) unknown = 4 # tilting (sudden device grav...
{ "repo_name": "leohemsted/gfitpy", "path": "src/gfitpy/utils/activities.py", "copies": "1", "size": "3373", "license": "bsd-2-clause", "hash": 6432518758180522000, "line_mean": 22.2620689655, "line_max": 96, "alpha_frac": 0.5950192707, "autogenerated": false, "ratio": 3.290731707317073, "config...
from enum import Enum class AdcpCmd: """ ADCP Command. """ def __init__(self, cmd, value): self.cmd = cmd self.value = value def to_str(self, index): """ Convert the command to a command string. Convert the index to a hex then remove the 0x from the value....
{ "repo_name": "ricorx7/rti_python", "path": "ADCP/AdcpCommands.py", "copies": "2", "size": "16245", "license": "bsd-3-clause", "hash": 4729803642624826000, "line_mean": 31.752016129, "line_max": 161, "alpha_frac": 0.5169590643, "autogenerated": false, "ratio": 3.4070889261744965, "config_test":...
from enum import Enum class AtomState(str, Enum): NOT_STARTED = 'NOT_STARTED' IN_PROGRESS = 'IN_PROGRESS' COMPLETED = 'COMPLETED' class Atom(object): def __init__( self, command_string, expected_time=None, actual_time=None, exit_code=None, ...
{ "repo_name": "Medium/ClusterRunner", "path": "app/master/atom.py", "copies": "4", "size": "1296", "license": "apache-2.0", "hash": -2320138997274536000, "line_mean": 26.5744680851, "line_max": 50, "alpha_frac": 0.525462963, "autogenerated": false, "ratio": 3.8117647058823527, "config_test": fa...
from enum import Enum class AtomStyle(Enum): """ Supported atom styles """ ATOMIC = 0 GRANULAR = 1 SPHERE = 1 # same as GRANULAR in LIGGGHTS # mapping from lammps style to AtomStyle LAMMPS_STYLE = { 'atomic': AtomStyle.ATOMIC, 'granular': AtomStyle.GRANULAR, 'sphere': AtomStyle.SPH...
{ "repo_name": "simphony/simphony-lammps-md", "path": "simlammps/common/atom_style.py", "copies": "1", "size": "1471", "license": "bsd-2-clause", "hash": -3410936310717560300, "line_mean": 20.6323529412, "line_max": 76, "alpha_frac": 0.5703602991, "autogenerated": false, "ratio": 4.239193083573487...
from enum import Enum class AutoNumber(Enum): def __new__(cls): value = len(cls.__members__) + 1 obj = object.__new__(cls) obj._value_ = value return obj class Et(AutoNumber): ds = () dht = () dht_temp = () dht_hum = () led = () pir = () rs = () he...
{ "repo_name": "dzon4xx/system", "path": "backend/misc/sys_types.py", "copies": "1", "size": "1039", "license": "mit", "hash": -6154033179996492000, "line_mean": 13.2328767123, "line_max": 40, "alpha_frac": 0.4658325313, "autogenerated": false, "ratio": 3.2267080745341614, "config_test": false, ...
from enum import Enum class BatchStatus(Enum): """Status of Batches""" Staging = "staging" InProgress = "in_progress" Completed = "completed" class Batch: """Batch class, contains Batch information""" def __init__(self, json, client): self._json = json self.name = json["nam...
{ "repo_name": "scaleapi/scaleapi-python-client", "path": "scaleapi/batches.py", "copies": "1", "size": "1457", "license": "mit", "hash": -9117115161617582000, "line_mean": 25.0178571429, "line_max": 66, "alpha_frac": 0.5669183253, "autogenerated": false, "ratio": 4.002747252747253, "config_test...
from enum import Enum class BoutType(Enum): _unused = 0 FLYWEIGHT = 1 BANTAMWEIGHT = 2 FEATHERWEIGHT = 3 LIGHTWEIGHT = 4 WELTERWEIGHT = 5 MIDDLEWEIGHT = 6 LIGHT_HEAVYWEIGHT = 7 HEAVYWEIGHT = 8 W_STRAWWEIGHT = 9 W_BANTAMWEIGHT = 10 W_FEATHERWEIGHT = 11 CATCHWEIGHT = 12 class Event(object): """docstring ...
{ "repo_name": "gilmanjo/MMA-Odds", "path": "mma-odds/scraper/ufc_objects.py", "copies": "1", "size": "1754", "license": "mit", "hash": 7100325869977623000, "line_mean": 20.4024390244, "line_max": 50, "alpha_frac": 0.6368301026, "autogenerated": false, "ratio": 2.629685157421289, "config_test": ...
from enum import Enum class CacmDocument: def __init__(self, doc_id, title, abstract, keywords): self.doc_id = doc_id self.title = title self.abstract = abstract self.keywords = keywords def get_full_text(self): """ Returns: a string containing the...
{ "repo_name": "Neki/searchengine", "path": "searchengine/parser/cacm_document.py", "copies": "1", "size": "4262", "license": "mit", "hash": 805870449505357700, "line_mean": 25.1472392638, "line_max": 103, "alpha_frac": 0.5628812764, "autogenerated": false, "ratio": 3.6334185848252343, "config_t...
from enum import Enum class Card: class Face(Enum): SEVEN = 0 EIGHT = 1 NINE = 2 TEN = 3 JACK = 4 QUEEN = 5 KING = 6 ACE = 7 @staticmethod def to_display(suit): if suit is Card.Face.SEVEN: return str(7) ...
{ "repo_name": "dkiefner/skat-buddy", "path": "skat-buddy/model/card.py", "copies": "1", "size": "2073", "license": "mit", "hash": 9097205089934484000, "line_mean": 25.253164557, "line_max": 88, "alpha_frac": 0.484804631, "autogenerated": false, "ratio": 3.5927209705372616, "config_test": false,...
from enum import Enum class CollectionTypes(Enum): cache = 1 history = 2 item = 3 class DatabaseFactory(object): def __init__(self, host, port, user, passwd, db, collection_name): super(DatabaseFactory, self).__init__() self.host = host self.port = port self.user = us...
{ "repo_name": "trujunzhang/djzhang-targets", "path": "cwharaj/cwharaj/database_factory.py", "copies": "1", "size": "1733", "license": "mit", "hash": 8477147586828815000, "line_mean": 41.2682926829, "line_max": 111, "alpha_frac": 0.5689555684, "autogenerated": false, "ratio": 4.60904255319149, "...
from enum import Enum class Commands(Enum): ADD_MOD = 'add mod' REMOVE_MOD = 'remove mod' LIST_MOD = 'list mod' LAST_HAIKU = 'show last' SHOW_ID = 'show' SHOW_FROM = 'show from' EXPORT = 'export' STATS_TOP = 'stats top' STATS_LONGEST = 'stats longest' STATS_FEWEST = 'stats fewe...
{ "repo_name": "hermith/haikubot", "path": "haikubot/commands/commands.py", "copies": "1", "size": "1659", "license": "mit", "hash": -98742952121854640, "line_mean": 33.5625, "line_max": 74, "alpha_frac": 0.6238698011, "autogenerated": false, "ratio": 3.2088974854932304, "config_test": false, ...
from enum import Enum class CompileError(Exception): pass class InterpretError(Exception): pass class Errors(Enum): # type errors MUST_BE_X_TYPE = 100 MISSING_REQUIRED_ARG = 101 MISSING_REQUIRED_ARG_N = 102 TAKES_TOOMANY_ARGS = 103 UNKNOWN_ATTRIBUTE = 104 INCOMPATIBLE_TYPES = 1...
{ "repo_name": "ktok07b6/polyphony", "path": "polyphony/compiler/errors.py", "copies": "1", "size": "10925", "license": "mit", "hash": -537032527347299800, "line_mean": 46.2943722944, "line_max": 165, "alpha_frac": 0.7072768879, "autogenerated": false, "ratio": 3.314623786407767, "config_test": ...
from enum import Enum class Completion(Enum): """ An `Enum` to represent compleability states. """ InProgress = 0 Finished = 1 Lost = 2 class Completable(object): """ An indicator of Completability. """ def __init__(self, **kwargs): """ `progress` - (Optional)...
{ "repo_name": "DanCardin/PyPlatformer", "path": "pyPlatformer/complete.py", "copies": "1", "size": "1858", "license": "mpl-2.0", "hash": 2707770070189660700, "line_mean": 25.1690140845, "line_max": 97, "alpha_frac": 0.5705059203, "autogenerated": false, "ratio": 4.509708737864078, "config_test"...
from enum import Enum class ConfigSyntax(Enum('ConfigSyntax', ('json', 'conf', 'properties'))): """ The syntax of a character stream (<a href="http://json.org">JSON</a>, <a href="https://github.com/typesafehub/config/blob/master/HOCON.md">HOCON</a> aka ".conf", or <a href= "http://download.oracle....
{ "repo_name": "chris-martin/hocon-python", "path": "hocon/ConfigSyntax.py", "copies": "1", "size": "1340", "license": "apache-2.0", "hash": 8365777873321193000, "line_mean": 42.2258064516, "line_max": 109, "alpha_frac": 0.6328358209, "autogenerated": false, "ratio": 3.641304347826087, "config_t...
from enum import Enum class ConnectorRelationType(Enum): SYNAPTIC = "Synaptic" GAP_JUNCTION = "Gap junction" TIGHT_JUNCTION = "Tight junction" DESMOSOME = "Desmosome" ABUTTING = "Abutting" ATTACHMENT = "Attachment" SPATIAL = "Spatial" OTHER = "" @classmethod def from_relation(...
{ "repo_name": "catmaid/catpy", "path": "catpy/enums.py", "copies": "1", "size": "1933", "license": "mit", "hash": -5683173774409459000, "line_mean": 31.7627118644, "line_max": 109, "alpha_frac": 0.665804449, "autogenerated": false, "ratio": 3.4954792043399636, "config_test": false, "has_no_ke...
from enum import Enum class CurrentProjectStageEnum(Enum): SAVED = 'save_and_refine_search' ENDED = 'search_ended' DOWNLOADED = 'download_results' READY_TO_ASSESS = 'ready_to_assess' # the following correspond with digitalmarketplace-api:app.models.outcomes.Outcome.RESULT_CHOICES FAILED = 'non...
{ "repo_name": "alphagov/digitalmarketplace-buyer-frontend", "path": "app/main/helpers/dm_google_analytics.py", "copies": "1", "size": "1141", "license": "mit", "hash": 8987181859804986000, "line_mean": 31.6, "line_max": 120, "alpha_frac": 0.703768624, "autogenerated": false, "ratio": 3.7409836065...
from enum import Enum class DeviceAttributes(Enum): """This enumeration describes all of the device attributes available to OTA profile enrolment. """ UDID = 'UDID' VERSION = 'VERSION' PRODUCT = 'PRODUCT' DEVICE_NAME = 'DEVICE_NAME' SERIAL = 'SERIAL' MODEL = 'MODEL' MAC_ADDRESS_EN0...
{ "repo_name": "jessepeterson/commandment", "path": "commandment/enroll/__init__.py", "copies": "1", "size": "1030", "license": "mit", "hash": 7801448026355678000, "line_mean": 25.4102564103, "line_max": 98, "alpha_frac": 0.6922330097, "autogenerated": false, "ratio": 3.366013071895425, "config_...
from enum import Enum class Direction(Enum): Top = 1 Bottom = 2 Left = 3 Right = 4 class Dir(object): """ Classes should inherit from this in order to have a `Direction`. """ def __init__(self, **kwargs): """ `dirRule` - A `callable` that is evaluated to determine the...
{ "repo_name": "DanCardin/PyPlatformer", "path": "pyPlatformer/direction.py", "copies": "1", "size": "1292", "license": "mpl-2.0", "hash": -7842350055726758000, "line_mean": 26.4893617021, "line_max": 96, "alpha_frac": 0.5487616099, "autogenerated": false, "ratio": 4.379661016949153, "config_tes...
from enum import Enum class EnumJobResultName(Enum): core_ping = "core.ping" core_system = "core.system" core_kill = "core.kill" core_killall = "core.killall" core_state = "core.state" core_reboot = "core.reboot" info_cpu = "info.cpu" info_disk = "info.disk" info_mem = "info.mem" ...
{ "repo_name": "g8os/grid", "path": "pyclient/zeroos/orchestrator/client/EnumJobResultName.py", "copies": "2", "size": "1039", "license": "apache-2.0", "hash": 6319834743534005000, "line_mean": 30.4848484848, "line_max": 47, "alpha_frac": 0.6487006737, "autogenerated": false, "ratio": 2.9103641456...
from enum import Enum class ErrorCodes(Enum): """ """ # # NOTE: Testing to see if Enums as error codes is usable. # e0100 = 'Settings Error: ({0!s}).' e0110 = 'Settings Error: ({0!s}) is an invalid value. API Request Timeout must be a integer.' e0120 = 'Settings Error: ({0!s}) is an inval...
{ "repo_name": "percipient/threatconnect-python", "path": "threatconnect/ErrorCodes.py", "copies": "1", "size": "5862", "license": "apache-2.0", "hash": -5679172901161861000, "line_mean": 54.8285714286, "line_max": 117, "alpha_frac": 0.6847492323, "autogenerated": false, "ratio": 3.757692307692307...
from enum import Enum class Events (str, Enum): """ Events are based on the section "Events" from the Discord API: https://discordapp.com/developers/docs/topics/gateway """ READY = 'READY' RESUMED = 'RESUMED' CHANNEL_CREATE = 'CHANNEL_CREATE' CHANNEL_UPDATE = 'CHANNEL_UPDATE' CHANN...
{ "repo_name": "ShifuYee/Discord-Bot", "path": "discord_bot/events.py", "copies": "1", "size": "1501", "license": "mit", "hash": -2119774298259289900, "line_mean": 37.4871794872, "line_max": 66, "alpha_frac": 0.6888740839, "autogenerated": false, "ratio": 2.8214285714285716, "config_test": false...
from enum import Enum class EventType(Enum): """Enum containing the various types of events that can occur.""" CLIENT_READY = "CLIENT_READY" CLIENT_RESUMED = "CLIENT_RESUMED" MESSAGE_RECEIVED = "MESSAGE_RECEIVED" SERVER_MESSAGE_RECEIVED = "SERVER_MESSAGE_RECEIVED" PRIVATE_MESSAGE_RECEIVED = "...
{ "repo_name": "nint8835/NintbotForDiscordV2", "path": "NintbotForDiscord/Enums.py", "copies": "1", "size": "1656", "license": "mit", "hash": -2122898933931089400, "line_mean": 28.0526315789, "line_max": 69, "alpha_frac": 0.6884057971, "autogenerated": false, "ratio": 3.106941838649156, "config_...
from enum import Enum class FieldType(Enum): id = 1, text = 2, rest = 3, author = 4 class InvalidRequest(Exception): def __init__(self, pos, *args, **kwargs): super() self.pos = pos def load_from_query_file(path): """ Returns: (dict of int to string) a dictionna...
{ "repo_name": "Neki/searchengine", "path": "searchengine/parser/query.py", "copies": "1", "size": "2424", "license": "mit", "hash": -567075956386775200, "line_mean": 23.7346938776, "line_max": 95, "alpha_frac": 0.5544554455, "autogenerated": false, "ratio": 3.39020979020979, "config_test": fals...
from enum import Enum class FileExt(Enum): lm = '.ljson' template = '.yml' old_template = '.txt' collection = '.txt' class CacheFile(Enum): texture = 'texture.jpg' image = 'image.json' thumbnail = 'thumbnail.jpg' mesh_tmp = 'mesh.raw.tmp' mesh = 'mesh.raw.gz' class Server(Enum)...
{ "repo_name": "jabooth/landmarkerio-server", "path": "landmarkerio/__init__.py", "copies": "1", "size": "1280", "license": "bsd-3-clause", "hash": -148188102274652300, "line_mean": 21.8571428571, "line_max": 78, "alpha_frac": 0.6109375, "autogenerated": false, "ratio": 3.4133333333333336, "conf...
from enum import Enum class FormFactorConstant(Enum): # Virtual interfaces VIRTUAL = 0 LAG = 200 # Ethernet (fixed) BASE_TX_10_100ME = 800 BASE_T_1GE = 1000 GBASE_T_10GE = 1150 # Ethernet (modular) GBIC_1GE = 1050 SFP_1GE = 1100 SFP_PLUS_10GE = 1200 XFP_10GE = 1300 ...
{ "repo_name": "zinic/netbox_api", "path": "netbox_api/model/interface.py", "copies": "1", "size": "2406", "license": "mit", "hash": -906085263098056000, "line_mean": 22.8217821782, "line_max": 114, "alpha_frac": 0.5985037406, "autogenerated": false, "ratio": 3.3792134831460676, "config_test": f...
from enum import Enum class FuncCode(Enum): login = 'GO010' top = 'GO020' projectChange = 'GO030' projectList = 'GM1110' projectDetail = 'GM1150' projectCreate = 'GM1120' projectEdit = 'GM1130' projectDelete = 'GM1140' cloudList = 'GM1210' cloudDetail = 'GM1250' cloudCreat...
{ "repo_name": "cloudconductor/cloud_conductor_gui", "path": "gui_app/enum/FunctionCode.py", "copies": "1", "size": "2349", "license": "apache-2.0", "hash": 5722729787924052000, "line_mean": 24.2580645161, "line_max": 39, "alpha_frac": 0.6534695615, "autogenerated": false, "ratio": 3.1530201342281...
from enum import Enum class HCIErrorCode(Enum): success = 0x00 unknown_hci_command = 0x01 unknown_connection_id = 0x02 hardware_failure = 0x03 page_timeout = 0x04 authentication_failure = 0x05 pin_or_key_missing = 0x06 memory_capacity_exceeded = 0x07 connection_timeout = 0x08 c...
{ "repo_name": "pebble/pybluetooth", "path": "pybluetooth/hci_errors.py", "copies": "1", "size": "1100", "license": "mit", "hash": 650013607484452400, "line_mean": 28.7297297297, "line_max": 67, "alpha_frac": 0.7263636364, "autogenerated": false, "ratio": 3.2448377581120944, "config_test": false...
from enum import Enum class HomologyTypes(Enum): """ Core homology relations from RO """ Ortholog = 'RO:HOM0000017' LeastDivergedOrtholog = 'RO:HOM0000020' Homolog = 'RO:HOM0000007' Paralog = 'RO:HOM0000011' InParalog = 'RO:HOM0000023' OutParalog = 'RO:HOM0000024' Ohnolog = 'RO...
{ "repo_name": "biolink/ontobio", "path": "ontobio/vocabulary/relations.py", "copies": "1", "size": "1226", "license": "bsd-3-clause", "hash": -1822034312329944800, "line_mean": 25.085106383, "line_max": 57, "alpha_frac": 0.5897226754, "autogenerated": false, "ratio": 2.7612612612612613, "config...
from enum import Enum class IndexLockMode(Enum): Unlock = 0 LockedIgnore = 1 LockedError = 2 SideBySide = 3 def __str__(self): return self.name # For server class SortOptions(Enum): # Sort using term values as encoded Floats. Sort values are Float and # lower values are at the ...
{ "repo_name": "IdanHaim/RavenDB-Python-Client", "path": "pyravendb/data/indexes.py", "copies": "1", "size": "5394", "license": "mit", "hash": -5291551917715127000, "line_mean": 36.4583333333, "line_max": 118, "alpha_frac": 0.6064145347, "autogenerated": false, "ratio": 3.785263157894737, "confi...
from enum import Enum class InotifyMask(Enum): access = 0x1 modify = 0x2 attrib = 0x4 close_write = 0x8 close_nowrite = 0x10 open = 0x20 moved_from = 0x40 moved_to = 0x80 create = 0x100 delete = 0x200 delete_self = 0x400 move_self = 0x800 class InotifyEvent: """ ...
{ "repo_name": "mwfrojdman/aioinotify", "path": "aioinotify/events.py", "copies": "1", "size": "1457", "license": "apache-2.0", "hash": 1354413418113093400, "line_mean": 25.4909090909, "line_max": 92, "alpha_frac": 0.619080302, "autogenerated": false, "ratio": 3.571078431372549, "config_test": f...
from enum import Enum class ItemAttributeId(Enum): """ Derived from makemkvgui/inc/lgpl/apdefs.h """ Unknown = 0 Type = 1 Name = 2 LangCode = 3 LangName = 4 CodecId = 5 CodecShort = 6 CodecLong = 7 ChapterCount = 8 Duration = 9 DiskSize = 10 DiskSizeBytes = ...
{ "repo_name": "coolman565/blu_two", "path": "makeMKV/model/enum/item_attribute_id.py", "copies": "1", "size": "1300", "license": "mit", "hash": 4568436320888412700, "line_mean": 21.4137931034, "line_max": 45, "alpha_frac": 0.6569230769, "autogenerated": false, "ratio": 3.9877300613496933, "conf...
from enum import Enum class Item(Enum): ITEM_UNKNOWN = 0 ITEM_POKE_BALL = 1 ITEM_GREAT_BALL = 2 ITEM_ULTRA_BALL = 3 ITEM_MASTER_BALL = 4 ITEM_PREMIER_BALL = 5 ITEM_POTION = 101 ITEM_SUPER_POTION = 102 ITEM_HYPER_POTION = 103 ITEM_MAX_POTION = 104 ITEM_REVIVE = 201 ITEM_...
{ "repo_name": "goedzo/PokemonGo-Bot", "path": "pokemongo_bot/item_list.py", "copies": "1", "size": "1340", "license": "mit", "hash": -1891129134186934300, "line_mean": 26.3673469388, "line_max": 42, "alpha_frac": 0.6492537313, "autogenerated": false, "ratio": 2.31433506044905, "config_test": fa...
from enum import Enum class LaserPathType(Enum): hit = "hit" bounce = "bounce" through = "pass" # destroy = "destroy" class MoveType(Enum): rotate = "ROTATE" move = "MOVE" swap = "SWAP" class TeamColor(Enum): red = "red" silver = "silver" blank = "blank" @staticmethod ...
{ "repo_name": "TheWiseLion/pykhet", "path": "pykhet/components/types.py", "copies": "1", "size": "11666", "license": "mit", "hash": 5034175985072904000, "line_mean": 33.1111111111, "line_max": 119, "alpha_frac": 0.5793759643, "autogenerated": false, "ratio": 4.112090236164963, "config_test": fa...
from enum import Enum class LinkResult(Enum): none = 0 ok = 1 unchanged = 2 source_has_next = 3 target_has_previous = 4 class Node(object): def __init__(self, element=None): self.element = element self.previous = None self.next = None def find_head(self): ...
{ "repo_name": "yellcorp/gather", "path": "gather/graph.py", "copies": "1", "size": "1300", "license": "mit", "hash": -7094221627023009000, "line_mean": 19.6349206349, "line_max": 49, "alpha_frac": 0.5323076923, "autogenerated": false, "ratio": 4.012345679012346, "config_test": false, "has_no_...
from enum import Enum class LivefyreException(Exception): pass class ApiException(LivefyreException): def __init__(self, code): status = ApiStatus.by_code(code) super(ApiException, self).__init__(status.msg) class ApiStatus(Enum): BAD_REQUEST = (400, 'Please check the contents of y...
{ "repo_name": "Livefyre/livefyre-python-utils", "path": "livefyre/src/exceptions/__init__.py", "copies": "1", "size": "1653", "license": "mit", "hash": -500769338764640700, "line_mean": 49.0909090909, "line_max": 207, "alpha_frac": 0.6932849365, "autogenerated": false, "ratio": 4.12219451371571, ...
from enum import Enum class Locale(Enum): """This will allow Scrapers / Filters / Main to identify the support they have for different domains of different websites Locale must be set as it defines the code implementation to use for forming the correct GET requests, to allow us to interact with a job...
{ "repo_name": "PaulMcInnis/JobPy", "path": "jobfunnel/resources/enums.py", "copies": "1", "size": "1903", "license": "mit", "hash": 5110496640381007000, "line_mean": 19.9120879121, "line_max": 79, "alpha_frac": 0.6111403048, "autogenerated": false, "ratio": 3.410394265232975, "config_test": fal...
from enum import Enum class MessageType(Enum): COMMAND = 0 GET_WORKSPACES = 1 SUBSCRIBE = 2 GET_OUTPUTS = 3 GET_TREE = 4 GET_MARKS = 5 GET_BAR_CONFIG = 6 GET_VERSION = 7 GET_BINDING_MODES = 8 GET_CONFIG = 9 SEND_TICK = 10 # sway-specific command types GET_INPUTS = 1...
{ "repo_name": "acrisci/i3ipc-python", "path": "i3ipc/_private/types.py", "copies": "1", "size": "2020", "license": "bsd-3-clause", "hash": 7460651834235248000, "line_mean": 25.5789473684, "line_max": 70, "alpha_frac": 0.5896039604, "autogenerated": false, "ratio": 3.406408094435076, "config_tes...
from enum import Enum class MetaTag: """Metadata container for test case tagging """ def __init__(self): self.product = None self.priority = -1 self.categories = set() class ProductTag(Enum): """Product labels used in tag-decorator """ ACE = 'ACE' BME = 'BME' ...
{ "repo_name": "crazeejeeves/trisuite", "path": "framework/tags.py", "copies": "1", "size": "1095", "license": "apache-2.0", "hash": -2774703022323933700, "line_mean": 23.8863636364, "line_max": 111, "alpha_frac": 0.6173515982, "autogenerated": false, "ratio": 4.1477272727272725, "config_test": ...
from enum import Enum class ModuleAccessLevel(Enum): ANYONE = 0 ADMINS = 1 class ModuleInterface(object): """ The interface modules should inherit and implement in order to function with the ModuleHandler. triggers - command words that cause the module to trigger. accepted_types - message t...
{ "repo_name": "HubbeKing/Hubbot_Twisted", "path": "hubbot/moduleinterface.py", "copies": "1", "size": "2134", "license": "mit", "hash": 7117098665014457000, "line_mean": 32.34375, "line_max": 138, "alpha_frac": 0.6532333646, "autogenerated": false, "ratio": 4.669584245076586, "config_test": fal...
from enum import Enum class Ohlc(object): """Open High Low Close.""" __slots__ = ['open', 'high', 'low', 'close'] def __init__(self, open, high, low, close): self.open = open self.high = high self.low = low self.close = close def __str__(self): return '%s(ope...
{ "repo_name": "melphi/algobox", "path": "python/algobox/src/algobox/price/domain.py", "copies": "1", "size": "3826", "license": "apache-2.0", "hash": -2262345695519378000, "line_mean": 29.608, "line_max": 78, "alpha_frac": 0.5347621537, "autogenerated": false, "ratio": 3.7509803921568627, "conf...
from enum import Enum class Operator: class Associativity(Enum): LEFT = 'left' RIGHT = 'right' NONE = 'none' class Fixity(Enum): PREFIX = 'prefix' INFIX = 'infix' POSTFIX = 'postfix' def __init__(self, symbol, *, arity=None, precedence=None, associativity...
{ "repo_name": "matthewwardrop/formulaic", "path": "formulaic/parser/types/operator.py", "copies": "1", "size": "1190", "license": "mit", "hash": 5131946591118629000, "line_mean": 24.8695652174, "line_max": 114, "alpha_frac": 0.6084033613, "autogenerated": false, "ratio": 3.7658227848101267, "co...
from enum import Enum class Pagina(Enum): login = 1, principal = 2, disciplina = 3, mensagens = 4, boletos = 5, horarios = 6, cursos = 7, boletim = 8 ''' Uma forma mais organizada de gerenciar as URLs utilizadas pela API. Caso seja necessário alterar alguma URL, basta alterar esta fu...
{ "repo_name": "SamuelTM/univapi", "path": "stm/univapi/auxiliares/paginas.py", "copies": "1", "size": "1111", "license": "mit", "hash": -7685441097099482000, "line_mean": 26.0243902439, "line_max": 106, "alpha_frac": 0.6290613718, "autogenerated": false, "ratio": 2.790931989924433, "config_test...
from enum import Enum class Parse(Enum): BYTES = 1 ASCII = 2 DOL = 3 # Data Object List DEC = 4 # Decimal encoded in hex DATE = 5 # Date encoded in hex digits as [0xYY 0xMM 0xDD] INT = 6 # Decode bytes as an integer COUNTRY = 7 # Decode bytes as an ISO country code CURRENCY = 8 #...
{ "repo_name": "russss/python-emv", "path": "emv/protocol/data_elements.py", "copies": "1", "size": "10827", "license": "mit", "hash": 2845377731403623400, "line_mean": 52.3349753695, "line_max": 238, "alpha_frac": 0.6520735199, "autogenerated": false, "ratio": 2.9309691391445587, "config_test":...