text stringlengths 0 1.05M | meta dict |
|---|---|
from enum import Enum, unique
import re
from .base import ARPAParser
from ..exceptions import ParseException
class ARPAParserQuick(ARPAParser):
@unique
class State(Enum):
DATA = 1
COUNT = 2
HEADER = 3
ENTRY = 4
re_count = re.compile(r'^ngram (\d+)=(\d+)$')
re_header =... | {
"repo_name": "sfischer13/python-arpa",
"path": "arpa/parsers/quick.py",
"copies": "1",
"size": "3021",
"license": "mit",
"hash": -2957525916377740000,
"line_mean": 29.8265306122,
"line_max": 68,
"alpha_frac": 0.4922211188,
"autogenerated": false,
"ratio": 3.8143939393939394,
"config_test": fal... |
from enum import Enum, unique
from bomb_defusal.modules.module import DisarmableModule
@unique
class KeypadChar(Enum):
AELIG = 'aelig'
ALVEOLAR = 'alveolar'
ARCHKOPPA = 'archkoppa'
BE = 'be'
COPY = 'copy'
IBIGYUS = 'ibigyus'
IQUEST = 'iquest'
KAI = 'kai'
KOMIDZJE = 'komidzje'
... | {
"repo_name": "leupibr/BombDefusal",
"path": "bomb_defusal/modules/keypad.py",
"copies": "1",
"size": "4162",
"license": "mit",
"hash": 4582676146036265500,
"line_mean": 25.1761006289,
"line_max": 112,
"alpha_frac": 0.5778471889,
"autogenerated": false,
"ratio": 3.43682906688687,
"config_test":... |
from enum import Enum, unique
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
@unique
class Gender(Enum):
MALE = 1
FEMALE = 2
@unique
class UserType(Enum):
VOLUNTEER = 1
INITIATOR = 2
cla... | {
"repo_name": "SeiryuZ/magnet",
"path": "magnet/apps/users/models.py",
"copies": "1",
"size": "3350",
"license": "mit",
"hash": 8289263755466251000,
"line_mean": 32.5,
"line_max": 107,
"alpha_frac": 0.6244776119,
"autogenerated": false,
"ratio": 3.8111490329920366,
"config_test": false,
"has_... |
from enum import Enum, unique
from django.db import models
from django.utils.translation import ugettext_lazy as _
@unique
class Fields(Enum):
ENERGY = 1
MARITIME_FISHERIES = 2
HEALTH = 3
DEFENSE = 4
ENVIRONMENT = 5
SOCIAL = 6
EDUCATION = 7
TECHNOLOGY = 8
CULTURE_AND_LANGUAGE = 9
... | {
"repo_name": "SeiryuZ/magnet",
"path": "magnet/apps/initiatives/models.py",
"copies": "1",
"size": "2239",
"license": "mit",
"hash": 2997286050472976000,
"line_mean": 35.1129032258,
"line_max": 110,
"alpha_frac": 0.6158999553,
"autogenerated": false,
"ratio": 3.8537005163511187,
"config_test":... |
from enum import Enum, unique
from flask_babel import lazy_gettext as _
@unique
class Roles(Enum):
"""
Roles used to secure the application.
Note: When updating the list of roles do not change the key of an role,
without creating a proper migration.
"""
ACTIVITY_WRITE = _("Create activities... | {
"repo_name": "viaict/viaduct",
"path": "app/roles.py",
"copies": "1",
"size": "1671",
"license": "mit",
"hash": 174504954486850020,
"line_mean": 32.42,
"line_max": 75,
"alpha_frac": 0.6469180132,
"autogenerated": false,
"ratio": 3.815068493150685,
"config_test": false,
"has_no_keywords": fal... |
from enum import Enum, unique
from flask import abort
from flask_restful import Resource, reqparse, fields, marshal, inputs
from softframe.misc.routines import classify_paragraphs
tasks = [
{
'id': 1,
'title': u'Buy groceries',
'description': u'Milk, Cheese, Pizza, Fruit, Tylenol',
... | {
"repo_name": "pcastanha/frame",
"path": "src/softframe/rest/endpoints.py",
"copies": "1",
"size": "3830",
"license": "bsd-2-clause",
"hash": -3273333975154920400,
"line_mean": 31.735042735,
"line_max": 118,
"alpha_frac": 0.5689295039,
"autogenerated": false,
"ratio": 3.773399014778325,
"config... |
from enum import Enum, unique
from kii import exceptions as exc
from kii.data import (
application as ApplicationScopeBucket,
group as GroupScopeBucket,
user as UserScopeBucket,
clauses,
)
from kii.enums import UserRequestType
from kii.users import AccountTypeMixin
from kii.utils import Accessor
RESE... | {
"repo_name": "ta2xeo/python3-kii",
"path": "kii/data/__init__.py",
"copies": "1",
"size": "10262",
"license": "mit",
"hash": 5756327713055763000,
"line_mean": 35.9136690647,
"line_max": 93,
"alpha_frac": 0.5744494251,
"autogenerated": false,
"ratio": 3.9929961089494164,
"config_test": false,
... |
from enum import Enum, unique
from peewee import *
# Print all queries to stderr.
import logging
db = SqliteDatabase('gustaf.db')
logger = logging.getLogger('peewee')
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())
@unique
class PlayState(Enum):
NOT_WATCHED = (1, "Not watched", "dang... | {
"repo_name": "rkohser/gustaf",
"path": "app/model/model.py",
"copies": "1",
"size": "2242",
"license": "mit",
"hash": 4050231100995239,
"line_mean": 23.6373626374,
"line_max": 79,
"alpha_frac": 0.6445138269,
"autogenerated": false,
"ratio": 3.7180762852404645,
"config_test": false,
"has_no_k... |
from enum import Enum, unique
from pydoof.management_api.api_client import ManagementAPIClient
from pydoof.helpers import parse_query_params
@unique
class Devices(Enum):
DESKTOP = 'desktop'
MOBILE = 'mobile'
@unique
class Formats(Enum):
JSON = 'json'
CSV = 'csv'
@unique
class Sources(Enum):
V... | {
"repo_name": "doofinder/pydoof",
"path": "pydoof/management_api/stats.py",
"copies": "1",
"size": "9016",
"license": "mit",
"hash": 4993443592422247000,
"line_mean": 24.3971830986,
"line_max": 79,
"alpha_frac": 0.5580079858,
"autogenerated": false,
"ratio": 3.594896331738437,
"config_test": fa... |
from enum import Enum, unique
from pydoof.search_api.api_client import SearchAPIClient
from pydoof.helpers import parse_query_params
@unique
class QueryNames(Enum):
MATCH_AND = "match_and"
MATCH_OR = "match_or"
FUZZY = "fuzzy"
PHONETIC = "phonetic_text"
@unique
class Transformers(Enum):
BASIC =... | {
"repo_name": "doofinder/pydoof",
"path": "pydoof/search_api/search.py",
"copies": "1",
"size": "5657",
"license": "mit",
"hash": 4146571619036793000,
"line_mean": 41.2164179104,
"line_max": 79,
"alpha_frac": 0.6172883154,
"autogenerated": false,
"ratio": 4.308453922315309,
"config_test": false... |
from enum import Enum, unique
from uchan import configuration
from uchan.lib import roles
from uchan.lib.exceptions import ArgumentError
from uchan.lib.model import ModeratorModel, BoardModel
MESSAGE_REGISTRATION_DISABLED = 'Registration is disabled'
MESSAGE_BOARD_CREATION_DISABLED = 'Board creation is disabled'
cl... | {
"repo_name": "Floens/uchan",
"path": "uchan/lib/action_authorizer.py",
"copies": "1",
"size": "6418",
"license": "mit",
"hash": 7323250095189561000,
"line_mean": 32.9576719577,
"line_max": 119,
"alpha_frac": 0.6788719227,
"autogenerated": false,
"ratio": 3.8362223550508068,
"config_test": true... |
from enum import Enum, unique
class AminoAcidMapping(Enum):
"""Amino acid mapping to encode an alignment"""
A = 1
C = 2
D = 3
E = 4
F = 5
G = 6
H = 7
I = 8
K = 9
L = 10
M = 11
N = 12
P = 13
Q = 14
R = 15
S = 16
T = 17
V = 18
W = 19
X ... | {
"repo_name": "fsimkovic/conkit",
"path": "conkit/core/mappings.py",
"copies": "1",
"size": "1673",
"license": "bsd-3-clause",
"hash": -3107631843144570400,
"line_mean": 14.6355140187,
"line_max": 78,
"alpha_frac": 0.4482964734,
"autogenerated": false,
"ratio": 2.6429699842022116,
"config_test"... |
from enum import Enum, unique
class Coordinate:
def __init__(self, row, column):
self.row = row
self.column = column
@staticmethod
def matrix_to_coordinates(matrix):
coordinates = []
for row in matrix:
for column in row:
coordinates[row][column]... | {
"repo_name": "igormartire/esii",
"path": "chess/core/models.py",
"copies": "1",
"size": "1959",
"license": "mit",
"hash": 9102800231004711000,
"line_mean": 20.5274725275,
"line_max": 78,
"alpha_frac": 0.5319040327,
"autogenerated": false,
"ratio": 3.3316326530612246,
"config_test": false,
"h... |
from enum import Enum, unique
class ExtendedEnum(Enum):
@classmethod
def from_name(cls, name):
return getattr(cls, name)
@classmethod
def from_value(cls, val):
return cls(val)
@unique
class ReverbType(ExtendedEnum):
OFF = 255
AmbBrite = 0
BdSpring = 1
BigGate = 2
... | {
"repo_name": "mmdurrant/strikeparse",
"path": "constants.py",
"copies": "1",
"size": "2946",
"license": "mit",
"hash": -315696224922047400,
"line_mean": 15.4581005587,
"line_max": 60,
"alpha_frac": 0.5424304141,
"autogenerated": false,
"ratio": 2.452955870108243,
"config_test": false,
"has_n... |
from enum import Enum, unique
class HttH2tMsgType(Enum):
HTT_H2T_MSG_TYPE_VERSION_REQ = 0x0
HTT_H2T_MSG_TYPE_TX_FRM = 0x1
HTT_H2T_MSG_TYPE_RX_RING_CFG = 0x2
HTT_H2T_MSG_TYPE_STATS_REQ = 0x3
HTT_H2T_MSG_TYPE_SYNC = 0x4
HTT_H2T_MSG_TYPE_AGGR_CFG = 0x5
HTT_H2T_MSG_TYPE_FRAG_DESC_BANK_CFG = 0... | {
"repo_name": "erstrom/qca-hex-analyzer",
"path": "qca_hex_analyzer/htt.py",
"copies": "1",
"size": "2045",
"license": "mit",
"hash": 1609970581600682200,
"line_mean": 29.5223880597,
"line_max": 57,
"alpha_frac": 0.6518337408,
"autogenerated": false,
"ratio": 2.091002044989775,
"config_test": f... |
from enum import Enum, unique
@unique
class Code(Enum):
"""Enum with all numeric replies defined in RFC 2812. Also contains
additional replies used by popular networks included at the bottom.
"""
# Welcome to the Internet Relay Network <nick>!<user>@<host>
RPL_WELCOME = 1
# Your host is <ser... | {
"repo_name": "fadybinadnan/BOTNet-2017.4-",
"path": "botnet/codes.py",
"copies": "2",
"size": "9869",
"license": "mit",
"hash": 517023473778524600,
"line_mean": 21.3280542986,
"line_max": 77,
"alpha_frac": 0.609585571,
"autogenerated": false,
"ratio": 3.0611042183622827,
"config_test": false,
... |
from enum import Enum, unique
@unique
class DriverProperties(Enum):
"""Enum holding all driver properties."""
REDIS = {
"name": "redis",
"port": 6379,
"java_class": "org.apache.spark.sql.redis",
"table_name": ""
}
CASSANDRA = {
"name": "cassandra",
"po... | {
"repo_name": "ironmussa/Optimus",
"path": "optimus/io/properties.py",
"copies": "1",
"size": "1552",
"license": "apache-2.0",
"hash": 7679843587053016000,
"line_mean": 22.5151515152,
"line_max": 69,
"alpha_frac": 0.4858247423,
"autogenerated": false,
"ratio": 3.352051835853132,
"config_test": ... |
from enum import Enum, unique
@unique
class Gender(Enum):
Male = 0
Female = 1
@unique
class Weekday(Enum):
Sun = 0 # Sun的value被设定为0
Mon = 1
Tue = 2
Wed = 3
Thu = 4
Fri = 5
Sat = 6
class Student(object):
def __init__(self, name, gender=Gender.Male):
self.name = name
... | {
"repo_name": "hhj0325/pystock",
"path": "com/hhj/simplecode/demo7.py",
"copies": "1",
"size": "1088",
"license": "apache-2.0",
"hash": 6260088720975191000,
"line_mean": 19.5098039216,
"line_max": 107,
"alpha_frac": 0.5296367113,
"autogenerated": false,
"ratio": 2.8657534246575342,
"config_test... |
from enum import Enum, unique
@unique
class NodeType(Enum):
TOPLEVEL = 1
COMMENT = 2
EXCMD = 3
FUNCTION = 4
ENDFUNCTION = 5
DELFUNCTION = 6
RETURN = 7
EXCALL = 8
LET = 9
UNLET = 10
LOCKVAR = 11
UNLOCKVAR = 12
IF = 13
ELSEIF = 14
ELSE = 15
ENDIF = 16
... | {
"repo_name": "Kuniwak/vint",
"path": "vint/ast/node_type.py",
"copies": "1",
"size": "1632",
"license": "mit",
"hash": 7189838963287930000,
"line_mean": 15,
"line_max": 29,
"alpha_frac": 0.5153186275,
"autogenerated": false,
"ratio": 3.114503816793893,
"config_test": false,
"has_no_keywords"... |
from enum import Enum, unique
@unique
class ScreenState(Enum):
UNKNOWN = -1
OFF = 0
ON = 1
USER_PRESENT = 2
def is_on(self):
return self == ScreenState.ON or self == ScreenState.USER_PRESENT
def is_off(self):
return self == ScreenState.OFF
@unique
class ScreenOrientation(En... | {
"repo_name": "dmanatunga/uAMP-sim",
"path": "device.py",
"copies": "1",
"size": "2607",
"license": "mit",
"hash": -6938409509082404000,
"line_mean": 17.6214285714,
"line_max": 88,
"alpha_frac": 0.6248561565,
"autogenerated": false,
"ratio": 3.421259842519685,
"config_test": false,
"has_no_ke... |
from enum import Enum, unique
@unique
class WmiUnifiedCmdGrpId(Enum):
WMI_GRP_SCAN = 3
WMI_GRP_PDEV = 4
WMI_GRP_VDEV = 5
WMI_GRP_PEER = 6
WMI_GRP_MGMT = 7
WMI_GRP_BA_NEG = 8
WMI_GRP_STA_PS = 9
WMI_GRP_DFS = 10
WMI_GRP_ROAM = 11
WMI_GRP_OFL_SCAN = 12
WMI_GRP_P2P = 13
WM... | {
"repo_name": "erstrom/qca-hex-analyzer",
"path": "qca_hex_analyzer/wmi_unified.py",
"copies": "1",
"size": "14364",
"license": "mit",
"hash": -635119895182128600,
"line_mean": 30.0909090909,
"line_max": 62,
"alpha_frac": 0.6854636591,
"autogenerated": false,
"ratio": 2.206112732299186,
"config... |
from enum import Enum, unique
@unique
class Color(Enum):
red = 'red'
blue = 'blue'
green = 'green'
black = 'black'
yellow = 'yellow'
def toQt(self):
return self.value
def toMpl(self):
mpl = {
'red': 'r',
'blue': 'b',
'green': 'g',
... | {
"repo_name": "amin10/datk",
"path": "datk/core/colorizer.py",
"copies": "1",
"size": "1370",
"license": "mit",
"hash": -7857300623218673000,
"line_mean": 23.0350877193,
"line_max": 64,
"alpha_frac": 0.5102189781,
"autogenerated": false,
"ratio": 3.8810198300283285,
"config_test": false,
"has... |
from enum import Flag
from abstract_domains.lattice import Lattice
from abstract_domains.stack import ScopeDescendCombineMixin
class Used(Flag):
"""Used state of a program variable."""
# do not change values blindly, they are used for easy implementation with bitwise operators
U = 3 # used in this scope... | {
"repo_name": "gitsimon/spadup-lyra",
"path": "abstract_domains/usage/used.py",
"copies": "1",
"size": "2821",
"license": "mpl-2.0",
"hash": -6942036128707124000,
"line_mean": 20.4122137405,
"line_max": 96,
"alpha_frac": 0.5115864528,
"autogenerated": false,
"ratio": 3.347255369928401,
"config_... |
from enum import IntEnum, auto as _auto
from AST import ASTNode, FunctionDeclarationNode
class SymbolAttributes(IntEnum):
Constant = _auto()
Flat = _auto()
HoldAll = _auto()
HoldAllComplete = _auto()
HoldFirst = _auto()
HoldRest = _auto()
Listable ... | {
"repo_name": "rljacobson/FoxySheep",
"path": "python_target/FoxySheep/Scoping/Symbol.py",
"copies": "1",
"size": "5592",
"license": "bsd-2-clause",
"hash": -2269693549258933800,
"line_mean": 31.3294797688,
"line_max": 100,
"alpha_frac": 0.575286123,
"autogenerated": false,
"ratio": 4.50241545893... |
from enum import IntEnum, Enum
from collections import Iterable
from neo.Core.IO.Mixins import SerializableMixin
from neo.Core.UIntBase import UIntBase
"""
This helper class is intended to help resolve the correct calculation of network serializable objects.
The result of `ctypes.sizeof` is not equivalent to C# or wha... | {
"repo_name": "hal0x2328/neo-python",
"path": "neo/Core/Size.py",
"copies": "1",
"size": "2505",
"license": "mit",
"hash": 662880774298871600,
"line_mean": 36.9545454545,
"line_max": 182,
"alpha_frac": 0.6263473054,
"autogenerated": false,
"ratio": 4.059967585089141,
"config_test": false,
"ha... |
from enum import IntEnum, Enum
from collections import Iterable
from neo.Network.core.mixin.serializable import SerializableMixin
from neo.Network.core.uintbase import UIntBase
"""
This helper class is intended to help resolve the correct calculation of network serializable objects.
The result of `ctypes.sizeof` is no... | {
"repo_name": "hal0x2328/neo-python",
"path": "neo/Network/core/size.py",
"copies": "1",
"size": "2577",
"license": "mit",
"hash": 7720327306816173000,
"line_mean": 36.8970588235,
"line_max": 154,
"alpha_frac": 0.6181606519,
"autogenerated": false,
"ratio": 4.1298076923076925,
"config_test": fa... |
from enum import IntEnum, Enum
from collections import namedtuple
URL = "http://flashair/"
DEFAULT_REMOTE_DIR = "/DCIM/100__TSB"
DEFAULT_MASTERCODE = "BEEFBEEFBEEF"
FileInfo = namedtuple(
"FileInfo", "directory filename path size attribute datetime")
SimpleFileInfo = namedtuple(
"SimpleFileInfo", "directory... | {
"repo_name": "TadLeonard/tfatool",
"path": "tfatool/info.py",
"copies": "1",
"size": "2436",
"license": "mit",
"hash": 7434341448695228000,
"line_mean": 26.3707865169,
"line_max": 74,
"alpha_frac": 0.6699507389,
"autogenerated": false,
"ratio": 3.48,
"config_test": false,
"has_no_keywords": ... |
from enum import IntEnum, Enum
from systems import *
from fileUtils import *
from crew import *
from rooms import *
from animation import *
class Weapon:
name = ""
isArmed = False
def __init__(self, *args, **kwargs):
if len(args) > 1:
raise Warning("Extra positional arguments ignored")
if len(a... | {
"repo_name": "Tsubashi/iOS-FTL-Save-Game-Editor",
"path": "ship.py",
"copies": "1",
"size": "4621",
"license": "mit",
"hash": 6646173661150802000,
"line_mean": 26.505952381,
"line_max": 106,
"alpha_frac": 0.6450984635,
"autogenerated": false,
"ratio": 3.0261951538965293,
"config_test": false,
... |
from enum import IntEnum, Enum
from typing import NewType
# Type Alias IntEnum member Alias
EnumType = int
def enumNames(cls):
return [a for a, b in sorted(cls.__members__.items(), key=lambda x: x[1])]
ENUM_NAMES = {}
class EnumMask(object):
def __init__(self, enum, value):
self._enum = enum
... | {
"repo_name": "scholer/cadnano2.5",
"path": "cadnano/proxies/cnenum.py",
"copies": "2",
"size": "3471",
"license": "mit",
"hash": -6575438414655937000,
"line_mean": 18.2833333333,
"line_max": 78,
"alpha_frac": 0.5762028234,
"autogenerated": false,
"ratio": 3.138336347197107,
"config_test": fals... |
from enum import IntEnum, Enum
class StrEnum(str, Enum):
pass
class LightParameters(StrEnum):
""" Enumeration that contains the possible /light parameters """
INDEX, R, G, B, BRIGHT, TEMP, ON, REFRESH, STATE = "index r g b bright temp on refresh state".split()
class NotificationParameters(StrEnum):
... | {
"repo_name": "EnriqueSoria/SmartClock",
"path": "utils/Enumerations.py",
"copies": "1",
"size": "1103",
"license": "unlicense",
"hash": 6843618071332305000,
"line_mean": 26.6,
"line_max": 105,
"alpha_frac": 0.6681776972,
"autogenerated": false,
"ratio": 3.751700680272109,
"config_test": false,... |
from enum import IntEnum
from abc import ABCMeta, abstractmethod, abstractproperty
from utils import parse_enum_into_dict
from character import CharacterRace
class WeaponSkill(IntEnum):
none = 0
small = 1
medium = 3
large = 6
class BahamutType(IntEnum):
attack= 0
attack_hp= 1
hp = 2
co... | {
"repo_name": "adangtran87/gbf-weap",
"path": "weapon.py",
"copies": "1",
"size": "8238",
"license": "mit",
"hash": 4179968127767700500,
"line_mean": 30.8069498069,
"line_max": 105,
"alpha_frac": 0.5399368779,
"autogenerated": false,
"ratio": 3.4598908021839563,
"config_test": false,
"has_no_... |
from enum import IntEnum
from cached_property import cached_property
class Subdevice:
class Type(IntEnum):
MISSING = 0
META = 1
LEDS = 2
GPIO = 3
LINUX_INPUT = 4
HID = 5
SERIAL = 6
MISC = 7
I2C = 8
SPI ... | {
"repo_name": "Expanduino/Expanduino-Python",
"path": "expanduino/subdevice.py",
"copies": "1",
"size": "2022",
"license": "unlicense",
"hash": 3172101530387555000,
"line_mean": 25.9733333333,
"line_max": 104,
"alpha_frac": 0.6315529179,
"autogenerated": false,
"ratio": 3.3983193277310924,
"con... |
from enum import IntEnum
from collections import OrderedDict
# This file contains dictionaries used in the Dalvik Format.
# https://source.android.com/devices/tech/dalvik/dex-format#type-codes
class TypeMapItem(IntEnum):
HEADER_ITEM = 0x0
STRING_ID_ITEM = 0x1
TYPE_ID_ITEM = 0x2
PROTO_ID_ITEM = 0x3
... | {
"repo_name": "reox/androguard",
"path": "androguard/core/bytecodes/dvm_types.py",
"copies": "1",
"size": "4180",
"license": "apache-2.0",
"hash": 2485637982320689000,
"line_mean": 40.3861386139,
"line_max": 255,
"alpha_frac": 0.6433014354,
"autogenerated": false,
"ratio": 3.2006125574272586,
"... |
from enum import IntEnum
from collections import OrderedDict
# This file contains dictionaries used in the Dalvik Format.
# Used to identify different types of operands
class Kind(IntEnum):
"""
This Enum is used to determine the kind of argument
inside an Dalvik instruction.
It is used to reference t... | {
"repo_name": "androguard/androguard",
"path": "androguard/core/bytecodes/dvm_types.py",
"copies": "1",
"size": "5971",
"license": "apache-2.0",
"hash": 1336525873590021000,
"line_mean": 35.1878787879,
"line_max": 119,
"alpha_frac": 0.6352369787,
"autogenerated": false,
"ratio": 3.392613636363636... |
from enum import IntEnum
from .component import Behaviour, Component
from .object import Object, field
class Animation(Behaviour):
animate_physics = field("m_AnimatePhysics", bool)
culling_type = field("m_CullingType")
play_automatically = field("m_PlayAutomatically", bool)
wrap_mode = field("m_WrapMode")
animat... | {
"repo_name": "andburn/python-unitypack",
"path": "unitypack/engine/animation.py",
"copies": "1",
"size": "2227",
"license": "mit",
"hash": 2310207301211201000,
"line_mean": 25.8313253012,
"line_max": 99,
"alpha_frac": 0.7480916031,
"autogenerated": false,
"ratio": 3.1454802259887007,
"config_t... |
from enum import IntEnum
from .component import Component
from .object import field
class ReflectionProbeUsage(IntEnum):
Off = 0
BlendProbes = 1
BlendProbesAndSkybox = 2
Simple = 3
class ShadowCastingMode(IntEnum):
Off = 0
On = 1
TwoSided = 2
ShadowsOnly = 3
class Renderer(Component):
enabled = field("m_... | {
"repo_name": "andburn/python-unitypack",
"path": "unitypack/engine/renderer.py",
"copies": "1",
"size": "2248",
"license": "mit",
"hash": -3674615793364406300,
"line_mean": 26.4146341463,
"line_max": 79,
"alpha_frac": 0.7513345196,
"autogenerated": false,
"ratio": 3.0093708165997324,
"config_t... |
from enum import IntEnum
from .component import Component
from .object import Object, field
class FontStyle(IntEnum):
Normal = 0
Bold = 1
Italic = 2
BoldAndItalic = 3
class TextAlignment(IntEnum):
Left = 0
Center = 1
Right = 2
class TextAnchor(IntEnum):
UpperLeft = 0
UpperCenter = 1
UpperRight = 2
Midd... | {
"repo_name": "andburn/python-unitypack",
"path": "unitypack/engine/text.py",
"copies": "1",
"size": "1198",
"license": "mit",
"hash": -8341811050869431000,
"line_mean": 17.71875,
"line_max": 48,
"alpha_frac": 0.6953255426,
"autogenerated": false,
"ratio": 2.9148418491484187,
"config_test": fal... |
from enum import IntEnum
from discord import Embed, Permissions
class OpStatus(IntEnum):
SUCCESS = 0x2ECC71,
FAILURE = 0xc0392B,
WARNING = 0xf39C12,
NONE = -1
def build_embed(ctx, desc: str, title: str = '', status: OpStatus = OpStatus.SUCCESS) -> Embed:
name = ctx.message.server.me.nick if ctx.message.server.... | {
"repo_name": "HellPie/discord-reply-bot",
"path": "bot/utils.py",
"copies": "1",
"size": "2178",
"license": "apache-2.0",
"hash": -7460425847791472000,
"line_mean": 29.25,
"line_max": 111,
"alpha_frac": 0.7263544536,
"autogenerated": false,
"ratio": 3.1795620437956202,
"config_test": false,
... |
from enum import IntEnum
from flask import url_for
from bs4 import BeautifulSoup
from app import format_datetime_short
valid_letter_jobs = [
{
'service_name': {'name': 'test_name'},
'id': 'test_id',
'notification_count': 2,
'job_status': 'ready to send',
'created_at': '2017... | {
"repo_name": "gov-cjwaszczuk/notifications-admin",
"path": "tests/app/main/views/test_letter_jobs.py",
"copies": "1",
"size": "4424",
"license": "mit",
"hash": -8297973333857111000,
"line_mean": 37.1379310345,
"line_max": 119,
"alpha_frac": 0.6557414105,
"autogenerated": false,
"ratio": 3.346444... |
from enum import IntEnum
from functools import reduce
from rdkit.Chem import EState
from ._base import Descriptor
from ._util import parse_enum
try:
import builtins
except ImportError:
import __builtin__ as builtins
__all__ = ("AtomTypeEState",)
es_types = (
"sLi",
"ssBe",
"ssssBe",
"ssBH... | {
"repo_name": "mordred-descriptor/mordred",
"path": "mordred/EState.py",
"copies": "1",
"size": "3679",
"license": "bsd-3-clause",
"hash": -4224746763656698400,
"line_mean": 16.4360189573,
"line_max": 86,
"alpha_frac": 0.5235118239,
"autogenerated": false,
"ratio": 2.821319018404908,
"config_te... |
from enum import IntEnum
from itertools import chain
from collections import namedtuple, defaultdict
from rdkit import Chem
from ._base import Descriptor
from ._util import parse_enum
from ._atomic_property import AtomicProperty
__all__ = ("Chi",)
class ChiType(IntEnum):
__slots__ = ()
path = 1
cluste... | {
"repo_name": "mordred-descriptor/mordred",
"path": "mordred/Chi.py",
"copies": "1",
"size": "6216",
"license": "bsd-3-clause",
"hash": 8857066026107410000,
"line_mean": 23.0930232558,
"line_max": 88,
"alpha_frac": 0.5098133848,
"autogenerated": false,
"ratio": 3.6956004756242566,
"config_test"... |
from enum import IntEnum
from itertools import chain
from rdkit import Chem
from ._base import Descriptor
from ._util import parse_enum
__all__ = ("BondCount",)
class BondType(IntEnum):
__slots__ = ()
any = 1
heavy = 2
single = 3
double = 4
triple = 5
aromatic = 6
multiple = 7
... | {
"repo_name": "mordred-descriptor/mordred",
"path": "mordred/BondCount.py",
"copies": "1",
"size": "2711",
"license": "bsd-3-clause",
"hash": 5806241861483461000,
"line_mean": 22.7807017544,
"line_max": 87,
"alpha_frac": 0.5625230542,
"autogenerated": false,
"ratio": 3.266265060240964,
"config_... |
from enum import IntEnum
from logging import getLogger
from typing import Dict, NamedTuple, Optional
from .repr import rich_repr, RichReprResult
from .cells import cell_len, set_cell_size, get_character_cell_size
from .style import Style
from itertools import filterfalse
from operator import attrgetter
from typing im... | {
"repo_name": "willmcgugan/rich",
"path": "rich/segment.py",
"copies": "1",
"size": "20235",
"license": "mit",
"hash": 7287773825918762000,
"line_mean": 32.5572139303,
"line_max": 110,
"alpha_frac": 0.5389671362,
"autogenerated": false,
"ratio": 4.630434782608695,
"config_test": false,
"has_n... |
from enum import IntEnum
from mrcrowbar import models as mrc
class DataBlock( mrc.Block ):
compat_stop = mrc.Const( mrc.UInt8( 0x00 ), 0x66 )
data_type = mrc.UInt8( 0x01 )
length = mrc.UInt32_LE( 0x02 )
data = mrc.Bytes( 0x06, length=mrc.Ref( 'length' ) )
class MemoryWrite( mrc.Block ):
compat_s... | {
"repo_name": "moralrecordings/mrcrowbar",
"path": "mrcrowbar/lib/audio/vgm.py",
"copies": "1",
"size": "6216",
"license": "bsd-3-clause",
"hash": -3311138181326421000,
"line_mean": 29.7722772277,
"line_max": 158,
"alpha_frac": 0.5854247104,
"autogenerated": false,
"ratio": 2.7215411558669,
"co... |
from enum import IntEnum
from .object import Object, field
class TextureFormat(IntEnum):
Alpha8 = 1
ARGB4444 = 2
RGB24 = 3
RGBA32 = 4
ARGB32 = 5
RGB565 = 7
# Direct3D
DXT1 = 10
DXT5 = 12
RGBA4444 = 13
BGRA32 = 14
BC6H = 24
BC7 = 25
DXT1Crunched = 28
DXT5Crunched = 29
# PowerVR
PVRTC_RGB2 = PVRTC... | {
"repo_name": "andburn/python-unitypack",
"path": "unitypack/engine/texture.py",
"copies": "1",
"size": "4577",
"license": "mit",
"hash": -5865108724154720000,
"line_mean": 21.6584158416,
"line_max": 86,
"alpha_frac": 0.6823246668,
"autogenerated": false,
"ratio": 2.558412520961431,
"config_tes... |
from enum import IntEnum
from os.path import join
import os
import datetime
import numpy as np
import time
# util functions start
#
# these function also exist in util.py,
# but since logger is imported everywere these function need to be included here
def get_home_path():
return os.environ['HOME']
def get_logg... | {
"repo_name": "TimDettmers/spodernet",
"path": "spodernet/utils/logger.py",
"copies": "1",
"size": "4433",
"license": "mit",
"hash": -7132535772957552000,
"line_mean": 33.6328125,
"line_max": 110,
"alpha_frac": 0.6203473945,
"autogenerated": false,
"ratio": 3.4659890539483973,
"config_test": fa... |
from enum import IntEnum
from .path import Path
from .inklist import InkList
from .object import Object
class ValueType(IntEnum):
INT = 0
FLOAT = 1
LIST = 2
STRING = 3
DIVERT_TARGET = 4
VAR_POINTER = 5
class Value(Object):
def __init__(self, value, *, vtype):
super().__init__()
... | {
"repo_name": "facelesspanda/inkpy",
"path": "inkpy/_runtime/value.py",
"copies": "1",
"size": "5794",
"license": "mit",
"hash": -6862527150966970000,
"line_mean": 25.7004608295,
"line_max": 78,
"alpha_frac": 0.5736969279,
"autogenerated": false,
"ratio": 3.9201623815967523,
"config_test": fals... |
from enum import IntEnum
from random import choice
class State(IntEnum):
start = 1
initial_outreach = 2
second_outreach = 3
outreach_reply = 4
inquiry = 5
inquiry_reply = 6
absorb = 7
inquiry2 = 8
inquiry_reply2 = 9
abruptend = 10
give_up = 11
free = 12
end = 13
Ba... | {
"repo_name": "ipachev/irc_chatbot",
"path": "personalities/generic.py",
"copies": "1",
"size": "2691",
"license": "mit",
"hash": -5462203619127254000,
"line_mean": 41.015625,
"line_max": 217,
"alpha_frac": 0.6586091484,
"autogenerated": false,
"ratio": 3.5853333333333333,
"config_test": false,... |
from enum import IntEnum
from random import shuffle
class Colour(IntEnum):
BLUE = 0
GREEN = 1
RED = 2
WHITE = 3
YELLOW = 4
RAINBOW = 5
class Card:
def __init__(self, int_representation):
self.colour = Colour(int_representation // 10)
self.rank = int_representation % 10
... | {
"repo_name": "ian-fox/hanabi",
"path": "server/hanabi/models/card.py",
"copies": "1",
"size": "1106",
"license": "mit",
"hash": 1050459629404790500,
"line_mean": 23.0434782609,
"line_max": 54,
"alpha_frac": 0.5397830018,
"autogenerated": false,
"ratio": 3.3719512195121952,
"config_test": false... |
from enum import IntEnum
from sqlalchemy import Column, String, ForeignKey
from c3os import conf
from c3os.conf import UUID_LEN
class Instance(conf.Base):
"""Instance object
Args:
id (str): Instance id
status (str): Instance status
addressed (list): Have addresses
name (:obj... | {
"repo_name": "utam0k/c3os",
"path": "c3os/objects/instance.py",
"copies": "1",
"size": "2522",
"license": "mit",
"hash": -453267114115632100,
"line_mean": 26.1182795699,
"line_max": 102,
"alpha_frac": 0.5777160983,
"autogenerated": false,
"ratio": 3.9161490683229814,
"config_test": false,
"h... |
from enum import IntEnum
from sqlalchemy import (
Column,
Date,
Index,
PrimaryKeyConstraint,
Unicode,
UniqueConstraint,
)
from sqlalchemy.dialects.mysql import (
BIGINT as BigInteger,
INTEGER as Integer,
)
from ichnaea.models.base import _Model
from ichnaea.models.hashkey import (
H... | {
"repo_name": "therewillbecode/ichnaea",
"path": "ichnaea/models/content.py",
"copies": "1",
"size": "4242",
"license": "apache-2.0",
"hash": -1133475695879145300,
"line_mean": 23.5202312139,
"line_max": 77,
"alpha_frac": 0.6084394154,
"autogenerated": false,
"ratio": 3.535,
"config_test": fals... |
from enum import IntEnum;
from struct import unpack_from;
try:
from OgreHardwareBuffer import OgreFakeHardwareBuffer
except ImportError as e:
directory = os.path.dirname(os.path.realpath(__file__));
print("Import error: " + str(e) + " manual compilation" );
srcfile="OgreHardwareBuffer.py"; exec(compile... | {
"repo_name": "lamogui/ogre_blender_importer",
"path": "OgreVertexBuffer.py",
"copies": "1",
"size": "18766",
"license": "mit",
"hash": -5848094043630619000,
"line_mean": 36.0869565217,
"line_max": 113,
"alpha_frac": 0.6153682191,
"autogenerated": false,
"ratio": 3.5394190871369293,
"config_tes... |
from enum import IntEnum
from timeit import timeit
import requests
from catpy.compat import tqdm
from catpy.spatial import StackOrientation
class StackMirror(object):
def __init__(
self,
image_base,
tile_height,
tile_width,
tile_source_type,
file_extension,
... | {
"repo_name": "catmaid/catpy",
"path": "catpy/stacks.py",
"copies": "1",
"size": "10223",
"license": "mit",
"hash": -4077282393847519000,
"line_mean": 29.1563421829,
"line_max": 118,
"alpha_frac": 0.5415240145,
"autogenerated": false,
"ratio": 3.9886851346078815,
"config_test": false,
"has_no... |
from enum import IntEnum
from typing import Any, Optional
from django.conf import settings
from django.core.cache import caches
from pydantic import BaseModel
class ReportStatus(IntEnum):
QUEUED = 1
COMPLETE = 2
class ReportResponse(BaseModel):
status: ReportStatus
content: Optional[Any]
header... | {
"repo_name": "shapiromatron/bmds-server",
"path": "bmds_server/common/task_cache.py",
"copies": "1",
"size": "2504",
"license": "mit",
"hash": 510484705236845200,
"line_mean": 26.2173913043,
"line_max": 97,
"alpha_frac": 0.6186102236,
"autogenerated": false,
"ratio": 4.528028933092224,
"config... |
from enum import IntEnum
from typing import Any, Union
import bmds
from bmds.datasets import (
ContinuousDatasetSchema,
ContinuousIndividualDatasetSchema,
DichotomousDatasetSchema,
)
from django.core.exceptions import ValidationError
from pydantic import BaseModel, conlist, root_validator
from ...common.v... | {
"repo_name": "shapiromatron/bmds-server",
"path": "bmds_server/analysis/validators/datasets.py",
"copies": "1",
"size": "2382",
"license": "mit",
"hash": -2328018942707279400,
"line_mean": 28.775,
"line_max": 100,
"alpha_frac": 0.7132661629,
"autogenerated": false,
"ratio": 3.6366412213740458,
... |
from enum import IntEnum
from typing import Dict, Union, Callable, Any
from cereal import log, car
import cereal.messaging as messaging
from common.realtime import DT_CTRL
from selfdrive.config import Conversions as CV
from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER
AlertSize = log.ControlsState.AlertSi... | {
"repo_name": "commaai/openpilot",
"path": "selfdrive/controls/lib/events.py",
"copies": "1",
"size": "31443",
"license": "mit",
"hash": 4276250116597111000,
"line_mean": 34.6092865232,
"line_max": 116,
"alpha_frac": 0.6770664377,
"autogenerated": false,
"ratio": 3.4382722799343903,
"config_tes... |
from enum import IntEnum
from typing import (
Union,
TypeVar,
Any,
Tuple,
Dict,
Optional,
KeysView,
ItemsView,
ValuesView,
Iterator,
)
from ._bonsai import ldapentry
from .errors import InvalidDN
from .ldapdn import LDAPDN
from .ldapvaluelist import LDAPValueList
MYPY = False
... | {
"repo_name": "Noirello/PyLDAP",
"path": "lib/ldapentry.py",
"copies": "1",
"size": "10469",
"license": "mit",
"hash": -7181433086120738000,
"line_mean": 33.4375,
"line_max": 92,
"alpha_frac": 0.5617537492,
"autogenerated": false,
"ratio": 4.3046875,
"config_test": false,
"has_no_keywords": f... |
from enum import IntEnum
from typing import Optional, List, Tuple
import wx
from wx import ItemAttr, Colour, ListEvent, PostEvent, SizeEvent
from wx.lib.newevent import NewEvent
from whacked4 import config, utils
from whacked4.dehacked.action import Action
from whacked4.dehacked.entry import Entry
from whacked4.dehac... | {
"repo_name": "GitExl/WhackEd4",
"path": "src/whacked4/ui/state_list.py",
"copies": "1",
"size": "7287",
"license": "bsd-2-clause",
"hash": -5048336346865689000,
"line_mean": 34.0240384615,
"line_max": 104,
"alpha_frac": 0.629787234,
"autogenerated": false,
"ratio": 3.6334164588528677,
"config_... |
from enum import IntEnum
from typing import Optional
class ErrorCode(IntEnum):
""" ErrorCode To Enum """
Success = 0
# Common errors
# Caller passed invalid value as param 1 (null, invalid json and etc..)
CommonInvalidParam1 = 100
# Caller passed invalid value as param 2 (null, invalid json... | {
"repo_name": "peacekeeper/indy-sdk",
"path": "wrappers/python/indy/error.py",
"copies": "2",
"size": "15909",
"license": "apache-2.0",
"hash": -8585304162320968000,
"line_mean": 36.0839160839,
"line_max": 99,
"alpha_frac": 0.7448613992,
"autogenerated": false,
"ratio": 4.280064568200161,
"conf... |
from enum import IntEnum
from typing import Optional
class ErrorCode(IntEnum):
Success = 0,
# Common errors
# Caller passed invalid value as param 1 (null, invalid json and etc..)
CommonInvalidParam1 = 100,
# Caller passed invalid value as param 2 (null, invalid json and etc..)
CommonInvali... | {
"repo_name": "srottem/indy-sdk",
"path": "wrappers/python/indy/error.py",
"copies": "2",
"size": "5940",
"license": "apache-2.0",
"hash": 2841541021677735000,
"line_mean": 30.935483871,
"line_max": 103,
"alpha_frac": 0.7173400673,
"autogenerated": false,
"ratio": 4.316860465116279,
"config_tes... |
from enum import IntEnum
from .utils import *
class VertexFlags(IntEnum):
POSITION = 1 << 1,
NORMAL = 1 << 2,
COLOR = 1 << 3,
BONE_WEIGHT = 1 << 4,
BONE_INDEX = 1 << 5,
TANGENT = 1 << 6,
UV1 = 1 << 7,
UV2 = 1 << 8,
UV3 = 1 << 9,
UV4 = 1 << 10,
class Vertex:
def __init__(s... | {
"repo_name": "rminderhoud/roseblend",
"path": "io_rose/rose/zms.py",
"copies": "1",
"size": "4107",
"license": "mit",
"hash": 503476388112933700,
"line_mean": 28.5467625899,
"line_max": 66,
"alpha_frac": 0.5427319211,
"autogenerated": false,
"ratio": 3.3282009724473256,
"config_test": false,
... |
from enum import IntEnum
from utils import parse_enum_into_dict
# One hot encoding of race for mask selection
class CharacterRace(IntEnum):
unknown = 0xF
human = 1
erun = 2
doraf = 4
harvin = 8
CLASS_WEAPON_PREF = {
# Tier 3
'weapon_master': ['sword','axe'],
'holy_saber': ['sword', 'sp... | {
"repo_name": "adangtran87/gbf-weap",
"path": "character.py",
"copies": "1",
"size": "2099",
"license": "mit",
"hash": 3404966460097843000,
"line_mean": 28.1527777778,
"line_max": 112,
"alpha_frac": 0.559313959,
"autogenerated": false,
"ratio": 3.2045801526717557,
"config_test": false,
"has_n... |
from enum import IntEnum
import abc
import operator
import math
from random import getrandbits, randint
SEARCH_HOME_RANDOM_FACTOR = 10
SEARCH_FOOD_RANDOM_FACTOR = 15
HOME_DISTANCE_FACTOR = 4.07
HOME_PHEROMONE_STRENGTH = 180
FOOD_PHEROMONE_STRENGTH = 75
def distance(x1, y1, x2, y2):
return math.sqrt((x2-x1)**2+(y... | {
"repo_name": "Antificial/antificial",
"path": "antificial/framework/colony/colony.py",
"copies": "1",
"size": "15136",
"license": "mit",
"hash": 1549802431422242600,
"line_mean": 31.9760348584,
"line_max": 118,
"alpha_frac": 0.5732690275,
"autogenerated": false,
"ratio": 3.478740519420823,
"co... |
from enum import IntEnum
import copy
class Type(IntEnum):
UNKNOWN = 0
FLOAT = 1
DOUBLE = 2
INT8_T = 3
UINT8_T = 4
INT16_T = 5
UINT16_T = 6
INT32_T = 7
UINT32_T = 8
INT64_T = 9
UINT64_T = 10
STRING = 11
VOID = 12
BOOL = 13
class Availability(IntEnum):
UNKNO... | {
"repo_name": "GeosoftInc/gxapi",
"path": "spec/gxdefs.py",
"copies": "1",
"size": "2304",
"license": "bsd-2-clause",
"hash": -4239774690495410000,
"line_mean": 24.6,
"line_max": 109,
"alpha_frac": 0.5737847222,
"autogenerated": false,
"ratio": 3.8528428093645486,
"config_test": false,
"has_n... |
from enum import IntEnum
import datetime
from project.bl.utils import Resource
from project.extensions import db
from project.lib.orm.types import TypeEnum, GUID
from sqlalchemy.ext.orderinglist import ordering_list
from sqlalchemy.ext.associationproxy import association_proxy
from project.lib.orm.conditions import Con... | {
"repo_name": "saklar13/Meowth",
"path": "project/models.py",
"copies": "1",
"size": "7499",
"license": "bsd-3-clause",
"hash": 8629560758626716000,
"line_mean": 27.6221374046,
"line_max": 77,
"alpha_frac": 0.6163488465,
"autogenerated": false,
"ratio": 3.4653419593345656,
"config_test": false,... |
from enum import IntEnum
import numpy as np
from vulk import vulkanconstant as vc
from vulk import vulkanobject as vo
class UniformShapeType(IntEnum):
MATRIX4 = 16
class UniformAttribute():
def __init__(self, shape_type, data_type):
'''
*Parameters:*
- `shape_type`: `UniformShapeTy... | {
"repo_name": "realitix/vulk",
"path": "vulk/graphic/uniform.py",
"copies": "1",
"size": "2363",
"license": "apache-2.0",
"hash": -4905535902187445000,
"line_mean": 25.8522727273,
"line_max": 69,
"alpha_frac": 0.5797714769,
"autogenerated": false,
"ratio": 4.212121212121212,
"config_test": fals... |
from enum import IntEnum
import random
import numpy as np
import logging
class Direction(IntEnum):
TOP = 0
BOTTOM = 1
LEFT = 2
RIGHT = 3
# top = 00, bot = 01, left = 10, right = 11
# invert direction : ^1 (xor 1)
# 00^1 -> 01, etc
class Move:
def __init__(self, direction):
se... | {
"repo_name": "olety/Labyrinther",
"path": "genetic/genetic/moveset.py",
"copies": "1",
"size": "5575",
"license": "mit",
"hash": -1333654759677135600,
"line_mean": 33.3765432099,
"line_max": 118,
"alpha_frac": 0.5742503142,
"autogenerated": false,
"ratio": 3.6638157894736842,
"config_test": fa... |
from enum import IntEnum
import random
class PowerupType(IntEnum):
no_powerup = 0
player_invinciblility = 1
big_bomb = 2
slow_down_rocks = 3
shoot_rocks = 4
class PowerupDuration(IntEnum):
no_duration = 0
instant = 10
small = 10 * 1000
medium = 15 * 1000
big = 20 * 1000
cla... | {
"repo_name": "hristy93/FallingRocks",
"path": "gameplay/powerup.py",
"copies": "1",
"size": "1489",
"license": "mit",
"hash": -1030958426192952200,
"line_mean": 26.0727272727,
"line_max": 78,
"alpha_frac": 0.6279382136,
"autogenerated": false,
"ratio": 3.6765432098765434,
"config_test": false,... |
from enum import IntEnum
import re
class SymbolKind(IntEnum):
Unknown = 0
File = 1
Module = 2
Namespace = 3
Package = 4
Class = 5
Method = 6
Property = 7
Field = 8
Constructor = 9
Enum = 10
Interface = 11
Function = 12
Variable = 13
Constant = 14
String ... | {
"repo_name": "autozimu/LanguageClient-neovim",
"path": "rplugin/python3/denite/lsp/protocol.py",
"copies": "1",
"size": "1057",
"license": "mit",
"hash": 3796692575148284000,
"line_mean": 18.2181818182,
"line_max": 79,
"alpha_frac": 0.5666982025,
"autogenerated": false,
"ratio": 3.63230240549828... |
from enum import IntEnum
import sdl2
class Button(IntEnum):
LEFT = sdl2.SDL_BUTTON_LEFT
MIDDLE = sdl2.SDL_BUTTON_MIDDLE
RIGHT = sdl2.SDL_BUTTON_RIGHT
X1 = sdl2.SDL_BUTTON_X1
X2 = sdl2.SDL_BUTTON_X2
class EventType(IntEnum):
AUDIO_DEVICE_ADDED = sdl2.SDL_AUDIODEVICEADDED
AUDIO_DEVICE_REMO... | {
"repo_name": "realitix/vulk",
"path": "vulk/eventconstant.py",
"copies": "1",
"size": "4122",
"license": "apache-2.0",
"hash": 3289974006480506000,
"line_mean": 26.8513513514,
"line_max": 66,
"alpha_frac": 0.6673944687,
"autogenerated": false,
"ratio": 3.0578635014836797,
"config_test": false,... |
from enum import IntEnum
import src.irulez.util as util
from abc import ABC, abstractmethod
import src.irulez.log as log
from datetime import time
from typing import List, Dict, Optional
import src.irulez.constants as constants
from threading import Timer
logger = log.get_logger('button_domain')
class ArduinoPinType... | {
"repo_name": "deklungel/iRulez",
"path": "src/button/_domain.py",
"copies": "1",
"size": "29130",
"license": "mit",
"hash": -6083037248677932000,
"line_mean": 36.2506393862,
"line_max": 119,
"alpha_frac": 0.5761414349,
"autogenerated": false,
"ratio": 4.043025676613463,
"config_test": false,
... |
from enum import IntEnum
import src.irulez.util as util
from abc import ABC
import src.irulez.log as log
import src.irulez.constants as constants
from typing import List, Optional, Dict
logger = log.get_logger('domain')
class ArduinoPinType(IntEnum):
"""Represents the purpose of a pin on an arduino"""
BUTTON... | {
"repo_name": "deklungel/iRulez",
"path": "src/output_status/domain.py",
"copies": "1",
"size": "4151",
"license": "mit",
"hash": -7455802873022522000,
"line_mean": 28.027972028,
"line_max": 79,
"alpha_frac": 0.6131052758,
"autogenerated": false,
"ratio": 3.63167104111986,
"config_test": false,... |
from enum import IntEnum
import struct
class Setter(object):
def __init__(self, func, doc=None):
self.func = func
self.__doc__ = doc if doc is not None else func.__doc__
def __set__(self, obj, value):
return self.func(obj, value)
class Templates(IntEnum):
car = 1
# Variable-l... | {
"repo_name": "quantboxru/sbe",
"path": "example/car.py",
"copies": "1",
"size": "5208",
"license": "apache-2.0",
"hash": 1030222842270707000,
"line_mean": 23.682464455,
"line_max": 95,
"alpha_frac": 0.5743087558,
"autogenerated": false,
"ratio": 3.6701902748414374,
"config_test": false,
"has... |
from enum import IntEnum
import struct
PIAF_VERSION = 0x01000000
class FileType(IntEnum):
UNKNOWN = 0
MAP = 1
EVENT_LIST = 2
TEXT = 3
TEXTURE = 4
class CompressionType(IntEnum):
UNKNOWN = 0
RAW = 1
ZLIB = 2
RLE = 3
def header_check_structure():
return (
">" # Big End... | {
"repo_name": "WalrusRPG/PIAF",
"path": "wrpg/piaf/common.py",
"copies": "1",
"size": "1400",
"license": "mit",
"hash": 6225392339399796000,
"line_mean": 19,
"line_max": 57,
"alpha_frac": 0.5692857143,
"autogenerated": false,
"ratio": 3.4482758620689653,
"config_test": false,
"has_no_keywords... |
from enum import IntEnum
__all__ = ['HTTPStatus']
class HTTPStatus(IntEnum):
"""HTTP status codes and reason phrases
Status codes from the following RFCs are all observed:
* RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
* RFC 6585: Additional HTTP Status Codes
* RF... | {
"repo_name": "Reflexe/doc_to_pdf",
"path": "Windows/program/python-core-3.5.0/lib/http/__init__.py",
"copies": "17",
"size": "5953",
"license": "mpl-2.0",
"hash": 4278060809795643400,
"line_mean": 43.4253731343,
"line_max": 78,
"alpha_frac": 0.6588274819,
"autogenerated": false,
"ratio": 3.99262... |
from enum import IntEnum
__author__ = "Piotr Gawlowicz"
__copyright__ = "Copyright (c) 2015, Technische Universitat Berlin"
__version__ = "0.1.0"
__email__ = "gawlowicz@tkn.tu-berlin.de"
class SerializationType(IntEnum):
NONE = 0
JSON = 1
PICKLE = 2
MSGPACK = 3
PROTOBUF = 4
class MessageDescrip... | {
"repo_name": "uniflex/uniflex",
"path": "uniflex/msgs/msgdescription.py",
"copies": "1",
"size": "1040",
"license": "mit",
"hash": 5653437966247776000,
"line_mean": 27.8888888889,
"line_max": 67,
"alpha_frac": 0.6259615385,
"autogenerated": false,
"ratio": 3.586206896551724,
"config_test": fal... |
from enum import IntEnum
class attribType(IntEnum):
Point = 0
Prim = 1
Vertex = 2
Global = 3
class attribData(IntEnum):
Int = 0
Float = 1
String = 2
class Attrib():
def __init__(self, geometry, attrib_type: attribType, name: str, default_value, transform_as_normal=False, create_local_... | {
"repo_name": "cinepost/Copperfield_FX",
"path": "copper/core/data/geometry_data/attribs.py",
"copies": "1",
"size": "1603",
"license": "unlicense",
"hash": 3989440459580329500,
"line_mean": 28.6666666667,
"line_max": 140,
"alpha_frac": 0.5940037477,
"autogenerated": false,
"ratio": 4.02261306532... |
from enum import IntEnum
class Finger(IntEnum):
Thumb = 0
Index = 1
Middle = 2
Ring = 3
Little = 4
@staticmethod
def get_array_of_points(finger):
finger_array = None
if finger == Finger.Thumb:
finger_array = [(0, 4), (4, 3), (3, 2), (2, 1)]
elif fing... | {
"repo_name": "dedoogong/asrada",
"path": "HandPose_Detector/Finger.py",
"copies": "1",
"size": "1178",
"license": "apache-2.0",
"hash": -5865206801709140000,
"line_mean": 30.0263157895,
"line_max": 66,
"alpha_frac": 0.4923599321,
"autogenerated": false,
"ratio": 3.175202156334232,
"config_test... |
from enum import IntEnum
class FingerPosition(IntEnum):
VerticalUp = 0
VerticalDown = 1
HorizontalLeft = 2
HorizontalRight = 3
DiagonalUpRight = 4
DiagonalUpLeft = 5
DiagonalDownRight = 6
DiagonalDownLeft = 7
@staticmethod
def get_finger_position_name(finger_position):
... | {
"repo_name": "dedoogong/asrada",
"path": "HandPose_Detector/FingerPosition.py",
"copies": "1",
"size": "1202",
"license": "apache-2.0",
"hash": 6485930288996030000,
"line_mean": 37.8064516129,
"line_max": 65,
"alpha_frac": 0.6605657238,
"autogenerated": false,
"ratio": 3.9539473684210527,
"con... |
from enum import IntEnum
class OgreSkeletonChunkID(IntEnum):
"""
Definition of the OGRE .skeleton file format
.skeleton files are binary files (for read efficiency at runtime) and are arranged into chunks
of data; very like 3D Studio's format.
A chunk always consists of:
unsigned short CHU... | {
"repo_name": "lamogui/ogre_blender_importer",
"path": "OgreSkeletonFileFormat.py",
"copies": "1",
"size": "3555",
"license": "mit",
"hash": 3865920376380903400,
"line_mean": 58.25,
"line_max": 125,
"alpha_frac": 0.600281294,
"autogenerated": false,
"ratio": 4.3090909090909095,
"config_test": f... |
from enum import IntEnum
#Different costs for a move on the grid
DIAG_COST = 3
NONDIAG_COST = 2
#Path where the sim files are stored
SIMULATIONS_PATH = "simulations"
class Cell(IntEnum):
""" Intern representation for the matrix
RESERVED -- indicates that the cell
is reserved for a walker
... | {
"repo_name": "Tooa/trafficSim",
"path": "config.py",
"copies": "1",
"size": "1391",
"license": "apache-2.0",
"hash": -7612706301707830000,
"line_mean": 25.2452830189,
"line_max": 58,
"alpha_frac": 0.5657800144,
"autogenerated": false,
"ratio": 3.557544757033248,
"config_test": false,
"has_no... |
from enum import IntEnum
from app import db
"""
Describes the authentication level of a user as a series of constants.
IntEnum has been chosen as this provides a nice way to use < and > for permission checking.
"""
class AuthLevel(IntEnum):
UNKNOWN = 0,
USER = 1,
ADMIN = 2
"""
A class that represents the... | {
"repo_name": "Zillolo/mana-vault",
"path": "app/mod_auth/model.py",
"copies": "1",
"size": "1147",
"license": "mit",
"hash": 4203343775811767000,
"line_mean": 25.0681818182,
"line_max": 91,
"alpha_frac": 0.58326068,
"autogenerated": false,
"ratio": 4.010489510489511,
"config_test": false,
"h... |
from enum import IntEnum
from couchbase.exceptions import CouchbaseException
from typing import *
class MixedAuthException(CouchbaseException):
"""
Cannot use old and new style auth together in the same cluster
"""
pass
class NoBucketException(CouchbaseException):
"""
Operation requires at ... | {
"repo_name": "couchbase/couchbase-python-client",
"path": "couchbase/auth.py",
"copies": "1",
"size": "8604",
"license": "apache-2.0",
"hash": -4189844288658038300,
"line_mean": 32.4785992218,
"line_max": 150,
"alpha_frac": 0.6041376104,
"autogenerated": false,
"ratio": 4.341069626639758,
"con... |
from enum import IntEnum
from django.conf import settings
from django.db import models
from tipsi_tools.django.contrib.postgres.models import LTreeModel
class ArticleType(IntEnum):
article = 1
review = 2
ads = 3
class Author(models.Model):
name = models.CharField(max_length=50)
birth_date = mo... | {
"repo_name": "tipsi/tipsi_tools",
"path": "django_tests/sampleapp/models.py",
"copies": "1",
"size": "1206",
"license": "mit",
"hash": -3304127610868714500,
"line_mean": 28.4146341463,
"line_max": 90,
"alpha_frac": 0.728026534,
"autogenerated": false,
"ratio": 3.6,
"config_test": false,
"has... |
from enum import IntEnum
from hashkernel.bakery import (
CakePath, HasCake, Cake, CakeRack, CakeRole)
from hashkernel import Str2Bytes
class NodeState(IntEnum):
"""
>>> list(NodeState) #doctest: +NORMALIZE_WHITESPACE
[<NodeState.unknown: 0>, <NodeState.scanning: 1>,
<NodeState.scanned: 2>, <NodeS... | {
"repo_name": "walnutgeek/hashstore",
"path": "hashstore/bakery/cake_tree.py",
"copies": "1",
"size": "9430",
"license": "apache-2.0",
"hash": -7699334555625832000,
"line_mean": 28.46875,
"line_max": 73,
"alpha_frac": 0.5654294804,
"autogenerated": false,
"ratio": 2.8829104249464996,
"config_te... |
from enum import IntEnum
from . import ternary
class Token(IntEnum):
_ = Empty = 0
X = 1
O = 2
class Board(ternary.Number):
Points = list(range(3*3))
Length = len(Points)
Matrix = list(zip(*[iter(Points)]*3))
Rotation = [point for row in zip(*Matrix[::-1]) for point in row]
Inversion... | {
"repo_name": "jorgebg/tictactoe",
"path": "space.py",
"copies": "1",
"size": "1086",
"license": "mit",
"hash": -7932932709144632000,
"line_mean": 23.6818181818,
"line_max": 71,
"alpha_frac": 0.5349907919,
"autogenerated": false,
"ratio": 3.222551928783383,
"config_test": false,
"has_no_keywo... |
from enum import IntEnum
from MComponents.MShape import MShape
__author__ = "Samvid Mistry"
import time
from typing import List, Callable
from PySide.QtGui import QApplication
from MAnimations.MAnimate import MAnimate
from MBase import *
class MTransform(MAnimate):
def __init__(self, method: Callable[[float,... | {
"repo_name": "samvidmistry/PyMaterial",
"path": "MAnimations/MTransform.py",
"copies": "1",
"size": "1322",
"license": "mit",
"hash": 4696316457170685000,
"line_mean": 30.4761904762,
"line_max": 123,
"alpha_frac": 0.604387292,
"autogenerated": false,
"ratio": 4.006060606060606,
"config_test": ... |
from enum import IntEnum
from nose.tools import eq_
from anytree import AsciiStyle
from anytree import CountError
from anytree import Node
from anytree import PreOrderIter
from anytree import RenderTree
from anytree import find
from anytree import find_by_attr
from anytree import findall
from anytree import findall_b... | {
"repo_name": "c0fec0de/anytree",
"path": "tests/test_search.py",
"copies": "1",
"size": "2848",
"license": "apache-2.0",
"hash": -5946330917673804000,
"line_mean": 27.7676767677,
"line_max": 99,
"alpha_frac": 0.5635533708,
"autogenerated": false,
"ratio": 2.8537074148296595,
"config_test": fal... |
from enum import IntEnum
from numba import float64, int64, boolean
from numba.experimental import jitclass
import numpy as np
from astropy import units as u
from tardis import constants as const
from tardis.montecarlo import (
montecarlo_configuration as montecarlo_configuration,
)
C_SPEED_OF_LIGHT = const.c.t... | {
"repo_name": "tardis-sn/tardis",
"path": "tardis/montecarlo/montecarlo_numba/numba_interface.py",
"copies": "1",
"size": "11885",
"license": "bsd-3-clause",
"hash": -6722440420557674000,
"line_mean": 32.6685552408,
"line_max": 84,
"alpha_frac": 0.6232225494,
"autogenerated": false,
"ratio": 3.62... |
from enum import IntEnum
from ScrumPokerTablePy import db
from sqlalchemy_utils import JSONType
class GameDeskStateEnum(IntEnum):
Waiting = 1
Voting = 2
Display = 3
class GameDeskHistoryEntity(db.Model):
desk_history_id = db.Column(db.Integer, primary_key=True)
desk_id = db.Column(db.String)
... | {
"repo_name": "RomanGolovanov/scrum-poker-table-py",
"path": "ScrumPokerTablePy/ScrumPokerTablePy/models.py",
"copies": "1",
"size": "1597",
"license": "mit",
"hash": -3842621960059378700,
"line_mean": 25.6166666667,
"line_max": 91,
"alpha_frac": 0.6361928616,
"autogenerated": false,
"ratio": 3.3... |
from enum import IntEnum
from sqlalchemy import Column, Integer, String, Text, SmallInteger
from sqlalchemy.orm.exc import NoResultFound
from .base import Base, session
class OptionStatus(IntEnum):
ACTIVE = 1
class Option(Base):
__tablename__ = 'options'
id = Column(Integer, primary_key=True, autoinc... | {
"repo_name": "warmsea/warmsea.net",
"path": "warmsea/models/options.py",
"copies": "1",
"size": "1291",
"license": "mit",
"hash": 4732746046499786000,
"line_mean": 30.487804878,
"line_max": 91,
"alpha_frac": 0.6258714175,
"autogenerated": false,
"ratio": 4.137820512820513,
"config_test": false... |
from enum import IntEnum
import math
import copy
class TileSpriteSet(IntEnum):
""" Used to describe what set of tiles a tile's sprite comes from. """
none_0 = 0
mansion = 1
forest = 2
city = 3
laboratory = 4
tutorial = 5
nexus = 6
none_7 = 7
class TileSide(IntEnum):
TOP = 0
BOTTOM = 1
LEFT = ... | {
"repo_name": "msg555/dustmaker",
"path": "dustmaker/Tile.py",
"copies": "1",
"size": "14074",
"license": "apache-2.0",
"hash": -662221613311252700,
"line_mean": 30.4151785714,
"line_max": 80,
"alpha_frac": 0.5351712377,
"autogenerated": false,
"ratio": 3.1233910341766533,
"config_test": false,... |
from enum import IntEnum
import numpy as np
import tensorflow as tf
from sentences import NA_FEATURE_INDEX
class TokenRole(IntEnum):
S0 = 0
S1 = 1
S2 = 2
S3 = 3
N0 = 4
N1 = 5
N2 = 6
S0_PARENT = 7
S0_GRANDPARENT = 8
S0_CHILD_LEFT = 9
S0_CHILD_LEFT_2 = 10
S0_CHILD_RIG... | {
"repo_name": "andersjo/hals",
"path": "hals/feature.py",
"copies": "1",
"size": "11686",
"license": "mit",
"hash": 6349518587380732000,
"line_mean": 33.1695906433,
"line_max": 117,
"alpha_frac": 0.6031148383,
"autogenerated": false,
"ratio": 3.415960245542239,
"config_test": false,
"has_no_k... |
from enum import IntEnum
import numpy as np
class StackOrientation(IntEnum):
"""Can be iterated over or indexed like the lower-case string representation of the orientation"""
XY = 0
XZ = 1
ZY = 2
def __str__(self):
return self.name.lower()
@classmethod
def from_str(cls, s):
... | {
"repo_name": "catmaid/catpy",
"path": "catpy/spatial.py",
"copies": "1",
"size": "10099",
"license": "mit",
"hash": -2581113438988365000,
"line_mean": 31.788961039,
"line_max": 120,
"alpha_frac": 0.5718387959,
"autogenerated": false,
"ratio": 4.4196936542669585,
"config_test": false,
"has_no... |
# from enum import IntEnum
LEVEL_UNKNOWN_DEATH = int(0)
LEVEL_NOS = int(-1)
LEVEL_FINISHED = int(-2)
LEVEL_MAX = 21
LEVELS_PER_ZONE = 4
TOTAL_ZONES = 5
# class LevelSpecial(IntEnum):
# UNKNOWN_DEATH = 0,
# NOS = -1,
# FINISHED = -2
#
#
# class Level(object):
# @staticmethod
# def fromstr(level_st... | {
"repo_name": "incnone/necrobot",
"path": "necrobot/util/necrodancer/level.py",
"copies": "1",
"size": "3460",
"license": "mit",
"hash": 4192361103554232300,
"line_mean": 31.641509434,
"line_max": 112,
"alpha_frac": 0.5297687861,
"autogenerated": false,
"ratio": 3.2246039142590868,
"config_test... |
from enum import IntEnum
N_ADMIN = 'national_admin'
N_MOD = 'national_moderator'
N_USER = 'national_user'
R_ADMIN = 'regional_admin'
R_MOD = 'regional_moderator'
R_USER = 'regional_user'
C_USER = 'customer_user'
ALL_ROLES = [N_ADMIN, N_MOD, N_USER, R_ADMIN, R_MOD, R_USER, C_USER]
ONLY_ADMIN_ROLE = [N_ADMIN, R_ADMIN]
A... | {
"repo_name": "hieulq/pgscm",
"path": "pgscm/const.py",
"copies": "1",
"size": "2032",
"license": "apache-2.0",
"hash": -5535712169252592000,
"line_mean": 24.4,
"line_max": 69,
"alpha_frac": 0.6112204724,
"autogenerated": false,
"ratio": 2.7093333333333334,
"config_test": false,
"has_no_keywo... |
from enum import IntEnum
class CassettePosition(IntEnum):
unknown = -1
left = 0
middle = 1
right = 2
class HolderType(IntEnum):
# Warning: names must match SPEL update cassette_type messages
unknown = 0 # unknown / absent / error
calibration = 1
normal = 2
superpuck = 3
class ... | {
"repo_name": "AustralianSynchrotron/aspyrobotmx",
"path": "aspyrobotmx/codes.py",
"copies": "1",
"size": "2011",
"license": "mit",
"hash": -5975673957842763000,
"line_mean": 20.623655914,
"line_max": 66,
"alpha_frac": 0.658378916,
"autogenerated": false,
"ratio": 3.108191653786708,
"config_tes... |
from enum import IntEnum
class Command(IntEnum):
"""
Enumerators for master's commands in TCP json-requests
"""
INVALID_COMMAND = 0 # for invalid requests
SHOW_NEXT = 1 # for requesting slave to show next element
END_PRESENTATION = 2 # for requesting slave to end t... | {
"repo_name": "RemuTeam/Remu",
"path": "project/Constants/Command.py",
"copies": "1",
"size": "1249",
"license": "mit",
"hash": 2984748268705309700,
"line_mean": 47.0384615385,
"line_max": 92,
"alpha_frac": 0.6789431545,
"autogenerated": false,
"ratio": 4.397887323943662,
"config_test": false,
... |
from enum import IntEnum
class Const:
JOIN_SERVER_ADDR = ('localhost', 8800)
DIR_UP = 0
DIR_DOWN = 1
GATEWAY_CONFIG_IDENTIFIER = b'\x05'
GATEWAY_CONFIG_RESQ_IDENTIFIER = b'\x06'
# PROTOCOL_VERSION = b'\x01'
PUSH_DATA_IDENTIFIER = 0x00
PUSH_ACK_IDENTIFIER = b'\x01'
PULL_DATA_IDEN... | {
"repo_name": "soybean217/lora-python",
"path": "GServer/const.py",
"copies": "1",
"size": "1690",
"license": "mit",
"hash": 3039187809981151000,
"line_mean": 20.6794871795,
"line_max": 45,
"alpha_frac": 0.5556213018,
"autogenerated": false,
"ratio": 2.793388429752066,
"config_test": false,
"... |
from enum import IntEnum
class eDriverType(IntEnum):
Unknown, LCD = range(2)
class ioPortDirection(IntEnum):
Undefined, InputOutput, Output, Input = range(4)
class ePortType(IntEnum):
Undefined, Integer, Decimal, DecimalHigh, Boolean, Color, String, VideoDescriptor, AudioDescriptor, \
BinaryResour... | {
"repo_name": "yodiwo/plegma",
"path": "Python/Python_node/plegma/EnumsApi.py",
"copies": "1",
"size": "2151",
"license": "apache-2.0",
"hash": -3076436835388425000,
"line_mean": 24.6071428571,
"line_max": 105,
"alpha_frac": 0.7377963738,
"autogenerated": false,
"ratio": 3.3452566096423015,
"co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.