problem_id stringlengths 18 22 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 58 | prompt stringlengths 1.1k 10.2k | golden_diff stringlengths 151 4.94k | verification_info stringlengths 582 21k | num_tokens int64 271 2.05k | num_tokens_diff int64 47 1.02k |
|---|---|---|---|---|---|---|---|---|
gh_patches_debug_10357 | rasdani/github-patches | git_diff | Parsl__parsl-2450 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
walltime app function parameter modifies task_record func_name
**Describe the bug**
When the walltime special parameter is passed to a Parsl app the `task_record['func_name']` parameter is set to "wrapper" i... | diff --git a/parsl/app/python.py b/parsl/app/python.py
--- a/parsl/app/python.py
+++ b/parsl/app/python.py
@@ -3,6 +3,8 @@
import tblib.pickling_support
tblib.pickling_support.install()
+from functools import wraps
+
from parsl.app.app import AppBase
from parsl.app.errors import wrap_error
from parsl.dataflow.df... | {"golden_diff": "diff --git a/parsl/app/python.py b/parsl/app/python.py\n--- a/parsl/app/python.py\n+++ b/parsl/app/python.py\n@@ -3,6 +3,8 @@\n import tblib.pickling_support\n tblib.pickling_support.install()\n \n+from functools import wraps\n+\n from parsl.app.app import AppBase\n from parsl.app.errors import wrap_er... | 1,257 | 142 |
gh_patches_debug_24727 | rasdani/github-patches | git_diff | sublimelsp__LSP-1852 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to save modified file when dragged to a new window
Description
Editing typescript project, dragged a tab out to a separate window then modified some lines and tried to save. Sublime won't save unless ... | diff --git a/plugin/save_command.py b/plugin/save_command.py
--- a/plugin/save_command.py
+++ b/plugin/save_command.py
@@ -1,6 +1,6 @@
from .core.registry import LspTextCommand
from .core.settings import userprefs
-from .core.typing import Callable, List, Type
+from .core.typing import Callable, List, Optional, Type
... | {"golden_diff": "diff --git a/plugin/save_command.py b/plugin/save_command.py\n--- a/plugin/save_command.py\n+++ b/plugin/save_command.py\n@@ -1,6 +1,6 @@\n from .core.registry import LspTextCommand\n from .core.settings import userprefs\n-from .core.typing import Callable, List, Type\n+from .core.typing import Callabl... | 1,729 | 327 |
gh_patches_debug_10398 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-4526 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.... | diff --git a/colossalai/pipeline/schedule/_utils.py b/colossalai/pipeline/schedule/_utils.py
--- a/colossalai/pipeline/schedule/_utils.py
+++ b/colossalai/pipeline/schedule/_utils.py
@@ -123,7 +123,10 @@
merged_data = []
for elem_batch in zip(*flattened_data):
if isinstance(elem_batch[0], torch.Tenso... | {"golden_diff": "diff --git a/colossalai/pipeline/schedule/_utils.py b/colossalai/pipeline/schedule/_utils.py\n--- a/colossalai/pipeline/schedule/_utils.py\n+++ b/colossalai/pipeline/schedule/_utils.py\n@@ -123,7 +123,10 @@\n merged_data = []\n for elem_batch in zip(*flattened_data):\n if isinstance(ele... | 1,398 | 186 |
gh_patches_debug_27404 | rasdani/github-patches | git_diff | onnx__onnx-tensorflow-762 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Upsample TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
Hi,
I have a problem with the upsample op when trying to prepare an onnx model converted from keras. Any idea of the solution ?... | diff --git a/onnx_tf/handlers/backend/upsample.py b/onnx_tf/handlers/backend/upsample.py
--- a/onnx_tf/handlers/backend/upsample.py
+++ b/onnx_tf/handlers/backend/upsample.py
@@ -1,6 +1,5 @@
import copy
-import numpy as np
import tensorflow as tf
from onnx_tf.common import exception
@@ -33,20 +32,28 @@
@class... | {"golden_diff": "diff --git a/onnx_tf/handlers/backend/upsample.py b/onnx_tf/handlers/backend/upsample.py\n--- a/onnx_tf/handlers/backend/upsample.py\n+++ b/onnx_tf/handlers/backend/upsample.py\n@@ -1,6 +1,5 @@\n import copy\n \n-import numpy as np\n import tensorflow as tf\n \n from onnx_tf.common import exception\n@@... | 1,639 | 503 |
gh_patches_debug_17503 | rasdani/github-patches | git_diff | voxel51__fiftyone-563 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] numpy.array sample fields trigger server error when serialized
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 20.04
- **FiftyOne installed from (pip... | diff --git a/fiftyone/server/json_util.py b/fiftyone/server/json_util.py
--- a/fiftyone/server/json_util.py
+++ b/fiftyone/server/json_util.py
@@ -10,6 +10,16 @@
from fiftyone.core.sample import Sample, SampleView
from fiftyone.core.stages import ViewStage
+import fiftyone.core.utils as fou
+
+
+def _handle_bytes(o... | {"golden_diff": "diff --git a/fiftyone/server/json_util.py b/fiftyone/server/json_util.py\n--- a/fiftyone/server/json_util.py\n+++ b/fiftyone/server/json_util.py\n@@ -10,6 +10,16 @@\n \n from fiftyone.core.sample import Sample, SampleView\n from fiftyone.core.stages import ViewStage\n+import fiftyone.core.utils as fou\... | 1,552 | 232 |
gh_patches_debug_13692 | rasdani/github-patches | git_diff | pyca__cryptography-1992 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
1.0 release
http://semver.org
> Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
Should we bump our version number all ... | diff --git a/src/cryptography/__about__.py b/src/cryptography/__about__.py
--- a/src/cryptography/__about__.py
+++ b/src/cryptography/__about__.py
@@ -14,7 +14,7 @@
" and primitives to Python developers.")
__uri__ = "https://github.com/pyca/cryptography"
-__version__ = "0.10.dev1"
+__version__ = "1.0... | {"golden_diff": "diff --git a/src/cryptography/__about__.py b/src/cryptography/__about__.py\n--- a/src/cryptography/__about__.py\n+++ b/src/cryptography/__about__.py\n@@ -14,7 +14,7 @@\n \" and primitives to Python developers.\")\n __uri__ = \"https://github.com/pyca/cryptography\"\n \n-__version__ = \"0... | 848 | 245 |
gh_patches_debug_20125 | rasdani/github-patches | git_diff | rucio__rucio-1084 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
remove unused file from common
Motivation
----------
lib/rucio/common/client.py is probably unused and can be removed
Modification
------------
--- END ISSUE ---
Below are some code segments, each f... | diff --git a/lib/rucio/common/client.py b/lib/rucio/common/client.py
deleted file mode 100644
--- a/lib/rucio/common/client.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright European Organization for Nuclear Research (CERN)
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# You may not use this file ... | {"golden_diff": "diff --git a/lib/rucio/common/client.py b/lib/rucio/common/client.py\ndeleted file mode 100644\n--- a/lib/rucio/common/client.py\n+++ /dev/null\n@@ -1,41 +0,0 @@\n-# Copyright European Organization for Nuclear Research (CERN)\n-#\n-# Licensed under the Apache License, Version 2.0 (the \"License\");\n-#... | 664 | 386 |
gh_patches_debug_22868 | rasdani/github-patches | git_diff | microsoft__Qcodes-1110 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Creation of db files when import qcodes
It's not a bug I guess, but I think its still unwanted.
### Steps to reproduce
Set any directory to the current working directory
Execute a python script/program ... | diff --git a/qcodes/__init__.py b/qcodes/__init__.py
--- a/qcodes/__init__.py
+++ b/qcodes/__init__.py
@@ -77,15 +77,6 @@
load_last_experiment, experiments
from qcodes.dataset.sqlite_settings import SQLiteSettings
from qcodes.dataset.param_spec import ParamSpec
-# TODO: do we want this?
-from qcodes.dataset.sqli... | {"golden_diff": "diff --git a/qcodes/__init__.py b/qcodes/__init__.py\n--- a/qcodes/__init__.py\n+++ b/qcodes/__init__.py\n@@ -77,15 +77,6 @@\n load_last_experiment, experiments\n from qcodes.dataset.sqlite_settings import SQLiteSettings\n from qcodes.dataset.param_spec import ParamSpec\n-# TODO: do we want this?\n... | 1,828 | 321 |
gh_patches_debug_29675 | rasdani/github-patches | git_diff | opensearch-project__opensearch-build-147 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Script to build each component from manifest and assemble bundle.
This script should read a manifest and output all artifacts ready for upload.
Example.
/build/opensearch-dashboards-min-1.0.0-SNAPSHOT-linux... | diff --git a/tools/bundle-build/lib/component.py b/tools/bundle-build/lib/component.py
--- a/tools/bundle-build/lib/component.py
+++ b/tools/bundle-build/lib/component.py
@@ -21,6 +21,9 @@
def ref(self):
return self._ref
+ def artifacts(self):
+ return self._artifacts
+
def checkout(self)... | {"golden_diff": "diff --git a/tools/bundle-build/lib/component.py b/tools/bundle-build/lib/component.py\n--- a/tools/bundle-build/lib/component.py\n+++ b/tools/bundle-build/lib/component.py\n@@ -21,6 +21,9 @@\n def ref(self):\n return self._ref\n \n+ def artifacts(self):\n+ return self._artifacts\... | 1,211 | 403 |
gh_patches_debug_7646 | rasdani/github-patches | git_diff | lnbits__lnbits-194 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
LNURLp links give errors on WalletofSatoshi and BlueWallet
Using this LNURLp link: https://lnbits.com/lnurlp/212
BlueWallet Error: "Alert: Bad response from server"
Wallet of Satoshi Error: "Error: Could ... | diff --git a/lnbits/extensions/lnurlp/views_api.py b/lnbits/extensions/lnurlp/views_api.py
--- a/lnbits/extensions/lnurlp/views_api.py
+++ b/lnbits/extensions/lnurlp/views_api.py
@@ -87,6 +87,9 @@
round(g.data["min"]) != g.data["min"] or round(g.data["max"]) != g.data["max"]
):
return jsonify({"m... | {"golden_diff": "diff --git a/lnbits/extensions/lnurlp/views_api.py b/lnbits/extensions/lnurlp/views_api.py\n--- a/lnbits/extensions/lnurlp/views_api.py\n+++ b/lnbits/extensions/lnurlp/views_api.py\n@@ -87,6 +87,9 @@\n round(g.data[\"min\"]) != g.data[\"min\"] or round(g.data[\"max\"]) != g.data[\"max\"]\n ... | 1,753 | 173 |
gh_patches_debug_20567 | rasdani/github-patches | git_diff | pantsbuild__pants-13467 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pants package does not build missing docker images if previous build was cached.
**Describe the bug**
Pant's caching of build targets does not take into consideration that the final target does not exist.
... | diff --git a/src/python/pants/backend/docker/util_rules/docker_binary.py b/src/python/pants/backend/docker/util_rules/docker_binary.py
--- a/src/python/pants/backend/docker/util_rules/docker_binary.py
+++ b/src/python/pants/backend/docker/util_rules/docker_binary.py
@@ -15,6 +15,7 @@
BinaryPaths,
BinaryPathTe... | {"golden_diff": "diff --git a/src/python/pants/backend/docker/util_rules/docker_binary.py b/src/python/pants/backend/docker/util_rules/docker_binary.py\n--- a/src/python/pants/backend/docker/util_rules/docker_binary.py\n+++ b/src/python/pants/backend/docker/util_rules/docker_binary.py\n@@ -15,6 +15,7 @@\n BinaryPat... | 1,400 | 245 |
gh_patches_debug_23656 | rasdani/github-patches | git_diff | OpenMined__PySyft-4991 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Does the framework support IPv6 networks?
Is this framework suitable for IPv6 network environment?
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may ... | diff --git a/src/syft/grid/example_nodes/network.py b/src/syft/grid/example_nodes/network.py
--- a/src/syft/grid/example_nodes/network.py
+++ b/src/syft/grid/example_nodes/network.py
@@ -9,6 +9,7 @@
"""
# stdlib
import os
+import sys
# third party
import flask
@@ -77,15 +78,25 @@
def run() -> None:
globa... | {"golden_diff": "diff --git a/src/syft/grid/example_nodes/network.py b/src/syft/grid/example_nodes/network.py\n--- a/src/syft/grid/example_nodes/network.py\n+++ b/src/syft/grid/example_nodes/network.py\n@@ -9,6 +9,7 @@\n \"\"\"\n # stdlib\n import os\n+import sys\n \n # third party\n import flask\n@@ -77,15 +78,25 @@\n... | 1,180 | 384 |
gh_patches_debug_19544 | rasdani/github-patches | git_diff | mabel-dev__opteryx-1688 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
🪲 [CI] MyPy test failure
### Thank you for taking the time to report a problem with Opteryx.
_To help us to respond to your request we ask that you try to provide the below detail about the bug._
**Descr... | diff --git a/opteryx/__version__.py b/opteryx/__version__.py
--- a/opteryx/__version__.py
+++ b/opteryx/__version__.py
@@ -1,4 +1,4 @@
-__build__ = 522
+__build__ = 523
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/o... | {"golden_diff": "diff --git a/opteryx/__version__.py b/opteryx/__version__.py\n--- a/opteryx/__version__.py\n+++ b/opteryx/__version__.py\n@@ -1,4 +1,4 @@\n-__build__ = 522\n+__build__ = 523\n \n # Licensed under the Apache License, Version 2.0 (the \"License\");\n # you may not use this file except in compliance with ... | 1,251 | 300 |
gh_patches_debug_37940 | rasdani/github-patches | git_diff | deepset-ai__haystack-6753 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
feat: Add split by `page` to `DocumentSplitter`
**Is your feature request related to a problem? Please describe.**
There are some cases where we would like to be able to split the contents of a PDF by page. ... | diff --git a/haystack/components/preprocessors/document_splitter.py b/haystack/components/preprocessors/document_splitter.py
--- a/haystack/components/preprocessors/document_splitter.py
+++ b/haystack/components/preprocessors/document_splitter.py
@@ -14,18 +14,21 @@
"""
def __init__(
- self, split_by... | {"golden_diff": "diff --git a/haystack/components/preprocessors/document_splitter.py b/haystack/components/preprocessors/document_splitter.py\n--- a/haystack/components/preprocessors/document_splitter.py\n+++ b/haystack/components/preprocessors/document_splitter.py\n@@ -14,18 +14,21 @@\n \"\"\"\n \n def __init_... | 1,521 | 667 |
gh_patches_debug_1503 | rasdani/github-patches | git_diff | readthedocs__readthedocs.org-11075 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build: support Ruby under `build.tools`
We should add support for Ruby on `build.tools`. It will be useful for doctools like Jekyll.
Work required:
- [x] Update the documentation
- [x] Install asdf-ru... | diff --git a/readthedocs/builds/constants_docker.py b/readthedocs/builds/constants_docker.py
--- a/readthedocs/builds/constants_docker.py
+++ b/readthedocs/builds/constants_docker.py
@@ -50,6 +50,9 @@
"19": "19.0.1",
"20": "20.3.1",
},
+ "ruby": {
+ "3.3": "3.3.0",
+... | {"golden_diff": "diff --git a/readthedocs/builds/constants_docker.py b/readthedocs/builds/constants_docker.py\n--- a/readthedocs/builds/constants_docker.py\n+++ b/readthedocs/builds/constants_docker.py\n@@ -50,6 +50,9 @@\n \"19\": \"19.0.1\",\n \"20\": \"20.3.1\",\n },\n+ \"ruby\"... | 1,347 | 146 |
gh_patches_debug_58664 | rasdani/github-patches | git_diff | jazzband__pip-tools-12 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support Python versions lower than 2.7, too
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Cont... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@
#include_package_data=True,
zip_safe=False,
platforms='any',
- #install_requires=[],
+ install_requires=['argparse==1.2.1'], # needed for python 2.6
classifiers=[
# As from http://pypi.python.org/pypi?%3... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -18,7 +18,7 @@\n #include_package_data=True,\n zip_safe=False,\n platforms='any',\n- #install_requires=[],\n+ install_requires=['argparse==1.2.1'], # needed for python 2.6\n classifiers=[\n # As from htt... | 604 | 114 |
gh_patches_debug_8563 | rasdani/github-patches | git_diff | google__osv.dev-1044 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
"withdrawn" entries not getting exported correctly
Identified by @andrewpollock :
https://github.com/google/osv.dev/blob/26050deb42785bc5a4dc7d802eac8e7f95135509/docker/exporter/exporter.py#L94
withdra... | diff --git a/docker/exporter/exporter.py b/docker/exporter/exporter.py
--- a/docker/exporter/exporter.py
+++ b/docker/exporter/exporter.py
@@ -91,7 +91,7 @@
zip_path = os.path.join(tmp_dir, 'all.zip')
with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zip_file:
for bug in osv.Bug.query(osv.Bu... | {"golden_diff": "diff --git a/docker/exporter/exporter.py b/docker/exporter/exporter.py\n--- a/docker/exporter/exporter.py\n+++ b/docker/exporter/exporter.py\n@@ -91,7 +91,7 @@\n zip_path = os.path.join(tmp_dir, 'all.zip')\n with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zip_file:\n for bug ... | 1,736 | 163 |
gh_patches_debug_6226 | rasdani/github-patches | git_diff | DataDog__dd-trace-py-1847 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
KeyError: 'split_by_domain'
```
File "/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 581, in post
return self.request('POST', url, data=dat... | diff --git a/ddtrace/contrib/requests/session.py b/ddtrace/contrib/requests/session.py
--- a/ddtrace/contrib/requests/session.py
+++ b/ddtrace/contrib/requests/session.py
@@ -2,6 +2,8 @@
from ddtrace.vendor.wrapt import wrap_function_wrapper as _w
+from ddtrace import config, Pin
+
from .connection import _wrap_s... | {"golden_diff": "diff --git a/ddtrace/contrib/requests/session.py b/ddtrace/contrib/requests/session.py\n--- a/ddtrace/contrib/requests/session.py\n+++ b/ddtrace/contrib/requests/session.py\n@@ -2,6 +2,8 @@\n \n from ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n \n+from ddtrace import config, Pin\n+\n from ... | 671 | 140 |
gh_patches_debug_21677 | rasdani/github-patches | git_diff | plotly__plotly.py-4562 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
With newer versions of orjson, users need to specify the json engine explicitly (bug?)
Hey
I found out I get an
`AttributeError: partially initialized module 'orjson' has no attribute 'OPT_NON_STR_KEYS'`
... | diff --git a/packages/python/plotly/_plotly_utils/optional_imports.py b/packages/python/plotly/_plotly_utils/optional_imports.py
--- a/packages/python/plotly/_plotly_utils/optional_imports.py
+++ b/packages/python/plotly/_plotly_utils/optional_imports.py
@@ -2,6 +2,7 @@
Stand-alone module to provide information about ... | {"golden_diff": "diff --git a/packages/python/plotly/_plotly_utils/optional_imports.py b/packages/python/plotly/_plotly_utils/optional_imports.py\n--- a/packages/python/plotly/_plotly_utils/optional_imports.py\n+++ b/packages/python/plotly/_plotly_utils/optional_imports.py\n@@ -2,6 +2,7 @@\n Stand-alone module to provi... | 774 | 240 |
gh_patches_debug_49037 | rasdani/github-patches | git_diff | facebookresearch__hydra-2677 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] Fix failing tests
Several tests are broken on main
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ex... | diff --git a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py b/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py
--- a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py
+++ b/examples/tutorials/basic/running_your_hydra_app/3_working_d... | {"golden_diff": "diff --git a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py b/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py\n--- a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py\n+++ b/examples/tutorials/basic/running_your_hy... | 418 | 197 |
gh_patches_debug_66238 | rasdani/github-patches | git_diff | deepchecks__deepchecks-728 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] resources/suite_output.html file is missing when installing not via git
**Describe the bug**
can't use save_as_html because suite_output.html file is missing
**To Reproduce**
pip install deepchecks... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,6 @@
import setuptools
from setuptools import setup
-from distutils.util import convert_path
import os
main_ns = {}
@@ -89,9 +88,6 @@
with open(requirementPath) as f:
install_requires = f.read().splitlines()
-
-
-
setup... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -74,7 +74,6 @@\n \n import setuptools\n from setuptools import setup\n-from distutils.util import convert_path\n import os\n \n main_ns = {}\n@@ -89,9 +88,6 @@\n with open(requirementPath) as f:\n install_requires = f.read... | 1,708 | 105 |
gh_patches_debug_4106 | rasdani/github-patches | git_diff | hylang__hy-1955 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make hy-history location configurable
How about an environment variable like `HY_HISTORY` that allows the user to change the location of `~/.hy-history`.
--- END ISSUE ---
Below are some code segments, each... | diff --git a/hy/completer.py b/hy/completer.py
--- a/hy/completer.py
+++ b/hy/completer.py
@@ -117,7 +117,8 @@
readline.set_completer(completer.complete)
readline.set_completer_delims(delims)
- history = os.path.expanduser("~/.hy-history")
+ history = os.environ.get(
+ "HY_H... | {"golden_diff": "diff --git a/hy/completer.py b/hy/completer.py\n--- a/hy/completer.py\n+++ b/hy/completer.py\n@@ -117,7 +117,8 @@\n readline.set_completer(completer.complete)\n readline.set_completer_delims(delims)\n \n- history = os.path.expanduser(\"~/.hy-history\")\n+ history = os.envi... | 1,368 | 127 |
gh_patches_debug_58411 | rasdani/github-patches | git_diff | web2py__web2py-1871 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
contrib/pg8000 is old and causes weird postgres errors
Please update the contrib/pg8000 driver to the current version.
Otherwise errors like Broken Pipe, Operationalerror,.. occur,
- at least for postgres 9... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -63,7 +63,6 @@
'gluon/contrib/pymysql',
'gluon/contrib/pyrtf',
'gluon/contrib/pysimplesoap',
- 'gluon/contrib/pg8000',
'gluon/contrib/plural_rules',
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -63,7 +63,6 @@\n 'gluon/contrib/pymysql',\n 'gluon/contrib/pyrtf',\n 'gluon/contrib/pysimplesoap',\n- 'gluon/contrib/pg8000',\n 'gluon/... | 1,370 | 113 |
gh_patches_debug_18335 | rasdani/github-patches | git_diff | searx__searx-1301 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Gigablast crash
Greetings,
I have been experimenting with SearX lately and have been seeing this message:
"
Engines cannot retrieve results:
gigablast (unexpected crash: No JSON object could be deco... | diff --git a/searx/engines/gigablast.py b/searx/engines/gigablast.py
--- a/searx/engines/gigablast.py
+++ b/searx/engines/gigablast.py
@@ -34,6 +34,7 @@
'&qlang={lang}'\
'&ff={safesearch}'\
'&rxiec={rxieu}'\
+ '&ulse={ulse}'\
'&rand={rxikd}' # current unix timestamp
# specific xpath variables... | {"golden_diff": "diff --git a/searx/engines/gigablast.py b/searx/engines/gigablast.py\n--- a/searx/engines/gigablast.py\n+++ b/searx/engines/gigablast.py\n@@ -34,6 +34,7 @@\n '&qlang={lang}'\\\n '&ff={safesearch}'\\\n '&rxiec={rxieu}'\\\n+ '&ulse={ulse}'\\\n '&rand={rxikd}' # current unix timestamp\... | 1,303 | 228 |
gh_patches_debug_17435 | rasdani/github-patches | git_diff | freedomofpress__securedrop-2756 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Failure to invalidate session when user resets their own password
## Description
When a user resets their own password, their session is not invalidated.
## Steps to Reproduce
1. User logs in
2. Us... | diff --git a/securedrop/journalist_app/account.py b/securedrop/journalist_app/account.py
--- a/securedrop/journalist_app/account.py
+++ b/securedrop/journalist_app/account.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from flask import (Blueprint, render_template, request, g, redirect, url_for,
- fla... | {"golden_diff": "diff --git a/securedrop/journalist_app/account.py b/securedrop/journalist_app/account.py\n--- a/securedrop/journalist_app/account.py\n+++ b/securedrop/journalist_app/account.py\n@@ -1,7 +1,7 @@\n # -*- coding: utf-8 -*-\n \n from flask import (Blueprint, render_template, request, g, redirect, url_for,\... | 977 | 195 |
gh_patches_debug_22132 | rasdani/github-patches | git_diff | open-mmlab__mmcv-823 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
imshow_bboxes does not show bboxes if img is incontiguous
As [DKDKDDK](https://stackoverflow.com/questions/57586449/why-cv2-rectangle-sometimes-return-np-ndarray-while-sometimes-cv2-umat) asked, cv2.rectangl... | diff --git a/mmcv/visualization/image.py b/mmcv/visualization/image.py
--- a/mmcv/visualization/image.py
+++ b/mmcv/visualization/image.py
@@ -53,6 +53,7 @@
ndarray: The image with bboxes drawn on it.
"""
img = imread(img)
+ img = np.ascontiguousarray(img)
if isinstance(bboxes, np.ndarray):... | {"golden_diff": "diff --git a/mmcv/visualization/image.py b/mmcv/visualization/image.py\n--- a/mmcv/visualization/image.py\n+++ b/mmcv/visualization/image.py\n@@ -53,6 +53,7 @@\n ndarray: The image with bboxes drawn on it.\n \"\"\"\n img = imread(img)\n+ img = np.ascontiguousarray(img)\n \n if is... | 2,027 | 272 |
gh_patches_debug_39977 | rasdani/github-patches | git_diff | intel__dffml-568 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
operations: io: Fixup example
https://github.com/intel/dffml/blob/c0946b2d212239cfe4e470e63ab3da22c9cd97c4/dffml/operation/io.py#L116
copy the code here into a Python file and format it with black, then co... | diff --git a/dffml/operation/io.py b/dffml/operation/io.py
--- a/dffml/operation/io.py
+++ b/dffml/operation/io.py
@@ -12,7 +12,7 @@
# Definitions
UserInput = Definition(name="UserInput", primitive="str")
-DataToPrint = Definition(name="DataToPrint", primitive="str")
+DataToPrint = Definition(name="DataToPrint", pr... | {"golden_diff": "diff --git a/dffml/operation/io.py b/dffml/operation/io.py\n--- a/dffml/operation/io.py\n+++ b/dffml/operation/io.py\n@@ -12,7 +12,7 @@\n \n # Definitions\n UserInput = Definition(name=\"UserInput\", primitive=\"str\")\n-DataToPrint = Definition(name=\"DataToPrint\", primitive=\"str\")\n+DataToPrint = ... | 1,956 | 753 |
gh_patches_debug_7947 | rasdani/github-patches | git_diff | coreruleset__coreruleset-3232 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Review links to OWASP wiki
### Describe the bug
We have references to other OWASP projects in our files:
```
rules/REQUEST-933-APPLICATION-ATTACK-PHP.conf
28:# https://www.owasp.org/index.php/PHP_Top_... | diff --git a/util/regexp-tricks/negative-lookahead.py b/util/regexp-tricks/negative-lookahead.py
--- a/util/regexp-tricks/negative-lookahead.py
+++ b/util/regexp-tricks/negative-lookahead.py
@@ -21,7 +21,7 @@
args = parser.parse_args()
# Return the longest prefix of all list elements. Shamelessly copied from:
-# ht... | {"golden_diff": "diff --git a/util/regexp-tricks/negative-lookahead.py b/util/regexp-tricks/negative-lookahead.py\n--- a/util/regexp-tricks/negative-lookahead.py\n+++ b/util/regexp-tricks/negative-lookahead.py\n@@ -21,7 +21,7 @@\n args = parser.parse_args()\n \n # Return the longest prefix of all list elements. Shamele... | 1,680 | 170 |
gh_patches_debug_26830 | rasdani/github-patches | git_diff | nilearn__nilearn-1219 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
sklearn.covariance.LedoitWolf or ConnectivityMeasure in plot_adhd_spheres
`ConnectivityMeasure` can be used here, and its default covariance estimator is `LedoitWolf`from `sklearn.covariance`.
I also prefer u... | diff --git a/examples/03_connectivity/plot_adhd_spheres.py b/examples/03_connectivity/plot_adhd_spheres.py
--- a/examples/03_connectivity/plot_adhd_spheres.py
+++ b/examples/03_connectivity/plot_adhd_spheres.py
@@ -60,23 +60,25 @@
##########################################################################
-# Comput... | {"golden_diff": "diff --git a/examples/03_connectivity/plot_adhd_spheres.py b/examples/03_connectivity/plot_adhd_spheres.py\n--- a/examples/03_connectivity/plot_adhd_spheres.py\n+++ b/examples/03_connectivity/plot_adhd_spheres.py\n@@ -60,23 +60,25 @@\n \n \n #############################################################... | 1,074 | 341 |
gh_patches_debug_15405 | rasdani/github-patches | git_diff | pyjanitor-devs__pyjanitor-987 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Some modules are missing from the top-level import
Issue referenced during PR here: https://github.com/pyjanitor-devs/pyjanitor/pull/977#discussion_r781732964
For example, now running:
```python
import... | diff --git a/janitor/__init__.py b/janitor/__init__.py
--- a/janitor/__init__.py
+++ b/janitor/__init__.py
@@ -5,6 +5,7 @@
pass
from .functions import * # noqa: F403, F401
+from .io import * # noqa: F403, F401
from .math import * # noqa: F403, F401
from .ml import get_features_targets as _get_features_targ... | {"golden_diff": "diff --git a/janitor/__init__.py b/janitor/__init__.py\n--- a/janitor/__init__.py\n+++ b/janitor/__init__.py\n@@ -5,6 +5,7 @@\n pass\n \n from .functions import * # noqa: F403, F401\n+from .io import * # noqa: F403, F401\n from .math import * # noqa: F403, F401\n from .ml import get_features_tar... | 1,773 | 258 |
gh_patches_debug_6697 | rasdani/github-patches | git_diff | SeldonIO__MLServer-911 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Problems with own logging configuration
Currently I have the problem that my logging configuration is not accepted everywhere. As soon as the REST server starts (Uvicorn Worker), my logging configuration is i... | diff --git a/mlserver/metrics/server.py b/mlserver/metrics/server.py
--- a/mlserver/metrics/server.py
+++ b/mlserver/metrics/server.py
@@ -52,8 +52,11 @@
}
)
- # TODO: we want to disable logger unless debug is enabled (otherwise,
- # prom reqs can be spammy)
+ if self._setti... | {"golden_diff": "diff --git a/mlserver/metrics/server.py b/mlserver/metrics/server.py\n--- a/mlserver/metrics/server.py\n+++ b/mlserver/metrics/server.py\n@@ -52,8 +52,11 @@\n }\n )\n \n- # TODO: we want to disable logger unless debug is enabled (otherwise,\n- # prom reqs can be spammy... | 883 | 160 |
gh_patches_debug_38993 | rasdani/github-patches | git_diff | zulip__zulip-29641 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update first message ID when first message is deleted
When a message is deleted, we should update the stored ID of the first message in the stream. Because we currently do not, deleting the first message may ... | diff --git a/version.py b/version.py
--- a/version.py
+++ b/version.py
@@ -33,7 +33,7 @@
# Changes should be accompanied by documentation explaining what the
# new level means in api_docs/changelog.md, as well as "**Changes**"
# entries in the endpoint's documentation in `zulip.yaml`.
-API_FEATURE_LEVEL = 255
+API_F... | {"golden_diff": "diff --git a/version.py b/version.py\n--- a/version.py\n+++ b/version.py\n@@ -33,7 +33,7 @@\n # Changes should be accompanied by documentation explaining what the\n # new level means in api_docs/changelog.md, as well as \"**Changes**\"\n # entries in the endpoint's documentation in `zulip.yaml`.\n-API_... | 1,743 | 677 |
gh_patches_debug_26011 | rasdani/github-patches | git_diff | ray-project__ray-3711 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[tune[ partial function cannot be registered as trainable
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 18.04
- **Ray installed from (source or binary)**: bina... | diff --git a/python/ray/tune/registry.py b/python/ray/tune/registry.py
--- a/python/ray/tune/registry.py
+++ b/python/ray/tune/registry.py
@@ -2,6 +2,7 @@
from __future__ import division
from __future__ import print_function
+import logging
from types import FunctionType
import ray
@@ -17,6 +18,8 @@
TRAINA... | {"golden_diff": "diff --git a/python/ray/tune/registry.py b/python/ray/tune/registry.py\n--- a/python/ray/tune/registry.py\n+++ b/python/ray/tune/registry.py\n@@ -2,6 +2,7 @@\n from __future__ import division\n from __future__ import print_function\n \n+import logging\n from types import FunctionType\n \n import ray\n@... | 1,554 | 296 |
gh_patches_debug_20771 | rasdani/github-patches | git_diff | cupy__cupy-7068 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cupy.apply_along_axis failed with cupy.nonzero
### Description
cp.apply_along_axis(cp.nonzero, 1, cp.array([[1,2],[2,3]])) - failed with error
*** AttributeError: 'tuple' object has no attribute 'shape'... | diff --git a/cupy/lib/_shape_base.py b/cupy/lib/_shape_base.py
--- a/cupy/lib/_shape_base.py
+++ b/cupy/lib/_shape_base.py
@@ -42,9 +42,7 @@
'Cannot apply_along_axis when any iteration dimensions are 0'
)
res = func1d(inarr_view[ind0], *args, **kwargs)
- if cupy.isscalar(res):
- # s... | {"golden_diff": "diff --git a/cupy/lib/_shape_base.py b/cupy/lib/_shape_base.py\n--- a/cupy/lib/_shape_base.py\n+++ b/cupy/lib/_shape_base.py\n@@ -42,9 +42,7 @@\n 'Cannot apply_along_axis when any iteration dimensions are 0'\n )\n res = func1d(inarr_view[ind0], *args, **kwargs)\n- if cupy.iss... | 1,292 | 271 |
gh_patches_debug_27156 | rasdani/github-patches | git_diff | falconry__falcon-364 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Not all modules are cythonized
Missing some modules, such as hooks and those in the util package.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may c... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,12 @@
+import glob
import imp
import io
-import sys
+import os
from os import path
from setuptools import setup, find_packages, Extension
+import sys
+
+MYDIR = path.abspath(os.path.dirname(__file__))
VERSION = imp.load_source('version', p... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,8 +1,12 @@\n+import glob\n import imp\n import io\n-import sys\n+import os\n from os import path\n from setuptools import setup, find_packages, Extension\n+import sys\n+\n+MYDIR = path.abspath(os.path.dirname(__file__))\n \n VERSIO... | 1,151 | 404 |
gh_patches_debug_34750 | rasdani/github-patches | git_diff | plotly__dash-2859 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Patch += operation not working on the patch object.
If you have a patch object for a number prop and try to do `patched += 1`, the callback will fail with an error, `returned non serializable object`.
... | diff --git a/dash/_patch.py b/dash/_patch.py
--- a/dash/_patch.py
+++ b/dash/_patch.py
@@ -36,18 +36,18 @@
def __setstate__(self, state):
vars(self).update(state)
- def __getitem__(self, item):
+ def __getitem__(self, item) -> "Patch":
validate_slice(item)
return Patch(location=s... | {"golden_diff": "diff --git a/dash/_patch.py b/dash/_patch.py\n--- a/dash/_patch.py\n+++ b/dash/_patch.py\n@@ -36,18 +36,18 @@\n def __setstate__(self, state):\n vars(self).update(state)\n \n- def __getitem__(self, item):\n+ def __getitem__(self, item) -> \"Patch\":\n validate_slice(item)\n ... | 1,874 | 460 |
gh_patches_debug_286 | rasdani/github-patches | git_diff | Mailu__Mailu-2049 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fetchmail: /var/lib/fetchmail needs persistence
According [fetchmail documentation](https://www.fetchmail.info/fetchmail-man.html#12), an `.idfile` is used to keep track of previously downloaded messages. Sho... | diff --git a/optional/fetchmail/fetchmail.py b/optional/fetchmail/fetchmail.py
--- a/optional/fetchmail/fetchmail.py
+++ b/optional/fetchmail/fetchmail.py
@@ -13,6 +13,7 @@
FETCHMAIL = """
fetchmail -N \
+ --idfile /data/fetchids --uidl \
--sslcertck --sslcertpath /etc/ssl/certs \
-f {}
"""
| {"golden_diff": "diff --git a/optional/fetchmail/fetchmail.py b/optional/fetchmail/fetchmail.py\n--- a/optional/fetchmail/fetchmail.py\n+++ b/optional/fetchmail/fetchmail.py\n@@ -13,6 +13,7 @@\n \n FETCHMAIL = \"\"\"\n fetchmail -N \\\n+ --idfile /data/fetchids --uidl \\\n --sslcertck --sslcertpath /etc/ssl/cert... | 1,320 | 105 |
gh_patches_debug_18158 | rasdani/github-patches | git_diff | openai__gym-1966 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in PixelObservationWrapper
In the pixel_observation.py, we have a bit of code that looks like this:
```
def _add_pixel_observation(self, observation):
if self._pixels_only:
... | diff --git a/gym/wrappers/pixel_observation.py b/gym/wrappers/pixel_observation.py
--- a/gym/wrappers/pixel_observation.py
+++ b/gym/wrappers/pixel_observation.py
@@ -110,14 +110,14 @@
pixel_observation = self._add_pixel_observation(observation)
return pixel_observation
- def _add_pixel_observati... | {"golden_diff": "diff --git a/gym/wrappers/pixel_observation.py b/gym/wrappers/pixel_observation.py\n--- a/gym/wrappers/pixel_observation.py\n+++ b/gym/wrappers/pixel_observation.py\n@@ -110,14 +110,14 @@\n pixel_observation = self._add_pixel_observation(observation)\n return pixel_observation\n \n- ... | 1,635 | 216 |
gh_patches_debug_51330 | rasdani/github-patches | git_diff | scikit-image__scikit-image-1281 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: io.imshow() and io.show() do not work as expected in winows
In my win7-x64 environemnt, io.imshow() and io.show() do not work as expected. I use io.imshow() to show mutiple images, and when I call io.sh... | diff --git a/skimage/io/_plugins/matplotlib_plugin.py b/skimage/io/_plugins/matplotlib_plugin.py
--- a/skimage/io/_plugins/matplotlib_plugin.py
+++ b/skimage/io/_plugins/matplotlib_plugin.py
@@ -2,6 +2,8 @@
def imshow(*args, **kwargs):
+ if plt.gca().has_data():
+ plt.figure()
kwargs.setdefault('int... | {"golden_diff": "diff --git a/skimage/io/_plugins/matplotlib_plugin.py b/skimage/io/_plugins/matplotlib_plugin.py\n--- a/skimage/io/_plugins/matplotlib_plugin.py\n+++ b/skimage/io/_plugins/matplotlib_plugin.py\n@@ -2,6 +2,8 @@\n \n \n def imshow(*args, **kwargs):\n+ if plt.gca().has_data():\n+ plt.figure()\n ... | 441 | 114 |
gh_patches_debug_64317 | rasdani/github-patches | git_diff | pex-tool__pex-1112 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.21
On the docket:
+ [x] "FileNotFoundError: [Errno 2] No such file or directory" in pex #1098
+ [x] Unclosed resource warning for `/dev/null` in PEX teardown. #1101
+ [x] Remove `--sources-dire... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = "2.1.20"
+__version__ = "2.1.21"
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.20\"\n+__version__ = \"2.1.21\"\n", "... | 480 | 96 |
gh_patches_debug_38331 | rasdani/github-patches | git_diff | spectrochempy__spectrochempy-11 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Automate building of docs for new release and dev version.
Author: @fernandezc (Christian Fernandez )
Date: 2020-05-28
Redmine Issue: 74, https://redmine.spectrochempy.fr/issues/74
---
None
--- END ISSUE... | diff --git a/spectrochempy/core/readers/readopus.py b/spectrochempy/core/readers/readopus.py
--- a/spectrochempy/core/readers/readopus.py
+++ b/spectrochempy/core/readers/readopus.py
@@ -22,10 +22,7 @@
from brukeropusreader import read_file
from warnings import warn
from datetime import datetime, timezone, timedelta... | {"golden_diff": "diff --git a/spectrochempy/core/readers/readopus.py b/spectrochempy/core/readers/readopus.py\n--- a/spectrochempy/core/readers/readopus.py\n+++ b/spectrochempy/core/readers/readopus.py\n@@ -22,10 +22,7 @@\n from brukeropusreader import read_file\n from warnings import warn\n from datetime import dateti... | 1,931 | 516 |
gh_patches_debug_66169 | rasdani/github-patches | git_diff | cisagov__manage.get.gov-1071 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Show simplified domain statuses to the registrant
### Story
As a domain manager
I want to know the status of my domain in simple language
so that I know if any action is needed or if any functions are li... | diff --git a/src/registrar/views/index.py b/src/registrar/views/index.py
--- a/src/registrar/views/index.py
+++ b/src/registrar/views/index.py
@@ -19,7 +19,7 @@
pk=F("domain__id"),
name=F("domain__name"),
created_time=F("domain__created_at"),
- application_status=F("dom... | {"golden_diff": "diff --git a/src/registrar/views/index.py b/src/registrar/views/index.py\n--- a/src/registrar/views/index.py\n+++ b/src/registrar/views/index.py\n@@ -19,7 +19,7 @@\n pk=F(\"domain__id\"),\n name=F(\"domain__name\"),\n created_time=F(\"domain__created_at\"),\n- ... | 1,073 | 117 |
gh_patches_debug_20140 | rasdani/github-patches | git_diff | Flexget__Flexget-1599 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bakabt URL change
Bakabt url has change from http://www.bakabt.com to https://bakabt.me, the url rewriter plugin needs to be updated to match
--- END ISSUE ---
Below are some code segments, each from a rele... | diff --git a/flexget/plugins/sites/bakabt.py b/flexget/plugins/sites/bakabt.py
--- a/flexget/plugins/sites/bakabt.py
+++ b/flexget/plugins/sites/bakabt.py
@@ -17,9 +17,9 @@
# urlrewriter API
def url_rewritable(self, task, entry):
url = entry['url']
- if url.startswith('http://www.bakabt.com/do... | {"golden_diff": "diff --git a/flexget/plugins/sites/bakabt.py b/flexget/plugins/sites/bakabt.py\n--- a/flexget/plugins/sites/bakabt.py\n+++ b/flexget/plugins/sites/bakabt.py\n@@ -17,9 +17,9 @@\n # urlrewriter API\n def url_rewritable(self, task, entry):\n url = entry['url']\n- if url.startswith('... | 805 | 294 |
gh_patches_debug_23767 | rasdani/github-patches | git_diff | microsoft__presidio-650 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Image anonymization is slow
Hi,
First of all, thank you guys for making this awesome project :)
I wanted to ask if there are any ways to improve image anonymization performance. I'm using Presidio as a ... | diff --git a/presidio-image-redactor/presidio_image_redactor/image_analyzer_engine.py b/presidio-image-redactor/presidio_image_redactor/image_analyzer_engine.py
--- a/presidio-image-redactor/presidio_image_redactor/image_analyzer_engine.py
+++ b/presidio-image-redactor/presidio_image_redactor/image_analyzer_engine.py
@... | {"golden_diff": "diff --git a/presidio-image-redactor/presidio_image_redactor/image_analyzer_engine.py b/presidio-image-redactor/presidio_image_redactor/image_analyzer_engine.py\n--- a/presidio-image-redactor/presidio_image_redactor/image_analyzer_engine.py\n+++ b/presidio-image-redactor/presidio_image_redactor/image_a... | 1,316 | 339 |
gh_patches_debug_15494 | rasdani/github-patches | git_diff | EleutherAI__gpt-neox-72 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement 1-Bit Adam
Integrate 1-bit Adam into our model. The DeepSpeed tutorial can be found [here](https://www.deepspeed.ai/tutorials/onebit-adam/)
--- END ISSUE ---
Below are some code segments, each fro... | diff --git a/train_pipeline.py b/train_pipeline.py
--- a/train_pipeline.py
+++ b/train_pipeline.py
@@ -1,16 +1,21 @@
+import argparse
+import json
import random
+from collections import defaultdict
+import os
import deepspeed
import torch
from torch.utils.data import DataLoader
from tqdm.auto import trange
-import... | {"golden_diff": "diff --git a/train_pipeline.py b/train_pipeline.py\n--- a/train_pipeline.py\n+++ b/train_pipeline.py\n@@ -1,16 +1,21 @@\n+import argparse\n+import json\n import random\n+from collections import defaultdict\n+import os\n import deepspeed\n import torch\n from torch.utils.data import DataLoader\n from tq... | 1,202 | 244 |
gh_patches_debug_33275 | rasdani/github-patches | git_diff | liberapay__liberapay.com-82 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Switch Jinja templates to line statements
Because they're easier to type (especially on an azerty keyboard): `% if ...` instead of `{% if ... %}`. [Documentation](http://jinja.pocoo.org/docs/dev/templates/#li... | diff --git a/liberapay/constants.py b/liberapay/constants.py
--- a/liberapay/constants.py
+++ b/liberapay/constants.py
@@ -17,6 +17,11 @@
EMAIL_VERIFICATION_TIMEOUT = timedelta(hours=24)
EMAIL_RE = re.compile(r'^[^@]+@[^@]+\.[^@]+$')
+JINJA_ENV_COMMON = dict(
+ trim_blocks=True, lstrip_blocks=True,
+ line_sta... | {"golden_diff": "diff --git a/liberapay/constants.py b/liberapay/constants.py\n--- a/liberapay/constants.py\n+++ b/liberapay/constants.py\n@@ -17,6 +17,11 @@\n EMAIL_VERIFICATION_TIMEOUT = timedelta(hours=24)\n EMAIL_RE = re.compile(r'^[^@]+@[^@]+\\.[^@]+$')\n \n+JINJA_ENV_COMMON = dict(\n+ trim_blocks=True, lstrip_... | 1,278 | 568 |
gh_patches_debug_35591 | rasdani/github-patches | git_diff | azavea__raster-vision-692 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Avoid downloading all rasters
If you have many large scenes, the rasters will all be downloaded at once and you will run out of disk space. This is because the download occurs in the constructor of `RasterSou... | diff --git a/rastervision/command/command.py b/rastervision/command/command.py
--- a/rastervision/command/command.py
+++ b/rastervision/command/command.py
@@ -19,7 +19,9 @@
else:
return self._tmp_dir.name
else:
- return RVConfig.get_tmp_dir().name
+ tmp_dir =... | {"golden_diff": "diff --git a/rastervision/command/command.py b/rastervision/command/command.py\n--- a/rastervision/command/command.py\n+++ b/rastervision/command/command.py\n@@ -19,7 +19,9 @@\n else:\n return self._tmp_dir.name\n else:\n- return RVConfig.get_tmp_dir().nam... | 1,907 | 583 |
gh_patches_debug_2885 | rasdani/github-patches | git_diff | paperless-ngx__paperless-ngx-1666 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Wrong version number string within docker 1.9.1
### Description
After a successful pull and deploy via docker with https://ghcr.io/paperless-ngx/paperless-ngx:1.9.1 the version string on the paperless-... | diff --git a/src/paperless/version.py b/src/paperless/version.py
--- a/src/paperless/version.py
+++ b/src/paperless/version.py
@@ -1,7 +1,7 @@
from typing import Final
from typing import Tuple
-__version__: Final[Tuple[int, int, int]] = (1, 9, 0)
+__version__: Final[Tuple[int, int, int]] = (1, 9, 2)
# Version stri... | {"golden_diff": "diff --git a/src/paperless/version.py b/src/paperless/version.py\n--- a/src/paperless/version.py\n+++ b/src/paperless/version.py\n@@ -1,7 +1,7 @@\n from typing import Final\n from typing import Tuple\n \n-__version__: Final[Tuple[int, int, int]] = (1, 9, 0)\n+__version__: Final[Tuple[int, int, int]] = ... | 647 | 135 |
gh_patches_debug_17439 | rasdani/github-patches | git_diff | Parsl__parsl-929 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Properly handle func names for bash apps
At the moment bash apps are always `remote_side_bash_executor` in the monitoring DB because that is what is actually running. We should pass through the name of the ap... | diff --git a/parsl/app/bash.py b/parsl/app/bash.py
--- a/parsl/app/bash.py
+++ b/parsl/app/bash.py
@@ -1,6 +1,7 @@
import logging
-
+from functools import update_wrapper
from inspect import signature, Parameter
+
from parsl.app.errors import wrap_error
from parsl.app.futures import DataFuture
from parsl.app.app im... | {"golden_diff": "diff --git a/parsl/app/bash.py b/parsl/app/bash.py\n--- a/parsl/app/bash.py\n+++ b/parsl/app/bash.py\n@@ -1,6 +1,7 @@\n import logging\n-\n+from functools import update_wrapper\n from inspect import signature, Parameter\n+\n from parsl.app.errors import wrap_error\n from parsl.app.futures import DataFu... | 1,997 | 193 |
gh_patches_debug_34542 | rasdani/github-patches | git_diff | numpy__numpy-13976 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MAINT: remove numpy/tools/test-installed-numpy.py ?
Looking at Matti's modifications in #13482, I don't see a good reason to keep `test-installed-numpy.py` if we are going to continue using `runtests.py`. Bot... | diff --git a/tools/test-installed-numpy.py b/tools/test-installed-numpy.py
deleted file mode 100755
--- a/tools/test-installed-numpy.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-from __future__ import division, absolute_import, print_function
-
-# A simple script to test the installed version of numpy by c... | {"golden_diff": "diff --git a/tools/test-installed-numpy.py b/tools/test-installed-numpy.py\ndeleted file mode 100755\n--- a/tools/test-installed-numpy.py\n+++ /dev/null\n@@ -1,66 +0,0 @@\n-#!/usr/bin/env python\n-from __future__ import division, absolute_import, print_function\n-\n-# A simple script to test the instal... | 1,178 | 739 |
gh_patches_debug_35722 | rasdani/github-patches | git_diff | mdn__kuma-7782 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[regression] Multi-locale search is not searching in all locales
**Summary**
http://localhost.org:8000/api/v1/search?q=video&locale=fr&locale=de
actually searches on `locale == ['de']` and
http://localhos... | diff --git a/kuma/api/v1/search/forms.py b/kuma/api/v1/search/forms.py
--- a/kuma/api/v1/search/forms.py
+++ b/kuma/api/v1/search/forms.py
@@ -3,15 +3,26 @@
from django.utils.datastructures import MultiValueDict
+class MultipleChoiceFieldICase(forms.MultipleChoiceField):
+ """Just like forms.MultipleChoiceField... | {"golden_diff": "diff --git a/kuma/api/v1/search/forms.py b/kuma/api/v1/search/forms.py\n--- a/kuma/api/v1/search/forms.py\n+++ b/kuma/api/v1/search/forms.py\n@@ -3,15 +3,26 @@\n from django.utils.datastructures import MultiValueDict\n \n \n+class MultipleChoiceFieldICase(forms.MultipleChoiceField):\n+ \"\"\"Just li... | 1,151 | 603 |
gh_patches_debug_24202 | rasdani/github-patches | git_diff | helmholtz-analytics__heat-57 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix project description on PyPI
PyPI requires both a description and long_description to be set, with the former being used for listing a project among others and the latter for the detailed project page.
--... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,19 +1,28 @@
from distutils.core import setup
+with open("README.md", "r") as fh:
+ long_description = fh.read()
+
setup(
name='heat',
packages=['heat'],
version='0.0.1',
description='A framework for high performance data ana... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,19 +1,28 @@\n from distutils.core import setup\n \n+with open(\"README.md\", \"r\") as fh:\n+ long_description = fh.read()\n+\n setup(\n name='heat',\n packages=['heat'],\n version='0.0.1',\n description='A frame... | 518 | 323 |
gh_patches_debug_15862 | rasdani/github-patches | git_diff | optuna__optuna-2265 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`study.trials_dataframe` call fails for multi-objective studies
When using the new multi-objective study framework in v2.4.0 (`optuna.create_study(..., directions=[...])`), calling the `trials_dataframe` mess... | diff --git a/optuna/_dataframe.py b/optuna/_dataframe.py
--- a/optuna/_dataframe.py
+++ b/optuna/_dataframe.py
@@ -68,6 +68,12 @@
for nested_attr, nested_value in enumerate(value):
record[(df_column, nested_attr)] = nested_value
column_agg[attr].add((df_column,... | {"golden_diff": "diff --git a/optuna/_dataframe.py b/optuna/_dataframe.py\n--- a/optuna/_dataframe.py\n+++ b/optuna/_dataframe.py\n@@ -68,6 +68,12 @@\n for nested_attr, nested_value in enumerate(value):\n record[(df_column, nested_attr)] = nested_value\n column_ag... | 1,871 | 191 |
gh_patches_debug_17616 | rasdani/github-patches | git_diff | python-discord__bot-655 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Write unit tests for `bot/rules/mentions.py`
Write unit tests for [`bot/rules/mentions.py`](../blob/master/bot/rules/mentions.py).
## Implementation details
Please make sure to read the general information i... | diff --git a/bot/rules/attachments.py b/bot/rules/attachments.py
--- a/bot/rules/attachments.py
+++ b/bot/rules/attachments.py
@@ -7,14 +7,14 @@
last_message: Message, recent_messages: List[Message], config: Dict[str, int]
) -> Optional[Tuple[str, Iterable[Member], Iterable[Message]]]:
"""Detects total attac... | {"golden_diff": "diff --git a/bot/rules/attachments.py b/bot/rules/attachments.py\n--- a/bot/rules/attachments.py\n+++ b/bot/rules/attachments.py\n@@ -7,14 +7,14 @@\n last_message: Message, recent_messages: List[Message], config: Dict[str, int]\n ) -> Optional[Tuple[str, Iterable[Member], Iterable[Message]]]:\n ... | 678 | 185 |
gh_patches_debug_5761 | rasdani/github-patches | git_diff | electricitymaps__electricitymaps-contrib-1456 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Data error for Aruba
For a few days in a row now (possibly longer), data for the island country of Aruba has been offline. I went to check back on the source: https://www.webaruba.com/ and saw that the figure... | diff --git a/parsers/AW.py b/parsers/AW.py
--- a/parsers/AW.py
+++ b/parsers/AW.py
@@ -30,9 +30,9 @@
'zoneKey': zone_key,
'datetime': zone_date_time.datetime,
'production': {
- 'oil': fossil['value'],
- 'wind': wind['value'],
- 'solar': solar['value'],
+ ... | {"golden_diff": "diff --git a/parsers/AW.py b/parsers/AW.py\n--- a/parsers/AW.py\n+++ b/parsers/AW.py\n@@ -30,9 +30,9 @@\n 'zoneKey': zone_key,\n 'datetime': zone_date_time.datetime,\n 'production': {\n- 'oil': fossil['value'],\n- 'wind': wind['value'],\n- 'solar... | 928 | 145 |
gh_patches_debug_25582 | rasdani/github-patches | git_diff | cal-itp__benefits-211 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Send Content-Security-Policy header
The Content-Security-Policy (CSP) header (with the `frame-ancestors` directive) replaces the now deprecated `X-Frame-Options` header, to instruct the browser about appropri... | diff --git a/benefits/settings.py b/benefits/settings.py
--- a/benefits/settings.py
+++ b/benefits/settings.py
@@ -50,6 +50,7 @@
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
+ "csp.middleware.CSPMidd... | {"golden_diff": "diff --git a/benefits/settings.py b/benefits/settings.py\n--- a/benefits/settings.py\n+++ b/benefits/settings.py\n@@ -50,6 +50,7 @@\n \"django.middleware.common.CommonMiddleware\",\n \"django.middleware.csrf.CsrfViewMiddleware\",\n \"django.middleware.clickjacking.XFrameOptionsMiddleware\",... | 2,046 | 397 |
gh_patches_debug_49143 | rasdani/github-patches | git_diff | vyperlang__vyper-2513 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
test fail with web3.py 5.21.0
### Version Information
* vyper Version (output of `vyper --version`): latest master (cff69d63)
* OS: macos
* Python Version (output of `python --version`): 3.9.6
### Wha... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@
"pytest-xdist>=1.32,<2.0",
"eth-tester[py-evm]>=0.5.0b1,<0.6",
"py-evm==0.4.0a4", # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+
- "web3==5.12.3",
+ "web3==5.21.0",
"... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -15,7 +15,7 @@\n \"pytest-xdist>=1.32,<2.0\",\n \"eth-tester[py-evm]>=0.5.0b1,<0.6\",\n \"py-evm==0.4.0a4\", # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+\n- \"web3==5.12.3\",\n+ ... | 1,493 | 178 |
gh_patches_debug_10810 | rasdani/github-patches | git_diff | sunpy__sunpy-4430 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong plot in goes hek m25 example
<!--
We know asking good questions takes effort, and we appreciate your time.
Thank you.
Please be aware that everyone has to follow our code of conduct:
https://githu... | diff --git a/examples/time_series/goes_hek_m25.py b/examples/time_series/goes_hek_m25.py
--- a/examples/time_series/goes_hek_m25.py
+++ b/examples/time_series/goes_hek_m25.py
@@ -34,9 +34,9 @@
# Lets plot everything together
fig, ax = plt.subplots()
goes.plot()
-ax.axvline(parse_time(flares_hek[0].get('event_peaktim... | {"golden_diff": "diff --git a/examples/time_series/goes_hek_m25.py b/examples/time_series/goes_hek_m25.py\n--- a/examples/time_series/goes_hek_m25.py\n+++ b/examples/time_series/goes_hek_m25.py\n@@ -34,9 +34,9 @@\n # Lets plot everything together\n fig, ax = plt.subplots()\n goes.plot()\n-ax.axvline(parse_time(flares_h... | 1,240 | 255 |
gh_patches_debug_13115 | rasdani/github-patches | git_diff | TheAlgorithms__Python-10394 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve our test coverage
### Feature description
Many of our existing algorithm files have little to no unit testing. This is problematic because this can easily let bugs slip through. We want some assura... | diff --git a/bit_manipulation/missing_number.py b/bit_manipulation/missing_number.py
--- a/bit_manipulation/missing_number.py
+++ b/bit_manipulation/missing_number.py
@@ -11,6 +11,12 @@
Example:
>>> find_missing_number([0, 1, 3, 4])
2
+ >>> find_missing_number([4, 3, 1, 0])
+ 2
+ ... | {"golden_diff": "diff --git a/bit_manipulation/missing_number.py b/bit_manipulation/missing_number.py\n--- a/bit_manipulation/missing_number.py\n+++ b/bit_manipulation/missing_number.py\n@@ -11,6 +11,12 @@\n Example:\n >>> find_missing_number([0, 1, 3, 4])\n 2\n+ >>> find_missing_number([4, 3... | 1,343 | 251 |
gh_patches_debug_26597 | rasdani/github-patches | git_diff | python-discord__site-577 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SystemExit: 1
Sentry Issue: [SITE-1G](https://sentry.io/organizations/python-discord/issues/2623186847/?referrer=github_integration)
```
SystemExit: 1
(36 additional frame(s) were not displayed)
...
File "... | diff --git a/pydis_site/apps/home/views/home.py b/pydis_site/apps/home/views/home.py
--- a/pydis_site/apps/home/views/home.py
+++ b/pydis_site/apps/home/views/home.py
@@ -9,7 +9,7 @@
from django.views import View
from pydis_site.apps.home.models import RepositoryMetadata
-from pydis_site.constants import GITHUB_TOK... | {"golden_diff": "diff --git a/pydis_site/apps/home/views/home.py b/pydis_site/apps/home/views/home.py\n--- a/pydis_site/apps/home/views/home.py\n+++ b/pydis_site/apps/home/views/home.py\n@@ -9,7 +9,7 @@\n from django.views import View\n \n from pydis_site.apps.home.models import RepositoryMetadata\n-from pydis_site.con... | 2,027 | 370 |
gh_patches_debug_18480 | rasdani/github-patches | git_diff | litestar-org__litestar-1718 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docs: template autoescaping behavior
### Summary
I appreciate this framework having a built-in choice between Jinja and Mako. The documentation however makes no mention of a significant difference in the ... | diff --git a/litestar/contrib/mako.py b/litestar/contrib/mako.py
--- a/litestar/contrib/mako.py
+++ b/litestar/contrib/mako.py
@@ -70,7 +70,9 @@
directory: Direct path or list of directory paths from which to serve templates.
"""
super().__init__(directory=directory)
- self.engine ... | {"golden_diff": "diff --git a/litestar/contrib/mako.py b/litestar/contrib/mako.py\n--- a/litestar/contrib/mako.py\n+++ b/litestar/contrib/mako.py\n@@ -70,7 +70,9 @@\n directory: Direct path or list of directory paths from which to serve templates.\n \"\"\"\n super().__init__(directory=direct... | 1,375 | 213 |
gh_patches_debug_27060 | rasdani/github-patches | git_diff | svthalia__concrexit-1399 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Documents page broken
Steps to reproduce:
1. Go to https://thalia.nu/association/documents/
Sentry Issue: [CONCREXIT-4E](https://sentry.io/organizations/thalia/issues/2020405926/?referrer=github_integration... | diff --git a/website/documents/views.py b/website/documents/views.py
--- a/website/documents/views.py
+++ b/website/documents/views.py
@@ -7,7 +7,6 @@
from django.shortcuts import redirect
from django.utils import timezone
from django.utils.text import slugify
-from django.utils.translation import get_language
from... | {"golden_diff": "diff --git a/website/documents/views.py b/website/documents/views.py\n--- a/website/documents/views.py\n+++ b/website/documents/views.py\n@@ -7,7 +7,6 @@\n from django.shortcuts import redirect\n from django.utils import timezone\n from django.utils.text import slugify\n-from django.utils.translation i... | 1,427 | 255 |
gh_patches_debug_18608 | rasdani/github-patches | git_diff | safe-global__safe-config-service-80 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing CORS headers
Since CORS headers are missing, resources from this application cannot be accessed by other domains
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or mor... | diff --git a/src/config/settings.py b/src/config/settings.py
--- a/src/config/settings.py
+++ b/src/config/settings.py
@@ -39,6 +39,7 @@
}
INSTALLED_APPS = [
+ "corsheaders",
"safe_apps.apps.AppsConfig",
"django.contrib.admin",
"django.contrib.auth",
@@ -52,6 +53,7 @@
MIDDLEWARE = [
"confi... | {"golden_diff": "diff --git a/src/config/settings.py b/src/config/settings.py\n--- a/src/config/settings.py\n+++ b/src/config/settings.py\n@@ -39,6 +39,7 @@\n }\n \n INSTALLED_APPS = [\n+ \"corsheaders\",\n \"safe_apps.apps.AppsConfig\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n@@ -52,6 +5... | 1,959 | 198 |
gh_patches_debug_43076 | rasdani/github-patches | git_diff | pfnet__pytorch-pfn-extras-187 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`autoload=True` not working with models in the gpu
If we create the snapshot extension with `autoload=True` the model will not correctly load its state.
`autoload=true` loads the state in the CPU. but it i... | diff --git a/pytorch_pfn_extras/nn/modules/lazy.py b/pytorch_pfn_extras/nn/modules/lazy.py
--- a/pytorch_pfn_extras/nn/modules/lazy.py
+++ b/pytorch_pfn_extras/nn/modules/lazy.py
@@ -81,32 +81,45 @@
missing_keys, unexpected_keys, error_msgs):
"""load_state_dict pre-hook function for lazy buffers a... | {"golden_diff": "diff --git a/pytorch_pfn_extras/nn/modules/lazy.py b/pytorch_pfn_extras/nn/modules/lazy.py\n--- a/pytorch_pfn_extras/nn/modules/lazy.py\n+++ b/pytorch_pfn_extras/nn/modules/lazy.py\n@@ -81,32 +81,45 @@\n missing_keys, unexpected_keys, error_msgs):\n \"\"\"load_state_dict pre-hook fu... | 1,886 | 943 |
gh_patches_debug_25656 | rasdani/github-patches | git_diff | roboflow__supervision-121 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Better handling of wrong data types of mask for sv.PolygonZone()
### Search before asking
- [X] I have searched the Supervision [issues](https://github.com/roboflow/supervision/issues) and found no similar f... | diff --git a/supervision/detection/tools/polygon_zone.py b/supervision/detection/tools/polygon_zone.py
--- a/supervision/detection/tools/polygon_zone.py
+++ b/supervision/detection/tools/polygon_zone.py
@@ -17,7 +17,7 @@
A class for defining a polygon-shaped zone within a frame for detecting objects.
Attrib... | {"golden_diff": "diff --git a/supervision/detection/tools/polygon_zone.py b/supervision/detection/tools/polygon_zone.py\n--- a/supervision/detection/tools/polygon_zone.py\n+++ b/supervision/detection/tools/polygon_zone.py\n@@ -17,7 +17,7 @@\n A class for defining a polygon-shaped zone within a frame for detecting o... | 1,868 | 275 |
gh_patches_debug_17927 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-2583 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation issues when running on mac (silicon)
## Description
I'm facing these issues while trying to install using the latest `install.sh` script from master. I'm running 'macOS Big Sur', on a mac with A... | diff --git a/db/install.py b/db/install.py
--- a/db/install.py
+++ b/db/install.py
@@ -10,7 +10,8 @@
):
"""Create database and install Mathesar on it."""
user_db_engine = engine.create_future_engine(
- username, password, hostname, database_name, port
+ username, password, hostname, database_na... | {"golden_diff": "diff --git a/db/install.py b/db/install.py\n--- a/db/install.py\n+++ b/db/install.py\n@@ -10,7 +10,8 @@\n ):\n \"\"\"Create database and install Mathesar on it.\"\"\"\n user_db_engine = engine.create_future_engine(\n- username, password, hostname, database_name, port\n+ username, ... | 1,439 | 185 |
gh_patches_debug_31573 | rasdani/github-patches | git_diff | litestar-org__litestar-1483 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/usin... | diff --git a/starlite/cli/commands/core.py b/starlite/cli/commands/core.py
--- a/starlite/cli/commands/core.py
+++ b/starlite/cli/commands/core.py
@@ -1,4 +1,6 @@
import inspect
+import subprocess
+from typing import Any, Dict, List
from click import command, option
from rich.tree import Tree
@@ -8,6 +10,18 @@
fr... | {"golden_diff": "diff --git a/starlite/cli/commands/core.py b/starlite/cli/commands/core.py\n--- a/starlite/cli/commands/core.py\n+++ b/starlite/cli/commands/core.py\n@@ -1,4 +1,6 @@\n import inspect\n+import subprocess\n+from typing import Any, Dict, List\n \n from click import command, option\n from rich.tree import ... | 1,404 | 513 |
gh_patches_debug_33762 | rasdani/github-patches | git_diff | sunpy__sunpy-3818 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Reduce import time for `sunpy.image.transform`
(I was getting annoyed by our import times, and was inspired by astropy/astropy#4598 to look deeper.)
This one's easy. Importing `sunpy.image.transform` take... | diff --git a/sunpy/image/transform.py b/sunpy/image/transform.py
--- a/sunpy/image/transform.py
+++ b/sunpy/image/transform.py
@@ -8,15 +8,6 @@
from sunpy.util.exceptions import SunpyUserWarning
-try:
- import skimage.transform
- scikit_image_not_found = False
-except ImportError:
- warnings.warn("scikit-... | {"golden_diff": "diff --git a/sunpy/image/transform.py b/sunpy/image/transform.py\n--- a/sunpy/image/transform.py\n+++ b/sunpy/image/transform.py\n@@ -8,15 +8,6 @@\n \n from sunpy.util.exceptions import SunpyUserWarning\n \n-try:\n- import skimage.transform\n- scikit_image_not_found = False\n-except ImportError:\... | 2,028 | 501 |
gh_patches_debug_67477 | rasdani/github-patches | git_diff | scverse__scanpy-721 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Give `external` higher billing in the docs?
At the moment external modules are kind of hidden in the docs. I think it'd be worth making them more visible (at least on the same page as everything else). I've b... | diff --git a/scanpy/external/__init__.py b/scanpy/external/__init__.py
--- a/scanpy/external/__init__.py
+++ b/scanpy/external/__init__.py
@@ -19,6 +19,8 @@
import scanpy.external as sce
+If you'd like to see your tool included here, please open a `pull request <https://github.com/theislab/scanpy>`_!
+
Preproc... | {"golden_diff": "diff --git a/scanpy/external/__init__.py b/scanpy/external/__init__.py\n--- a/scanpy/external/__init__.py\n+++ b/scanpy/external/__init__.py\n@@ -19,6 +19,8 @@\n \n import scanpy.external as sce\n \n+If you'd like to see your tool included here, please open a `pull request <https://github.com/theisl... | 941 | 109 |
gh_patches_debug_4507 | rasdani/github-patches | git_diff | gratipay__gratipay.com-1875 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Linking accounts with an OpenStreetMap account does not work if confirmation is required.
Log in with OpenStreetMap account and log out.
Log in with GitHub account and link it with the previous OpenStreetMap ... | diff --git a/gittip/elsewhere/openstreetmap.py b/gittip/elsewhere/openstreetmap.py
--- a/gittip/elsewhere/openstreetmap.py
+++ b/gittip/elsewhere/openstreetmap.py
@@ -15,6 +15,12 @@
def get_url(self):
return self.user_info['html_url']
+ def get_user_name(self):
+ return self.user_info['usernam... | {"golden_diff": "diff --git a/gittip/elsewhere/openstreetmap.py b/gittip/elsewhere/openstreetmap.py\n--- a/gittip/elsewhere/openstreetmap.py\n+++ b/gittip/elsewhere/openstreetmap.py\n@@ -15,6 +15,12 @@\n def get_url(self):\n return self.user_info['html_url']\n \n+ def get_user_name(self):\n+ retur... | 1,309 | 148 |
gh_patches_debug_14384 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-2915 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Impossible de rechercher certainnes informations au delà de la première page
**Scénario 1:**
- Aller sur la page de recherche : `http://zestedesavoir.com/rechercher/`
- Saisir dans la zone de recherche : `&ab... | diff --git a/zds/utils/templatetags/append_to_get.py b/zds/utils/templatetags/append_to_get.py
--- a/zds/utils/templatetags/append_to_get.py
+++ b/zds/utils/templatetags/append_to_get.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from django import template
+from django.utils.http import urlquote
from functools impor... | {"golden_diff": "diff --git a/zds/utils/templatetags/append_to_get.py b/zds/utils/templatetags/append_to_get.py\n--- a/zds/utils/templatetags/append_to_get.py\n+++ b/zds/utils/templatetags/append_to_get.py\n@@ -1,6 +1,7 @@\n # -*- coding: utf-8 -*-\n \n from django import template\n+from django.utils.http import urlquo... | 1,338 | 228 |
gh_patches_debug_30253 | rasdani/github-patches | git_diff | streamlink__streamlink-1663 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to validate result: <_sre.SRE_Match object; ... should be 'list' but is 'str'
### Checklist
- [x] This is a bug report.
- [ ] This is a feature request.
- [ ] This is a plugin (improvement) reques... | diff --git a/src/streamlink/plugins/ine.py b/src/streamlink/plugins/ine.py
--- a/src/streamlink/plugins/ine.py
+++ b/src/streamlink/plugins/ine.py
@@ -6,7 +6,8 @@
from streamlink.plugin import Plugin
from streamlink.plugin.api import http
from streamlink.plugin.api import validate
-from streamlink.stream import HLSS... | {"golden_diff": "diff --git a/src/streamlink/plugins/ine.py b/src/streamlink/plugins/ine.py\n--- a/src/streamlink/plugins/ine.py\n+++ b/src/streamlink/plugins/ine.py\n@@ -6,7 +6,8 @@\n from streamlink.plugin import Plugin\n from streamlink.plugin.api import http\n from streamlink.plugin.api import validate\n-from strea... | 1,409 | 391 |
gh_patches_debug_21861 | rasdani/github-patches | git_diff | facebookresearch__hydra-352 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] system.exit(code) is not respected in Hydra
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `hydra/ma... | diff --git a/hydra/main.py b/hydra/main.py
--- a/hydra/main.py
+++ b/hydra/main.py
@@ -1,6 +1,5 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import functools
-import sys
from typing import Callable, Optional
from ._internal.utils import get_args_parser, run_hydra
@@ -23,17 +22,12 @@
... | {"golden_diff": "diff --git a/hydra/main.py b/hydra/main.py\n--- a/hydra/main.py\n+++ b/hydra/main.py\n@@ -1,6 +1,5 @@\n # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n import functools\n-import sys\n from typing import Callable, Optional\n \n from ._internal.utils import get_args_parser, run_h... | 614 | 244 |
gh_patches_debug_9471 | rasdani/github-patches | git_diff | vispy__vispy-1084 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
IPython WebGL Examples not working.
The IPython notebook examples are not working with the latest IPython(Jupyter) 4.0 release.
--- END ISSUE ---
Below are some code segments, each from a relevant file. On... | diff --git a/vispy/app/backends/ipython/_widget.py b/vispy/app/backends/ipython/_widget.py
--- a/vispy/app/backends/ipython/_widget.py
+++ b/vispy/app/backends/ipython/_widget.py
@@ -57,7 +57,10 @@
self.gen_event = self.canvas_backend._gen_event
#setup the backend widget then.
- def events_receiv... | {"golden_diff": "diff --git a/vispy/app/backends/ipython/_widget.py b/vispy/app/backends/ipython/_widget.py\n--- a/vispy/app/backends/ipython/_widget.py\n+++ b/vispy/app/backends/ipython/_widget.py\n@@ -57,7 +57,10 @@\n self.gen_event = self.canvas_backend._gen_event\n #setup the backend widget then.\n ... | 1,276 | 196 |
gh_patches_debug_29933 | rasdani/github-patches | git_diff | jazzband__pip-tools-1912 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The latest and the stable documentation may have been built using the development version
Shouldn't be [there](https://pip-tools.readthedocs.io/) the latest released version?
<img width="788" alt="Screensh... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -3,15 +3,17 @@
from __future__ import annotations
-from functools import partial
+from importlib.metadata import version as get_version
from pathlib import Path
-from setuptools_scm import get_version
+from sphinx.util import logg... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -3,15 +3,17 @@\n \n from __future__ import annotations\n \n-from functools import partial\n+from importlib.metadata import version as get_version\n from pathlib import Path\n \n-from setuptools_scm import get_version\n... | 823 | 358 |
gh_patches_debug_27526 | rasdani/github-patches | git_diff | pantsbuild__pants-11274 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Target Hitting Recursion Limit During Pants Setup (with workaround)
# Description of Problem
We’re in the process of migrating from 1.25 to 2.1.0., and hit an issue trying to run a test on specific target. T... | diff --git a/src/python/pants/bin/pants_loader.py b/src/python/pants/bin/pants_loader.py
--- a/src/python/pants/bin/pants_loader.py
+++ b/src/python/pants/bin/pants_loader.py
@@ -4,6 +4,7 @@
import importlib
import locale
import os
+import sys
import warnings
from textwrap import dedent
@@ -14,6 +15,8 @@
EN... | {"golden_diff": "diff --git a/src/python/pants/bin/pants_loader.py b/src/python/pants/bin/pants_loader.py\n--- a/src/python/pants/bin/pants_loader.py\n+++ b/src/python/pants/bin/pants_loader.py\n@@ -4,6 +4,7 @@\n import importlib\n import locale\n import os\n+import sys\n import warnings\n from textwrap import dedent\n... | 1,495 | 313 |
gh_patches_debug_3638 | rasdani/github-patches | git_diff | ivy-llc__ivy-19452 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
rfftn
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/numpy/fft/discrete_fourier_... | diff --git a/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py b/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py
--- a/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py
+++ b/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py
@@ -133,3 +133,10 @@
a = ivy... | {"golden_diff": "diff --git a/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py b/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py\n--- a/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py\n+++ b/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py\n@@ -133,3 +13... | 1,781 | 225 |
gh_patches_debug_29782 | rasdani/github-patches | git_diff | cupy__cupy-7693 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix `cupyx.scipy.sparse.csgraph` module to work with the latest RAPIDS cuGraph
Follow the API change introduced in RAPIDS 22.12.
https://github.com/cupy/cupy/pull/7647#discussion_r1244820097
cc/ @pentsche... | diff --git a/cupyx/scipy/sparse/csgraph/_traversal.py b/cupyx/scipy/sparse/csgraph/_traversal.py
--- a/cupyx/scipy/sparse/csgraph/_traversal.py
+++ b/cupyx/scipy/sparse/csgraph/_traversal.py
@@ -51,9 +51,9 @@
raise ValueError('graph should be a square array')
if csgraph.nnz == 0:
return m, cupy.a... | {"golden_diff": "diff --git a/cupyx/scipy/sparse/csgraph/_traversal.py b/cupyx/scipy/sparse/csgraph/_traversal.py\n--- a/cupyx/scipy/sparse/csgraph/_traversal.py\n+++ b/cupyx/scipy/sparse/csgraph/_traversal.py\n@@ -51,9 +51,9 @@\n raise ValueError('graph should be a square array')\n if csgraph.nnz == 0:\n ... | 1,634 | 439 |
gh_patches_debug_2892 | rasdani/github-patches | git_diff | joke2k__faker-435 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Published packages include docs/ as a module
The published wheel and sdist on PyPI for at least version 0.7.5 include `docs/__init__.py` as a top-level module in addition to `faker`. This conflicts with some ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,7 @@
author_email='joke2k@gmail.com',
url='https://github.com/joke2k/faker',
license='MIT License',
- packages=find_packages(),
+ packages=find_packages(exclude=("docs",)),
platforms=["any"],
test_suite='faker.tes... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -51,7 +51,7 @@\n author_email='joke2k@gmail.com',\n url='https://github.com/joke2k/faker',\n license='MIT License',\n- packages=find_packages(),\n+ packages=find_packages(exclude=(\"docs\",)),\n platforms=[\"any\... | 1,098 | 99 |
gh_patches_debug_13673 | rasdani/github-patches | git_diff | meltano__meltano-6779 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bug: exit code null on snowplow telemetry
In investigating https://github.com/meltano/internal-data/issues/26 I saw a large increase in bad events. Looks like all of the ones from 2.6.0 and 2.5.0 are from:
... | diff --git a/src/meltano/core/tracking/schemas.py b/src/meltano/core/tracking/schemas.py
--- a/src/meltano/core/tracking/schemas.py
+++ b/src/meltano/core/tracking/schemas.py
@@ -30,7 +30,7 @@
BlockEventSchema = IgluSchema("block_event", "1-0-0")
EnvironmentContextSchema = IgluSchema("environment_context", "1-0-0")
... | {"golden_diff": "diff --git a/src/meltano/core/tracking/schemas.py b/src/meltano/core/tracking/schemas.py\n--- a/src/meltano/core/tracking/schemas.py\n+++ b/src/meltano/core/tracking/schemas.py\n@@ -30,7 +30,7 @@\n BlockEventSchema = IgluSchema(\"block_event\", \"1-0-0\")\n EnvironmentContextSchema = IgluSchema(\"envir... | 803 | 223 |
gh_patches_debug_5224 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-146 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
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 pack... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@
"core-agent-manager = scout_apm.core.cli.core_agent_manager:main"
]
},
- "install_requires": ["psutil", "PyYAML", "requests"],
+ "install_requires": ["psutil", "requests"],
"keywords": "apm performance... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,7 +37,7 @@\n \"core-agent-manager = scout_apm.core.cli.core_agent_manager:main\"\n ]\n },\n- \"install_requires\": [\"psutil\", \"PyYAML\", \"requests\"],\n+ \"install_requires\": [\"psutil\", \"reque... | 1,092 | 113 |
gh_patches_debug_4897 | rasdani/github-patches | git_diff | bridgecrewio__checkov-592 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CKV_GCP_29 - Checks failed after GCP resource renamed
**Describe the bug**
Google has renamed the value
`bucket_policy_only ` to `uniform_bucket_level_access`.
When adding the new value in the configurat... | diff --git a/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py b/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py
--- a/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py
+++ b/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py b/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py\n--- a/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py\n+++ b/checkov/terraform/checks/resource/gcp/GoogleStorageB... | 572 | 154 |
gh_patches_debug_20216 | rasdani/github-patches | git_diff | yt-dlp__yt-dlp-6171 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pornez.Net - Problem with iframe extractor.
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field
### Checklist
- [X] I'm repo... | diff --git a/yt_dlp/extractor/pornez.py b/yt_dlp/extractor/pornez.py
--- a/yt_dlp/extractor/pornez.py
+++ b/yt_dlp/extractor/pornez.py
@@ -1,5 +1,5 @@
from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import int_or_none, urljoin
class PornezIE(InfoExtractor):
@@ -20,7 +20,8 @@
... | {"golden_diff": "diff --git a/yt_dlp/extractor/pornez.py b/yt_dlp/extractor/pornez.py\n--- a/yt_dlp/extractor/pornez.py\n+++ b/yt_dlp/extractor/pornez.py\n@@ -1,5 +1,5 @@\n from .common import InfoExtractor\n-from ..utils import int_or_none\n+from ..utils import int_or_none, urljoin\n \n \n class PornezIE(InfoExtractor... | 1,965 | 279 |
gh_patches_debug_20051 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-1111 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Harris Teeter
Mostly southeastern https://www.harristeeter.com/store/#/app/store-locator
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bug... | diff --git a/locations/spiders/harristeeter.py b/locations/spiders/harristeeter.py
--- a/locations/spiders/harristeeter.py
+++ b/locations/spiders/harristeeter.py
@@ -79,16 +79,17 @@
for shop in shops:
props = {
- 'opening_hours': shop['StoreHours'].replace('Open 24 hrs', 'Mo-Su 0... | {"golden_diff": "diff --git a/locations/spiders/harristeeter.py b/locations/spiders/harristeeter.py\n--- a/locations/spiders/harristeeter.py\n+++ b/locations/spiders/harristeeter.py\n@@ -79,16 +79,17 @@\n \n for shop in shops:\n props = {\n- 'opening_hours': shop['StoreHours'].replace... | 1,283 | 289 |
gh_patches_debug_17150 | rasdani/github-patches | git_diff | Kinto__kinto-492 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
kinto start takes too much time.
It can sometimes take more than 2 seconds, as reported by @n1k0 on JS clients integration tests.
I investigated a bit and found out, that on my machine, loading the entrypoin... | diff --git a/kinto/__main__.py b/kinto/__main__.py
--- a/kinto/__main__.py
+++ b/kinto/__main__.py
@@ -45,6 +45,11 @@
parser_migrate.set_defaults(which='migrate')
parser_start = subparsers.add_parser('start')
+ parser_start.add_argument('--reload',
+ action='store_true',
+ ... | {"golden_diff": "diff --git a/kinto/__main__.py b/kinto/__main__.py\n--- a/kinto/__main__.py\n+++ b/kinto/__main__.py\n@@ -45,6 +45,11 @@\n parser_migrate.set_defaults(which='migrate')\n \n parser_start = subparsers.add_parser('start')\n+ parser_start.add_argument('--reload',\n+ ... | 1,381 | 210 |
gh_patches_debug_28526 | rasdani/github-patches | git_diff | akvo__akvo-rsr-2553 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Search in EUTF akvo site
Partner team had a training and workshop with EUTF last week and discovered that search terms in EUTF akvo site returned unrelated results.
Search for tombouctou shows up a project... | diff --git a/akvo/rest/views/typeahead.py b/akvo/rest/views/typeahead.py
--- a/akvo/rest/views/typeahead.py
+++ b/akvo/rest/views/typeahead.py
@@ -13,6 +13,7 @@
from akvo.codelists.models import Country, Version
from akvo.rsr.models import Organisation, Project, ProjectUpdate
+from akvo.rsr.views.project import _pr... | {"golden_diff": "diff --git a/akvo/rest/views/typeahead.py b/akvo/rest/views/typeahead.py\n--- a/akvo/rest/views/typeahead.py\n+++ b/akvo/rest/views/typeahead.py\n@@ -13,6 +13,7 @@\n \n from akvo.codelists.models import Country, Version\n from akvo.rsr.models import Organisation, Project, ProjectUpdate\n+from akvo.rsr.... | 1,325 | 434 |
gh_patches_debug_33599 | rasdani/github-patches | git_diff | pyjanitor-devs__pyjanitor-1116 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Require pyspark minimal version is v3.2.0 to cut duplicates codes
Since [pyspark v3.2.0](https://github.com/apache/spark/blob/5d45a415f3a29898d92380380cfd82bfc7f579ea/python/pyspark/pandas/extensions.py#L28-L... | diff --git a/janitor/spark/backend.py b/janitor/spark/backend.py
--- a/janitor/spark/backend.py
+++ b/janitor/spark/backend.py
@@ -1,84 +1,20 @@
""" Backend functions for pyspark."""
-import warnings
from functools import wraps
-from janitor.utils import import_message
+try:
+ from pyspark.pandas.extensions ... | {"golden_diff": "diff --git a/janitor/spark/backend.py b/janitor/spark/backend.py\n--- a/janitor/spark/backend.py\n+++ b/janitor/spark/backend.py\n@@ -1,84 +1,20 @@\n \"\"\" Backend functions for pyspark.\"\"\"\n \n-import warnings\n from functools import wraps\n \n-from janitor.utils import import_message\n \n+try:\n+... | 1,453 | 636 |
gh_patches_debug_21302 | rasdani/github-patches | git_diff | TheAlgorithms__Python-9108 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove duplicate GCD implementation
### Feature description
[`greatest_common_divisor.py`](https://github.com/TheAlgorithms/Python/blob/master/maths/greatest_common_divisor.py) and [`euclidean_gcd.py`](https... | diff --git a/maths/euclidean_gcd.py b/maths/euclidean_gcd.py
deleted file mode 100644
--- a/maths/euclidean_gcd.py
+++ /dev/null
@@ -1,47 +0,0 @@
-""" https://en.wikipedia.org/wiki/Euclidean_algorithm """
-
-
-def euclidean_gcd(a: int, b: int) -> int:
- """
- Examples:
- >>> euclidean_gcd(3, 5)
- 1
-
- >... | {"golden_diff": "diff --git a/maths/euclidean_gcd.py b/maths/euclidean_gcd.py\ndeleted file mode 100644\n--- a/maths/euclidean_gcd.py\n+++ /dev/null\n@@ -1,47 +0,0 @@\n-\"\"\" https://en.wikipedia.org/wiki/Euclidean_algorithm \"\"\"\n-\n-\n-def euclidean_gcd(a: int, b: int) -> int:\n- \"\"\"\n- Examples:\n- >>... | 931 | 572 |
gh_patches_debug_1750 | rasdani/github-patches | git_diff | locustio__locust-1839 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OOM error with master/slaves setup (zeromq, windows)
Hi !
### Describe the bug
An out of memory error occurs with ZeroMQ trying to allocate a crazy amount of memory in decoded_allocator, sometime up to s... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
"Werkzeug>=2.0.0",
"requests>=2.9.1",
"msgpack>=0.6.2",
- "pyzmq>=16.0.2",
+ "pyzmq>=22.2.1",
"geventhttpclient>=1.4.4",
"ConfigArgParse>=1.0",
"psutil>=5.6.7",
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -23,7 +23,7 @@\n \"Werkzeug>=2.0.0\",\n \"requests>=2.9.1\",\n \"msgpack>=0.6.2\",\n- \"pyzmq>=16.0.2\",\n+ \"pyzmq>=22.2.1\",\n \"geventhttpclient>=1.4.4\",\n \"ConfigArgParse>=1.... | 1,139 | 127 |
gh_patches_debug_13788 | rasdani/github-patches | git_diff | pyca__cryptography-1615 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Backend loading code produces a warning with the latest setuptools
The use `load(require=False)` (specifically the `require` kwarg) is deprecated. /cc @dstufft
--- END ISSUE ---
Below are some code segmen... | diff --git a/src/cryptography/hazmat/backends/__init__.py b/src/cryptography/hazmat/backends/__init__.py
--- a/src/cryptography/hazmat/backends/__init__.py
+++ b/src/cryptography/hazmat/backends/__init__.py
@@ -17,8 +17,13 @@
if _available_backends_list is None:
_available_backends_list = [
- ... | {"golden_diff": "diff --git a/src/cryptography/hazmat/backends/__init__.py b/src/cryptography/hazmat/backends/__init__.py\n--- a/src/cryptography/hazmat/backends/__init__.py\n+++ b/src/cryptography/hazmat/backends/__init__.py\n@@ -17,8 +17,13 @@\n \n if _available_backends_list is None:\n _available_backend... | 575 | 234 |
gh_patches_debug_580 | rasdani/github-patches | git_diff | pex-tool__pex-1191 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.26
On the docket:
+ [x] Pex requirement parsing is tripped up by files in the CWD with the same name as requirements' project names. #1188
--- END ISSUE ---
Below are some code segments, each f... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = "2.1.25"
+__version__ = "2.1.26"
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.25\"\n+__version__ = \"2.1.26\"\n", "... | 355 | 96 |
gh_patches_debug_2211 | rasdani/github-patches | git_diff | rasterio__rasterio-883 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Single int indexes param in sample method
According to docs the `indexes` param in the `sample` method can be a "list of ints or a single int".
However passing a single int raises this exception: `IndexError... | diff --git a/rasterio/sample.py b/rasterio/sample.py
--- a/rasterio/sample.py
+++ b/rasterio/sample.py
@@ -3,6 +3,10 @@
def sample_gen(dataset, xy, indexes=None):
index = dataset.index
read = dataset.read
+
+ if isinstance(indexes, int):
+ indexes = [indexes]
+
for x, y in xy:
r, c = ... | {"golden_diff": "diff --git a/rasterio/sample.py b/rasterio/sample.py\n--- a/rasterio/sample.py\n+++ b/rasterio/sample.py\n@@ -3,6 +3,10 @@\n def sample_gen(dataset, xy, indexes=None):\n index = dataset.index\n read = dataset.read\n+\n+ if isinstance(indexes, int):\n+ indexes = [indexes]\n+\n for ... | 425 | 118 |
gh_patches_debug_62161 | rasdani/github-patches | git_diff | Parsl__parsl-3431 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Radical Pilot test failure in CI
**Describe the bug**
Since around Friday (according to @WardLT ), Parsl CI has been failing with this radical failure:
```
parsl/tests/conftest.py:180:
_ _ _ _ _ _ _ _ ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -34,7 +34,7 @@
'workqueue': ['work_queue'],
'flux': ['pyyaml', 'cffi', 'jsonschema'],
'proxystore': ['proxystore'],
- 'radical-pilot': ['radical.pilot==1.52.1'],
+ 'radical-pilot': ['radical.pilot==1.52.1', 'radical.utils==1.52'],
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -34,7 +34,7 @@\n 'workqueue': ['work_queue'],\n 'flux': ['pyyaml', 'cffi', 'jsonschema'],\n 'proxystore': ['proxystore'],\n- 'radical-pilot': ['radical.pilot==1.52.1'],\n+ 'radical-pilot': ['radical.pilot==1.52.1', '... | 2,013 | 166 |
gh_patches_debug_13896 | rasdani/github-patches | git_diff | ARM-DOE__ACT-553 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Accessor not available in dataset
I fetched the latest updates after the lazy_loading PR and ran pytest and am seeing a lot of errors with accessors not loading. Clean, QCFilter, and QCTests are no longer av... | diff --git a/act/__init__.py b/act/__init__.py
--- a/act/__init__.py
+++ b/act/__init__.py
@@ -5,11 +5,13 @@
"""
import lazy_loader as lazy
+
# No more pandas warnings
from pandas.plotting import register_matplotlib_converters
from . import tests
from ._version import get_versions
+from .qc import QCFilter, Q... | {"golden_diff": "diff --git a/act/__init__.py b/act/__init__.py\n--- a/act/__init__.py\n+++ b/act/__init__.py\n@@ -5,11 +5,13 @@\n \"\"\"\n \n import lazy_loader as lazy\n+\n # No more pandas warnings\n from pandas.plotting import register_matplotlib_converters\n \n from . import tests\n from ._version import get_versi... | 874 | 216 |
gh_patches_debug_7560 | rasdani/github-patches | git_diff | Qiskit__qiskit-1875 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Registers cannot be index with negative integers or slices
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this ... | diff --git a/qiskit/circuit/register.py b/qiskit/circuit/register.py
--- a/qiskit/circuit/register.py
+++ b/qiskit/circuit/register.py
@@ -80,6 +80,8 @@
"""
if not isinstance(key, (int, slice, list)):
raise QiskitError("expected integer or slice index into register")
+ if isinstanc... | {"golden_diff": "diff --git a/qiskit/circuit/register.py b/qiskit/circuit/register.py\n--- a/qiskit/circuit/register.py\n+++ b/qiskit/circuit/register.py\n@@ -80,6 +80,8 @@\n \"\"\"\n if not isinstance(key, (int, slice, list)):\n raise QiskitError(\"expected integer or slice index into regis... | 1,539 | 136 |
gh_patches_debug_29560 | rasdani/github-patches | git_diff | mlflow__mlflow-9384 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Enable `PT027`
### Summary
- Enable [PT027](https://beta.ruff.rs/docs/rules/pytest-unittest-raises-assertion/).
- Remove `unittest-assert-raises`.
```diff
diff --git a/pylintrc b/pylintrc
index 9148d11... | diff --git a/pylint_plugins/__init__.py b/pylint_plugins/__init__.py
--- a/pylint_plugins/__init__.py
+++ b/pylint_plugins/__init__.py
@@ -1,9 +1,7 @@
-from pylint_plugins.unittest_assert_raises import UnittestAssertRaises
from pylint_plugins.import_checker import ImportChecker
from pylint_plugins.assign_checker impo... | {"golden_diff": "diff --git a/pylint_plugins/__init__.py b/pylint_plugins/__init__.py\n--- a/pylint_plugins/__init__.py\n+++ b/pylint_plugins/__init__.py\n@@ -1,9 +1,7 @@\n-from pylint_plugins.unittest_assert_raises import UnittestAssertRaises\n from pylint_plugins.import_checker import ImportChecker\n from pylint_plug... | 1,324 | 527 |
gh_patches_debug_42048 | rasdani/github-patches | git_diff | joke2k__faker-1243 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update python_requires in setup.py
https://github.com/joke2k/faker/blob/146f205b942d15c95160df35d3e431624697d079/setup.py#L65
Finnish IBAN should be 18 characters of length
* Faker version: 4.1.1
Finnish I... | diff --git a/faker/generator.py b/faker/generator.py
--- a/faker/generator.py
+++ b/faker/generator.py
@@ -1,14 +1,16 @@
import random as random_module
import re
-_re_token = re.compile(r'\{\{(\s?)(\w+)(\s?)\}\}')
+_re_token = re.compile(r'\{\{\s*(\w+)(:\s*\w+?)?\s*\}\}')
random = random_module.Random()
mod_rando... | {"golden_diff": "diff --git a/faker/generator.py b/faker/generator.py\n--- a/faker/generator.py\n+++ b/faker/generator.py\n@@ -1,14 +1,16 @@\n import random as random_module\n import re\n \n-_re_token = re.compile(r'\\{\\{(\\s?)(\\w+)(\\s?)\\}\\}')\n+_re_token = re.compile(r'\\{\\{\\s*(\\w+)(:\\s*\\w+?)?\\s*\\}\\}')\n ... | 1,352 | 960 |
gh_patches_debug_9667 | rasdani/github-patches | git_diff | comic__grand-challenge.org-3259 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unsupported upload interface type breaks later file uploads widgets
I have a reader study with a 3d-liver-model interface (.obj kind). The following likely also extends to archive items.
We don't support u... | diff --git a/app/grandchallenge/uploads/widgets.py b/app/grandchallenge/uploads/widgets.py
--- a/app/grandchallenge/uploads/widgets.py
+++ b/app/grandchallenge/uploads/widgets.py
@@ -11,8 +11,10 @@
def get_context(self, *args, **kwargs):
context = super().get_context(*args, **kwargs)
+ widget_id ... | {"golden_diff": "diff --git a/app/grandchallenge/uploads/widgets.py b/app/grandchallenge/uploads/widgets.py\n--- a/app/grandchallenge/uploads/widgets.py\n+++ b/app/grandchallenge/uploads/widgets.py\n@@ -11,8 +11,10 @@\n \n def get_context(self, *args, **kwargs):\n context = super().get_context(*args, **kwar... | 777 | 170 |
gh_patches_debug_24998 | rasdani/github-patches | git_diff | translate__pootle-6733 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Expire project cache when language mappings change
# Steps to reproduce:
- change language mappings for a project
# Results (Expected/Actual):
- expected is that on disk files that are now mapped sho... | diff --git a/pootle/apps/pootle_project/forms.py b/pootle/apps/pootle_project/forms.py
--- a/pootle/apps/pootle_project/forms.py
+++ b/pootle/apps/pootle_project/forms.py
@@ -12,6 +12,7 @@
from django_rq.queues import get_queue
+from pootle.core.signals import update_revisions
from pootle.core.utils.db import use... | {"golden_diff": "diff --git a/pootle/apps/pootle_project/forms.py b/pootle/apps/pootle_project/forms.py\n--- a/pootle/apps/pootle_project/forms.py\n+++ b/pootle/apps/pootle_project/forms.py\n@@ -12,6 +12,7 @@\n \n from django_rq.queues import get_queue\n \n+from pootle.core.signals import update_revisions\n from pootle... | 1,971 | 281 |
gh_patches_debug_19141 | rasdani/github-patches | git_diff | pypi__warehouse-2849 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Blacklisting project does not purge the cache
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `warehouse/ad... | diff --git a/warehouse/admin/utils.py b/warehouse/admin/utils.py
--- a/warehouse/admin/utils.py
+++ b/warehouse/admin/utils.py
@@ -64,8 +64,22 @@
(request.db.execute(release_classifiers.delete()
.where(release_classifiers.c.name ==
project.name)))
- reque... | {"golden_diff": "diff --git a/warehouse/admin/utils.py b/warehouse/admin/utils.py\n--- a/warehouse/admin/utils.py\n+++ b/warehouse/admin/utils.py\n@@ -64,8 +64,22 @@\n (request.db.execute(release_classifiers.delete()\n .where(release_classifiers.c.name ==\n pro... | 929 | 263 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.