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_6542 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-3071 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update to use new version of Hologram
As an extension of https://github.com/fishtown-analytics/hologram/issues/40 -- support Mashumaro in Hologram -- makes changes to pull in version 0.0.13 of Hologram.
---... | diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -70,7 +70,7 @@
'json-rpc>=1.12,<2',
'werkzeug>=0.15,<2.0',
'dataclasses==0.6;python_version<"3.7"',
- # 'hologram==0.0.12', # must be updated prior to release
+ 'hologram==0.0.13',
'lo... | {"golden_diff": "diff --git a/core/setup.py b/core/setup.py\n--- a/core/setup.py\n+++ b/core/setup.py\n@@ -70,7 +70,7 @@\n 'json-rpc>=1.12,<2',\n 'werkzeug>=0.15,<2.0',\n 'dataclasses==0.6;python_version<\"3.7\"',\n- # 'hologram==0.0.12', # must be updated prior to release\n+ 'holo... | 1,296 | 159 |
gh_patches_debug_25528 | rasdani/github-patches | git_diff | scrapy__scrapy-2464 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
String value for order of Scrapy component
If Scrapy component order is defined as a string, it leads to undefined behaviour on Python 2 and to the following errors on Python 3:
```
File "/usr/local/lib/pyt... | diff --git a/scrapy/utils/conf.py b/scrapy/utils/conf.py
--- a/scrapy/utils/conf.py
+++ b/scrapy/utils/conf.py
@@ -1,5 +1,6 @@
import os
import sys
+import numbers
from operator import itemgetter
import six
@@ -34,6 +35,13 @@
_check_components(compdict)
return {convert(k): v for k, v in ... | {"golden_diff": "diff --git a/scrapy/utils/conf.py b/scrapy/utils/conf.py\n--- a/scrapy/utils/conf.py\n+++ b/scrapy/utils/conf.py\n@@ -1,5 +1,6 @@\n import os\n import sys\n+import numbers\n from operator import itemgetter\n \n import six\n@@ -34,6 +35,13 @@\n _check_components(compdict)\n retur... | 1,544 | 285 |
gh_patches_debug_26341 | rasdani/github-patches | git_diff | freqtrade__freqtrade-1896 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
--help produces traceback
Seems I broke it somehow.
`python3 freqtrade hyperopt --help`
produces traceback
```
Fatal exception!
Traceback (most recent call last):
File "/home/user/freqtrade-wrk/git... | diff --git a/freqtrade/main.py b/freqtrade/main.py
--- a/freqtrade/main.py
+++ b/freqtrade/main.py
@@ -12,7 +12,7 @@
# flake8: noqa E402
import logging
from argparse import Namespace
-from typing import List
+from typing import Any, List
from freqtrade import OperationalException
from freqtrade.arguments import ... | {"golden_diff": "diff --git a/freqtrade/main.py b/freqtrade/main.py\n--- a/freqtrade/main.py\n+++ b/freqtrade/main.py\n@@ -12,7 +12,7 @@\n # flake8: noqa E402\n import logging\n from argparse import Namespace\n-from typing import List\n+from typing import Any, List\n \n from freqtrade import OperationalException\n from... | 1,410 | 280 |
gh_patches_debug_31268 | rasdani/github-patches | git_diff | kornia__kornia-2131 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Weird behavior of LongestMaxSize
### Describe the bug
Hello me again,
I might be doing something wrong with the way I use kornia augmentations, please let me know if it is the case.
I was expecting `... | diff --git a/kornia/augmentation/random_generator/_2d/resize.py b/kornia/augmentation/random_generator/_2d/resize.py
--- a/kornia/augmentation/random_generator/_2d/resize.py
+++ b/kornia/augmentation/random_generator/_2d/resize.py
@@ -66,25 +66,27 @@
if isinstance(self.output_size, int):
aspect_... | {"golden_diff": "diff --git a/kornia/augmentation/random_generator/_2d/resize.py b/kornia/augmentation/random_generator/_2d/resize.py\n--- a/kornia/augmentation/random_generator/_2d/resize.py\n+++ b/kornia/augmentation/random_generator/_2d/resize.py\n@@ -66,25 +66,27 @@\n \n if isinstance(self.output_size, int)... | 1,824 | 543 |
gh_patches_debug_39944 | rasdani/github-patches | git_diff | cobbler__cobbler-2919 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Security: Stabalize the MongoDB serializer
### Describe the bug
This is the upstream bug report for SUSE/spacewalk#16737 which is a mirror issue of an internal Bugzilla issue.
Copied from the Bugzilla c... | diff --git a/cobbler/modules/serializers/mongodb.py b/cobbler/modules/serializers/mongodb.py
--- a/cobbler/modules/serializers/mongodb.py
+++ b/cobbler/modules/serializers/mongodb.py
@@ -21,7 +21,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
"""
-
+import configparser
+import pat... | {"golden_diff": "diff --git a/cobbler/modules/serializers/mongodb.py b/cobbler/modules/serializers/mongodb.py\n--- a/cobbler/modules/serializers/mongodb.py\n+++ b/cobbler/modules/serializers/mongodb.py\n@@ -21,7 +21,8 @@\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n 02110-1301 USA\n \"\"\"\n-\n+imp... | 1,931 | 715 |
gh_patches_debug_37710 | rasdani/github-patches | git_diff | localstack__localstack-4575 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bug: State Machine references don't get resolved properly
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
Lambda refs get lost
### Expected Behavior... | diff --git a/localstack/services/cloudformation/models/stepfunctions.py b/localstack/services/cloudformation/models/stepfunctions.py
--- a/localstack/services/cloudformation/models/stepfunctions.py
+++ b/localstack/services/cloudformation/models/stepfunctions.py
@@ -1,3 +1,6 @@
+import re
+from typing import Dict
+
fr... | {"golden_diff": "diff --git a/localstack/services/cloudformation/models/stepfunctions.py b/localstack/services/cloudformation/models/stepfunctions.py\n--- a/localstack/services/cloudformation/models/stepfunctions.py\n+++ b/localstack/services/cloudformation/models/stepfunctions.py\n@@ -1,3 +1,6 @@\n+import re\n+from ty... | 1,533 | 654 |
gh_patches_debug_19491 | rasdani/github-patches | git_diff | sunpy__sunpy-5493 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix CROTA keyword in EUI maps
Currently EUI maps have a `CROTA` keyword, which by the FITS standard should really be a `CROTA2` keyword. This results in the warning
```python
/home/docs/checkouts/readthedoc... | diff --git a/sunpy/map/sources/solo.py b/sunpy/map/sources/solo.py
--- a/sunpy/map/sources/solo.py
+++ b/sunpy/map/sources/solo.py
@@ -5,6 +5,7 @@
from astropy.coordinates import CartesianRepresentation
from astropy.visualization import ImageNormalize, LinearStretch
+from sunpy import log
from sunpy.coordinates im... | {"golden_diff": "diff --git a/sunpy/map/sources/solo.py b/sunpy/map/sources/solo.py\n--- a/sunpy/map/sources/solo.py\n+++ b/sunpy/map/sources/solo.py\n@@ -5,6 +5,7 @@\n from astropy.coordinates import CartesianRepresentation\n from astropy.visualization import ImageNormalize, LinearStretch\n \n+from sunpy import log\n ... | 1,344 | 233 |
gh_patches_debug_10058 | rasdani/github-patches | git_diff | docker__docker-py-1972 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build context (.tar) is not prepared properly
Hey,
This morning I've updated to version `3.1.1` however, using this version i'm getting wired error from docker-engine build:
```
ERROR: Error processing t... | diff --git a/docker/utils/build.py b/docker/utils/build.py
--- a/docker/utils/build.py
+++ b/docker/utils/build.py
@@ -93,7 +93,7 @@
# Whether this file is implicitely included / excluded.
matched = default if hit is None else hit
sub = list(filter(lambda p: p[1], sub))
- if os.path.is... | {"golden_diff": "diff --git a/docker/utils/build.py b/docker/utils/build.py\n--- a/docker/utils/build.py\n+++ b/docker/utils/build.py\n@@ -93,7 +93,7 @@\n # Whether this file is implicitely included / excluded.\n matched = default if hit is None else hit\n sub = list(filter(lambda p: p[1], sub))... | 1,713 | 139 |
gh_patches_debug_742 | rasdani/github-patches | git_diff | streamlink__streamlink-3952 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add lxml dependency
### Checklist
- [X] This is a feature request and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRI... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -12,6 +12,7 @@
deps = [
"requests>=2.26.0,<3.0",
"isodate",
+ "lxml>=4.6.3",
"websocket-client>=0.58.0",
# Support for SOCKS proxies
"PySocks!=1.5.7,>=1.5.6",
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -12,6 +12,7 @@\n deps = [\n \"requests>=2.26.0,<3.0\",\n \"isodate\",\n+ \"lxml>=4.6.3\",\n \"websocket-client>=0.58.0\",\n # Support for SOCKS proxies\n \"PySocks!=1.5.7,>=1.5.6\",\n", "issue": "Add lxml depend... | 2,015 | 106 |
gh_patches_debug_5701 | rasdani/github-patches | git_diff | getpelican__pelican-3094 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
A dead link on PyPI for the contributions and feedback
I just stumbled upon [Pelican's page in PyPI](https://pypi.org/project/pelican/) and found that the l[ink for the contributions and feedback](https://pyp... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -25,6 +25,13 @@
README = open('README.rst', encoding='utf-8').read()
CHANGELOG = open('docs/changelog.rst', encoding='utf-8').read()
+# Relative links in the README must be converted to absolute URL's
+# so that they render correctly on PyPI.
+README... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -25,6 +25,13 @@\n README = open('README.rst', encoding='utf-8').read()\n CHANGELOG = open('docs/changelog.rst', encoding='utf-8').read()\n \n+# Relative links in the README must be converted to absolute URL's\n+# so that they render c... | 1,194 | 143 |
gh_patches_debug_5379 | rasdani/github-patches | git_diff | cltk__cltk-399 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Compile Poeti d’Italia for CLTK
http://www.mqdq.it/mqdq/poetiditalia/indice_autori_alfa.jsp?scelta=AZ&path=metri_opere
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more... | diff --git a/cltk/corpus/latin/corpora.py b/cltk/corpus/latin/corpora.py
--- a/cltk/corpus/latin/corpora.py
+++ b/cltk/corpus/latin/corpora.py
@@ -88,5 +88,9 @@
{'location': 'remote',
'type': 'text',
'name': 'latin_text_corpus_grammaticorum_latinorum',
- 'origin': 'https://github.com/cltk/latin_te... | {"golden_diff": "diff --git a/cltk/corpus/latin/corpora.py b/cltk/corpus/latin/corpora.py\n--- a/cltk/corpus/latin/corpora.py\n+++ b/cltk/corpus/latin/corpora.py\n@@ -88,5 +88,9 @@\n {'location': 'remote',\n 'type': 'text',\n 'name': 'latin_text_corpus_grammaticorum_latinorum',\n- 'origin': 'https://... | 1,409 | 201 |
gh_patches_debug_9824 | rasdani/github-patches | git_diff | coala__coala-1585 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DefaultArgParser: Fix spelling mistake
Change analaysis on line 30 to analysis
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BE... | diff --git a/coalib/parsing/DefaultArgParser.py b/coalib/parsing/DefaultArgParser.py
--- a/coalib/parsing/DefaultArgParser.py
+++ b/coalib/parsing/DefaultArgParser.py
@@ -27,7 +27,7 @@
prog="coala",
description="coala is a simple COde AnaLysis Application. Its goal "
"is to make s... | {"golden_diff": "diff --git a/coalib/parsing/DefaultArgParser.py b/coalib/parsing/DefaultArgParser.py\n--- a/coalib/parsing/DefaultArgParser.py\n+++ b/coalib/parsing/DefaultArgParser.py\n@@ -27,7 +27,7 @@\n prog=\"coala\",\n description=\"coala is a simple COde AnaLysis Application. Its goal \"\n ... | 1,880 | 154 |
gh_patches_debug_18951 | rasdani/github-patches | git_diff | ansible__ansible-23067 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
win_domain_controller: documentation error in examples '_pass' should be '_password'
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master... | diff --git a/lib/ansible/modules/windows/win_domain_controller.py b/lib/ansible/modules/windows/win_domain_controller.py
--- a/lib/ansible/modules/windows/win_domain_controller.py
+++ b/lib/ansible/modules/windows/win_domain_controller.py
@@ -75,8 +75,8 @@
- win_domain_controller:
dns_domain_name: ansible.vag... | {"golden_diff": "diff --git a/lib/ansible/modules/windows/win_domain_controller.py b/lib/ansible/modules/windows/win_domain_controller.py\n--- a/lib/ansible/modules/windows/win_domain_controller.py\n+++ b/lib/ansible/modules/windows/win_domain_controller.py\n@@ -75,8 +75,8 @@\n - win_domain_controller:\n dns_do... | 1,812 | 246 |
gh_patches_debug_7897 | rasdani/github-patches | git_diff | nautobot__nautobot-2640 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
wrong link from circuit types to circuit
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
w... | diff --git a/nautobot/circuits/tables.py b/nautobot/circuits/tables.py
--- a/nautobot/circuits/tables.py
+++ b/nautobot/circuits/tables.py
@@ -12,10 +12,13 @@
from .models import Circuit, CircuitType, Provider, ProviderNetwork
CIRCUIT_TERMINATION_PARENT = """
+{% load helpers %}
{% if value.provider_network %}
-<a... | {"golden_diff": "diff --git a/nautobot/circuits/tables.py b/nautobot/circuits/tables.py\n--- a/nautobot/circuits/tables.py\n+++ b/nautobot/circuits/tables.py\n@@ -12,10 +12,13 @@\n from .models import Circuit, CircuitType, Provider, ProviderNetwork\n \n CIRCUIT_TERMINATION_PARENT = \"\"\"\n+{% load helpers %}\n {% if v... | 1,767 | 168 |
gh_patches_debug_608 | rasdani/github-patches | git_diff | pex-tool__pex-1482 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.51
On the docket:
+ [ ] UnicodeDecodeError when packaging after upgrading to v2.1.46 #1479
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these file... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = "2.1.50"
+__version__ = "2.1.51"
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.50\"\n+__version__ = \"2.1.51\"\n", "... | 346 | 96 |
gh_patches_debug_13431 | rasdani/github-patches | git_diff | comic__grand-challenge.org-1755 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CSV export fails on converting uuid to json
Problematic JSON structure in https://grand-challenge.org/api/v1/cases/images/redacted_uuid/?format=csv
```
{"pk":"redacted_uuid","name":"redacted.png","study":... | diff --git a/app/grandchallenge/core/renderers.py b/app/grandchallenge/core/renderers.py
--- a/app/grandchallenge/core/renderers.py
+++ b/app/grandchallenge/core/renderers.py
@@ -1,5 +1,7 @@
import json
+from rest_framework.settings import api_settings
+from rest_framework.utils.encoders import JSONEncoder
from res... | {"golden_diff": "diff --git a/app/grandchallenge/core/renderers.py b/app/grandchallenge/core/renderers.py\n--- a/app/grandchallenge/core/renderers.py\n+++ b/app/grandchallenge/core/renderers.py\n@@ -1,5 +1,7 @@\n import json\n \n+from rest_framework.settings import api_settings\n+from rest_framework.utils.encoders impo... | 887 | 180 |
gh_patches_debug_27459 | rasdani/github-patches | git_diff | NVIDIA__apex-590 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SyncBatchNorm doesn't support 2 dimensions input?
Hi,
I'm facing the issue that the program crash when the input for SyncBatchNorm is two dimensions. Here's the code:
```python
import torch
import apex
... | diff --git a/apex/parallel/optimized_sync_batchnorm.py b/apex/parallel/optimized_sync_batchnorm.py
--- a/apex/parallel/optimized_sync_batchnorm.py
+++ b/apex/parallel/optimized_sync_batchnorm.py
@@ -71,7 +71,7 @@
# if input.dim() == 2, we switch to channel_last for efficient memory accessing
channel_l... | {"golden_diff": "diff --git a/apex/parallel/optimized_sync_batchnorm.py b/apex/parallel/optimized_sync_batchnorm.py\n--- a/apex/parallel/optimized_sync_batchnorm.py\n+++ b/apex/parallel/optimized_sync_batchnorm.py\n@@ -71,7 +71,7 @@\n # if input.dim() == 2, we switch to channel_last for efficient memory accessi... | 1,869 | 349 |
gh_patches_debug_25801 | rasdani/github-patches | git_diff | akvo__akvo-rsr-3421 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Results framework loads very slowly for projects with lot of indicator dimensions
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
---... | diff --git a/akvo/rest/pagination.py b/akvo/rest/pagination.py
--- a/akvo/rest/pagination.py
+++ b/akvo/rest/pagination.py
@@ -8,12 +8,18 @@
from rest_framework.response import Response
-class LimitSizePageNumberPagination(pagination.PageNumberPagination):
+class StandardSizePageNumberPagination(pagination.PageNum... | {"golden_diff": "diff --git a/akvo/rest/pagination.py b/akvo/rest/pagination.py\n--- a/akvo/rest/pagination.py\n+++ b/akvo/rest/pagination.py\n@@ -8,12 +8,18 @@\n from rest_framework.response import Response\n \n \n-class LimitSizePageNumberPagination(pagination.PageNumberPagination):\n+class StandardSizePageNumberPagi... | 752 | 336 |
gh_patches_debug_317 | rasdani/github-patches | git_diff | jazzband__pip-tools-1871 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Convert the README from rst to md
<!--- Describe the changes here. --->
This PR converts the documentation from README.rst to README.md
Related: https://github.com/jazzband/pip-tools/issues/1856
##### Cont... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -52,3 +52,4 @@
# -------------------------------------------------------------------------
default_role = "any"
nitpicky = True
+suppress_warnings = ["myst.xref_missing"]
| {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -52,3 +52,4 @@\n # -------------------------------------------------------------------------\n default_role = \"any\"\n nitpicky = True\n+suppress_warnings = [\"myst.xref_missing\"]\n", "issue": "Convert the README fro... | 841 | 61 |
gh_patches_debug_40399 | rasdani/github-patches | git_diff | SeldonIO__MLServer-233 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support MLflow current protocol
As a follow-up to #167, it would be interesting to explore adding a custom endpoint to the `mlserver-mlflow` runtime which supports [MLflow's existing API](https://www.mlflow.o... | diff --git a/runtimes/mlflow/mlserver_mlflow/runtime.py b/runtimes/mlflow/mlserver_mlflow/runtime.py
--- a/runtimes/mlflow/mlserver_mlflow/runtime.py
+++ b/runtimes/mlflow/mlserver_mlflow/runtime.py
@@ -1,9 +1,29 @@
import mlflow
+from io import StringIO
+from fastapi import Request, Response
+
+from mlflow.exceptio... | {"golden_diff": "diff --git a/runtimes/mlflow/mlserver_mlflow/runtime.py b/runtimes/mlflow/mlserver_mlflow/runtime.py\n--- a/runtimes/mlflow/mlserver_mlflow/runtime.py\n+++ b/runtimes/mlflow/mlserver_mlflow/runtime.py\n@@ -1,9 +1,29 @@\n import mlflow\n \n+from io import StringIO\n+from fastapi import Request, Response... | 655 | 873 |
gh_patches_debug_20942 | rasdani/github-patches | git_diff | Project-MONAI__MONAI-3873 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Enhance `ContrastiveLoss` to avoid warning
Call ContrastiveLoss will see a warning message:
```
To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone(... | diff --git a/monai/losses/contrastive.py b/monai/losses/contrastive.py
--- a/monai/losses/contrastive.py
+++ b/monai/losses/contrastive.py
@@ -65,14 +65,13 @@
if target.shape != input.shape:
raise ValueError(f"ground truth has differing shape ({target.shape}) from input ({input.shape})")
- ... | {"golden_diff": "diff --git a/monai/losses/contrastive.py b/monai/losses/contrastive.py\n--- a/monai/losses/contrastive.py\n+++ b/monai/losses/contrastive.py\n@@ -65,14 +65,13 @@\n if target.shape != input.shape:\n raise ValueError(f\"ground truth has differing shape ({target.shape}) from input ({in... | 1,414 | 270 |
gh_patches_debug_13438 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-3307 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider vetco is broken
During the global build at 2021-09-01-14-42-16, spider **vetco** failed with **0 features** and **24644 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-09-01-14-42-1... | diff --git a/locations/spiders/vetco_clinic.py b/locations/spiders/vetco_clinic.py
--- a/locations/spiders/vetco_clinic.py
+++ b/locations/spiders/vetco_clinic.py
@@ -38,7 +38,7 @@
if clinics:
for stores in clinics:
body = stores['label']
- address =... | {"golden_diff": "diff --git a/locations/spiders/vetco_clinic.py b/locations/spiders/vetco_clinic.py\n--- a/locations/spiders/vetco_clinic.py\n+++ b/locations/spiders/vetco_clinic.py\n@@ -38,7 +38,7 @@\n if clinics:\n for stores in clinics:\n body = stores['label']\n- ... | 1,108 | 173 |
gh_patches_debug_51335 | rasdani/github-patches | git_diff | beetbox__beets-1650 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plexupdate plugin crashed
Every time after import plexupdate plugin crashed with this error:
```
Traceback (most recent call last):
File "/usr/local/bin/beet", line 9, in <module>
load_entry_point('bee... | diff --git a/beetsplug/plexupdate.py b/beetsplug/plexupdate.py
--- a/beetsplug/plexupdate.py
+++ b/beetsplug/plexupdate.py
@@ -28,7 +28,7 @@
r = requests.get(url)
# Parse xml tree and extract music section key.
- tree = ET.fromstring(r.text)
+ tree = ET.fromstring(r.content)
for child in tree.fin... | {"golden_diff": "diff --git a/beetsplug/plexupdate.py b/beetsplug/plexupdate.py\n--- a/beetsplug/plexupdate.py\n+++ b/beetsplug/plexupdate.py\n@@ -28,7 +28,7 @@\n r = requests.get(url)\n \n # Parse xml tree and extract music section key.\n- tree = ET.fromstring(r.text)\n+ tree = ET.fromstring(r.content)\n... | 1,528 | 118 |
gh_patches_debug_34669 | rasdani/github-patches | git_diff | PlasmaPy__PlasmaPy-125 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Raise ImportError when installing/importing with old versions of Python, Astropy, & NumPy
We decided that PlasmaPy will only be supported for:
- Python version > 3.6
- Astropy version > 2.0
- NumPy version... | diff --git a/plasmapy/__init__.py b/plasmapy/__init__.py
--- a/plasmapy/__init__.py
+++ b/plasmapy/__init__.py
@@ -5,16 +5,81 @@
author as __author__,
)
-from .classes import Plasma
-from . import classes
-from . import constants
-from . import atomic
-from . import math
-from . import physics
-from . import ut... | {"golden_diff": "diff --git a/plasmapy/__init__.py b/plasmapy/__init__.py\n--- a/plasmapy/__init__.py\n+++ b/plasmapy/__init__.py\n@@ -5,16 +5,81 @@\n author as __author__,\n )\n \n-from .classes import Plasma\n-from . import classes\n-from . import constants\n-from . import atomic\n-from . import math\n-from . imp... | 656 | 720 |
gh_patches_debug_4229 | rasdani/github-patches | git_diff | twisted__twisted-11816 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
twisted.web.pages.errorPage docstring has a typo
> Use [IResource.putChild()](https://docs.twisted.org/en/stable/api/twisted.web.resource.IResource.html#putChild) override specific path.
Should be:
> Us... | diff --git a/src/twisted/web/pages.py b/src/twisted/web/pages.py
--- a/src/twisted/web/pages.py
+++ b/src/twisted/web/pages.py
@@ -83,7 +83,7 @@
useful for rendering simple error pages.
The resource dynamically handles all paths below it. Use
- L{IResource.putChild()} override specific path.
+ L{IReso... | {"golden_diff": "diff --git a/src/twisted/web/pages.py b/src/twisted/web/pages.py\n--- a/src/twisted/web/pages.py\n+++ b/src/twisted/web/pages.py\n@@ -83,7 +83,7 @@\n useful for rendering simple error pages.\n \n The resource dynamically handles all paths below it. Use\n- L{IResource.putChild()} override spe... | 1,605 | 122 |
gh_patches_debug_38939 | rasdani/github-patches | git_diff | AlexsLemonade__refinebio-3363 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Clean up AWS Batch job definition list
### Problem or idea
The Batch job definition section contains 100+ pages of jobs (~2500 items). They haven't been cleaned up properly during deploy process for a whil... | diff --git a/infrastructure/delete_batch_job_queue.py b/infrastructure/delete_batch_job_queue.py
--- a/infrastructure/delete_batch_job_queue.py
+++ b/infrastructure/delete_batch_job_queue.py
@@ -2,19 +2,22 @@
from time import sleep
import boto3
+from botocore.exceptions import ClientError
-AWS_REGION = os.environ... | {"golden_diff": "diff --git a/infrastructure/delete_batch_job_queue.py b/infrastructure/delete_batch_job_queue.py\n--- a/infrastructure/delete_batch_job_queue.py\n+++ b/infrastructure/delete_batch_job_queue.py\n@@ -2,19 +2,22 @@\n from time import sleep\n \n import boto3\n+from botocore.exceptions import ClientError\n ... | 958 | 786 |
gh_patches_debug_10043 | rasdani/github-patches | git_diff | nautobot__nautobot-877 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Migrate user, social auth, and system settings from Django Admin to be first-class citizens in UI/API
### Proposed Functionality
Before the launch of Nautobot, there was significant work to migrate functi... | diff --git a/nautobot/core/admin.py b/nautobot/core/admin.py
--- a/nautobot/core/admin.py
+++ b/nautobot/core/admin.py
@@ -1,5 +1,6 @@
from django.conf import settings
from django.contrib.admin import site as admin_site
+from social_django.models import Association, Nonce, UserSocialAuth
from taggit.models import Ta... | {"golden_diff": "diff --git a/nautobot/core/admin.py b/nautobot/core/admin.py\n--- a/nautobot/core/admin.py\n+++ b/nautobot/core/admin.py\n@@ -1,5 +1,6 @@\n from django.conf import settings\n from django.contrib.admin import site as admin_site\n+from social_django.models import Association, Nonce, UserSocialAuth\n from... | 680 | 153 |
gh_patches_debug_4919 | rasdani/github-patches | git_diff | bokeh__bokeh-1361 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot style minor ticks
Axis objects do not have minor tick properties.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FI... | diff --git a/bokeh/models/axes.py b/bokeh/models/axes.py
--- a/bokeh/models/axes.py
+++ b/bokeh/models/axes.py
@@ -27,11 +27,15 @@
major_label_props = Include(TextProps)
axis_props = Include(LineProps)
- major_tick_props = Include(LineProps)
+ major_tick_props = Include(LineProps)
major_tick_in... | {"golden_diff": "diff --git a/bokeh/models/axes.py b/bokeh/models/axes.py\n--- a/bokeh/models/axes.py\n+++ b/bokeh/models/axes.py\n@@ -27,11 +27,15 @@\n major_label_props = Include(TextProps)\n \n axis_props = Include(LineProps)\n- major_tick_props = Include(LineProps)\n \n+ major_tick_props = Include(Lin... | 1,017 | 143 |
gh_patches_debug_14570 | rasdani/github-patches | git_diff | freedomofpress__securedrop-2491 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
localization: various problems
# Bug
## Description
This issue is to collect the various localization problems found before the 0.4.4 release and after the **string freeze**
They should be fixed in a... | diff --git a/securedrop/source_app/forms.py b/securedrop/source_app/forms.py
--- a/securedrop/source_app/forms.py
+++ b/securedrop/source_app/forms.py
@@ -11,7 +11,7 @@
InputRequired(message=gettext('This field is required.')),
Length(1, Source.MAX_CODENAME_LEN,
message=gettext('Field ... | {"golden_diff": "diff --git a/securedrop/source_app/forms.py b/securedrop/source_app/forms.py\n--- a/securedrop/source_app/forms.py\n+++ b/securedrop/source_app/forms.py\n@@ -11,7 +11,7 @@\n InputRequired(message=gettext('This field is required.')),\n Length(1, Source.MAX_CODENAME_LEN,\n ... | 513 | 169 |
gh_patches_debug_41609 | rasdani/github-patches | git_diff | getnikola__nikola-1292 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
render fails if the theme has a code.css
The `conf.py` says:
```
# Color scheme to be used for code blocks. If your theme provides
# "assets/css/code.css" this is ignored.
```
I've [provided one](https:/... | diff --git a/nikola/plugins/task/copy_assets.py b/nikola/plugins/task/copy_assets.py
--- a/nikola/plugins/task/copy_assets.py
+++ b/nikola/plugins/task/copy_assets.py
@@ -45,15 +45,21 @@
kw = {
"themes": self.site.THEMES,
+ "files_folders": self.site.config['FILES_FOLDERS'],
... | {"golden_diff": "diff --git a/nikola/plugins/task/copy_assets.py b/nikola/plugins/task/copy_assets.py\n--- a/nikola/plugins/task/copy_assets.py\n+++ b/nikola/plugins/task/copy_assets.py\n@@ -45,15 +45,21 @@\n \n kw = {\n \"themes\": self.site.THEMES,\n+ \"files_folders\": self.site.config... | 1,425 | 689 |
gh_patches_debug_34527 | rasdani/github-patches | git_diff | mampfes__hacs_waste_collection_schedule-1694 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: source 'City of Karlsruhe' stopped working
### I Have A Problem With:
A specific source
### What's Your Problem
Release 1.44.0:
Due to changes on the website the source '**City of Karlsruhe**' (nam... | diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py
+++ b/custom_compone... | {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/karlsruhe_de.py\n+... | 1,364 | 546 |
gh_patches_debug_28800 | rasdani/github-patches | git_diff | quantumlib__Cirq-1674 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve error message if on_each gets a list
When you do `cirq.H.on_each([q0, q1])` instead of the unpacked version `cirq.H.on_each(q0, q1)` for some qubits `q0` and `q1`, the error message you get is **Gate... | diff --git a/cirq/ops/gate_features.py b/cirq/ops/gate_features.py
--- a/cirq/ops/gate_features.py
+++ b/cirq/ops/gate_features.py
@@ -18,8 +18,10 @@
"""
import abc
+import collections
+from typing import Union, Iterable, Any, List
-from cirq.ops import op_tree, raw_types
+from cirq.ops import raw_types
clas... | {"golden_diff": "diff --git a/cirq/ops/gate_features.py b/cirq/ops/gate_features.py\n--- a/cirq/ops/gate_features.py\n+++ b/cirq/ops/gate_features.py\n@@ -18,8 +18,10 @@\n \"\"\"\n \n import abc\n+import collections\n+from typing import Union, Iterable, Any, List\n \n-from cirq.ops import op_tree, raw_types\n+from cirq... | 984 | 411 |
gh_patches_debug_39718 | rasdani/github-patches | git_diff | prowler-cloud__prowler-2291 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: backup_plans_exist and backup_reportplans_exist trigger in regions where not backups exist
### Steps to Reproduce
The mentioned checks are triggered even if no backups are present or configured.
### ... | diff --git a/prowler/providers/aws/services/backup/backup_plans_exist/backup_plans_exist.py b/prowler/providers/aws/services/backup/backup_plans_exist/backup_plans_exist.py
--- a/prowler/providers/aws/services/backup/backup_plans_exist/backup_plans_exist.py
+++ b/prowler/providers/aws/services/backup/backup_plans_exist... | {"golden_diff": "diff --git a/prowler/providers/aws/services/backup/backup_plans_exist/backup_plans_exist.py b/prowler/providers/aws/services/backup/backup_plans_exist/backup_plans_exist.py\n--- a/prowler/providers/aws/services/backup/backup_plans_exist/backup_plans_exist.py\n+++ b/prowler/providers/aws/services/backup... | 1,274 | 915 |
gh_patches_debug_19093 | rasdani/github-patches | git_diff | weecology__retriever-287 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
download command should probably fail when specified path does not exist
A datsaet can be downloaded to a specific path with the function `download` while specifying the -p argument. For example `retriever do... | diff --git a/engines/download_only.py b/engines/download_only.py
--- a/engines/download_only.py
+++ b/engines/download_only.py
@@ -51,7 +51,18 @@
print("Keeping existing copy.")
else:
print("Copying %s from %s" % (file_name_nopath, file_path))
- ... | {"golden_diff": "diff --git a/engines/download_only.py b/engines/download_only.py\n--- a/engines/download_only.py\n+++ b/engines/download_only.py\n@@ -51,7 +51,18 @@\n print(\"Keeping existing copy.\")\n else:\n print(\"Copying %s from %s\" % (file_name_nopath, fi... | 1,322 | 231 |
gh_patches_debug_12065 | rasdani/github-patches | git_diff | tinygrad__tinygrad-65 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
EOFError: Ran out of input
When running example and solving "Can't import fetch from utils" issue, this one comes up:
:
mask = np.zeros_like(like).reshape(-1)
@@ -12,7 +13,7 @@
def fetch(url):
import requests, os, hashlib, tempfile
... | {"golden_diff": "diff --git a/tinygrad/utils.py b/tinygrad/utils.py\n--- a/tinygrad/utils.py\n+++ b/tinygrad/utils.py\n@@ -1,4 +1,5 @@\n import numpy as np\n+import os\n \n def mask_like(like, mask_inx, mask_value = 1.0):\n mask = np.zeros_like(like).reshape(-1)\n@@ -12,7 +13,7 @@\n def fetch(url):\n import request... | 830 | 176 |
gh_patches_debug_20502 | rasdani/github-patches | git_diff | cloudtools__troposphere-1205 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add 'PermissionsBoundary' properties to AWS::IAM::Role and AWS::IAM::User
This property has been released on November 9 by AWS.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.h... | diff --git a/troposphere/iam.py b/troposphere/iam.py
--- a/troposphere/iam.py
+++ b/troposphere/iam.py
@@ -79,6 +79,7 @@
'ManagedPolicyArns': ([basestring], False),
'MaxSessionDuration': (integer, False),
'Path': (iam_path, False),
+ 'PermissionsBoundary': (basestring, False),
... | {"golden_diff": "diff --git a/troposphere/iam.py b/troposphere/iam.py\n--- a/troposphere/iam.py\n+++ b/troposphere/iam.py\n@@ -79,6 +79,7 @@\n 'ManagedPolicyArns': ([basestring], False),\n 'MaxSessionDuration': (integer, False),\n 'Path': (iam_path, False),\n+ 'PermissionsBoundary': (base... | 1,541 | 256 |
gh_patches_debug_26528 | rasdani/github-patches | git_diff | ESMCI__cime-1048 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing f19_g16_r01 high resolution river flow grid
Between cime5.2.0-alpha.9 and cime5.2.0-alpha.20 the config_grids file format was changed, and one grid needed for CLM testing was removed. The change to ad... | diff --git a/utils/python/CIME/BuildTools/configure.py b/utils/python/CIME/BuildTools/configure.py
--- a/utils/python/CIME/BuildTools/configure.py
+++ b/utils/python/CIME/BuildTools/configure.py
@@ -49,16 +49,20 @@
def _copy_depends_files(machine_name, machines_dir, output_dir, compiler):
"""
Copy any system... | {"golden_diff": "diff --git a/utils/python/CIME/BuildTools/configure.py b/utils/python/CIME/BuildTools/configure.py\n--- a/utils/python/CIME/BuildTools/configure.py\n+++ b/utils/python/CIME/BuildTools/configure.py\n@@ -49,16 +49,20 @@\n def _copy_depends_files(machine_name, machines_dir, output_dir, compiler):\n \"... | 1,787 | 427 |
gh_patches_debug_19916 | rasdani/github-patches | git_diff | weecology__retriever-1121 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add a description field(s) to setup.py
This populates the description on PYPI:
https://packaging.python.org/tutorials/distributing-packages/#description
--- END ISSUE ---
Below are some code segments, ea... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -29,6 +29,7 @@
def clean_version(v):
return parse_version(v).__repr__().lstrip("<Version('").rstrip("')>")
+
includes = [
'xlrd',
'future',
@@ -52,6 +53,10 @@
setup(name='retriever',
version=clean_version(... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -29,6 +29,7 @@\n def clean_version(v):\n return parse_version(v).__repr__().lstrip(\"<Version('\").rstrip(\"')>\")\n \n+\n includes = [\n 'xlrd',\n 'future',\n@@ -52,6 +53,10 @@\n setup(name='retrieve... | 1,372 | 217 |
gh_patches_debug_51313 | rasdani/github-patches | git_diff | scikit-image__scikit-image-5128 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
filters.farid missing from skimage.filters documentation
## Description
The `filters.farid{,_h,_v}` functions are missing from the [`skimage.filters` documentation](https://scikit-image.org/docs/dev/api/sk... | diff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py
--- a/skimage/filters/__init__.py
+++ b/skimage/filters/__init__.py
@@ -43,6 +43,9 @@
'roberts_pos_diag',
'roberts_neg_diag',
'laplace',
+ 'farid',
+ 'farid_h',
+ 'farid_v',
... | {"golden_diff": "diff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py\n--- a/skimage/filters/__init__.py\n+++ b/skimage/filters/__init__.py\n@@ -43,6 +43,9 @@\n 'roberts_pos_diag',\n 'roberts_neg_diag',\n 'laplace',\n+ 'farid',\n+ 'farid_h',\n+ ... | 978 | 117 |
gh_patches_debug_43025 | rasdani/github-patches | git_diff | azavea__raster-vision-641 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Include per-scene metrics in eval.json
It would be useful to see metrics for each scene in addition to metrics averaged over all scenes.
--- END ISSUE ---
Below are some code segments, each from a relevant... | diff --git a/rastervision/evaluation/classification_evaluation.py b/rastervision/evaluation/classification_evaluation.py
--- a/rastervision/evaluation/classification_evaluation.py
+++ b/rastervision/evaluation/classification_evaluation.py
@@ -1,4 +1,5 @@
from abc import (ABC, abstractmethod)
+import copy
import jso... | {"golden_diff": "diff --git a/rastervision/evaluation/classification_evaluation.py b/rastervision/evaluation/classification_evaluation.py\n--- a/rastervision/evaluation/classification_evaluation.py\n+++ b/rastervision/evaluation/classification_evaluation.py\n@@ -1,4 +1,5 @@\n from abc import (ABC, abstractmethod)\n+imp... | 1,990 | 778 |
gh_patches_debug_23538 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-1884 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The first worker may crash in ALLREDUCE mode
When the worker is the only running worker pod, `_get_peer_set` will get an empty peer set.
Then consensus_init_kwars will set "known_addr_list" as empty.
This ... | diff --git a/elasticdl/python/collective_ops/communicator.py b/elasticdl/python/collective_ops/communicator.py
--- a/elasticdl/python/collective_ops/communicator.py
+++ b/elasticdl/python/collective_ops/communicator.py
@@ -23,17 +23,18 @@
class CollectiveCommunicator(object):
def __init__(self, service_name=None)... | {"golden_diff": "diff --git a/elasticdl/python/collective_ops/communicator.py b/elasticdl/python/collective_ops/communicator.py\n--- a/elasticdl/python/collective_ops/communicator.py\n+++ b/elasticdl/python/collective_ops/communicator.py\n@@ -23,17 +23,18 @@\n class CollectiveCommunicator(object):\n def __init__(se... | 2,041 | 248 |
gh_patches_debug_53980 | rasdani/github-patches | git_diff | scikit-hep__pyhf-2135 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Matplotlib broken in Pyodide demo in docs
In the docs https://pyhf.readthedocs.io/en/v0.7.0/, the Pyodide example is broken for me:
```pytb
------------------------------------------------------------------... | diff --git a/docs/generate_jupyterlite_iframe.py b/docs/generate_jupyterlite_iframe.py
--- a/docs/generate_jupyterlite_iframe.py
+++ b/docs/generate_jupyterlite_iframe.py
@@ -4,7 +4,7 @@
def main():
code = """\
import piplite
-await piplite.install(["pyhf==0.7.0"])
+await piplite.install(["pyhf==0.7.0", "matplot... | {"golden_diff": "diff --git a/docs/generate_jupyterlite_iframe.py b/docs/generate_jupyterlite_iframe.py\n--- a/docs/generate_jupyterlite_iframe.py\n+++ b/docs/generate_jupyterlite_iframe.py\n@@ -4,7 +4,7 @@\n def main():\n code = \"\"\"\\\n import piplite\n-await piplite.install([\"pyhf==0.7.0\"])\n+await piplite.i... | 1,352 | 120 |
gh_patches_debug_20110 | rasdani/github-patches | git_diff | pytorch__ignite-2639 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Code formatting issue with latest flake8
https://github.com/pytorch/ignite/runs/7781175697?check_suite_focus=true#step:11:84
```
Collecting flake8
Downloading flake8-5.0.4-py2.py3-none-any.whl (61 kB... | diff --git a/ignite/metrics/psnr.py b/ignite/metrics/psnr.py
--- a/ignite/metrics/psnr.py
+++ b/ignite/metrics/psnr.py
@@ -9,7 +9,8 @@
class PSNR(Metric):
- r"""Computes average `Peak signal-to-noise ratio (PSNR) <https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio>`_.
+ r"""Computes average
+ `Peak ... | {"golden_diff": "diff --git a/ignite/metrics/psnr.py b/ignite/metrics/psnr.py\n--- a/ignite/metrics/psnr.py\n+++ b/ignite/metrics/psnr.py\n@@ -9,7 +9,8 @@\n \n \n class PSNR(Metric):\n- r\"\"\"Computes average `Peak signal-to-noise ratio (PSNR) <https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio>`_.\n+ r\"\... | 1,906 | 305 |
gh_patches_debug_36049 | rasdani/github-patches | git_diff | mozilla__pontoon-2716 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pretranslated Fluent string has the ID translated or modified
It happened for at least two strings.
```
remember-pw-link = Remember your password? Sign in
```
Became
```
Remember-pw-link = Ricordi... | diff --git a/pontoon/pretranslation/pretranslate.py b/pontoon/pretranslation/pretranslate.py
--- a/pontoon/pretranslation/pretranslate.py
+++ b/pontoon/pretranslation/pretranslate.py
@@ -18,6 +18,7 @@
get_reconstructed_message,
)
+UNTRANSLATABLE_KEY = "AIzaSyDX3R5Y1kxh_8lJ4OAO"
serializer = FluentSerializer(... | {"golden_diff": "diff --git a/pontoon/pretranslation/pretranslate.py b/pontoon/pretranslation/pretranslate.py\n--- a/pontoon/pretranslation/pretranslate.py\n+++ b/pontoon/pretranslation/pretranslate.py\n@@ -18,6 +18,7 @@\n get_reconstructed_message,\n )\n \n+UNTRANSLATABLE_KEY = \"AIzaSyDX3R5Y1kxh_8lJ4OAO\"\n \n se... | 1,374 | 467 |
gh_patches_debug_22239 | rasdani/github-patches | git_diff | dotkom__onlineweb4-2359 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Atendee list bug when adding or removing users
<!-- If this is a security issue or information leakage (having access to something you (probably) shouldn't), please send an email rather than opening a public ... | diff --git a/apps/events/dashboard/utils.py b/apps/events/dashboard/utils.py
--- a/apps/events/dashboard/utils.py
+++ b/apps/events/dashboard/utils.py
@@ -65,7 +65,9 @@
'id': a.id,
'first_name': a.user.first_name,
'last_name': a.user.last_name,
+ 'year_of_study': a.user... | {"golden_diff": "diff --git a/apps/events/dashboard/utils.py b/apps/events/dashboard/utils.py\n--- a/apps/events/dashboard/utils.py\n+++ b/apps/events/dashboard/utils.py\n@@ -65,7 +65,9 @@\n 'id': a.id,\n 'first_name': a.user.first_name,\n 'last_name': a.user.last_name,\n+ ... | 2,006 | 247 |
gh_patches_debug_2042 | rasdani/github-patches | git_diff | aws__aws-cli-357 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pip install awscli fails
I tried `pip install awscli` from https://github.com/aws/aws-cli/blob/develop/README.rst and failed:
http://sprunge.us/NfbW
/home/hendry/.pip/pip.log = http://ix.io/7SC
Hilarious h... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@
'six>=1.1.0',
'colorama==0.2.5',
'docutils>=0.10',
- 'rsa==3.1.1']
+ 'rsa==3.1.2']
if sys.version_info[:2] == (2, 6):
# For python2.6 we have to require argparse since it... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -11,7 +11,7 @@\n 'six>=1.1.0',\n 'colorama==0.2.5',\n 'docutils>=0.10',\n- 'rsa==3.1.1']\n+ 'rsa==3.1.2']\n \n if sys.version_info[:2] == (2, 6):\n # For python2.6 we have ... | 1,043 | 115 |
gh_patches_debug_8933 | rasdani/github-patches | git_diff | akvo__akvo-rsr-1945 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Public projects filter in REST API not working correctly
## Test plan
All projects (and other objects) should be displayed in the REST API.
## Issue description
As a quick fix, just display all projects (pu... | diff --git a/akvo/rest/viewsets.py b/akvo/rest/viewsets.py
--- a/akvo/rest/viewsets.py
+++ b/akvo/rest/viewsets.py
@@ -23,11 +23,3 @@
permission_classes = (DjangoObjectPermissions, )
filter_backends = (filters.DjangoFilterBackend, filters.OrderingFilter, )
ordering_fields = '__all__'
-
- def get_query... | {"golden_diff": "diff --git a/akvo/rest/viewsets.py b/akvo/rest/viewsets.py\n--- a/akvo/rest/viewsets.py\n+++ b/akvo/rest/viewsets.py\n@@ -23,11 +23,3 @@\n permission_classes = (DjangoObjectPermissions, )\n filter_backends = (filters.DjangoFilterBackend, filters.OrderingFilter, )\n ordering_fields = '__all_... | 658 | 167 |
gh_patches_debug_725 | rasdani/github-patches | git_diff | rasterio__rasterio-1477 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python crashes while building overviews
After performing the below code Python crashes:
```python
import rasterio
from rasterio.enums import Resampling
factors = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1... | diff --git a/rasterio/errors.py b/rasterio/errors.py
--- a/rasterio/errors.py
+++ b/rasterio/errors.py
@@ -98,3 +98,7 @@
class UnsupportedOperation(RasterioError):
"""Raised when reading from a file opened in 'w' mode"""
+
+
+class OverviewCreationError(RasterioError):
+ """Raised when creation of an overvie... | {"golden_diff": "diff --git a/rasterio/errors.py b/rasterio/errors.py\n--- a/rasterio/errors.py\n+++ b/rasterio/errors.py\n@@ -98,3 +98,7 @@\n \n class UnsupportedOperation(RasterioError):\n \"\"\"Raised when reading from a file opened in 'w' mode\"\"\"\n+\n+\n+class OverviewCreationError(RasterioError):\n+ \"\"... | 1,939 | 91 |
gh_patches_debug_13127 | rasdani/github-patches | git_diff | GoogleCloudPlatform__PerfKitBenchmarker-680 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
silo benchmark fails behind proxy
From @mateusz-blaszkowski in #475:
> silo - failed with Clone of 'git://github.com/kohler/masstree-beta.git' into submodule path 'masstree' failed. I run the test behind th... | diff --git a/perfkitbenchmarker/linux_packages/silo.py b/perfkitbenchmarker/linux_packages/silo.py
--- a/perfkitbenchmarker/linux_packages/silo.py
+++ b/perfkitbenchmarker/linux_packages/silo.py
@@ -33,6 +33,9 @@
vm.RemoteCommand('git clone {0} {1}'.format(GIT_REPO, SILO_DIR))
vm.RemoteCommand('cd {0} && git chec... | {"golden_diff": "diff --git a/perfkitbenchmarker/linux_packages/silo.py b/perfkitbenchmarker/linux_packages/silo.py\n--- a/perfkitbenchmarker/linux_packages/silo.py\n+++ b/perfkitbenchmarker/linux_packages/silo.py\n@@ -33,6 +33,9 @@\n vm.RemoteCommand('git clone {0} {1}'.format(GIT_REPO, SILO_DIR))\n vm.RemoteComma... | 1,051 | 206 |
gh_patches_debug_27124 | rasdani/github-patches | git_diff | chainer__chainer-6807 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
F.mean_absolute_error numerically unstable with float16 arrays
In #5053, float16 support has been enabled for [F.mean_absolute_error](https://github.com/chainer/chainer/blob/master/chainer/functions/loss/mean... | diff --git a/chainer/functions/loss/mean_absolute_error.py b/chainer/functions/loss/mean_absolute_error.py
--- a/chainer/functions/loss/mean_absolute_error.py
+++ b/chainer/functions/loss/mean_absolute_error.py
@@ -6,6 +6,15 @@
from chainer.utils import type_check
+def _get_intermediate_dtype(dtype):
+ # Return... | {"golden_diff": "diff --git a/chainer/functions/loss/mean_absolute_error.py b/chainer/functions/loss/mean_absolute_error.py\n--- a/chainer/functions/loss/mean_absolute_error.py\n+++ b/chainer/functions/loss/mean_absolute_error.py\n@@ -6,6 +6,15 @@\n from chainer.utils import type_check\n \n \n+def _get_intermediate_dty... | 2,017 | 413 |
gh_patches_debug_32491 | rasdani/github-patches | git_diff | openai__gym-1573 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support wrapper transformations to VecEnv
@tristandeleu @pzhokhov @christopherhesse It might be rather convenient for the user experience to provide a list of wrapper transformations for the atomic environmen... | diff --git a/gym/vector/__init__.py b/gym/vector/__init__.py
--- a/gym/vector/__init__.py
+++ b/gym/vector/__init__.py
@@ -1,10 +1,15 @@
+try:
+ from collections.abc import Iterable
+except ImportError:
+ Iterable = (tuple, list)
+
from gym.vector.async_vector_env import AsyncVectorEnv
from gym.vector.sync_vect... | {"golden_diff": "diff --git a/gym/vector/__init__.py b/gym/vector/__init__.py\n--- a/gym/vector/__init__.py\n+++ b/gym/vector/__init__.py\n@@ -1,10 +1,15 @@\n+try:\n+ from collections.abc import Iterable\n+except ImportError:\n+ Iterable = (tuple, list)\n+\n from gym.vector.async_vector_env import AsyncVectorEnv\... | 938 | 449 |
gh_patches_debug_12946 | rasdani/github-patches | git_diff | awslabs__gluonts-1884 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DeepAR with NegativeBinomial cannot generate values above 1e6
## Description
A DeepAR model with NegativeBinomial output distribution cannot generate values significantly above 1e6.
## To Reproduce
I att... | diff --git a/src/gluonts/mx/distribution/neg_binomial.py b/src/gluonts/mx/distribution/neg_binomial.py
--- a/src/gluonts/mx/distribution/neg_binomial.py
+++ b/src/gluonts/mx/distribution/neg_binomial.py
@@ -87,13 +87,9 @@
) -> Tensor:
def s(mu: Tensor, alpha: Tensor) -> Tensor:
F = self.F
- ... | {"golden_diff": "diff --git a/src/gluonts/mx/distribution/neg_binomial.py b/src/gluonts/mx/distribution/neg_binomial.py\n--- a/src/gluonts/mx/distribution/neg_binomial.py\n+++ b/src/gluonts/mx/distribution/neg_binomial.py\n@@ -87,13 +87,9 @@\n ) -> Tensor:\n def s(mu: Tensor, alpha: Tensor) -> Tensor:\n ... | 1,978 | 247 |
gh_patches_debug_16813 | rasdani/github-patches | git_diff | nautobot__nautobot-5593 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Plugins not loaded with Gunicorn
### Environment
* Nautobot version (Docker tag too if applicable): 2.2.1
* Python version: 3.11
* Database platform, version: psql
* Middleware(s):
### Steps to R... | diff --git a/nautobot/core/wsgi.py b/nautobot/core/wsgi.py
--- a/nautobot/core/wsgi.py
+++ b/nautobot/core/wsgi.py
@@ -1,11 +1,18 @@
import logging
-import os
from django.core import cache
from django.core.wsgi import get_wsgi_application
from django.db import connections
-os.environ["DJANGO_SETTINGS_MODULE"] =... | {"golden_diff": "diff --git a/nautobot/core/wsgi.py b/nautobot/core/wsgi.py\n--- a/nautobot/core/wsgi.py\n+++ b/nautobot/core/wsgi.py\n@@ -1,11 +1,18 @@\n import logging\n-import os\n \n from django.core import cache\n from django.core.wsgi import get_wsgi_application\n from django.db import connections\n \n-os.environ... | 779 | 239 |
gh_patches_debug_12067 | rasdani/github-patches | git_diff | sktime__sktime-1453 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] sktime.datatypes._panel._examples raises pandas.core.common.SettingWithCopyError
**Describe the bug**
Attempting to install [tsai](https://pypi.org/project/tsai/) as an upstream package also installs t... | diff --git a/sktime/datatypes/_panel/_examples.py b/sktime/datatypes/_panel/_examples.py
--- a/sktime/datatypes/_panel/_examples.py
+++ b/sktime/datatypes/_panel/_examples.py
@@ -64,12 +64,13 @@
cols = [f"var_{i}" for i in range(2)]
X = pd.DataFrame(columns=cols, index=[0, 1, 2])
-X.iloc[0][0] = pd.Series([1, 2, 3]... | {"golden_diff": "diff --git a/sktime/datatypes/_panel/_examples.py b/sktime/datatypes/_panel/_examples.py\n--- a/sktime/datatypes/_panel/_examples.py\n+++ b/sktime/datatypes/_panel/_examples.py\n@@ -64,12 +64,13 @@\n \n cols = [f\"var_{i}\" for i in range(2)]\n X = pd.DataFrame(columns=cols, index=[0, 1, 2])\n-X.iloc[0... | 1,755 | 355 |
gh_patches_debug_319 | rasdani/github-patches | git_diff | pwr-Solaar__Solaar-730 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
better identification of Solaar versions
`git describe` produces
0.9.2-339-g39791be
Instead it should produce something based on 1.0.1
`git describe --tags` produces
1.0.1-58-g39791be
which is much bette... | diff --git a/lib/solaar/__init__.py b/lib/solaar/__init__.py
--- a/lib/solaar/__init__.py
+++ b/lib/solaar/__init__.py
@@ -19,5 +19,5 @@
from __future__ import absolute_import, division, print_function, unicode_literals
-__version__ = '1.0.1'
+__version__ = '1.0.2-rc1'
NAME = 'Solaar'
| {"golden_diff": "diff --git a/lib/solaar/__init__.py b/lib/solaar/__init__.py\n--- a/lib/solaar/__init__.py\n+++ b/lib/solaar/__init__.py\n@@ -19,5 +19,5 @@\n \n from __future__ import absolute_import, division, print_function, unicode_literals\n \n-__version__ = '1.0.1'\n+__version__ = '1.0.2-rc1'\n NAME = 'Solaar'\n"... | 632 | 107 |
gh_patches_debug_9857 | rasdani/github-patches | git_diff | saulpw__visidata-2160 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[parquet] can't load parquet directory anymore: `IsADirectoryError`
**Small description**
Hi @saulpw @anjakefala @takacsd - it seems that forcing opening the path as file with `.open()` - introduced with #... | diff --git a/visidata/loaders/parquet.py b/visidata/loaders/parquet.py
--- a/visidata/loaders/parquet.py
+++ b/visidata/loaders/parquet.py
@@ -23,8 +23,11 @@
pq = vd.importExternal("pyarrow.parquet", "pyarrow")
from visidata.loaders.arrow import arrow_to_vdtype
- with self.source.open('rb') a... | {"golden_diff": "diff --git a/visidata/loaders/parquet.py b/visidata/loaders/parquet.py\n--- a/visidata/loaders/parquet.py\n+++ b/visidata/loaders/parquet.py\n@@ -23,8 +23,11 @@\n pq = vd.importExternal(\"pyarrow.parquet\", \"pyarrow\")\n from visidata.loaders.arrow import arrow_to_vdtype\n \n- w... | 1,415 | 182 |
gh_patches_debug_17528 | rasdani/github-patches | git_diff | allegro__ralph-3222 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Table 'ralph_ng.transitions_transition' doesn't exist
when I follow the document to setup a develop environment, I met the error" default: django.db.utils.ProgrammingError: (1146, "Table 'ralph_ng.transitions... | diff --git a/src/ralph/lib/transitions/checks.py b/src/ralph/lib/transitions/checks.py
--- a/src/ralph/lib/transitions/checks.py
+++ b/src/ralph/lib/transitions/checks.py
@@ -1,9 +1,14 @@
+import logging
+
from django.core.checks import Error
-from django.db.utils import OperationalError
+from django.db.utils import D... | {"golden_diff": "diff --git a/src/ralph/lib/transitions/checks.py b/src/ralph/lib/transitions/checks.py\n--- a/src/ralph/lib/transitions/checks.py\n+++ b/src/ralph/lib/transitions/checks.py\n@@ -1,9 +1,14 @@\n+import logging\n+\n from django.core.checks import Error\n-from django.db.utils import OperationalError\n+from... | 926 | 202 |
gh_patches_debug_33816 | rasdani/github-patches | git_diff | marshmallow-code__webargs-464 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RFC: Only accept delimited string in DelimitedList
`DelimitedList` accepts either a list or a delimited string (e.g. "foo,bar,baz").
I'd like to make it more strict by only accepting a delimited list. Rath... | diff --git a/src/webargs/fields.py b/src/webargs/fields.py
--- a/src/webargs/fields.py
+++ b/src/webargs/fields.py
@@ -44,37 +44,35 @@
class DelimitedList(ma.fields.List):
- """Same as `marshmallow.fields.List`, except can load from either a list or
- a delimited string (e.g. "foo,bar,baz").
+ """A field ... | {"golden_diff": "diff --git a/src/webargs/fields.py b/src/webargs/fields.py\n--- a/src/webargs/fields.py\n+++ b/src/webargs/fields.py\n@@ -44,37 +44,35 @@\n \n \n class DelimitedList(ma.fields.List):\n- \"\"\"Same as `marshmallow.fields.List`, except can load from either a list or\n- a delimited string (e.g. \"fo... | 1,162 | 565 |
gh_patches_debug_49452 | rasdani/github-patches | git_diff | wagtail__wagtail-840 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Paginator and search pagination expect different parameters for page
The Paginator (as in `django.core.paginator`) used pretty much everywhere uses `page` as the query parameter. The search view, however, [ex... | diff --git a/wagtail/wagtailsearch/views/frontend.py b/wagtail/wagtailsearch/views/frontend.py
--- a/wagtail/wagtailsearch/views/frontend.py
+++ b/wagtail/wagtailsearch/views/frontend.py
@@ -37,7 +37,7 @@
# Get query string and page from GET paramters
query_string = request.GET.get('q', '')
- page = requ... | {"golden_diff": "diff --git a/wagtail/wagtailsearch/views/frontend.py b/wagtail/wagtailsearch/views/frontend.py\n--- a/wagtail/wagtailsearch/views/frontend.py\n+++ b/wagtail/wagtailsearch/views/frontend.py\n@@ -37,7 +37,7 @@\n \n # Get query string and page from GET paramters\n query_string = request.GET.get('q... | 1,166 | 131 |
gh_patches_debug_10307 | rasdani/github-patches | git_diff | getnikola__nikola-2238 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
deploy crashes with state system
Will investigate later.
``` pytb
Traceback (most recent call last):
File "/home/kwpolska/virtualenvs/nikola-py3/lib/python3.5/site-packages/doit/doit_cmd.py", line 168, in ... | diff --git a/nikola/state.py b/nikola/state.py
--- a/nikola/state.py
+++ b/nikola/state.py
@@ -78,6 +78,11 @@
def _save(self):
dname = os.path.dirname(self._path)
with tempfile.NamedTemporaryFile(dir=dname, delete=False) as outf:
+ # TODO replace with encoding='utf-8' and mode 'w+' in ... | {"golden_diff": "diff --git a/nikola/state.py b/nikola/state.py\n--- a/nikola/state.py\n+++ b/nikola/state.py\n@@ -78,6 +78,11 @@\n def _save(self):\n dname = os.path.dirname(self._path)\n with tempfile.NamedTemporaryFile(dir=dname, delete=False) as outf:\n+ # TODO replace with encoding='... | 1,407 | 180 |
gh_patches_debug_21053 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-6083 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
API: filtrer les notifications par `is_read`
**Description du besoin**
Pour les besoins de l'extension, il serait intéressant de pouvoir filtrer les notifications (URL `/api/notifications`) selon leur prop... | diff --git a/zds/notification/api/views.py b/zds/notification/api/views.py
--- a/zds/notification/api/views.py
+++ b/zds/notification/api/views.py
@@ -84,6 +84,9 @@
- name: subscription_type
description: Filters by subscription type.
paramType: query
+ - name: is_re... | {"golden_diff": "diff --git a/zds/notification/api/views.py b/zds/notification/api/views.py\n--- a/zds/notification/api/views.py\n+++ b/zds/notification/api/views.py\n@@ -84,6 +84,9 @@\n - name: subscription_type\n description: Filters by subscription type.\n paramType: query\n+ ... | 1,503 | 225 |
gh_patches_debug_8845 | rasdani/github-patches | git_diff | safe-global__safe-config-service-14 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Include provider info in the serialized response of `GET /safe-apps/`
The `/safe-apps` endpoint should include data about the provider if any
--- END ISSUE ---
Below are some code segments, each from a rele... | diff --git a/src/safe_apps/serializers.py b/src/safe_apps/serializers.py
--- a/src/safe_apps/serializers.py
+++ b/src/safe_apps/serializers.py
@@ -1,9 +1,17 @@
from rest_framework import serializers
-from .models import SafeApp
+from .models import SafeApp, Provider
+
+
+class ProviderSerializer(serializers.ModelSer... | {"golden_diff": "diff --git a/src/safe_apps/serializers.py b/src/safe_apps/serializers.py\n--- a/src/safe_apps/serializers.py\n+++ b/src/safe_apps/serializers.py\n@@ -1,9 +1,17 @@\n from rest_framework import serializers\n \n-from .models import SafeApp\n+from .models import SafeApp, Provider\n+\n+\n+class ProviderSeri... | 359 | 180 |
gh_patches_debug_29629 | rasdani/github-patches | git_diff | aio-libs__aiohttp-4556 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GET Requests to link-local IPv6 addresses don't work on Python 3.7+
🐞 **Describe the bug**
The aiohttp resolver loses information related to linklocal IPv6 addresses on Python 3.7+ due to a changes in the r... | diff --git a/aiohttp/resolver.py b/aiohttp/resolver.py
--- a/aiohttp/resolver.py
+++ b/aiohttp/resolver.py
@@ -31,11 +31,23 @@
hosts = []
for family, _, proto, _, address in infos:
- hosts.append(
- {'hostname': host,
- 'host': address[0], 'port': address[1]... | {"golden_diff": "diff --git a/aiohttp/resolver.py b/aiohttp/resolver.py\n--- a/aiohttp/resolver.py\n+++ b/aiohttp/resolver.py\n@@ -31,11 +31,23 @@\n \n hosts = []\n for family, _, proto, _, address in infos:\n- hosts.append(\n- {'hostname': host,\n- 'host': addr... | 1,683 | 458 |
gh_patches_debug_22504 | rasdani/github-patches | git_diff | wright-group__WrightTools-360 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Windows Tempfile Error
On Windows, tempfiles attempted to be opened using h5py cause errors.
I do not have the error message in front of me at present, but I believe it was a 'file already exists' flavor o... | diff --git a/WrightTools/_base.py b/WrightTools/_base.py
--- a/WrightTools/_base.py
+++ b/WrightTools/_base.py
@@ -5,6 +5,7 @@
import shutil
+import os
import weakref
import tempfile
import posixpath
@@ -74,8 +75,8 @@
if edit_local and filepath is None:
raise Exception # TODO: better exce... | {"golden_diff": "diff --git a/WrightTools/_base.py b/WrightTools/_base.py\n--- a/WrightTools/_base.py\n+++ b/WrightTools/_base.py\n@@ -5,6 +5,7 @@\n \n \n import shutil\n+import os\n import weakref\n import tempfile\n import posixpath\n@@ -74,8 +75,8 @@\n if edit_local and filepath is None:\n raise ... | 1,615 | 247 |
gh_patches_debug_25508 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-728 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
UploadFile causes ASGI application's exception when it is in debug mode
Apparently when we use the ASGI application in debug mode, it cannot print the value of variables if they are not JSON serializable.
... | diff --git a/strawberry/utils/debug.py b/strawberry/utils/debug.py
--- a/strawberry/utils/debug.py
+++ b/strawberry/utils/debug.py
@@ -1,6 +1,7 @@
import datetime
import json
-import typing
+from json import JSONEncoder
+from typing import Any, Dict
from pygments import highlight, lexers
from pygments.formatters ... | {"golden_diff": "diff --git a/strawberry/utils/debug.py b/strawberry/utils/debug.py\n--- a/strawberry/utils/debug.py\n+++ b/strawberry/utils/debug.py\n@@ -1,6 +1,7 @@\n import datetime\n import json\n-import typing\n+from json import JSONEncoder\n+from typing import Any, Dict\n \n from pygments import highlight, lexers... | 683 | 317 |
gh_patches_debug_33721 | rasdani/github-patches | git_diff | docker__docker-py-1178 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support create network EnableIPv6 and Labels options
Check the remote API:
https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-network
There are two missing JSON parameters:
```
... | diff --git a/docker/api/network.py b/docker/api/network.py
--- a/docker/api/network.py
+++ b/docker/api/network.py
@@ -22,7 +22,8 @@
@minimum_version('1.21')
def create_network(self, name, driver=None, options=None, ipam=None,
- check_duplicate=None, internal=False):
+ ... | {"golden_diff": "diff --git a/docker/api/network.py b/docker/api/network.py\n--- a/docker/api/network.py\n+++ b/docker/api/network.py\n@@ -22,7 +22,8 @@\n \n @minimum_version('1.21')\n def create_network(self, name, driver=None, options=None, ipam=None,\n- check_duplicate=None, internal=Fa... | 1,142 | 480 |
gh_patches_debug_20448 | rasdani/github-patches | git_diff | litestar-org__litestar-3454 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docs: Document SSE
### Summary
The SSE documentation is currently lacking:
- Docs for `ServerSentEventMessage`
- Sending messages a dicts
<!-- POLAR PLEDGE BADGE START -->
---
> [!NOTE]
> While we... | diff --git a/docs/examples/responses/sse_responses.py b/docs/examples/responses/sse_responses.py
--- a/docs/examples/responses/sse_responses.py
+++ b/docs/examples/responses/sse_responses.py
@@ -2,15 +2,28 @@
from typing import AsyncGenerator
from litestar import Litestar, get
-from litestar.response import ServerS... | {"golden_diff": "diff --git a/docs/examples/responses/sse_responses.py b/docs/examples/responses/sse_responses.py\n--- a/docs/examples/responses/sse_responses.py\n+++ b/docs/examples/responses/sse_responses.py\n@@ -2,15 +2,28 @@\n from typing import AsyncGenerator\n \n from litestar import Litestar, get\n-from litestar... | 739 | 332 |
gh_patches_debug_26741 | rasdani/github-patches | git_diff | pre-commit__pre-commit-893 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incorrect shebang in .git/hooks/pre-commit for python3 only installations
The shebang for `.git/hooks/pre-commit` is `#!/usr/bin/env python`. I work with setups where `python3` is the only python in env.
C... | diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py
--- a/pre_commit/commands/install_uninstall.py
+++ b/pre_commit/commands/install_uninstall.py
@@ -8,6 +8,7 @@
from pre_commit import git
from pre_commit import output
+from pre_commit.languages import python
from pre_c... | {"golden_diff": "diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py\n--- a/pre_commit/commands/install_uninstall.py\n+++ b/pre_commit/commands/install_uninstall.py\n@@ -8,6 +8,7 @@\n \n from pre_commit import git\n from pre_commit import output\n+from pre_commit.languages i... | 1,668 | 303 |
gh_patches_debug_35746 | rasdani/github-patches | git_diff | vispy__vispy-1391 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SceneGraph: HowTo view single scene in different viewboxes
Using https://github.com/vispy/vispy/blob/master/examples/basics/scene/one_scene_four_cams.py to view a single scene in four different viewboxes does... | diff --git a/examples/basics/scene/one_scene_four_cams.py b/examples/basics/scene/one_scene_four_cams.py
--- a/examples/basics/scene/one_scene_four_cams.py
+++ b/examples/basics/scene/one_scene_four_cams.py
@@ -8,11 +8,12 @@
"""
Demonstrating a single scene that is shown in four different viewboxes,
each with a diff... | {"golden_diff": "diff --git a/examples/basics/scene/one_scene_four_cams.py b/examples/basics/scene/one_scene_four_cams.py\n--- a/examples/basics/scene/one_scene_four_cams.py\n+++ b/examples/basics/scene/one_scene_four_cams.py\n@@ -8,11 +8,12 @@\n \"\"\"\n Demonstrating a single scene that is shown in four different vie... | 1,181 | 653 |
gh_patches_debug_26263 | rasdani/github-patches | git_diff | pypa__pip-2303 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Selfcheck failure on Windows
I get this warning all the time:
```
There was an error checking the latest version of pip
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\utils\outd... | diff --git a/pip/utils/outdated.py b/pip/utils/outdated.py
--- a/pip/utils/outdated.py
+++ b/pip/utils/outdated.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import datetime
+import errno
import json
import logging
import os.path
@@ -12,6 +13,7 @@
from pip.compat import total_seconds
from pip.index... | {"golden_diff": "diff --git a/pip/utils/outdated.py b/pip/utils/outdated.py\n--- a/pip/utils/outdated.py\n+++ b/pip/utils/outdated.py\n@@ -1,6 +1,7 @@\n from __future__ import absolute_import\n \n import datetime\n+import errno\n import json\n import logging\n import os.path\n@@ -12,6 +13,7 @@\n from pip.compat import ... | 1,665 | 319 |
gh_patches_debug_3852 | rasdani/github-patches | git_diff | electricitymaps__electricitymaps-contrib-1773 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Taiwan real-time data has stopped working
Taiwain seems to have been offline recently
It used to work correctly, something may have changed in the data source?
Kibana error description [here](https://kiba... | diff --git a/parsers/TW.py b/parsers/TW.py
--- a/parsers/TW.py
+++ b/parsers/TW.py
@@ -9,7 +9,7 @@
if target_datetime:
raise NotImplementedError('This parser is not yet able to parse past dates')
- url = 'http://data.taipower.com.tw/opendata01/apply/file/d006001/001.txt'
+ url = 'http://www.taipow... | {"golden_diff": "diff --git a/parsers/TW.py b/parsers/TW.py\n--- a/parsers/TW.py\n+++ b/parsers/TW.py\n@@ -9,7 +9,7 @@\n if target_datetime:\n raise NotImplementedError('This parser is not yet able to parse past dates')\n \n- url = 'http://data.taipower.com.tw/opendata01/apply/file/d006001/001.txt'\n+ ... | 1,620 | 136 |
gh_patches_debug_25842 | rasdani/github-patches | git_diff | amundsen-io__amundsen-1303 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug Report: Glue search_tables with Filters and result tables more than 100 items
<!--- Provide a general summary of the issue in the Title above -->
<!--- Look through existing open and closed issues to see... | diff --git a/databuilder/databuilder/extractor/glue_extractor.py b/databuilder/databuilder/extractor/glue_extractor.py
--- a/databuilder/databuilder/extractor/glue_extractor.py
+++ b/databuilder/databuilder/extractor/glue_extractor.py
@@ -19,12 +19,14 @@
CLUSTER_KEY = 'cluster'
FILTER_KEY = 'filters'
- D... | {"golden_diff": "diff --git a/databuilder/databuilder/extractor/glue_extractor.py b/databuilder/databuilder/extractor/glue_extractor.py\n--- a/databuilder/databuilder/extractor/glue_extractor.py\n+++ b/databuilder/databuilder/extractor/glue_extractor.py\n@@ -19,12 +19,14 @@\n \n CLUSTER_KEY = 'cluster'\n FILTER... | 1,661 | 338 |
gh_patches_debug_23504 | rasdani/github-patches | git_diff | iterative__dvc-8197 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
installing from Ubuntu repo does not install s3 adapter
# Bug Report
DVC version 2.6.3

DV... | diff --git a/scripts/pyinstaller/build.py b/scripts/pyinstaller/build.py
--- a/scripts/pyinstaller/build.py
+++ b/scripts/pyinstaller/build.py
@@ -1,6 +1,6 @@
import os
import pathlib
-from subprocess import STDOUT, check_call
+from subprocess import STDOUT, check_call, check_output
path = pathlib.Path(__file__).p... | {"golden_diff": "diff --git a/scripts/pyinstaller/build.py b/scripts/pyinstaller/build.py\n--- a/scripts/pyinstaller/build.py\n+++ b/scripts/pyinstaller/build.py\n@@ -1,6 +1,6 @@\n import os\n import pathlib\n-from subprocess import STDOUT, check_call\n+from subprocess import STDOUT, check_call, check_output\n \n path ... | 837 | 456 |
gh_patches_debug_5606 | rasdani/github-patches | git_diff | ansible__ansible-lint-477 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
False positive EANSIBLE0014 also flags vars in shell task
# Issue Type
- Bug report
# Ansible and Ansible Lint details
```
ansible --version
ansible 2.3.0.0
ansible-lint --version
ansible-lint 3.4.13... | diff --git a/lib/ansiblelint/rules/EnvVarsInCommandRule.py b/lib/ansiblelint/rules/EnvVarsInCommandRule.py
--- a/lib/ansiblelint/rules/EnvVarsInCommandRule.py
+++ b/lib/ansiblelint/rules/EnvVarsInCommandRule.py
@@ -38,7 +38,7 @@
LINE_NUMBER_KEY, FILENAME_KEY]
def matchtask(self, file, task)... | {"golden_diff": "diff --git a/lib/ansiblelint/rules/EnvVarsInCommandRule.py b/lib/ansiblelint/rules/EnvVarsInCommandRule.py\n--- a/lib/ansiblelint/rules/EnvVarsInCommandRule.py\n+++ b/lib/ansiblelint/rules/EnvVarsInCommandRule.py\n@@ -38,7 +38,7 @@\n LINE_NUMBER_KEY, FILENAME_KEY]\n \n def matc... | 1,051 | 148 |
gh_patches_debug_20627 | rasdani/github-patches | git_diff | ciudadanointeligente__votainteligente-portal-electoral-283 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Candidate has_answered siempre en false
¿Cómo se hace para que deje de mostrar el enlace a twitter para candidatos que tienen todas las respuestas?
¿Cómo se hace para cambiar "pídele" por "pedile"?
--- END ... | diff --git a/elections/models.py b/elections/models.py
--- a/elections/models.py
+++ b/elections/models.py
@@ -6,7 +6,7 @@
from popolo.models import Person, Area
from django.utils.translation import ugettext_lazy as _
from markdown_deux.templatetags.markdown_deux_tags import markdown_allowed
-from candidator.models ... | {"golden_diff": "diff --git a/elections/models.py b/elections/models.py\n--- a/elections/models.py\n+++ b/elections/models.py\n@@ -6,7 +6,7 @@\n from popolo.models import Person, Area\n from django.utils.translation import ugettext_lazy as _\n from markdown_deux.templatetags.markdown_deux_tags import markdown_allowed\n... | 1,574 | 221 |
gh_patches_debug_6647 | rasdani/github-patches | git_diff | elastic__apm-agent-python-1647 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[META 555] Add automated span type/subtype checking against shared spec
Spec PR: https://github.com/elastic/apm/pull/443
To start, we would just ensure that all span types/subtypes appear in the spec. In t... | diff --git a/elasticapm/instrumentation/packages/asyncio/aiopg.py b/elasticapm/instrumentation/packages/asyncio/aiopg.py
--- a/elasticapm/instrumentation/packages/asyncio/aiopg.py
+++ b/elasticapm/instrumentation/packages/asyncio/aiopg.py
@@ -58,7 +58,7 @@
else:
raise AssertionError("call from uni... | {"golden_diff": "diff --git a/elasticapm/instrumentation/packages/asyncio/aiopg.py b/elasticapm/instrumentation/packages/asyncio/aiopg.py\n--- a/elasticapm/instrumentation/packages/asyncio/aiopg.py\n+++ b/elasticapm/instrumentation/packages/asyncio/aiopg.py\n@@ -58,7 +58,7 @@\n else:\n raise Asserti... | 1,184 | 171 |
gh_patches_debug_34381 | rasdani/github-patches | git_diff | facebookresearch__hydra-1560 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[callbacks] call on_*_end events in reverse order
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `hydra/co... | diff --git a/hydra/core/callbacks.py b/hydra/core/callbacks.py
--- a/hydra/core/callbacks.py
+++ b/hydra/core/callbacks.py
@@ -14,8 +14,9 @@
for params in config.hydra.callbacks.values():
self.callbacks.append(instantiate(params))
- def _notify(self, function_name: str, **kwargs: Any) -> None... | {"golden_diff": "diff --git a/hydra/core/callbacks.py b/hydra/core/callbacks.py\n--- a/hydra/core/callbacks.py\n+++ b/hydra/core/callbacks.py\n@@ -14,8 +14,9 @@\n for params in config.hydra.callbacks.values():\n self.callbacks.append(instantiate(params))\n \n- def _notify(self, function_name: str... | 786 | 504 |
gh_patches_debug_23761 | rasdani/github-patches | git_diff | fossasia__open-event-server-5139 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add custom form for attendees
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
Add c... | diff --git a/app/models/custom_form.py b/app/models/custom_form.py
--- a/app/models/custom_form.py
+++ b/app/models/custom_form.py
@@ -35,8 +35,34 @@
"linkedin": {"include": 0, "require": 0}
}
+ATTENDEE_FORM = {
+ "firstname": {"include": 1, "require": 1},
+ "lastname": {"include": 1, "require": 1},
+ ... | {"golden_diff": "diff --git a/app/models/custom_form.py b/app/models/custom_form.py\n--- a/app/models/custom_form.py\n+++ b/app/models/custom_form.py\n@@ -35,8 +35,34 @@\n \"linkedin\": {\"include\": 0, \"require\": 0}\n }\n \n+ATTENDEE_FORM = {\n+ \"firstname\": {\"include\": 1, \"require\": 1},\n+ \"lastnam... | 1,406 | 517 |
gh_patches_debug_9114 | rasdani/github-patches | git_diff | UTNkar__moore-183 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Centre drive embeds
<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se -->
### Description
Center drive embeds. Currently it looks a bit... | diff --git a/src/google/models.py b/src/google/models.py
--- a/src/google/models.py
+++ b/src/google/models.py
@@ -21,7 +21,7 @@
label = _('Google Form')
icon = 'fa-check-square-o'
template = 'google/blocks/form.html'
- group = _('Meta')
+ group = _('Embed')
class GoogleFor... | {"golden_diff": "diff --git a/src/google/models.py b/src/google/models.py\n--- a/src/google/models.py\n+++ b/src/google/models.py\n@@ -21,7 +21,7 @@\n label = _('Google Form')\n icon = 'fa-check-square-o'\n template = 'google/blocks/form.html'\n- group = _('Meta')\n+ group = _('Emb... | 1,559 | 134 |
gh_patches_debug_41589 | rasdani/github-patches | git_diff | getsentry__sentry-python-851 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Django 3.1 async views do not work
When using sentry versions greater than 0.16.3, (tested on 0.18.0), Django 3.1 aysnc views do not work.
```
log.py 224 ERROR Internal Server Error... | diff --git a/sentry_sdk/integrations/django/asgi.py b/sentry_sdk/integrations/django/asgi.py
--- a/sentry_sdk/integrations/django/asgi.py
+++ b/sentry_sdk/integrations/django/asgi.py
@@ -6,10 +6,9 @@
`django.core.handlers.asgi`.
"""
-from sentry_sdk import Hub
+from sentry_sdk import Hub, _functools
from sentry_sd... | {"golden_diff": "diff --git a/sentry_sdk/integrations/django/asgi.py b/sentry_sdk/integrations/django/asgi.py\n--- a/sentry_sdk/integrations/django/asgi.py\n+++ b/sentry_sdk/integrations/django/asgi.py\n@@ -6,10 +6,9 @@\n `django.core.handlers.asgi`.\n \"\"\"\n \n-from sentry_sdk import Hub\n+from sentry_sdk import Hub... | 1,669 | 954 |
gh_patches_debug_797 | rasdani/github-patches | git_diff | pre-commit__pre-commit-167 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
npmrc causes npm to install to home directory instead of nodeenv
Here is what happened when I tried to get eslint installed:
```
$ pre-commit run --all-files
eslint............................................. | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@
'aspy.yaml',
'cached-property',
'jsonschema',
- 'nodeenv>=0.9.4',
+ 'nodeenv>=0.11.1',
'ordereddict',
'plumbum',
'pyyaml',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -41,7 +41,7 @@\n 'aspy.yaml',\n 'cached-property',\n 'jsonschema',\n- 'nodeenv>=0.9.4',\n+ 'nodeenv>=0.11.1',\n 'ordereddict',\n 'plumbum',\n 'pyyaml',\n", "issue": "npmrc ... | 823 | 89 |
gh_patches_debug_20356 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-5615 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
tools/c7n-org - azure subscription generation includes disabled subscriptions
per report on gitter.
ngibbondaimler - We used azuresubs.py from c7n-org to generate a list of our subscriptions, however it'... | diff --git a/tools/c7n_org/scripts/azuresubs.py b/tools/c7n_org/scripts/azuresubs.py
--- a/tools/c7n_org/scripts/azuresubs.py
+++ b/tools/c7n_org/scripts/azuresubs.py
@@ -22,7 +22,12 @@
@click.option(
'-f', '--output', type=click.File('w'),
help="File to store the generated config (default stdout)")
-def mai... | {"golden_diff": "diff --git a/tools/c7n_org/scripts/azuresubs.py b/tools/c7n_org/scripts/azuresubs.py\n--- a/tools/c7n_org/scripts/azuresubs.py\n+++ b/tools/c7n_org/scripts/azuresubs.py\n@@ -22,7 +22,12 @@\n @click.option(\n '-f', '--output', type=click.File('w'),\n help=\"File to store the generated config (de... | 869 | 265 |
gh_patches_debug_13047 | rasdani/github-patches | git_diff | doccano__doccano-1558 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Mutli-label text classification export issues: same classes but in different orders
How to reproduce the behaviour
---------
<!-- Before submitting an issue, make sure to check the docs and closed issues an... | diff --git a/backend/api/views/download/writer.py b/backend/api/views/download/writer.py
--- a/backend/api/views/download/writer.py
+++ b/backend/api/views/download/writer.py
@@ -84,7 +84,7 @@
return {
'id': record.id,
'data': record.data,
- 'label': '#'.join(record.label),... | {"golden_diff": "diff --git a/backend/api/views/download/writer.py b/backend/api/views/download/writer.py\n--- a/backend/api/views/download/writer.py\n+++ b/backend/api/views/download/writer.py\n@@ -84,7 +84,7 @@\n return {\n 'id': record.id,\n 'data': record.data,\n- 'label':... | 1,841 | 164 |
gh_patches_debug_33390 | rasdani/github-patches | git_diff | kivy__kivy-1947 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TextInput crashes while using clipboard bubble
After opening clipboard bubble, keyboard doesn't close anymore.
Moreover, when closing application, it gives:
```
I/python ( 4932): [INFO ] [Clipb... | diff --git a/kivy/core/clipboard/clipboard_android.py b/kivy/core/clipboard/clipboard_android.py
--- a/kivy/core/clipboard/clipboard_android.py
+++ b/kivy/core/clipboard/clipboard_android.py
@@ -14,8 +14,8 @@
AndroidString = autoclass('java.lang.String')
PythonActivity = autoclass('org.renpy.android.PythonActivity')
... | {"golden_diff": "diff --git a/kivy/core/clipboard/clipboard_android.py b/kivy/core/clipboard/clipboard_android.py\n--- a/kivy/core/clipboard/clipboard_android.py\n+++ b/kivy/core/clipboard/clipboard_android.py\n@@ -14,8 +14,8 @@\n AndroidString = autoclass('java.lang.String')\n PythonActivity = autoclass('org.renpy.and... | 1,496 | 514 |
gh_patches_debug_9553 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-3064 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Not really possible to override settings
## Description
I want to override the mathsar settings in order to allow LDAP login using django-auth-ldap. I changed the `config/settings/production.py` file that me... | diff --git a/config/settings/development.py b/config/settings/development.py
--- a/config/settings/development.py
+++ b/config/settings/development.py
@@ -1,3 +1,10 @@
from config.settings.common_settings import * # noqa
# Override default settings
+
+
+# Use a local.py module for settings that shouldn't be version... | {"golden_diff": "diff --git a/config/settings/development.py b/config/settings/development.py\n--- a/config/settings/development.py\n+++ b/config/settings/development.py\n@@ -1,3 +1,10 @@\n from config.settings.common_settings import * # noqa\n \n # Override default settings\n+\n+\n+# Use a local.py module for settings... | 608 | 192 |
gh_patches_debug_4675 | rasdani/github-patches | git_diff | pypa__pip-5931 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pip uses deprecated SafeConfigParser
* Pip version: 9.0.1
* Python version: 3.6.1
* Operating system: Mac OS X 10.12.4
### Description:
With `error::DeprecationWarning` in `PYTHONWARNINGS`:
```
pi... | diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py
--- a/src/pip/_internal/vcs/mercurial.py
+++ b/src/pip/_internal/vcs/mercurial.py
@@ -45,7 +45,7 @@
def switch(self, dest, url, rev_options):
repo_config = os.path.join(dest, self.dirname, 'hgrc')
- config = conf... | {"golden_diff": "diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py\n--- a/src/pip/_internal/vcs/mercurial.py\n+++ b/src/pip/_internal/vcs/mercurial.py\n@@ -45,7 +45,7 @@\n \n def switch(self, dest, url, rev_options):\n repo_config = os.path.join(dest, self.dirname, 'hgrc')... | 1,756 | 140 |
gh_patches_debug_3922 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-773 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hide TensorBoard service REST call logs
Currently these logs appear on master pod's log which is not necessary at user level:
```
I0624 15:50:54.834580 140272641951488 _internal.py:122] ::ffff:10.138.0.35 -... | diff --git a/elasticdl/python/elasticdl/master/tensorboard_service.py b/elasticdl/python/elasticdl/master/tensorboard_service.py
--- a/elasticdl/python/elasticdl/master/tensorboard_service.py
+++ b/elasticdl/python/elasticdl/master/tensorboard_service.py
@@ -34,7 +34,10 @@
def start(self):
self.tb_proce... | {"golden_diff": "diff --git a/elasticdl/python/elasticdl/master/tensorboard_service.py b/elasticdl/python/elasticdl/master/tensorboard_service.py\n--- a/elasticdl/python/elasticdl/master/tensorboard_service.py\n+++ b/elasticdl/python/elasticdl/master/tensorboard_service.py\n@@ -34,7 +34,10 @@\n \n def start(self):\... | 1,293 | 158 |
gh_patches_debug_32860 | rasdani/github-patches | git_diff | qutebrowser__qutebrowser-3702 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Crash with invalid dictionary filenames
Looks like this doesn't get caught properly on init:
```
16:39:44 DEBUG init app:_init_modules:468 Initializing websettings...
16:39:45 ERROR misc ... | diff --git a/qutebrowser/browser/webengine/spell.py b/qutebrowser/browser/webengine/spell.py
--- a/qutebrowser/browser/webengine/spell.py
+++ b/qutebrowser/browser/webengine/spell.py
@@ -24,16 +24,18 @@
import re
from PyQt5.QtCore import QLibraryInfo
-from qutebrowser.utils import log
+from qutebrowser.utils import... | {"golden_diff": "diff --git a/qutebrowser/browser/webengine/spell.py b/qutebrowser/browser/webengine/spell.py\n--- a/qutebrowser/browser/webengine/spell.py\n+++ b/qutebrowser/browser/webengine/spell.py\n@@ -24,16 +24,18 @@\n import re\n \n from PyQt5.QtCore import QLibraryInfo\n-from qutebrowser.utils import log\n+from... | 1,669 | 537 |
gh_patches_debug_4226 | rasdani/github-patches | git_diff | mlflow__mlflow-3598 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unpin sqlalchemy
Hi,
Currently mlflow pins sqlalchemy to `<= 1.3.13`. I wanted to use this package on a projects that requires a more updated version of sqlalchemy.
Would it be possible to unpit sqlalchem... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,7 @@
# Pin sqlparse for: https://github.com/mlflow/mlflow/issues/3433
"sqlparse>=0.3.1",
# Required to run the MLflow server against SQL-backed storage
- "sqlalchemy<=1.3.13",
+ "sqlalchemy",
"g... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -54,7 +54,7 @@\n # Pin sqlparse for: https://github.com/mlflow/mlflow/issues/3433\n \"sqlparse>=0.3.1\",\n # Required to run the MLflow server against SQL-backed storage\n- \"sqlalchemy<=1.3.13\",\n+ ... | 1,377 | 114 |
gh_patches_debug_5864 | rasdani/github-patches | git_diff | pyca__cryptography-1575 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build automation fixes for 8th release
When triggering the wheel build the release automation does not appropriately wait for the build to complete but instead grabs the previous build. The previous attempted... | diff --git a/tasks.py b/tasks.py
--- a/tasks.py
+++ b/tasks.py
@@ -17,9 +17,9 @@
def wait_for_build_completed(session):
- # Wait 3 seconds before actually checking if the build is complete, to
+ # Wait 20 seconds before actually checking if the build is complete, to
# ensure that it had time to really s... | {"golden_diff": "diff --git a/tasks.py b/tasks.py\n--- a/tasks.py\n+++ b/tasks.py\n@@ -17,9 +17,9 @@\n \n \n def wait_for_build_completed(session):\n- # Wait 3 seconds before actually checking if the build is complete, to\n+ # Wait 20 seconds before actually checking if the build is complete, to\n # ensure th... | 1,310 | 130 |
gh_patches_debug_37607 | rasdani/github-patches | git_diff | RedHatInsights__insights-core-1525 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[RFE] Results to include positive NACK - CVEs to which a system is NOT vulnerable
Use case: VMaaS provides list of CVEs to which a system is vulnerable, based on list of packages' NEVRAs installed on the syst... | diff --git a/insights/core/evaluators.py b/insights/core/evaluators.py
--- a/insights/core/evaluators.py
+++ b/insights/core/evaluators.py
@@ -1,6 +1,9 @@
import logging
+import six
import sys
+from collections import defaultdict
+
from ..formats import Formatter
from ..specs import Specs
from ..combiners.hostna... | {"golden_diff": "diff --git a/insights/core/evaluators.py b/insights/core/evaluators.py\n--- a/insights/core/evaluators.py\n+++ b/insights/core/evaluators.py\n@@ -1,6 +1,9 @@\n import logging\n+import six\n import sys\n \n+from collections import defaultdict\n+\n from ..formats import Formatter\n from ..specs import Sp... | 1,885 | 621 |
gh_patches_debug_4530 | rasdani/github-patches | git_diff | ivy-llc__ivy-16060 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cross
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/tensor/linalg.py`
Co... | diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -7,6 +7,15 @@
)
+@with_supported_dtypes(
+ {"2.4.2 and below": ("float32", "float64", ... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py\n--- a/ivy/functional/frontends/paddle/tensor/linalg.py\n+++ b/ivy/functional/frontends/paddle/tensor/linalg.py\n@@ -7,6 +7,15 @@\n )\n \n \n+@with_supported_dtypes(\n+ {\"2.4.2 and below... | 1,438 | 223 |
gh_patches_debug_22157 | rasdani/github-patches | git_diff | lutris__lutris-1197 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Change "Import Games" to something more clear (like "Configure library importing")
I personally feel like the current name for that menu is confusing, misleading and does't represent its actual purpose. I per... | diff --git a/lutris/gui/sync.py b/lutris/gui/sync.py
--- a/lutris/gui/sync.py
+++ b/lutris/gui/sync.py
@@ -59,7 +59,7 @@
class SyncServiceDialog(Gtk.Dialog):
def __init__(self, parent=None):
- Gtk.Dialog.__init__(self, title="Import local games", parent=parent)
+ Gtk.Dialog.__init__(self, title="C... | {"golden_diff": "diff --git a/lutris/gui/sync.py b/lutris/gui/sync.py\n--- a/lutris/gui/sync.py\n+++ b/lutris/gui/sync.py\n@@ -59,7 +59,7 @@\n class SyncServiceDialog(Gtk.Dialog):\n \n def __init__(self, parent=None):\n- Gtk.Dialog.__init__(self, title=\"Import local games\", parent=parent)\n+ Gtk.Dia... | 1,168 | 269 |
gh_patches_debug_38060 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-5102 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix Costa Coffee (US) which has switched from Amasty to a JSON API
In the latest weekly run, Costa Coffee (costacoffee_us) is now broken with the Amasty "amlocator" AJAX endpoint no longer existing. In it's p... | diff --git a/locations/spiders/costacoffee_us.py b/locations/spiders/costacoffee_us.py
--- a/locations/spiders/costacoffee_us.py
+++ b/locations/spiders/costacoffee_us.py
@@ -1,49 +1,38 @@
-import json
-import re
-
-import scrapy
-from scrapy import Selector
+from scrapy import Spider
+from scrapy.http import JsonReque... | {"golden_diff": "diff --git a/locations/spiders/costacoffee_us.py b/locations/spiders/costacoffee_us.py\n--- a/locations/spiders/costacoffee_us.py\n+++ b/locations/spiders/costacoffee_us.py\n@@ -1,49 +1,38 @@\n-import json\n-import re\n-\n-import scrapy\n-from scrapy import Selector\n+from scrapy import Spider\n+from s... | 926 | 846 |
gh_patches_debug_6880 | rasdani/github-patches | git_diff | scikit-image__scikit-image-6733 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Invalid f-string in _warnings
### Description:
```
f4978b1149 skimage/_shared/_warnings.py (Jarrod Millman 2022-10-11 17:14:49 -0700 145) msg = f"No warning raised matching:\n{{'\n'.join... | diff --git a/skimage/_shared/_warnings.py b/skimage/_shared/_warnings.py
--- a/skimage/_shared/_warnings.py
+++ b/skimage/_shared/_warnings.py
@@ -142,5 +142,6 @@
if strict_warnings and not found:
raise ValueError(f'Unexpected warning: {str(warn.message)}')
if strict_warnings and ... | {"golden_diff": "diff --git a/skimage/_shared/_warnings.py b/skimage/_shared/_warnings.py\n--- a/skimage/_shared/_warnings.py\n+++ b/skimage/_shared/_warnings.py\n@@ -142,5 +142,6 @@\n if strict_warnings and not found:\n raise ValueError(f'Unexpected warning: {str(warn.message)}')\n ... | 1,903 | 144 |
gh_patches_debug_21453 | rasdani/github-patches | git_diff | mozmeao__basket-1036 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add content-type header for Acoustic Transact requests
Transact customers using Oauth for submissions should add header:
`Content-Type : text/plain` or
`Content-Type : text/xml`
--- END ISSUE ---
Be... | diff --git a/basket/news/backends/acoustic.py b/basket/news/backends/acoustic.py
--- a/basket/news/backends/acoustic.py
+++ b/basket/news/backends/acoustic.py
@@ -90,6 +90,7 @@
self.api_endpoint,
data=force_bytes(xml),
timeout=10,
+ headers={"Content-Typ... | {"golden_diff": "diff --git a/basket/news/backends/acoustic.py b/basket/news/backends/acoustic.py\n--- a/basket/news/backends/acoustic.py\n+++ b/basket/news/backends/acoustic.py\n@@ -90,6 +90,7 @@\n self.api_endpoint,\n data=force_bytes(xml),\n timeout=10,\n+ ... | 1,614 | 202 |
gh_patches_debug_17418 | rasdani/github-patches | git_diff | zulip__zulip-3596 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wikipedia bot crashes when the query contains multiple word delimit by underscore.
The bot is under `contrib_bots/bots`. Some error handling is needed.
--- END ISSUE ---
Below are some code segments, each ... | diff --git a/contrib_bots/bots/wikipedia/wikipedia.py b/contrib_bots/bots/wikipedia/wikipedia.py
--- a/contrib_bots/bots/wikipedia/wikipedia.py
+++ b/contrib_bots/bots/wikipedia/wikipedia.py
@@ -60,12 +60,12 @@
logging.error('unsuccessful data')
return
- search_string = data.json()['q... | {"golden_diff": "diff --git a/contrib_bots/bots/wikipedia/wikipedia.py b/contrib_bots/bots/wikipedia/wikipedia.py\n--- a/contrib_bots/bots/wikipedia/wikipedia.py\n+++ b/contrib_bots/bots/wikipedia/wikipedia.py\n@@ -60,12 +60,12 @@\n logging.error('unsuccessful data')\n return\n \n- search... | 1,023 | 226 |
gh_patches_debug_24325 | rasdani/github-patches | git_diff | xonsh__xonsh-3002 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cmd && othercmd throws an exception
```
➤ ls &&Exception in thread Thread-35:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
F... | diff --git a/xonsh/completers/base.py b/xonsh/completers/base.py
--- a/xonsh/completers/base.py
+++ b/xonsh/completers/base.py
@@ -11,19 +11,21 @@
and paths. If we are completing the first argument, complete based on
valid commands and python names.
"""
+ # get and unpack python completions
+ pyth... | {"golden_diff": "diff --git a/xonsh/completers/base.py b/xonsh/completers/base.py\n--- a/xonsh/completers/base.py\n+++ b/xonsh/completers/base.py\n@@ -11,19 +11,21 @@\n and paths. If we are completing the first argument, complete based on\n valid commands and python names.\n \"\"\"\n+ # get and unpack p... | 1,012 | 386 |
gh_patches_debug_22442 | rasdani/github-patches | git_diff | getsentry__sentry-24461 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
I have an issue when I import the export json file
## Important Details
On-Premise w/ Docker, version 9.1.2
## Description
I have two servers with a sentry. There are several projects on the first se... | diff --git a/src/sentry/db/models/fields/array.py b/src/sentry/db/models/fields/array.py
--- a/src/sentry/db/models/fields/array.py
+++ b/src/sentry/db/models/fields/array.py
@@ -1,3 +1,5 @@
+import ast
+
from django.db import models
from sentry.db.models.utils import Creator
@@ -36,9 +38,26 @@
def get_interna... | {"golden_diff": "diff --git a/src/sentry/db/models/fields/array.py b/src/sentry/db/models/fields/array.py\n--- a/src/sentry/db/models/fields/array.py\n+++ b/src/sentry/db/models/fields/array.py\n@@ -1,3 +1,5 @@\n+import ast\n+\n from django.db import models\n \n from sentry.db.models.utils import Creator\n@@ -36,9 +38,... | 1,583 | 319 |
gh_patches_debug_40098 | rasdani/github-patches | git_diff | pytorch__vision-6458 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Port `transforms.LinearTransformation` to `prototype.transforms`
cc @vfdev-5 @datumbox @bjuncek
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may cont... | diff --git a/torchvision/prototype/transforms/__init__.py b/torchvision/prototype/transforms/__init__.py
--- a/torchvision/prototype/transforms/__init__.py
+++ b/torchvision/prototype/transforms/__init__.py
@@ -37,7 +37,7 @@
TenCrop,
)
from ._meta import ConvertBoundingBoxFormat, ConvertColorSpace, ConvertImageD... | {"golden_diff": "diff --git a/torchvision/prototype/transforms/__init__.py b/torchvision/prototype/transforms/__init__.py\n--- a/torchvision/prototype/transforms/__init__.py\n+++ b/torchvision/prototype/transforms/__init__.py\n@@ -37,7 +37,7 @@\n TenCrop,\n )\n from ._meta import ConvertBoundingBoxFormat, ConvertCo... | 1,574 | 862 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.