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_28035
rasdani/github-patches
git_diff
scikit-image__scikit-image-6293
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Build image pyramids not always working with other images ## Description Using the *[Build image pyramids](https://scikit-image.org/docs/dev/auto_examples/transform/plot_pyramid.html)* example with a random ...
diff --git a/doc/examples/transform/plot_pyramid.py b/doc/examples/transform/plot_pyramid.py --- a/doc/examples/transform/plot_pyramid.py +++ b/doc/examples/transform/plot_pyramid.py @@ -9,6 +9,8 @@ detection. """ +import math + import numpy as np import matplotlib.pyplot as plt @@ -20,10 +22,31 @@ rows, cols,...
{"golden_diff": "diff --git a/doc/examples/transform/plot_pyramid.py b/doc/examples/transform/plot_pyramid.py\n--- a/doc/examples/transform/plot_pyramid.py\n+++ b/doc/examples/transform/plot_pyramid.py\n@@ -9,6 +9,8 @@\n detection.\n \n \"\"\"\n+import math\n+\n import numpy as np\n import matplotlib.pyplot as plt\n \n...
1,404
450
gh_patches_debug_25326
rasdani/github-patches
git_diff
mlflow__mlflow-12224
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] uc_volume_dataset_source only validates file paths, not folder paths ### Issues Policy acknowledgement - [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://w...
diff --git a/mlflow/data/uc_volume_dataset_source.py b/mlflow/data/uc_volume_dataset_source.py --- a/mlflow/data/uc_volume_dataset_source.py +++ b/mlflow/data/uc_volume_dataset_source.py @@ -22,10 +22,10 @@ """ def __init__(self, path: str): - self._verify_uc_path_is_valid(path) self.path = ...
{"golden_diff": "diff --git a/mlflow/data/uc_volume_dataset_source.py b/mlflow/data/uc_volume_dataset_source.py\n--- a/mlflow/data/uc_volume_dataset_source.py\n+++ b/mlflow/data/uc_volume_dataset_source.py\n@@ -22,10 +22,10 @@\n \"\"\"\n \n def __init__(self, path: str):\n- self._verify_uc_path_is_valid(...
1,752
349
gh_patches_debug_24966
rasdani/github-patches
git_diff
chainer__chainer-2721
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- resuming issue of LinearShift Same issue as #2680 ``` import chainer from chainer import iterators from chainer import optimizers from chainer import training from chainer.training import extensions ...
diff --git a/chainer/training/extensions/linear_shift.py b/chainer/training/extensions/linear_shift.py --- a/chainer/training/extensions/linear_shift.py +++ b/chainer/training/extensions/linear_shift.py @@ -36,23 +36,34 @@ self._value_range = value_range self._time_range = time_range self._op...
{"golden_diff": "diff --git a/chainer/training/extensions/linear_shift.py b/chainer/training/extensions/linear_shift.py\n--- a/chainer/training/extensions/linear_shift.py\n+++ b/chainer/training/extensions/linear_shift.py\n@@ -36,23 +36,34 @@\n self._value_range = value_range\n self._time_range = time_r...
1,438
419
gh_patches_debug_502
rasdani/github-patches
git_diff
google__flax-2827
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cannot import flax.training.checkpoints in 0.6.4 ### System information - OS Platform and Distribution: Ubuntu 22.04.1 LTS, also in Colab environment - Flax, jax, jaxlib versions: * flax 0.6.4 * jax 0...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ install_requires = [ "numpy>=1.12", - "jax>=0.3.16", + "jax>=0.4.2", "matplotlib", # only needed for tensorboard export "msgpack", "optax",
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -26,7 +26,7 @@\n \n install_requires = [\n \"numpy>=1.12\",\n- \"jax>=0.3.16\",\n+ \"jax>=0.4.2\",\n \"matplotlib\", # only needed for tensorboard export\n \"msgpack\",\n \"optax\",\n", "issue": "Cannot import f...
1,587
92
gh_patches_debug_26532
rasdani/github-patches
git_diff
jazzband__pip-tools-733
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Command in autogenerated requirements.txt can be shortened When I run `pip-compile`, my requirements.txt has ``` # # This file is autogenerated by pip-compile # To update, run: # # pip-compile --ou...
diff --git a/piptools/writer.py b/piptools/writer.py --- a/piptools/writer.py +++ b/piptools/writer.py @@ -1,8 +1,9 @@ import os +import sys from itertools import chain from ._compat import ExitStack -from .click import unstyle +from .click import unstyle, get_os_args from .io import AtomicSaver from .logging im...
{"golden_diff": "diff --git a/piptools/writer.py b/piptools/writer.py\n--- a/piptools/writer.py\n+++ b/piptools/writer.py\n@@ -1,8 +1,9 @@\n import os\n+import sys\n from itertools import chain\n \n from ._compat import ExitStack\n-from .click import unstyle\n+from .click import unstyle, get_os_args\n from .io import A...
1,960
341
gh_patches_debug_14738
rasdani/github-patches
git_diff
crytic__slither-530
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Suicidal detector fails on external functions If the [example](https://github.com/crytic/slither/wiki/Detector-Documentation#suicidal) function for the suicidal detector is changed from `public` to `external`...
diff --git a/slither/detectors/functions/suicidal.py b/slither/detectors/functions/suicidal.py --- a/slither/detectors/functions/suicidal.py +++ b/slither/detectors/functions/suicidal.py @@ -46,7 +46,7 @@ if func.is_constructor: return False - if func.visibility != 'public': + if f...
{"golden_diff": "diff --git a/slither/detectors/functions/suicidal.py b/slither/detectors/functions/suicidal.py\n--- a/slither/detectors/functions/suicidal.py\n+++ b/slither/detectors/functions/suicidal.py\n@@ -46,7 +46,7 @@\n if func.is_constructor:\n return False\n \n- if func.visibility !=...
1,144
194
gh_patches_debug_57650
rasdani/github-patches
git_diff
facebookresearch__ParlAI-1956
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Quickstart AttributeError: 'HogwildWorld' object has no attribute 'acts' **Bug description** When going through the ParlAI [quickstart](https://parl.ai/docs/tutorial_quick.html#install), I got the following ...
diff --git a/parlai/scripts/build_candidates.py b/parlai/scripts/build_candidates.py --- a/parlai/scripts/build_candidates.py +++ b/parlai/scripts/build_candidates.py @@ -23,6 +23,9 @@ def build_cands(opt): # create repeat label agent and assign it to the specified task + if opt['numthreads'] > 1: + #...
{"golden_diff": "diff --git a/parlai/scripts/build_candidates.py b/parlai/scripts/build_candidates.py\n--- a/parlai/scripts/build_candidates.py\n+++ b/parlai/scripts/build_candidates.py\n@@ -23,6 +23,9 @@\n \n def build_cands(opt):\n # create repeat label agent and assign it to the specified task\n+ if opt['numt...
1,619
143
gh_patches_debug_1156
rasdani/github-patches
git_diff
facebookresearch__hydra-1531
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add `env` to Hydra's config group This is a follow up to #1441 the `env` config group will allows users to manually change the env defaults value. (such as provides default callbacks or update run.dir ) ...
diff --git a/hydra/conf/__init__.py b/hydra/conf/__init__.py --- a/hydra/conf/__init__.py +++ b/hydra/conf/__init__.py @@ -99,6 +99,8 @@ {"hydra_logging": "default"}, {"job_logging": "default"}, {"callbacks": None}, + # env specific overrides + {"env": "defau...
{"golden_diff": "diff --git a/hydra/conf/__init__.py b/hydra/conf/__init__.py\n--- a/hydra/conf/__init__.py\n+++ b/hydra/conf/__init__.py\n@@ -99,6 +99,8 @@\n {\"hydra_logging\": \"default\"},\n {\"job_logging\": \"default\"},\n {\"callbacks\": None},\n+ # env specific ove...
1,820
98
gh_patches_debug_20846
rasdani/github-patches
git_diff
wagtail__wagtail-1147
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Wagtail doesn't gracefully support session invalidation on password change According to [Django's documentation](https://docs.djangoproject.com/en/1.7/topics/auth/default/#session-invalidation-on-password-cha...
diff --git a/wagtail/wagtailadmin/views/account.py b/wagtail/wagtailadmin/views/account.py --- a/wagtail/wagtailadmin/views/account.py +++ b/wagtail/wagtailadmin/views/account.py @@ -3,6 +3,7 @@ from django.contrib import messages from django.contrib.auth.forms import SetPasswordForm from django.contrib.auth.views i...
{"golden_diff": "diff --git a/wagtail/wagtailadmin/views/account.py b/wagtail/wagtailadmin/views/account.py\n--- a/wagtail/wagtailadmin/views/account.py\n+++ b/wagtail/wagtailadmin/views/account.py\n@@ -3,6 +3,7 @@\n from django.contrib import messages\n from django.contrib.auth.forms import SetPasswordForm\n from djan...
1,623
193
gh_patches_debug_28162
rasdani/github-patches
git_diff
Qiskit__qiskit-12069
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Documentation of RVGate is incorrect ### Environment N/A ### What is happening? Received this in an email: >Hi, I think I found some errors in the Qiskit documentation at <https://docs.quantum.ibm.com/ap...
diff --git a/qiskit/circuit/library/generalized_gates/rv.py b/qiskit/circuit/library/generalized_gates/rv.py --- a/qiskit/circuit/library/generalized_gates/rv.py +++ b/qiskit/circuit/library/generalized_gates/rv.py @@ -18,7 +18,7 @@ class RVGate(Gate): - r"""Rotation around arbitrary rotation axis :math:`v` whe...
{"golden_diff": "diff --git a/qiskit/circuit/library/generalized_gates/rv.py b/qiskit/circuit/library/generalized_gates/rv.py\n--- a/qiskit/circuit/library/generalized_gates/rv.py\n+++ b/qiskit/circuit/library/generalized_gates/rv.py\n@@ -18,7 +18,7 @@\n \n \n class RVGate(Gate):\n- r\"\"\"Rotation around arbitrary ...
1,667
592
gh_patches_debug_8362
rasdani/github-patches
git_diff
getnikola__nikola-3036
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- RSS_PATH doesn't work as advertised (is path and filename, excluding .xml) * Python Version: 3.5.3 * Nikola Version: v7.8.14 * Operating System: Debian A fresh config says: ``` # Final location for t...
diff --git a/nikola/plugins/task/indexes.py b/nikola/plugins/task/indexes.py --- a/nikola/plugins/task/indexes.py +++ b/nikola/plugins/task/indexes.py @@ -91,7 +91,7 @@ def get_path(self, classification, lang, dest_type='page'): """Return a path for the given classification.""" if dest_type == 'r...
{"golden_diff": "diff --git a/nikola/plugins/task/indexes.py b/nikola/plugins/task/indexes.py\n--- a/nikola/plugins/task/indexes.py\n+++ b/nikola/plugins/task/indexes.py\n@@ -91,7 +91,7 @@\n def get_path(self, classification, lang, dest_type='page'):\n \"\"\"Return a path for the given classification.\"\"\"...
1,735
152
gh_patches_debug_416
rasdani/github-patches
git_diff
automl__auto-sklearn-1361
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Check if test requirement `flaky` can be removed We currently have a test dependancy [flaky](https://pypi.org/project/flaky/) used to annotate a test `KernelPCAComponentTest::test_default_configuration_classi...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -30,7 +30,6 @@ "mypy", "pytest-xdist", "pytest-timeout", - "flaky", "openml", "pre-commit", "pytest-cov",
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -30,7 +30,6 @@\n \"mypy\",\n \"pytest-xdist\",\n \"pytest-timeout\",\n- \"flaky\",\n \"openml\",\n \"pre-commit\",\n \"pytest-cov\",\n", "issue": "Check if test requirement `flaky...
1,186
71
gh_patches_debug_5141
rasdani/github-patches
git_diff
scrapy__scrapy-2503
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- scrapy view <url> raise exc in v1.3.0 ```` (py35) wingyiu@mbp101:~$scrapy view http://www.scrapy.org 2017-01-19 22:13:54 [scrapy.utils.log] INFO: Scrapy 1.3.0 started (bot: scrapybot) 2017-01-19 22:13:54 [...
diff --git a/scrapy/commands/view.py b/scrapy/commands/view.py --- a/scrapy/commands/view.py +++ b/scrapy/commands/view.py @@ -11,9 +11,8 @@ "contents in a browser" def add_options(self, parser): - ScrapyCommand.add_options(self, parser) - parser.add_option("--spider", dest="spider", -...
{"golden_diff": "diff --git a/scrapy/commands/view.py b/scrapy/commands/view.py\n--- a/scrapy/commands/view.py\n+++ b/scrapy/commands/view.py\n@@ -11,9 +11,8 @@\n \"contents in a browser\"\n \n def add_options(self, parser):\n- ScrapyCommand.add_options(self, parser)\n- parser.add_option(\...
775
134
gh_patches_debug_15924
rasdani/github-patches
git_diff
Kinto__kinto-119
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Using the _since querystring filter has no effect I've tried using the `_since` querystring filter as explained in the tutorial, but it seems to have no effect. `GET`ing any of those urls returns the exact s...
diff --git a/kinto/views/buckets.py b/kinto/views/buckets.py --- a/kinto/views/buckets.py +++ b/kinto/views/buckets.py @@ -59,6 +59,8 @@ # Build the user unguessable bucket_id UUID from its user_id bucket_id = hmac_digest(hmac_secret, request.prefixed_userid)[:32] path = request.path.replace('default', b...
{"golden_diff": "diff --git a/kinto/views/buckets.py b/kinto/views/buckets.py\n--- a/kinto/views/buckets.py\n+++ b/kinto/views/buckets.py\n@@ -59,6 +59,8 @@\n # Build the user unguessable bucket_id UUID from its user_id\n bucket_id = hmac_digest(hmac_secret, request.prefixed_userid)[:32]\n path = request.pa...
1,528
187
gh_patches_debug_49039
rasdani/github-patches
git_diff
facebookresearch__hydra-279
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Bug] Documentation inconsistency for `utils.get_original_cwd` # 🐛 Bug The tutorial for working directories has a few commands for setting the working directory [see here](https://cli.dev/docs/tutorial/wo...
diff --git a/hydra/__init__.py b/hydra/__init__.py --- a/hydra/__init__.py +++ b/hydra/__init__.py @@ -4,6 +4,6 @@ from .main import main # Source of truth for Hydra's version -__version__ = "0.10.0" +__version__ = "0.11.0-pre1" __all__ = ["__version__", "MissingConfigException", "main", "utils"]
{"golden_diff": "diff --git a/hydra/__init__.py b/hydra/__init__.py\n--- a/hydra/__init__.py\n+++ b/hydra/__init__.py\n@@ -4,6 +4,6 @@\n from .main import main\n \n # Source of truth for Hydra's version\n-__version__ = \"0.10.0\"\n+__version__ = \"0.11.0-pre1\"\n \n __all__ = [\"__version__\", \"MissingConfigException\...
574
114
gh_patches_debug_34543
rasdani/github-patches
git_diff
UTNkar__moore-154
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Menu Translations <!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se --> ### Description Not all menu pages are using `translated_title`...
diff --git a/website/website/templatetags/site_tags.py b/website/website/templatetags/site_tags.py --- a/website/website/templatetags/site_tags.py +++ b/website/website/templatetags/site_tags.py @@ -20,26 +20,9 @@ @register.inclusion_tag('tags/menu.html', takes_context=True) def menu_items(context, parent, calling_pa...
{"golden_diff": "diff --git a/website/website/templatetags/site_tags.py b/website/website/templatetags/site_tags.py\n--- a/website/website/templatetags/site_tags.py\n+++ b/website/website/templatetags/site_tags.py\n@@ -20,26 +20,9 @@\n @register.inclusion_tag('tags/menu.html', takes_context=True)\n def menu_items(conte...
1,087
522
gh_patches_debug_8815
rasdani/github-patches
git_diff
CTFd__CTFd-2458
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Upload to S3 Failing - CTFd Version/Commit: 3.6.1 - Operating System: Linux (Docker container) - Web Browser and Version: Chrome **What happened?** Upgrading CTFd resulting in S3 file uploads beginnin...
diff --git a/CTFd/utils/uploads/__init__.py b/CTFd/utils/uploads/__init__.py --- a/CTFd/utils/uploads/__init__.py +++ b/CTFd/utils/uploads/__init__.py @@ -44,11 +44,12 @@ model = PageFiles model_args["page_id"] = page_id + # Hash is calculated before upload since S3 file upload closes file object...
{"golden_diff": "diff --git a/CTFd/utils/uploads/__init__.py b/CTFd/utils/uploads/__init__.py\n--- a/CTFd/utils/uploads/__init__.py\n+++ b/CTFd/utils/uploads/__init__.py\n@@ -44,11 +44,12 @@\n model = PageFiles\n model_args[\"page_id\"] = page_id\n \n+ # Hash is calculated before upload since S3 file...
1,645
170
gh_patches_debug_29333
rasdani/github-patches
git_diff
pex-tool__pex-322
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove pkg_resources.build_zipmanifest monkeypatching This may involve increasing the minimum setuptools version. Another alternative is vendoring setuptools. --- END ISSUE --- Below are some code segment...
diff --git a/pex/pex_bootstrapper.py b/pex/pex_bootstrapper.py --- a/pex/pex_bootstrapper.py +++ b/pex/pex_bootstrapper.py @@ -46,20 +46,6 @@ raise ValueError('Invalid entry_point: %s' % entry_point) -# TODO(wickman) Remove once resolved (#91): -# https://bitbucket.org/pypa/setuptools/issue/154/build_zipmanife...
{"golden_diff": "diff --git a/pex/pex_bootstrapper.py b/pex/pex_bootstrapper.py\n--- a/pex/pex_bootstrapper.py\n+++ b/pex/pex_bootstrapper.py\n@@ -46,20 +46,6 @@\n raise ValueError('Invalid entry_point: %s' % entry_point)\n \n \n-# TODO(wickman) Remove once resolved (#91):\n-# https://bitbucket.org/pypa/setuptools/...
1,458
476
gh_patches_debug_18001
rasdani/github-patches
git_diff
mozilla__telemetry-analysis-service-258
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ATMO should pre-click my single SSH key Would save me thousands of milliseconds every time I launch a cluster ;) --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of the...
diff --git a/atmo/clusters/views.py b/atmo/clusters/views.py --- a/atmo/clusters/views.py +++ b/atmo/clusters/views.py @@ -15,7 +15,13 @@ @login_required def new_cluster(request): - if request.user.created_sshkeys.count() == 0: + initial = { + 'identifier': '{}-telemetry-analysis'.format(user_display(r...
{"golden_diff": "diff --git a/atmo/clusters/views.py b/atmo/clusters/views.py\n--- a/atmo/clusters/views.py\n+++ b/atmo/clusters/views.py\n@@ -15,7 +15,13 @@\n \n @login_required\n def new_cluster(request):\n- if request.user.created_sshkeys.count() == 0:\n+ initial = {\n+ 'identifier': '{}-telemetry-analy...
921
262
gh_patches_debug_40147
rasdani/github-patches
git_diff
OpenNMT__OpenNMT-tf-671
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- PRF evaluator: list index out of range Hi! I'm getting `list index out of range` when prf evaluator is used. **Config:** Model: TransformerRelative params: beam_width: 1 train: maximum_feature...
diff --git a/opennmt/utils/fmeasure.py b/opennmt/utils/fmeasure.py --- a/opennmt/utils/fmeasure.py +++ b/opennmt/utils/fmeasure.py @@ -9,21 +9,15 @@ with open(ref_path) as ref_fp, open(hyp_path) as hyp_fp: list_null_tags = ["X", "null", "NULL", "Null", "O"] listtags = [] - linecpt = 0 classref = []...
{"golden_diff": "diff --git a/opennmt/utils/fmeasure.py b/opennmt/utils/fmeasure.py\n--- a/opennmt/utils/fmeasure.py\n+++ b/opennmt/utils/fmeasure.py\n@@ -9,21 +9,15 @@\n with open(ref_path) as ref_fp, open(hyp_path) as hyp_fp:\n list_null_tags = [\"X\", \"null\", \"NULL\", \"Null\", \"O\"]\n listtags = []\n-...
2,017
847
gh_patches_debug_2290
rasdani/github-patches
git_diff
TheAlgorithms__Python-4779
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug with union in disjoint_set https://github.com/TheAlgorithms/Python/blob/master/data_structures/disjoint_set/disjoint_set.py ```python def union_set(x, y): """ union two sets. set with big...
diff --git a/data_structures/disjoint_set/disjoint_set.py b/data_structures/disjoint_set/disjoint_set.py --- a/data_structures/disjoint_set/disjoint_set.py +++ b/data_structures/disjoint_set/disjoint_set.py @@ -26,7 +26,10 @@ disjoint set tree will be more flat. """ x, y = find_set(x), find_set(y) - ...
{"golden_diff": "diff --git a/data_structures/disjoint_set/disjoint_set.py b/data_structures/disjoint_set/disjoint_set.py\n--- a/data_structures/disjoint_set/disjoint_set.py\n+++ b/data_structures/disjoint_set/disjoint_set.py\n@@ -26,7 +26,10 @@\n disjoint set tree will be more flat.\r\n \"\"\"\r\n x, y = f...
1,150
135
gh_patches_debug_15343
rasdani/github-patches
git_diff
Pylons__pyramid-1131
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- No way to add query parameters without a value I occasionally need to put a hint in the query string for a URL, which is essentially a parameter without a value. This can be important to provide information t...
diff --git a/pyramid/encode.py b/pyramid/encode.py --- a/pyramid/encode.py +++ b/pyramid/encode.py @@ -32,6 +32,10 @@ See the Python stdlib documentation for ``urllib.urlencode`` for more information. + + .. versionchanged:: 1.5 + In a key/value pair, if the value is ``None`` then it will be + ...
{"golden_diff": "diff --git a/pyramid/encode.py b/pyramid/encode.py\n--- a/pyramid/encode.py\n+++ b/pyramid/encode.py\n@@ -32,6 +32,10 @@\n \n See the Python stdlib documentation for ``urllib.urlencode`` for\n more information.\n+\n+ .. versionchanged:: 1.5\n+ In a key/value pair, if the value is ``Non...
1,032
208
gh_patches_debug_37438
rasdani/github-patches
git_diff
open-telemetry__opentelemetry-python-934
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- B3 trace_id and span_id not handled correctly These fields are not being handled correctly when an invalid value is passed for one or both of them. Fix that. --- END ISSUE --- Below are some code segments, ...
diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py @@ -13,9 ...
{"golden_diff": "diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py\n--- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py\n+++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_...
1,893
582
gh_patches_debug_25471
rasdani/github-patches
git_diff
StackStorm__st2-5383
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Trigger name collision workaround This addresses the jinja trigger name collision noted in issue #4641 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files m...
diff --git a/contrib/core/actions/inject_trigger.py b/contrib/core/actions/inject_trigger.py --- a/contrib/core/actions/inject_trigger.py +++ b/contrib/core/actions/inject_trigger.py @@ -21,7 +21,7 @@ class InjectTriggerAction(Action): - def run(self, trigger, payload=None, trace_tag=None): + def run(self, t...
{"golden_diff": "diff --git a/contrib/core/actions/inject_trigger.py b/contrib/core/actions/inject_trigger.py\n--- a/contrib/core/actions/inject_trigger.py\n+++ b/contrib/core/actions/inject_trigger.py\n@@ -21,7 +21,7 @@\n \n \n class InjectTriggerAction(Action):\n- def run(self, trigger, payload=None, trace_tag=Non...
722
300
gh_patches_debug_40529
rasdani/github-patches
git_diff
nautobot__nautobot-1148
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove Custom Fields from Admin UI ### Proposed Changes Remove custom fields from Admin UI. This should be as simple as deleting a bunch of code from `nautobot/extras/admin.py` that's no longer needed. ...
diff --git a/nautobot/extras/admin.py b/nautobot/extras/admin.py --- a/nautobot/extras/admin.py +++ b/nautobot/extras/admin.py @@ -1,10 +1,8 @@ from db_file_storage.form_widgets import DBAdminClearableFileInput from django import forms -from django.contrib import admin, messages -from django.db import transaction -fr...
{"golden_diff": "diff --git a/nautobot/extras/admin.py b/nautobot/extras/admin.py\n--- a/nautobot/extras/admin.py\n+++ b/nautobot/extras/admin.py\n@@ -1,10 +1,8 @@\n from db_file_storage.form_widgets import DBAdminClearableFileInput\n from django import forms\n-from django.contrib import admin, messages\n-from django.d...
1,737
875
gh_patches_debug_14993
rasdani/github-patches
git_diff
PrefectHQ__prefect-1583
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add example code block to `switch` docstring I recently realized I hadn't touched the `switch` code in a long time, and I would've really appreciated an example to work off of. Instead, I ended up looking at...
diff --git a/src/prefect/tasks/control_flow/conditional.py b/src/prefect/tasks/control_flow/conditional.py --- a/src/prefect/tasks/control_flow/conditional.py +++ b/src/prefect/tasks/control_flow/conditional.py @@ -56,6 +56,24 @@ skipped. Any tasks downstream of the skipped tasks are also skipped unless they set ...
{"golden_diff": "diff --git a/src/prefect/tasks/control_flow/conditional.py b/src/prefect/tasks/control_flow/conditional.py\n--- a/src/prefect/tasks/control_flow/conditional.py\n+++ b/src/prefect/tasks/control_flow/conditional.py\n@@ -56,6 +56,24 @@\n skipped. Any tasks downstream of the skipped tasks are also skip...
1,724
238
gh_patches_debug_30157
rasdani/github-patches
git_diff
xonsh__xonsh-3796
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bad documentation or bug: _.rtn does not work [In the Documentation](https://xon.sh/bash_to_xsh.html) you write that `_.rtn` is the equivalent of the shell `$?` and that it `Returns the exit code, or status, ...
diff --git a/xontrib/bashisms.py b/xontrib/bashisms.py --- a/xontrib/bashisms.py +++ b/xontrib/bashisms.py @@ -64,3 +64,86 @@ aliases["alias"] = alias builtins.__xonsh__.env["THREAD_SUBPROCS"] = False + + +def _unset(args): + if not args: + print("Usage: unset ENV_VARIABLE", file=sys.stderr) + + for v ...
{"golden_diff": "diff --git a/xontrib/bashisms.py b/xontrib/bashisms.py\n--- a/xontrib/bashisms.py\n+++ b/xontrib/bashisms.py\n@@ -64,3 +64,86 @@\n \n aliases[\"alias\"] = alias\n builtins.__xonsh__.env[\"THREAD_SUBPROCS\"] = False\n+\n+\n+def _unset(args):\n+ if not args:\n+ print(\"Usage: unset ENV_VARIABLE...
1,263
751
gh_patches_debug_13527
rasdani/github-patches
git_diff
jupyterhub__jupyterhub-443
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spawner custom form validation Are there ideas for allowing form validation for spawners that have a custom form? I was thinking of raising an exception in `options_from_form()` and moving the `try` up by on...
diff --git a/jupyterhub/handlers/pages.py b/jupyterhub/handlers/pages.py --- a/jupyterhub/handlers/pages.py +++ b/jupyterhub/handlers/pages.py @@ -93,8 +93,8 @@ form_options[key] = [ bs.decode('utf8') for bs in byte_list ] for key, byte_list in self.request.files.items(): form_options...
{"golden_diff": "diff --git a/jupyterhub/handlers/pages.py b/jupyterhub/handlers/pages.py\n--- a/jupyterhub/handlers/pages.py\n+++ b/jupyterhub/handlers/pages.py\n@@ -93,8 +93,8 @@\n form_options[key] = [ bs.decode('utf8') for bs in byte_list ]\n for key, byte_list in self.request.files.items():\n ...
1,928
165
gh_patches_debug_30656
rasdani/github-patches
git_diff
rucio__rucio-2150
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Test reaper console script Motivation ---------- The reaper console script `rucio-reaper` is not tested in the testsuite. Modification ------------ - Add test for the reaper console script. - Instal...
diff --git a/lib/rucio/clis/daemons/reaper/reaper.py b/lib/rucio/clis/daemons/reaper/reaper.py --- a/lib/rucio/clis/daemons/reaper/reaper.py +++ b/lib/rucio/clis/daemons/reaper/reaper.py @@ -1,4 +1,4 @@ -# Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration. +# Copyright 2012-2019 CERN for the benefit o...
{"golden_diff": "diff --git a/lib/rucio/clis/daemons/reaper/reaper.py b/lib/rucio/clis/daemons/reaper/reaper.py\n--- a/lib/rucio/clis/daemons/reaper/reaper.py\n+++ b/lib/rucio/clis/daemons/reaper/reaper.py\n@@ -1,4 +1,4 @@\n-# Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.\n+# Copyright 2012-2019 ...
1,546
476
gh_patches_debug_57588
rasdani/github-patches
git_diff
joke2k__faker-1043
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BBAN for en_GB too short * Faker version: v2.0.3 * OS: linux Numeric part of the en_GB BBAN needs to be 14 digits long, it currently only returns 13, failing further validation. ### Steps to reproduce ...
diff --git a/faker/providers/bank/en_GB/__init__.py b/faker/providers/bank/en_GB/__init__.py --- a/faker/providers/bank/en_GB/__init__.py +++ b/faker/providers/bank/en_GB/__init__.py @@ -2,5 +2,5 @@ class Provider(BankProvider): - bban_format = '????#############' + bban_format = '????##############' co...
{"golden_diff": "diff --git a/faker/providers/bank/en_GB/__init__.py b/faker/providers/bank/en_GB/__init__.py\n--- a/faker/providers/bank/en_GB/__init__.py\n+++ b/faker/providers/bank/en_GB/__init__.py\n@@ -2,5 +2,5 @@\n \n \n class Provider(BankProvider):\n- bban_format = '????#############'\n+ bban_format = '??...
432
102
gh_patches_debug_60487
rasdani/github-patches
git_diff
mars-project__mars-284
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Fuse operand's sparse value is wrong <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue. --> **Describe...
diff --git a/mars/tensor/expressions/fuse/core.py b/mars/tensor/expressions/fuse/core.py --- a/mars/tensor/expressions/fuse/core.py +++ b/mars/tensor/expressions/fuse/core.py @@ -20,8 +20,8 @@ class TensorFuseChunk(operands.Fuse, TensorOperandMixin): - def __init__(self, dtype=None, **kw): - super(Tensor...
{"golden_diff": "diff --git a/mars/tensor/expressions/fuse/core.py b/mars/tensor/expressions/fuse/core.py\n--- a/mars/tensor/expressions/fuse/core.py\n+++ b/mars/tensor/expressions/fuse/core.py\n@@ -20,8 +20,8 @@\n \n \n class TensorFuseChunk(operands.Fuse, TensorOperandMixin):\n- def __init__(self, dtype=None, **kw...
1,092
176
gh_patches_debug_16846
rasdani/github-patches
git_diff
electricitymaps__electricitymaps-contrib-1691
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Import intensity could fallback on yearly averages when missing/unknown When a country, or area, is importing electricity from another country and the exporting country's production sources are unknown, it se...
diff --git a/utils/config.py b/utils/config.py --- a/utils/config.py +++ b/utils/config.py @@ -40,3 +40,22 @@ # we want neighbors to always be in the same order for zone, neighbors in ZONE_NEIGHBOURS.items(): ZONE_NEIGHBOURS[zone] = sorted(neighbors) + +CO2EQ_PARAMETERS = json.load(open(relative_path( + __fil...
{"golden_diff": "diff --git a/utils/config.py b/utils/config.py\n--- a/utils/config.py\n+++ b/utils/config.py\n@@ -40,3 +40,22 @@\n # we want neighbors to always be in the same order\n for zone, neighbors in ZONE_NEIGHBOURS.items():\n ZONE_NEIGHBOURS[zone] = sorted(neighbors)\n+\n+CO2EQ_PARAMETERS = json.load(open(...
893
284
gh_patches_debug_34020
rasdani/github-patches
git_diff
pre-commit__pre-commit-1888
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Path is not mounted correctly when running Docker hooks from Docker **Situation**: - In our CI we want to run `pre-commit` inside Docker. - Some of our hooks are `docker_image` **Problem** This line m...
diff --git a/pre_commit/languages/docker.py b/pre_commit/languages/docker.py --- a/pre_commit/languages/docker.py +++ b/pre_commit/languages/docker.py @@ -1,5 +1,7 @@ import hashlib +import json import os +import socket from typing import Sequence from typing import Tuple @@ -8,6 +10,7 @@ from pre_commit.languag...
{"golden_diff": "diff --git a/pre_commit/languages/docker.py b/pre_commit/languages/docker.py\n--- a/pre_commit/languages/docker.py\n+++ b/pre_commit/languages/docker.py\n@@ -1,5 +1,7 @@\n import hashlib\n+import json\n import os\n+import socket\n from typing import Sequence\n from typing import Tuple\n \n@@ -8,6 +10,7...
1,540
533
gh_patches_debug_37126
rasdani/github-patches
git_diff
open-mmlab__mmdetection3d-69
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- iou3d failed when inference with gpu:1 Thanks for your error report and we appreciate it a lot. **Checklist** 1. I have searched related issues but cannot get the expected help. 2. The bug has not been f...
diff --git a/mmdet3d/ops/iou3d/iou3d_utils.py b/mmdet3d/ops/iou3d/iou3d_utils.py --- a/mmdet3d/ops/iou3d/iou3d_utils.py +++ b/mmdet3d/ops/iou3d/iou3d_utils.py @@ -4,15 +4,17 @@ def boxes_iou_bev(boxes_a, boxes_b): - """ - :param boxes_a: (M, 5) - :param boxes_b: (N, 5) - :return: - ans_iou: (M, ...
{"golden_diff": "diff --git a/mmdet3d/ops/iou3d/iou3d_utils.py b/mmdet3d/ops/iou3d/iou3d_utils.py\n--- a/mmdet3d/ops/iou3d/iou3d_utils.py\n+++ b/mmdet3d/ops/iou3d/iou3d_utils.py\n@@ -4,15 +4,17 @@\n \n \n def boxes_iou_bev(boxes_a, boxes_b):\n- \"\"\"\n- :param boxes_a: (M, 5)\n- :param boxes_b: (N, 5)\n- :...
1,162
924
gh_patches_debug_5988
rasdani/github-patches
git_diff
liqd__a4-meinberlin-4916
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- #6963 Too many codes in 1 package URL: https://meinberlin-dev.liqd.net/dashboard/modules/burgerinnenhaushalt-3-phasen-21/download-codes/ user: admin, initiator expected behaviour: Each code-package should c...
diff --git a/meinberlin/apps/votes/tasks.py b/meinberlin/apps/votes/tasks.py --- a/meinberlin/apps/votes/tasks.py +++ b/meinberlin/apps/votes/tasks.py @@ -5,9 +5,9 @@ from meinberlin.apps.votes.models import get_token_12 # Number of tokens to insert into database per bulk_create -BATCH_SIZE = 1000000 +BATCH_SIZE = ...
{"golden_diff": "diff --git a/meinberlin/apps/votes/tasks.py b/meinberlin/apps/votes/tasks.py\n--- a/meinberlin/apps/votes/tasks.py\n+++ b/meinberlin/apps/votes/tasks.py\n@@ -5,9 +5,9 @@\n from meinberlin.apps.votes.models import get_token_12\n \n # Number of tokens to insert into database per bulk_create\n-BATCH_SIZE ...
1,148
165
gh_patches_debug_17265
rasdani/github-patches
git_diff
netbox-community__netbox-2694
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add "White" as a cable color ### Environment * Python version: 3.6 * NetBox version: 2.5.1 ### Proposed Functionality Add color white to the cable colors. Optionally add: * ~~slate~~(Dark Grey...
diff --git a/netbox/utilities/constants.py b/netbox/utilities/constants.py --- a/netbox/utilities/constants.py +++ b/netbox/utilities/constants.py @@ -2,6 +2,7 @@ ('aa1409', 'Dark red'), ('f44336', 'Red'), ('e91e63', 'Pink'), + ('ffe4e1', 'Rose'), ('ff66ff', 'Fuschia'), ('9c27b0', 'Purple'),...
{"golden_diff": "diff --git a/netbox/utilities/constants.py b/netbox/utilities/constants.py\n--- a/netbox/utilities/constants.py\n+++ b/netbox/utilities/constants.py\n@@ -2,6 +2,7 @@\n ('aa1409', 'Dark red'),\n ('f44336', 'Red'),\n ('e91e63', 'Pink'),\n+ ('ffe4e1', 'Rose'),\n ('ff66ff', 'Fuschia'),\n...
708
282
gh_patches_debug_4763
rasdani/github-patches
git_diff
pytorch__ignite-3199
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Mean Absolute Percentage Error (MAPE) ## 🚀 Feature I'd like to implement the mean absolute percentage error [(MAPE)](https://en.wikipedia.org/wiki/Mean_absolute_percentage_error) in `ignite/metrics`. I...
diff --git a/ignite/contrib/metrics/regression/mean_absolute_relative_error.py b/ignite/contrib/metrics/regression/mean_absolute_relative_error.py --- a/ignite/contrib/metrics/regression/mean_absolute_relative_error.py +++ b/ignite/contrib/metrics/regression/mean_absolute_relative_error.py @@ -8,7 +8,7 @@ class Me...
{"golden_diff": "diff --git a/ignite/contrib/metrics/regression/mean_absolute_relative_error.py b/ignite/contrib/metrics/regression/mean_absolute_relative_error.py\n--- a/ignite/contrib/metrics/regression/mean_absolute_relative_error.py\n+++ b/ignite/contrib/metrics/regression/mean_absolute_relative_error.py\n@@ -8,7 +...
1,432
171
gh_patches_debug_26538
rasdani/github-patches
git_diff
speechbrain__speechbrain-304
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Stats precision of FileTrainLogger Now, all the stats logged by a FileTrainLogger have the precision 2 after their decimal points. In some training scenarios, precision 2 is not enough for some stats. I sugge...
diff --git a/speechbrain/utils/train_logger.py b/speechbrain/utils/train_logger.py --- a/speechbrain/utils/train_logger.py +++ b/speechbrain/utils/train_logger.py @@ -49,21 +49,24 @@ --------- save_file : str The file to use for logging train information. + precision : int + Number of decim...
{"golden_diff": "diff --git a/speechbrain/utils/train_logger.py b/speechbrain/utils/train_logger.py\n--- a/speechbrain/utils/train_logger.py\n+++ b/speechbrain/utils/train_logger.py\n@@ -49,21 +49,24 @@\n ---------\n save_file : str\n The file to use for logging train information.\n+ precision : int\...
1,842
362
gh_patches_debug_1757
rasdani/github-patches
git_diff
mne-tools__mne-bids-1156
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- MNE-BIDS 0.13 release A release of MNE-BIDS has been requested: https://mne.discourse.group/t/mne-bids-0-13-release-date/7291/2 Our last release has been in December 2022, so I feel like cutting a release ...
diff --git a/mne_bids/__init__.py b/mne_bids/__init__.py --- a/mne_bids/__init__.py +++ b/mne_bids/__init__.py @@ -1,6 +1,6 @@ """MNE software for easily interacting with BIDS compatible datasets.""" -__version__ = "0.13.dev0" +__version__ = "0.13" from mne_bids import commands from mne_bids.report import make_rep...
{"golden_diff": "diff --git a/mne_bids/__init__.py b/mne_bids/__init__.py\n--- a/mne_bids/__init__.py\n+++ b/mne_bids/__init__.py\n@@ -1,6 +1,6 @@\n \"\"\"MNE software for easily interacting with BIDS compatible datasets.\"\"\"\n \n-__version__ = \"0.13.dev0\"\n+__version__ = \"0.13\"\n from mne_bids import commands\n ...
713
118
gh_patches_debug_36782
rasdani/github-patches
git_diff
aws-cloudformation__cfn-lint-2006
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cfn-lint 0.49.1 does not catch `/` as an invalid character in a Mapping element name *cfn-lint version: cfn-lint 0.49.1* *cfn-lint did not catch `/` as an invalid character in a Mapping element name* cf...
diff --git a/src/cfnlint/rules/mappings/KeyName.py b/src/cfnlint/rules/mappings/KeyName.py --- a/src/cfnlint/rules/mappings/KeyName.py +++ b/src/cfnlint/rules/mappings/KeyName.py @@ -17,14 +17,26 @@ source_url = 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html' t...
{"golden_diff": "diff --git a/src/cfnlint/rules/mappings/KeyName.py b/src/cfnlint/rules/mappings/KeyName.py\n--- a/src/cfnlint/rules/mappings/KeyName.py\n+++ b/src/cfnlint/rules/mappings/KeyName.py\n@@ -17,14 +17,26 @@\n source_url = 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-s...
1,082
547
gh_patches_debug_8668
rasdani/github-patches
git_diff
wright-group__WrightTools-1132
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- shift supported Python 3 versions Since users are increasingly relying on 3.10 and 3.11, I propose we move testing from 3.7-9 to 3.8-11. --- END ISSUE --- Below are some code segments, each from a relevan...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -74,9 +74,10 @@ "Framework :: Matplotlib", "Natural Language :: English", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Prog...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -74,9 +74,10 @@\n \"Framework :: Matplotlib\",\n \"Natural Language :: English\",\n \"Programming Language :: Python :: 3\",\n- \"Programming Language :: Python :: 3.7\",\n \"Programming Language...
1,002
133
gh_patches_debug_35416
rasdani/github-patches
git_diff
zigpy__zha-device-handlers-1664
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] New yooksmart D10110 inverted with quirk **Describe the bug** I purchased a new yooksmart D10110 cover and paired with home assistant. The controls seemed inverted and I had to move the bar twice in o...
diff --git a/zhaquirks/yooksmart/D10110blinds.py b/zhaquirks/yooksmart/D10110blinds.py deleted file mode 100644 --- a/zhaquirks/yooksmart/D10110blinds.py +++ /dev/null @@ -1,87 +0,0 @@ -"""Device handler for Yooksmart D10110 roller blinds.""" -from zigpy.profiles import zha -from zigpy.quirks import CustomCluster, Cust...
{"golden_diff": "diff --git a/zhaquirks/yooksmart/D10110blinds.py b/zhaquirks/yooksmart/D10110blinds.py\ndeleted file mode 100644\n--- a/zhaquirks/yooksmart/D10110blinds.py\n+++ /dev/null\n@@ -1,87 +0,0 @@\n-\"\"\"Device handler for Yooksmart D10110 roller blinds.\"\"\"\n-from zigpy.profiles import zha\n-from zigpy.qui...
1,387
825
gh_patches_debug_3138
rasdani/github-patches
git_diff
microsoft__botbuilder-python-1231
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [PORT] [Authentication] updates to support Arlington > Port this change from botbuilder-dotnet/master branch: https://github.com/microsoft/botbuilder-dotnet/pull/3734 # Changed projects * Microsoft.Bot....
diff --git a/libraries/botframework-connector/botframework/connector/auth/government_constants.py b/libraries/botframework-connector/botframework/connector/auth/government_constants.py --- a/libraries/botframework-connector/botframework/connector/auth/government_constants.py +++ b/libraries/botframework-connector/botfr...
{"golden_diff": "diff --git a/libraries/botframework-connector/botframework/connector/auth/government_constants.py b/libraries/botframework-connector/botframework/connector/auth/government_constants.py\n--- a/libraries/botframework-connector/botframework/connector/auth/government_constants.py\n+++ b/libraries/botframew...
779
192
gh_patches_debug_272
rasdani/github-patches
git_diff
cupy__cupy-1028
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cupy.copyto behaves differently from numpy.copyto when src is a python scalar Code: ```python import numpy import cupy def copyto_check(xp): x = xp.zeros(3, dtype=numpy.float32) # replace firs...
diff --git a/cupy/manipulation/basic.py b/cupy/manipulation/basic.py --- a/cupy/manipulation/basic.py +++ b/cupy/manipulation/basic.py @@ -39,7 +39,7 @@ if dst.size == 0: return - if src_is_python_scalar: + if src_is_python_scalar and where is None: dst.fill(src) return
{"golden_diff": "diff --git a/cupy/manipulation/basic.py b/cupy/manipulation/basic.py\n--- a/cupy/manipulation/basic.py\n+++ b/cupy/manipulation/basic.py\n@@ -39,7 +39,7 @@\n if dst.size == 0:\n return\n \n- if src_is_python_scalar:\n+ if src_is_python_scalar and where is None:\n dst.fill(src)...
1,028
91
gh_patches_debug_28700
rasdani/github-patches
git_diff
meltano__meltano-6552
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Feature]: Collect telemetry data about how `send_anonymous_usage_stats` was configured The project context (and its schema) should be updated to include the key `send_anonymous_usage_stats_source` with the v...
diff --git a/src/meltano/core/tracking/contexts/project.py b/src/meltano/core/tracking/contexts/project.py --- a/src/meltano/core/tracking/contexts/project.py +++ b/src/meltano/core/tracking/contexts/project.py @@ -42,9 +42,10 @@ """ self.project = project self.settings_service = ProjectSetti...
{"golden_diff": "diff --git a/src/meltano/core/tracking/contexts/project.py b/src/meltano/core/tracking/contexts/project.py\n--- a/src/meltano/core/tracking/contexts/project.py\n+++ b/src/meltano/core/tracking/contexts/project.py\n@@ -42,9 +42,10 @@\n \"\"\"\n self.project = project\n self.setti...
1,733
422
gh_patches_debug_26978
rasdani/github-patches
git_diff
PrefectHQ__prefect-2727
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Write More Idioms We should write some more idioms: - [x] how to define conditional logic using the [new conditional api](https://github.com/PrefectHQ/prefect/pull/2443) and the "old" way - [x] how to use...
diff --git a/src/prefect/tasks/control_flow/conditional.py b/src/prefect/tasks/control_flow/conditional.py --- a/src/prefect/tasks/control_flow/conditional.py +++ b/src/prefect/tasks/control_flow/conditional.py @@ -4,7 +4,7 @@ from prefect import Task from prefect.engine import signals -__all__ = ["switch", "ifelse...
{"golden_diff": "diff --git a/src/prefect/tasks/control_flow/conditional.py b/src/prefect/tasks/control_flow/conditional.py\n--- a/src/prefect/tasks/control_flow/conditional.py\n+++ b/src/prefect/tasks/control_flow/conditional.py\n@@ -4,7 +4,7 @@\n from prefect import Task\n from prefect.engine import signals\n \n-__al...
1,981
347
gh_patches_debug_12227
rasdani/github-patches
git_diff
mitmproxy__mitmproxy-2041
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add PyInstaller indicator to `mitmproxy --version` We currently cannot distinguish if users use our precompiled binaries or if they installed mitmproxy using pip/brew/$packagemanager. It would be very useful ...
diff --git a/mitmproxy/utils/debug.py b/mitmproxy/utils/debug.py --- a/mitmproxy/utils/debug.py +++ b/mitmproxy/utils/debug.py @@ -37,8 +37,12 @@ except: pass + bin_indicator = "" # PyInstaller builds indicator, if using precompiled binary + if getattr(sys, 'frozen', False): + bin_...
{"golden_diff": "diff --git a/mitmproxy/utils/debug.py b/mitmproxy/utils/debug.py\n--- a/mitmproxy/utils/debug.py\n+++ b/mitmproxy/utils/debug.py\n@@ -37,8 +37,12 @@\n except:\n pass\n \n+ bin_indicator = \"\" # PyInstaller builds indicator, if using precompiled binary\n+ if getattr(sys, 'fro...
1,788
188
gh_patches_debug_28571
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-5219
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Poundland spider address parsing issue The addr:street_address field returned by the poundland.py spider is sometimes broken, giving results such as: `"addr:street_address": "5, 6, -, 5, 8, , T, a, f, f, ,...
diff --git a/locations/spiders/poundland.py b/locations/spiders/poundland.py --- a/locations/spiders/poundland.py +++ b/locations/spiders/poundland.py @@ -1,7 +1,9 @@ import scrapy +from locations.categories import Extras, apply_yes_no from locations.dict_parser import DictParser from locations.hours import Openin...
{"golden_diff": "diff --git a/locations/spiders/poundland.py b/locations/spiders/poundland.py\n--- a/locations/spiders/poundland.py\n+++ b/locations/spiders/poundland.py\n@@ -1,7 +1,9 @@\n import scrapy\n \n+from locations.categories import Extras, apply_yes_no\n from locations.dict_parser import DictParser\n from loca...
1,164
378
gh_patches_debug_5530
rasdani/github-patches
git_diff
urllib3__urllib3-2204
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- is_connection_dropped checks against None but uses False as default value for getattr I happened to read this line and the code looks fishy. I did not otherwise verify the potential bug. See implementation...
diff --git a/src/urllib3/util/connection.py b/src/urllib3/util/connection.py --- a/src/urllib3/util/connection.py +++ b/src/urllib3/util/connection.py @@ -16,7 +16,7 @@ :param conn: :class:`http.client.HTTPConnection` object. """ - sock = getattr(conn, "sock", False) + sock = getattr(conn, "soc...
{"golden_diff": "diff --git a/src/urllib3/util/connection.py b/src/urllib3/util/connection.py\n--- a/src/urllib3/util/connection.py\n+++ b/src/urllib3/util/connection.py\n@@ -16,7 +16,7 @@\n :param conn:\n :class:`http.client.HTTPConnection` object.\n \"\"\"\n- sock = getattr(conn, \"sock\", False)\n...
1,866
135
gh_patches_debug_30382
rasdani/github-patches
git_diff
pytorch__audio-3
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Need API for saving to file. Currently we only have a load function. But after training the network it would be great if we can save the generated tensor to a file. @soumith I think we can reuse a lot of c...
diff --git a/torchaudio/__init__.py b/torchaudio/__init__.py --- a/torchaudio/__init__.py +++ b/torchaudio/__init__.py @@ -1,32 +1,40 @@ +import os + import torch from cffi import FFI + ffi = FFI() from ._ext import th_sox + +def check_input(src): + if not torch.is_tensor(src): + raise TypeError('Expe...
{"golden_diff": "diff --git a/torchaudio/__init__.py b/torchaudio/__init__.py\n--- a/torchaudio/__init__.py\n+++ b/torchaudio/__init__.py\n@@ -1,32 +1,40 @@\n+import os\n+\n import torch\n \n from cffi import FFI\n+\n ffi = FFI()\n from ._ext import th_sox\n \n+\n+def check_input(src):\n+ if not torch.is_tensor(src)...
654
579
gh_patches_debug_24978
rasdani/github-patches
git_diff
chainer__chainer-310
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- split_axis.backward fails on incomplete gradients When there is a None in the grad_outputs, split_axis fails to backprop the incomplete gradients. --- END ISSUE --- Below are some code segments, each from ...
diff --git a/chainer/functions/split_axis.py b/chainer/functions/split_axis.py --- a/chainer/functions/split_axis.py +++ b/chainer/functions/split_axis.py @@ -1,6 +1,7 @@ import collections import numpy +import six from chainer import cuda from chainer import function @@ -85,14 +86,25 @@ return tuple(y...
{"golden_diff": "diff --git a/chainer/functions/split_axis.py b/chainer/functions/split_axis.py\n--- a/chainer/functions/split_axis.py\n+++ b/chainer/functions/split_axis.py\n@@ -1,6 +1,7 @@\n import collections\n \n import numpy\n+import six\n \n from chainer import cuda\n from chainer import function\n@@ -85,14 +86,2...
1,698
348
gh_patches_debug_61068
rasdani/github-patches
git_diff
Mailu__Mailu-719
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Alternatives useless after podop After updating to master to get all the up-to-date fixes it also moves postfix to use podop and it seems to no longer support receiving external mail from alternative domains ...
diff --git a/core/admin/mailu/internal/views/postfix.py b/core/admin/mailu/internal/views/postfix.py --- a/core/admin/mailu/internal/views/postfix.py +++ b/core/admin/mailu/internal/views/postfix.py @@ -6,7 +6,9 @@ @internal.route("/postfix/domain/<domain_name>") def postfix_mailbox_domain(domain_name): - domain...
{"golden_diff": "diff --git a/core/admin/mailu/internal/views/postfix.py b/core/admin/mailu/internal/views/postfix.py\n--- a/core/admin/mailu/internal/views/postfix.py\n+++ b/core/admin/mailu/internal/views/postfix.py\n@@ -6,7 +6,9 @@\n \n @internal.route(\"/postfix/domain/<domain_name>\")\n def postfix_mailbox_domain(...
898
140
gh_patches_debug_34169
rasdani/github-patches
git_diff
conan-io__conan-center-index-253
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [package] catch2/2.9.2: Expected CMake scripts to be included in the package ### Package and Environment Details (include every applicable attribute) * Package Name/Version: **catch2/2.9.2** I expected...
diff --git a/recipes/catch2/2.x.x/conanfile.py b/recipes/catch2/2.x.x/conanfile.py --- a/recipes/catch2/2.x.x/conanfile.py +++ b/recipes/catch2/2.x.x/conanfile.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import os from conans import ConanFile, CMake, tools @@ -12,20 +10,16 @@ homepage = "https://github.com/cat...
{"golden_diff": "diff --git a/recipes/catch2/2.x.x/conanfile.py b/recipes/catch2/2.x.x/conanfile.py\n--- a/recipes/catch2/2.x.x/conanfile.py\n+++ b/recipes/catch2/2.x.x/conanfile.py\n@@ -1,5 +1,3 @@\n-#!/usr/bin/env python\n-\n import os\n \n from conans import ConanFile, CMake, tools\n@@ -12,20 +10,16 @@\n homepag...
1,065
508
gh_patches_debug_5
rasdani/github-patches
git_diff
freedomofpress__securedrop-1117
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update kernel module blacklist During an installation last week, we encountered an issue with the kernel module blacklist. The install was using the new generation of Intel NUCs ([NUC5i5RYK](http://www.amazon...
diff --git a/securedrop/version.py b/securedrop/version.py --- a/securedrop/version.py +++ b/securedrop/version.py @@ -1 +1 @@ -__version__ = '0.3.4' +__version__ = '0.3.5'
{"golden_diff": "diff --git a/securedrop/version.py b/securedrop/version.py\n--- a/securedrop/version.py\n+++ b/securedrop/version.py\n@@ -1 +1 @@\n-__version__ = '0.3.4'\n+__version__ = '0.3.5'\n", "issue": "Update kernel module blacklist\nDuring an installation last week, we encountered an issue with the kernel modul...
688
62
gh_patches_debug_6718
rasdani/github-patches
git_diff
getmoto__moto-556
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fix S3 issues with botocore 1.3.29 botocore 1.3.29 breaks s3 in tests --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES...
diff --git a/moto/__init__.py b/moto/__init__.py --- a/moto/__init__.py +++ b/moto/__init__.py @@ -31,3 +31,13 @@ from .sts import mock_sts # flake8: noqa from .route53 import mock_route53 # flake8: noqa from .swf import mock_swf # flake8: noqa + + +try: + # Need to monkey-patch botocore requests back to under...
{"golden_diff": "diff --git a/moto/__init__.py b/moto/__init__.py\n--- a/moto/__init__.py\n+++ b/moto/__init__.py\n@@ -31,3 +31,13 @@\n from .sts import mock_sts # flake8: noqa\n from .route53 import mock_route53 # flake8: noqa\n from .swf import mock_swf # flake8: noqa\n+\n+\n+try:\n+ # Need to monkey-patch boto...
819
180
gh_patches_debug_4681
rasdani/github-patches
git_diff
awslabs__gluonts-1159
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Multiprocessing hangs when num_workers > len(dataset) ## Description I'm trying to serialize a predictor trained on multiple cores. When calling the `serialize` method nothing happens. Running the same code...
diff --git a/src/gluonts/itertools.py b/src/gluonts/itertools.py --- a/src/gluonts/itertools.py +++ b/src/gluonts/itertools.py @@ -21,8 +21,13 @@ def cyclic(it): """Like `itertools.cycle`, but does not store the data.""" + at_least_one = False while True: - yield from it + for el in it: + ...
{"golden_diff": "diff --git a/src/gluonts/itertools.py b/src/gluonts/itertools.py\n--- a/src/gluonts/itertools.py\n+++ b/src/gluonts/itertools.py\n@@ -21,8 +21,13 @@\n def cyclic(it):\n \"\"\"Like `itertools.cycle`, but does not store the data.\"\"\"\n \n+ at_least_one = False\n while True:\n- yield f...
1,467
151
gh_patches_debug_10230
rasdani/github-patches
git_diff
streamlink__streamlink-925
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BBC iPlayer plugin cannot find VPID ### Checklist - [x] This is a bug report. - [ ] This is a feature request. - [ ] This is a plugin (improvement) request. - [ ] I have read the contribution guidelines...
diff --git a/src/streamlink/plugins/bbciplayer.py b/src/streamlink/plugins/bbciplayer.py --- a/src/streamlink/plugins/bbciplayer.py +++ b/src/streamlink/plugins/bbciplayer.py @@ -20,7 +20,7 @@ live/(?P<channel_name>\w+) ) """, re.VERBOSE) - vpid_re = re.compile(r'"vpid"\s*:\s*"(\w+)"') + ...
{"golden_diff": "diff --git a/src/streamlink/plugins/bbciplayer.py b/src/streamlink/plugins/bbciplayer.py\n--- a/src/streamlink/plugins/bbciplayer.py\n+++ b/src/streamlink/plugins/bbciplayer.py\n@@ -20,7 +20,7 @@\n live/(?P<channel_name>\\w+)\n )\n \"\"\", re.VERBOSE)\n- vpid_re = re.compile(...
1,814
233
gh_patches_debug_149
rasdani/github-patches
git_diff
apache__tvm-6399
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `import tvm` now requires pytest With the merge of #6331, `import tvm` now requires pytest. I created this issue just to check whether this is something intentional or something that we want to fix. The ch...
diff --git a/python/tvm/__init__.py b/python/tvm/__init__.py --- a/python/tvm/__init__.py +++ b/python/tvm/__init__.py @@ -51,9 +51,6 @@ # tvm.te from . import te -# tvm.testing -from . import testing - # tvm.driver from .driver import build, lower
{"golden_diff": "diff --git a/python/tvm/__init__.py b/python/tvm/__init__.py\n--- a/python/tvm/__init__.py\n+++ b/python/tvm/__init__.py\n@@ -51,9 +51,6 @@\n # tvm.te\n from . import te\n \n-# tvm.testing\n-from . import testing\n-\n # tvm.driver\n from .driver import build, lower\n", "issue": "`import tvm` now requir...
1,283
87
gh_patches_debug_1023
rasdani/github-patches
git_diff
pyca__cryptography-4037
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug in HKDF? I think the computation of [`max_length`](https://github.com/pyca/cryptography/blob/66460d8f62b3f27a009bb61be6ce7675c8451b6e/src/cryptography/hazmat/primitives/kdf/hkdf.py#L70) in `src/cryptograp...
diff --git a/src/cryptography/hazmat/primitives/kdf/hkdf.py b/src/cryptography/hazmat/primitives/kdf/hkdf.py --- a/src/cryptography/hazmat/primitives/kdf/hkdf.py +++ b/src/cryptography/hazmat/primitives/kdf/hkdf.py @@ -67,7 +67,7 @@ self._backend = backend - max_length = 255 * (algorithm.digest_size...
{"golden_diff": "diff --git a/src/cryptography/hazmat/primitives/kdf/hkdf.py b/src/cryptography/hazmat/primitives/kdf/hkdf.py\n--- a/src/cryptography/hazmat/primitives/kdf/hkdf.py\n+++ b/src/cryptography/hazmat/primitives/kdf/hkdf.py\n@@ -67,7 +67,7 @@\n \n self._backend = backend\n \n- max_length = 255 ...
1,658
131
gh_patches_debug_17802
rasdani/github-patches
git_diff
python-discord__bot-919
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use appropriate log level for exceptions from event listeners From @SebastiaanZ: > Finally, `discord.py` currently "hides" errors/tracebacks that happen in event listeners as we only have a custom error ha...
diff --git a/bot/bot.py b/bot/bot.py --- a/bot/bot.py +++ b/bot/bot.py @@ -7,6 +7,7 @@ import aiohttp import discord from discord.ext import commands +from sentry_sdk import push_scope from bot import DEBUG_MODE, api, constants from bot.async_stats import AsyncStatsClient @@ -155,3 +156,14 @@ gateway ev...
{"golden_diff": "diff --git a/bot/bot.py b/bot/bot.py\n--- a/bot/bot.py\n+++ b/bot/bot.py\n@@ -7,6 +7,7 @@\n import aiohttp\n import discord\n from discord.ext import commands\n+from sentry_sdk import push_scope\n \n from bot import DEBUG_MODE, api, constants\n from bot.async_stats import AsyncStatsClient\n@@ -155,3 +1...
1,974
230
gh_patches_debug_18475
rasdani/github-patches
git_diff
getnikola__nikola-1957
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- handle include tag in mako templates Currently templates used via include tags are not considered dependencies. It's not hard. handle include tag in mako templates Currently templates used via include tags a...
diff --git a/nikola/plugins/template/mako.py b/nikola/plugins/template/mako.py --- a/nikola/plugins/template/mako.py +++ b/nikola/plugins/template/mako.py @@ -32,7 +32,7 @@ import sys import tempfile -from mako import util, lexer +from mako import util, lexer, parsetree from mako.lookup import TemplateLookup from...
{"golden_diff": "diff --git a/nikola/plugins/template/mako.py b/nikola/plugins/template/mako.py\n--- a/nikola/plugins/template/mako.py\n+++ b/nikola/plugins/template/mako.py\n@@ -32,7 +32,7 @@\n import sys\n import tempfile\n \n-from mako import util, lexer\n+from mako import util, lexer, parsetree\n from mako.lookup i...
1,684
217
gh_patches_debug_339
rasdani/github-patches
git_diff
pyro-ppl__pyro-3164
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- PyTorch 2.0 compatibility: Explicit PyTorch 1.x check causing issues with packages that depend on PyTorch / pyro (e.g. BoTorch) ### Issue Description The explicit check for PyTorch 1.x here (https://github.c...
diff --git a/pyro/distributions/torch_patch.py b/pyro/distributions/torch_patch.py --- a/pyro/distributions/torch_patch.py +++ b/pyro/distributions/torch_patch.py @@ -7,8 +7,6 @@ import torch -assert torch.__version__.startswith("1.") - def patch_dependency(target, root_module=torch): parts = target.split(...
{"golden_diff": "diff --git a/pyro/distributions/torch_patch.py b/pyro/distributions/torch_patch.py\n--- a/pyro/distributions/torch_patch.py\n+++ b/pyro/distributions/torch_patch.py\n@@ -7,8 +7,6 @@\n \n import torch\n \n-assert torch.__version__.startswith(\"1.\")\n-\n \n def patch_dependency(target, root_module=torch...
1,484
86
gh_patches_debug_30012
rasdani/github-patches
git_diff
TheAlgorithms__Python-2443
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dev sprint ideas: More tests, type hints and less complexity currently, some of the programs use static type checking like this [program](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programmin...
diff --git a/graphs/minimum_spanning_tree_kruskal.py b/graphs/minimum_spanning_tree_kruskal.py --- a/graphs/minimum_spanning_tree_kruskal.py +++ b/graphs/minimum_spanning_tree_kruskal.py @@ -1,13 +1,5 @@ -if __name__ == "__main__": - num_nodes, num_edges = list(map(int, input().strip().split())) - - edges = [] - ...
{"golden_diff": "diff --git a/graphs/minimum_spanning_tree_kruskal.py b/graphs/minimum_spanning_tree_kruskal.py\n--- a/graphs/minimum_spanning_tree_kruskal.py\n+++ b/graphs/minimum_spanning_tree_kruskal.py\n@@ -1,13 +1,5 @@\n-if __name__ == \"__main__\":\n- num_nodes, num_edges = list(map(int, input().strip().split(...
1,893
565
gh_patches_debug_20698
rasdani/github-patches
git_diff
freqtrade__freqtrade-5530
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- API Server under 2021.8 <!-- Have you searched for similar issues before posting it? Did you have a VERY good look at the [documentation](https://www.freqtrade.io/en/latest/) and are sure that the question...
diff --git a/freqtrade/rpc/api_server/uvicorn_threaded.py b/freqtrade/rpc/api_server/uvicorn_threaded.py --- a/freqtrade/rpc/api_server/uvicorn_threaded.py +++ b/freqtrade/rpc/api_server/uvicorn_threaded.py @@ -5,6 +5,20 @@ import uvicorn +def asyncio_setup() -> None: # pragma: no cover + # Set eventloop for w...
{"golden_diff": "diff --git a/freqtrade/rpc/api_server/uvicorn_threaded.py b/freqtrade/rpc/api_server/uvicorn_threaded.py\n--- a/freqtrade/rpc/api_server/uvicorn_threaded.py\n+++ b/freqtrade/rpc/api_server/uvicorn_threaded.py\n@@ -5,6 +5,20 @@\n import uvicorn\n \n \n+def asyncio_setup() -> None: # pragma: no cover\n+...
1,106
310
gh_patches_debug_25617
rasdani/github-patches
git_diff
saleor__saleor-3169
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- User type should be able to return `created` and `lastLogin` fields There is no way to obtain information when a user was registered and when she/he logged last time. --- END ISSUE --- Below are some code s...
diff --git a/saleor/graphql/account/resolvers.py b/saleor/graphql/account/resolvers.py --- a/saleor/graphql/account/resolvers.py +++ b/saleor/graphql/account/resolvers.py @@ -16,14 +16,16 @@ qs = models.User.objects.filter( Q(is_staff=False) | (Q(is_staff=True) & Q(orders__isnull=False)) ).prefetch_r...
{"golden_diff": "diff --git a/saleor/graphql/account/resolvers.py b/saleor/graphql/account/resolvers.py\n--- a/saleor/graphql/account/resolvers.py\n+++ b/saleor/graphql/account/resolvers.py\n@@ -16,14 +16,16 @@\n qs = models.User.objects.filter(\n Q(is_staff=False) | (Q(is_staff=True) & Q(orders__isnull=Fal...
1,739
340
gh_patches_debug_25
rasdani/github-patches
git_diff
Zeroto521__my-data-toolkit-543
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- PERF: `to_set` speeds up especial for large data <!-- Thanks for contributing a pull request! Please follow these standard acronyms to start the commit message: - ENH: enhancement - BUG: bug fix - DO...
diff --git a/dtoolkit/accessor/index/to_set.py b/dtoolkit/accessor/index/to_set.py --- a/dtoolkit/accessor/index/to_set.py +++ b/dtoolkit/accessor/index/to_set.py @@ -33,4 +33,4 @@ {1, 2} """ - return set(index) + return set(index.unique())
{"golden_diff": "diff --git a/dtoolkit/accessor/index/to_set.py b/dtoolkit/accessor/index/to_set.py\n--- a/dtoolkit/accessor/index/to_set.py\n+++ b/dtoolkit/accessor/index/to_set.py\n@@ -33,4 +33,4 @@\n {1, 2}\n \"\"\"\n \n- return set(index)\n+ return set(index.unique())\n", "issue": "PERF: `to_set` spee...
826
83
gh_patches_debug_13395
rasdani/github-patches
git_diff
facebookresearch__xformers-57
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [bug] Failing triton dropout test # 🐛 Bug See https://app.circleci.com/pipelines/github/facebookresearch/xformers/212/workflows/8988c71c-84f5-4bd0-bd59-ac7d293c2370/jobs/398 Not sure why this happens ...
diff --git a/xformers/triton/dropout.py b/xformers/triton/dropout.py --- a/xformers/triton/dropout.py +++ b/xformers/triton/dropout.py @@ -69,4 +69,7 @@ def dropout(x: torch.Tensor, p: float): - return _dropout.apply(x, p) + if p > 0.0: + return _dropout.apply(x, p) + + return x diff --git a/xforme...
{"golden_diff": "diff --git a/xformers/triton/dropout.py b/xformers/triton/dropout.py\n--- a/xformers/triton/dropout.py\n+++ b/xformers/triton/dropout.py\n@@ -69,4 +69,7 @@\n \n \n def dropout(x: torch.Tensor, p: float):\n- return _dropout.apply(x, p)\n+ if p > 0.0:\n+ return _dropout.apply(x, p)\n+\n+ ...
1,742
274
gh_patches_debug_25915
rasdani/github-patches
git_diff
microsoft__AzureTRE-1653
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Health check endpoint should log all the service status as it queries Currently the `/health` endpoint queries Cosmos / Service Bus / the RP - and returns the statuses. If any are not ok, the response is a 50...
diff --git a/api_app/_version.py b/api_app/_version.py --- a/api_app/_version.py +++ b/api_app/_version.py @@ -1 +1 @@ -__version__ = "0.2.10" +__version__ = "0.2.11" diff --git a/api_app/api/routes/health.py b/api_app/api/routes/health.py --- a/api_app/api/routes/health.py +++ b/api_app/api/routes/health.py @@ -3,6 +3...
{"golden_diff": "diff --git a/api_app/_version.py b/api_app/_version.py\n--- a/api_app/_version.py\n+++ b/api_app/_version.py\n@@ -1 +1 @@\n-__version__ = \"0.2.10\"\n+__version__ = \"0.2.11\"\ndiff --git a/api_app/api/routes/health.py b/api_app/api/routes/health.py\n--- a/api_app/api/routes/health.py\n+++ b/api_app/ap...
673
320
gh_patches_debug_26067
rasdani/github-patches
git_diff
beeware__toga-543
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- A single column table leads to only showing first letter of value ## Expected Behavior Table like this: **Filename** xxx yyy zzz ## Current Behavior **Filename** x y z ## Steps to reproduce ...
diff --git a/src/core/toga/sources/list_source.py b/src/core/toga/sources/list_source.py --- a/src/core/toga/sources/list_source.py +++ b/src/core/toga/sources/list_source.py @@ -24,7 +24,7 @@ Args: data (`list`): The data in the list. Each entry in the list should have the - same number of e...
{"golden_diff": "diff --git a/src/core/toga/sources/list_source.py b/src/core/toga/sources/list_source.py\n--- a/src/core/toga/sources/list_source.py\n+++ b/src/core/toga/sources/list_source.py\n@@ -24,7 +24,7 @@\n \n Args:\n data (`list`): The data in the list. Each entry in the list should have the\n- ...
1,347
327
gh_patches_debug_37784
rasdani/github-patches
git_diff
bokeh__bokeh-8738
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Windows phantomjs not killed on selenium termination I reinstalled a fresh python environment on windows with python 3.7 and pythonenv I use only pip for package dependencies When I tried to run tests some ...
diff --git a/bokeh/io/webdriver.py b/bokeh/io/webdriver.py --- a/bokeh/io/webdriver.py +++ b/bokeh/io/webdriver.py @@ -21,6 +21,7 @@ #----------------------------------------------------------------------------- # Standard library imports +import sys import atexit import signal import warnings @@ -29,7 +30,7 @@ ...
{"golden_diff": "diff --git a/bokeh/io/webdriver.py b/bokeh/io/webdriver.py\n--- a/bokeh/io/webdriver.py\n+++ b/bokeh/io/webdriver.py\n@@ -21,6 +21,7 @@\n #-----------------------------------------------------------------------------\n \n # Standard library imports\n+import sys\n import atexit\n import signal\n import ...
1,529
473
gh_patches_debug_24271
rasdani/github-patches
git_diff
ivy-llc__ivy-15738
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ihfft --- 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 @@ -3,6 +3,23 @@ from ivy.func_w...
{"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@@ -3,6 +3,23...
1,246
450
gh_patches_debug_25212
rasdani/github-patches
git_diff
vyperlang__vyper-3030
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- can't declare variable `public` but can define custom getter ### Version Information * vyper Version: 0.3.4+commit.f31f0ec * OS: osx * Python Version: 3.8.9 ### What's your issue about? This code ...
diff --git a/vyper/ast/expansion.py b/vyper/ast/expansion.py --- a/vyper/ast/expansion.py +++ b/vyper/ast/expansion.py @@ -53,6 +53,9 @@ if annotation.value.get("id") == "HashMap": # type: ignore # for a HashMap, split the key/value types and use the key type as the next arg ...
{"golden_diff": "diff --git a/vyper/ast/expansion.py b/vyper/ast/expansion.py\n--- a/vyper/ast/expansion.py\n+++ b/vyper/ast/expansion.py\n@@ -53,6 +53,9 @@\n if annotation.value.get(\"id\") == \"HashMap\": # type: ignore\n # for a HashMap, split the key/value types and use the key type as ...
1,577
267
gh_patches_debug_28637
rasdani/github-patches
git_diff
comic__grand-challenge.org-1771
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add profile information to the verification admin When manually reviewing verification requests it would be helpful to have more information in the admin such as the users full name, location, department and ...
diff --git a/app/grandchallenge/verifications/admin.py b/app/grandchallenge/verifications/admin.py --- a/app/grandchallenge/verifications/admin.py +++ b/app/grandchallenge/verifications/admin.py @@ -23,14 +23,15 @@ class VerificationAdmin(admin.ModelAdmin): list_display = ( "user", + "user_info", ...
{"golden_diff": "diff --git a/app/grandchallenge/verifications/admin.py b/app/grandchallenge/verifications/admin.py\n--- a/app/grandchallenge/verifications/admin.py\n+++ b/app/grandchallenge/verifications/admin.py\n@@ -23,14 +23,15 @@\n class VerificationAdmin(admin.ModelAdmin):\n list_display = (\n \"user\...
1,446
393
gh_patches_debug_37750
rasdani/github-patches
git_diff
ytdl-org__youtube-dl-2859
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- FunnyOrDie extractor not finding thumbnails python -m youtube_dl -v --skip-download --write-info-json --no-playlist -f mp4 http://www.funnyordie.com/videos/e402820827/please-use-this-song-jon-lajoie extracts ...
diff --git a/youtube_dl/extractor/funnyordie.py b/youtube_dl/extractor/funnyordie.py --- a/youtube_dl/extractor/funnyordie.py +++ b/youtube_dl/extractor/funnyordie.py @@ -8,18 +8,27 @@ class FunnyOrDieIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?funnyordie\.com/(?P<type>embed|videos)/(?P<id>[0-9a-f]+)(?...
{"golden_diff": "diff --git a/youtube_dl/extractor/funnyordie.py b/youtube_dl/extractor/funnyordie.py\n--- a/youtube_dl/extractor/funnyordie.py\n+++ b/youtube_dl/extractor/funnyordie.py\n@@ -8,18 +8,27 @@\n \n class FunnyOrDieIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?funnyordie\\.com/(?P<type>embed|vi...
1,248
899
gh_patches_debug_37748
rasdani/github-patches
git_diff
open-telemetry__opentelemetry-python-1123
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add support for OTEL_PROPAGATORS The spec describes environment variables that should be supported to configure propagators, this feature request is to add support in the current implementation. https://gi...
diff --git a/opentelemetry-api/src/opentelemetry/propagators/__init__.py b/opentelemetry-api/src/opentelemetry/propagators/__init__.py --- a/opentelemetry-api/src/opentelemetry/propagators/__init__.py +++ b/opentelemetry-api/src/opentelemetry/propagators/__init__.py @@ -15,6 +15,21 @@ """ API for propagation of conte...
{"golden_diff": "diff --git a/opentelemetry-api/src/opentelemetry/propagators/__init__.py b/opentelemetry-api/src/opentelemetry/propagators/__init__.py\n--- a/opentelemetry-api/src/opentelemetry/propagators/__init__.py\n+++ b/opentelemetry-api/src/opentelemetry/propagators/__init__.py\n@@ -15,6 +15,21 @@\n \"\"\"\n API...
1,462
773
gh_patches_debug_28935
rasdani/github-patches
git_diff
pyload__pyload-1659
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- premiumize.me hook is broken account says username and password is ok but the log always shows: 4 01.08.2015 19:50:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry 5 01.08.2015 19:5...
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py --- a/module/plugins/hoster/PremiumizeMe.py +++ b/module/plugins/hoster/PremiumizeMe.py @@ -7,7 +7,7 @@ class PremiumizeMe(MultiHoster): __name__ = "PremiumizeMe" __type__ = "hoster" - __version__ = "0.19" + ...
{"golden_diff": "diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py\n--- a/module/plugins/hoster/PremiumizeMe.py\n+++ b/module/plugins/hoster/PremiumizeMe.py\n@@ -7,7 +7,7 @@\n class PremiumizeMe(MultiHoster):\n __name__ = \"PremiumizeMe\"\n __type__ = \"hoster\"\n-...
1,617
348
gh_patches_debug_22076
rasdani/github-patches
git_diff
netbox-community__netbox-16229
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- User and group queries are not properly restricted via GraphQL API in v4.0.2 Re-Open ### Deployment Type Self-hosted ### NetBox Version v4.0.2 ### Python Version 3.10 ### Steps to Reproduce This is is ...
diff --git a/netbox/users/graphql/types.py b/netbox/users/graphql/types.py --- a/netbox/users/graphql/types.py +++ b/netbox/users/graphql/types.py @@ -1,13 +1,10 @@ from typing import List -import strawberry import strawberry_django from django.contrib.auth import get_user_model -from django.contrib.auth.models im...
{"golden_diff": "diff --git a/netbox/users/graphql/types.py b/netbox/users/graphql/types.py\n--- a/netbox/users/graphql/types.py\n+++ b/netbox/users/graphql/types.py\n@@ -1,13 +1,10 @@\n from typing import List\n \n-import strawberry\n import strawberry_django\n from django.contrib.auth import get_user_model\n-from dja...
681
287
gh_patches_debug_7311
rasdani/github-patches
git_diff
freedomofpress__securedrop-4644
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- replace "hidden service" occurrences ## Status ready for review ## Description of Changes Changes Proposed: - no longer refer to [Onion Services](https://2019.www.torproject.org/docs/onion-servi...
diff --git a/install_files/ansible-base/roles/backup/files/0.3_collect.py b/install_files/ansible-base/roles/backup/files/0.3_collect.py --- a/install_files/ansible-base/roles/backup/files/0.3_collect.py +++ b/install_files/ansible-base/roles/backup/files/0.3_collect.py @@ -39,7 +39,7 @@ def collect_tor_files(zf):...
{"golden_diff": "diff --git a/install_files/ansible-base/roles/backup/files/0.3_collect.py b/install_files/ansible-base/roles/backup/files/0.3_collect.py\n--- a/install_files/ansible-base/roles/backup/files/0.3_collect.py\n+++ b/install_files/ansible-base/roles/backup/files/0.3_collect.py\n@@ -39,7 +39,7 @@\n \n \n def...
1,626
180
gh_patches_debug_7166
rasdani/github-patches
git_diff
pytorch__vision-7665
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- bug when using PIL backend in classification references ### 🐛 Describe the bug When I try to train a model using the train.py script under references/classification with the PIL backend, I encounter an erro...
diff --git a/references/classification/presets.py b/references/classification/presets.py --- a/references/classification/presets.py +++ b/references/classification/presets.py @@ -69,11 +69,10 @@ backend="pil", ): trans = [] - backend = backend.lower() if backend == "tensor": ...
{"golden_diff": "diff --git a/references/classification/presets.py b/references/classification/presets.py\n--- a/references/classification/presets.py\n+++ b/references/classification/presets.py\n@@ -69,11 +69,10 @@\n backend=\"pil\",\n ):\n trans = []\n-\n backend = backend.lower()\n ...
1,446
133
gh_patches_debug_6577
rasdani/github-patches
git_diff
rlworkgroup__garage-1927
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- On policy algos stop learning midway Avg return either drops dramatically or the run stops completely due to NaN errors. Could affect off policy as well. --- END ISSUE --- Below are some code segments, each...
diff --git a/src/garage/envs/normalized_env.py b/src/garage/envs/normalized_env.py --- a/src/garage/envs/normalized_env.py +++ b/src/garage/envs/normalized_env.py @@ -109,7 +109,7 @@ reward = self._apply_normalize_reward(reward) return EnvStep(env_spec=es.env_spec, - action...
{"golden_diff": "diff --git a/src/garage/envs/normalized_env.py b/src/garage/envs/normalized_env.py\n--- a/src/garage/envs/normalized_env.py\n+++ b/src/garage/envs/normalized_env.py\n@@ -109,7 +109,7 @@\n reward = self._apply_normalize_reward(reward)\n \n return EnvStep(env_spec=es.env_spec,\n- ...
1,940
126
gh_patches_debug_20997
rasdani/github-patches
git_diff
microsoft__presidio-259
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- crypto_recognizer throws an exception When calling the engine analyze API like ``` response = engine.analyze(correlation_id=0, text=text_to_analyze, ...
diff --git a/presidio-analyzer/analyzer/predefined_recognizers/crypto_recognizer.py b/presidio-analyzer/analyzer/predefined_recognizers/crypto_recognizer.py --- a/presidio-analyzer/analyzer/predefined_recognizers/crypto_recognizer.py +++ b/presidio-analyzer/analyzer/predefined_recognizers/crypto_recognizer.py @@ -4,7 +...
{"golden_diff": "diff --git a/presidio-analyzer/analyzer/predefined_recognizers/crypto_recognizer.py b/presidio-analyzer/analyzer/predefined_recognizers/crypto_recognizer.py\n--- a/presidio-analyzer/analyzer/predefined_recognizers/crypto_recognizer.py\n+++ b/presidio-analyzer/analyzer/predefined_recognizers/crypto_reco...
1,054
368
gh_patches_debug_10157
rasdani/github-patches
git_diff
huggingface__transformers-193
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py error attributeError: 'BertForPreTraining' object has no attribute 'global_step' --- END ISSUE --- Below are some code segments, each from a rele...
diff --git a/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py b/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py --- a/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py +++ b/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py @@ -50,7 +50,7 @@ name = name.split('/') ...
{"golden_diff": "diff --git a/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py b/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py\n--- a/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py\n+++ b/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py\n@@ -50,7 +50,7 @@\n name ...
1,480
180
gh_patches_debug_8109
rasdani/github-patches
git_diff
pre-commit__pre-commit-204
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Crash when /tmp is on a different device ``` Traceback (most recent call last): File "/home/cameron/Workspace/hack16-llvm-lang/venv/bin/pre-commit", line 9, in <module> load_entry_point('pre-commit==0.4...
diff --git a/pre_commit/store.py b/pre_commit/store.py --- a/pre_commit/store.py +++ b/pre_commit/store.py @@ -62,7 +62,7 @@ def _write_sqlite_db(self): # To avoid a race where someone ^Cs between db creation and execution # of the CREATE TABLE statement - fd, tmpfile = tempfile.mkstemp() ...
{"golden_diff": "diff --git a/pre_commit/store.py b/pre_commit/store.py\n--- a/pre_commit/store.py\n+++ b/pre_commit/store.py\n@@ -62,7 +62,7 @@\n def _write_sqlite_db(self):\n # To avoid a race where someone ^Cs between db creation and execution\n # of the CREATE TABLE statement\n- fd, tmpfi...
1,986
130
gh_patches_debug_57079
rasdani/github-patches
git_diff
searx__searx-672
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Infinite scroll: answer are repeated on each page How to reproduce : search for ["user agent"](https://searx.me/?q=user+agent) with Infinite scroll activated. Should the answer be disabled except the first p...
diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py --- a/searx/plugins/self_info.py +++ b/searx/plugins/self_info.py @@ -29,6 +29,8 @@ # request: flask request object # ctx: the whole local context of the pre search hook def post_search(request, ctx): + if ctx['search'].pageno > 1: + re...
{"golden_diff": "diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py\n--- a/searx/plugins/self_info.py\n+++ b/searx/plugins/self_info.py\n@@ -29,6 +29,8 @@\n # request: flask request object\n # ctx: the whole local context of the pre search hook\n def post_search(request, ctx):\n+ if ctx['search']...
813
135
gh_patches_debug_6064
rasdani/github-patches
git_diff
benoitc__gunicorn-1441
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Supporting newest version of python Gunicorn currently doesn't run tests with python3.6. Since 3.6 is release and some of us are preparing to use it in production it would be great if gunicorn had confirme...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -27,6 +27,8 @@ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Top...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -27,6 +27,8 @@\n 'Programming Language :: Python :: 3.2',\n 'Programming Language :: Python :: 3.3',\n 'Programming Language :: Python :: 3.4',\n+ 'Programming Language :: Python :: 3.5',\n+ 'Programming Language :: ...
1,239
118
gh_patches_debug_20410
rasdani/github-patches
git_diff
PlasmaPy__PlasmaPy-1692
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use `importlib.metadata` to get package version instead of `pkg_resources` Now that we're using Python 3.8+, we should switch to using `importlib.metadata` to get our version at runtime in `plasmapy/__init__....
diff --git a/plasmapy/__init__.py b/plasmapy/__init__.py --- a/plasmapy/__init__.py +++ b/plasmapy/__init__.py @@ -28,7 +28,7 @@ # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- -import pkg_re...
{"golden_diff": "diff --git a/plasmapy/__init__.py b/plasmapy/__init__.py\n--- a/plasmapy/__init__.py\n+++ b/plasmapy/__init__.py\n@@ -28,7 +28,7 @@\n # Packages may add whatever they like to this file, but\n # should keep this content at the top.\n # --------------------------------------------------------------------...
1,469
230
gh_patches_debug_41922
rasdani/github-patches
git_diff
spack__spack-851
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- spack can't bootstrap from release tarball Spack release tarballs don't include `.git` in the top directory like a clone of the repo would. The bootstrap relies on this to bootrstrap a copy from github: ``` ...
diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ###################################################################...
{"golden_diff": "diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py\n--- a/lib/spack/spack/cmd/bootstrap.py\n+++ b/lib/spack/spack/cmd/bootstrap.py\n@@ -23,7 +23,6 @@\n # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n #############################################...
1,630
949
gh_patches_debug_15365
rasdani/github-patches
git_diff
uclapi__uclapi-1028
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Medium Articles Bug Bug in getting medium articles on the homepage --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES ---...
diff --git a/backend/uclapi/dashboard/app_helpers.py b/backend/uclapi/dashboard/app_helpers.py --- a/backend/uclapi/dashboard/app_helpers.py +++ b/backend/uclapi/dashboard/app_helpers.py @@ -4,9 +4,10 @@ from common.helpers import generate_api_token from uclapi.settings import ( MEDIUM_ARTICLE_QUANTITY, - RED...
{"golden_diff": "diff --git a/backend/uclapi/dashboard/app_helpers.py b/backend/uclapi/dashboard/app_helpers.py\n--- a/backend/uclapi/dashboard/app_helpers.py\n+++ b/backend/uclapi/dashboard/app_helpers.py\n@@ -4,9 +4,10 @@\n from common.helpers import generate_api_token\n from uclapi.settings import (\n MEDIUM_ART...
1,043
211
gh_patches_debug_1224
rasdani/github-patches
git_diff
projectmesa__mesa-826
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Push new Mesa release Wee are overdue for an official release. Before I push one, does anyone have anything that really want to try to get in or should I just tag and release? Discuss. --- END ISSUE ---...
diff --git a/mesa/__init__.py b/mesa/__init__.py --- a/mesa/__init__.py +++ b/mesa/__init__.py @@ -14,6 +14,6 @@ __all__ = ["Model", "Agent"] __title__ = "mesa" -__version__ = "0.8.6" +__version__ = "0.8.7" __license__ = "Apache 2.0" __copyright__ = "Copyright %s Project Mesa Team" % datetime.date.today().year
{"golden_diff": "diff --git a/mesa/__init__.py b/mesa/__init__.py\n--- a/mesa/__init__.py\n+++ b/mesa/__init__.py\n@@ -14,6 +14,6 @@\n __all__ = [\"Model\", \"Agent\"]\n \n __title__ = \"mesa\"\n-__version__ = \"0.8.6\"\n+__version__ = \"0.8.7\"\n __license__ = \"Apache 2.0\"\n __copyright__ = \"Copyright %s Project Me...
438
121
gh_patches_debug_27345
rasdani/github-patches
git_diff
internetarchive__openlibrary-5001
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Is there a way to limit the page-size of search API requests? ### Question Is there a way to limit the page-size of search API requests? The default Search-API page-size is 100 items: http://openlibrary.o...
diff --git a/openlibrary/plugins/inside/code.py b/openlibrary/plugins/inside/code.py --- a/openlibrary/plugins/inside/code.py +++ b/openlibrary/plugins/inside/code.py @@ -4,7 +4,7 @@ import web from infogami.utils import delegate -from infogami.utils.view import render_template +from infogami.utils.view import rend...
{"golden_diff": "diff --git a/openlibrary/plugins/inside/code.py b/openlibrary/plugins/inside/code.py\n--- a/openlibrary/plugins/inside/code.py\n+++ b/openlibrary/plugins/inside/code.py\n@@ -4,7 +4,7 @@\n import web\n \n from infogami.utils import delegate\n-from infogami.utils.view import render_template\n+from infoga...
852
307
gh_patches_debug_20619
rasdani/github-patches
git_diff
strawberry-graphql__strawberry-1348
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `merge_type` `types` type hint https://github.com/strawberry-graphql/strawberry/blob/main/strawberry/tools/merge_types.py#L9 The current `Tuple[Type]` produces: ``` *.py:15:5: error: Argument 2 to "merge...
diff --git a/strawberry/tools/merge_types.py b/strawberry/tools/merge_types.py --- a/strawberry/tools/merge_types.py +++ b/strawberry/tools/merge_types.py @@ -1,12 +1,12 @@ import warnings from collections import Counter from itertools import chain -from typing import Tuple, Type +from typing import Tuple import ...
{"golden_diff": "diff --git a/strawberry/tools/merge_types.py b/strawberry/tools/merge_types.py\n--- a/strawberry/tools/merge_types.py\n+++ b/strawberry/tools/merge_types.py\n@@ -1,12 +1,12 @@\n import warnings\n from collections import Counter\n from itertools import chain\n-from typing import Tuple, Type\n+from typin...
700
269
gh_patches_debug_18567
rasdani/github-patches
git_diff
Lightning-AI__torchmetrics-945
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update and unify a number of metrics in `torchmetrics` docs ## 📚 Documentation Before the next feature release, it'd be nice to update the number of implemented metrics and unify this number over all occu...
diff --git a/torchmetrics/__about__.py b/torchmetrics/__about__.py --- a/torchmetrics/__about__.py +++ b/torchmetrics/__about__.py @@ -11,7 +11,7 @@ [PyTorch Lightning](https://pytorch-lightning.readthedocs.io/en/stable/). It was originally a part of Pytorch Lightning, but got split off so users could take advantage ...
{"golden_diff": "diff --git a/torchmetrics/__about__.py b/torchmetrics/__about__.py\n--- a/torchmetrics/__about__.py\n+++ b/torchmetrics/__about__.py\n@@ -11,7 +11,7 @@\n [PyTorch Lightning](https://pytorch-lightning.readthedocs.io/en/stable/). It was originally a part of\n Pytorch Lightning, but got split off so users...
742
203
gh_patches_debug_454
rasdani/github-patches
git_diff
Textualize__textual-2755
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- A lone `Static` results in a `TooManyMatches` error when using `query_one` I've not dived into this beyond knocking up this example to isolate what I saw (about to head out of the door but wanted to record th...
diff --git a/src/textual/widgets/_tooltip.py b/src/textual/widgets/_tooltip.py --- a/src/textual/widgets/_tooltip.py +++ b/src/textual/widgets/_tooltip.py @@ -3,7 +3,7 @@ from textual.widgets import Static -class Tooltip(Static): +class Tooltip(Static, inherit_css=False): DEFAULT_CSS = """ Tooltip { ...
{"golden_diff": "diff --git a/src/textual/widgets/_tooltip.py b/src/textual/widgets/_tooltip.py\n--- a/src/textual/widgets/_tooltip.py\n+++ b/src/textual/widgets/_tooltip.py\n@@ -3,7 +3,7 @@\n from textual.widgets import Static\n \n \n-class Tooltip(Static):\n+class Tooltip(Static, inherit_css=False):\n DEFAULT_CSS...
612
88
gh_patches_debug_22794
rasdani/github-patches
git_diff
ultrabug__py3status-2007
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Clock terminated with Exception With the latest Manjaro Testing Update, I received version 3.32 with Python 3.9.1. All modules still work except the clock module which is terminated. The journal simply say...
diff --git a/py3status/storage.py b/py3status/storage.py --- a/py3status/storage.py +++ b/py3status/storage.py @@ -22,18 +22,18 @@ # cutting edge storage cache storage_config = py3_config.get("py3status", {}).get("storage") if storage_config: - storage_file = os.path.expandvars(sto...
{"golden_diff": "diff --git a/py3status/storage.py b/py3status/storage.py\n--- a/py3status/storage.py\n+++ b/py3status/storage.py\n@@ -22,18 +22,18 @@\n # cutting edge storage cache\n storage_config = py3_config.get(\"py3status\", {}).get(\"storage\")\n if storage_config:\n- storage_f...
1,383
240
gh_patches_debug_1684
rasdani/github-patches
git_diff
geopandas__geopandas-2398
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Drop Python 3.7 We should consider dropping support for Python 3.7. We are roughly following numpy model (#1457) and numpy itself is 3.8+ now. Same applies to pyproj, which requires 3.8 (and causes some macOS...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -71,7 +71,7 @@ "geopandas.tools.tests", ], package_data={"geopandas": data_files}, - python_requires=">=3.7", + python_requires=">=3.8", install_requires=INSTALL_REQUIRES, cmdclass=versioneer.get_cmdclass(), )
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -71,7 +71,7 @@\n \"geopandas.tools.tests\",\n ],\n package_data={\"geopandas\": data_files},\n- python_requires=\">=3.7\",\n+ python_requires=\">=3.8\",\n install_requires=INSTALL_REQUIRES,\n cmdclass=ver...
1,056
92
gh_patches_debug_5914
rasdani/github-patches
git_diff
DataDog__dd-trace-py-1585
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- profiling/line2def does not handle empty filenames ### Which version of dd-trace-py are you using? We're not running dd-trace - we're running the profiler by importing `ddtrace.profiling.auto`. ### Which ...
diff --git a/ddtrace/profiling/_line2def.py b/ddtrace/profiling/_line2def.py --- a/ddtrace/profiling/_line2def.py +++ b/ddtrace/profiling/_line2def.py @@ -55,12 +55,12 @@ def default_def(filename, lineno): - return filename + ":" + str(lineno) + return str(filename) + ":" + str(lineno) @lru_cache(maxsiz...
{"golden_diff": "diff --git a/ddtrace/profiling/_line2def.py b/ddtrace/profiling/_line2def.py\n--- a/ddtrace/profiling/_line2def.py\n+++ b/ddtrace/profiling/_line2def.py\n@@ -55,12 +55,12 @@\n \n \n def default_def(filename, lineno):\n- return filename + \":\" + str(lineno)\n+ return str(filename) + \":\" + str(l...
1,159
175
gh_patches_debug_17993
rasdani/github-patches
git_diff
modin-project__modin-1532
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update Ray to 0.8.5 Ray 0.8.5 was released, we should test and update. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES...
diff --git a/modin/__init__.py b/modin/__init__.py --- a/modin/__init__.py +++ b/modin/__init__.py @@ -54,7 +54,7 @@ except ImportError: pass else: - if version.parse(ray.__version__) != version.parse("0.8.4"): + if version.par...
{"golden_diff": "diff --git a/modin/__init__.py b/modin/__init__.py\n--- a/modin/__init__.py\n+++ b/modin/__init__.py\n@@ -54,7 +54,7 @@\n except ImportError:\n pass\n else:\n- if version.parse(ray.__version__) != version.parse(\"0.8.4\"):\n+ ...
1,867
254
gh_patches_debug_40179
rasdani/github-patches
git_diff
Project-MONAI__MONAI-3464
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `reduction` for `ContrastiveLoss` **Describe the bug** the error messages and docstring should be consistent https://github.com/Project-MONAI/MONAI/blob/a7bc4a3cbaeaa3c505a25ca2ddf6922bda8ea7dc/monai/losses...
diff --git a/monai/losses/contrastive.py b/monai/losses/contrastive.py --- a/monai/losses/contrastive.py +++ b/monai/losses/contrastive.py @@ -9,13 +9,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Union - import torch from torch.nn...
{"golden_diff": "diff --git a/monai/losses/contrastive.py b/monai/losses/contrastive.py\n--- a/monai/losses/contrastive.py\n+++ b/monai/losses/contrastive.py\n@@ -9,13 +9,11 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-from typing import Union\n-\n i...
1,507
738
gh_patches_debug_20192
rasdani/github-patches
git_diff
certbot__certbot-7163
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update SSL session cache size to match Mozilla recommendations This is a followup from the research issue at #6903. Ideally, https://github.com/mozilla/server-side-tls/issues/198 is resolved and Mozilla up...
diff --git a/certbot-nginx/certbot_nginx/constants.py b/certbot-nginx/certbot_nginx/constants.py --- a/certbot-nginx/certbot_nginx/constants.py +++ b/certbot-nginx/certbot_nginx/constants.py @@ -24,6 +24,7 @@ SSL_OPTIONS_HASHES_NEW = [ '63e2bddebb174a05c9d8a7cf2adf72f7af04349ba59a1a925fe447f73b2f1abf', + '29...
{"golden_diff": "diff --git a/certbot-nginx/certbot_nginx/constants.py b/certbot-nginx/certbot_nginx/constants.py\n--- a/certbot-nginx/certbot_nginx/constants.py\n+++ b/certbot-nginx/certbot_nginx/constants.py\n@@ -24,6 +24,7 @@\n \n SSL_OPTIONS_HASHES_NEW = [\n '63e2bddebb174a05c9d8a7cf2adf72f7af04349ba59a1a925fe4...
1,331
497
gh_patches_debug_10834
rasdani/github-patches
git_diff
getredash__redash-6561
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- The 'Create your first Dashboard' newbie link will not dispear even I create dashboards ### Issue Summary The 'Create your first Dashboard' newbie link will not dispear even I create dashboards. Other newb...
diff --git a/redash/handlers/organization.py b/redash/handlers/organization.py --- a/redash/handlers/organization.py +++ b/redash/handlers/organization.py @@ -15,7 +15,7 @@ "data_sources": models.DataSource.all(current_org, group_ids=current_user.group_ids).count(), "queries": models.Query.all_queries...
{"golden_diff": "diff --git a/redash/handlers/organization.py b/redash/handlers/organization.py\n--- a/redash/handlers/organization.py\n+++ b/redash/handlers/organization.py\n@@ -15,7 +15,7 @@\n \"data_sources\": models.DataSource.all(current_org, group_ids=current_user.group_ids).count(),\n \"queries\"...
962
156