Go on your labels page https://github.com/user/repo/labels Paste export or import script into console Press Enter to run
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
| def select_fields_from_schema(schema: BaseModel, queryset: QuerySet, extend_include: list[str], exclude: list[str]): | |
| fields = set(schema.model_fields.keys()) | |
| if extend_include: | |
| fields = fields.union(extend_include) | |
| if exclude: | |
| fields = fields.difference(exclude) | |
| queryset_model_fields = [f.name for f in queryset.model._meta.get_fields() if f.concrete] | |
| fields = fields.intersection(queryset_model_fields) | |
| return queryset.values(*fields) |
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
| @pytest.fixture() | |
| def patch_cls(monkeypatch): | |
| def do_patch_cls(cls: type, mock: Any = None): | |
| if mock is None: | |
| mock = MagicMock(spec=cls) | |
| def mock__new__(_cls, *_args, **_kwargs): | |
| return mock | |
| cls__new__ = cls.__new__ |
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
| **/__pycache__/ | |
| **/.mypy_cache | |
| .pytest_cache | |
| **/.pytest_cache | |
| **/.tox | |
| **/.vscode | |
| **/.idea | |
| **/.coverage | |
| **/.DS_Store | |
| **/.eggs |
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 electroncash.commands import command, Commands | |
| fullname = 'Get tx height' | |
| description = 'Provides get_tx_height command for rpc daemon' | |
| @command('') | |
| def get_tx_height(self, tx_hash): | |
| height, conf, timestamp = self.wallet.get_tx_height(tx_hash) | |
| # noinspection PyProtectedMember |
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 electrum.commands import command, Commands | |
| fullname = 'Get tx height' | |
| description = 'Provides get_tx_height command for rpc daemon' | |
| @command('') | |
| def get_tx_height(self, tx_hash): | |
| tx_mined_status = self.wallet.get_tx_height(tx_hash) | |
| # noinspection PyProtectedMember |
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
| 000.0x1f4b0.com | |
| 001.0x1f4b0.com | |
| 002.0x1f4b0.com | |
| 003.0x1f4b0.com | |
| 004.0x1f4b0.com | |
| 005.0x1f4b0.com | |
| 006.0x1f4b0.com | |
| 007.0x1f4b0.com | |
| 008.0x1f4b0.com | |
| 009.0x1f4b0.com |
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 setuptools import setup | |
| from pipenv.project import Project | |
| from pipenv.utils import convert_deps_to_pip | |
| def get_packages_from_Pipfile(): | |
| pipfile = Project(chdir=False).parsed_pipfile | |
| return convert_deps_to_pip(pipfile['packages'], r=False) |
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
| """ | |
| Exports Issues from a specified repository to a json files | |
| Uses basic authentication (Github username + password) to retrieve Issues | |
| from a repository that username has access to. Supports Github API v3. | |
| """ | |
| import json | |
| import requests |
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 bson.objectid import ObjectId | |
| class ObjectIDConverter: | |
| regex = '[0-9A-Fa-f]{24}' | |
| def to_python(self, value): | |
| if ObjectId.is_valid(value): | |
| return value | |
| raise ValueError() |
NewerOlder