in_source_id
stringlengths
13
58
issue
stringlengths
3
241k
before_files
listlengths
0
3
after_files
listlengths
0
3
pr_diff
stringlengths
109
107M
⌀
DataBiosphere__toil-2834
Example script duplicated `examples/hello.py` and `src/toil/test/docs/scripts/tutorial_arguments.py` are duplicate scripts with the same contents. ┆Issue is synchronized with this [Jira Task](https://ucsc-cgl.atlassian.net/browse/TOIL-443) ┆Issue Number: TOIL-443
[ { "content": "from toil.common import Toil\nfrom toil.job import Job\n\nclass HelloWorld(Job):\n def __init__(self, message):\n Job.__init__(self, memory=\"1G\", cores=2, disk=\"2G\")\n self.message = message\n\n def run(self, fileStore):\n return \"Hello, world!, here's a message: %...
[ { "content": null, "path": "examples/hello.py" } ]
diff --git a/examples b/examples new file mode 120000 index 0000000000..475efb5a79 --- /dev/null +++ b/examples @@ -0,0 +1 @@ +src/toil/test/docs/scripts/ \ No newline at end of file diff --git a/examples/hello.py b/examples/hello.py deleted file mode 100644 index 6ca4b13734..0000000000 --- a/examples/hello.py +++ /dev...
python__peps-2090
"PEP numbers never change" verbiage is not in PEP 1 ## Problem The introduction to PEP 0 references PEP 1 as a source for > PEP numbers are assigned by the PEP editors, and once assigned are never changed [1]. But PEP 1 doesn't say anything about PEP numbers never changing. ## Research While skimming PEP...
[ { "content": "# -*- coding: utf-8 -*-\ntext_type = str\ntitle_length = 55\nauthor_length = 40\ntable_separator = \"== ==== \" + \"=\"*title_length + \" \" + \"=\"*author_length\ncolumn_format = (\n '%(type)1s%(status)1s %(number)4s %(title)-{title_length}s %(authors)-s'\n).format(title_length=title_length)...
[ { "content": "# -*- coding: utf-8 -*-\ntext_type = str\ntitle_length = 55\nauthor_length = 40\ntable_separator = \"== ==== \" + \"=\"*title_length + \" \" + \"=\"*author_length\ncolumn_format = (\n '%(type)1s%(status)1s %(number)4s %(title)-{title_length}s %(authors)-s'\n).format(title_length=title_length)...
diff --git a/pep0/constants.py b/pep0/constants.py index e40293f44a9..108710d0927 100644 --- a/pep0/constants.py +++ b/pep0/constants.py @@ -21,8 +21,8 @@ intro = """\ This PEP contains the index of all Python Enhancement Proposals, -known as PEPs. PEP numbers are assigned by the PEP editors, and -once assigned ar...
DjangoGirls__djangogirls-409
[Check-in emails] Wait at least a week before sending an email I've just deployed an event that will happen in March: 5 min after that, the organizer received a check-in email :smile: We should at least wait a week before sending a check-in emails.
[ { "content": "\"\"\"Management command for handling of automatic emails.\n\nThis is run via a scheduled task every hour and checks if there are any emails that need sending.\n\n\"\"\"\nimport logging\nfrom smtplib import SMTPException\n\nimport djclick as click\nfrom django.conf import settings\nfrom django.cor...
[ { "content": "\"\"\"Management command for handling of automatic emails.\n\nThis is run via a scheduled task every hour and checks if there are any emails that need sending.\n\n\"\"\"\nimport logging\nfrom smtplib import SMTPException\n\nimport djclick as click\nfrom django.conf import settings\nfrom django.cor...
diff --git a/core/management/commands/handle_emails.py b/core/management/commands/handle_emails.py index 8229647ee..aea4d0a57 100644 --- a/core/management/commands/handle_emails.py +++ b/core/management/commands/handle_emails.py @@ -104,6 +104,7 @@ def send_offer_help_emails(): is_on_homepage=True, da...
voxel51__fiftyone-1859
[BUG] tfrecord shard enumeration starting from 1 instead of 0 ### System information - **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Arch Linux - **FiftyOne installed from (pip or source)**: pip - **FiftyOne version (run `fiftyone --version`)**: v0.16.2 - **Python version**: 3.10.4 ### C...
[ { "content": "\"\"\"\nTensorFlow utilities.\n\n| Copyright 2017-2022, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport contextlib\nimport logging\nimport multiprocessing\nimport os\nimport warnings\n\nimport cv2\nimport numpy as np\nfrom skimage.color import rgba2rgb\n\nimport eta.core....
[ { "content": "\"\"\"\nTensorFlow utilities.\n\n| Copyright 2017-2022, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport contextlib\nimport logging\nimport multiprocessing\nimport os\nimport warnings\n\nimport cv2\nimport numpy as np\nfrom skimage.color import rgba2rgb\n\nimport eta.core....
diff --git a/fiftyone/utils/tf.py b/fiftyone/utils/tf.py index 13c55e644c0..58e755cc75b 100644 --- a/fiftyone/utils/tf.py +++ b/fiftyone/utils/tf.py @@ -249,7 +249,7 @@ def __enter__(self): tf_records_patt = self.tf_records_path + "-%05d-of-%05d" tf_records_paths = [ tf_record...
vyperlang__vyper-3010
CBOR section at end should include length indicator like in Solidity ## Simple Summary PR #2860 introduced a CBOR section at the end of Vyper bytecode, like Solidity has. However, unlike in Solidity, there's nothing to indicate the length of this CBOR section. While it's easy enough to recognize the fixed format u...
[ { "content": "import copy\nimport functools\nimport math\n\nfrom vyper.codegen.ir_node import IRnode\nfrom vyper.evm.opcodes import get_opcodes\nfrom vyper.exceptions import CodegenPanic, CompilerPanic\nfrom vyper.utils import MemoryPositions\nfrom vyper.version import version_tuple\n\nPUSH_OFFSET = 0x5F\nDUP_O...
[ { "content": "import copy\nimport functools\nimport math\n\nfrom vyper.codegen.ir_node import IRnode\nfrom vyper.evm.opcodes import get_opcodes\nfrom vyper.exceptions import CodegenPanic, CompilerPanic\nfrom vyper.utils import MemoryPositions\nfrom vyper.version import version_tuple\n\nPUSH_OFFSET = 0x5F\nDUP_O...
diff --git a/vyper/ir/compile_ir.py b/vyper/ir/compile_ir.py index 9a2661fe6b..dd1a0b45d3 100644 --- a/vyper/ir/compile_ir.py +++ b/vyper/ir/compile_ir.py @@ -994,6 +994,7 @@ def assembly_to_evm(assembly, pc_ofst=0, insert_vyper_signature=False): if insert_vyper_signature: # CBOR encoded: {"vyper": [major...
hpcaitech__ColossalAI-5342
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "import importlib\nimport os\nimport time\nfrom abc import abstractmethod\nfrom pathlib import Path\nfrom typing import List\n\nfrom .base_extension import _Extension\n\n__all__ = [\"_CppExtension\"]\n\n\nclass _CppExtension(_Extension):\n def __init__(self, name: str, priority: int = 1):\n ...
[ { "content": "import importlib\nimport os\nimport time\nfrom abc import abstractmethod\nfrom pathlib import Path\nfrom typing import List\n\nfrom .base_extension import _Extension\n\n__all__ = [\"_CppExtension\"]\n\n\nclass _CppExtension(_Extension):\n def __init__(self, name: str, priority: int = 1):\n ...
diff --git a/extensions/cpp_extension.py b/extensions/cpp_extension.py index b4c40c9f1105..3adb65fb8f4e 100644 --- a/extensions/cpp_extension.py +++ b/extensions/cpp_extension.py @@ -126,7 +126,7 @@ def cxx_flags(self) -> List[str]: def load(self): try: op_kernel = self.import_op() - e...
kubeflow__pipelines-6683
[sdk] dependency conflict with tensorflow 2.6.0 and seldon-core ### Environment * KFP version: 1.7 * KFP SDK version: 1.8.3 * All dependencies version: ``` [~]$ pip list | grep kfp kfp 1.8.3 kfp-pipeline-spec 0.1.11 kfp-server-api 1.7.0 ...
[ { "content": "# Copyright 2018 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ { "content": "# Copyright 2018 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
diff --git a/sdk/RELEASE.md b/sdk/RELEASE.md index 4ed40322a2a..3018a2e86d9 100644 --- a/sdk/RELEASE.md +++ b/sdk/RELEASE.md @@ -13,6 +13,7 @@ ## Bug Fixes and Other Changes * Fix executor getting None as value when float 0 is passed in. [\#6682](https://github.com/kubeflow/pipelines/pull/6682) +* Depends on `typin...
pretix__pretix-558
Voucher not being counted correctly In the voucher by tag overview, the number sometimes just don't add up ;-) ![image](https://user-images.githubusercontent.com/654548/28206928-1c7ff030-6888-11e7-8891-14e5c794e730.png) So the progressbar is showing nothing, because it's class is set to 200%. Okay, that's kinda e...
[ { "content": "import csv\nimport io\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.urlresolvers import resolve, reverse\nfrom django.db import transaction\nfrom django.db.models import Count, Q, Sum\nfrom django.http import (\n Http404, HttpResponse, HttpResponseBa...
[ { "content": "import csv\nimport io\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.urlresolvers import resolve, reverse\nfrom django.db import transaction\nfrom django.db.models import Count, Q, Sum\nfrom django.http import (\n Http404, HttpResponse, HttpResponseBa...
diff --git a/src/pretix/control/views/vouchers.py b/src/pretix/control/views/vouchers.py index 511e5301ae4..45d567f3e3b 100644 --- a/src/pretix/control/views/vouchers.py +++ b/src/pretix/control/views/vouchers.py @@ -101,7 +101,7 @@ def get_context_data(self, **kwargs): ctx = super().get_context_data(**kwargs)...
ESMCI__cime-1462
test for -- options does not handle -- in quotes example CLM_OPTIONS="-dothis -dothat" causes problems (replace this with a better example)
[ { "content": "\"\"\"\nCommon functions used by cime python scripts\nWarning: you cannot use CIME Classes in this module as it causes circular dependencies\n\"\"\"\nimport logging, gzip, sys, os, time, re, shutil, glob, string, random\nimport stat as statlib\nimport warnings\n# Return this error code if the scri...
[ { "content": "\"\"\"\nCommon functions used by cime python scripts\nWarning: you cannot use CIME Classes in this module as it causes circular dependencies\n\"\"\"\nimport logging, gzip, sys, os, time, re, shutil, glob, string, random\nimport stat as statlib\nimport warnings\n# Return this error code if the scri...
diff --git a/scripts/lib/CIME/utils.py b/scripts/lib/CIME/utils.py index 6d79bce0543..c6a74877adb 100644 --- a/scripts/lib/CIME/utils.py +++ b/scripts/lib/CIME/utils.py @@ -1238,7 +1238,8 @@ def run_and_log_case_status(func, phase, caseroot='.'): def _check_for_invalid_args(args): for arg in args: - if a...
sktime__sktime-3208
[BUG] Error in `inverse-variance` method of `AutoEnsembleForecaster` **Describe the bug** When fitting the `AutoEnsembleForecaster` forecaster with exogenous data using the `inverse-variance` method, an error is raised. This is because `X` is passed to the internal forecasters instead of `X_test` when a prediction is ...
[ { "content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file).\n\"\"\"Implements ensemble forecasters.\n\nCreates univariate (optionally weighted)\ncombination of the predictions from underlying forecasts.\n\"\"\"\n\n__author__ = [\"mlo...
[ { "content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file).\n\"\"\"Implements ensemble forecasters.\n\nCreates univariate (optionally weighted)\ncombination of the predictions from underlying forecasts.\n\"\"\"\n\n__author__ = [\"mlo...
diff --git a/.all-contributorsrc b/.all-contributorsrc index fd30624a60b..8aca5c8e5f4 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1739,6 +1739,14 @@ "contributions": [ "code", ] + }, + { + "login": "AnH0ang", + "name": "An Hoang", + "profile": "https://gith...
scikit-image__scikit-image-5256
skimage.transform.rescale fails for scale < 0.2 ## Description The function `skimage.transform.rescale` throws an error for for `scale < 0.2`, which is quite unexpected if you're just trying to use the `rescale` function. I get following error messages for these small scale factors: ``` SOME_PATH\skimage\transform...
[ { "content": "import numpy as np\nfrom numpy.lib import NumpyVersion\nimport scipy\nfrom scipy import ndimage as ndi\n\nfrom ._geometric import (SimilarityTransform, AffineTransform,\n ProjectiveTransform)\nfrom ._warps_cy import _warp_fast\nfrom ..measure import block_reduce\n\nfrom .._...
[ { "content": "import numpy as np\nfrom numpy.lib import NumpyVersion\nimport scipy\nfrom scipy import ndimage as ndi\n\nfrom ._geometric import (SimilarityTransform, AffineTransform,\n ProjectiveTransform)\nfrom ._warps_cy import _warp_fast\nfrom ..measure import block_reduce\n\nfrom .._...
diff --git a/skimage/transform/_warps.py b/skimage/transform/_warps.py index 02acefa75ac..a9bac740481 100644 --- a/skimage/transform/_warps.py +++ b/skimage/transform/_warps.py @@ -281,7 +281,7 @@ def rescale(image, scale, order=None, mode='reflect', cval=0, clip=True, if multichannel: scale = np....
pytorch__pytorch-1934
torch.is_tensor(torch.HalfTensor()) returns False. The problem is [here](https://github.com/pytorch/pytorch/blob/master/torch/__init__.py#L274).
[ { "content": "\"\"\"\nThe torch package contains data structures for multi-dimensional\ntensors and mathematical operations over these are defined.\nAdditionally, it provides many utilities for efficient serializing of\nTensors and arbitrary types, and other useful utilities.\n\nIt has a CUDA counterpart, that ...
[ { "content": "\"\"\"\nThe torch package contains data structures for multi-dimensional\ntensors and mathematical operations over these are defined.\nAdditionally, it provides many utilities for efficient serializing of\nTensors and arbitrary types, and other useful utilities.\n\nIt has a CUDA counterpart, that ...
diff --git a/test/test_torch.py b/test/test_torch.py index 25a9fdf2c68a0d..0bda5c7bfeb5aa 100644 --- a/test/test_torch.py +++ b/test/test_torch.py @@ -3590,12 +3590,12 @@ def test_half_tensor(self): torch.save(xh, f) f.seek(0) xh2 = torch.load(f) - self.assertEqual(xh, ...
Lightning-Universe__lightning-flash-97
FilePathDataset does not apply transform to image. ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ### To Reproduce Steps to reproduce the behavior: 1. Go to '...' 2. Run '....' 3. Scroll down to '....' 4. See error <!-- If you have a code sample, error messages, stack traces, p...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/flash/vision/classification/data.py b/flash/vision/classification/data.py index 4080909c14..d5bde69ef1 100644 --- a/flash/vision/classification/data.py +++ b/flash/vision/classification/data.py @@ -68,6 +68,8 @@ def __len__(self) -> int: def __getitem__(self, index: int) -> Tuple[Any, Optional[int]]: ...
ivy-llc__ivy-13695
poisson
[ { "content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n handle_jax_dtype,\n)\n\n\n@to_ivy_arrays_and_back\ndef PRNGKey(seed):\n return ivy.array([0, seed % 4294967295 - (seed // 42949672...
[ { "content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n handle_jax_dtype,\n)\n\n\n@to_ivy_arrays_and_back\ndef PRNGKey(seed):\n return ivy.array([0, seed % 4294967295 - (seed // 42949672...
diff --git a/ivy/functional/frontends/jax/random.py b/ivy/functional/frontends/jax/random.py index e3966bb2dd41e..7c8f351682784 100644 --- a/ivy/functional/frontends/jax/random.py +++ b/ivy/functional/frontends/jax/random.py @@ -62,3 +62,14 @@ def dirichlet(key, alpha, shape=None, dtype="float32"): seed = _get_see...
streamlink__streamlink-4075
dash plugin: MPDParsingError: root tag did not match the expected tag: MPD ### Checklist - [X] This is a plugin issue and not a different kind of issue - [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink) - [X] [I have chec...
[ { "content": "import json\nimport re\nfrom urllib.parse import parse_qsl\n\nfrom lxml.etree import HTML, XML\n\nfrom streamlink.plugin import PluginError\n\n\ndef _parse(parser, data, name, exception, schema, *args, **kwargs):\n try:\n parsed = parser(data, *args, **kwargs)\n except Exception as er...
[ { "content": "import json\nimport re\nfrom urllib.parse import parse_qsl\n\nfrom lxml.etree import HTML, XML\n\nfrom streamlink.plugin import PluginError\n\n\ndef _parse(parser, data, name, exception, schema, *args, **kwargs):\n try:\n parsed = parser(data, *args, **kwargs)\n except Exception as er...
diff --git a/src/streamlink/utils/parse.py b/src/streamlink/utils/parse.py index 8165a2c3a00..2a4de948ef3 100644 --- a/src/streamlink/utils/parse.py +++ b/src/streamlink/utils/parse.py @@ -76,7 +76,7 @@ def parse_xml( if isinstance(data, str): data = bytes(data, "utf8") if ignore_ns: - data = ...
mitmproxy__mitmproxy-2781
Traceback appears in Status Bar, when trying to replay live flow ##### Steps to reproduce the problem: 1. Run **pathod** : `pathod -a "/=200:p0,10"` 2. Run mitmproxy. 3. Send _get request_ to pathod through mitmproxy using **pathoc**: `pathoc -c localhost:9999 localhost:8080 'get:/'` 4. Try to replay the corres...
[ { "content": "from mitmproxy import exceptions\nfrom mitmproxy import ctx\nfrom mitmproxy import io\nfrom mitmproxy import flow\nfrom mitmproxy import command\nimport mitmproxy.types\n\nimport typing\n\n\nclass ClientPlayback:\n def __init__(self):\n self.flows = [] # type: typing.List[flow.Flow]\n ...
[ { "content": "from mitmproxy import exceptions\nfrom mitmproxy import ctx\nfrom mitmproxy import io\nfrom mitmproxy import flow\nfrom mitmproxy import command\nimport mitmproxy.types\n\nimport typing\n\n\nclass ClientPlayback:\n def __init__(self):\n self.flows = [] # type: typing.List[flow.Flow]\n ...
diff --git a/mitmproxy/addons/clientplayback.py b/mitmproxy/addons/clientplayback.py index 3fd96669b4..2dd488b9ea 100644 --- a/mitmproxy/addons/clientplayback.py +++ b/mitmproxy/addons/clientplayback.py @@ -35,6 +35,9 @@ def start_replay(self, flows: typing.Sequence[flow.Flow]) -> None: """ Replay...
strawberry-graphql__strawberry-2581
Missing type annotation in `strawberry.fastapi.BaseContext` causes mypy to trip ## Describe the Bug I built a custom context based on [the guide in the docs](https://strawberry.rocks/docs/guides/authentication): ```python from strawberry.fastapi import BaseContext class CustomContext(BaseContext): @prope...
[ { "content": "from typing import Any, Dict, Optional, Union\n\nfrom starlette.background import BackgroundTasks\nfrom starlette.requests import Request\nfrom starlette.responses import Response\nfrom starlette.websockets import WebSocket\n\nCustomContext = Union[\"BaseContext\", Dict[str, Any]]\nMergedContext =...
[ { "content": "from typing import Any, Dict, Optional, Union\n\nfrom starlette.background import BackgroundTasks\nfrom starlette.requests import Request\nfrom starlette.responses import Response\nfrom starlette.websockets import WebSocket\n\nCustomContext = Union[\"BaseContext\", Dict[str, Any]]\nMergedContext =...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..cfd7f1d88f --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,4 @@ +Release type: patch + +Add a type annotation to `strawberry.fastapi.BaseContext`'s `__init__` method so that +it can be used without `mypy` raising an error. diff --git a/strawberry/fas...
yt-project__yt-4776
BUG: modifications through matplotlib engine cannot be properly displayed <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** The Modifications through Matp...
[ { "content": "import numpy as np\n\nimport yt\n\n# Load the dataset.\nds = yt.load(\"GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0150\")\n\n# Create a slice object\nslc = yt.SlicePlot(ds, \"x\", (\"gas\", \"density\"), width=(800.0, \"kpc\"))\n\n# Get a reference to the matplotlib axes object for the plot\nax = sl...
[ { "content": "import numpy as np\n\nimport yt\n\n# Load the dataset.\nds = yt.load(\"GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0150\")\n\n# Create a slice object\nslc = yt.SlicePlot(ds, \"x\", (\"gas\", \"density\"), width=(800.0, \"kpc\"))\n\n# Rendering should be performed explicitly *before* any modification ...
diff --git a/doc/source/cookbook/simple_slice_matplotlib_example.py b/doc/source/cookbook/simple_slice_matplotlib_example.py index 24594dd024d..6db55cbb66c 100644 --- a/doc/source/cookbook/simple_slice_matplotlib_example.py +++ b/doc/source/cookbook/simple_slice_matplotlib_example.py @@ -8,6 +8,10 @@ # Create a slice ...
celery__celery-5737
disable_sync_subtasks setting not being respected while using ResultSet <!-- Please fill this template entirely and do not erase parts of it. We reserve the right to close without a response bug reports which are incomplete. --> # Checklist <!-- To check an item on the list replace [ ] with [x]. --> - [x] I ...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Task results/state and results for groups of tasks.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport time\nimport datetime\nfrom collections import OrderedDict, deque\nfrom contextlib import contextmanager\nfrom copy import copy\n\nfrom kombu...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Task results/state and results for groups of tasks.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport time\nimport datetime\nfrom collections import OrderedDict, deque\nfrom contextlib import contextmanager\nfrom copy import copy\n\nfrom kombu...
diff --git a/celery/result.py b/celery/result.py index e76225bd156..717438bae18 100644 --- a/celery/result.py +++ b/celery/result.py @@ -769,6 +769,7 @@ def join(self, timeout=None, propagate=True, interval=0.5, value = result.get( timeout=remaining, propagate=propagate, i...
obspy__obspy-1783
Change nlloc signature format ### What does this PR do? fix the problem to read the "signature" in nlloc phase-hyp file line. It allows to recognize between old version (<6) and new nlloc version ### Why was it initiated? Any relevant Issues? ### PR Checklist - [x] This PR is not directly related to an exis...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nNonLinLoc file format support for ObsPy\n\n:copyright:\n The ObsPy Development Team (devs@obspy.org)\n:license:\n GNU Lesser General Public License, Version 3\n (https://www.gnu.org/copyleft/lesser.html)\n\"\"\"\nfrom __future__ impo...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nNonLinLoc file format support for ObsPy\n\n:copyright:\n The ObsPy Development Team (devs@obspy.org)\n:license:\n GNU Lesser General Public License, Version 3\n (https://www.gnu.org/copyleft/lesser.html)\n\"\"\"\nfrom __future__ impo...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bebaabdee34..703d11f9733 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -78,6 +78,8 @@ master: (doi: 10.5281/zenodo.165135) * Read support for GSE2.0 bulletin (see #1528) - obspy.io.nlloc: * Also parse author information and COMMENT line (see #1484) + *...
feast-dev__feast-3717
Saved Datasets breaks CLI registry-dump ## Expected Behavior After creating a saved dataset, the CLI command `feast registry-dump` should dump the contents of the registry to the terminal. ## Current Behavior After creating a saved dataset, the CLI command `feast registry-dump` breaks, with the following error...
[ { "content": "import uuid\nfrom typing import List, Optional\n\nfrom feast import usage\nfrom feast.data_source import DataSource\nfrom feast.entity import Entity\nfrom feast.errors import (\n DataSourceObjectNotFoundException,\n EntityNotFoundException,\n FeatureServiceNotFoundException,\n FeatureV...
[ { "content": "import uuid\nfrom typing import List, Optional\n\nfrom feast import usage\nfrom feast.data_source import DataSource\nfrom feast.entity import Entity\nfrom feast.errors import (\n DataSourceObjectNotFoundException,\n EntityNotFoundException,\n FeatureServiceNotFoundException,\n FeatureV...
diff --git a/sdk/python/feast/infra/registry/proto_registry_utils.py b/sdk/python/feast/infra/registry/proto_registry_utils.py index 2a275703dbb..c7eeea0f822 100644 --- a/sdk/python/feast/infra/registry/proto_registry_utils.py +++ b/sdk/python/feast/infra/registry/proto_registry_utils.py @@ -214,7 +214,7 @@ def list_sa...
internetarchive__openlibrary-4305
Account Creation: 1st login OL redirects you to IA (referer) <!-- What problem are we solving? What does the experience look like today? What are the symptoms? --> ### Evidence / Screenshot (if possible) ### Relevant url? <!-- `https://openlibrary.org/...` --> ### Steps to Reproduce <!-- What steps caused yo...
[ { "content": "import json\n\nimport web\nimport logging\nimport simplejson\nimport re\n\nfrom infogami.utils import delegate\nfrom infogami import config\nfrom infogami.utils.view import (\n require_login, render, render_template, add_flash_message\n)\n\nfrom infogami.infobase.client import ClientException\n...
[ { "content": "import json\n\nimport web\nimport logging\nimport simplejson\nimport re\n\nfrom infogami.utils import delegate\nfrom infogami import config\nfrom infogami.utils.view import (\n require_login, render, render_template, add_flash_message\n)\n\nfrom infogami.infobase.client import ClientException\n...
diff --git a/openlibrary/plugins/upstream/account.py b/openlibrary/plugins/upstream/account.py index d9adf4e67b7..69e5f21dfc1 100644 --- a/openlibrary/plugins/upstream/account.py +++ b/openlibrary/plugins/upstream/account.py @@ -307,7 +307,7 @@ def render_error(self, error_key, i): def GET(self): referer ...
lutris__lutris-1538
Do not show message about missing gamemode in terminal output This may confuse users and make them believe it's some kind of essential library. ``` 2019-01-08 05:39:36,869: i386 libgamemodeauto.so missing (needed by gamemode) 2019-01-08 05:39:36,869: x86_64 libgamemodeauto.so missing (needed by gamemode) ```
[ { "content": "\"\"\"System utilities\"\"\"\n# pylint: disable=inconsistent-return-statements\nimport platform\nimport resource\nimport hashlib\nimport signal\nimport os\nimport re\nimport shutil\nimport string\nimport subprocess\nimport sys\nimport traceback\nfrom collections import defaultdict\n\nfrom lutris.u...
[ { "content": "\"\"\"System utilities\"\"\"\n# pylint: disable=inconsistent-return-statements\nimport platform\nimport resource\nimport hashlib\nimport signal\nimport os\nimport re\nimport shutil\nimport string\nimport subprocess\nimport sys\nimport traceback\nfrom collections import defaultdict\n\nfrom lutris.u...
diff --git a/lutris/util/system.py b/lutris/util/system.py index dfbbdbdf21..3a396375e1 100644 --- a/lutris/util/system.py +++ b/lutris/util/system.py @@ -170,7 +170,7 @@ def critical_requirements(self): def get_requirements(self, include_optional=True): """Return used system requirements""" - _r...
django-import-export__django-import-export-1790
Remove support for django3.2 Django 3.2 reaches EOL on [30 April 2024](https://endoflife.date/django). - Remove from project definition - Remove test code which refers to code pre 4.2
[ { "content": "import logging\nimport warnings\n\nimport django\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry\nfrom django.contrib.auth import get_permission_codename\nfrom django.contrib.contenttypes.mo...
[ { "content": "import logging\nimport warnings\n\nimport django\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry\nfrom django.contrib.auth import get_permission_codename\nfrom django.contrib.contenttypes.mo...
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d8f34ed5d..2d5c2dab6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,8 +8,8 @@ jobs: main: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/se...
pytorch__pytorch-1087
ProgressMonitor (Trainer plugin) prints incorrect progress value and percentage Code to replicate behaviour, extract of [jupyter notebook](https://github.com/recastrodiaz/courses/blob/master/deeplearning1/nbs/lesson1-pytorch.ipynb) In [9]: ```PYTHON t = trainer.Trainer(model, criterion, optimizer, train_loader) t....
[ { "content": "from .plugin import Plugin\n\n\nclass ProgressMonitor(Plugin):\n stat_name = 'progress'\n\n def __init__(self):\n super(ProgressMonitor, self).__init__([(1, 'iteration'), (1, 'epoch')])\n\n def register(self, trainer):\n self.trainer = trainer\n stats = self.trainer.s...
[ { "content": "from .plugin import Plugin\n\n\nclass ProgressMonitor(Plugin):\n stat_name = 'progress'\n\n def __init__(self):\n super(ProgressMonitor, self).__init__([(1, 'iteration'), (1, 'epoch')])\n\n def register(self, trainer):\n self.trainer = trainer\n stats = self.trainer.s...
diff --git a/torch/utils/trainer/plugins/progress.py b/torch/utils/trainer/plugins/progress.py index 06a3c3f92d4fd1..5b0dc2e03c12b8 100644 --- a/torch/utils/trainer/plugins/progress.py +++ b/torch/utils/trainer/plugins/progress.py @@ -19,7 +19,7 @@ def register(self, trainer): def iteration(self, iteration, inpu...
lutris__lutris-2653
Impossible login to GOG.com: invalid cookie ? **Describe the bug** I can't connect Lutris with my GOG.com account: the GOG.com credentials window is here, I can fill it, but when I confirm this form, the window closes and… nothing more. My account isn't connected, and if I close the "Import games" window, I can't re...
[ { "content": "import time\nfrom http.cookiejar import MozillaCookieJar, Cookie, _warn_unhandled_exception\n\n\nclass WebkitCookieJar(MozillaCookieJar):\n \"\"\"Subclass of MozillaCookieJar for compatibility with cookies\n coming from Webkit2.\n This disables the magic_re header which is not present and...
[ { "content": "import time\nfrom http.cookiejar import MozillaCookieJar, Cookie, _warn_unhandled_exception\n\n\nclass WebkitCookieJar(MozillaCookieJar):\n \"\"\"Subclass of MozillaCookieJar for compatibility with cookies\n coming from Webkit2.\n This disables the magic_re header which is not present and...
diff --git a/lutris/util/cookies.py b/lutris/util/cookies.py index f7f58eebab..e473a76a52 100644 --- a/lutris/util/cookies.py +++ b/lutris/util/cookies.py @@ -28,7 +28,7 @@ def _really_load(self, f, filename, ignore_discard, ignore_expires): elif sline.startswith("#") or sline == "": ...
oppia__oppia-7075
Add the practice session experience to the topic viewer Add an option in the topic viewer page that can start the practice session, based on the skills that are part of the topic. Add the practice session experience to the topic viewer Add an option in the topic viewer page that can start the practice session, based on...
[ { "content": "# Copyright 2018 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
[ { "content": "# Copyright 2018 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
diff --git a/core/controllers/topic_viewer.py b/core/controllers/topic_viewer.py index a78d4341caad5..d1336a3b064b9 100644 --- a/core/controllers/topic_viewer.py +++ b/core/controllers/topic_viewer.py @@ -73,6 +73,7 @@ def get(self, topic_name): self.values.update({ 'topic_name': topic.name, + ...
sql-machine-learning__elasticdl-1067
Fix lookup_embedding call in embedding layer elasticdl.layers.Embedding.lookup_embedding still uses old worker.lookup_embedding method. We need to update it to the revised version.
[ { "content": "import tensorflow as tf\nfrom tensorflow.python.keras.utils import tf_utils\n\n\nclass Embedding(tf.keras.layers.Layer):\n \"\"\"\n Input: indexes for the embedding entries with a shape of\n (batch_size, input_length). Input can be either dense tensor\n or SparseTensor.\n Output...
[ { "content": "import tensorflow as tf\nfrom tensorflow.python.keras.utils import tf_utils\n\n\nclass Embedding(tf.keras.layers.Layer):\n \"\"\"\n Input: indexes for the embedding entries with a shape of\n (batch_size, input_length). Input can be either dense tensor\n or SparseTensor.\n Output...
diff --git a/elasticdl/python/elasticdl/layers/embedding.py b/elasticdl/python/elasticdl/layers/embedding.py index 06c6e5ea4..91cf08518 100644 --- a/elasticdl/python/elasticdl/layers/embedding.py +++ b/elasticdl/python/elasticdl/layers/embedding.py @@ -87,8 +87,8 @@ def get_key(name_list): return "-".join(map(...
Gallopsled__pwntools-1852
`atexit.register` does not work ### What I did ```python3 from pwn import * atexit.register(print, "hello world") exit() ``` ### What I expected to see ```python3 test.py hello world ``` ### What I saw Nothing I noticed this because `asm()`, which adds an `atexit` handler to remove the `/tmp/pwn-asm-XXXXX...
[ { "content": "\"\"\"\nReplacement for the Python standard library's atexit.py.\n\nWhereas the standard :mod:`atexit` module only defines :func:`atexit.register`,\nthis replacement module also defines :func:`unregister`.\n\nThis module also fixes a the issue that exceptions raised by an exit handler is\nprinted ...
[ { "content": "\"\"\"\nReplacement for the Python standard library's atexit.py.\n\nWhereas the standard :mod:`atexit` module only defines :func:`atexit.register`,\nthis replacement module also defines :func:`unregister`.\n\nThis module also fixes a the issue that exceptions raised by an exit handler is\nprinted ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 281422a6c..87d367fe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -151,6 +151,7 @@ The table below shows which release corresponds to each branch, and what date th ## 4.3.1 +- [#1852][1852] Fix `atexit` on Python 3 - [#1732][1732] Fix shellcraft SSTI vulnerability...
Project-MONAI__MONAI-7612
Inaccurate error message in regression.py **Describe the bug** On line 306 of monai.metrics.regression, the printed error message states that y_pred should have 4 dimensions when in fact the surrounding if-statement is looking for the case where y_pred should have 5 dimensions. This confused me because I got an erro...
[ { "content": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable la...
[ { "content": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable la...
diff --git a/monai/metrics/regression.py b/monai/metrics/regression.py index 9d29654ee3..4c8b8aa71b 100644 --- a/monai/metrics/regression.py +++ b/monai/metrics/regression.py @@ -303,7 +303,7 @@ def _compute_metric(self, y_pred: torch.Tensor, y: torch.Tensor) -> torch.Tensor if self.spatial_dims == 3 and dim...
googleapis__python-bigquery-51
BigQuery: TypeError: from_arrays() takes at least 2 positional arguments (1 given) Hi all, i tried bq client in python with the default example. Since i moved from 1.23.1 to 1.24.0 last week i get the following issue. Its related to pyarrow but i was not upgrading pyarrow (worked with it before) #### Environment ...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
diff --git a/setup.py b/setup.py index 6324c8b25..0e920a04e 100644 --- a/setup.py +++ b/setup.py @@ -40,9 +40,7 @@ extras = { "bqstorage": [ "google-cloud-bigquery-storage >= 0.6.0, <2.0.0dev", - # Bad Linux release for 0.14.0. - # https://issues.apache.org/jira/browse/ARROW-5868 - "...
pypa__pipenv-5920
If --skip-lock is used that python_version marker is not respected Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv. Check the [diagnose documentation](https://pipenv.pypa.io/en/latest/diagnose/) for common issues before posting! We may close yo...
[ { "content": "import os\nimport queue\nimport sys\nimport warnings\nfrom collections import defaultdict\nfrom tempfile import NamedTemporaryFile\n\nfrom pipenv import environments, exceptions\nfrom pipenv.patched.pip._internal.exceptions import PipError\nfrom pipenv.routines.lock import do_lock\nfrom pipenv.uti...
[ { "content": "import os\nimport queue\nimport sys\nimport warnings\nfrom collections import defaultdict\nfrom tempfile import NamedTemporaryFile\n\nfrom pipenv import environments, exceptions\nfrom pipenv.patched.pip._internal.exceptions import PipError\nfrom pipenv.routines.lock import do_lock\nfrom pipenv.uti...
diff --git a/news/5920.bugfix.rst b/news/5920.bugfix.rst new file mode 100644 index 0000000000..c3f1374237 --- /dev/null +++ b/news/5920.bugfix.rst @@ -0,0 +1 @@ +Include the Pipfile markers in the install phase when using ``--skip-lock``. diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py index 1bb06...
talonhub__community-861
formatter accuracy This has come up a couple of times. I suspect you'll improve formatter accuracy if you make these changes: "allcaps" -> "all cap" "alldown" -> "all down" The reason for this is e.g. "alldown" is not an english word, D sounds like T, so "alld" sounds like alt, and you get "alt down". Same for ...
[ { "content": "from talon import Module, Context, actions, ui, imgui, app\nfrom talon.grammar import Phrase\nfrom typing import List, Union\nimport logging\nimport re\n\nctx = Context()\nkey = actions.key\nedit = actions.edit\n\nwords_to_keep_lowercase = \"a an the at by for in is of on to up and as but or nor\"...
[ { "content": "from talon import Module, Context, actions, ui, imgui, app\nfrom talon.grammar import Phrase\nfrom typing import List, Union\nimport logging\nimport re\n\nctx = Context()\nkey = actions.key\nedit = actions.edit\n\nwords_to_keep_lowercase = \"a an the at by for in is of on to up and as but or nor\"...
diff --git a/code/formatters.py b/code/formatters.py index 5636e0f3b9..5a01143492 100644 --- a/code/formatters.py +++ b/code/formatters.py @@ -124,7 +124,7 @@ def every_word(word_func): # This is the mapping from spoken phrases to formatters formatters_words = { - "all caps": formatters_dict["ALL_CAPS"], + "a...
pytorch__rl-515
[BUG] importing `dm_control` environments when the library is not installed does not display the right error message ## Describe the bug We allow users to load the file `envs/libs/dm_control.py` even if `dm-control` is not installes. When creating an object in this situation, the error message now is that the enviro...
[ { "content": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nfrom __future__ import annotations\n\nimport collections\nimport os\nfrom typing import Optional, Tuple, Union, Dic...
[ { "content": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nfrom __future__ import annotations\n\nimport collections\nimport os\nfrom typing import Optional, Tuple, Union, Dic...
diff --git a/torchrl/envs/libs/dm_control.py b/torchrl/envs/libs/dm_control.py index c2494ce7160..6267b8880e2 100644 --- a/torchrl/envs/libs/dm_control.py +++ b/torchrl/envs/libs/dm_control.py @@ -272,6 +272,11 @@ class DMControlEnv(DMControlWrapper): """ def __init__(self, env_name, task_name, **kwargs): +...
Lightning-Universe__lightning-flash-104
Download Data Fails if Content Length Not Defined in Header ## 🐛 Bug When I try to download a zip file using download_data from flash.core.data it fails because the response header does not contain a value for 'Content Length' this should be check for and handled in the code. ### To Reproduce Steps to reprod...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/flash/core/data/utils.py b/flash/core/data/utils.py index 320ff86499..a497b5f7b4 100644 --- a/flash/core/data/utils.py +++ b/flash/core/data/utils.py @@ -35,7 +35,7 @@ def download_file(url: str, path: str, verbose: bool = False) -> None: os.makedirs(path) local_filename = os.path.join(path, ...
jupyterhub__jupyterhub-3715
Empty Admin page when base_url is set ### Bug description <!-- Use this section to clearly and concisely describe the bug. --> If `JupyterHub.base_url` is set in `jupyterhub_config.py`, visitig the Admin tab on jupyterhub v.2.0.0 shows the empty page. #### Expected behaviour <!-- Tell us what you thought would...
[ { "content": "\"\"\"Basic html-rendering handlers.\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport time\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom http.client import responses\n\nfrom jinja2 impor...
[ { "content": "\"\"\"Basic html-rendering handlers.\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport time\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom http.client import responses\n\nfrom jinja2 impor...
diff --git a/jsx/src/components/GroupEdit/GroupEdit.jsx b/jsx/src/components/GroupEdit/GroupEdit.jsx index 605cb7c653..f1ad550994 100644 --- a/jsx/src/components/GroupEdit/GroupEdit.jsx +++ b/jsx/src/components/GroupEdit/GroupEdit.jsx @@ -110,13 +110,21 @@ const GroupEdit = (props) => { Promise.all(pro...
wagtail__wagtail-4648
PageTypeField API serializer should gracefully handle missing page models ### Issue Summary If a page model is deleted while pages of that type still exist, any API calls for page listings that include that page type will fail with `AttributeError: 'NoneType' object has no attribute '_meta'`. This results in a serve...
[ { "content": "from collections import OrderedDict\n\nfrom django.urls.exceptions import NoReverseMatch\nfrom modelcluster.models import get_all_child_relations\nfrom rest_framework import relations, serializers\nfrom rest_framework.fields import Field, SkipField\nfrom taggit.managers import _TaggableManager\n\n...
[ { "content": "from collections import OrderedDict\n\nfrom django.urls.exceptions import NoReverseMatch\nfrom modelcluster.models import get_all_child_relations\nfrom rest_framework import relations, serializers\nfrom rest_framework.fields import Field, SkipField\nfrom taggit.managers import _TaggableManager\n\n...
diff --git a/wagtail/api/v2/serializers.py b/wagtail/api/v2/serializers.py index 08425e61b6e8..e966dd82eecd 100644 --- a/wagtail/api/v2/serializers.py +++ b/wagtail/api/v2/serializers.py @@ -79,6 +79,8 @@ def get_attribute(self, instance): return instance def to_representation(self, page): + if p...
nf-core__tools-1333
Space missing in tip message for --fix files_unchanged <!-- # nf-core/tools bug report Hi there! Thanks for telling us about a problem with the nf-core/tools package. Please delete this text and anything that's not relevant from the template below: --> ## Description of the bug a space is missing before ...
[ { "content": "import rich\nfrom rich.console import Console\nfrom rich.table import Table\nimport logging\n\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n# Create a console used by all lint tests\nconsole = Console(force_terminal=nf_core.utils.rich_force_colors())\n\n\ndef print_joint_summary(li...
[ { "content": "import rich\nfrom rich.console import Console\nfrom rich.table import Table\nimport logging\n\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n# Create a console used by all lint tests\nconsole = Console(force_terminal=nf_core.utils.rich_force_colors())\n\n\ndef print_joint_summary(li...
diff --git a/README.md b/README.md index e440979bde..be4ff5afd0 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ $ nf-core list | \| | \__, \__/ | \ |___ \`-._,-`-, `._,._,' - nf-core/tools version 2.0 + nf-core/tools version 2.2 ┏━━━━━━━━━...
django-wiki__django-wiki-565
Possible memory leak in markdown extensions When looking at an error log from our project using django-wiki, we noticed a kind of _possibly longer than necessary_ value of django setting WIKI_MARKDOWN_KWARGS.. It seems that each of the extension is appended to the 'extensions' array multiple times and I think that it...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nfrom wiki.conf import settings\nfrom wiki.core.markdown.mdx.previewlinks import PreviewLinksExtension\nfrom wiki.core.markdown.mdx.responsivetable import ResponsiveTableExtension\nfrom wiki.core.plugins import registry as plugin_registry\...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nfrom wiki.conf import settings\nfrom wiki.core.markdown.mdx.previewlinks import PreviewLinksExtension\nfrom wiki.core.markdown.mdx.responsivetable import ResponsiveTableExtension\nfrom wiki.core.plugins import registry as plugin_registry\...
diff --git a/tox.ini b/tox.ini index 43490cf54..4d9556abe 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,8 @@ deps = pytest Pillow==2.3.0 django-classy-tags==0.4 - six==1.6.1 + six>=1.9 + mock>=2.0 django_nyt==0.9.8 django15: Django==1.5.12 django16: Django==1.6.11 diff ...
cowrie__cowrie-1421
$UID not spitting out UID **Describe the bug** A hacker found a way to get inside the cowrie box and executed "echo $UID". The reply that came back was empty, and the hacker disconnected. My normal box returned the UID. **To Reproduce** Steps to reproduce the behavior: 1. Connect to linux machine 2. Type in "Ech...
[ { "content": "# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\nfrom __future__ import absolute_import, division\n\nfrom twisted.conch.interfaces import ISession\nfrom twisted.conch.ssh import session\nfrom twisted.python import log\n\nfrom zope.interf...
[ { "content": "# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\nfrom __future__ import absolute_import, division\n\nfrom twisted.conch.interfaces import ISession\nfrom twisted.conch.ssh import session\nfrom twisted.python import log\n\nfrom zope.interf...
diff --git a/src/cowrie/shell/session.py b/src/cowrie/shell/session.py index d9ae12e0df..666323c490 100644 --- a/src/cowrie/shell/session.py +++ b/src/cowrie/shell/session.py @@ -36,7 +36,7 @@ def __init__(self, avatar, reactor=None): 'USER': self.username, 'HOME': self.avatar.home, ...
mozmeao__snippets-service-1161
Make Job Ids searchable in snippet admin For Snippets, we can search using snippet ids. It doesn't work when in jobs. ![Screen Shot 2019-09-27 at 9 00 21 AM](https://user-images.githubusercontent.com/6807556/65783734-45952880-e105-11e9-8e2b-2c7a370f1036.png)
[ { "content": "import copy\nimport re\n\nfrom django.contrib import admin, messages\nfrom django.db.models import TextField, Q\nfrom django.http import HttpResponseRedirect\nfrom django.template.loader import get_template\nfrom django.urls import reverse\nfrom django.utils.safestring import mark_safe\n\nfrom dja...
[ { "content": "import copy\nimport re\n\nfrom django.contrib import admin, messages\nfrom django.db.models import TextField, Q\nfrom django.http import HttpResponseRedirect\nfrom django.template.loader import get_template\nfrom django.urls import reverse\nfrom django.utils.safestring import mark_safe\n\nfrom dja...
diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py index 1b7071746..8c3121092 100644 --- a/snippets/base/admin/adminmodels.py +++ b/snippets/base/admin/adminmodels.py @@ -975,10 +975,11 @@ class JobAdmin(admin.ModelAdmin): ('targets', RelatedOnlyDropdownFilter), ('sni...
typeddjango__django-stubs-1239
mypy 0.990 breaks mypy_django_plugin mypy 0.990 was released today. When I have mypy 0.990 and `mypy_django_plugin` enabled, it fails with `AssertionError` on code that uses the `django_cas_ng` package. The problematic code appears to be: ```python from django.conf import settings as django_settings # ... def ge...
[ { "content": "from mypy.nodes import MemberExpr\nfrom mypy.plugin import AttributeContext, FunctionContext\nfrom mypy.types import AnyType, Instance\nfrom mypy.types import Type as MypyType\nfrom mypy.types import TypeOfAny, TypeType\n\nfrom mypy_django_plugin.django.context import DjangoContext\nfrom mypy_djan...
[ { "content": "from mypy.nodes import MemberExpr\nfrom mypy.plugin import AttributeContext, FunctionContext\nfrom mypy.types import AnyType, Instance\nfrom mypy.types import Type as MypyType\nfrom mypy.types import TypeOfAny, TypeType\n\nfrom mypy_django_plugin.django.context import DjangoContext\nfrom mypy_djan...
diff --git a/mypy_django_plugin/transformers/settings.py b/mypy_django_plugin/transformers/settings.py index e86a3e97d..b598450a9 100644 --- a/mypy_django_plugin/transformers/settings.py +++ b/mypy_django_plugin/transformers/settings.py @@ -21,7 +21,9 @@ def get_user_model_hook(ctx: FunctionContext, django_context: Dja...
ipython__ipython-11087
Error in IPython 5.6: MPLBACKEND=PS and importing matplotlib.pyplot There's seems to be a problem if `MPLBACKEND=PS` and if an IPython script imports `matplotlib.pyplot` (`import matplotlib` is still fine). This arises starting with IPython 5.6 (5.5 is fine), so my best guess is that it was caused by #10868 -- at least...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Pylab (matplotlib) support utilities.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom io import BytesIO\n\nfrom IPython.core.display import _pngxy\nfrom IPython.utils.decorators import flag_calls\...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Pylab (matplotlib) support utilities.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom io import BytesIO\n\nfrom IPython.core.display import _pngxy\nfrom IPython.utils.decorators import flag_calls\...
diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py index 7f275a92a04..4423ed5d408 100644 --- a/IPython/core/pylabtools.py +++ b/IPython/core/pylabtools.py @@ -46,6 +46,9 @@ # And some backends that don't need GUI integration del backend2gui['nbAgg'] del backend2gui['agg'] +del backend2gui['svg'] +d...
DataDog__dd-trace-py-384
Incorrect render patching in pyramid. https://github.com/DataDog/dd-trace-py/blob/261136e112b23862a78308a2423e15364ae4aaa6/ddtrace/contrib/pyramid/trace.py#L31 Here we're removing request from kwargs but pyramid's render has a request kwarg so we need to keep it.
[ { "content": "\n# 3p\nimport logging\nimport pyramid.renderers\nfrom pyramid.settings import asbool\nimport wrapt\n\n# project\nimport ddtrace\nfrom ...ext import http, AppTypes\nfrom .constants import SETTINGS_SERVICE, SETTINGS_TRACE_ENABLED, SETTINGS_TRACER\n\nlog = logging.getLogger(__name__)\n\nDD_TWEEN_NAM...
[ { "content": "\n# 3p\nimport logging\nimport pyramid.renderers\nfrom pyramid.settings import asbool\nimport wrapt\n\n# project\nimport ddtrace\nfrom ...ext import http, AppTypes\nfrom .constants import SETTINGS_SERVICE, SETTINGS_TRACE_ENABLED, SETTINGS_TRACER\n\nlog = logging.getLogger(__name__)\n\nDD_TWEEN_NAM...
diff --git a/ddtrace/contrib/pyramid/trace.py b/ddtrace/contrib/pyramid/trace.py index 2d203ab14ce..800f53302ce 100644 --- a/ddtrace/contrib/pyramid/trace.py +++ b/ddtrace/contrib/pyramid/trace.py @@ -28,7 +28,7 @@ def includeme(config): def trace_render(func, instance, args, kwargs): # If the request is not tr...
vyperlang__vyper-2821
Dynamic arrays are not allocated properly in storage, overlap with following variables ### Version Information * vyper Version (output of `vyper --version`): 0.3.2 * OS: Release Linux Mint 20.3 Una 64-bit * Python Version (output of `python --version`): Python 3.8.10 ### What's your issue about? Dynamic arra...
[ { "content": "from typing import Optional, Tuple, Union\n\nfrom vyper import ast as vy_ast\nfrom vyper.abi_types import ABI_DynamicArray, ABI_StaticArray, ABI_Tuple, ABIType\nfrom vyper.exceptions import ArrayIndexException, InvalidType, StructureException\nfrom vyper.semantics import validation\nfrom vyper.sem...
[ { "content": "from typing import Optional, Tuple, Union\n\nfrom vyper import ast as vy_ast\nfrom vyper.abi_types import ABI_DynamicArray, ABI_StaticArray, ABI_Tuple, ABIType\nfrom vyper.exceptions import ArrayIndexException, InvalidType, StructureException\nfrom vyper.semantics import validation\nfrom vyper.sem...
diff --git a/tests/cli/outputs/test_storage_layout.py b/tests/cli/outputs/test_storage_layout.py index 7ed2ca7a03..e419d2f470 100644 --- a/tests/cli/outputs/test_storage_layout.py +++ b/tests/cli/outputs/test_storage_layout.py @@ -21,6 +21,8 @@ def public_foo2(): def _bar(): pass +arr: DynArray[uint256, 3] + #...
optuna__optuna-1966
Metric MAPE direction should be reversed with reference to MAP https://github.com/optuna/optuna/blob/9fc26c2277b347788d5554dad66dba81585716b2/optuna/integration/_lightgbm_tuner/optimize.py#L146
[ { "content": "import abc\nimport copy\nimport json\nimport os\nimport pickle\nimport time\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import Generator\nfrom typing import Iterator\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom...
[ { "content": "import abc\nimport copy\nimport json\nimport os\nimport pickle\nimport time\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import Generator\nfrom typing import Iterator\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom...
diff --git a/optuna/integration/_lightgbm_tuner/optimize.py b/optuna/integration/_lightgbm_tuner/optimize.py index 565a3ee25d..a28b77d631 100644 --- a/optuna/integration/_lightgbm_tuner/optimize.py +++ b/optuna/integration/_lightgbm_tuner/optimize.py @@ -144,7 +144,7 @@ def _metric_with_eval_at(self, metric: str) -> st...
pyqtgraph__pyqtgraph-1048
Line Labels not visible for small graph values Hey Everyone, I found a bug where InfLinLables attached to InfiniteLines are not properly shown, if the total y-range of the graph is too small. Simple example below. If the label position is big enough (e.g. 0.5) the label sometimes comes into view. But this is not ...
[ { "content": "from ..Qt import QtGui, QtCore\nfrom ..Point import Point\nfrom .GraphicsObject import GraphicsObject\nfrom .TextItem import TextItem\nfrom .ViewBox import ViewBox\nfrom .. import functions as fn\nimport numpy as np\nimport weakref\n\n\n__all__ = ['InfiniteLine', 'InfLineLabel']\n\n\nclass Infinit...
[ { "content": "from ..Qt import QtGui, QtCore\nfrom ..Point import Point\nfrom .GraphicsObject import GraphicsObject\nfrom .TextItem import TextItem\nfrom .ViewBox import ViewBox\nfrom .. import functions as fn\nimport numpy as np\nimport weakref\n\n\n__all__ = ['InfiniteLine', 'InfLineLabel']\n\n\nclass Infinit...
diff --git a/pyqtgraph/graphicsItems/InfiniteLine.py b/pyqtgraph/graphicsItems/InfiniteLine.py index 7aeb1620b2..3650502605 100644 --- a/pyqtgraph/graphicsItems/InfiniteLine.py +++ b/pyqtgraph/graphicsItems/InfiniteLine.py @@ -314,8 +314,8 @@ def _computeBoundingRect(self): length = br.width() left = ...
PrefectHQ__prefect-1165
Cannot raise a skip signal with a result I am filing an issue by suggestion of @cicdw after a conversation on gitter. I came up with the following use case: a task that raises a skip signal with a result because its logic has detected that there is no work to do and the result is already calculated somewhere. I could ...
[ { "content": "\"\"\"\nThese Exceptions, when raised, are used to signal state changes when tasks or flows are running. Signals\nare used in TaskRunners and FlowRunners as a way of communicating the changes in states.\n\"\"\"\n\nfrom prefect.engine import state\nfrom prefect.utilities.exceptions import PrefectEr...
[ { "content": "\"\"\"\nThese Exceptions, when raised, are used to signal state changes when tasks or flows are running. Signals\nare used in TaskRunners and FlowRunners as a way of communicating the changes in states.\n\"\"\"\n\nfrom prefect.engine import state\nfrom prefect.utilities.exceptions import PrefectEr...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5970e79df841..90eaaf422210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ These changes are available in the [master branch](https://github.com/PrefectHQ/ - Fix issue with mapped caching in Prefect Cloud - [#1096](https://github.com/PrefectHQ/prefect/pull/...
pydantic__pydantic-3646
Color comparison is always false # Bug Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`: ``` pydantic version: 1.9.0 pydantic compiled: True install path: /home/xxxxxxx/xxxxxxx/xxxxxxx/venv310/lib/python3.10/site-packages/pydantic ...
[ { "content": "\"\"\"\nColor definitions are used as per CSS3 specification:\nhttp://www.w3.org/TR/css3-color/#svg-color\n\nA few colors have multiple names referring to the sames colors, eg. `grey` and `gray` or `aqua` and `cyan`.\n\nIn these cases the LAST color when sorted alphabetically takes preferences,\n...
[ { "content": "\"\"\"\nColor definitions are used as per CSS3 specification:\nhttp://www.w3.org/TR/css3-color/#svg-color\n\nA few colors have multiple names referring to the sames colors, eg. `grey` and `gray` or `aqua` and `cyan`.\n\nIn these cases the LAST color when sorted alphabetically takes preferences,\n...
diff --git a/changes/3646-aminalaee.md b/changes/3646-aminalaee.md new file mode 100644 index 00000000000..68c8084075f --- /dev/null +++ b/changes/3646-aminalaee.md @@ -0,0 +1 @@ +Add comparison method for `Color` class. diff --git a/pydantic/color.py b/pydantic/color.py index 269aff52712..6ea2c53f802 100644 --- a/pyda...
elastic__apm-agent-python-1783
[META 739] Add "s3/"-prefix to S3 destination.service.resource See meta issue for the description and details: - Meta issue: https://github.com/elastic/apm/issues/739 [META 739] Add "s3/"-prefix to S3 destination.service.resource See meta issue for the description and details: - Meta issue: https://github.com/elast...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain...
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 0118c4c45..b90dfd30b 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -43,7 +43,14 @@ endif::[] * Fix spans being dropped if they don't have a name {pull}1770[#1770] * Fix AWS Lambda support when `event` is not a dict {pull}1775[#1775] * Fix depre...
encode__django-rest-framework-5872
wrong schema generation for UUIDField ## Checklist - [x] I have verified that that issue exists against the `master` branch of Django REST framework. - [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate. - [x] This is not a usage question. (Those should be directed t...
[ { "content": "\"\"\"\nThe metadata API is used to allow customization of how `OPTIONS` requests\nare handled. We currently provide a single default implementation that returns\nsome fairly ad-hoc information about the view.\n\nFuture implementations might use JSON schema or other definitions in order\nto return...
[ { "content": "\"\"\"\nThe metadata API is used to allow customization of how `OPTIONS` requests\nare handled. We currently provide a single default implementation that returns\nsome fairly ad-hoc information about the view.\n\nFuture implementations might use JSON schema or other definitions in order\nto return...
diff --git a/rest_framework/metadata.py b/rest_framework/metadata.py index 410acd0e2f..994c6cb774 100644 --- a/rest_framework/metadata.py +++ b/rest_framework/metadata.py @@ -40,6 +40,7 @@ class SimpleMetadata(BaseMetadata): serializers.BooleanField: 'boolean', serializers.NullBooleanField: 'boolean',...
ESMCI__cime-3948
Charting a path towards dropping python2 support This question came up in yesterday's CESM Software Engineering Group meeting (raised by @gold2718 , also relevant to @alperaltuntas ): We have some python code coming into CESM that will assume python3. Some of this code will be invoked by cime scripts (buildnml / buildl...
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nSimple script to populate CESM test database with test results.\n\"\"\"\n\nfrom standard_script_setup import *\n\nfrom CIME.XML.env_build import EnvBuild\nfrom CIME.XML.env_case import EnvCase\nfrom CIME.XML.env_test import Env...
[ { "content": "#!/usr/bin/env python3\n\n\"\"\"\nSimple script to populate CESM test database with test results.\n\"\"\"\n\nfrom standard_script_setup import *\n\nfrom CIME.XML.env_build import EnvBuild\nfrom CIME.XML.env_case import EnvCase\nfrom CIME.XML.env_test import En...
diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index db5f3a40523..040edf0e2d6 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -18,14 +18,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [2.7, 3.8] + python-version: [3.8, ...
beetbox__beets-3784
Fetch art is pixelated ### Setup * OS: Docker image (`linuxserver/docker-beets:nightly`) * Python version: `3.8.5` * beets version: `HEAD` * Turning off plugins made problem go away (yes/no): N/A ### Problem Seems like `fetchart` is pixelating the images when resizing. Not sure if this is a `Pillow` problem...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Fabrice Laporte\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Fabrice Laporte\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
diff --git a/beets/util/artresizer.py b/beets/util/artresizer.py index 8f14c8baf2..c57918f16b 100644 --- a/beets/util/artresizer.py +++ b/beets/util/artresizer.py @@ -77,6 +77,11 @@ def pil_resize(maxwidth, path_in, path_out=None, quality=0): im = Image.open(util.syspath(path_in)) size = maxwidth, max...
spack__spack-5239
Unable to build LLVM on CentOS 7 I'm trying to build LLVM on CentOS 7 with GCC 7.1.0. I'm seeing the following error message: ``` In file included from /blues/gpfs/home/ajstewart/spack/var/spack/stage/llvm-4.0.0-iwr5xsmpa2scpclnuhevp4od7pa3j7mq/llvm-4.0.0.src/tools/lldb/source/Utility/TaskPool.cpp:10:0: /blues/gpfs/...
[ { "content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ...
[ { "content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ...
diff --git a/var/spack/repos/builtin/packages/llvm/llvm_gcc7.patch b/var/spack/repos/builtin/packages/llvm/llvm_gcc7.patch new file mode 100644 index 00000000000000..e3bb8a14ad0851 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/llvm_gcc7.patch @@ -0,0 +1,10 @@ +--- a/tools/lldb/include/lldb/Utility/TaskPool....
sanic-org__sanic-2666
Deprecate __blueprintname__ This code no longer seems like it is necessary: https://github.com/sanic-org/sanic/blob/5d683c6ea4b615e80c51d80189436437b824cce6/sanic/blueprints.py#L309 Since you can get access to the name of the blueprint from the request object, the route object, and the blueprint object, I do not thi...
[ { "content": "from __future__ import annotations\n\nimport asyncio\n\nfrom collections import defaultdict\nfrom copy import deepcopy\nfrom functools import wraps\nfrom inspect import isfunction\nfrom itertools import chain\nfrom types import SimpleNamespace\nfrom typing import (\n TYPE_CHECKING,\n Any,\n ...
[ { "content": "from __future__ import annotations\n\nimport asyncio\n\nfrom collections import defaultdict\nfrom copy import deepcopy\nfrom functools import wraps\nfrom inspect import isfunction\nfrom itertools import chain\nfrom types import SimpleNamespace\nfrom typing import (\n TYPE_CHECKING,\n Any,\n ...
diff --git a/sanic/blueprints.py b/sanic/blueprints.py index 5699d4bcb0..8050e1f615 100644 --- a/sanic/blueprints.py +++ b/sanic/blueprints.py @@ -304,9 +304,6 @@ def register(self, app, options): # Routes for future in self._future_routes: - # attach the blueprint name to the handler so ...
psf__black-3392
black cli show loaded configuration. **Is your feature request related to a problem? Please describe.** Sometimes when dealing with multiple environment settings, IDEs, and pyproject.toml files etc. etc. is beneficial for a project team to have a confirmation about the actual applied black-settings ("line length") i...
[ { "content": "import io\nimport json\nimport platform\nimport re\nimport sys\nimport tokenize\nimport traceback\nfrom contextlib import contextmanager\nfrom dataclasses import replace\nfrom datetime import datetime\nfrom enum import Enum\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\nfrom ...
[ { "content": "import io\nimport json\nimport platform\nimport re\nimport sys\nimport tokenize\nimport traceback\nfrom contextlib import contextmanager\nfrom dataclasses import replace\nfrom datetime import datetime\nfrom enum import Enum\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\nfrom ...
diff --git a/CHANGES.md b/CHANGES.md index c84feb04934..e781cbd523e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,6 +36,9 @@ <!-- Changes to Black's terminal output and error messages --> +- Verbose logging now shows the values of `pyproject.toml` configuration variables + (#3392) + ### _Blackd_ <!-- Change...
pytorch__ignite-3219
Add python 3.12 to CI ## 🚀 Feature Add python 3.12 to CI: https://github.com/pytorch/ignite/blob/master/.github/workflows/unit-tests.yml
[ { "content": "from argparse import ArgumentParser\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch.optim import SGD\nfrom torch.utils.data import DataLoader\nfrom torchvision.datasets import MNIST\nfrom torchvision.transforms import Compose, Normalize, ToTensor\nfrom tqdm impor...
[ { "content": "from argparse import ArgumentParser\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch.optim import SGD\nfrom torch.utils.data import DataLoader\nfrom torchvision.datasets import MNIST\nfrom torchvision.transforms import Compose, Normalize, ToTensor\nfrom tqdm impor...
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7673b79f792f..a4b697255699 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -40,7 +40,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: [3.8...
ansible__ansible-11146
CLI become options are ultimately ignored At this point I am not exactly sure where this is happening, however the become options provided on the CLI are ultimately ignored. I have however determined that when `ConnectionInformation` is initiated, that the attributes are properly set via the 'set_options`method. Imme...
[ { "content": "# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the Licen...
[ { "content": "# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the Licen...
diff --git a/lib/ansible/playbook/become.py b/lib/ansible/playbook/become.py index daa8c80ba943ac..fca28538585917 100644 --- a/lib/ansible/playbook/become.py +++ b/lib/ansible/playbook/become.py @@ -27,7 +27,7 @@ class Become: # Privlege escalation - _become = FieldAttribute(isa='bool', default=...
huggingface__accelerate-370
AttributeErrorAttributeError: : 'DeepSpeedEngineWrapper' object has no attribute '_zero3_consolidated_fp16_state_dict' Accelerator with Deepspeed stage 3 when saving the model giving following error Code I used: import torch import torch.nn.functional as F from datasets import load_dataset ...
[ { "content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/src/accelerate/accelerator.py b/src/accelerate/accelerator.py index 6fd24c32191..b9780330a98 100644 --- a/src/accelerate/accelerator.py +++ b/src/accelerate/accelerator.py @@ -881,7 +881,7 @@ def get_state_dict(self, model): is_zero_3 = self.state.deepspeed_plugin.zero_stage == 3 ...
fedora-infra__bodhi-3464
Greenwave consumer should not process the compose results Currently the greenwave consumer consumes all the messages from `topic=org.fedoraproject.prod.greenwave.decision.update` but some messages on this topic are related to compose results and not koji build. The consumer should filter the messages based on the `s...
[ { "content": "# Copyright © 2019 Red Hat, Inc.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your opt...
[ { "content": "# Copyright © 2019 Red Hat, Inc.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your opt...
diff --git a/bodhi/server/consumers/greenwave.py b/bodhi/server/consumers/greenwave.py index b072dcbd7a..51e0e3c034 100644 --- a/bodhi/server/consumers/greenwave.py +++ b/bodhi/server/consumers/greenwave.py @@ -56,6 +56,11 @@ def __call__(self, message: fedora_messaging.api.Message): log.debug("Couldn't fi...
ipython__ipython-14027
Proposal: re-trigger autosuggestion with `right` key (and similar) Once auto-suggestion was discarded it is not currently possible to re-trigger hinting in place (user needs to to type another character and press backspace, or to delete last character and type it again). This is a proposal to re-trigger the suggestions...
[ { "content": "\"\"\"\nModule to define and register Terminal IPython shortcuts with\n:mod:`prompt_toolkit`\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nimport signal\nimport sys\nimport warnings\nfrom dataclasses import dataclass\...
[ { "content": "\"\"\"\nModule to define and register Terminal IPython shortcuts with\n:mod:`prompt_toolkit`\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nimport signal\nimport sys\nimport warnings\nfrom dataclasses import dataclass\...
diff --git a/IPython/terminal/shortcuts/__init__.py b/IPython/terminal/shortcuts/__init__.py index 8189326b4bc..3a39ac3e73b 100644 --- a/IPython/terminal/shortcuts/__init__.py +++ b/IPython/terminal/shortcuts/__init__.py @@ -277,10 +277,7 @@ def create_identifier(handler: Callable): Binding( auto_suggest....
flask-admin__flask-admin-1924
Small typo in flask_admin.base Should be provided rather than povided.
[ { "content": "import os.path as op\nimport warnings\n\nfrom functools import wraps\n\nfrom flask import Blueprint, current_app, render_template, abort, g, url_for\nfrom flask_admin import babel\nfrom flask_admin._compat import with_metaclass, as_unicode\nfrom flask_admin import helpers as h\n\n# For compatibili...
[ { "content": "import os.path as op\nimport warnings\n\nfrom functools import wraps\n\nfrom flask import Blueprint, current_app, render_template, abort, g, url_for\nfrom flask_admin import babel\nfrom flask_admin._compat import with_metaclass, as_unicode\nfrom flask_admin import helpers as h\n\n# For compatibili...
diff --git a/flask_admin/base.py b/flask_admin/base.py index a863ed32f..d2fad7bf8 100644 --- a/flask_admin/base.py +++ b/flask_admin/base.py @@ -257,7 +257,7 @@ def create_blueprint(self, admin): self.static_folder = 'static' self.static_url_path = '/static/admin' - # If name ...
Parsl__parsl-3153
Bad string templating in deprecation message **Describe the bug** PR #3117 changed the name of the max_workers parameter, and introduced a deprecation message if someone still tries to use the old max_workers name. That message prints out like this: ``` python3 -X dev >>> import parsl as p >>> p.HighThrough...
[ { "content": "import typing\nfrom concurrent.futures import Future\nimport typeguard\nimport logging\nimport threading\nimport queue\nimport datetime\nimport pickle\nfrom dataclasses import dataclass\nfrom multiprocessing import Process, Queue\nfrom typing import Dict, Sequence\nfrom typing import List, Optiona...
[ { "content": "import typing\nfrom concurrent.futures import Future\nimport typeguard\nimport logging\nimport threading\nimport queue\nimport datetime\nimport pickle\nfrom dataclasses import dataclass\nfrom multiprocessing import Process, Queue\nfrom typing import Dict, Sequence\nfrom typing import List, Optiona...
diff --git a/parsl/executors/high_throughput/executor.py b/parsl/executors/high_throughput/executor.py index 3084a4165e..ee326c5f66 100644 --- a/parsl/executors/high_throughput/executor.py +++ b/parsl/executors/high_throughput/executor.py @@ -328,7 +328,7 @@ def __init__(self, def _warn_deprecated(self, old: str, ...
ultralytics__ultralytics-8600
Possible typo in `select_highest_overlaps` function doc https://github.com/ultralytics/ultralytics/blob/2d75f72598d5ce80786be61f140673a6d1dd7e57/ultralytics/utils/tal.py#L234 The doc states: > ...the highest **IoI** will be selected Shouldn't this be IOU?
[ { "content": "# Ultralytics YOLO 🚀, AGPL-3.0 license\n\nimport torch\nimport torch.nn as nn\n\nfrom .checks import check_version\nfrom .metrics import bbox_iou, probiou\nfrom .ops import xywhr2xyxyxyxy\n\nTORCH_1_10 = check_version(torch.__version__, \"1.10.0\")\n\n\nclass TaskAlignedAssigner(nn.Module):\n ...
[ { "content": "# Ultralytics YOLO 🚀, AGPL-3.0 license\n\nimport torch\nimport torch.nn as nn\n\nfrom .checks import check_version\nfrom .metrics import bbox_iou, probiou\nfrom .ops import xywhr2xyxyxyxy\n\nTORCH_1_10 = check_version(torch.__version__, \"1.10.0\")\n\n\nclass TaskAlignedAssigner(nn.Module):\n ...
diff --git a/ultralytics/utils/tal.py b/ultralytics/utils/tal.py index 80fee091de5..8e9c8b3a9f1 100644 --- a/ultralytics/utils/tal.py +++ b/ultralytics/utils/tal.py @@ -231,7 +231,7 @@ def select_candidates_in_gts(xy_centers, gt_bboxes, eps=1e-9): @staticmethod def select_highest_overlaps(mask_pos, overlaps, ...
Textualize__textual-4280
`Select` `OptionHighlighted` message leakage The `Select` widget makes use of `OptionList`; when the user opens the `Select` to pick a value, `OptionHighlighted` messages "leak" out of the `Select`. This could result in unexpected messages for the developer who has an `OptionList` and a `Select` in their DOM and who do...
[ { "content": "from __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import TYPE_CHECKING, Generic, Iterable, TypeVar, Union\n\nfrom rich.console import RenderableType\nfrom rich.text import Text\n\nfrom .. import events, on\nfrom ..containers import Horizontal, Vertical\nfrom ..cs...
[ { "content": "from __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import TYPE_CHECKING, Generic, Iterable, TypeVar, Union\n\nfrom rich.console import RenderableType\nfrom rich.text import Text\n\nfrom .. import events, on\nfrom ..containers import Horizontal, Vertical\nfrom ..cs...
diff --git a/CHANGELOG.md b/CHANGELOG.md index f300262eba..86899c5390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Rename `CollapsibleTitle.action_toggle` to `action_toggle_collapsible` to fix clash with `DOMNode.action_toggle` ...
biolab__orange3-5964
Distributions: changing bin width <!-- Thanks for taking the time to report a bug! If you're raising an issue about an add-on (i.e., installed via Options > Add-ons), raise an issue in the relevant add-on's issue tracker instead. See: https://github.com/biolab?q=orange3 To fix the bug, we need to be able to reprodu...
[ { "content": "from functools import partial, reduce\nfrom itertools import count, groupby, repeat\nfrom xml.sax.saxutils import escape\n\nimport numpy as np\nfrom scipy.stats import norm, rayleigh, beta, gamma, pareto, expon\n\nfrom AnyQt.QtWidgets import QGraphicsRectItem\nfrom AnyQt.QtGui import QColor, QPen,...
[ { "content": "from functools import partial, reduce\nfrom itertools import count, groupby, repeat\nfrom xml.sax.saxutils import escape\n\nimport numpy as np\nfrom scipy.stats import norm, rayleigh, beta, gamma, pareto, expon\n\nfrom AnyQt.QtWidgets import QGraphicsRectItem\nfrom AnyQt.QtGui import QColor, QPen,...
diff --git a/Orange/widgets/visualize/owdistributions.py b/Orange/widgets/visualize/owdistributions.py index 492d11e153c..17e8e3f8254 100644 --- a/Orange/widgets/visualize/owdistributions.py +++ b/Orange/widgets/visualize/owdistributions.py @@ -903,6 +903,7 @@ def recompute_binnings(self): self.controls.number...
OpenMined__PySyft-7110
Redundant white spaces in message on tensor creation ## Description <img width="1018" alt="Screenshot 2022-11-24 at 3 46 54 PM" src="https://user-images.githubusercontent.com/6521018/203723732-ecae0e8c-d724-4860-ad71-6d1d8a6e2caf.png"> ## How to Reproduce Create any `sy.Tensor` ## Expected Behavior A clear a...
[ { "content": "# future\nfrom __future__ import annotations\n\n# stdlib\nimport secrets\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Union\n\n# third party\nimport numpy as np\nimp...
[ { "content": "# future\nfrom __future__ import annotations\n\n# stdlib\nimport secrets\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Union\n\n# third party\nimport numpy as np\nimp...
diff --git a/packages/syft/src/syft/core/tensor/tensor.py b/packages/syft/src/syft/core/tensor/tensor.py index 7e6a8dadbc5..29c76a0e701 100644 --- a/packages/syft/src/syft/core/tensor/tensor.py +++ b/packages/syft/src/syft/core/tensor/tensor.py @@ -517,8 +517,8 @@ def __init__( self.public_dtype = public_dtype...
mozilla__pontoon-2984
Rename Firefox accounts in Mozilla accounts There are a few references in the documentation, we should update them. I think renaming internal references (e.g. fxa) goes beyond the scope, as most products will keep that for the time being. We also need to make sure to update whatever package is responsible for the t...
[ { "content": "\"\"\"Django settings for Pontoon.\"\"\"\nimport re\nimport os\nimport socket\n\nfrom django.utils.functional import lazy\n\nimport dj_database_url\n\n\n_dirname = os.path.dirname\n\nROOT = _dirname(_dirname(_dirname(os.path.abspath(__file__))))\n\n\ndef path(*args):\n return os.path.join(ROOT,...
[ { "content": "\"\"\"Django settings for Pontoon.\"\"\"\nimport re\nimport os\nimport socket\n\nfrom django.utils.functional import lazy\n\nimport dj_database_url\n\n\n_dirname = os.path.dirname\n\nROOT = _dirname(_dirname(_dirname(os.path.abspath(__file__))))\n\n\ndef path(*args):\n return os.path.join(ROOT,...
diff --git a/docs/admin/deployment.rst b/docs/admin/deployment.rst index e8cd731d2c..0c1f56164a 100644 --- a/docs/admin/deployment.rst +++ b/docs/admin/deployment.rst @@ -67,7 +67,7 @@ you create: ``AUTHENTICATION_METHOD`` The default value is `django`, which allows you to log in via accounts created using `mana...
googleapis__google-cloud-python-7297
BigQuery: KeyError inserting data with missing value into table with nullable field I recently updated the google-cloud-bigquery python package and I am getting a **KeyError** when trying to insert a row with a **missing value** into a table with a **nullable field**. In previous version (I tested it on version 1.5.0)...
[ { "content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ { "content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
diff --git a/bigquery/google/cloud/bigquery/_helpers.py b/bigquery/google/cloud/bigquery/_helpers.py index 10753cfc998b..72e1fa276dd7 100644 --- a/bigquery/google/cloud/bigquery/_helpers.py +++ b/bigquery/google/cloud/bigquery/_helpers.py @@ -398,7 +398,10 @@ def _record_field_to_json(fields, row_value): for sub...
benoitc__gunicorn-2687
WSGI sendfile does not respect file current offset Hi, on Linux, I need to stream a regular file from the disk starting from a specific offset. According to Django doc, when you use a FileReponse you can seek your file to a specific offset and only the remaining part of the file will be streamed from this offset ...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport io\nimport logging\nimport os\nimport re\nimport sys\n\nfrom gunicorn.http.message import HEADER_RE\nfrom gunicorn.http.errors import InvalidHeader, InvalidHe...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport io\nimport logging\nimport os\nimport re\nimport sys\n\nfrom gunicorn.http.message import HEADER_RE\nfrom gunicorn.http.errors import InvalidHeader, InvalidHe...
diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 0fcff5a24..5d91706c1 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -372,7 +372,7 @@ def sendfile(self, respiter): chunk_size = "%X\r\n" % nbytes self.sock.sendall(chunk_size.encode('utf-8')) if nbytes...
borgbackup__borg-1459
per archive total item count limit the archive item (which has a list of "item metadata stream" chunks) is currently stored as a single object. we limit size of repo objects to MAX_OBJ_SIZE (20MB). note: we did only enforce the limit on get() - not on put(). each list entry takes ~40 bytes (32 sha256 id + 2 \* 4...
[ { "content": "from binascii import hexlify\nfrom contextlib import contextmanager\nfrom datetime import datetime, timezone\nfrom getpass import getuser\nfrom itertools import groupby\nimport errno\n\nfrom .logger import create_logger\nlogger = create_logger()\nfrom .key import key_factory\nfrom .remote import c...
[ { "content": "from binascii import hexlify\nfrom contextlib import contextmanager\nfrom datetime import datetime, timezone\nfrom getpass import getuser\nfrom itertools import groupby\nimport errno\n\nfrom .logger import create_logger\nlogger = create_logger()\nfrom .key import key_factory\nfrom .remote import c...
diff --git a/borg/archive.py b/borg/archive.py index 653e2dd1c2..4498c72a3b 100644 --- a/borg/archive.py +++ b/borg/archive.py @@ -39,7 +39,7 @@ CHUNKER_PARAMS = (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE) # chunker params for the items metadata stream, finer granularity -ITEMS_CHUNKER_PARAMS =...
jazzband__django-oauth-toolkit-1288
Allow Authorization Code flow without a client_secret - Initial commit with Patch & testcases Hello @n2ygk Here's the PR <!-- See https://django-oauth-toolkit.readthedocs.io/en/latest/contributing.html#pull-requests --> <!-- If there's already an issue that this PR fixes, add that issue number below after 'Fixes...
[ { "content": "import base64\nimport binascii\nimport http.client\nimport inspect\nimport json\nimport logging\nimport uuid\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom urllib.parse import unquote_plus\n\nimport requests\nfrom django.conf import settings\nfrom django.contr...
[ { "content": "import base64\nimport binascii\nimport http.client\nimport inspect\nimport json\nimport logging\nimport uuid\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom urllib.parse import unquote_plus\n\nimport requests\nfrom django.conf import settings\nfrom django.contr...
diff --git a/AUTHORS b/AUTHORS index 4afedcbfa..048085a11 100644 --- a/AUTHORS +++ b/AUTHORS @@ -55,6 +55,7 @@ Federico Dolce Florian Demmer Frederico Vieira Gaël Utard +Glauco Junior Hasan Ramezani Hiroki Kiyohara Hossein Shakiba diff --git a/CHANGELOG.md b/CHANGELOG.md index 216ea20f6..dfe72e91d 100644 --- a/CH...
saulpw__visidata-1011
vds: cannot export sheets containing a date column **Small description** It's not possible to save a sheet to a .vds file if said sheet contains a date column. This results in the error below. **Expected result** It should just work(tm). **Actual result with screenshot** ```stacktrace Traceback (most r...
[ { "content": "'Custom VisiData save format'\n\nimport json\nfrom visidata import *\n\nNL='\\n'\n\n@VisiData.api\ndef open_vds(vd, p):\n return VdsIndexSheet(p.name, source=p)\n\n\n@VisiData.api\ndef save_vds(vd, p, *sheets):\n 'Save in custom VisiData format, preserving columns and their attributes.'\n\n ...
[ { "content": "'Custom VisiData save format'\n\nimport json\nfrom visidata import *\n\nNL='\\n'\n\n@VisiData.api\ndef open_vds(vd, p):\n return VdsIndexSheet(p.name, source=p)\n\n\n@VisiData.api\ndef save_vds(vd, p, *sheets):\n 'Save in custom VisiData format, preserving columns and their attributes.'\n\n ...
diff --git a/visidata/loaders/vds.py b/visidata/loaders/vds.py index 589424e84..ae9178741 100644 --- a/visidata/loaders/vds.py +++ b/visidata/loaders/vds.py @@ -29,7 +29,7 @@ def save_vds(vd, p, *sheets): with Progress(gerund='saving'): for row in vs.iterdispvals(*vs.visibleCols, format=Fa...
huggingface__transformers-4098
run_language_modeling, RuntimeError: expected scalar type Half but found Float # 🐛 Bug ## Information CUDA: 10.1 Python 3.6.8 (default, Oct 7 2019, 12:59:55) Installed transformers from source. Trying to train **gpt2-medium** Command Line: ``` export TRAIN_FILE=dataset/wiki.train.raw export TEST_FILE=d...
[ { "content": "# coding=utf-8\n# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You ma...
[ { "content": "# coding=utf-8\n# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You ma...
diff --git a/notebooks/trainer/01_text_classification.ipynb b/notebooks/trainer/01_text_classification.ipynb new file mode 100644 index 000000000000..39ca03a250d2 --- /dev/null +++ b/notebooks/trainer/01_text_classification.ipynb @@ -0,0 +1,726 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "cola...
facebookresearch__ParlAI-2649
Throw error if bool is used in add_argument? in our `ParlaiParser.add_argument`, if the type argument is a literal bool, we should either throw an error or maybe smartly switch to `'bool'` with a warning?
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nProvide an argument parser and default command line options for using ParlAI.\n\"\"\"\...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nProvide an argument parser and default command line options for using ParlAI.\n\"\"\"\...
diff --git a/parlai/core/params.py b/parlai/core/params.py index 12d5bf7a67c..3740da152c7 100644 --- a/parlai/core/params.py +++ b/parlai/core/params.py @@ -1162,6 +1162,9 @@ def _handle_custom_options(self, kwargs): hidden = kwargs.pop('hidden') if hidden: kwargs['help'] = ar...
scoutapp__scout_apm_python-146
PyYAML security alert Our application is getting a GitHub security alert from PyYAML, and this is the only package that has it as a dependency in our graph. It looks like this package no longer uses that package, but it is still declared as a dependency. If this assessment is correct, the dependency should be remove...
[ { "content": "import os\nimport sys\nfrom glob import glob\n\nfrom setuptools import Extension, find_packages, setup\n\nlong_description = (\n \"Scout Application Performance Monitoring Agent - https://scoutapp.com\"\n)\nif os.path.exists(\"README.md\"):\n long_description = open(\"README.md\").read()\n\n...
[ { "content": "import os\nimport sys\nfrom glob import glob\n\nfrom setuptools import Extension, find_packages, setup\n\nlong_description = (\n \"Scout Application Performance Monitoring Agent - https://scoutapp.com\"\n)\nif os.path.exists(\"README.md\"):\n long_description = open(\"README.md\").read()\n\n...
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 7901ca54..501be101 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -89,7 +89,7 @@ for example 2.7 and 3.7. In that case, do the whole setup for each virtualenv. Install all test dependencies: - $ pip install bottle celery Django elasticsearch flask flask-sq...
fidals__shopelectro-462
dc-volumes.yml:27-28: Repair npm container reusing at... The puzzle `449-27d8c19e` from #449 has to be resolved: https://github.com/fidals/shopelectro/blob/f8ce85246c00411fcb21d025b0fb42abab81c7d5/docker/dc-volumes.yml#L27-L28 The puzzle was created by duker33 on 28-Jul-18. Estimate: 60 minutes, If you have a...
[ { "content": "import glob\nimport logging\nimport math\nimport os\nimport shutil\nimport subprocess\nimport time\nfrom contextlib import contextmanager\nfrom itertools import chain\nfrom typing import Iterator, Dict\nfrom uuid import UUID\nfrom xml.etree import ElementTree\n\nimport requests\nfrom django.conf i...
[ { "content": "import glob\nimport logging\nimport math\nimport os\nimport shutil\nimport subprocess\nimport time\nfrom contextlib import contextmanager\nfrom itertools import chain\nfrom typing import Iterator, Dict\nfrom uuid import UUID\nfrom xml.etree import ElementTree\n\nimport requests\nfrom django.conf i...
diff --git a/.drone.yml b/.drone.yml index 389a46eb..de4ee2c8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,39 +19,32 @@ pipeline: when: event: [push, pull_request] - npm: # old `npm install` - image: node:slim + nodejs-build: # with `npm install` inside + image: docker/compose:1.22.0 env...
saleor__saleor-3059
[Backend] [Cosmetics] CELERY_TASK_ALWAYS_EAGER strange set value In settings present strange code: `CELERY_TASK_ALWAYS_EAGER = False if CELERY_BROKER_URL else True` can easy rewrite to: `CELERY_TASK_ALWAYS_EAGER = not CELERY_BROKER_URL`
[ { "content": "import ast\nimport os.path\n\nimport dj_database_url\nimport dj_email_url\nimport django_cache_url\nfrom django.contrib.messages import constants as messages\nfrom django.utils.translation import gettext_lazy as _, pgettext_lazy\nfrom django_prices.templatetags.prices_i18n import get_currency_frac...
[ { "content": "import ast\nimport os.path\n\nimport dj_database_url\nimport dj_email_url\nimport django_cache_url\nfrom django.contrib.messages import constants as messages\nfrom django.utils.translation import gettext_lazy as _, pgettext_lazy\nfrom django_prices.templatetags.prices_i18n import get_currency_frac...
diff --git a/saleor/settings.py b/saleor/settings.py index 834500eb05e..319799bb02d 100644 --- a/saleor/settings.py +++ b/saleor/settings.py @@ -480,7 +480,7 @@ def get_host(): # CELERY SETTINGS CELERY_BROKER_URL = os.environ.get( 'CELERY_BROKER_URL', os.environ.get('CLOUDAMQP_URL')) or '' -CELERY_TASK_ALWAYS_EA...
Gallopsled__pwntools-1057
DynELF._find_linkmap bug https://github.com/Gallopsled/pwntools/blob/b53e58a840c890340fa755a2229c3ff774c5f81e/pwnlib/dynelf.py#L450 Bug after commit bb25140807a4d Must be: ```python w.status("r_debug.linkmap %#x" % linkmap) ```
[ { "content": "\"\"\"\nResolve symbols in loaded, dynamically-linked ELF binaries.\nGiven a function which can leak data at an arbitrary address,\nany symbol in any loaded library can be resolved.\n\nExample\n^^^^^^^^\n\n::\n\n # Assume a process or remote connection\n p = process('./pwnme')\n\n # Decla...
[ { "content": "\"\"\"\nResolve symbols in loaded, dynamically-linked ELF binaries.\nGiven a function which can leak data at an arbitrary address,\nany symbol in any loaded library can be resolved.\n\nExample\n^^^^^^^^\n\n::\n\n # Assume a process or remote connection\n p = process('./pwnme')\n\n # Decla...
diff --git a/pwnlib/dynelf.py b/pwnlib/dynelf.py index b3f502647..83714496e 100644 --- a/pwnlib/dynelf.py +++ b/pwnlib/dynelf.py @@ -447,7 +447,7 @@ def _find_linkmap(self, pltgot=None, debug=None): if debug: w.status("r_debug.linkmap") linkmap = self.leak.field(debug, r_d...
pyodide__pyodide-3074
Export version from pyodide JS module ## 🚀 Feature In `pyodide.d.ts` I see `declare let version: string;` but it's not exported. It'd be great if it was exported so that I can do this: ```ts import {version} from "pyodide"; ``` ### Motivation I have [some code](https://github.com/alexmojaki/pyodide-worke...
[ { "content": "#!/usr/bin/env python3\n\nimport argparse\nimport difflib\nimport functools\nimport itertools\nimport pathlib\nimport re\nfrom ast import Str\nfrom collections import namedtuple\nfrom collections.abc import Callable\n\nCORE_VERSION_REGEX = r\"(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)\"\n...
[ { "content": "#!/usr/bin/env python3\n\nimport argparse\nimport difflib\nimport functools\nimport itertools\nimport pathlib\nimport re\nfrom ast import Str\nfrom collections import namedtuple\nfrom collections.abc import Callable\n\nCORE_VERSION_REGEX = r\"(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)\"\n...
diff --git a/docs/project/changelog.md b/docs/project/changelog.md index 22d5ba5b90d..effae95b349 100644 --- a/docs/project/changelog.md +++ b/docs/project/changelog.md @@ -67,6 +67,10 @@ substitutions: {pr}`3015` included in 0.21.2) and if there is a variable in top level scope called `__dirname` we use that for...
google__personfinder-457
dmp_csv cron job should not be run for deactivated repos
[ { "content": "#!/usr/bin/python2.7\n# Copyright 2010 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
[ { "content": "#!/usr/bin/python2.7\n# Copyright 2010 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
diff --git a/app/tasks.py b/app/tasks.py index 2bb2a6c2ca..72f537c07f 100644 --- a/app/tasks.py +++ b/app/tasks.py @@ -522,7 +522,7 @@ def get(self): # just a convenient place to call it. self.storage.set_objects_lifetime(lifetime_days=2) - for repo in model.Repo.list(): + ...
mozilla__bugbug-3721
MEI: Have a measure of incoming/closed defects vs. existing open Based on [this doc](https://docs.google.com/document/d/1nWP3DtSWneYT8ietXuBa6uPszMKMgICXf3b2dwMVXYk/edit#heading=h.9joq5dbpnw41). ``` Incoming(TimeInterval) := NumOpenedDefects(TimeInterval) / NumOpenDefects(Start(TimeInterval)) Closed(TimeInterval) ...
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport collections\nimport csv\nimport math\nimport re\nfrom datetime...
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport collections\nimport csv\nimport math\nimport re\nfrom datetime...
diff --git a/bugbug/bugzilla.py b/bugbug/bugzilla.py index a2bb9e271f..41ba51d1ea 100644 --- a/bugbug/bugzilla.py +++ b/bugbug/bugzilla.py @@ -557,8 +557,14 @@ def calculate_maintenance_effectiveness_indicator( else: wbdtime = math.inf + estimated_start_open_defects = open_defects + closed_defects - ...
pyqtgraph__pyqtgraph-1168
Hiding nested group parameters Hiding groups nested in groups does not work after the widget is shown. Look at this minimal example: ``` import os import pyqtgraph.parametertree.ParameterTree as ParameterTree from pyqtgraph.parametertree import Parameter, parameterTypes from pyqtgraph.Qt import QtCore, QtGui ...
[ { "content": "from ..Qt import QtCore, QtGui\nfrom ..python2_3 import asUnicode\nfrom .Parameter import Parameter, registerParameterType\nfrom .ParameterItem import ParameterItem\nfrom ..widgets.SpinBox import SpinBox\nfrom ..widgets.ColorButton import ColorButton\nfrom ..colormap import ColorMap\n#from ..widge...
[ { "content": "from ..Qt import QtCore, QtGui\nfrom ..python2_3 import asUnicode\nfrom .Parameter import Parameter, registerParameterType\nfrom .ParameterItem import ParameterItem\nfrom ..widgets.SpinBox import SpinBox\nfrom ..widgets.ColorButton import ColorButton\nfrom ..colormap import ColorMap\n#from ..widge...
diff --git a/pyqtgraph/parametertree/parameterTypes.py b/pyqtgraph/parametertree/parameterTypes.py index b728fb8edb..a8e3781dc8 100644 --- a/pyqtgraph/parametertree/parameterTypes.py +++ b/pyqtgraph/parametertree/parameterTypes.py @@ -437,8 +437,10 @@ def addChild(self, child): ## make sure added childs are actually i...
ckan__ckan-5937
sqlalchemy setting "pool_pre_ping" **CKAN version** Introduced in commit https://github.com/ckan/ckan/commit/ae9eb1360028a77b35506716eed2768349827806 which is related at least to 2.9.0, 2.9.1, 2.9.2. **Describe the bug** This is the ckan code: ```python # Enable pessimistic disconnect handling (added in...
[ { "content": "# encoding: utf-8\n\n'''CKAN environment configuration'''\nimport os\nimport logging\nimport warnings\nimport pytz\n\nimport six\nimport sqlalchemy\n\nfrom six.moves.urllib.parse import urlparse\n\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.lib.plugins as lib_plugins\nimport...
[ { "content": "# encoding: utf-8\n\n'''CKAN environment configuration'''\nimport os\nimport logging\nimport warnings\nimport pytz\n\nimport six\nimport sqlalchemy\n\nfrom six.moves.urllib.parse import urlparse\n\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.lib.plugins as lib_plugins\nimport...
diff --git a/ckan/config/environment.py b/ckan/config/environment.py index a6be2cc0f91..6af279e5ffe 100644 --- a/ckan/config/environment.py +++ b/ckan/config/environment.py @@ -286,7 +286,7 @@ def update_config(): # Enable pessimistic disconnect handling (added in SQLAlchemy 1.2) # to eliminate database err...
pallets__werkzeug-2103
LocalStack class has strange behavior under asyncio The new `LocalStack` implementation based on the contextvars module has a strange behavior when used under asyncio. The problem appears to be related to the inheritance of contexts that occur between a parent and children async tasks, combined with the fact that the s...
[ { "content": "import copy\nimport math\nimport operator\nimport sys\nimport typing as t\nimport warnings\nfrom functools import partial\nfrom functools import update_wrapper\n\nfrom .wsgi import ClosingIterator\n\nif t.TYPE_CHECKING:\n from wsgiref.types import WSGIApplication\n\ntry:\n from greenlet impo...
[ { "content": "import copy\nimport math\nimport operator\nimport sys\nimport typing as t\nimport warnings\nfrom functools import partial\nfrom functools import update_wrapper\n\nfrom .wsgi import ClosingIterator\n\nif t.TYPE_CHECKING:\n from wsgiref.types import WSGIApplication\n\ntry:\n from greenlet impo...
diff --git a/src/werkzeug/local.py b/src/werkzeug/local.py index 9e9fdd615..e1773a838 100644 --- a/src/werkzeug/local.py +++ b/src/werkzeug/local.py @@ -219,10 +219,9 @@ def _lookup(): def push(self, obj: t.Any) -> t.List[t.Any]: """Pushes a new item to the stack""" - rv = getattr(self._local, "s...
zulip__zulip-20148
Clear `prefers_web_public_view` cookie when logging in or registering an account In #19902, we added functionality to remember who had accessed Zulip as a spectator and immediately take them to the spectator experience. We probably want to clear the `prefers_web_public_view` cookie when logging in via `do_login` or re...
[ { "content": "import logging\nimport secrets\nfrom typing import List, Optional, Tuple\n\nfrom django.conf import settings\nfrom django.http import HttpRequest, HttpResponse\nfrom django.shortcuts import redirect, render\nfrom django.utils.cache import patch_cache_control\n\nfrom zerver.context_processors impor...
[ { "content": "import logging\nimport secrets\nfrom typing import List, Optional, Tuple\n\nfrom django.conf import settings\nfrom django.http import HttpRequest, HttpResponse\nfrom django.shortcuts import redirect, render\nfrom django.utils.cache import patch_cache_control\n\nfrom zerver.context_processors impor...
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index 7b74a8ba7f38f..c346468ff3799 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -330,6 +330,12 @@ def test_logged_out_home(self) -> None: ] expected_keys = [i for i in self.expected_page_params_keys if i no...
rasterio__rasterio-618
YCbCr JPEG-in-TIFF breaks rio-info One creates a YCbCr JPEG-in-TIFF with GDAL using `photometric=YCbCr` and `compress=JPEG` options. But reading the TIFFs tags to get the compression method returns "YCbCr JPEG", a value that's not in `rasterio.enums.Compression`. Reference: http://www.gdal.org/frmt_gtiff.html Solutio...
[ { "content": "\nfrom enum import Enum, IntEnum\n\n\nclass ColorInterp(IntEnum):\n undefined=0\n grey=1\n gray=1\n palette=2\n red=3\n green=4\n blue=5\n alpha=6\n hue=7\n saturation=8\n lightness=9\n cyan=10\n magenta=11\n yellow=12\n black=13\n\n\nclass Resampling(E...
[ { "content": "\nfrom enum import Enum, IntEnum\n\n\nclass ColorInterp(IntEnum):\n undefined=0\n grey=1\n gray=1\n palette=2\n red=3\n green=4\n blue=5\n alpha=6\n hue=7\n saturation=8\n lightness=9\n cyan=10\n magenta=11\n yellow=12\n black=13\n Y=14\n Cb=15\n ...
diff --git a/README.rst b/README.rst index 8cc6fc760..eaac96cf0 100644 --- a/README.rst +++ b/README.rst @@ -7,8 +7,8 @@ Rasterio reads and writes geospatial raster datasets. .. image:: https://travis-ci.org/mapbox/rasterio.png?branch=master :target: https://travis-ci.org/mapbox/rasterio -.. image:: https://cove...
internetarchive__openlibrary-9322
add a failing author name test <!-- What issue does this PR close? --> Demonstrates a bug in #9003 <!-- What does this PR achieve? [feature|hotfix|fix|refactor] --> `Drini` -> `ini` **Expected:** `Drini` -> `Drini` 😉 ### Technical <!-- What should be noted about the implementation? --> ### Testin...
[ { "content": "from typing import TYPE_CHECKING, Any, Final\nimport web\nfrom openlibrary.catalog.utils import flip_name, author_dates_match, key_int\nfrom openlibrary.core.helpers import extract_year\n\n\nif TYPE_CHECKING:\n from openlibrary.plugins.upstream.models import Author\n\n\n# Sort by descending len...
[ { "content": "from typing import TYPE_CHECKING, Any, Final\nimport web\nfrom openlibrary.catalog.utils import flip_name, author_dates_match, key_int\nfrom openlibrary.core.helpers import extract_year\n\n\nif TYPE_CHECKING:\n from openlibrary.plugins.upstream.models import Author\n\n\n# Sort by descending len...
diff --git a/openlibrary/catalog/add_book/load_book.py b/openlibrary/catalog/add_book/load_book.py index e47cb6e7792..958dcafb952 100644 --- a/openlibrary/catalog/add_book/load_book.py +++ b/openlibrary/catalog/add_book/load_book.py @@ -236,11 +236,11 @@ def remove_author_honorifics(name: str) -> str: ( ...
readthedocs__readthedocs.org-5034
Setting default branch uses Version.slug instead of identifier ## Details * Read the Docs project URL: https://readthedocs.org/projects/test-builds/ * Build URL (if applicable): https://readthedocs.org/projects/test-builds/builds/8319150/ * Read the Docs username (if applicable): humitos ## Expected Result B...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Project forms.\"\"\"\n\nfrom __future__ import (\n absolute_import,\n division,\n print_function,\n unicode_literals,\n)\n\nfrom random import choice\n\nfrom builtins import object\nfrom django import forms\nfrom django.conf import settings\nfrom django.c...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Project forms.\"\"\"\n\nfrom __future__ import (\n absolute_import,\n division,\n print_function,\n unicode_literals,\n)\n\nfrom random import choice\n\nfrom builtins import object\nfrom django import forms\nfrom django.conf import settings\nfrom django.c...
diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py index e8bff7505f9..c21333e76d5 100644 --- a/readthedocs/projects/forms.py +++ b/readthedocs/projects/forms.py @@ -222,7 +222,7 @@ def __init__(self, *args, **kwargs): default_choice = (None, '-' * 9) all_versions = self.insta...
cloud-custodian__cloud-custodian-4868
c7n-org not respecting policy org region restrictions Pushing two policy at org level to be deployed in separate regions. This is what I am doing: c7n-org run -c AWS/base/provisioning/NonProd/accounts.yml -r all -s /tmp/out -u AWS/policies/nonprod/01-common/asg-off-hours.yml Policies look like this: policies: ...
[ { "content": "# Copyright 2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ { "content": "# Copyright 2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
diff --git a/tools/c7n_org/c7n_org/cli.py b/tools/c7n_org/c7n_org/cli.py index 2541de52e25..25f7ccccaca 100644 --- a/tools/c7n_org/c7n_org/cli.py +++ b/tools/c7n_org/c7n_org/cli.py @@ -538,6 +538,9 @@ def run_account(account, region, policies_config, output_path, p.expand_variables(p.get_variables(account....
CiviWiki__OpenCiviWiki-521
Can't Publish New Thread I attempted to make a new thread on Civiwiki.org. I was able to create the content, but when I hit publish it throws a server error. ![image](https://user-images.githubusercontent.com/30572202/57983784-ba53aa00-7a23-11e9-8e32-a036612b47b3.png)
[ { "content": "import json\nimport PIL\nimport urllib\nimport uuid\n\nfrom notifications.signals import notify\n\n# django packages\nfrom django.db.models.query import F\nfrom django.contrib.auth.models import User\nfrom django.http import (\n JsonResponse,\n HttpResponse,\n HttpResponseServerError,\n ...
[ { "content": "import json\nimport PIL\nimport urllib\nimport uuid\n\nfrom notifications.signals import notify\n\n# django packages\nfrom django.db.models.query import F\nfrom django.contrib.auth.models import User\nfrom django.http import (\n JsonResponse,\n HttpResponse,\n HttpResponseServerError,\n ...
diff --git a/project/api/write.py b/project/api/write.py index 2145dbb5a..795700ed9 100644 --- a/project/api/write.py +++ b/project/api/write.py @@ -263,7 +263,8 @@ def editThread(request): if not thread_id: return HttpResponseBadRequest(reason="Invalid Thread Reference") - if not is_draft: + # fo...
pytorch__vision-2159
NMS returns different results on CPU & CUDA ## 🐛 Bug Hi, I noticed that results of `torchvision.ops.nms` in CPU and CUDA have different value ## To Reproduce Steps to reproduce the behavior: 1. `docker run --runtime=nvidia -it pytorch/pytorch:1.5-cuda10.1-cudnn7-devel bash` 2. run this script : ``` im...
[ { "content": "import torch\nfrom torch.jit.annotations import Tuple\nfrom torch import Tensor\nimport torchvision\n\n\ndef nms(boxes, scores, iou_threshold):\n # type: (Tensor, Tensor, float)\n \"\"\"\n Performs non-maximum suppression (NMS) on the boxes according\n to their intersection-over-union ...
[ { "content": "import torch\nfrom torch.jit.annotations import Tuple\nfrom torch import Tensor\nimport torchvision\n\n\ndef nms(boxes, scores, iou_threshold):\n # type: (Tensor, Tensor, float)\n \"\"\"\n Performs non-maximum suppression (NMS) on the boxes according\n to their intersection-over-union ...
diff --git a/torchvision/ops/boxes.py b/torchvision/ops/boxes.py index 4bbc9c1fdad..686d6233354 100644 --- a/torchvision/ops/boxes.py +++ b/torchvision/ops/boxes.py @@ -14,6 +14,11 @@ def nms(boxes, scores, iou_threshold): IoU greater than iou_threshold with another (higher scoring) box. + If multiple bo...
lutris__lutris-3941
MicroM8 runner does not work I installed the MicroM8 runner and tried to manually configure an Apple II game by selecting the runner and pointing it to an Apple II floppy. Debug output shows a “No game found in library” error, but no indication of specifically what file it is looking for that it can’t find. ``` ~$ ...
[ { "content": "\"\"\"Base module for runners\"\"\"\nimport os\nfrom gettext import gettext as _\n\nfrom gi.repository import Gtk\n\nfrom lutris import runtime, settings\nfrom lutris.command import MonitoredCommand\nfrom lutris.config import LutrisConfig\nfrom lutris.database.games import get_game_by_field\nfrom ...
[ { "content": "\"\"\"Base module for runners\"\"\"\nimport os\nfrom gettext import gettext as _\n\nfrom gi.repository import Gtk\n\nfrom lutris import runtime, settings\nfrom lutris.command import MonitoredCommand\nfrom lutris.config import LutrisConfig\nfrom lutris.database.games import get_game_by_field\nfrom ...
diff --git a/lutris/runners/runner.py b/lutris/runners/runner.py index 693433deb3..b855fb526c 100644 --- a/lutris/runners/runner.py +++ b/lutris/runners/runner.py @@ -411,6 +411,11 @@ def extract(self, archive=None, dest=None, merge_single=None, callback=None): from lutris.util.wine.wine import get_wine_ve...
wemake-services__wemake-python-styleguide-884
Wrong and correct examples of nested annotations mixed up in docs for Union type # Bug report <!-- Hi, thanks for submitting a bug. We appreciate that. But, we will need some information about what's wrong to help you. --> ## What's wrong From ``NestedAnnotationsViolation`` class docstring: ``` Example:...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThese checks help to prevent incorrect usage of Python 3 typing annotations.\n\nWhile they maybe of a great help in writing clear\nand concise code, they still can be abused.\n\nOnce again, these rules are highly subjective. But, we love them.\n\n.. currentmodule...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThese checks help to prevent incorrect usage of Python 3 typing annotations.\n\nWhile they maybe of a great help in writing clear\nand concise code, they still can be abused.\n\nOnce again, these rules are highly subjective. But, we love them.\n\n.. currentmodule...
diff --git a/wemake_python_styleguide/violations/annotations.py b/wemake_python_styleguide/violations/annotations.py index 46c29c750..29a845f01 100644 --- a/wemake_python_styleguide/violations/annotations.py +++ b/wemake_python_styleguide/violations/annotations.py @@ -79,11 +79,11 @@ class NestedAnnotationsViolation(AS...
biopython__biopython-4468
HMMER Parser doesn't work with Windows The regex defined here: https://github.com/krdav/ANARCI_KD_copy/blob/5c4a17f6f0bc530b3e5154667e285eea1195a485/lib/python/anarci/Bio/SearchIO/HmmerIO/hmmer3_text.py#L24 Is unable to find any matches in this output banner from hmmscan: '# C:\\msys64\\scr\\jou\\builds\\22-2\...
[ { "content": "# Copyright 2012 by Wibowo Arindrarto. All rights reserved.\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# pa...
[ { "content": "# Copyright 2012 by Wibowo Arindrarto. All rights reserved.\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# pa...
diff --git a/Bio/SearchIO/HmmerIO/hmmer3_text.py b/Bio/SearchIO/HmmerIO/hmmer3_text.py index d564bed58b8..3cb88601f92 100644 --- a/Bio/SearchIO/HmmerIO/hmmer3_text.py +++ b/Bio/SearchIO/HmmerIO/hmmer3_text.py @@ -17,7 +17,7 @@ # precompile regex patterns for faster processing # regex for program name capture -_RE_P...
openshift__openshift-ansible-2358
enable service-serving-cert-signer by default Commands like `oadm router` want to take advantage of the service-serving-cert-signing controller. This requires that ``` yaml controllerConfig: serviceServingCert: signer: certFile: service-signer.crt keyFile: service-signer.key ``` in the master-conf...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\nimport yaml\n\nfrom ansible import errors\nfrom distutils.version import LooseVersion\n\n# pylint: disable=no-name-in-module,import-er...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\nimport yaml\n\nfrom ansible import errors\nfrom distutils.version import LooseVersion\n\n# pylint: disable=no-name-in-module,import-er...
diff --git a/filter_plugins/openshift_master.py b/filter_plugins/openshift_master.py index d196d6c1f88..ee6a62ba55e 100644 --- a/filter_plugins/openshift_master.py +++ b/filter_plugins/openshift_master.py @@ -550,6 +550,9 @@ def certificates_to_synchronize(hostvars, include_keys=True): certs += ['openshift...
PennyLaneAI__pennylane-1223
Repeated applications of the torch interface result in an error when using templates Consider the following code: ```python import torch import pennylane as qml n_qubits = 2 dev = qml.device("default.qubit", wires=n_qubits) def circuit(weights): qml.templates.BasicEntanglerLayers(weights, wires=range(n...
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle...
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle...
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 456e825913d..adfa21c146c 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -773,6 +773,9 @@ second-order observable. [(#1197)](https://github.com/PennyLaneAI/pennylane/pull/1197) +* Fixes a bug where repeated Torch interface applicatio...
certbot__certbot-5192
We shouldn't be adding a commented out renewal block during the same run as adding an uncommented one when deploying certs with multiple domains
[ { "content": "\"\"\"Nginx Configuration\"\"\"\nimport logging\nimport os\nimport re\nimport socket\nimport subprocess\nimport tempfile\nimport time\n\nimport OpenSSL\nimport six\nimport zope.interface\n\nfrom acme import challenges\nfrom acme import crypto_util as acme_crypto_util\n\nfrom certbot import constan...
[ { "content": "\"\"\"Nginx Configuration\"\"\"\nimport logging\nimport os\nimport re\nimport socket\nimport subprocess\nimport tempfile\nimport time\n\nimport OpenSSL\nimport six\nimport zope.interface\n\nfrom acme import challenges\nfrom acme import crypto_util as acme_crypto_util\n\nfrom certbot import constan...
diff --git a/certbot-nginx/certbot_nginx/configurator.py b/certbot-nginx/certbot_nginx/configurator.py index ba6c565c0fb..4857942a1a6 100644 --- a/certbot-nginx/certbot_nginx/configurator.py +++ b/certbot-nginx/certbot_nginx/configurator.py @@ -30,7 +30,7 @@ logger = logging.getLogger(__name__) REDIRECT_BLOCK = [[ ...
pytorch__ignite-1978
Improve Accumulation metric on tensors to work with Apex ## 🚀 Feature Request It seems that the ignite is not compatible with apex. When i am trying to use the (automatic mixed precision)amp from the Apex for the GPU Acceleration, I have encountered the following error. Look around the Ignite source code and I find t...
[ { "content": "import numbers\nfrom typing import Callable, Tuple, Union\n\nimport torch\n\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics.metric import Metric, reinit__is_reduced, sync_all_reduce\n\n__all__ = [\"VariableAccumulation\", \"GeometricAverage\", \"Average\"]\n\n\nclass Variabl...
[ { "content": "import numbers\nfrom typing import Callable, Tuple, Union\n\nimport torch\n\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics.metric import Metric, reinit__is_reduced, sync_all_reduce\n\n__all__ = [\"VariableAccumulation\", \"GeometricAverage\", \"Average\"]\n\n\nclass Variabl...
diff --git a/ignite/metrics/accumulation.py b/ignite/metrics/accumulation.py index 8b00a92410d1..c9e85aa464c2 100644 --- a/ignite/metrics/accumulation.py +++ b/ignite/metrics/accumulation.py @@ -67,8 +67,8 @@ def update(self, output: Union[float, torch.Tensor]) -> None: if isinstance(output, torch.Tensor): ...
mindsdb__mindsdb-855
Add update argument to executable function Add optional boolean argument update to [make_executable](https://github.com/mindsdb/mindsdb/blob/staging/mindsdb/utilities/wizards.py#L230)() function, so if it's set to true then the executable should run ``` py -m pip install mindsdb --upgrade ``` before ``` py -...
[ { "content": "import os\nimport json\nfrom datetime import datetime, timedelta\n\n\ndef _in(ask, default, use_default):\n if use_default:\n return default\n\n user_input = input(f'{ask} (Default: {default})')\n if user_input is None or user_input == '':\n user_input = default\n\n if ty...
[ { "content": "import os\nimport json\nfrom datetime import datetime, timedelta\n\n\ndef _in(ask, default, use_default):\n if use_default:\n return default\n\n user_input = input(f'{ask} (Default: {default})')\n if user_input is None or user_input == '':\n user_input = default\n\n if ty...
diff --git a/mindsdb/utilities/wizards.py b/mindsdb/utilities/wizards.py index 7a8d653634d..fc4225b3271 100644 --- a/mindsdb/utilities/wizards.py +++ b/mindsdb/utilities/wizards.py @@ -227,8 +227,14 @@ def daemon_creator(python_path, config_path=None): return daemon_path -def make_executable(python_path, exec_...