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_30888 | rasdani/github-patches | git_diff | mozilla__telemetry-analysis-service-551 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
EMR release form shows inactive records
The EMR release model has a column for `is_active`, but it's not being considered when querying the list of EMR releases in the form.
--- END ISSUE ---
Below are som... | diff --git a/atmo/clusters/forms.py b/atmo/clusters/forms.py
--- a/atmo/clusters/forms.py
+++ b/atmo/clusters/forms.py
@@ -4,6 +4,7 @@
from django import forms
from django.conf import settings
from django.core.urlresolvers import reverse
+from django.utils.safestring import mark_safe
from . import models
from ..... | {"golden_diff": "diff --git a/atmo/clusters/forms.py b/atmo/clusters/forms.py\n--- a/atmo/clusters/forms.py\n+++ b/atmo/clusters/forms.py\n@@ -4,6 +4,7 @@\n from django import forms\n from django.conf import settings\n from django.core.urlresolvers import reverse\n+from django.utils.safestring import mark_safe\n \n fro... | 1,930 | 406 |
gh_patches_debug_22288 | rasdani/github-patches | git_diff | dask__distributed-8381 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dashboards fail with 500 status code when using `bokeh<3.3.0`
When using the latest `main` with `bokeh<3.3.0`, the dashboards fail with a 500 status code.
Scheduler traceback:
```
2023-11-30 18:00:07,300... | diff --git a/distributed/dashboard/core.py b/distributed/dashboard/core.py
--- a/distributed/dashboard/core.py
+++ b/distributed/dashboard/core.py
@@ -6,8 +6,8 @@
from bokeh.application import Application
from bokeh.application.handlers.function import FunctionHandler
from bokeh.resources import Resources
-from boke... | {"golden_diff": "diff --git a/distributed/dashboard/core.py b/distributed/dashboard/core.py\n--- a/distributed/dashboard/core.py\n+++ b/distributed/dashboard/core.py\n@@ -6,8 +6,8 @@\n from bokeh.application import Application\n from bokeh.application.handlers.function import FunctionHandler\n from bokeh.resources impo... | 1,386 | 301 |
gh_patches_debug_23710 | rasdani/github-patches | git_diff | mindsdb__mindsdb-2704 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Endpoint to return handler's icons
At the moment we return icons for handlers by general `GET /handlers` route. Icons are return in svg or base64, which is not effective. We need new endpoint to return handle... | diff --git a/mindsdb/api/http/namespaces/handlers.py b/mindsdb/api/http/namespaces/handlers.py
--- a/mindsdb/api/http/namespaces/handlers.py
+++ b/mindsdb/api/http/namespaces/handlers.py
@@ -1,4 +1,8 @@
-from flask import request
+import os
+import importlib
+from pathlib import Path
+
+from flask import request, send_... | {"golden_diff": "diff --git a/mindsdb/api/http/namespaces/handlers.py b/mindsdb/api/http/namespaces/handlers.py\n--- a/mindsdb/api/http/namespaces/handlers.py\n+++ b/mindsdb/api/http/namespaces/handlers.py\n@@ -1,4 +1,8 @@\n-from flask import request\n+import os\n+import importlib\n+from pathlib import Path\n+\n+from f... | 796 | 358 |
gh_patches_debug_15237 | rasdani/github-patches | git_diff | rlworkgroup__garage-691 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
sim_policy not working
Hi,
I just found that sim_policy.py cannot work.
data that read from "params.pkl" does not include the key of "policy"
--- END ISSUE ---
Below are some code segments, each from a ... | diff --git a/examples/sim_policy.py b/examples/sim_policy.py
--- a/examples/sim_policy.py
+++ b/examples/sim_policy.py
@@ -8,7 +8,7 @@
from garage.misc.console import query_yes_no
from garage.sampler.utils import rollout
-if __name__ == "__main__":
+if __name__ == '__main__':
parser = argparse.ArgumentParser... | {"golden_diff": "diff --git a/examples/sim_policy.py b/examples/sim_policy.py\n--- a/examples/sim_policy.py\n+++ b/examples/sim_policy.py\n@@ -8,7 +8,7 @@\n from garage.misc.console import query_yes_no\n from garage.sampler.utils import rollout\n \n-if __name__ == \"__main__\":\n+if __name__ == '__main__':\n \n par... | 612 | 173 |
gh_patches_debug_9203 | rasdani/github-patches | git_diff | Qiskit__qiskit-4081 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve an error message in qiskit.converters.circuit_to_gate()
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm ... | diff --git a/qiskit/converters/circuit_to_gate.py b/qiskit/converters/circuit_to_gate.py
--- a/qiskit/converters/circuit_to_gate.py
+++ b/qiskit/converters/circuit_to_gate.py
@@ -48,8 +48,9 @@
for inst, _, _ in circuit.data:
if not isinstance(inst, Gate):
- raise QiskitError('One or more inst... | {"golden_diff": "diff --git a/qiskit/converters/circuit_to_gate.py b/qiskit/converters/circuit_to_gate.py\n--- a/qiskit/converters/circuit_to_gate.py\n+++ b/qiskit/converters/circuit_to_gate.py\n@@ -48,8 +48,9 @@\n \n for inst, _, _ in circuit.data:\n if not isinstance(inst, Gate):\n- raise Qiski... | 1,613 | 173 |
gh_patches_debug_984 | rasdani/github-patches | git_diff | Mailu__Mailu-2157 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Admin User Quota sorting is off
Thank you for opening an issue with Mailu. Please understand that issues are meant for bugs and enhancement-requests.
For **user-support questions**, reach out to us on [matr... | diff --git a/core/admin/mailu/__init__.py b/core/admin/mailu/__init__.py
--- a/core/admin/mailu/__init__.py
+++ b/core/admin/mailu/__init__.py
@@ -57,6 +57,7 @@
return dict(
signup_domains= signup_domains,
config = app.config,
+ get_locale = utils.get_locale,
... | {"golden_diff": "diff --git a/core/admin/mailu/__init__.py b/core/admin/mailu/__init__.py\n--- a/core/admin/mailu/__init__.py\n+++ b/core/admin/mailu/__init__.py\n@@ -57,6 +57,7 @@\n return dict(\n signup_domains= signup_domains,\n config = app.config,\n+ get_locale ... | 1,412 | 93 |
gh_patches_debug_764 | rasdani/github-patches | git_diff | rasterio__rasterio-1692 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
more explicit NotImplementedError messages in read mode ?
In wanting to set a GeoTIFF's CRS, I encountered [this](https://github.com/mapbox/rasterio/blob/master/rasterio/_base.pyx#L516) NotImplementedError wh... | diff --git a/rasterio/errors.py b/rasterio/errors.py
--- a/rasterio/errors.py
+++ b/rasterio/errors.py
@@ -102,3 +102,7 @@
class OverviewCreationError(RasterioError):
"""Raised when creation of an overview fails"""
+
+
+class DatasetAttributeError(RasterioError, NotImplementedError):
+ """Raised when dataset... | {"golden_diff": "diff --git a/rasterio/errors.py b/rasterio/errors.py\n--- a/rasterio/errors.py\n+++ b/rasterio/errors.py\n@@ -102,3 +102,7 @@\n \n class OverviewCreationError(RasterioError):\n \"\"\"Raised when creation of an overview fails\"\"\"\n+\n+\n+class DatasetAttributeError(RasterioError, NotImplementedErr... | 1,296 | 91 |
gh_patches_debug_30871 | rasdani/github-patches | git_diff | sublimelsp__LSP-1488 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
LspTextCommand should honor both session_name and capability if defined
If `capability` in [LspTextCommand](https://github.com/sublimelsp/LSP/blob/81a6e6aeb2c3a6aebad59fbd6eb0361301243bd1/plugin/core/registry... | diff --git a/plugin/core/registry.py b/plugin/core/registry.py
--- a/plugin/core/registry.py
+++ b/plugin/core/registry.py
@@ -49,25 +49,27 @@
keybinding.
"""
- # When this is defined in a derived class, the command is enabled if and only if there exists a session attached
- # to the view that has the... | {"golden_diff": "diff --git a/plugin/core/registry.py b/plugin/core/registry.py\n--- a/plugin/core/registry.py\n+++ b/plugin/core/registry.py\n@@ -49,25 +49,27 @@\n keybinding.\n \"\"\"\n \n- # When this is defined in a derived class, the command is enabled if and only if there exists a session attached\n- ... | 1,692 | 449 |
gh_patches_debug_3419 | rasdani/github-patches | git_diff | encode__httpx-71 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
100% Test coverage
Let's get the test coverage up to 100%, and then force-pin it.
Any contributions towards this are welcome.
--- END ISSUE ---
Below are some code segments, each from a relevant file. On... | diff --git a/httpcore/concurrency.py b/httpcore/concurrency.py
--- a/httpcore/concurrency.py
+++ b/httpcore/concurrency.py
@@ -76,7 +76,7 @@
self.timeout = timeout
def write_no_block(self, data: bytes) -> None:
- self.stream_writer.write(data)
+ self.stream_writer.write(data) # pragma: no... | {"golden_diff": "diff --git a/httpcore/concurrency.py b/httpcore/concurrency.py\n--- a/httpcore/concurrency.py\n+++ b/httpcore/concurrency.py\n@@ -76,7 +76,7 @@\n self.timeout = timeout\n \n def write_no_block(self, data: bytes) -> None:\n- self.stream_writer.write(data)\n+ self.stream_writer.... | 1,823 | 112 |
gh_patches_debug_30243 | rasdani/github-patches | git_diff | lhotse-speech__lhotse-847 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Whisper workflow supervision `end` may be incorrect
So I ran the model on one of the AMI headset recordings (~5000s) and it seems like the "end" actually shows the end of the segment, not the duration. Here i... | diff --git a/lhotse/workflows/whisper.py b/lhotse/workflows/whisper.py
--- a/lhotse/workflows/whisper.py
+++ b/lhotse/workflows/whisper.py
@@ -3,7 +3,14 @@
import torch
-from lhotse import CutSet, MonoCut, Recording, RecordingSet, SupervisionSegment
+from lhotse import (
+ CutSet,
+ MonoCut,
+ Recording,
... | {"golden_diff": "diff --git a/lhotse/workflows/whisper.py b/lhotse/workflows/whisper.py\n--- a/lhotse/workflows/whisper.py\n+++ b/lhotse/workflows/whisper.py\n@@ -3,7 +3,14 @@\n \n import torch\n \n-from lhotse import CutSet, MonoCut, Recording, RecordingSet, SupervisionSegment\n+from lhotse import (\n+ CutSet,\n+ ... | 1,921 | 389 |
gh_patches_debug_25594 | rasdani/github-patches | git_diff | chainer__chainer-4769 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
backward of F.normalize is not stable
`NormalizeL2.backward` computes 0/0 if the input contains a zero vector. PR #4190, I wrote, caused this. Sorry.
To begin with, x/(||x|| + eps) is C^1 but not C^2 (at... | diff --git a/chainer/functions/normalization/l2_normalization.py b/chainer/functions/normalization/l2_normalization.py
--- a/chainer/functions/normalization/l2_normalization.py
+++ b/chainer/functions/normalization/l2_normalization.py
@@ -7,6 +7,25 @@
from chainer.utils import type_check
+class _SetItemZero(functi... | {"golden_diff": "diff --git a/chainer/functions/normalization/l2_normalization.py b/chainer/functions/normalization/l2_normalization.py\n--- a/chainer/functions/normalization/l2_normalization.py\n+++ b/chainer/functions/normalization/l2_normalization.py\n@@ -7,6 +7,25 @@\n from chainer.utils import type_check\n \n \n+c... | 1,244 | 413 |
gh_patches_debug_16537 | rasdani/github-patches | git_diff | svthalia__concrexit-1662 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix adding avatar through api v2
### Describe the bug
In api v1 the avatar can be set through `api/v1/members/me` with a multipart patch request with a file labelled `photo`. Api v2 should also allow this, b... | diff --git a/website/members/api/v2/serializers/member.py b/website/members/api/v2/serializers/member.py
--- a/website/members/api/v2/serializers/member.py
+++ b/website/members/api/v2/serializers/member.py
@@ -1,4 +1,5 @@
from rest_framework import serializers
+from rest_framework.exceptions import ValidationError
... | {"golden_diff": "diff --git a/website/members/api/v2/serializers/member.py b/website/members/api/v2/serializers/member.py\n--- a/website/members/api/v2/serializers/member.py\n+++ b/website/members/api/v2/serializers/member.py\n@@ -1,4 +1,5 @@\n from rest_framework import serializers\n+from rest_framework.exceptions imp... | 1,229 | 183 |
gh_patches_debug_14366 | rasdani/github-patches | git_diff | conan-io__conan-13211 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[bug] Conan build command does not support conanfile.txt as described
### Description
The documentation about [build](https://docs.conan.io/2/reference/commands/build.html) command says:
```
usage: con... | diff --git a/conan/cli/commands/build.py b/conan/cli/commands/build.py
--- a/conan/cli/commands/build.py
+++ b/conan/cli/commands/build.py
@@ -15,9 +15,9 @@
Install dependencies and call the build() method.
"""
parser.add_argument("path", nargs="?",
- help="Path to a folder contain... | {"golden_diff": "diff --git a/conan/cli/commands/build.py b/conan/cli/commands/build.py\n--- a/conan/cli/commands/build.py\n+++ b/conan/cli/commands/build.py\n@@ -15,9 +15,9 @@\n Install dependencies and call the build() method.\n \"\"\"\n parser.add_argument(\"path\", nargs=\"?\",\n- ... | 1,525 | 193 |
gh_patches_debug_2269 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-2501 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AASIN and isfdb not editable
Somehow during the merge some code most be gone lost because...
<img width="640" alt="Bildschirmfoto 2022-12-11 um 21 29 47" src="https://user-images.githubusercontent.com/201... | diff --git a/bookwyrm/forms/books.py b/bookwyrm/forms/books.py
--- a/bookwyrm/forms/books.py
+++ b/bookwyrm/forms/books.py
@@ -40,6 +40,8 @@
"goodreads_key",
"oclc_number",
"asin",
+ "aasin",
+ "isfdb",
]
widgets = {
"title": fo... | {"golden_diff": "diff --git a/bookwyrm/forms/books.py b/bookwyrm/forms/books.py\n--- a/bookwyrm/forms/books.py\n+++ b/bookwyrm/forms/books.py\n@@ -40,6 +40,8 @@\n \"goodreads_key\",\n \"oclc_number\",\n \"asin\",\n+ \"aasin\",\n+ \"isfdb\",\n ]\n ... | 1,452 | 97 |
gh_patches_debug_2626 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-7221 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[CT-1943] Loosen pin on `jsonschema` (via `hologram`)
For more context on our latest thinking around dependencies (how & why we pin today, and how we want it to change):
- https://github.com/dbt-labs/dbt-cor... | diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -50,7 +50,7 @@
"agate>=1.6,<1.7.1",
"click>=7.0,<9",
"colorama>=0.3.9,<0.4.7",
- "hologram>=0.0.14,<=0.0.15",
+ "hologram>=0.0.14,<=0.0.16",
"isodate>=0.6,<0.7",
"logbook>=1.5... | {"golden_diff": "diff --git a/core/setup.py b/core/setup.py\n--- a/core/setup.py\n+++ b/core/setup.py\n@@ -50,7 +50,7 @@\n \"agate>=1.6,<1.7.1\",\n \"click>=7.0,<9\",\n \"colorama>=0.3.9,<0.4.7\",\n- \"hologram>=0.0.14,<=0.0.15\",\n+ \"hologram>=0.0.14,<=0.0.16\",\n \"isoda... | 1,596 | 162 |
gh_patches_debug_31646 | rasdani/github-patches | git_diff | lightly-ai__lightly-272 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CO2 regularizer breaks with PyTorch 1.4.0
# CO2 regularizer breaks with PyTorch 1.4.0
The `KLDivLoss` in PyTorch only received the `log_target` flag after 1.4.0 so we need to handle the case where the flag... | diff --git a/lightly/loss/regularizer/co2.py b/lightly/loss/regularizer/co2.py
--- a/lightly/loss/regularizer/co2.py
+++ b/lightly/loss/regularizer/co2.py
@@ -46,7 +46,19 @@
memory_bank_size: int = 0):
super(CO2Regularizer, self).__init__(size=memory_bank_size)
- self.kl_div = torch.n... | {"golden_diff": "diff --git a/lightly/loss/regularizer/co2.py b/lightly/loss/regularizer/co2.py\n--- a/lightly/loss/regularizer/co2.py\n+++ b/lightly/loss/regularizer/co2.py\n@@ -46,7 +46,19 @@\n memory_bank_size: int = 0):\n \n super(CO2Regularizer, self).__init__(size=memory_bank_size)\n- ... | 1,926 | 550 |
gh_patches_debug_12289 | rasdani/github-patches | git_diff | modin-project__modin-794 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pyarrow is a dependency but is not in `install_requires`
### Describe the problem
<!-- Describe the problem clearly here. -->
The source comes from this file: https://github.com/modin-project/modin/blob/m... | diff --git a/modin/experimental/engines/pyarrow_on_ray/io.py b/modin/experimental/engines/pyarrow_on_ray/io.py
--- a/modin/experimental/engines/pyarrow_on_ray/io.py
+++ b/modin/experimental/engines/pyarrow_on_ray/io.py
@@ -1,8 +1,6 @@
from io import BytesIO
import pandas
-import pyarrow as pa
-import pyarrow.csv as... | {"golden_diff": "diff --git a/modin/experimental/engines/pyarrow_on_ray/io.py b/modin/experimental/engines/pyarrow_on_ray/io.py\n--- a/modin/experimental/engines/pyarrow_on_ray/io.py\n+++ b/modin/experimental/engines/pyarrow_on_ray/io.py\n@@ -1,8 +1,6 @@\n from io import BytesIO\n \n import pandas\n-import pyarrow as p... | 1,126 | 182 |
gh_patches_debug_64991 | rasdani/github-patches | git_diff | conda-forge__conda-smithy-864 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Autogenerated README.md missing final newline
## The Problem
As I've confirmed is the case on multiple repos here, including our own ``spyder-feedstock`` and ``spyder-kernels-feedstock`` as well as two arb... | diff --git a/conda_smithy/vendored/__init__.py b/conda_smithy/vendored/__init__.py
--- a/conda_smithy/vendored/__init__.py
+++ b/conda_smithy/vendored/__init__.py
@@ -0,0 +1 @@
+
| {"golden_diff": "diff --git a/conda_smithy/vendored/__init__.py b/conda_smithy/vendored/__init__.py\n--- a/conda_smithy/vendored/__init__.py\n+++ b/conda_smithy/vendored/__init__.py\n@@ -0,0 +1 @@\n+\n", "issue": "Autogenerated README.md missing final newline\n## The Problem\r\n\r\nAs I've confirmed is the case on mult... | 558 | 69 |
gh_patches_debug_2591 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-6375 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The s3 action "remove-statements" errors out when it encounters a bucket policy statement without a sid
**Describe the bug**
s3.remove-statements fails when a sid-less bucket policy statement is encountered
... | diff --git a/c7n/actions/policy.py b/c7n/actions/policy.py
--- a/c7n/actions/policy.py
+++ b/c7n/actions/policy.py
@@ -31,7 +31,7 @@
elif match_ids == 'matched':
if s in matched:
s_found = True
- elif s['Sid'] in match_ids:
+ elif 'Sid' in s and s['Sid'] in match_ids... | {"golden_diff": "diff --git a/c7n/actions/policy.py b/c7n/actions/policy.py\n--- a/c7n/actions/policy.py\n+++ b/c7n/actions/policy.py\n@@ -31,7 +31,7 @@\n elif match_ids == 'matched':\n if s in matched:\n s_found = True\n- elif s['Sid'] in match_ids:\n+ elif 'Sid' in s ... | 1,969 | 116 |
gh_patches_debug_3018 | rasdani/github-patches | git_diff | Mailu__Mailu-958 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Using external smtp relay server for outgoing emails
Hi,
I need to use mailchannels.com to relay all outgoing emails from my Mailu install. In this doc is what I need to change in Postfix:
https://mailc... | diff --git a/core/postfix/start.py b/core/postfix/start.py
--- a/core/postfix/start.py
+++ b/core/postfix/start.py
@@ -48,6 +48,11 @@
os.system("postmap {}".format(destination))
os.remove(destination)
+if "RELAYUSER" in os.environ:
+ path = "/etc/postfix/sasl_passwd"
+ convert("/conf/sasl_passwd", pat... | {"golden_diff": "diff --git a/core/postfix/start.py b/core/postfix/start.py\n--- a/core/postfix/start.py\n+++ b/core/postfix/start.py\n@@ -48,6 +48,11 @@\n os.system(\"postmap {}\".format(destination))\n os.remove(destination)\n \n+if \"RELAYUSER\" in os.environ:\n+ path = \"/etc/postfix/sasl_passwd\"\n+ ... | 1,061 | 131 |
gh_patches_debug_8744 | rasdani/github-patches | git_diff | mindsdb__mindsdb-1749 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error when importing MindsDB in a Jupyter notebook
**Your Environment**
* Python version: 3.6
* Operating system: Ubuntu
* Mindsdb version: 2.12.2
**Describe the bug**
Importing MindsDB from a Jupyte... | diff --git a/mindsdb/utilities/functions.py b/mindsdb/utilities/functions.py
--- a/mindsdb/utilities/functions.py
+++ b/mindsdb/utilities/functions.py
@@ -39,13 +39,10 @@
def is_notebook():
try:
- shell = get_ipython().__class__.__name__
- if shell == 'ZMQInteractiveShell':
- return Tru... | {"golden_diff": "diff --git a/mindsdb/utilities/functions.py b/mindsdb/utilities/functions.py\n--- a/mindsdb/utilities/functions.py\n+++ b/mindsdb/utilities/functions.py\n@@ -39,13 +39,10 @@\n \n def is_notebook():\n try:\n- shell = get_ipython().__class__.__name__\n- if shell == 'ZMQInteractiveShell'... | 1,485 | 173 |
gh_patches_debug_3236 | rasdani/github-patches | git_diff | pre-commit__pre-commit-1092 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Globally disable color?
I cannot find the way to globally disable color in the pre-commit output. Setting only the background color to green and not changing the foreground color does not work for my terminal... | diff --git a/pre_commit/color.py b/pre_commit/color.py
--- a/pre_commit/color.py
+++ b/pre_commit/color.py
@@ -48,6 +48,9 @@
if setting not in COLOR_CHOICES:
raise InvalidColorSetting(setting)
+ if os.environ.get('NO_COLOR'):
+ return False
+
return (
setting == 'always' or
... | {"golden_diff": "diff --git a/pre_commit/color.py b/pre_commit/color.py\n--- a/pre_commit/color.py\n+++ b/pre_commit/color.py\n@@ -48,6 +48,9 @@\n if setting not in COLOR_CHOICES:\n raise InvalidColorSetting(setting)\n \n+ if os.environ.get('NO_COLOR'):\n+ return False\n+\n return (\n ... | 829 | 102 |
gh_patches_debug_15385 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-622 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Still get notifications for follows from blocked user
**Describe the bug**
I blocked https://bookwyrm.social/user/followbot@search.fedi.app, but I'm still getting follow notifications from them. I also can s... | diff --git a/bookwyrm/models/relationship.py b/bookwyrm/models/relationship.py
--- a/bookwyrm/models/relationship.py
+++ b/bookwyrm/models/relationship.py
@@ -82,11 +82,16 @@
try:
UserFollows.objects.get(
user_subject=self.user_subject,
- user_object=self.user_objec... | {"golden_diff": "diff --git a/bookwyrm/models/relationship.py b/bookwyrm/models/relationship.py\n--- a/bookwyrm/models/relationship.py\n+++ b/bookwyrm/models/relationship.py\n@@ -82,11 +82,16 @@\n try:\n UserFollows.objects.get(\n user_subject=self.user_subject,\n- use... | 1,842 | 174 |
gh_patches_debug_60893 | rasdani/github-patches | git_diff | webkom__lego-2342 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Phone number not saved from registration form
When creating a new user, LEGO ignores the phone number inserted into the registration form.
--- END ISSUE ---
Below are some code segments, each from a relevan... | diff --git a/lego/apps/users/serializers/registration.py b/lego/apps/users/serializers/registration.py
--- a/lego/apps/users/serializers/registration.py
+++ b/lego/apps/users/serializers/registration.py
@@ -41,4 +41,5 @@
"gender",
"password",
"allergies",
+ "phone_numbe... | {"golden_diff": "diff --git a/lego/apps/users/serializers/registration.py b/lego/apps/users/serializers/registration.py\n--- a/lego/apps/users/serializers/registration.py\n+++ b/lego/apps/users/serializers/registration.py\n@@ -41,4 +41,5 @@\n \"gender\",\n \"password\",\n \"allergies... | 606 | 90 |
gh_patches_debug_24477 | rasdani/github-patches | git_diff | wemake-services__wemake-python-styleguide-2529 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
609: Allow __enter__() inside an __enter__()
### What's wrong
One design pattern is to wrap a context manager. It would be nice to avoid WPS609 errors with this code, which seems to require accessing the d... | diff --git a/wemake_python_styleguide/visitors/ast/attributes.py b/wemake_python_styleguide/visitors/ast/attributes.py
--- a/wemake_python_styleguide/visitors/ast/attributes.py
+++ b/wemake_python_styleguide/visitors/ast/attributes.py
@@ -3,7 +3,9 @@
from typing_extensions import final
+from wemake_python_stylegui... | {"golden_diff": "diff --git a/wemake_python_styleguide/visitors/ast/attributes.py b/wemake_python_styleguide/visitors/ast/attributes.py\n--- a/wemake_python_styleguide/visitors/ast/attributes.py\n+++ b/wemake_python_styleguide/visitors/ast/attributes.py\n@@ -3,7 +3,9 @@\n \n from typing_extensions import final\n \n+fro... | 928 | 297 |
gh_patches_debug_18253 | rasdani/github-patches | git_diff | google__jax-1473 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
advi.py example is broken with jit
advi.py example is broken with jit: @partial(jit, static_argnums=(0, 1, 2, 4))
If jit is removed, then It works.
--- END ISSUE ---
Below are some code segments, each from... | diff --git a/examples/advi.py b/examples/advi.py
--- a/examples/advi.py
+++ b/examples/advi.py
@@ -54,7 +54,7 @@
# ========= Helper function for plotting. =========
@partial(jit, static_argnums=(0, 1, 2, 4))
-def mesh_eval(func, x_limits, y_limits, params, num_ticks=101):
+def _mesh_eval(func, x_limits, y_limits, p... | {"golden_diff": "diff --git a/examples/advi.py b/examples/advi.py\n--- a/examples/advi.py\n+++ b/examples/advi.py\n@@ -54,7 +54,7 @@\n # ========= Helper function for plotting. =========\n \n @partial(jit, static_argnums=(0, 1, 2, 4))\n-def mesh_eval(func, x_limits, y_limits, params, num_ticks=101):\n+def _mesh_eval(fu... | 1,884 | 250 |
gh_patches_debug_15104 | rasdani/github-patches | git_diff | dotkom__onlineweb4-606 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Order of events in event archive is non-logical
As it is now:
28.11.13
04.04.14
16.01.14
23.11.13
27.02.14
and so on...
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or m... | diff --git a/apps/events/views.py b/apps/events/views.py
--- a/apps/events/views.py
+++ b/apps/events/views.py
@@ -147,15 +147,15 @@
if filters['myevents'] == 'true':
kwargs['attendance_event__attendees'] = request.user
+ events = Event.objects.filter(**kwargs).order_by('event_start').prefetch_relate... | {"golden_diff": "diff --git a/apps/events/views.py b/apps/events/views.py\n--- a/apps/events/views.py\n+++ b/apps/events/views.py\n@@ -147,15 +147,15 @@\n if filters['myevents'] == 'true':\n kwargs['attendance_event__attendees'] = request.user\n \n+ events = Event.objects.filter(**kwargs).order_by('event... | 1,936 | 209 |
gh_patches_debug_38138 | rasdani/github-patches | git_diff | aws__aws-cli-483 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Option to associate public ip address in ec2 run-instance
There doesn't seem to be any way to associate a public ip address without also adding a network interface with the --network-interfaces parameter. Is ... | diff --git a/awscli/customizations/ec2runinstances.py b/awscli/customizations/ec2runinstances.py
--- a/awscli/customizations/ec2runinstances.py
+++ b/awscli/customizations/ec2runinstances.py
@@ -38,6 +38,12 @@
'[EC2-VPC] The number of secondary IP addresses to assign to '
'the network interface or instance.')... | {"golden_diff": "diff --git a/awscli/customizations/ec2runinstances.py b/awscli/customizations/ec2runinstances.py\n--- a/awscli/customizations/ec2runinstances.py\n+++ b/awscli/customizations/ec2runinstances.py\n@@ -38,6 +38,12 @@\n '[EC2-VPC] The number of secondary IP addresses to assign to '\n 'the network in... | 1,547 | 569 |
gh_patches_debug_31329 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-1174 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
don't rely on master branch for latest version number
## Feature
### Feature description
The `master` branch of dbt isn't really a thing anymore. Instead of relying on the [master](https://github.com/fish... | diff --git a/dbt/version.py b/dbt/version.py
--- a/dbt/version.py
+++ b/dbt/version.py
@@ -1,43 +1,23 @@
+import json
import re
-import dbt.semver
-
-try:
- # For Python 3.0 and later
- from urllib.request import urlopen
-except ImportError:
- # Fall back to Python 2's urllib2
- from urllib2 import urlop... | {"golden_diff": "diff --git a/dbt/version.py b/dbt/version.py\n--- a/dbt/version.py\n+++ b/dbt/version.py\n@@ -1,43 +1,23 @@\n+import json\n import re\n \n-import dbt.semver\n-\n-try:\n- # For Python 3.0 and later\n- from urllib.request import urlopen\n-except ImportError:\n- # Fall back to Python 2's urllib2\... | 1,140 | 498 |
gh_patches_debug_15688 | rasdani/github-patches | git_diff | iterative__dvc-796 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use dvc to store images for windows installer in our repo
We currently have 3 images stored in git in scripts/innosetup. We should start using dvc for them. Required for https://github.com/iterative/dvc/issue... | diff --git a/dvc/remote/base.py b/dvc/remote/base.py
--- a/dvc/remote/base.py
+++ b/dvc/remote/base.py
@@ -1,6 +1,7 @@
import os
import re
import tempfile
+import posixpath
from dvc.config import Config
from dvc.logger import Logger
@@ -66,7 +67,7 @@
""" Key of a file within the bucket """
relp... | {"golden_diff": "diff --git a/dvc/remote/base.py b/dvc/remote/base.py\n--- a/dvc/remote/base.py\n+++ b/dvc/remote/base.py\n@@ -1,6 +1,7 @@\n import os\n import re\n import tempfile\n+import posixpath\n \n from dvc.config import Config\n from dvc.logger import Logger\n@@ -66,7 +67,7 @@\n \"\"\" Key of a file wit... | 1,932 | 179 |
gh_patches_debug_27759 | rasdani/github-patches | git_diff | mdn__kuma-6029 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Search json endpoint is not available in new front-end
**Summary**
https://twitter.com/klaascuvelier/status/1182203293117886464
**Steps To Reproduce (STR)**
_How can we reproduce the problem?_
Go to... | diff --git a/kuma/search/urls.py b/kuma/search/urls.py
--- a/kuma/search/urls.py
+++ b/kuma/search/urls.py
@@ -1,11 +1,11 @@
from django.conf.urls import url
-from rest_framework.urlpatterns import format_suffix_patterns
from . import views
-# this allows using ".json" extensions for the view to force json output... | {"golden_diff": "diff --git a/kuma/search/urls.py b/kuma/search/urls.py\n--- a/kuma/search/urls.py\n+++ b/kuma/search/urls.py\n@@ -1,11 +1,11 @@\n from django.conf.urls import url\n-from rest_framework.urlpatterns import format_suffix_patterns\n \n from . import views\n \n-# this allows using \".json\" extensions for t... | 961 | 408 |
gh_patches_debug_39489 | rasdani/github-patches | git_diff | deepset-ai__haystack-6822 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement function to calculate F1 metric
As specified in proposal #5794 we need to implement a function to calculate the F1 metric.
Ideally the function should be part of the private interface and called ... | diff --git a/haystack/evaluation/eval.py b/haystack/evaluation/eval.py
--- a/haystack/evaluation/eval.py
+++ b/haystack/evaluation/eval.py
@@ -1,3 +1,4 @@
+import collections
from typing import Any, Callable, Dict, List, Union
import numpy as np
@@ -71,8 +72,68 @@
def _calculate_mrr(self):
return Metr... | {"golden_diff": "diff --git a/haystack/evaluation/eval.py b/haystack/evaluation/eval.py\n--- a/haystack/evaluation/eval.py\n+++ b/haystack/evaluation/eval.py\n@@ -1,3 +1,4 @@\n+import collections\n from typing import Any, Callable, Dict, List, Union\n \n import numpy as np\n@@ -71,8 +72,68 @@\n def _calculate_mrr(s... | 2,008 | 912 |
gh_patches_debug_27319 | rasdani/github-patches | git_diff | medtagger__MedTagger-306 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow backend to return Slices in reverse order
## Expected Behavior
When user moves slider down, backend should send Slices in reverse order, so that UI will be able to show them first.
## Actual Behav... | diff --git a/backend/medtagger/api/scans/service_web_socket.py b/backend/medtagger/api/scans/service_web_socket.py
--- a/backend/medtagger/api/scans/service_web_socket.py
+++ b/backend/medtagger/api/scans/service_web_socket.py
@@ -21,13 +21,21 @@
scan_id = ScanID(str(request['scan_id']))
begin = max(0... | {"golden_diff": "diff --git a/backend/medtagger/api/scans/service_web_socket.py b/backend/medtagger/api/scans/service_web_socket.py\n--- a/backend/medtagger/api/scans/service_web_socket.py\n+++ b/backend/medtagger/api/scans/service_web_socket.py\n@@ -21,13 +21,21 @@\n scan_id = ScanID(str(request['scan_id']))\n... | 1,111 | 357 |
gh_patches_debug_23334 | rasdani/github-patches | git_diff | NVIDIA__NVFlare-318 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to run poc command if nvflare is installed by pip install -e .
--- 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/nvflare/lighter/poc.py b/nvflare/lighter/poc.py
--- a/nvflare/lighter/poc.py
+++ b/nvflare/lighter/poc.py
@@ -42,11 +42,20 @@
file_dir_path = pathlib.Path(__file__).parent.absolute()
poc_zip_path = file_dir_path.parent / "poc.zip"
+ poc_folder_path = file_dir_path.parent / "poc"
answer ... | {"golden_diff": "diff --git a/nvflare/lighter/poc.py b/nvflare/lighter/poc.py\n--- a/nvflare/lighter/poc.py\n+++ b/nvflare/lighter/poc.py\n@@ -42,11 +42,20 @@\n \n file_dir_path = pathlib.Path(__file__).parent.absolute()\n poc_zip_path = file_dir_path.parent / \"poc.zip\"\n+ poc_folder_path = file_dir_path.p... | 951 | 305 |
gh_patches_debug_33905 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-2873 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
(AWS::Lambda::Function.FileSystemConfigs.LocalMountPath) `The local mount path must start with /mnt/ and be a valid absolute path.` not being checked
### Is this feature request related to a new rule or cfn-l... | diff --git a/src/cfnlint/rules/resources/properties/AllowedPattern.py b/src/cfnlint/rules/resources/properties/AllowedPattern.py
--- a/src/cfnlint/rules/resources/properties/AllowedPattern.py
+++ b/src/cfnlint/rules/resources/properties/AllowedPattern.py
@@ -81,18 +81,16 @@
return matches
- def check(se... | {"golden_diff": "diff --git a/src/cfnlint/rules/resources/properties/AllowedPattern.py b/src/cfnlint/rules/resources/properties/AllowedPattern.py\n--- a/src/cfnlint/rules/resources/properties/AllowedPattern.py\n+++ b/src/cfnlint/rules/resources/properties/AllowedPattern.py\n@@ -81,18 +81,16 @@\n \n return match... | 1,996 | 463 |
gh_patches_debug_41144 | rasdani/github-patches | git_diff | streamlink__streamlink-4029 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
artetv: de/fr Livestreams aren't playable anymore
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/st... | diff --git a/src/streamlink/plugins/artetv.py b/src/streamlink/plugins/artetv.py
--- a/src/streamlink/plugins/artetv.py
+++ b/src/streamlink/plugins/artetv.py
@@ -1,5 +1,3 @@
-"""Plugin for Arte.tv, bi-lingual art and culture channel."""
-
import logging
import re
from operator import itemgetter
@@ -9,25 +7,6 @@
fr... | {"golden_diff": "diff --git a/src/streamlink/plugins/artetv.py b/src/streamlink/plugins/artetv.py\n--- a/src/streamlink/plugins/artetv.py\n+++ b/src/streamlink/plugins/artetv.py\n@@ -1,5 +1,3 @@\n-\"\"\"Plugin for Arte.tv, bi-lingual art and culture channel.\"\"\"\n-\n import logging\n import re\n from operator import ... | 1,646 | 990 |
gh_patches_debug_31351 | rasdani/github-patches | git_diff | iterative__dvc-2646 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
get/import: could not perform a HEAD request
```
DVC version: 0.62.1
Python version: 3.7.3
Platform: Darwin-18.7.0-x86_64-i386-64bit
Binary: False
Cache: reflink - True, hardlink - True, symlink - True
... | diff --git a/dvc/remote/http.py b/dvc/remote/http.py
--- a/dvc/remote/http.py
+++ b/dvc/remote/http.py
@@ -1,9 +1,11 @@
from __future__ import unicode_literals
import logging
+
+from funcy import cached_property
+
from dvc.scheme import Schemes
from dvc.utils.compat import open
-
from dvc.progress import Tqdm
f... | {"golden_diff": "diff --git a/dvc/remote/http.py b/dvc/remote/http.py\n--- a/dvc/remote/http.py\n+++ b/dvc/remote/http.py\n@@ -1,9 +1,11 @@\n from __future__ import unicode_literals\n \n import logging\n+\n+from funcy import cached_property\n+\n from dvc.scheme import Schemes\n from dvc.utils.compat import open\n-\n fr... | 1,618 | 417 |
gh_patches_debug_17448 | rasdani/github-patches | git_diff | akvo__akvo-rsr-2064 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Block Google from Indexing our Development Environments
## Test plan
GIVEN all dev environments (Test / UAT)
WHEN looking at the _head_ tag
THEN a _meta name="robots" content="none"_ node should be added
GI... | diff --git a/akvo/rsr/context_processors.py b/akvo/rsr/context_processors.py
--- a/akvo/rsr/context_processors.py
+++ b/akvo/rsr/context_processors.py
@@ -22,6 +22,7 @@
current_site = None
django_version = django.get_version()
+ debug = getattr(settings, 'DEBUG', False)
deploy_tag = getattr(sett... | {"golden_diff": "diff --git a/akvo/rsr/context_processors.py b/akvo/rsr/context_processors.py\n--- a/akvo/rsr/context_processors.py\n+++ b/akvo/rsr/context_processors.py\n@@ -22,6 +22,7 @@\n current_site = None\n \n django_version = django.get_version()\n+ debug = getattr(settings, 'DEBUG', False)\n ... | 1,024 | 187 |
gh_patches_debug_13551 | rasdani/github-patches | git_diff | vyperlang__vyper-3287 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`FunctionNodeVisitor` visits twice `sqrt` body
### Version Information
* vyper Version (output of `vyper --version`): 0.3.8+commit.d76c6ed2
* OS: OSX
* Python Version (output of `python --version`): 3.8.... | diff --git a/vyper/builtins/_utils.py b/vyper/builtins/_utils.py
--- a/vyper/builtins/_utils.py
+++ b/vyper/builtins/_utils.py
@@ -25,9 +25,9 @@
ast_code.body[0]._metadata["type"] = ContractFunctionT(
"sqrt_builtin", {}, 0, 0, None, FunctionVisibility.INTERNAL, StateMutability.NONPAYABLE
... | {"golden_diff": "diff --git a/vyper/builtins/_utils.py b/vyper/builtins/_utils.py\n--- a/vyper/builtins/_utils.py\n+++ b/vyper/builtins/_utils.py\n@@ -25,9 +25,9 @@\n ast_code.body[0]._metadata[\"type\"] = ContractFunctionT(\n \"sqrt_builtin\", {}, 0, 0, None, FunctionVisibility.INTERNAL, StateMutab... | 1,047 | 200 |
gh_patches_debug_22916 | rasdani/github-patches | git_diff | quantumlib__Cirq-1018 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add `_phase_by_` magic method to `ControlledGate`
Comes after https://github.com/quantumlib/Cirq/issues/947
The logic is as follows: if the qubit index is 0 (the control), the operation is returned unchang... | diff --git a/cirq/ops/controlled_gate.py b/cirq/ops/controlled_gate.py
--- a/cirq/ops/controlled_gate.py
+++ b/cirq/ops/controlled_gate.py
@@ -29,12 +29,6 @@
Args:
sub_gate: The gate to add a control qubit to.
- default_extensions: The extensions method that should be used when
- ... | {"golden_diff": "diff --git a/cirq/ops/controlled_gate.py b/cirq/ops/controlled_gate.py\n--- a/cirq/ops/controlled_gate.py\n+++ b/cirq/ops/controlled_gate.py\n@@ -29,12 +29,6 @@\n \n Args:\n sub_gate: The gate to add a control qubit to.\n- default_extensions: The extensions method that sh... | 1,666 | 303 |
gh_patches_debug_4315 | rasdani/github-patches | git_diff | frappe__frappe-21985 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create block in workspace
### Information about bug
### App Versions
```
{
"erpnext": "14.27.2",
"frappe": "14.39.0",
"hrms": "14.4.3",
"india_compliance": "14.10.1",
"payments": "0.0.1"
}
```
... | diff --git a/frappe/desk/doctype/custom_html_block/custom_html_block.py b/frappe/desk/doctype/custom_html_block/custom_html_block.py
--- a/frappe/desk/doctype/custom_html_block/custom_html_block.py
+++ b/frappe/desk/doctype/custom_html_block/custom_html_block.py
@@ -30,7 +30,7 @@
# return logged in users private bloc... | {"golden_diff": "diff --git a/frappe/desk/doctype/custom_html_block/custom_html_block.py b/frappe/desk/doctype/custom_html_block/custom_html_block.py\n--- a/frappe/desk/doctype/custom_html_block/custom_html_block.py\n+++ b/frappe/desk/doctype/custom_html_block/custom_html_block.py\n@@ -30,7 +30,7 @@\n \t# return logged... | 1,324 | 150 |
gh_patches_debug_9470 | rasdani/github-patches | git_diff | nextcloud__appstore-372 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
schema does not allow digits in app ids
Apparently app ids like ``twofactor_u2f`` are not allowed by the info.xml schema. Could we change that regex to allow digits too or are there any strong arguments again... | diff --git a/nextcloudappstore/core/api/v1/urls.py b/nextcloudappstore/core/api/v1/urls.py
--- a/nextcloudappstore/core/api/v1/urls.py
+++ b/nextcloudappstore/core/api/v1/urls.py
@@ -13,7 +13,7 @@
url(r'^apps/releases/?$', AppReleaseView.as_view(),
name='app-release-create'),
url(r'^apps/?$', AppRegi... | {"golden_diff": "diff --git a/nextcloudappstore/core/api/v1/urls.py b/nextcloudappstore/core/api/v1/urls.py\n--- a/nextcloudappstore/core/api/v1/urls.py\n+++ b/nextcloudappstore/core/api/v1/urls.py\n@@ -13,7 +13,7 @@\n url(r'^apps/releases/?$', AppReleaseView.as_view(),\n name='app-release-create'),\n u... | 788 | 197 |
gh_patches_debug_6773 | rasdani/github-patches | git_diff | spacetelescope__jwql-517 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DEPENDENCY_LINKS in setup.py causing bug in logging_functions
With the introduction of the `DEPENDENCY_LINKS` variable in `setup.py`, the logging of monitors is now failing to log the versions of depenencies ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -9,6 +9,7 @@
DESCRIPTION = 'The James Webb Space Telescope Quicklook Project'
+DEPENDENCY_LINKS = ['git+https://github.com/spacetelescope/jwst#0.13.0']
REQUIRES = [
'asdf>=2.3.3',
'astropy>=3.2.1',
@@ -38,8 +39,6 @@
'twine'
]
-DEP... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -9,6 +9,7 @@\n \n DESCRIPTION = 'The James Webb Space Telescope Quicklook Project'\n \n+DEPENDENCY_LINKS = ['git+https://github.com/spacetelescope/jwst#0.13.0']\n REQUIRES = [\n 'asdf>=2.3.3',\n 'astropy>=3.2.1',\n@@ -38,8 +39... | 901 | 159 |
gh_patches_debug_35261 | rasdani/github-patches | git_diff | electricitymaps__electricitymaps-contrib-3264 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
First try at building a parser using data from Quebec
Hopefully this will show up on the map somehow. I look forward to seeing what changes will be made in order to make this parser functional.
--- END IS... | diff --git a/parsers/CA_QC.py b/parsers/CA_QC.py
--- a/parsers/CA_QC.py
+++ b/parsers/CA_QC.py
@@ -25,8 +25,9 @@
"thermique": "thermal",
"solaire": "solar",
"eolien": "wind",
- "autres": "unknown",
- "valeurs": "values",
+ # autres is all renewable... | {"golden_diff": "diff --git a/parsers/CA_QC.py b/parsers/CA_QC.py\n--- a/parsers/CA_QC.py\n+++ b/parsers/CA_QC.py\n@@ -25,8 +25,9 @@\n \"thermique\": \"thermal\",\n \"solaire\": \"solar\",\n \"eolien\": \"wind\",\n- \"autres\": \"unknown\",\n- \"valeurs\": \"val... | 1,417 | 574 |
gh_patches_debug_13280 | rasdani/github-patches | git_diff | pyca__cryptography-10345 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow verifying an x509 cert chain without making assertions about the subject name
Thanks to all who worked on the X.509 verification support in version 42.
I am trying to use this API for verifying a sig... | diff --git a/src/cryptography/x509/verification.py b/src/cryptography/x509/verification.py
--- a/src/cryptography/x509/verification.py
+++ b/src/cryptography/x509/verification.py
@@ -12,6 +12,8 @@
__all__ = [
"Store",
"Subject",
+ "VerifiedClient",
+ "ClientVerifier",
"ServerVerifier",
"Polic... | {"golden_diff": "diff --git a/src/cryptography/x509/verification.py b/src/cryptography/x509/verification.py\n--- a/src/cryptography/x509/verification.py\n+++ b/src/cryptography/x509/verification.py\n@@ -12,6 +12,8 @@\n __all__ = [\n \"Store\",\n \"Subject\",\n+ \"VerifiedClient\",\n+ \"ClientVerifier\",\n... | 589 | 197 |
gh_patches_debug_2909 | rasdani/github-patches | git_diff | mirumee__ariadne-799 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support Starlette 0.18.0
Was just released: https://github.com/encode/starlette/releases/tag/0.18.0
and currently the dependency is pinned at `<0.18.0`.
--- END ISSUE ---
Below are some code segments, each... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@
include_package_data=True,
install_requires=[
"graphql-core>=3.2.0,<3.3",
- "starlette<0.18",
+ "starlette<0.19",
"typing_extensions>=3.6.0",
],
extras_require={"asgi-file-uploads": ["pyt... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -33,7 +33,7 @@\n include_package_data=True,\n install_requires=[\n \"graphql-core>=3.2.0,<3.3\",\n- \"starlette<0.18\",\n+ \"starlette<0.19\",\n \"typing_extensions>=3.6.0\",\n ],\n extras... | 742 | 114 |
gh_patches_debug_2549 | rasdani/github-patches | git_diff | streamlit__streamlit-724 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix Danny's S3 sharing issue
It looks like `[s3] keyPrefix=...` isn't making it into the URLs being fetched from S3.
This is the address of a manifest protobuf we want to fetch:
`https://yelp-people-dev.s... | diff --git a/examples/bart_vs_bikes.py b/examples/bart_vs_bikes.py
--- a/examples/bart_vs_bikes.py
+++ b/examples/bart_vs_bikes.py
@@ -33,7 +33,9 @@
@st.cache
def from_data_file(filename):
- dirname = "https://raw.githubusercontent.com/streamlit/streamlit/develop/examples/data/"
+ dirname = (
+ "ht... | {"golden_diff": "diff --git a/examples/bart_vs_bikes.py b/examples/bart_vs_bikes.py\n--- a/examples/bart_vs_bikes.py\n+++ b/examples/bart_vs_bikes.py\n@@ -33,7 +33,9 @@\n \n @st.cache\n def from_data_file(filename):\n- dirname = \"https://raw.githubusercontent.com/streamlit/streamlit/develop/examples/data/\" \n+ ... | 1,337 | 124 |
gh_patches_debug_28660 | rasdani/github-patches | git_diff | mozilla__pontoon-2675 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
No warnings when trying to submit empty translations
I've noticed an increase in the number of empty strings in Firefox, where I have [special checks](https://test.flod.org/checks/).
Apparently, we don't w... | diff --git a/pontoon/checks/libraries/pontoon_db.py b/pontoon/checks/libraries/pontoon_db.py
--- a/pontoon/checks/libraries/pontoon_db.py
+++ b/pontoon/checks/libraries/pontoon_db.py
@@ -5,6 +5,7 @@
from collections import defaultdict
from fluent.syntax import FluentParser, ast
+from fluent.syntax.visitor import Vi... | {"golden_diff": "diff --git a/pontoon/checks/libraries/pontoon_db.py b/pontoon/checks/libraries/pontoon_db.py\n--- a/pontoon/checks/libraries/pontoon_db.py\n+++ b/pontoon/checks/libraries/pontoon_db.py\n@@ -5,6 +5,7 @@\n \n from collections import defaultdict\n from fluent.syntax import FluentParser, ast\n+from fluent.... | 1,073 | 394 |
gh_patches_debug_6668 | rasdani/github-patches | git_diff | pyjanitor-devs__pyjanitor-635 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Natsort import error
# Brief Description
The module `natsort` isn't found because it was added (in #627) to dev requirements but needs to be in the main requirements file. It is imported with all functions... | diff --git a/janitor/__init__.py b/janitor/__init__.py
--- a/janitor/__init__.py
+++ b/janitor/__init__.py
@@ -19,4 +19,4 @@
return _get_features_targets(*args, **kwargs)
-__version__ = "0.20.1"
+__version__ = "0.20.2"
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -46,7 +46,7 @@
setup(
... | {"golden_diff": "diff --git a/janitor/__init__.py b/janitor/__init__.py\n--- a/janitor/__init__.py\n+++ b/janitor/__init__.py\n@@ -19,4 +19,4 @@\n return _get_features_targets(*args, **kwargs)\n \n \n-__version__ = \"0.20.1\"\n+__version__ = \"0.20.2\"\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.... | 1,257 | 184 |
gh_patches_debug_23123 | rasdani/github-patches | git_diff | streamlink__streamlink-5762 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plugins.vidio: 403 Client Error on stream token acquirement
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/stre... | diff --git a/src/streamlink/plugins/vidio.py b/src/streamlink/plugins/vidio.py
--- a/src/streamlink/plugins/vidio.py
+++ b/src/streamlink/plugins/vidio.py
@@ -6,6 +6,7 @@
import logging
import re
from urllib.parse import urlsplit, urlunsplit
+from uuid import uuid4
from streamlink.plugin import Plugin, pluginmatc... | {"golden_diff": "diff --git a/src/streamlink/plugins/vidio.py b/src/streamlink/plugins/vidio.py\n--- a/src/streamlink/plugins/vidio.py\n+++ b/src/streamlink/plugins/vidio.py\n@@ -6,6 +6,7 @@\n import logging\n import re\n from urllib.parse import urlsplit, urlunsplit\n+from uuid import uuid4\n \n from streamlink.plugin... | 1,360 | 260 |
gh_patches_debug_27102 | rasdani/github-patches | git_diff | fossasia__open-event-server-5627 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
copied events have no organizer
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
Currently, copied events have no associated event roles and are being showed with no organiz... | diff --git a/app/api/event_copy.py b/app/api/event_copy.py
--- a/app/api/event_copy.py
+++ b/app/api/event_copy.py
@@ -14,6 +14,7 @@
from app.models.sponsor import Sponsor
from app.models.ticket import Ticket
from app.models.track import Track
+from app.models.users_events_role import UsersEventsRoles
event_copy ... | {"golden_diff": "diff --git a/app/api/event_copy.py b/app/api/event_copy.py\n--- a/app/api/event_copy.py\n+++ b/app/api/event_copy.py\n@@ -14,6 +14,7 @@\n from app.models.sponsor import Sponsor\n from app.models.ticket import Ticket\n from app.models.track import Track\n+from app.models.users_events_role import UsersEv... | 1,821 | 304 |
gh_patches_debug_40419 | rasdani/github-patches | git_diff | cowrie__cowrie-1564 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
/etc/shadow file contents are incorrect
**Describe the bug**
In the latest honeypot from master branch, a “cat /etc/shadow“ outputs a readme file instead of password contents. It looks the commit 937402ece56... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@
],
setup_requires=["incremental", "click"],
install_requires=[
- "twisted>=17.1.0",
+ "twisted==21.1.0",
"cryptography>=0.9.1",
"configparser",
"pyopenssl",
@@ -48,7 +48,7 @@
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -36,7 +36,7 @@\n ],\n setup_requires=[\"incremental\", \"click\"],\n install_requires=[\n- \"twisted>=17.1.0\",\n+ \"twisted==21.1.0\",\n \"cryptography>=0.9.1\",\n \"configparser\",\n ... | 1,773 | 976 |
gh_patches_debug_50124 | rasdani/github-patches | git_diff | scrapy__scrapy-2649 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
After adding request flags subclasses of logformatter that rely on 'flags' format string are broken
#2082 added flags to request but it also renamed formatting string key from flags to response_flags/request_... | diff --git a/scrapy/logformatter.py b/scrapy/logformatter.py
--- a/scrapy/logformatter.py
+++ b/scrapy/logformatter.py
@@ -43,6 +43,8 @@
'request_flags' : request_flags,
'referer': referer_str(request),
'response_flags': response_flags,
+ # backward comp... | {"golden_diff": "diff --git a/scrapy/logformatter.py b/scrapy/logformatter.py\n--- a/scrapy/logformatter.py\n+++ b/scrapy/logformatter.py\n@@ -43,6 +43,8 @@\n 'request_flags' : request_flags,\n 'referer': referer_str(request),\n 'response_flags': response_flags,\n+ ... | 1,697 | 99 |
gh_patches_debug_15426 | rasdani/github-patches | git_diff | airctic__icevision-734 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't save a full model using torch.save (at least with faster-RCNN)
It is not possible to save a full model using default settings of `torch.save` (see stack trace below). This is because of the implementati... | diff --git a/icevision/models/torchvision/utils.py b/icevision/models/torchvision/utils.py
--- a/icevision/models/torchvision/utils.py
+++ b/icevision/models/torchvision/utils.py
@@ -9,17 +9,19 @@
from torchvision.models.detection.generalized_rcnn import GeneralizedRCNN
-def remove_internal_model_transforms(model:... | {"golden_diff": "diff --git a/icevision/models/torchvision/utils.py b/icevision/models/torchvision/utils.py\n--- a/icevision/models/torchvision/utils.py\n+++ b/icevision/models/torchvision/utils.py\n@@ -9,17 +9,19 @@\n from torchvision.models.detection.generalized_rcnn import GeneralizedRCNN\n \n \n-def remove_internal... | 1,316 | 270 |
gh_patches_debug_40489 | rasdani/github-patches | git_diff | mindsdb__lightwood-979 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in SHAP analysis block
Trying out this module, the following error arises with the cloud tutorial for home rentals:
```python
File "/tmp/e74830c1ef5914dfafe52537b8b33cd0479265f508bfd6c61661466630520... | diff --git a/lightwood/analysis/helpers/shap.py b/lightwood/analysis/helpers/shap.py
--- a/lightwood/analysis/helpers/shap.py
+++ b/lightwood/analysis/helpers/shap.py
@@ -29,6 +29,8 @@
def __init__(self, deps: Optional[Tuple] = ...):
super().__init__(deps=deps)
self.label_encoder = LabelEncoder()... | {"golden_diff": "diff --git a/lightwood/analysis/helpers/shap.py b/lightwood/analysis/helpers/shap.py\n--- a/lightwood/analysis/helpers/shap.py\n+++ b/lightwood/analysis/helpers/shap.py\n@@ -29,6 +29,8 @@\n def __init__(self, deps: Optional[Tuple] = ...):\n super().__init__(deps=deps)\n self.label_e... | 1,807 | 653 |
gh_patches_debug_3901 | rasdani/github-patches | git_diff | carpentries__amy-646 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
API: don't return todos with unknown start
This breaks the timeline.
--- 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/api/views.py b/api/views.py
--- a/api/views.py
+++ b/api/views.py
@@ -162,4 +162,5 @@
"""Return current TODOs for currently logged in user."""
return TodoItem.objects.user(self.request.user) \
.incomplete() \
+ .exclude(due=Non... | {"golden_diff": "diff --git a/api/views.py b/api/views.py\n--- a/api/views.py\n+++ b/api/views.py\n@@ -162,4 +162,5 @@\n \"\"\"Return current TODOs for currently logged in user.\"\"\"\n return TodoItem.objects.user(self.request.user) \\\n .incomplete() \\\n+ ... | 1,754 | 83 |
gh_patches_debug_10225 | rasdani/github-patches | git_diff | wagtail__wagtail-822 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unicode content in rich text causes error
Steps to reproduce:
1. Using the wagtail interface, create a new instance of a page derived model which has a rich text field
2. In the rich text field, include unico... | diff --git a/wagtail/utils/widgets.py b/wagtail/utils/widgets.py
--- a/wagtail/utils/widgets.py
+++ b/wagtail/utils/widgets.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import, unicode_literals
+
from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
@@ -8,7 +10,7 @@
... | {"golden_diff": "diff --git a/wagtail/utils/widgets.py b/wagtail/utils/widgets.py\n--- a/wagtail/utils/widgets.py\n+++ b/wagtail/utils/widgets.py\n@@ -1,3 +1,5 @@\n+from __future__ import absolute_import, unicode_literals\n+\n from django.forms.widgets import Widget\n from django.utils.safestring import mark_safe\n \n@... | 600 | 146 |
gh_patches_debug_4403 | rasdani/github-patches | git_diff | learningequality__kolibri-5037 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Facing error while kolibri 0.12.0 deb file installation
### Observed behavior
After running below command it shows error:
**sudo dpkg -i kolibri_0.12.0b4-0ubuntu1_all.deb**
File downloaded from https://g... | diff --git a/kolibri/__init__.py b/kolibri/__init__.py
--- a/kolibri/__init__.py
+++ b/kolibri/__init__.py
@@ -15,7 +15,7 @@
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
-VERSION = (0, 12, 0, 'alpha', 0)
+VERSI... | {"golden_diff": "diff --git a/kolibri/__init__.py b/kolibri/__init__.py\n--- a/kolibri/__init__.py\n+++ b/kolibri/__init__.py\n@@ -15,7 +15,7 @@\n \n #: This may not be the exact version as it's subject to modification with\n #: get_version() - use ``kolibri.__version__`` for the exact version string.\n-VERSION = (0, 1... | 766 | 146 |
gh_patches_debug_21066 | rasdani/github-patches | git_diff | googleapis__google-auth-library-python-1428 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
deprecation notice for 3.7 modifies global state (user warning filters) as import side-effect
It is impossible to filter Python37DeprecationWarning after PR https://github.com/googleapis/google-auth-library-p... | diff --git a/google/auth/__init__.py b/google/auth/__init__.py
--- a/google/auth/__init__.py
+++ b/google/auth/__init__.py
@@ -49,9 +49,6 @@
"for Python 3.7. More details about Python 3.7 support "
"can be found at https://cloud.google.com/python/docs/python37-sunset/"
)
-
- # Configure the Py... | {"golden_diff": "diff --git a/google/auth/__init__.py b/google/auth/__init__.py\n--- a/google/auth/__init__.py\n+++ b/google/auth/__init__.py\n@@ -49,9 +49,6 @@\n \"for Python 3.7. More details about Python 3.7 support \"\n \"can be found at https://cloud.google.com/python/docs/python37-sunset/\"\n ... | 1,578 | 296 |
gh_patches_debug_7882 | rasdani/github-patches | git_diff | numpy__numpy-15189 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TST: Add the first test using hypothesis
This pull request adds the first test that uses hypothesis and hence brings in hypothesis as an additional test dependency.
@mattip Could you take a look at this pl... | diff --git a/numpy/conftest.py b/numpy/conftest.py
--- a/numpy/conftest.py
+++ b/numpy/conftest.py
@@ -3,6 +3,7 @@
"""
import os
+import hypothesis
import pytest
import numpy
@@ -12,6 +13,12 @@
_old_fpu_mode = None
_collect_results = {}
+# See https://hypothesis.readthedocs.io/en/latest/settings.html
+hypot... | {"golden_diff": "diff --git a/numpy/conftest.py b/numpy/conftest.py\n--- a/numpy/conftest.py\n+++ b/numpy/conftest.py\n@@ -3,6 +3,7 @@\n \"\"\"\n import os\n \n+import hypothesis\n import pytest\n import numpy\n \n@@ -12,6 +13,12 @@\n _old_fpu_mode = None\n _collect_results = {}\n \n+# See https://hypothesis.readthedoc... | 1,062 | 153 |
gh_patches_debug_9956 | rasdani/github-patches | git_diff | iterative__dvc-8823 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dvc repro: Tuples in parameters are always marked as modified
# Bug Report
<!--
## Issue name
Issue names must follow the pattern `command: description` where the command is the dvc command that you ar... | diff --git a/dvc/dependency/param.py b/dvc/dependency/param.py
--- a/dvc/dependency/param.py
+++ b/dvc/dependency/param.py
@@ -125,9 +125,14 @@
elif param not in info:
st = "new"
elif actual[param] != info[param]:
- st = "modified"
+ if (
+ ... | {"golden_diff": "diff --git a/dvc/dependency/param.py b/dvc/dependency/param.py\n--- a/dvc/dependency/param.py\n+++ b/dvc/dependency/param.py\n@@ -125,9 +125,14 @@\n elif param not in info:\n st = \"new\"\n elif actual[param] != info[param]:\n- st = \"modified\"\n+... | 1,941 | 151 |
gh_patches_debug_5546 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-5695 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
mitmdump jumps to 100% CPU when parent process exits
#### Problem Description
It took me two days to make this reproduce in isolation. I hope someone with Python skills can figure out what is happening her... | diff --git a/mitmproxy/addons/termlog.py b/mitmproxy/addons/termlog.py
--- a/mitmproxy/addons/termlog.py
+++ b/mitmproxy/addons/termlog.py
@@ -51,7 +51,9 @@
self.formatter = log.MitmFormatter(self.has_vt_codes)
def emit(self, record: logging.LogRecord) -> None:
- print(
- self.format(r... | {"golden_diff": "diff --git a/mitmproxy/addons/termlog.py b/mitmproxy/addons/termlog.py\n--- a/mitmproxy/addons/termlog.py\n+++ b/mitmproxy/addons/termlog.py\n@@ -51,7 +51,9 @@\n self.formatter = log.MitmFormatter(self.has_vt_codes)\n \n def emit(self, record: logging.LogRecord) -> None:\n- print(\n-... | 1,587 | 167 |
gh_patches_debug_27961 | rasdani/github-patches | git_diff | sunpy__sunpy-6926 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add a "How do I..." page to our documentation
<!--
We know asking good questions takes effort, and we appreciate your time.
Thank you.
Please be aware that everyone has to follow our code of conduct:
ht... | diff --git a/examples/acquiring_data/searching_multiple_wavelengths.py b/examples/acquiring_data/searching_multiple_wavelengths.py
deleted file mode 100644
--- a/examples/acquiring_data/searching_multiple_wavelengths.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-==============================================
-Searching for m... | {"golden_diff": "diff --git a/examples/acquiring_data/searching_multiple_wavelengths.py b/examples/acquiring_data/searching_multiple_wavelengths.py\ndeleted file mode 100644\n--- a/examples/acquiring_data/searching_multiple_wavelengths.py\n+++ /dev/null\n@@ -1,44 +0,0 @@\n-\"\"\"\n-=====================================... | 974 | 551 |
gh_patches_debug_1057 | rasdani/github-patches | git_diff | StackStorm__st2-5091 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
St2Stream service broken when using SSL with mongodb
## SUMMARY
This issue is an extension to #4832 however this time it is the st2stream service, I have looked that the code and can see the same monkey pa... | diff --git a/st2stream/st2stream/cmd/api.py b/st2stream/st2stream/cmd/api.py
--- a/st2stream/st2stream/cmd/api.py
+++ b/st2stream/st2stream/cmd/api.py
@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from st2common.util.monkey_patch import mon... | {"golden_diff": "diff --git a/st2stream/st2stream/cmd/api.py b/st2stream/st2stream/cmd/api.py\n--- a/st2stream/st2stream/cmd/api.py\n+++ b/st2stream/st2stream/cmd/api.py\n@@ -13,6 +13,9 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+from st2common.util... | 1,590 | 103 |
gh_patches_debug_8235 | rasdani/github-patches | git_diff | googleapis__google-api-python-client-1824 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
google-api-python-client 2.6.0, 2.7.0, 2.8.0, 2.9.0 cannot work with google-auth 1.18.0 and earlier
These versions of `google-api-python-client` requires `google-auth>=1.16.0,<2dev`. However, some of the code... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@
# NOTE: Maintainers, please do not require google-auth>=2.x.x
# Until this issue is closed
# https://github.com/googleapis/google-cloud-python/issues/10566
- "google-auth>=1.16.0,<3.0.0dev",
+ "google-auth>=1.19.0,<3.0... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,7 +37,7 @@\n # NOTE: Maintainers, please do not require google-auth>=2.x.x\n # Until this issue is closed\n # https://github.com/googleapis/google-cloud-python/issues/10566\n- \"google-auth>=1.16.0,<3.0.0dev\",\n+ ... | 1,852 | 159 |
gh_patches_debug_11914 | rasdani/github-patches | git_diff | pytorch__ignite-2984 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix warning in fast_neural_style example
Here is another good first issue to improve the ignite project. Currently, we have a warning on this line: https://github.com/pytorch/ignite/blob/master/examples/fast_... | diff --git a/examples/fast_neural_style/vgg.py b/examples/fast_neural_style/vgg.py
--- a/examples/fast_neural_style/vgg.py
+++ b/examples/fast_neural_style/vgg.py
@@ -2,12 +2,13 @@
import torch
from torchvision import models
+from torchvision.models.vgg import VGG16_Weights
class Vgg16(torch.nn.Module):
d... | {"golden_diff": "diff --git a/examples/fast_neural_style/vgg.py b/examples/fast_neural_style/vgg.py\n--- a/examples/fast_neural_style/vgg.py\n+++ b/examples/fast_neural_style/vgg.py\n@@ -2,12 +2,13 @@\n \n import torch\n from torchvision import models\n+from torchvision.models.vgg import VGG16_Weights\n \n \n class Vgg... | 955 | 189 |
gh_patches_debug_4532 | rasdani/github-patches | git_diff | huggingface__dataset-viewer-2789 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Truncate all the logs
We sometimes have very big logs (one row > 5MB). It's not useful at all and triggers warnings from infra. When we setup the logs configuration, we could try to set a maximum length
ht... | diff --git a/libs/libcommon/src/libcommon/log.py b/libs/libcommon/src/libcommon/log.py
--- a/libs/libcommon/src/libcommon/log.py
+++ b/libs/libcommon/src/libcommon/log.py
@@ -5,5 +5,5 @@
def init_logging(level: int = logging.INFO) -> None:
- logging.basicConfig(level=level, format="%(levelname)s: %(asctime)s - ... | {"golden_diff": "diff --git a/libs/libcommon/src/libcommon/log.py b/libs/libcommon/src/libcommon/log.py\n--- a/libs/libcommon/src/libcommon/log.py\n+++ b/libs/libcommon/src/libcommon/log.py\n@@ -5,5 +5,5 @@\n \n \n def init_logging(level: int = logging.INFO) -> None:\n- logging.basicConfig(level=level, format=\"%(le... | 477 | 148 |
gh_patches_debug_23578 | rasdani/github-patches | git_diff | Flexget__Flexget-2271 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Kodi API has been changed in v18 (Leia) such that HTTP POST is required
<!---
Before opening an issue, verify:
- Is this a feature request? Post it on https://feathub.com/Flexget/Flexget
- Did you recent... | diff --git a/flexget/plugins/services/kodi_library.py b/flexget/plugins/services/kodi_library.py
--- a/flexget/plugins/services/kodi_library.py
+++ b/flexget/plugins/services/kodi_library.py
@@ -38,14 +38,13 @@
url = base_url + JSON_URI
# create the params
- json_params = {"id": 1... | {"golden_diff": "diff --git a/flexget/plugins/services/kodi_library.py b/flexget/plugins/services/kodi_library.py\n--- a/flexget/plugins/services/kodi_library.py\n+++ b/flexget/plugins/services/kodi_library.py\n@@ -38,14 +38,13 @@\n \n url = base_url + JSON_URI\n # create the params\n- ... | 1,531 | 297 |
gh_patches_debug_17345 | rasdani/github-patches | git_diff | RedHatInsights__insights-core-3074 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The smt combiner is raising IndexError exceptions in production.
The CpuTopology combiner is throwing a large number of the exception IndexError('list index out of range',) in production.
--- END ISSUE ---
... | diff --git a/insights/combiners/smt.py b/insights/combiners/smt.py
--- a/insights/combiners/smt.py
+++ b/insights/combiners/smt.py
@@ -43,7 +43,13 @@
max_cpu_core_id = max([core.core_id for core in cpu_online])
for n in range(max_cpu_core_id + 1):
online = [core for core in cpu_online if ... | {"golden_diff": "diff --git a/insights/combiners/smt.py b/insights/combiners/smt.py\n--- a/insights/combiners/smt.py\n+++ b/insights/combiners/smt.py\n@@ -43,7 +43,13 @@\n max_cpu_core_id = max([core.core_id for core in cpu_online])\n for n in range(max_cpu_core_id + 1):\n online = [core for... | 1,094 | 247 |
gh_patches_debug_39470 | rasdani/github-patches | git_diff | microsoft__onnxscript-120 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set up linters for the project
It helps if we set up linters early in the development process (less big PRs for fixes in the future). We may consider: mypy, pylint, black, isort, pydocstyle, flake8, bandit an... | diff --git a/onnxscript/__init__.py b/onnxscript/__init__.py
--- a/onnxscript/__init__.py
+++ b/onnxscript/__init__.py
@@ -3,9 +3,22 @@
# Licensed under the MIT License.
# --------------------------------------------------------------------------
-__version__ = '0.1'
-
+import sys
from .main import script, export_... | {"golden_diff": "diff --git a/onnxscript/__init__.py b/onnxscript/__init__.py\n--- a/onnxscript/__init__.py\n+++ b/onnxscript/__init__.py\n@@ -3,9 +3,22 @@\n # Licensed under the MIT License.\n # --------------------------------------------------------------------------\n \n-__version__ = '0.1'\n-\n+import sys\n from .... | 1,011 | 844 |
gh_patches_debug_1350 | rasdani/github-patches | git_diff | fossasia__open-event-server-7659 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Preset roles deletion is allowed
**Describe the bug**
Currently the preset roles like "organizer, coorganizer etc" should not be deleted from the db. But right now it is possible to delete these entries.
... | diff --git a/app/api/roles.py b/app/api/roles.py
--- a/app/api/roles.py
+++ b/app/api/roles.py
@@ -97,5 +97,8 @@
data_layer = {
'session': db.session,
'model': Role,
- 'methods': {'before_get_object': before_get_object},
+ 'methods': {
+ 'before_get_object': before_get_ob... | {"golden_diff": "diff --git a/app/api/roles.py b/app/api/roles.py\n--- a/app/api/roles.py\n+++ b/app/api/roles.py\n@@ -97,5 +97,8 @@\n data_layer = {\n 'session': db.session,\n 'model': Role,\n- 'methods': {'before_get_object': before_get_object},\n+ 'methods': {\n+ 'before_... | 1,299 | 109 |
gh_patches_debug_7221 | rasdani/github-patches | git_diff | StackStorm__st2-3038 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cache filters API response for web UI
As the number of actions, rules, etc has grown in our StackStorm cluster, the UI is becoming slower. In particular, the filters view (which we rely on heavily with this m... | diff --git a/st2common/st2common/models/db/execution.py b/st2common/st2common/models/db/execution.py
--- a/st2common/st2common/models/db/execution.py
+++ b/st2common/st2common/models/db/execution.py
@@ -78,6 +78,11 @@
{'fields': ['end_timestamp']},
{'fields': ['status']},
{'fields... | {"golden_diff": "diff --git a/st2common/st2common/models/db/execution.py b/st2common/st2common/models/db/execution.py\n--- a/st2common/st2common/models/db/execution.py\n+++ b/st2common/st2common/models/db/execution.py\n@@ -78,6 +78,11 @@\n {'fields': ['end_timestamp']},\n {'fields': ['status']},... | 1,707 | 156 |
gh_patches_debug_946 | rasdani/github-patches | git_diff | xonsh__xonsh-2332 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
xoreutils: echo fails with KeyError: 'help'
Any `echo` invocation fails:
```shell
$ $XONSH_SHOW_TRACEBACK = True
$ echo
xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
... | diff --git a/xonsh/xoreutils/echo.py b/xonsh/xoreutils/echo.py
--- a/xonsh/xoreutils/echo.py
+++ b/xonsh/xoreutils/echo.py
@@ -17,7 +17,7 @@
def _echo_parse_args(args):
- out = {'escapes': False, 'end': '\n'}
+ out = {'escapes': False, 'end': '\n', 'help': False}
if '-e' in args:
args.remove('-... | {"golden_diff": "diff --git a/xonsh/xoreutils/echo.py b/xonsh/xoreutils/echo.py\n--- a/xonsh/xoreutils/echo.py\n+++ b/xonsh/xoreutils/echo.py\n@@ -17,7 +17,7 @@\n \n \n def _echo_parse_args(args):\n- out = {'escapes': False, 'end': '\\n'}\n+ out = {'escapes': False, 'end': '\\n', 'help': False}\n if '-e' in a... | 1,293 | 128 |
gh_patches_debug_56453 | rasdani/github-patches | git_diff | netket__netket-506 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ExactSampler is not resetting at construction time
Exact Sampler should call Reset at construction time
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these fil... | diff --git a/netket/sampler/exact_sampler.py b/netket/sampler/exact_sampler.py
--- a/netket/sampler/exact_sampler.py
+++ b/netket/sampler/exact_sampler.py
@@ -33,6 +33,7 @@
else:
self.hilbert = machine.hilbert
self._machine_pow = 2.0
+ self.reset()
def reset(self, init_rando... | {"golden_diff": "diff --git a/netket/sampler/exact_sampler.py b/netket/sampler/exact_sampler.py\n--- a/netket/sampler/exact_sampler.py\n+++ b/netket/sampler/exact_sampler.py\n@@ -33,6 +33,7 @@\n else:\n self.hilbert = machine.hilbert\n self._machine_pow = 2.0\n+ self.reset()\n \n ... | 982 | 114 |
gh_patches_debug_1487 | rasdani/github-patches | git_diff | huggingface__diffusers-1149 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Flax] 🚨 0.7.0 not working 🚨
### Describe the bug

### Reproductio... | diff --git a/src/diffusers/models/embeddings_flax.py b/src/diffusers/models/embeddings_flax.py
--- a/src/diffusers/models/embeddings_flax.py
+++ b/src/diffusers/models/embeddings_flax.py
@@ -88,4 +88,6 @@
@nn.compact
def __call__(self, timesteps):
- return get_sinusoidal_embeddings(timesteps, embeddi... | {"golden_diff": "diff --git a/src/diffusers/models/embeddings_flax.py b/src/diffusers/models/embeddings_flax.py\n--- a/src/diffusers/models/embeddings_flax.py\n+++ b/src/diffusers/models/embeddings_flax.py\n@@ -88,4 +88,6 @@\n \n @nn.compact\n def __call__(self, timesteps):\n- return get_sinusoidal_embed... | 1,458 | 137 |
gh_patches_debug_48383 | rasdani/github-patches | git_diff | DDMAL__CantusDB-900 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
we need to re-add a restart policy to docker-compose.yml
A recent change to docker-compose.yml removed the `restart: always` policy we added to our containers a couple of weeks ago. We should re-instate this.... | diff --git a/django/cantusdb_project/main_app/widgets.py b/django/cantusdb_project/main_app/widgets.py
--- a/django/cantusdb_project/main_app/widgets.py
+++ b/django/cantusdb_project/main_app/widgets.py
@@ -1,6 +1,7 @@
from django.forms.widgets import TextInput, Select, Textarea, CheckboxInput
from django.utils.safes... | {"golden_diff": "diff --git a/django/cantusdb_project/main_app/widgets.py b/django/cantusdb_project/main_app/widgets.py\n--- a/django/cantusdb_project/main_app/widgets.py\n+++ b/django/cantusdb_project/main_app/widgets.py\n@@ -1,6 +1,7 @@\n from django.forms.widgets import TextInput, Select, Textarea, CheckboxInput\n f... | 874 | 119 |
gh_patches_debug_568 | rasdani/github-patches | git_diff | pex-tool__pex-836 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.0
On the docket:
The prime motivator:
+ [x] Pex does not download foreign abi3 wheels correctly #823
Changes to support the above as well as others:
+ [x] Fix pex resolving for foreign pla... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = '2.0.3'
+__version__ = '2.1.0'
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = '2.0.3'\n+__version__ = '2.1.0'\n", "issue"... | 534 | 94 |
gh_patches_debug_16389 | rasdani/github-patches | git_diff | facebookresearch__hydra-1968 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Feature Request] submitit: add `stderr_to_stdout` ass supported by submitit
# 🚀 Feature Request
`stderr_to_stdout` option was added in submitit (not the plugin) [last year](https://github.com/facebookin... | diff --git a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/__init__.py b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/__init__.py
--- a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/__init__.py
+++ b/plugins/hydra_submitit_launcher/hydra_plugins/h... | {"golden_diff": "diff --git a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/__init__.py b/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/__init__.py\n--- a/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/__init__.py\n+++ b/plugins/hydra_submitit_launc... | 1,822 | 413 |
gh_patches_debug_13695 | rasdani/github-patches | git_diff | projectmesa__mesa-373 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow fixed seed for replication
Figure out how to best handle running a model with a fixed seed, to ensure that it will produce the same result. and implement that.
--- END ISSUE ---
Below are some code s... | diff --git a/mesa/model.py b/mesa/model.py
--- a/mesa/model.py
+++ b/mesa/model.py
@@ -7,6 +7,7 @@
"""
import datetime as dt
import random
+import numpy
class Model:
@@ -23,11 +24,14 @@
running: a bool indicating if the model should continue running
"""
+ # seed both the numpy and... | {"golden_diff": "diff --git a/mesa/model.py b/mesa/model.py\n--- a/mesa/model.py\n+++ b/mesa/model.py\n@@ -7,6 +7,7 @@\n \"\"\"\n import datetime as dt\n import random\n+import numpy\n \n \n class Model:\n@@ -23,11 +24,14 @@\n running: a bool indicating if the model should continue running\n \n \"\"... | 588 | 145 |
gh_patches_debug_29583 | rasdani/github-patches | git_diff | Parsl__parsl-2301 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove IPyParallel executor
**Is your feature request related to a problem? Please describe.**
The parsl ipp code isn't really maintained any more. As I try to tidy up some stuff in the test suite I find mys... | diff --git a/parsl/executors/__init__.py b/parsl/executors/__init__.py
--- a/parsl/executors/__init__.py
+++ b/parsl/executors/__init__.py
@@ -1,13 +1,11 @@
from parsl.executors.threads import ThreadPoolExecutor
-from parsl.executors.ipp import IPyParallelExecutor
from parsl.executors.workqueue.executor import WorkQu... | {"golden_diff": "diff --git a/parsl/executors/__init__.py b/parsl/executors/__init__.py\n--- a/parsl/executors/__init__.py\n+++ b/parsl/executors/__init__.py\n@@ -1,13 +1,11 @@\n from parsl.executors.threads import ThreadPoolExecutor\n-from parsl.executors.ipp import IPyParallelExecutor\n from parsl.executors.workqueue... | 904 | 516 |
gh_patches_debug_15651 | rasdani/github-patches | git_diff | explosion__spaCy-1389 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lemmatizer exceptions: `lemma_strings` get sorted anyway
Lemmatization exceptions have been working inconsistently, even when they are added directly in `corpora/en/wordnet/dict/verb.exc`
The minimal test ... | diff --git a/spacy/lemmatizer.py b/spacy/lemmatizer.py
--- a/spacy/lemmatizer.py
+++ b/spacy/lemmatizer.py
@@ -78,15 +78,16 @@
# forms.append(string)
forms.extend(exceptions.get(string, []))
oov_forms = []
- for old, new in rules:
- if string.endswith(old):
- form = string[:len(st... | {"golden_diff": "diff --git a/spacy/lemmatizer.py b/spacy/lemmatizer.py\n--- a/spacy/lemmatizer.py\n+++ b/spacy/lemmatizer.py\n@@ -78,15 +78,16 @@\n # forms.append(string)\n forms.extend(exceptions.get(string, []))\n oov_forms = []\n- for old, new in rules:\n- if string.endswith(old):\n- ... | 1,504 | 244 |
gh_patches_debug_5114 | rasdani/github-patches | git_diff | pre-commit__pre-commit-177 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Stashed changes lost if hook fails
I've run into this particular (in my eyes, critical) bug.
If I want to do a partial commit, e.g. I have 2 files but I only add 1 file to the staging area and the staged file... | diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py
--- a/pre_commit/staged_files_only.py
+++ b/pre_commit/staged_files_only.py
@@ -21,7 +21,10 @@
"""
# Determine if there are unstaged files
retcode, diff_stdout_binary, _ = cmd_runner.run(
- ['git', 'diff', '--ignore-sub... | {"golden_diff": "diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py\n--- a/pre_commit/staged_files_only.py\n+++ b/pre_commit/staged_files_only.py\n@@ -21,7 +21,10 @@\n \"\"\"\n # Determine if there are unstaged files\n retcode, diff_stdout_binary, _ = cmd_runner.run(\n- ['... | 1,965 | 142 |
gh_patches_debug_1628 | rasdani/github-patches | git_diff | apache__tvm-12178 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Exercise TVM under minimal configuration in CI
We have seen a couple bugs due to microTVM being presumed-ON in config.cmake. Namely, you get python errors importing TVM right now when USE_MICRO is OFF. We sho... | diff --git a/ci/jenkins/generate.py b/ci/jenkins/generate.py
--- a/ci/jenkins/generate.py
+++ b/ci/jenkins/generate.py
@@ -40,6 +40,10 @@
"name": "ci_cpu",
"platform": "CPU",
},
+ {
+ "name": "ci_minimal",
+ "platform": "CPU",
+ },
{
... | {"golden_diff": "diff --git a/ci/jenkins/generate.py b/ci/jenkins/generate.py\n--- a/ci/jenkins/generate.py\n+++ b/ci/jenkins/generate.py\n@@ -40,6 +40,10 @@\n \"name\": \"ci_cpu\",\n \"platform\": \"CPU\",\n },\n+ {\n+ \"name\": \"ci_minimal\",\n+ \"platform... | 1,556 | 111 |
gh_patches_debug_19824 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-899 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make private project setting more clear
Currently the checkbox is kind of hidden and it is not instantly clear what is meant by "Access to Project". The setting should be more obvious and it's consequences mo... | diff --git a/meinberlin/apps/dashboard2/forms.py b/meinberlin/apps/dashboard2/forms.py
--- a/meinberlin/apps/dashboard2/forms.py
+++ b/meinberlin/apps/dashboard2/forms.py
@@ -1,5 +1,6 @@
from django import forms
from django.contrib.auth import get_user_model
+from django.forms import RadioSelect
from django.forms im... | {"golden_diff": "diff --git a/meinberlin/apps/dashboard2/forms.py b/meinberlin/apps/dashboard2/forms.py\n--- a/meinberlin/apps/dashboard2/forms.py\n+++ b/meinberlin/apps/dashboard2/forms.py\n@@ -1,5 +1,6 @@\n from django import forms\n from django.contrib.auth import get_user_model\n+from django.forms import RadioSelec... | 1,801 | 226 |
gh_patches_debug_26793 | rasdani/github-patches | git_diff | pulp__pulpcore-5196 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Overwriting existing packages in backend storage can lead to caching issues
If an existing package is re-added to pulp, the default behavior will overwrite the existing file in backing storage. This is typica... | diff --git a/pulpcore/plugin/viewsets/content.py b/pulpcore/plugin/viewsets/content.py
--- a/pulpcore/plugin/viewsets/content.py
+++ b/pulpcore/plugin/viewsets/content.py
@@ -133,18 +133,20 @@
# in the upload code path make sure, the artifact exists, and the 'file'
# parameter is replaced by '... | {"golden_diff": "diff --git a/pulpcore/plugin/viewsets/content.py b/pulpcore/plugin/viewsets/content.py\n--- a/pulpcore/plugin/viewsets/content.py\n+++ b/pulpcore/plugin/viewsets/content.py\n@@ -133,18 +133,20 @@\n # in the upload code path make sure, the artifact exists, and the 'file'\n # para... | 2,008 | 286 |
gh_patches_debug_977 | rasdani/github-patches | git_diff | medtagger__MedTagger-442 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Getting random scan for non-existing task key results in 500
## Current Behavior
Providing non existing task key results in 500 HTTP code.
## Expected Behavior
Backend should handle this situation ap... | diff --git a/backend/medtagger/repositories/tasks.py b/backend/medtagger/repositories/tasks.py
--- a/backend/medtagger/repositories/tasks.py
+++ b/backend/medtagger/repositories/tasks.py
@@ -21,7 +21,7 @@
:return: Task object
"""
with db_session() as session:
- task = session.query(Task).filter(Ta... | {"golden_diff": "diff --git a/backend/medtagger/repositories/tasks.py b/backend/medtagger/repositories/tasks.py\n--- a/backend/medtagger/repositories/tasks.py\n+++ b/backend/medtagger/repositories/tasks.py\n@@ -21,7 +21,7 @@\n :return: Task object\n \"\"\"\n with db_session() as session:\n- task = se... | 1,444 | 113 |
gh_patches_debug_471 | rasdani/github-patches | git_diff | pytorch__rl-402 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Loggers registration
## Describe the bug
The [`__init__.py`](https://github.com/facebookresearch/rl/blob/main/torchrl/trainers/loggers/__init__.py) from loggers does not reference the implemented log... | diff --git a/torchrl/trainers/loggers/__init__.py b/torchrl/trainers/loggers/__init__.py
--- a/torchrl/trainers/loggers/__init__.py
+++ b/torchrl/trainers/loggers/__init__.py
@@ -4,3 +4,6 @@
# LICENSE file in the root directory of this source tree.
from .common import Logger
+from .csv import CSVLogger
+from .tenso... | {"golden_diff": "diff --git a/torchrl/trainers/loggers/__init__.py b/torchrl/trainers/loggers/__init__.py\n--- a/torchrl/trainers/loggers/__init__.py\n+++ b/torchrl/trainers/loggers/__init__.py\n@@ -4,3 +4,6 @@\n # LICENSE file in the root directory of this source tree.\n \n from .common import Logger\n+from .csv impor... | 451 | 113 |
gh_patches_debug_16425 | rasdani/github-patches | git_diff | pantsbuild__pants-15979 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`./pants run` crashes when `remote_cache_eager_fetch = false`
**Describe the bug**
After setting `remote_cache_eager_fetch = false`, a CI step that `./pants run`s a `pex_binary` has started (intermittently... | diff --git a/src/python/pants/base/exceptions.py b/src/python/pants/base/exceptions.py
--- a/src/python/pants/base/exceptions.py
+++ b/src/python/pants/base/exceptions.py
@@ -3,6 +3,11 @@
from __future__ import annotations
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from pants.engine.internals.nati... | {"golden_diff": "diff --git a/src/python/pants/base/exceptions.py b/src/python/pants/base/exceptions.py\n--- a/src/python/pants/base/exceptions.py\n+++ b/src/python/pants/base/exceptions.py\n@@ -3,6 +3,11 @@\n \n from __future__ import annotations\n \n+from typing import TYPE_CHECKING\n+\n+if TYPE_CHECKING:\n+ from ... | 942 | 243 |
gh_patches_debug_2986 | rasdani/github-patches | git_diff | coala__coala-3908 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fail to install and py.test on docker environment.
<!-- Hello! If you're filing a bug, please include every step so as to help us reproduce it on our machines. If you're unsure about how to file an issue, use... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,10 @@
from coalib.misc.BuildManPage import BuildManPage
try:
- locale.getlocale()
+ lc = locale.getlocale()
+ pf = platform.system()
+ if pf != 'Windows' and lc == (None, None):
+ locale.setlocale(locale.LC_ALL, 'C.UTF-8'... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -15,7 +15,10 @@\n from coalib.misc.BuildManPage import BuildManPage\n \n try:\n- locale.getlocale()\n+ lc = locale.getlocale()\n+ pf = platform.system()\n+ if pf != 'Windows' and lc == (None, None):\n+ locale.setloc... | 1,853 | 124 |
gh_patches_debug_20763 | rasdani/github-patches | git_diff | nv-legate__cunumeric-278 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add some missing array methods
A few numpy array methods were discovered to be missing:
```
"loads",
"mafromtxt",
"matmul",
"ndfromtxt",
... | diff --git a/docs/cunumeric/source/comparison/_comparison_generator.py b/docs/cunumeric/source/comparison/_comparison_generator.py
--- a/docs/cunumeric/source/comparison/_comparison_generator.py
+++ b/docs/cunumeric/source/comparison/_comparison_generator.py
@@ -15,11 +15,8 @@
"fastCopyAndTranspose",
"get_arr... | {"golden_diff": "diff --git a/docs/cunumeric/source/comparison/_comparison_generator.py b/docs/cunumeric/source/comparison/_comparison_generator.py\n--- a/docs/cunumeric/source/comparison/_comparison_generator.py\n+++ b/docs/cunumeric/source/comparison/_comparison_generator.py\n@@ -15,11 +15,8 @@\n \"fastCopyAndTra... | 1,970 | 294 |
gh_patches_debug_2672 | rasdani/github-patches | git_diff | e-valuation__EvaP-1666 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make Typescript code Prettier
We should add automated formatting for our typescript files. I think https://prettier.io/ is pretty good, but the choice is open for discussion. The formatting should be done in ... | diff --git a/evap/evaluation/management/commands/format.py b/evap/evaluation/management/commands/format.py
--- a/evap/evaluation/management/commands/format.py
+++ b/evap/evaluation/management/commands/format.py
@@ -11,3 +11,4 @@
def handle(self, *args, **options):
subprocess.run(["black", "evap"], check=F... | {"golden_diff": "diff --git a/evap/evaluation/management/commands/format.py b/evap/evaluation/management/commands/format.py\n--- a/evap/evaluation/management/commands/format.py\n+++ b/evap/evaluation/management/commands/format.py\n@@ -11,3 +11,4 @@\n def handle(self, *args, **options):\n subprocess.run([\"b... | 432 | 145 |
gh_patches_debug_29734 | rasdani/github-patches | git_diff | bridgecrewio__checkov-3007 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CKV_AZURE_116 fails with Terraform Azure provider >= v.2.97.0
**Describe the issue**
This issue is regarding CKV_AZURE_116.
Since v2.97.0 of the Azure Terraform provider, the Azure policies add-on is enable... | diff --git a/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py b/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py
--- a/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py
+++ b/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py
@@ -1,8 +1,10 @@
... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py b/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py\n--- a/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py\n+++ b/checkov/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.p... | 660 | 509 |
gh_patches_debug_15245 | rasdani/github-patches | git_diff | kornia__kornia-2232 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cleanup on setup metadata
_Originally posted by @johnnv1 in https://github.com/kornia/kornia/pull/2225#discussion_r1117693700_
-----
right now I think we have some deadlines in the setup, for example:
... | diff --git a/kornia/__init__.py b/kornia/__init__.py
--- a/kornia/__init__.py
+++ b/kornia/__init__.py
@@ -13,11 +13,4 @@
from kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image
# Version variable
-import sys
-
-if sys.version_info >= (3, 8): # pragma: >=3.8 cover
- import... | {"golden_diff": "diff --git a/kornia/__init__.py b/kornia/__init__.py\n--- a/kornia/__init__.py\n+++ b/kornia/__init__.py\n@@ -13,11 +13,4 @@\n from kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image\n \n # Version variable\n-import sys\n-\n-if sys.version_info >= (3, 8): # pragm... | 1,284 | 265 |
gh_patches_debug_20585 | rasdani/github-patches | git_diff | e-valuation__EvaP-794 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deal with update.sh
update.sh is out of date. We can either
- remove it
- update it
- replace it with something else
having a script would be pretty cool to document what needs to be done when updating a pro... | diff --git a/evap/evaluation/management/commands/refresh_results_cache.py b/evap/evaluation/management/commands/refresh_results_cache.py
--- a/evap/evaluation/management/commands/refresh_results_cache.py
+++ b/evap/evaluation/management/commands/refresh_results_cache.py
@@ -1,4 +1,5 @@
from django.core.management.base... | {"golden_diff": "diff --git a/evap/evaluation/management/commands/refresh_results_cache.py b/evap/evaluation/management/commands/refresh_results_cache.py\n--- a/evap/evaluation/management/commands/refresh_results_cache.py\n+++ b/evap/evaluation/management/commands/refresh_results_cache.py\n@@ -1,4 +1,5 @@\n from django... | 637 | 257 |
gh_patches_debug_3099 | rasdani/github-patches | git_diff | MongoEngine__mongoengine-2431 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Version restriction on pillow
Do we still need to restrict pillow to less then 7.0.0? This looks to have been implemented because of python2 support, which mongoengine dropped with version 0.20.0
https://g... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -115,7 +115,7 @@
"pytest-cov",
"coverage<5.0", # recent coverage switched to sqlite format for the .coverage file which isn't handled properly by coveralls
"blinker",
- "Pillow>=2.0.0, <7.0.0", # 7.0.0 dropped Python2 ... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -115,7 +115,7 @@\n \"pytest-cov\",\n \"coverage<5.0\", # recent coverage switched to sqlite format for the .coverage file which isn't handled properly by coveralls\n \"blinker\",\n- \"Pillow>=2.0.0, <7.... | 1,969 | 122 |
gh_patches_debug_14107 | rasdani/github-patches | git_diff | spack__spack-17427 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Errors untaring source tarballs Docker
Some source tarballs are created in a way that tries to preserve user and group perms.
Yes, it's a bad to create a source tarball for release with these properties -- ... | diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py
--- a/lib/spack/spack/util/compression.py
+++ b/lib/spack/spack/util/compression.py
@@ -14,7 +14,7 @@
NOTAR_EXTS = ["zip", "tgz", "tbz2", "txz"]
# Add PRE_EXTS and EXTS last so that .tar.gz is matched *before* .tar or .gz
-ALLOWE... | {"golden_diff": "diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py\n--- a/lib/spack/spack/util/compression.py\n+++ b/lib/spack/spack/util/compression.py\n@@ -14,7 +14,7 @@\n NOTAR_EXTS = [\"zip\", \"tgz\", \"tbz2\", \"txz\"]\n \n # Add PRE_EXTS and EXTS last so that .tar.gz is match... | 1,194 | 227 |
gh_patches_debug_23113 | rasdani/github-patches | git_diff | sopel-irc__sopel-1848 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
xkcd outputs link even if triggered by one
The `xkcd` plugin shouldn't output a link to the comic if it was triggered by a link.
See `wikipedia`, for example. This is an anti-cycling measure in case multip... | diff --git a/sopel/modules/xkcd.py b/sopel/modules/xkcd.py
--- a/sopel/modules/xkcd.py
+++ b/sopel/modules/xkcd.py
@@ -96,7 +96,7 @@
say_result(bot, requested)
-def numbered_result(bot, query, latest):
+def numbered_result(bot, query, latest, commanded=True):
max_int = latest['num']
if query > max_in... | {"golden_diff": "diff --git a/sopel/modules/xkcd.py b/sopel/modules/xkcd.py\n--- a/sopel/modules/xkcd.py\n+++ b/sopel/modules/xkcd.py\n@@ -96,7 +96,7 @@\n say_result(bot, requested)\n \n \n-def numbered_result(bot, query, latest):\n+def numbered_result(bot, query, latest, commanded=True):\n max_int = latest['nu... | 1,636 | 324 |
gh_patches_debug_1564 | rasdani/github-patches | git_diff | python-trio__trio-1041 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
trio.Cancelled missing readable str()
Trying to print a trio.Cancelled exception e.g. with `f'{exc}'` yields an empty string. I usually resort to `type(exc)` when I need to see what's going on.
--- END ISSU... | diff --git a/trio/_core/_exceptions.py b/trio/_core/_exceptions.py
--- a/trio/_core/_exceptions.py
+++ b/trio/_core/_exceptions.py
@@ -73,6 +73,9 @@
)
super().__init__()
+ def __str__(self):
+ return "Cancelled"
+
@classmethod
def _init(cls):
"""A private constructor... | {"golden_diff": "diff --git a/trio/_core/_exceptions.py b/trio/_core/_exceptions.py\n--- a/trio/_core/_exceptions.py\n+++ b/trio/_core/_exceptions.py\n@@ -73,6 +73,9 @@\n )\n super().__init__()\n \n+ def __str__(self):\n+ return \"Cancelled\"\n+\n @classmethod\n def _init(cls):\n ... | 1,783 | 100 |
gh_patches_debug_14423 | rasdani/github-patches | git_diff | translate__pootle-4087 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Elasticsearch 1.7.0 breaks Pootle if ES not set up
With `elasticsearch==1.7.0` doing `es.ping()` on a not-setup server raises `ConnectionError`.
This breaks the default install here:
https://github.com/tran... | diff --git a/pootle/core/search/backends/elasticsearch.py b/pootle/core/search/backends/elasticsearch.py
--- a/pootle/core/search/backends/elasticsearch.py
+++ b/pootle/core/search/backends/elasticsearch.py
@@ -13,6 +13,7 @@
try:
from elasticsearch import Elasticsearch
+ from elasticsearch.exceptions import ... | {"golden_diff": "diff --git a/pootle/core/search/backends/elasticsearch.py b/pootle/core/search/backends/elasticsearch.py\n--- a/pootle/core/search/backends/elasticsearch.py\n+++ b/pootle/core/search/backends/elasticsearch.py\n@@ -13,6 +13,7 @@\n \n try:\n from elasticsearch import Elasticsearch\n+ from elastics... | 1,284 | 194 |
gh_patches_debug_199 | rasdani/github-patches | git_diff | twisted__twisted-1695 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 22.2.0
|[<img alt="adiroiban's avatar" src="https://avatars.githubusercontent.com/u/204609?s=50" width="50" height="50">](https://github.com/adiroiban)| @adiroiban reported|
|-|-|
|Trac ID|trac#10306|... | diff --git a/src/twisted/_version.py b/src/twisted/_version.py
--- a/src/twisted/_version.py
+++ b/src/twisted/_version.py
@@ -7,5 +7,5 @@
from incremental import Version
-__version__ = Version("Twisted", 22, 1, 0, post=0)
+__version__ = Version("Twisted", 22, 2, 0, post=0)
__all__ = ["__version__"]
| {"golden_diff": "diff --git a/src/twisted/_version.py b/src/twisted/_version.py\n--- a/src/twisted/_version.py\n+++ b/src/twisted/_version.py\n@@ -7,5 +7,5 @@\n \n from incremental import Version\n \n-__version__ = Version(\"Twisted\", 22, 1, 0, post=0)\n+__version__ = Version(\"Twisted\", 22, 2, 0, post=0)\n __all__ =... | 637 | 113 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.