text stringlengths 0 1.05M | meta dict |
|---|---|
from enum import Enum
class Rarity(Enum):
land = ('L', 'Land')
L = ('L', 'Land')
common = ('C', 'Common')
C = ('C', 'Common')
uncommon = ('U', 'Uncommon')
U = ('U', 'Uncommon')
rare = ('R', 'Rare')
R = ('R', 'Rare')
m... | {
"repo_name": "jwodder/envec",
"path": "envec/rarity.py",
"copies": "1",
"size": "1173",
"license": "mit",
"hash": 1215594684461714200,
"line_mean": 23.9574468085,
"line_max": 44,
"alpha_frac": 0.4219948849,
"autogenerated": false,
"ratio": 3.231404958677686,
"config_test": false,
"has_no_key... |
from enum import Enum
class Specie(Enum):
sapling="sapling"
tree="tree"
elder="elder"
lumberjack="lumberjack"
bear="bear"
grass="grass"
Trees=[Specie.tree, Specie.elder]
class Grass(object):
def __init__(self, row, column):
self.row=row
self.column=column
self.spec... | {
"repo_name": "Bolt64/my_code",
"path": "Code Snippets/daily_programmer/simulated_forest/classes.py",
"copies": "1",
"size": "4213",
"license": "mit",
"hash": -8666788531992486000,
"line_mean": 22.9375,
"line_max": 87,
"alpha_frac": 0.5874673629,
"autogenerated": false,
"ratio": 3.425203252032520... |
from enum import Enum
class Suit(Enum):
joker = 0
spade = 1
heart = 2
diamond = 3
club = 4
wildcard = 0
pagliacci = 0
old_maid = 0
trump_card = 0
best_bower = 0
the_fool = 0
the_fly = 0
the_bird = 0
leaf = 1
shield = 1
rose = 2
tile = 3
... | {
"repo_name": "lethargilistic/spydes",
"path": "spydes/card_enum.py",
"copies": "1",
"size": "2696",
"license": "mit",
"hash": 4146863718067131000,
"line_mean": 14.4057142857,
"line_max": 40,
"alpha_frac": 0.4899851632,
"autogenerated": false,
"ratio": 3.056689342403628,
"config_test": false,
... |
from enum import Enum
class Test(object):
def __init__(self, test_playbook, inventory=None, setup_playbook=None, teardown_playbook=None):
assert test_playbook is not None
self.__test_playbook = test_playbook
self.__inventory = inventory
self.__setup_playbook = setup_playbook
... | {
"repo_name": "xabierlaiseca/ansiblest",
"path": "ansiblest/domain/model/test.py",
"copies": "1",
"size": "1714",
"license": "apache-2.0",
"hash": 1406810202302692000,
"line_mean": 24.5820895522,
"line_max": 99,
"alpha_frac": 0.5921820303,
"autogenerated": false,
"ratio": 4.5828877005347595,
"c... |
from enum import Enum
class Tokens(Enum):
start = '__start__'
end = '__end__'
class Words():
def __init__(self, database = None):
# set of known words
tokens = [ Tokens.start.value, Tokens.end.value ]
# map from word to id
self._words = { word: index for index, word in enum... | {
"repo_name": "karolciba/playground",
"path": "markov/words.py",
"copies": "1",
"size": "1681",
"license": "unlicense",
"hash": -359097337163847100,
"line_mean": 30.1296296296,
"line_max": 107,
"alpha_frac": 0.5514574658,
"autogenerated": false,
"ratio": 4.140394088669951,
"config_test": false,... |
from enum import Enum
class TokenType(Enum):
EOF = 1
WS = 2
IDENT = 3
LET = 4
VAR = 5
INT = 6
FLOAT = 7
STRING = 8
CHAR = 9
LEFT_BRACKET = 10
RIGHT_BRACKET = 11
EQUALS = 12
COLON = 13
DEF = 14
CLASS = 15
INDENT = 16
DEDENT = 17
FOR = 18
... | {
"repo_name": "jyapayne/Atheris",
"path": "atheris/token.py",
"copies": "1",
"size": "1583",
"license": "mit",
"hash": -516081152765043140,
"line_mean": 18.7875,
"line_max": 74,
"alpha_frac": 0.4864181933,
"autogenerated": false,
"ratio": 3.565315315315315,
"config_test": false,
"has_no_keywo... |
from enum import Enum
class TokenType(Enum):
KEYWORD = 0
SYMBOL = 1
IDENTIFIER = 2
INT_CONST = 3
STRING_CONST = 4
class LexerState(Enum):
START = 0
RECOGNIZE = 1
CCOMMENT = 2
CPPCOMMENT = 3
SYMBOL = 4
DIGIT = 5
QUOTE = 6
ALPHA = 7
INTEGER = 8
STRING = 9
... | {
"repo_name": "peterb12/nand2tetris",
"path": "src/JackCompiler/jc_types.py",
"copies": "1",
"size": "1324",
"license": "bsd-3-clause",
"hash": -2191942941266645000,
"line_mean": 22.2280701754,
"line_max": 62,
"alpha_frac": 0.5438066465,
"autogenerated": false,
"ratio": 3.964071856287425,
"conf... |
from enum import Enum
class TurretCommand(object):
class ServoState(Enum):
off = 0
inc = 1
dec = 2
reset = 3
class LaserState(Enum):
off = 0
on = 1
class ExtraState(Enum):
off = 0
camera = 1
def __init__(self, value=0):
if isinst... | {
"repo_name": "twistedretard/LaserSimulatedSecurityTurret",
"path": "src/turret/turret_command.py",
"copies": "1",
"size": "2496",
"license": "mit",
"hash": -8493387017458118000,
"line_mean": 27.0449438202,
"line_max": 76,
"alpha_frac": 0.4991987179,
"autogenerated": false,
"ratio": 3.55555555555... |
from enum import Enum
class Type(Enum):
normal = 0
fire = 1
water = 2
electric = 3
grass = 4
ice = 5
fighting = 6
poison = 7
ground = 8
flying = 9
psychic = 10
bug = 11
rock = 12
ghost = 13
dragon = 14
dark = 15
steel = 16
fairy = 17
_effec... | {
"repo_name": "TheWayADrillWorks/RMP",
"path": "battle_engine/mon_type.py",
"copies": "1",
"size": "2229",
"license": "mit",
"hash": 3091068845249598000,
"line_mean": 47.4565217391,
"line_max": 99,
"alpha_frac": 0.288470166,
"autogenerated": false,
"ratio": 1.85286783042394,
"config_test": fals... |
from enum import Enum
#: Detect if psycopg2 driver is being used
#: import quote_ident else set to None
try:
from psycopg2.extensions import quote_ident
except ImportError: # pragma: no cover
quote_ident = None
else:
import psycopg2.extensions as extensions
#: Detect if psycopg2 driver is being used
#: i... | {
"repo_name": "9fin/sqlpy",
"path": "sqlpy/config.py",
"copies": "1",
"size": "1060",
"license": "mit",
"hash": 1139233177890644100,
"line_mean": 25.5,
"line_max": 61,
"alpha_frac": 0.7320754717,
"autogenerated": false,
"ratio": 4.0926640926640925,
"config_test": false,
"has_no_keywords": fal... |
from enum import Enum
# DIPLOMATIC
class Attitude(Enum):
none = 'None'
hostile = 'Hostile'
outraged = 'Outraged'
threatened = 'Threatened'
neutral = 'Neutral'
friendly = 'Friendly'
# GOVERNMENT
class GovernmentType(Enum):
monarchy = 'Monarchy'
republic = 'Republic'
theocracy = '... | {
"repo_name": "eranimo/historia",
"path": "historia/country/enums/country_enums.py",
"copies": "1",
"size": "2433",
"license": "mit",
"hash": -6191556653446648000,
"line_mean": 24.0824742268,
"line_max": 79,
"alpha_frac": 0.6909165639,
"autogenerated": false,
"ratio": 3.127249357326478,
"config... |
from enum import Enum
DucklingEntities = \
[
"time" ,
"timezone" ,
"temperature" ,
"number" ,
"ordinal" ,
"distance" ,
"volume" ,
"money" ,
"duration" ,
"email" ,
"url" ,
"phone_number"
]
SpacyEniti... | {
"repo_name": "Sefrwahed/Alfred",
"path": "alfred/nlp/entity_type.py",
"copies": "1",
"size": "1526",
"license": "mit",
"hash": -446330780702189600,
"line_mean": 22.859375,
"line_max": 36,
"alpha_frac": 0.4128440367,
"autogenerated": false,
"ratio": 3.4840182648401825,
"config_test": false,
"... |
from enum import Enum
dunder_dict = {} # dict is populated by creating an instance of `Dunder`
class DunderSections(Enum):
binary = 'Binary Operators'
unary = 'Unary Operations'
inplace = 'Inplace Binary Operator (=)'
reverse = 'Reverse Binary Operations'
comparison = 'Comparison operators'
... | {
"repo_name": "nhumrich/dunderdoc",
"path": "dunderdoc/dunders.py",
"copies": "1",
"size": "19579",
"license": "mit",
"hash": 3741521560645504000,
"line_mean": 31.7956448911,
"line_max": 104,
"alpha_frac": 0.5546759283,
"autogenerated": false,
"ratio": 4.338355860846444,
"config_test": false,
... |
#from enum import Enum
# Enum only in Python >= 3.4
#class Operator(Enum):
class Operator(object):
And = 0
Equal = 1
GreaterEqual = 2
Greater = 3
LessEqual = 4
Less = 5
NotEqual = 6
Or = 7
Between = 8
Contains = 9
EndsWith = 10
Is = 11
IsNot = 12
Like = 13
Ma... | {
"repo_name": "orientechnologies/pyorient",
"path": "pyorient/ogm/operators.py",
"copies": "3",
"size": "5002",
"license": "apache-2.0",
"hash": 4331872473442507300,
"line_mean": 29.5,
"line_max": 81,
"alpha_frac": 0.6339464214,
"autogenerated": false,
"ratio": 3.9017160686427457,
"config_test"... |
from enum import Enum
EventType = Enum("EventType", "DATA ORDER FILL REJECTED")
class Event(object):
"""
Event is base class providing an interface for all subsequent
(inherited) events, that will trigger further events in the
trading infrastructure.
"""
def __init__(self, event_type, date):... | {
"repo_name": "michaelchu/kaleidoscope",
"path": "kaleidoscope/event.py",
"copies": "1",
"size": "2915",
"license": "mit",
"hash": 6417246914331700000,
"line_mean": 27.5784313725,
"line_max": 92,
"alpha_frac": 0.6161234991,
"autogenerated": false,
"ratio": 4.299410029498525,
"config_test": fals... |
from enum import Enum
EXIT_CODES = [
"SUCCESS",
"BUILD_FAILURE",
"PARSING_FAILURE",
"COMMAND_LINE_ERROR",
"TESTS_FAILED",
"PARTIAL_ANALYSIS_FAILURE",
"NO_TESTS_FOUND",
"RUN_FAILURE",
"ANALYSIS_FAILURE",
"INTERRUPTED",
"LOCK_HEL... | {
"repo_name": "antmicro/distant-bes",
"path": "distantbes/enums.py",
"copies": "1",
"size": "1058",
"license": "apache-2.0",
"hash": -1725027334868815000,
"line_mean": 22.5111111111,
"line_max": 53,
"alpha_frac": 0.5557655955,
"autogenerated": false,
"ratio": 3.0755813953488373,
"config_test": ... |
from enum import Enum
from abc import abstractmethod, ABCMeta
from collections.abc import Iterable
from pyrsistent._pmap import PMap, pmap
from pyrsistent._pset import PSet, pset
from pyrsistent._pvector import PythonPVector, python_pvector
class CheckedType(object):
"""
Marker class to enable creation and ... | {
"repo_name": "tobgu/pyrsistent",
"path": "pyrsistent/_checked_types.py",
"copies": "1",
"size": "18372",
"license": "mit",
"hash": 5190447039742625000,
"line_mean": 32.8966789668,
"line_max": 150,
"alpha_frac": 0.6178967995,
"autogenerated": false,
"ratio": 3.944182052382997,
"config_test": fa... |
from enum import Enum
from abidria.exceptions import ConflictException
from experiences.entities import Experience
class GetAllExperiencesInteractor:
def __init__(self, experience_repo, permissions_validator):
self.experience_repo = experience_repo
self.permissions_validator = permissions_valida... | {
"repo_name": "jordifierro/abidria-api",
"path": "experiences/interactors.py",
"copies": "1",
"size": "5108",
"license": "mit",
"hash": 4115154854076364300,
"line_mean": 40.868852459,
"line_max": 120,
"alpha_frac": 0.6842208301,
"autogenerated": false,
"ratio": 4.070119521912351,
"config_test":... |
from enum import Enum
from .abstract import Session
from .. import utils
from ..tl import TLObject
from ..tl.types import (
PeerUser, PeerChat, PeerChannel,
InputPeerUser, InputPeerChat, InputPeerChannel,
InputPhoto, InputDocument
)
class _SentFileType(Enum):
DOCUMENT = 0
PHOTO = 1
@staticme... | {
"repo_name": "LonamiWebs/Telethon",
"path": "telethon/sessions/memory.py",
"copies": "2",
"size": "8160",
"license": "mit",
"hash": 6232724173474042000,
"line_mean": 32.1707317073,
"line_max": 79,
"alpha_frac": 0.5512254902,
"autogenerated": false,
"ratio": 4.025653675382339,
"config_test": fa... |
from enum import Enum
from .abstract_module import AbstractModule, ModuleState
class WireColors(Enum):
MISSING = ''
BLACK = 'black'
RED = 'red'
WHITE = 'white'
BLUE = 'blue'
YELLOW = 'yellow'
def get_correct_wire(sequence: list, boolpar):
wires_count = get_wires_count(sequence)
sequ... | {
"repo_name": "hanzikl/ktane-controller",
"path": "ktane/model/modules/wires_module.py",
"copies": "1",
"size": "5896",
"license": "mit",
"hash": 461096284878269060,
"line_mean": 33.6823529412,
"line_max": 93,
"alpha_frac": 0.6275440977,
"autogenerated": false,
"ratio": 3.760204081632653,
"conf... |
from enum import Enum
from .accessors import ParametersAccessor, Registers, Codes, NotInScopeError
from .fonts import FontState
from .router import CSRouter
class Operation(Enum):
advance = 1
def operate(object_operand, by_operand, operation):
if operation == Operation.advance:
result = object_oper... | {
"repo_name": "eddiejessup/nex",
"path": "nex/scopes.py",
"copies": "1",
"size": "9970",
"license": "mit",
"hash": 4977086974574853000,
"line_mean": 37.6434108527,
"line_max": 90,
"alpha_frac": 0.6022066199,
"autogenerated": false,
"ratio": 3.8793774319066148,
"config_test": false,
"has_no_ke... |
from enum import Enum
from ....account.error_codes import AccountErrorCode
from ....checkout.error_codes import CheckoutErrorCode
from ....core.error_codes import ShopErrorCode
from ....extensions.error_codes import ExtensionsErrorCode
from ....giftcard.error_codes import GiftCardErrorCode
from ....menu.error_codes im... | {
"repo_name": "maferelo/saleor",
"path": "saleor/graphql/core/utils/error_codes.py",
"copies": "2",
"size": "2019",
"license": "bsd-3-clause",
"hash": 7882125126533265000,
"line_mean": 25.2207792208,
"line_max": 87,
"alpha_frac": 0.6830113918,
"autogenerated": false,
"ratio": 3.6053571428571427,
... |
from enum import Enum
from aiohttp import web
import aioweb.core.controller
##
## Preprocessing
##
from aioweb.util import get_own_properties
class CtlDecoratorDescriptor(Enum):
VAL = 'val'
ONLY = 'only'
EXCEPT = 'exclude'
def before(before_fn):
def decorator(fn):
def decorated(self, *args... | {
"repo_name": "kreopt/aioweb",
"path": "aioweb/core/controller/decorators.py",
"copies": "1",
"size": "3476",
"license": "mit",
"hash": -2304938899474658800,
"line_mean": 24.0071942446,
"line_max": 93,
"alpha_frac": 0.586593786,
"autogenerated": false,
"ratio": 4.118483412322274,
"config_test":... |
from enum import Enum
from api.symbol import Symbol
from utils.utils import to_str
import pandas as pd
from pandas import Timestamp
class FillType(Enum):
complete = 'COMPLETE' # means that this fill close an order
partial = 'PARTIAL'
class Fill:
def __init__(self,
symbol: Symbol,
... | {
"repo_name": "felipemontefuscolo/bitme",
"path": "common/fill.py",
"copies": "1",
"size": "2250",
"license": "mpl-2.0",
"hash": -1065426021006573800,
"line_mean": 30.25,
"line_max": 95,
"alpha_frac": 0.5208888889,
"autogenerated": false,
"ratio": 3.762541806020067,
"config_test": false,
"has... |
from enum import Enum
from base_query_parameter import BaseQueryParameter
class Season(BaseQueryParameter, Enum):
season_2016 = "2016-17"
season_2015 = "2015-16"
season_2014 = "2014-15"
season_2013 = "2013-14"
season_2012 = "2012-13"
season_2011 = "2011-12"
season_2010 = "2010-11"
sea... | {
"repo_name": "jaebradley/nba_data",
"path": "nba_data/data/season.py",
"copies": "1",
"size": "5828",
"license": "mit",
"hash": 7660468320917348000,
"line_mean": 27.4341463415,
"line_max": 109,
"alpha_frac": 0.6401853123,
"autogenerated": false,
"ratio": 2.9553752535496955,
"config_test": fals... |
from enum import Enum
from base_query_parameter import BaseQueryParameter
class Team(BaseQueryParameter, Enum):
atlanta_hawks = "Atlanta Hawks"
boston_celtics = "Boston Celtics"
brooklyn_nets = "Brooklyn Nets"
charlotte_hornets = "Charlotte Hornets"
chicago_bulls = "Chicago Bulls"
cleveland_c... | {
"repo_name": "jaebradley/nba_data",
"path": "nba_data/data/team.py",
"copies": "1",
"size": "7277",
"license": "mit",
"hash": 5021826893224548000,
"line_mean": 33.4881516588,
"line_max": 95,
"alpha_frac": 0.6982272915,
"autogenerated": false,
"ratio": 2.574106827025115,
"config_test": false,
... |
from enum import Enum
from .binary_search_tree import BinarySearchTree
class RBColor(Enum):
RED = 0
BLACK = 1
RED = RBColor.RED
BLACK = RBColor.BLACK
def color(node):
"""Utility function to handle NIL nodes"""
if node is None:
return BLACK
return node.color
def set_color(node, new_c... | {
"repo_name": "vadimadr/python-algorithms",
"path": "algorithms/structures/tree/red_black_tree.py",
"copies": "1",
"size": "6388",
"license": "mit",
"hash": 4425247634814128600,
"line_mean": 35.7126436782,
"line_max": 113,
"alpha_frac": 0.4672824045,
"autogenerated": false,
"ratio": 4.12129032258... |
from enum import Enum
from bomb_defusal.modules.module import DisarmableModule
R = 0b0001
T = 0b0010
L = 0b0100
B = 0b1000
RT, RL, RB = R | T, R | L, R | B
TL, TB, = T | L, T | B
LB = L | B
RTL, RTB, RLB = R | T | L, R | T | B, R | L | B
TLB = T | L | B
ShapeOne = [
RB, RL, LB, RB, RL, L,
TB, RB, TL, RT, RL,... | {
"repo_name": "leupibr/BombDefusal",
"path": "bomb_defusal/modules/mazes.py",
"copies": "1",
"size": "4221",
"license": "mit",
"hash": -5755267002614725000,
"line_mean": 24.5818181818,
"line_max": 79,
"alpha_frac": 0.4956171523,
"autogenerated": false,
"ratio": 2.30278232405892,
"config_test": ... |
from enum import Enum
from bomb_defusal.modules.module import Module
class IndicatorText(Enum):
SND = 'SND'
CLR = 'CLR'
CAR = 'CAR'
IND = 'IND'
FRQ = 'FRQ'
SIG = 'SIG'
NSA = 'NSA'
MSA = 'MSA'
TRN = 'TRN'
BOB = 'BOB'
FRK = 'FRK'
class Indicator(Module):
"""This module... | {
"repo_name": "leupibr/BombDefusal",
"path": "bomb_defusal/modules/indicator.py",
"copies": "1",
"size": "1149",
"license": "mit",
"hash": -6241262643324583000,
"line_mean": 21.5294117647,
"line_max": 83,
"alpha_frac": 0.5735422106,
"autogenerated": false,
"ratio": 3.767213114754098,
"config_te... |
from enum import Enum
from cafeteria.datastructs.units import BaseUnitClass
class DataMultiplier(Enum):
k = 10 ** 3
M = 10 ** 6
G = 10 ** 9
T = 10 ** 12
P = 10 ** 15
E = 10 ** 18
Z = 10 ** 21
Y = 10 ** 24
Ki = 2 ** 10
Mi = 2 ** 20
Gi = 2 ** 30
Ti = 2 ** 40
Pi = 2 *... | {
"repo_name": "abn/python-cafe",
"path": "cafeteria/datastructs/units/data.py",
"copies": "1",
"size": "1669",
"license": "apache-2.0",
"hash": 1299005180635207400,
"line_mean": 23.5441176471,
"line_max": 87,
"alpha_frac": 0.5721989215,
"autogenerated": false,
"ratio": 3.6441048034934496,
"conf... |
from enum import Enum
from ..client import BaseAPIClient
from ._base import Field, SyntheticField, PandoraModel, PandoraListModel
class AdditionalAudioUrl(Enum):
HTTP_40_AAC_MONO = "HTTP_40_AAC_MONO"
HTTP_64_AAC = "HTTP_64_AAC"
HTTP_32_AACPLUS = "HTTP_32_AACPLUS"
HTTP_64_AACPLUS = "HTTP_64_AACPLUS"
... | {
"repo_name": "mcrute/pydora",
"path": "pandora/models/playlist.py",
"copies": "1",
"size": "6074",
"license": "mit",
"hash": 5531333705445072000,
"line_mean": 29.8324873096,
"line_max": 78,
"alpha_frac": 0.6374711887,
"autogenerated": false,
"ratio": 3.8225298930144747,
"config_test": false,
... |
from enum import Enum
from colors import BLUE
from colors import GREEN
from colors import RED
from colors import YELLOW
from sudoku import DIGITS
from sudoku.bitBoard import BitBoard
class NoSolutionError(Exception):
def __str__(self):
return 'No solution exists'
class State(Enum):
PROMPT = 0
... | {
"repo_name": "jeffseif/sudoku",
"path": "sudoku/logic.py",
"copies": "1",
"size": "11134",
"license": "bsd-3-clause",
"hash": -5439873027720632000,
"line_mean": 26.2892156863,
"line_max": 109,
"alpha_frac": 0.4606610383,
"autogenerated": false,
"ratio": 4.279016141429669,
"config_test": false,... |
from enum import Enum
from const import C_RoleName
from config import app_config
from database.core import db
class Permissions(Enum):
Dev = 5
TestBots = 4
ServerOwner = 3
Organizer = 2
Participant = 1
User = 0
def __ge__(self, other):
return self.value >= other.value
def __... | {
"repo_name": "fp12/pyChallongeDiscordBot",
"path": "src/discord_impl/permissions.py",
"copies": "1",
"size": "1428",
"license": "mit",
"hash": -2943090496861161500,
"line_mean": 28.1428571429,
"line_max": 90,
"alpha_frac": 0.6414565826,
"autogenerated": false,
"ratio": 3.7284595300261096,
"con... |
from enum import Enum
from .core import Stream
DJANGO_TAG_OPEN = '{%'
DJANGO_TAG_CLOSE = '%}'
DJANGO_EXP_OPEN = '{{'
DJANGO_EXP_CLOSE = '}}'
HTML_CHARS = {"&": "&", "<": "<", ">": ">", '"': """, "'": "'"}
class EscapeState(Enum):
normal = 0
in_tag = 1
in_exp = 2
def html_escape(text... | {
"repo_name": "Psycojoker/HamlPy",
"path": "hamlpy/parser/utils.py",
"copies": "1",
"size": "1325",
"license": "mit",
"hash": -197390369032919740,
"line_mean": 29.1136363636,
"line_max": 119,
"alpha_frac": 0.5766037736,
"autogenerated": false,
"ratio": 3.4061696658097684,
"config_test": false,
... |
from enum import Enum
from .core import Stream
DJANGO_TAG_OPEN = "{%"
DJANGO_TAG_CLOSE = "%}"
DJANGO_EXP_OPEN = "{{"
DJANGO_EXP_CLOSE = "}}"
HTML_CHARS = {"&": "&", "<": "<", ">": ">", '"': """, "'": "'"}
class EscapeState(Enum):
normal = 0
in_tag = 1
in_exp = 2
def html_escape(text... | {
"repo_name": "nyaruka/django-hamlpy",
"path": "hamlpy/parser/utils.py",
"copies": "1",
"size": "1331",
"license": "mit",
"hash": 9052491515627637000,
"line_mean": 28.5777777778,
"line_max": 119,
"alpha_frac": 0.5740045079,
"autogenerated": false,
"ratio": 3.4304123711340204,
"config_test": fal... |
from enum import Enum
from cursesmenu.items import CommandItem
from cursesmenu.items import SubmenuItem
from cursesmenu import CursesMenu
from cursesmenu.items import ExitItem
from cursesmenu.items import SelectionItem
from cursesmenu.items import FunctionItem
class menuItem(Enum):
MENU = "menu"
COMMAND = "... | {
"repo_name": "pmbarrett314/curses-menu",
"path": "cursesmenu/old_curses_menu.py",
"copies": "2",
"size": "1479",
"license": "mit",
"hash": -1364990890609951700,
"line_mean": 30.4680851064,
"line_max": 75,
"alpha_frac": 0.6565246788,
"autogenerated": false,
"ratio": 3.753807106598985,
"config_t... |
from enum import Enum
from cwharaj.parser.harajsa_parser import HarajSaParse
from cwharaj.parser.mstaml_parser import MstamlParse
from cwharaj.parser.opensooq_parser import OpensooqParse
class WebsiteTypes(Enum):
def __str__(self):
return str(self.value)
@classmethod
def get_id_index(self, _url_... | {
"repo_name": "trujunzhang/djzhang-targets",
"path": "cwharaj/cwharaj/scraped_websites.py",
"copies": "1",
"size": "1977",
"license": "mit",
"hash": 815507470590241800,
"line_mean": 24.0253164557,
"line_max": 145,
"alpha_frac": 0.6479514416,
"autogenerated": false,
"ratio": 2.9463487332339793,
... |
from enum import Enum
from cwpoliticl.extensions.dailyo_parser import DailyoParser
from cwpoliticl.extensions.deccanchronicle_parser import DeccanchronicleParser
from cwpoliticl.extensions.dnaindia_parser import DnaIndiaParser
from cwpoliticl.extensions.firstpost_parser import FirstPostParser
from cwpoliticl.extension... | {
"repo_name": "trujunzhang/djzhang-targets",
"path": "cwpoliticl/cwpoliticl/scraped_websites.py",
"copies": "1",
"size": "3909",
"license": "mit",
"hash": -5841816405949810000,
"line_mean": 34.8623853211,
"line_max": 99,
"alpha_frac": 0.7339473011,
"autogenerated": false,
"ratio": 3.0658823529411... |
from enum import Enum
from Data.Events import ChangeEvent, ValueChangeEvent
from Data.Objects import IdObject, ObservableObject, NamedObservableObject
class Styles(ObservableObject):
def __init__(self):
ObservableObject.__init__(self)
self._edge_styles = {}
self._brushes = {}
def get_edge_style(self, uid):
... | {
"repo_name": "pracedru/PracedruDesign",
"path": "Data/Style.py",
"copies": "1",
"size": "5656",
"license": "bsd-3-clause",
"hash": -5053007300493920000,
"line_mean": 24.25,
"line_max": 104,
"alpha_frac": 0.7056223479,
"autogenerated": false,
"ratio": 3.003717472118959,
"config_test": false,
... |
from enum import Enum
from Data import get_uids
from Data.Areas import CompositeArea, EdgeLoopArea, AreaType, Edge
from Data.Edges import EdgeType
from Data.Events import ChangeEvent
from Data.Objects import IdObject, NamedObservableObject
from Data.Parameters import Parameters
from Data.Point3d import KeyPoint
clas... | {
"repo_name": "pracedru/PracedruDesign",
"path": "Data/Transformer.py",
"copies": "1",
"size": "7245",
"license": "bsd-3-clause",
"hash": 5428370424537201000,
"line_mean": 27.0813953488,
"line_max": 96,
"alpha_frac": 0.68957902,
"autogenerated": false,
"ratio": 2.96319018404908,
"config_test": ... |
from enum import Enum
from Data.Paper import *
from Data.Events import ChangeEvent, ValueChangeEvent
from Data.Objects import ObservableObject, NamedObservableObject
from Data.Parameters import Parameters
from Data.Plane import Plane
from Data.Sketch import Sketch
from Data.Vertex import Vertex
class ViewType(Enum):... | {
"repo_name": "pracedru/PracedruDesign",
"path": "Data/Drawings.py",
"copies": "1",
"size": "14985",
"license": "bsd-3-clause",
"hash": 6049341925857995000,
"line_mean": 28.324853229,
"line_max": 105,
"alpha_frac": 0.6906239573,
"autogenerated": false,
"ratio": 2.8962118283726324,
"config_test"... |
from enum import Enum
from datetime import datetime, date
from dateutil.relativedelta import relativedelta, MO
import argparse
import holidays
import pandas as pd
class BGEHolidays(holidays.HolidayBase):
def _populate(self, year):
holidays.UnitedStates._populate(self, year)
# Remove Martin Luther... | {
"repo_name": "e2thenegpii/EnergyCalc",
"path": "src/TOU.py",
"copies": "1",
"size": "4729",
"license": "mit",
"hash": 4364834852655049700,
"line_mean": 33.268115942,
"line_max": 137,
"alpha_frac": 0.5481074223,
"autogenerated": false,
"ratio": 3.286309937456567,
"config_test": false,
"has_no... |
from enum import Enum
from dateutil import parser as dateparser
from django.core.exceptions import ImproperlyConfigured
from facepy import GraphAPI
from wagtailsocialfeed.utils.conf import get_socialfeed_setting
from . import AbstractFeed, AbstractFeedQuery, FeedItem
class PostType(Enum):
status = 'status'
... | {
"repo_name": "LUKKIEN/wagtailsocialfeed",
"path": "wagtailsocialfeed/utils/feed/facebook.py",
"copies": "1",
"size": "3839",
"license": "bsd-3-clause",
"hash": -682291340058819500,
"line_mean": 28.9921875,
"line_max": 117,
"alpha_frac": 0.55092472,
"autogenerated": false,
"ratio": 4.265555555555... |
from enum import Enum
from .dbc import ItemClass, ItemSubClass, SpellItemEnchantment
_inventory_types = [
None,
"Head",
"Neck",
"Shoulder",
"Shirt",
"Chest",
"Waist",
"Legs",
"Feet",
"Wrist",
"Hands",
"Ring",
"Trinket",
"One-Hand",
"Off-Hand",
"Ranged",... | {
"repo_name": "wowref/wowref.com",
"path": "wowref/wotlk/item_constants.py",
"copies": "1",
"size": "9215",
"license": "mit",
"hash": -8103197163176209000,
"line_mean": 33.7735849057,
"line_max": 104,
"alpha_frac": 0.6701030928,
"autogenerated": false,
"ratio": 2.6897256275539987,
"config_test"... |
from enum import Enum
from .definition import (
GraphQLArgument,
GraphQLEnumType,
GraphQLEnumValue,
GraphQLField,
GraphQLList,
GraphQLNamedType,
GraphQLNonNull,
GraphQLObjectType,
is_abstract_type,
is_enum_type,
is_input_object_type,
is_interface_type,
is_list_type,
... | {
"repo_name": "graphql-python/graphql-core",
"path": "src/graphql/type/introspection.py",
"copies": "1",
"size": "20465",
"license": "mit",
"hash": -5688541852948724000,
"line_mean": 33.7453310696,
"line_max": 87,
"alpha_frac": 0.6185682873,
"autogenerated": false,
"ratio": 4.3737978200470184,
... |
from enum import Enum
from .display import Displayable
from .tags import Taggable
from .schema import Path, Set, List, Dict, Identifier, EnumFromName, Instance
from .item import WearSlot
from .combat import DamageType
class Attribute(Enum):
STRENGTH = 1
AGILITY = 2
VITALITY = 3
INTELLECT = 4
WILLP... | {
"repo_name": "wirefish/amber",
"path": "amber/player.py",
"copies": "1",
"size": "2163",
"license": "bsd-3-clause",
"hash": -8795827171678183000,
"line_mean": 30.347826087,
"line_max": 77,
"alpha_frac": 0.5806749884,
"autogenerated": false,
"ratio": 3.7617391304347825,
"config_test": false,
... |
from enum import Enum
from django.apps import apps
from django.conf import settings as django_settings
from django.db import models
from push import settings
class DeviceOS(Enum):
iOS = 1
Android = 2
class DeviceBase(models.Model):
class Meta:
unique_together = ['device_os', 'push_token']
... | {
"repo_name": "renskiy/django-push-service",
"path": "push/models.py",
"copies": "1",
"size": "1629",
"license": "mit",
"hash": -4702444231491191000,
"line_mean": 25.7049180328,
"line_max": 151,
"alpha_frac": 0.6685082873,
"autogenerated": false,
"ratio": 3.5802197802197804,
"config_test": fals... |
from enum import Enum
from django.conf import settings
from django.utils.translation import npgettext_lazy, pgettext_lazy
from django_prices.templatetags import prices_i18n
from prices import Money
class OrderStatus:
DRAFT = 'draft'
UNFULFILLED = 'unfulfilled'
PARTIALLY_FULFILLED = 'partially fulfilled'
... | {
"repo_name": "UITools/saleor",
"path": "saleor/order/__init__.py",
"copies": "1",
"size": "8246",
"license": "bsd-3-clause",
"hash": 280089479748940000,
"line_mean": 38.8357487923,
"line_max": 77,
"alpha_frac": 0.6184816881,
"autogenerated": false,
"ratio": 3.8586803930744034,
"config_test": f... |
from enum import Enum
from django.contrib.auth.models import Permission
class BasePermissionEnum(Enum):
@property
def codename(self):
return self.value.split(".")[1]
class AccountPermissions(BasePermissionEnum):
MANAGE_USERS = "account.manage_users"
MANAGE_STAFF = "account.manage_staff"
... | {
"repo_name": "maferelo/saleor",
"path": "saleor/core/permissions.py",
"copies": "1",
"size": "2518",
"license": "bsd-3-clause",
"hash": 4328946096381120500,
"line_mean": 22.980952381,
"line_max": 67,
"alpha_frac": 0.7295472597,
"autogenerated": false,
"ratio": 3.9529042386185242,
"config_test"... |
from enum import Enum
from django.contrib.gis.db import models
from django.template.defaulttags import register
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from emstrack.models import UpdatedByModel
from emstrack.util import make_choices
@register.filter
def get_equipment... | {
"repo_name": "EMSTrack/WebServerAndClient",
"path": "equipment/models.py",
"copies": "1",
"size": "4379",
"license": "bsd-3-clause",
"hash": -8893035974613723000,
"line_mean": 28.9931506849,
"line_max": 119,
"alpha_frac": 0.5923726878,
"autogenerated": false,
"ratio": 3.96289592760181,
"config... |
from enum import Enum
from django.db import models
from django.db.models import CASCADE
from django.utils import timezone
class DeleteMixin(object):
"""
Overrides delete and sets `is_deleted=True` instead of deleting object.
Intended to be used with models that have an `is_deleted` field.
"""
de... | {
"repo_name": "b12io/orchestra",
"path": "orchestra/utils/models.py",
"copies": "2",
"size": "4628",
"license": "apache-2.0",
"hash": -2944142676309416400,
"line_mean": 29.4473684211,
"line_max": 79,
"alpha_frac": 0.580812446,
"autogenerated": false,
"ratio": 4.27331486611265,
"config_test": fa... |
from enum import Enum
from django.db.models.expressions import ExpressionList, F
from django.db.models.indexes import IndexExpression
from django.db.models.query_utils import Q
from django.db.models.sql.query import Query
from django.utils.version import PY310
__all__ = ['CheckConstraint', 'Deferrable', 'UniqueConstr... | {
"repo_name": "freakboy3742/django",
"path": "django/db/models/constraints.py",
"copies": "5",
"size": "10281",
"license": "bsd-3-clause",
"hash": -8425404499743501000,
"line_mean": 39.0038910506,
"line_max": 91,
"alpha_frac": 0.6113218559,
"autogenerated": false,
"ratio": 4.389837745516653,
"c... |
from enum import Enum
from django.db.models import Max, Q
import django_workflow.graph
from django_workflow.graph import Graph
from django_workflow.models import State, Transition, Workflow
class NodeType(str, Enum):
APPROVED = "approved"
APPROVAL = "approval"
JUNCTION = "junction"
START = "start"
... | {
"repo_name": "dani0805/django_workflow",
"path": "simple_approval/graph.py",
"copies": "1",
"size": "8875",
"license": "bsd-3-clause",
"hash": 5173774586591746000,
"line_mean": 46.4652406417,
"line_max": 128,
"alpha_frac": 0.4893521127,
"autogenerated": false,
"ratio": 4.713223579394583,
"conf... |
from enum import Enum
from django.db.models.query_utils import Q
from django.db.models.sql.query import Query
__all__ = ['CheckConstraint', 'Deferrable', 'UniqueConstraint']
class BaseConstraint:
def __init__(self, name):
self.name = name
def constraint_sql(self, model, schema_editor):
rais... | {
"repo_name": "wkschwartz/django",
"path": "django/db/models/constraints.py",
"copies": "7",
"size": "7796",
"license": "bsd-3-clause",
"hash": -1456182007969035300,
"line_mean": 38.9794871795,
"line_max": 93,
"alpha_frac": 0.611723961,
"autogenerated": false,
"ratio": 4.232356134636265,
"confi... |
from enum import Enum
from django.utils.translation import pgettext_lazy
class PaymentError(Exception):
def __init__(self, message):
super(PaymentError, self).__init__(message)
self.message = message
class GatewayError(IOError):
pass
class CustomPaymentChoices:
MANUAL = "manual"
... | {
"repo_name": "maferelo/saleor",
"path": "saleor/payment/__init__.py",
"copies": "1",
"size": "3388",
"license": "bsd-3-clause",
"hash": 6717898891659971000,
"line_mean": 32.88,
"line_max": 84,
"alpha_frac": 0.6835891381,
"autogenerated": false,
"ratio": 3.743646408839779,
"config_test": false,... |
from enum import Enum
from django.utils.translation import pgettext_lazy
class ProductAvailabilityStatus(str, Enum):
NOT_PUBLISHED = "not-published"
VARIANTS_MISSSING = "variants-missing"
OUT_OF_STOCK = "out-of-stock"
LOW_STOCK = "low-stock"
NOT_YET_AVAILABLE = "not-yet-available"
READY_FOR_P... | {
"repo_name": "maferelo/saleor",
"path": "saleor/product/__init__.py",
"copies": "1",
"size": "2228",
"license": "bsd-3-clause",
"hash": -2683696387271394300,
"line_mean": 37.4137931034,
"line_max": 77,
"alpha_frac": 0.6741472172,
"autogenerated": false,
"ratio": 4.227703984819734,
"config_test... |
from enum import Enum
from dupescan.criteria._common import ParseError
class Lexer(object):
def __init__(self):
self.text = None
self.pos = 0
self._len = 0
self._start = 0
def start(self, text):
self.text = str(text)
self.pos = 0
self._len = len(self.t... | {
"repo_name": "yellcorp/dupescan",
"path": "dupescan/criteria/lex.py",
"copies": "1",
"size": "3836",
"license": "mit",
"hash": 8373564574668985000,
"line_mean": 26.4,
"line_max": 92,
"alpha_frac": 0.4840980188,
"autogenerated": false,
"ratio": 3.9023397761953205,
"config_test": false,
"has_n... |
from enum import Enum
from eth_utils import keccak, to_canonical_address
from raiden.utils.formatting import to_checksum_address, to_hex_address
from raiden.utils.secrethash import sha256_secrethash
from raiden.utils.typing import (
AdditionalHash,
Address,
BalanceHash,
BlockHash,
BlockNumber,
... | {
"repo_name": "raiden-network/raiden",
"path": "raiden/constants.py",
"copies": "1",
"size": "8042",
"license": "mit",
"hash": 1166738512419104500,
"line_mean": 26.9236111111,
"line_max": 147,
"alpha_frac": 0.7255657797,
"autogenerated": false,
"ratio": 2.965339233038348,
"config_test": true,
... |
from enum import Enum
from .factor import Factor
from .term import Term
class Token:
class Kind(Enum):
OPERATOR = 'operator'
VALUE = 'value'
NAME = 'name'
PYTHON = 'python'
__slots__ = ('token', '_kind', 'source', 'source_start', 'source_end')
def __init__(self, token='... | {
"repo_name": "matthewwardrop/formulaic",
"path": "formulaic/parser/types/token.py",
"copies": "1",
"size": "2661",
"license": "mit",
"hash": 3370397045684816000,
"line_mean": 28.4777777778,
"line_max": 157,
"alpha_frac": 0.5778364116,
"autogenerated": false,
"ratio": 3.689847009735744,
"config... |
from enum import Enum
from fileserver.CsvGenerator import GenerateCsvWithHeader, \
ConvertCsvIntoTable
from fileserver.XmlWorker import GenerateXmlTable, \
ConvertXmlIntoTable
from fileserver.JsonGenerator import GenerateJsonTable, \
DecodeJsonIntoTable
class ResponseFormat(Enum):
csv = 0
xml = ... | {
"repo_name": "opentelega/OpenTelega",
"path": "fileserver/ResponseFormatWorker.py",
"copies": "1",
"size": "1552",
"license": "mit",
"hash": -63082232973260560,
"line_mean": 28.2830188679,
"line_max": 60,
"alpha_frac": 0.7268041237,
"autogenerated": false,
"ratio": 4.335195530726257,
"config_t... |
from enum import Enum
from flask import abort, current_app, url_for
from werkzeug.datastructures import MultiDict
from app import content_loader
from app.main.helpers.framework_helpers import get_lots_by_slug
from app.main.helpers.search_helpers import clean_request_args
from app.main.presenters.search_presenters imp... | {
"repo_name": "alphagov/digitalmarketplace-buyer-frontend",
"path": "app/main/helpers/search_save_helpers.py",
"copies": "1",
"size": "3748",
"license": "mit",
"hash": -66198877802738376,
"line_mean": 45.2716049383,
"line_max": 118,
"alpha_frac": 0.6937033084,
"autogenerated": false,
"ratio": 3.7... |
from enum import Enum
from flask import current_app
JS_ENUMS = {}
JINJA_ENUMS = {}
class RawEnum(Enum):
"""
This is a customized enum class which should be used with a mixin.
The mixin should define the types of each member.
For example:
class Colors(str, RawEnum):
RED = "red"
... | {
"repo_name": "LosFuzzys/CTFd",
"path": "CTFd/constants/__init__.py",
"copies": "4",
"size": "1797",
"license": "apache-2.0",
"hash": 9062401588426142000,
"line_mean": 26.2272727273,
"line_max": 84,
"alpha_frac": 0.6221480245,
"autogenerated": false,
"ratio": 3.9494505494505496,
"config_test": ... |
from enum import Enum
from flask_restful import fields
from flask_restful.fields import Raw, MarshallingException
class RecordingDeviceStatus(Enum):
"""
the status of the recording device.
"""
NEW = 0
INITIALISED = 1
RECORDING = 2
FAILED = 3
class EnumField(Raw):
"""
Marshal an ... | {
"repo_name": "3ll3d00d/vibe",
"path": "backend/src/core/interface.py",
"copies": "1",
"size": "1502",
"license": "mit",
"hash": 2694044943513373000,
"line_mean": 24.05,
"line_max": 116,
"alpha_frac": 0.6830892144,
"autogenerated": false,
"ratio": 3.6904176904176906,
"config_test": false,
"ha... |
from enum import Enum
from grapheme.grapheme_property_group import GraphemePropertyGroup as G
from grapheme.grapheme_property_group import get_group
class FSM:
@classmethod
def default(cls, n):
if n is G.OTHER:
return True, cls.default
if n is G.CR:
return True, cls.c... | {
"repo_name": "alvinlindstam/grapheme",
"path": "grapheme/finder.py",
"copies": "1",
"size": "5687",
"license": "mit",
"hash": 9030305770584322000,
"line_mean": 25.6431924883,
"line_max": 78,
"alpha_frac": 0.5672246696,
"autogenerated": false,
"ratio": 3.31677381648159,
"config_test": false,
... |
from enum import Enum
from graph.pad import Pad
class FilterState(Enum):
"""
This enum contains the various states a filter can be in.
Run Flow:
- Graph manager calls "run" on a filter
- Filter transitions immediately to run_pending
- When the filter completes the transition, it sets interna... | {
"repo_name": "koolspin/rosetta",
"path": "graph/filter_base.py",
"copies": "1",
"size": "9526",
"license": "mit",
"hash": 2823439579050390500,
"line_mean": 34.0220588235,
"line_max": 136,
"alpha_frac": 0.6291203023,
"autogenerated": false,
"ratio": 4.154382904491932,
"config_test": false,
"h... |
from enum import Enum
from grpc_health.v1 import health_pb2 as health_proto
from grpc_health.v1 import health_pb2_grpc as health_grpc
from python_pachyderm.proto.v2.admin import admin_pb2 as admin_proto
from python_pachyderm.proto.v2.admin import admin_pb2_grpc as admin_grpc
from python_pachyderm.proto.v2.auth import ... | {
"repo_name": "kalugny/pypachy",
"path": "src/python_pachyderm/service.py",
"copies": "1",
"size": "3404",
"license": "mit",
"hash": 8350715955383655000,
"line_mean": 32.3725490196,
"line_max": 88,
"alpha_frac": 0.7215041128,
"autogenerated": false,
"ratio": 3.140221402214022,
"config_test": fa... |
from enum import Enum
from historia.enums.dict_enum import DictEnum
from historia.economy.enums import Good
from historia.pops.enums.pop_job import PopJob
class RGOType(DictEnum):
__defaults__ = {
'biomes': None,
'must_be_coast': False
}
# fish_farm = {
# 'title': 'Fish Farm',
... | {
"repo_name": "eranimo/historia",
"path": "historia/economy/enums/rgo_type.py",
"copies": "1",
"size": "1787",
"license": "mit",
"hash": -2908289186372744000,
"line_mean": 24.8985507246,
"line_max": 46,
"alpha_frac": 0.4918858422,
"autogenerated": false,
"ratio": 2.8776167471819645,
"config_tes... |
from enum import Enum
from historia.enums.dict_enum import DictEnum
class Good(DictEnum):
"A physical commodity consumed by Pops"
__exports__ = ['title', 'color']
# Raw
grain = { 'title': 'Grain', 'color': 'yellow' }
# meat = { 'title': 'Meat'}
fish = { 'title': 'Fish', 'color': 'blue' }
#... | {
"repo_name": "eranimo/historia",
"path": "historia/economy/enums/resource.py",
"copies": "1",
"size": "3098",
"license": "mit",
"hash": 5610309315743261000,
"line_mean": 23.015503876,
"line_max": 55,
"alpha_frac": 0.434796643,
"autogenerated": false,
"ratio": 2.8292237442922374,
"config_test":... |
from enum import Enum
from hwt.doc_markers import internal
from hwt.synthesizer.exceptions import TypeConversionErr
class MethodNotOverloaded(NotImplementedError):
pass
@internal
def default_reinterpret_cast_fn(typeFrom, sigOrVal, toType):
raise TypeConversionErr(
"Reinterpretation of %r of type \n... | {
"repo_name": "Nic30/HWToolkit",
"path": "hwt/hdl/types/hdlType.py",
"copies": "1",
"size": "4045",
"license": "mit",
"hash": 7671308155224380000,
"line_mean": 27.8928571429,
"line_max": 77,
"alpha_frac": 0.6027194067,
"autogenerated": false,
"ratio": 3.9310009718172982,
"config_test": false,
... |
from enum import Enum
from idgames.engine import Engine
from idgames.game import Game
class KeyType(Enum):
TEXT = 'text'
BOOL = 'bool'
GAME = 'game'
DIFFICULTY = 'difficulty'
MAP_NUMBER = 'map_number'
DATETIME = 'datetime'
INTEGER = 'integer'
GAME_STYLE = 'game_style'
ENGINE = 'en... | {
"repo_name": "GitExl/DoomIdgamesArchive",
"path": "idgames-extract/src/textparser/textkeys.py",
"copies": "1",
"size": "10193",
"license": "bsd-2-clause",
"hash": -2832879459884650000,
"line_mean": 30.1712538226,
"line_max": 158,
"alpha_frac": 0.4756205239,
"autogenerated": false,
"ratio": 3.262... |
from enum import Enum
from . import Util
class CommandCode(Enum):
BRIGHTNESS = 0
CLEAR = 1
SHOW = 2
COLOR = 3
PIXEL = 4
RECTANGLE = 5
DIGIT = 6
SMALL_TEXT = 7
LARGE_TEXT = 8
IMAGE = 9
ANIMATION = 10
SLEEP = 11
COMPOSITE = 12
DEFINE_IMAGE = 13
DEFINE_ANIMATION = 14
SET_LAYER = 15
CLEAR_LAYER = 16
SE... | {
"repo_name": "janvdb-eu/rpi-rgb-led-matrix-server",
"path": "src/python/led_matrix_client/Command.py",
"copies": "1",
"size": "3575",
"license": "apache-2.0",
"hash": 6245221194741160000,
"line_mean": 28.3032786885,
"line_max": 113,
"alpha_frac": 0.7446153846,
"autogenerated": false,
"ratio": 2.... |
from enum import Enum
from ._ingenialink import ffi, lib
from ._utils import cstr, pstr, INT_SIZES
from .dict_labels import LabelsDictionary
# CANOPEN DTYPES
IL_REG_DTYPE_DOMAIN = 15
class REG_DTYPE(Enum):
"""
Data Type.
"""
U8 = lib.IL_REG_DTYPE_U8
""" Unsigned 8-bit integer. """
S8 = lib.... | {
"repo_name": "ingeniamc/ingenialink-python",
"path": "ingenialink/registers.py",
"copies": "1",
"size": "14518",
"license": "mit",
"hash": 4047750381290708000,
"line_mean": 27.7445544554,
"line_max": 79,
"alpha_frac": 0.5129512262,
"autogenerated": false,
"ratio": 3.74896694214876,
"config_tes... |
from enum import Enum
from ._ingenialink import ffi, lib
from ._utils import *
from .registers import Register, REG_DTYPE, dtype_size, REG_ACCESS
from .net import Network, NET_PROT
from .dict_ import Dictionary
from .const import *
import xml.etree.ElementTree as ET
from xml.dom import minidom
import time
import io
... | {
"repo_name": "ingeniamc/ingenialink-python",
"path": "ingenialink/servo.py",
"copies": "1",
"size": "34798",
"license": "mit",
"hash": 4281381419024468000,
"line_mean": 26.8161470823,
"line_max": 127,
"alpha_frac": 0.5376171044,
"autogenerated": false,
"ratio": 3.6255469889560326,
"config_test... |
from enum import Enum
from .._ingenialink import lib
from .._utils import *
from ..registers import REG_DTYPE, REG_ACCESS, REG_PHY
class Register(object):
""" Register.
Args:
identifier (str): Identifier.
units (str): Units.
address (int): Address.
dtype (REG_DTYPE): Data ty... | {
"repo_name": "ingeniamc/ingenialink-python",
"path": "ingenialink/canopen/registers.py",
"copies": "1",
"size": "8273",
"license": "mit",
"hash": -6144176846815426000,
"line_mean": 30.4562737643,
"line_max": 75,
"alpha_frac": 0.5401909827,
"autogenerated": false,
"ratio": 3.8247803975959314,
"... |
from enum import Enum
from jqdata import *
import numpy as np
import pandas as pd
import talib as ta
from math import floor
try:
import shipane_sdk
except:
pass
class Status(Enum):
INIT = 0 # 在每天交易开始时,置为INIT
WORKING = 1 # 处于买/卖中
NONE = 2 # 今天不再做任何交易
class Type(Enum):
Active_Buy = "主动买入"
... | {
"repo_name": "LoveYakamoz/Quantitative_Trading",
"path": "joinQuant/T_0/Active_Buy.py",
"copies": "2",
"size": "20805",
"license": "apache-2.0",
"hash": 1414179974695706400,
"line_mean": 31.9300341297,
"line_max": 149,
"alpha_frac": 0.5434005286,
"autogenerated": false,
"ratio": 2.84490638360607... |
from enum import Enum
from kivy.lang import Builder
from kivy.uix.screenmanager import Screen
import yahtr.ui.selectable_recycle_box_layout # force import needed for kv files :(
import yahtr.ui.hex_grid # force import needed for kv files :(
import yahtr.ui.editor.board_editor # force import needed for kv files :(
... | {
"repo_name": "fp12/yahtr",
"path": "yahtr/ui/screens/editor.py",
"copies": "1",
"size": "1705",
"license": "mit",
"hash": 7517015987824250000,
"line_mean": 29.4464285714,
"line_max": 99,
"alpha_frac": 0.6434017595,
"autogenerated": false,
"ratio": 3.330078125,
"config_test": false,
"has_no_k... |
from enum import Enum
from kivy.properties import NumericProperty, ListProperty
from kivy.animation import Animation
from yahtr.core.hex_lib import hex_angle, index_of_direction
from yahtr.data.skill_template import MoveType
from yahtr.utils import Color
from yahtr.utils.event import Event
from yahtr.data.actions im... | {
"repo_name": "fp12/yahtr",
"path": "yahtr/ui/piece.py",
"copies": "1",
"size": "16043",
"license": "mit",
"hash": -3748742322795843000,
"line_mean": 39.9260204082,
"line_max": 147,
"alpha_frac": 0.532880384,
"autogenerated": false,
"ratio": 3.505134367489622,
"config_test": false,
"has_no_ke... |
from enum import Enum
from kivy.uix.relativelayout import RelativeLayout
from yahtr.utils.event import Event
class ReachableToggleType(Enum):
selected = 0
others = 1
class SelectedReachableMode(Enum):
on = 0
off = 1
def next(self):
return SelectedReachableMode.off if self is SelectedR... | {
"repo_name": "fp12/yahtr",
"path": "yahtr/ui/game_options.py",
"copies": "1",
"size": "1557",
"license": "mit",
"hash": 4826558376792779000,
"line_mean": 30.14,
"line_max": 106,
"alpha_frac": 0.7084136159,
"autogenerated": false,
"ratio": 3.498876404494382,
"config_test": false,
"has_no_keyw... |
from enum import Enum
from kotj import resource
class State(Enum):
HAPPY = 1
UNHAPPY = 2
REBELLING = 3
DEAD = 4
class Skill(Enum):
CHOPPING = 1
MINING = 2
HUNTING = 3
class Villager:
def __init__(self):
self.tickCount = 0
self.ate = False
self.drank = False
... | {
"repo_name": "ldesrosi/king-of-the-jungle",
"path": "kotj/villager.py",
"copies": "1",
"size": "2087",
"license": "mit",
"hash": 6734538680822227000,
"line_mean": 24.4512195122,
"line_max": 87,
"alpha_frac": 0.5491135601,
"autogenerated": false,
"ratio": 3.8223443223443225,
"config_test": fals... |
from enum import Enum
from .loader import Loadable
from .schema import EnumFromName, Identifier, Dict
from .display import Displayable
from .tags import Taggable
from .size import Size
from .combat import DamageType, Attack
class WieldSlot(Enum):
MAIN_HAND = 1
OFF_HAND = 2
EITHER_HAND = 3
TWO_HANDS = ... | {
"repo_name": "wirefish/amber",
"path": "amber/item.py",
"copies": "1",
"size": "1834",
"license": "bsd-3-clause",
"hash": -1617192208156713000,
"line_mean": 23.4533333333,
"line_max": 74,
"alpha_frac": 0.5757906216,
"autogenerated": false,
"ratio": 3.3713235294117645,
"config_test": false,
"... |
from enum import Enum
from .loader import Loadable
from .schema import EnumFromName, Identifier, Path, List, Dict
from .display import Displayable
from .tags import Taggable
from .size import Size
from .combat import DamageType, Combatant
from .behavior import Behavior
class Vendor(Loadable):
SCHEMA = {
... | {
"repo_name": "wirefish/amber",
"path": "amber/creature.py",
"copies": "1",
"size": "1493",
"license": "bsd-3-clause",
"hash": 7637538312922130000,
"line_mean": 26.1454545455,
"line_max": 85,
"alpha_frac": 0.5941058272,
"autogenerated": false,
"ratio": 3.504694835680751,
"config_test": false,
... |
from enum import Enum
from _messages_pb2 import *
class GatewayMessageFactoryError(Exception):
pass
class GatewayMessageFactory:
def __init__(self):
self._messageMap = {
LOGIN_REQUEST: LoginRequestMessage,
LOGIN_RESPONSE: LoginResponseMessage
}
def encodeMess... | {
"repo_name": "jseward/solaron",
"path": "solaron/gateway/_message_factory.py",
"copies": "1",
"size": "1806",
"license": "mit",
"hash": -4464902751096002000,
"line_mean": 27.6666666667,
"line_max": 123,
"alpha_frac": 0.6428571429,
"autogenerated": false,
"ratio": 4.481389578163772,
"config_tes... |
from enum import Enum
from microcosm.api import defaults, typed
from microcosm.config.types import boolean
from microcosm.errors import NotBoundError
from microcosm_logging.timing import elapsed_time
@defaults(
enabled=typed(boolean, default_value=True)
)
class PostgresStoreMetrics:
"""
Send metrics rega... | {
"repo_name": "globality-corp/microcosm-postgres",
"path": "microcosm_postgres/metrics.py",
"copies": "1",
"size": "2369",
"license": "apache-2.0",
"hash": -6471950890709530000,
"line_mean": 24.75,
"line_max": 75,
"alpha_frac": 0.5331363444,
"autogenerated": false,
"ratio": 4.691089108910891,
"... |
from enum import Enum
from modules.complicated_wires_common import WireColor
class _Instructions(Enum):
C = "C"
D = "D"
S = "S"
P = "P"
B = "B"
# Module state is a tuple of 4 bools: (red, blue, star, led)
_ModuleStateToInstruction = {
(True, True, True, True): _Instructions.D,
(True, Tr... | {
"repo_name": "FuegoFro/KeepTalkingBot",
"path": "src/modules/complicated_wires_solution.py",
"copies": "1",
"size": "1728",
"license": "mit",
"hash": -5945623352114295000,
"line_mean": 32.8823529412,
"line_max": 75,
"alpha_frac": 0.6423611111,
"autogenerated": false,
"ratio": 3.2914285714285714,... |
from enum import Enum
from netbox_api.model.common import CustomFields
class DeviceStatusConstant(Enum):
OFFLINE = 0
ACTIVE = 1
PLANNED = 2
STAGED = 3
FAILED = 4
INVENTORY = 5
class RackFaceConstant(Enum):
FRONT = 0
REAR = 1
class Manufacturer(object):
def __init__(self, id=No... | {
"repo_name": "zinic/netbox_api",
"path": "netbox_api/model/device.py",
"copies": "1",
"size": "5264",
"license": "mit",
"hash": 2588954107764261000,
"line_mean": 23.7136150235,
"line_max": 119,
"alpha_frac": 0.5837765957,
"autogenerated": false,
"ratio": 3.8144927536231883,
"config_test": fals... |
from enum import Enum
from netbox_api.model.common import CustomFields
class InterfaceOrderConstant(Enum):
BY_RACK_POSITION = 1
BY_NAME_ALPHABETICALLY = 2
class SubdeviceTypeConstant(Enum):
NONE = 'None'
PARENT = 'Parent'
CHILD = 'Child'
class DeviceTypeManufacturer(object):
def __init__(... | {
"repo_name": "zinic/netbox_api",
"path": "netbox_api/model/device_type.py",
"copies": "1",
"size": "2032",
"license": "mit",
"hash": 7907323510868591000,
"line_mean": 28.0285714286,
"line_max": 118,
"alpha_frac": 0.6328740157,
"autogenerated": false,
"ratio": 3.791044776119403,
"config_test": ... |
from enum import Enum
from PyEngine3D.Common import logger
from PyEngine3D.Utilities import *
class BlendMode(Enum):
BLEND = 0
ADDITIVE = 1
MULTIPLY = 2
SUBTRACT = 3
class RenderOption:
RENDER_LIGHT_PROBE = False
RENDER_ONLY_ATMOSPHERE = False
RENDER_FONT = True
RENDER_STATIC_ACTOR ... | {
"repo_name": "ubuntunux/GuineaPig",
"path": "PyEngine3D/Render/RenderOptions.py",
"copies": "1",
"size": "1213",
"license": "bsd-2-clause",
"hash": -9077565226619312000,
"line_mean": 20.2807017544,
"line_max": 81,
"alpha_frac": 0.6537510305,
"autogenerated": false,
"ratio": 3.314207650273224,
... |
from enum import Enum
from pygame.constants import K_q, K_a
from controllers import user_controller, neural_network_controller, logical_controller
class ControllerTypes(Enum):
USER = "User"
LOGICAL_AI = "Logical AI"
LEARNING_AI = "Learning AI"
class Setting:
def __init__(self):
self.boardW... | {
"repo_name": "asaladino/pong-p",
"path": "src/models/setting.py",
"copies": "1",
"size": "1396",
"license": "mit",
"hash": 8892468404457197000,
"line_mean": 34.7948717949,
"line_max": 107,
"alpha_frac": 0.7098853868,
"autogenerated": false,
"ratio": 3.9213483146067416,
"config_test": false,
... |
from enum import Enum
from pyha.common.const import Const
from pyha.common.hwsim import HW
from pyha.common.sfix import Sfix, resize, left_index, right_index, fixed_truncate, fixed_wrap
from pyha.simulation.simulation_interface import assert_sim_match, SIM_HW_MODEL, SIM_MODEL, SIM_RTL, SIM_GATE, \
plot_assert_sim_... | {
"repo_name": "petspats/pyhacores",
"path": "under_construction/experiments/experiment.py",
"copies": "1",
"size": "4868",
"license": "apache-2.0",
"hash": -3493382410335765000,
"line_mean": 27.3081395349,
"line_max": 112,
"alpha_frac": 0.5544371405,
"autogenerated": false,
"ratio": 2.99569230769... |
from enum import Enum
from PyQt5.QtWidgets import QDialog, QFileDialog, QMessageBox
from sakia.decorators import asyncify
from sakia.gui.widgets.dialogs import QAsyncMessageBox
from .revocation_uic import Ui_RevocationDialog
class RevocationView(QDialog, Ui_RevocationDialog):
"""
Home screen view
"""
... | {
"repo_name": "ucoin-io/cutecoin",
"path": "src/sakia/gui/dialogs/revocation/view.py",
"copies": "3",
"size": "5308",
"license": "mit",
"hash": 6656916554597239000,
"line_mean": 39.8307692308,
"line_max": 133,
"alpha_frac": 0.5945742276,
"autogenerated": false,
"ratio": 4.260032102728732,
"conf... |
from enum import Enum
from pyspark import keyword_only
from pyspark.ml.param.shared import HasInputCol, HasOutputCol
from pyspark.ml.util import JavaMLReadable
from pyspark.ml.util import JavaMLWritable
from pyspark.ml.util import _jvm
from pyspark.ml.wrapper import JavaTransformer
from mleap.pyspark.py2scala import ... | {
"repo_name": "combust/mleap",
"path": "python/mleap/pyspark/feature/math_unary.py",
"copies": "2",
"size": "2709",
"license": "apache-2.0",
"hash": -4705668041898495000,
"line_mean": 32.4444444444,
"line_max": 106,
"alpha_frac": 0.6448874123,
"autogenerated": false,
"ratio": 4.110773899848255,
... |
from enum import Enum
from pyspark import keyword_only
from pyspark.ml.param.shared import HasInputCol
from pyspark.ml.param.shared import HasOutputCol
from pyspark.ml.param.shared import Param
from pyspark.ml.param.shared import Params
from pyspark.ml.param.shared import TypeConverters
from pyspark.ml.util import Jav... | {
"repo_name": "combust/mleap",
"path": "python/mleap/pyspark/feature/math_binary.py",
"copies": "1",
"size": "4769",
"license": "apache-2.0",
"hash": -686449616690893200,
"line_mean": 34.0661764706,
"line_max": 88,
"alpha_frac": 0.6376598868,
"autogenerated": false,
"ratio": 4.157802964254577,
... |
from enum import Enum
from pystarling.api_objects.transactions.BaseTransaction import BaseTransaction
class DirectDebitType(Enum):
FIRST_PAYMENT_OF_DIRECT_DEBIT = 'First Payment of Direct Debit'
DEBIT_ROUTING_DATA_MACHINE_READ_FROM_MAGNETIC_STRIP = 'Debit Routing Data Machine Read From Magnetic Strip'
CL... | {
"repo_name": "rdcrt/pystarling",
"path": "pystarling/api_objects/transactions/TransactionDirectDebit.py",
"copies": "1",
"size": "1395",
"license": "mit",
"hash": -3080187327783413000,
"line_mean": 45.5,
"line_max": 111,
"alpha_frac": 0.7390681004,
"autogenerated": false,
"ratio": 3.229166666666... |
from enum import Enum
from pystarling.api_objects.transactions.BaseTransaction import BaseTransaction
class MasterCardTransactionMethod(Enum):
CONTACTLESS = "Contactless"
MAGNETIC_STRIP = "Magnetic Strip"
MANUAL_KEY_ENTRY = "Manual Key Entry"
CHIP_AND_PIN = "Chip and Pin"
ONLINE = "Online"
AT... | {
"repo_name": "rdcrt/pystarling",
"path": "pystarling/api_objects/transactions/TransactionMastercard.py",
"copies": "1",
"size": "1132",
"license": "mit",
"hash": 797128988061833000,
"line_mean": 31.3428571429,
"line_max": 98,
"alpha_frac": 0.6899293286,
"autogenerated": false,
"ratio": 3.6993464... |
from enum import Enum
from pytech.utils.exceptions import (InvalidActionError,
InvalidOrderStatusError,
InvalidOrderSubTypeError,
InvalidOrderTypeError,
InvalidPositionErr... | {
"repo_name": "kprestel/PyInvestment",
"path": "pytech/utils/enums.py",
"copies": "2",
"size": "3378",
"license": "mit",
"hash": 7544969823331227000,
"line_mean": 23.3021582734,
"line_max": 63,
"alpha_frac": 0.5331557134,
"autogenerated": false,
"ratio": 4.319693094629156,
"config_test": false,... |
from enum import Enum
from rdr_service.model.bq_base import BQTable, BQSchema, BQView, BQField, BQFieldTypeEnum, BQFieldModeEnum
from rdr_service.model.bq_site import BQObsoleteStatusEnum
# TODO: Revert to using participant_enums.py when they have been updated to Python 3.7 Enum classes.
class BQOrganizationTypeEnum... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/model/bq_hpo.py",
"copies": "1",
"size": "2029",
"license": "bsd-3-clause",
"hash": -3769452359320105000,
"line_mean": 43.1086956522,
"line_max": 109,
"alpha_frac": 0.7028092656,
"autogenerated": false,
"ratio": 3.326229508196721... |
from enum import Enum
from rdr_service.model.bq_base import BQTable, BQSchema, BQView, BQField, BQFieldTypeEnum, BQFieldModeEnum
# TODO: Revert to using site_enums.py when they have been updated to Python 3.7 Enum classes.
class BQSiteStatus(Enum):
""" The active scheduling status of a site. """
UNSET = 0
... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/model/bq_site.py",
"copies": "1",
"size": "4993",
"license": "bsd-3-clause",
"hash": -8362592842213205000,
"line_mean": 52.1170212766,
"line_max": 118,
"alpha_frac": 0.7198077308,
"autogenerated": false,
"ratio": 3.31100795755968... |
from enum import Enum
from rllab.misc.tabulate import tabulate
from rllab.misc.console import mkdir_p, colorize
from rllab.misc.autoargs import get_all_parameters
from contextlib import contextmanager
import numpy as np
import os
import os.path as osp
import sys
import datetime
import dateutil.tz
import csv
import job... | {
"repo_name": "brain-research/mirage-rl-qprop",
"path": "rllab/misc/logger.py",
"copies": "1",
"size": "12813",
"license": "mit",
"hash": -2456481816018427400,
"line_mean": 31.3560606061,
"line_max": 107,
"alpha_frac": 0.6029813471,
"autogenerated": false,
"ratio": 3.3099974166881942,
"config_t... |
from enum import Enum
from rv.api import Project, Synth, m, read_sunvox_file
class ModulePolyphonist(object):
def __init__(self, module):
if isinstance(module, str):
module = read_sunvox_file(module).module
elif isinstance(module, Synth):
module = module.module
el... | {
"repo_name": "metrasynth/solar-flares",
"path": "sf/polyphonist/module.py",
"copies": "1",
"size": "3393",
"license": "mit",
"hash": -8656829853182026000,
"line_mean": 39.8795180723,
"line_max": 76,
"alpha_frac": 0.5249042146,
"autogenerated": false,
"ratio": 3.855681818181818,
"config_test": ... |
from enum import Enum
from ..saltlib import SaltLib
from ..saltlib import BadEncryptedDataException, BadSignatureException
from ..channel import ByteChannel
from .packets import EncryptedPacket, TTPacket
from ..exceptions import BadPeer
class Role(Enum):
"""Role of this peer of the encrypted channel. Used for no... | {
"repo_name": "assaabloy-ppi/salt-channel-python",
"path": "saltchannel/v2/encrypted_channel_v2.py",
"copies": "1",
"size": "3435",
"license": "mit",
"hash": 1737669315098687200,
"line_mean": 34.412371134,
"line_max": 104,
"alpha_frac": 0.6459970888,
"autogenerated": false,
"ratio": 3.72559652928... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.