This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import builtins | |
| import io | |
| import sys | |
| import types | |
| from ctypes import py_object | |
| #from forbiddenfruit import curse | |
| from typing import Never, Type, Optional, Any, Callable | |
| class __MISSING_BASE(type):... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # !!! Any check checks for they are not the same | |
| from typing import Mapping | |
| class __X(type):... | |
| class MISSING(__X, metaclass=__X): | |
| def __new__(cls, *args, **kwargs): | |
| return cls | |
| def __init__(self, *args, **kwargs):... | |
| MISSING.__class__ = MISSING |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Callable | |
| from random import choices | |
| from itertools import permutations | |
| registry: dict[type, tuple[type, Callable, Callable]] = {} # old: (new, ori_init, ori_init_subclass) | |
| rev_registry: dict[type, type] = {} | |
| __lock: bool = False | |
| __inner: bool = False | |
| def get_latest_from_reg(cls: type): | |
| while cls in registry: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Callable, Coroutine, Type, TypeVar, Self, overload, Any, Optional, Generic, ParamSpec | |
| K = TypeVar("K", bound=Item) | |
| R = TypeVar("R", bound="BaseOnboardingDynamicItem") | |
| P = ParamSpec("P") | |
| class BaseOnboardingDynamicItem(DynamicItem[K], Generic[K], template=r"onboarding::(\d+)::(\d+)::[a-zA-Z\d_]*::(\d+)"): | |
| ACTIONS: dict[Type["BaseOnboardingDynamicItem"], str] = {} | |
| generate_appearance: Callable[[P], ...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "latest-preset": { | |
| "theme": "seti", | |
| "backgroundColor": "#ADB7C1", | |
| "windowTheme": "none", | |
| "windowControls": true, | |
| "fontFamily": "Hack", | |
| "fontSize": "11px", | |
| "lineNumbers": true, | |
| "firstLineNumber": 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| using System.IO; | |
| namespace D10 | |
| { | |
| internal class Program | |
| { | |
| static int P1(string[] d, int r = -1, int c = -1, Tuple<int, int>[] prev = null) => prev == null | |
| ? Enumerable.Range(0, d.Length) | |
| .Where(nr => d[nr] != "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| GNU GENERAL PUBLIC LICENSE | |
| Version 3, 29 June 2007 | |
| Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> | |
| Everyone is permitted to copy and distribute verbatim copies | |
| of this license document, but changing it is not allowed. | |
| Preamble |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| import decimal | |
| from typing import Union, Optional, Mapping | |
| class Node: | |
| def __init__(self, name: str, connection: Optional[Mapping[Union[str, Node], Union[float, int, decimal.Decimal]]]): | |
| self.name = name | |
| self.connection: dict[str, Union[float, int, decimal.Decimal]] = \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import traceback | |
| from typing import Callable | |
| COMPILING = 'hi.py' | |
| OUT = 'out-hi.py' | |
| # Normal style | |
| repr_1 = '-~(()<())' | |
| num_repr = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import traceback | |
| from typing import Callable | |
| # Normal style | |
| repr_1 = '-~(()<())' | |
| num_repr = { | |
| 0: f'({repr_1}>>{repr_1})', | |
| 1: f'{repr_1}', | |
| 2: f'({repr_1}<<{repr_1})', |
NewerOlder