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_626 | rasdani/github-patches | git_diff | bridgecrewio__checkov-2810 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
HCL2 parser cannot parse functions with comments interleaved in the arguments.
**Describe the issue**
The HCL2 parser fails to parse a file that contains an expression with a Terraform function call that con... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@
]
},
install_requires=[
- "bc-python-hcl2==0.3.38",
+ "bc-python-hcl2==0.3.39",
"cloudsplaining>=0.4.1",
"deep_merge",
"tabulate",
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -33,7 +33,7 @@\n ]\n },\n install_requires=[\n- \"bc-python-hcl2==0.3.38\",\n+ \"bc-python-hcl2==0.3.39\",\n \"cloudsplaining>=0.4.1\",\n \"deep_merge\",\n \"tabulate\",\n", "issue... | 1,543 | 94 |
gh_patches_debug_18241 | rasdani/github-patches | git_diff | getsentry__sentry-python-1016 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
sync_and_async_middleware throws exception
Which SDK and version?
sentry_sdk==0.20.0
uvicorn==0.13.3
gunicorn==20.0.4
django==3.1.6
### Steps to Reproduce
copy the middleware example from django [do... | 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
@@ -104,6 +104,9 @@
"""
class SentryASGIMixin:
+ if MYPY:
+ _inner = None
+
def __init__(self, get... | {"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@@ -104,6 +104,9 @@\n \"\"\"\n \n class SentryASGIMixin:\n+ if MYPY:\n+ _inner = None\n+\n ... | 2,042 | 259 |
gh_patches_debug_579 | rasdani/github-patches | git_diff | pex-tool__pex-792 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.0.0
On the docket:
+ [x] Use pip for resolving and building distributions. #788
+ [x] Pex defaults to reproduceable builds. #791
That one issue closes out a slew of others, partially documented... | 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__ = '1.6.12'
+__version__ = '2.0.0'
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = '1.6.12'\n+__version__ = '2.0.0'\n", "issue... | 372 | 95 |
gh_patches_debug_3091 | rasdani/github-patches | git_diff | tensorflow__addons-700 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lifted Struct Loss Error
**System information**
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Google Colab (Linux)
- TensorFlow version and how it was installed (source or binary): binary 2.0
... | diff --git a/tensorflow_addons/losses/lifted.py b/tensorflow_addons/losses/lifted.py
--- a/tensorflow_addons/losses/lifted.py
+++ b/tensorflow_addons/losses/lifted.py
@@ -39,7 +39,6 @@
"""
# Reshape [batch_size] label tensor to a [batch_size, 1] label tensor.
lshape = tf.shape(labels)
- assert lshape.... | {"golden_diff": "diff --git a/tensorflow_addons/losses/lifted.py b/tensorflow_addons/losses/lifted.py\n--- a/tensorflow_addons/losses/lifted.py\n+++ b/tensorflow_addons/losses/lifted.py\n@@ -39,7 +39,6 @@\n \"\"\"\n # Reshape [batch_size] label tensor to a [batch_size, 1] label tensor.\n lshape = tf.shape(l... | 2,038 | 139 |
gh_patches_debug_32906 | rasdani/github-patches | git_diff | ResonantGeoData__ResonantGeoData-579 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use memcached with large_image
Right now, large_image is using Python memory for caching per process (large_image logs `Using python for large_image caching` anytime we request tiles). This means the cache is... | diff --git a/django-rgd-imagery/rgd_imagery/__init__.py b/django-rgd-imagery/rgd_imagery/__init__.py
--- a/django-rgd-imagery/rgd_imagery/__init__.py
+++ b/django-rgd-imagery/rgd_imagery/__init__.py
@@ -1,3 +1,7 @@
+import logging
+
+from django.conf import settings
+import large_image
from pkg_resources import Distri... | {"golden_diff": "diff --git a/django-rgd-imagery/rgd_imagery/__init__.py b/django-rgd-imagery/rgd_imagery/__init__.py\n--- a/django-rgd-imagery/rgd_imagery/__init__.py\n+++ b/django-rgd-imagery/rgd_imagery/__init__.py\n@@ -1,3 +1,7 @@\n+import logging\n+\n+from django.conf import settings\n+import large_image\n from pk... | 1,866 | 671 |
gh_patches_debug_10710 | rasdani/github-patches | git_diff | python-discord__bot-1132 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Mod-alerts channel pings when large amounts of emojis are within a code block.
When a user inputs a large amount of emojis in a code block, it seems that the bot does not ignore them and proceeds to mute for ... | diff --git a/bot/rules/discord_emojis.py b/bot/rules/discord_emojis.py
--- a/bot/rules/discord_emojis.py
+++ b/bot/rules/discord_emojis.py
@@ -5,6 +5,7 @@
DISCORD_EMOJI_RE = re.compile(r"<:\w+:\d+>")
+CODE_BLOCK_RE = re.compile(r"```.*?```", flags=re.DOTALL)
async def apply(
@@ -17,8 +18,9 @@
if msg.... | {"golden_diff": "diff --git a/bot/rules/discord_emojis.py b/bot/rules/discord_emojis.py\n--- a/bot/rules/discord_emojis.py\n+++ b/bot/rules/discord_emojis.py\n@@ -5,6 +5,7 @@\n \n \n DISCORD_EMOJI_RE = re.compile(r\"<:\\w+:\\d+>\")\n+CODE_BLOCK_RE = re.compile(r\"```.*?```\", flags=re.DOTALL)\n \n \n async def apply(\n... | 677 | 191 |
gh_patches_debug_11236 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-3478 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Document all the scalars we have
One that's definitely missing is the JSON one, or at least it doesn't show up on the search (we do get an example of creating a custom JSON scalar though, which is misleading)... | diff --git a/strawberry/scalars.py b/strawberry/scalars.py
--- a/strawberry/scalars.py
+++ b/strawberry/scalars.py
@@ -16,10 +16,10 @@
description=(
"The `JSON` scalar type represents JSON values as specified by "
"[ECMA-404]"
- "(http://www.ecma-international.org/publications/files/ECMA-S... | {"golden_diff": "diff --git a/strawberry/scalars.py b/strawberry/scalars.py\n--- a/strawberry/scalars.py\n+++ b/strawberry/scalars.py\n@@ -16,10 +16,10 @@\n description=(\n \"The `JSON` scalar type represents JSON values as specified by \"\n \"[ECMA-404]\"\n- \"(http://www.ecma-international.... | 1,211 | 229 |
gh_patches_debug_26272 | rasdani/github-patches | git_diff | nonebot__nonebot2-711 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
single session插件无法正常运作
**描述问题:**
如果在另一个 `run_preprocessor` 中 `raise IgnoredException` , 会导致 `single session` 插件无法正确执行删除操作 , 导致之后的 `matcher` 被无情 `IgnoredException(Another matcher running)` 掉
**如何复现?**
... | diff --git a/nonebot/plugins/single_session.py b/nonebot/plugins/single_session.py
--- a/nonebot/plugins/single_session.py
+++ b/nonebot/plugins/single_session.py
@@ -1,34 +1,31 @@
-from typing import Dict
+from typing import Dict, Generator
from nonebot.adapters import Event
-from nonebot.message import (
- Igno... | {"golden_diff": "diff --git a/nonebot/plugins/single_session.py b/nonebot/plugins/single_session.py\n--- a/nonebot/plugins/single_session.py\n+++ b/nonebot/plugins/single_session.py\n@@ -1,34 +1,31 @@\n-from typing import Dict\n+from typing import Dict, Generator\n \n from nonebot.adapters import Event\n-from nonebot.m... | 724 | 442 |
gh_patches_debug_15227 | rasdani/github-patches | git_diff | sunpy__sunpy-2586 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation of sunpy via pip with all dependencies fails
python3.6, pip9.03
pip install sunpy[all]
...
Collecting dateutil; extra == "all" (from sunpy[all])
Could not find a version tha... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -108,7 +108,7 @@
extras_require = {'database': ["sqlalchemy"],
'image': ["scikit-image"],
'jpeg2000': ["glymur"],
- 'net': ["suds-jurko", "beautifulsoup4", "requests", "dateutil"],
+ ... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -108,7 +108,7 @@\n extras_require = {'database': [\"sqlalchemy\"],\n 'image': [\"scikit-image\"],\n 'jpeg2000': [\"glymur\"],\n- 'net': [\"suds-jurko\", \"beautifulsoup4\", \"reques... | 1,846 | 178 |
gh_patches_debug_22995 | rasdani/github-patches | git_diff | pyqtgraph__pyqtgraph-1778 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GLVolumeItem example rendered image changed
<!-- In the following, please describe your issue in detail! -->
<!-- If some of the sections do not apply, just remove them. -->
### Short description
<!-- Th... | diff --git a/examples/GLVolumeItem.py b/examples/GLVolumeItem.py
--- a/examples/GLVolumeItem.py
+++ b/examples/GLVolumeItem.py
@@ -18,8 +18,6 @@
w.show()
w.setWindowTitle('pyqtgraph example: GLVolumeItem')
-#b = gl.GLBoxItem()
-#w.addItem(b)
g = gl.GLGridItem()
g.scale(10, 10, 1)
w.addItem(g)
@@ -32,13 +30,20 @@... | {"golden_diff": "diff --git a/examples/GLVolumeItem.py b/examples/GLVolumeItem.py\n--- a/examples/GLVolumeItem.py\n+++ b/examples/GLVolumeItem.py\n@@ -18,8 +18,6 @@\n w.show()\n w.setWindowTitle('pyqtgraph example: GLVolumeItem')\n \n-#b = gl.GLBoxItem()\n-#w.addItem(b)\n g = gl.GLGridItem()\n g.scale(10, 10, 1)\n w.ad... | 1,420 | 486 |
gh_patches_debug_12220 | rasdani/github-patches | git_diff | ESMCI__cime-2187 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
use MAX_MPI_TASKS_PER_NODE for core limit in test_schedular
The current scheme fails to run tests on small systems that should be okay even though they overload the node.
--- END ISSUE ---
Below are some c... | diff --git a/scripts/lib/CIME/SystemTests/pet.py b/scripts/lib/CIME/SystemTests/pet.py
--- a/scripts/lib/CIME/SystemTests/pet.py
+++ b/scripts/lib/CIME/SystemTests/pet.py
@@ -46,6 +46,7 @@
# to the batch submission, things break. Setting MAX_TASKS_PER_NODE to half of
# it original value prevents this.... | {"golden_diff": "diff --git a/scripts/lib/CIME/SystemTests/pet.py b/scripts/lib/CIME/SystemTests/pet.py\n--- a/scripts/lib/CIME/SystemTests/pet.py\n+++ b/scripts/lib/CIME/SystemTests/pet.py\n@@ -46,6 +46,7 @@\n # to the batch submission, things break. Setting MAX_TASKS_PER_NODE to half of\n # it origina... | 928 | 181 |
gh_patches_debug_10464 | rasdani/github-patches | git_diff | LibraryOfCongress__concordia-436 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Questions page to various help links
As a user, when I click `Questions?` button in the transcription, I am taken to a page where I am given choices based on what I need help with. I can see three boxes that ... | diff --git a/concordia/urls.py b/concordia/urls.py
--- a/concordia/urls.py
+++ b/concordia/urls.py
@@ -69,6 +69,7 @@
path("help-center/how-to-tag/", views.static_page, name="how-to-tag"),
path("for-educators/", views.static_page, name="for-educators"),
path("latest/", views.static_page, name="latest"),
+... | {"golden_diff": "diff --git a/concordia/urls.py b/concordia/urls.py\n--- a/concordia/urls.py\n+++ b/concordia/urls.py\n@@ -69,6 +69,7 @@\n path(\"help-center/how-to-tag/\", views.static_page, name=\"how-to-tag\"),\n path(\"for-educators/\", views.static_page, name=\"for-educators\"),\n path(\"latest/\", vie... | 1,923 | 148 |
gh_patches_debug_991 | rasdani/github-patches | git_diff | xorbitsai__inference-87 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: too many clients
### Describe the bug
When running the model_ref.generate() function in iPython, there seems to be a client created for every word generation, eventually leading to the following error:
... | diff --git a/plexar/__init__.py b/plexar/__init__.py
--- a/plexar/__init__.py
+++ b/plexar/__init__.py
@@ -19,8 +19,12 @@
def install():
+ from xoscar.backends.router import Router
+
from .model import install as install_model
+ default_router = Router.get_instance_or_empty()
+ Router.set_instance(... | {"golden_diff": "diff --git a/plexar/__init__.py b/plexar/__init__.py\n--- a/plexar/__init__.py\n+++ b/plexar/__init__.py\n@@ -19,8 +19,12 @@\n \n \n def install():\n+ from xoscar.backends.router import Router\n+\n from .model import install as install_model\n \n+ default_router = Router.get_instance_or_empty... | 782 | 102 |
gh_patches_debug_26530 | rasdani/github-patches | git_diff | azavea__raster-vision-329 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add support for multipolygons
Enable RV to handle geojson label stores that are encoded as multipolygons
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files... | diff --git a/src/rastervision/label_stores/object_detection_geojson_file.py b/src/rastervision/label_stores/object_detection_geojson_file.py
--- a/src/rastervision/label_stores/object_detection_geojson_file.py
+++ b/src/rastervision/label_stores/object_detection_geojson_file.py
@@ -32,9 +32,7 @@
class_ids = []
... | {"golden_diff": "diff --git a/src/rastervision/label_stores/object_detection_geojson_file.py b/src/rastervision/label_stores/object_detection_geojson_file.py\n--- a/src/rastervision/label_stores/object_detection_geojson_file.py\n+++ b/src/rastervision/label_stores/object_detection_geojson_file.py\n@@ -32,9 +32,7 @@\n ... | 1,355 | 378 |
gh_patches_debug_17507 | rasdani/github-patches | git_diff | CTFd__CTFd-2363 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make core-beta the default choice during setup
The core theme is effectively deprecated for us so it doesn't make much sense to allow for new core theme installs after 3.6.
--- END ISSUE ---
Below are some ... | diff --git a/CTFd/forms/setup.py b/CTFd/forms/setup.py
--- a/CTFd/forms/setup.py
+++ b/CTFd/forms/setup.py
@@ -11,7 +11,6 @@
from wtforms.fields.html5 import EmailField
from wtforms.validators import InputRequired
-from CTFd.constants.themes import DEFAULT_THEME
from CTFd.forms import BaseForm
from CTFd.forms.fie... | {"golden_diff": "diff --git a/CTFd/forms/setup.py b/CTFd/forms/setup.py\n--- a/CTFd/forms/setup.py\n+++ b/CTFd/forms/setup.py\n@@ -11,7 +11,6 @@\n from wtforms.fields.html5 import EmailField\n from wtforms.validators import InputRequired\n \n-from CTFd.constants.themes import DEFAULT_THEME\n from CTFd.forms import Base... | 1,114 | 205 |
gh_patches_debug_34680 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-265 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[master] PS model update
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `elasticdl/master/servicer.py`
Co... | diff --git a/elasticdl/master/servicer.py b/elasticdl/master/servicer.py
--- a/elasticdl/master/servicer.py
+++ b/elasticdl/master/servicer.py
@@ -2,6 +2,8 @@
import numpy as np
import tensorflow as tf
+assert tf.executing_eagerly()
+
from proto import master_pb2
from proto import master_pb2_grpc
from util.ndarr... | {"golden_diff": "diff --git a/elasticdl/master/servicer.py b/elasticdl/master/servicer.py\n--- a/elasticdl/master/servicer.py\n+++ b/elasticdl/master/servicer.py\n@@ -2,6 +2,8 @@\n import numpy as np\n \n import tensorflow as tf\n+assert tf.executing_eagerly()\n+\n from proto import master_pb2\n from proto import maste... | 1,339 | 495 |
gh_patches_debug_60372 | rasdani/github-patches | git_diff | UTNkar__moore-144 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong translation
<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se -->
### Prerequisites
* [ ] Put an X between the brackets on this l... | diff --git a/website/home/models.py b/website/home/models.py
--- a/website/home/models.py
+++ b/website/home/models.py
@@ -121,7 +121,7 @@
FieldPanel('title_sv'),
]),
FieldPanel('text_en'),
- FieldPanel('text_en'),
+ FieldPanel('text_sv'),
FieldPanel('link'),
... | {"golden_diff": "diff --git a/website/home/models.py b/website/home/models.py\n--- a/website/home/models.py\n+++ b/website/home/models.py\n@@ -121,7 +121,7 @@\n FieldPanel('title_sv'),\n ]),\n FieldPanel('text_en'),\n- FieldPanel('text_en'),\n+ FieldPanel('text_sv'),\n ... | 1,936 | 96 |
gh_patches_debug_32185 | rasdani/github-patches | git_diff | WordPress__openverse-api-878 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Increase the dead links cache expiration timeout
## Problem
<!-- Describe a problem solved by this feature; or delete the section entirely. -->
Currently, every front-end search results in requesting the pr... | diff --git a/api/catalog/api/utils/validate_images.py b/api/catalog/api/utils/validate_images.py
--- a/api/catalog/api/utils/validate_images.py
+++ b/api/catalog/api/utils/validate_images.py
@@ -3,6 +3,7 @@
import django_redis
import grequests
+from decouple import config
from catalog.api.utils.dead_link_mask im... | {"golden_diff": "diff --git a/api/catalog/api/utils/validate_images.py b/api/catalog/api/utils/validate_images.py\n--- a/api/catalog/api/utils/validate_images.py\n+++ b/api/catalog/api/utils/validate_images.py\n@@ -3,6 +3,7 @@\n \n import django_redis\n import grequests\n+from decouple import config\n \n from catalog.a... | 1,946 | 417 |
gh_patches_debug_28509 | rasdani/github-patches | git_diff | voxel51__fiftyone-3322 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Grouped video datasets: labels shown only in default group slice
### System information
- **OS Platform and Distribution** Linux Ubuntu 20.04
- **Python version** (`python --version`): 3.10
- ... | diff --git a/fiftyone/server/routes/frames.py b/fiftyone/server/routes/frames.py
--- a/fiftyone/server/routes/frames.py
+++ b/fiftyone/server/routes/frames.py
@@ -6,6 +6,7 @@
|
"""
from starlette.endpoints import HTTPEndpoint
+from starlette.responses import JSONResponse
from starlette.requests import Request
fr... | {"golden_diff": "diff --git a/fiftyone/server/routes/frames.py b/fiftyone/server/routes/frames.py\n--- a/fiftyone/server/routes/frames.py\n+++ b/fiftyone/server/routes/frames.py\n@@ -6,6 +6,7 @@\n |\n \"\"\"\n from starlette.endpoints import HTTPEndpoint\n+from starlette.responses import JSONResponse\n from starlette.r... | 1,424 | 339 |
gh_patches_debug_25627 | rasdani/github-patches | git_diff | python-discord__bot-1574 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ping Command Bugs
There are a couple bugs in the ping command, that only manifest in local development.
## Bug 1: `gaierror: [Errno 11001] getaddrinfo failed`
This bug is pretty easy to explain. On many d... | diff --git a/bot/exts/utils/ping.py b/bot/exts/utils/ping.py
--- a/bot/exts/utils/ping.py
+++ b/bot/exts/utils/ping.py
@@ -1,4 +1,5 @@
import socket
+import urllib.parse
from datetime import datetime
import aioping
@@ -34,11 +35,19 @@
# datetime.datetime objects do not have the "milliseconds" attribute.
... | {"golden_diff": "diff --git a/bot/exts/utils/ping.py b/bot/exts/utils/ping.py\n--- a/bot/exts/utils/ping.py\n+++ b/bot/exts/utils/ping.py\n@@ -1,4 +1,5 @@\n import socket\n+import urllib.parse\n from datetime import datetime\n \n import aioping\n@@ -34,11 +35,19 @@\n # datetime.datetime objects do not have the ... | 1,317 | 371 |
gh_patches_debug_36610 | rasdani/github-patches | git_diff | dotkom__onlineweb4-713 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Alergies should be tied to names in pdf
Request from arrKom among others.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN ... | diff --git a/apps/events/pdf_generator.py b/apps/events/pdf_generator.py
--- a/apps/events/pdf_generator.py
+++ b/apps/events/pdf_generator.py
@@ -19,8 +19,8 @@
self.event = event
self.attendees = sorted(event.attendance_event.attendees.all()[:event.attendance_event.max_capacity], key=lambda attendee:... | {"golden_diff": "diff --git a/apps/events/pdf_generator.py b/apps/events/pdf_generator.py\n--- a/apps/events/pdf_generator.py\n+++ b/apps/events/pdf_generator.py\n@@ -19,8 +19,8 @@\n self.event = event\n self.attendees = sorted(event.attendance_event.attendees.all()[:event.attendance_event.max_capacity]... | 1,490 | 544 |
gh_patches_debug_7861 | rasdani/github-patches | git_diff | ranaroussi__yfinance-943 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ticker.history: history's index is not of type DateTimeIndex when dividend and split tables are empty
**Issue**:
Ticker.history (line 295):
> df.index = df.index.tz_localize("UTC").tz_convert(data["... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -61,7 +61,7 @@
platforms=['any'],
keywords='pandas, yahoo finance, pandas datareader',
packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']),
- install_requires=['pandas>=0.24', 'numpy>=1.15',
+ install_requires=['... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -61,7 +61,7 @@\n platforms=['any'],\n keywords='pandas, yahoo finance, pandas datareader',\n packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']),\n- install_requires=['pandas>=0.24', 'numpy>=1.15',\... | 1,260 | 154 |
gh_patches_debug_27486 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-5515 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Suspicious point coordinates from moneygram spider.
Found this in alltheplaces.xyz 2023-06-17, `moneygram` spider.
<img width="1281" alt="image" src="https://github.com/alltheplaces/alltheplaces/assets/3... | diff --git a/locations/spiders/moneygram.py b/locations/spiders/moneygram.py
--- a/locations/spiders/moneygram.py
+++ b/locations/spiders/moneygram.py
@@ -1,3 +1,5 @@
+import reverse_geocoder
+
from locations.hours import OpeningHours
from locations.storefinders.where2getit import Where2GetItSpider
@@ -10,10 +12,25... | {"golden_diff": "diff --git a/locations/spiders/moneygram.py b/locations/spiders/moneygram.py\n--- a/locations/spiders/moneygram.py\n+++ b/locations/spiders/moneygram.py\n@@ -1,3 +1,5 @@\n+import reverse_geocoder\n+\n from locations.hours import OpeningHours\n from locations.storefinders.where2getit import Where2GetItS... | 629 | 358 |
gh_patches_debug_7884 | rasdani/github-patches | git_diff | dask__dask-10380 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CLI registration can fail with bad submodule
If a package registers an entry point for the CLI but the entrypoint is broken or not importable the CLI cannot work at all.
This is a little hard to create an ... | diff --git a/dask/cli.py b/dask/cli.py
--- a/dask/cli.py
+++ b/dask/cli.py
@@ -94,7 +94,14 @@
sub-group in `interface`.
"""
- command = entry_point.load()
+ try:
+ command = entry_point.load()
+ except Exception as e:
+ warnings.warn(
+ f"While registering the command w... | {"golden_diff": "diff --git a/dask/cli.py b/dask/cli.py\n--- a/dask/cli.py\n+++ b/dask/cli.py\n@@ -94,7 +94,14 @@\n sub-group in `interface`.\n \n \"\"\"\n- command = entry_point.load()\n+ try:\n+ command = entry_point.load()\n+ except Exception as e:\n+ warnings.warn(\n+ f... | 1,385 | 150 |
gh_patches_debug_43311 | rasdani/github-patches | git_diff | graspologic-org__graspologic-362 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
p_value_ inconsistency between latent distribution and latent position tests
[after the #336,] latent distribution test has attribute self.p_value_, whereas latent position test has self.p_ . they should be m... | diff --git a/graspy/inference/base.py b/graspy/inference/base.py
--- a/graspy/inference/base.py
+++ b/graspy/inference/base.py
@@ -12,65 +12,54 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import numpy as np
from abc import abstractmethod
from sklearn.... | {"golden_diff": "diff --git a/graspy/inference/base.py b/graspy/inference/base.py\n--- a/graspy/inference/base.py\n+++ b/graspy/inference/base.py\n@@ -12,65 +12,54 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+import numpy as np\n from abc import abst... | 1,118 | 992 |
gh_patches_debug_12846 | rasdani/github-patches | git_diff | lk-geimfari__mimesis-664 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Locale not respected for business.currency_iso_code()
# Bug report
## What's wrong
I'm trying to use mimesis to generate mock data for tests I'm going to develop and am writing [schema](https://mimesis.... | diff --git a/mimesis/providers/business.py b/mimesis/providers/business.py
--- a/mimesis/providers/business.py
+++ b/mimesis/providers/business.py
@@ -58,12 +58,16 @@
self.company_type(abbr=True),
)
- def currency_iso_code(self) -> str:
- """Get code of the currency.
+ def currency_... | {"golden_diff": "diff --git a/mimesis/providers/business.py b/mimesis/providers/business.py\n--- a/mimesis/providers/business.py\n+++ b/mimesis/providers/business.py\n@@ -58,12 +58,16 @@\n self.company_type(abbr=True),\n )\n \n- def currency_iso_code(self) -> str:\n- \"\"\"Get code of the ... | 2,015 | 195 |
gh_patches_debug_26659 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-2847 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`strawberry.directive` type hints appear to be incorrect.
<!-- Provide a general summary of the bug in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help ... | diff --git a/strawberry/directive.py b/strawberry/directive.py
--- a/strawberry/directive.py
+++ b/strawberry/directive.py
@@ -1,7 +1,7 @@
from __future__ import annotations
import dataclasses
-from typing import TYPE_CHECKING, Any, Callable, List, Optional, TypeVar
+from typing import TYPE_CHECKING, Any, Callable,... | {"golden_diff": "diff --git a/strawberry/directive.py b/strawberry/directive.py\n--- a/strawberry/directive.py\n+++ b/strawberry/directive.py\n@@ -1,7 +1,7 @@\n from __future__ import annotations\n \n import dataclasses\n-from typing import TYPE_CHECKING, Any, Callable, List, Optional, TypeVar\n+from typing import TYPE... | 1,403 | 322 |
gh_patches_debug_19405 | rasdani/github-patches | git_diff | weni-ai__bothub-engine-212 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix intent default value to all examples, migration intent required
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES -... | diff --git a/bothub/common/migrations/0021_auto_20180921_1259.py b/bothub/common/migrations/0021_auto_20180921_1259.py
--- a/bothub/common/migrations/0021_auto_20180921_1259.py
+++ b/bothub/common/migrations/0021_auto_20180921_1259.py
@@ -5,6 +5,11 @@
import re
+def populate_empty_intent(apps, *args):
+ Reposit... | {"golden_diff": "diff --git a/bothub/common/migrations/0021_auto_20180921_1259.py b/bothub/common/migrations/0021_auto_20180921_1259.py\n--- a/bothub/common/migrations/0021_auto_20180921_1259.py\n+++ b/bothub/common/migrations/0021_auto_20180921_1259.py\n@@ -5,6 +5,11 @@\n import re\n \n \n+def populate_empty_intent(ap... | 509 | 292 |
gh_patches_debug_19373 | rasdani/github-patches | git_diff | HypothesisWorks__hypothesis-312 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Initial calculation of unicode table is not atomic
If you're using e.g. pytest-xdist this can result in a corrupt unicode table, which is bad. Instead the file should be created under a temporary name then mo... | diff --git a/src/hypothesis/internal/charmap.py b/src/hypothesis/internal/charmap.py
--- a/src/hypothesis/internal/charmap.py
+++ b/src/hypothesis/internal/charmap.py
@@ -20,6 +20,8 @@
import sys
import gzip
import pickle
+import shutil
+import tempfile
import unicodedata
from hypothesis.configuration import sto... | {"golden_diff": "diff --git a/src/hypothesis/internal/charmap.py b/src/hypothesis/internal/charmap.py\n--- a/src/hypothesis/internal/charmap.py\n+++ b/src/hypothesis/internal/charmap.py\n@@ -20,6 +20,8 @@\n import sys\n import gzip\n import pickle\n+import shutil\n+import tempfile\n import unicodedata\n \n from hypothe... | 1,764 | 249 |
gh_patches_debug_26258 | rasdani/github-patches | git_diff | beeware__toga-2276 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ImageView doesn't shrink images to fit
### Describe the bug
The documentation for ImageView says that a `flex=1` image will be expanded or shrunk to fit the available space. It definitely expands images to... | diff --git a/core/src/toga/widgets/imageview.py b/core/src/toga/widgets/imageview.py
--- a/core/src/toga/widgets/imageview.py
+++ b/core/src/toga/widgets/imageview.py
@@ -42,22 +42,22 @@
width = int(style.width * scale)
height = int(style.width * scale / aspect_ratio)
if style.fle... | {"golden_diff": "diff --git a/core/src/toga/widgets/imageview.py b/core/src/toga/widgets/imageview.py\n--- a/core/src/toga/widgets/imageview.py\n+++ b/core/src/toga/widgets/imageview.py\n@@ -42,22 +42,22 @@\n width = int(style.width * scale)\n height = int(style.width * scale / aspect_ratio)\n ... | 2,036 | 273 |
gh_patches_debug_20823 | rasdani/github-patches | git_diff | SeldonIO__MLServer-890 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add "don't log" header to Alibi runtime
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `runtimes/alibi-exp... | diff --git a/runtimes/alibi-explain/mlserver_alibi_explain/common.py b/runtimes/alibi-explain/mlserver_alibi_explain/common.py
--- a/runtimes/alibi-explain/mlserver_alibi_explain/common.py
+++ b/runtimes/alibi-explain/mlserver_alibi_explain/common.py
@@ -26,6 +26,7 @@
ENV_PREFIX_ALIBI_EXPLAIN_SETTINGS = "MLSERVER_MO... | {"golden_diff": "diff --git a/runtimes/alibi-explain/mlserver_alibi_explain/common.py b/runtimes/alibi-explain/mlserver_alibi_explain/common.py\n--- a/runtimes/alibi-explain/mlserver_alibi_explain/common.py\n+++ b/runtimes/alibi-explain/mlserver_alibi_explain/common.py\n@@ -26,6 +26,7 @@\n \n ENV_PREFIX_ALIBI_EXPLAIN_S... | 1,658 | 285 |
gh_patches_debug_24698 | rasdani/github-patches | git_diff | pre-commit__pre-commit-2207 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow to `mamba install` environments
Thanks for maintaining pre-commit, we really enjoying working with it!
When installing conda environments, [mamba](https://github.com/mamba-org/mamba) is often the pre... | diff --git a/pre_commit/languages/conda.py b/pre_commit/languages/conda.py
--- a/pre_commit/languages/conda.py
+++ b/pre_commit/languages/conda.py
@@ -50,6 +50,15 @@
yield
+def _conda_exe() -> str:
+ if os.environ.get('PRE_COMMIT_USE_MICROMAMBA'):
+ return 'micromamba'
+ elif os.environ.get('P... | {"golden_diff": "diff --git a/pre_commit/languages/conda.py b/pre_commit/languages/conda.py\n--- a/pre_commit/languages/conda.py\n+++ b/pre_commit/languages/conda.py\n@@ -50,6 +50,15 @@\n yield\n \n \n+def _conda_exe() -> str:\n+ if os.environ.get('PRE_COMMIT_USE_MICROMAMBA'):\n+ return 'micromamba'\n... | 1,386 | 317 |
gh_patches_debug_11191 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-597 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
object has no attribute '__qualname__'
I am getting the following error when trying to enable the scout APM on a starlette application:
```
Traceback (most recent call last):
File "/app/.heroku/python/li... | diff --git a/src/scout_apm/async_/starlette.py b/src/scout_apm/async_/starlette.py
--- a/src/scout_apm/async_/starlette.py
+++ b/src/scout_apm/async_/starlette.py
@@ -31,8 +31,11 @@
if "endpoint" in scope:
# Rename top span
endpoint = scope["endpoint"]
+ if ... | {"golden_diff": "diff --git a/src/scout_apm/async_/starlette.py b/src/scout_apm/async_/starlette.py\n--- a/src/scout_apm/async_/starlette.py\n+++ b/src/scout_apm/async_/starlette.py\n@@ -31,8 +31,11 @@\n if \"endpoint\" in scope:\n # Rename top span\n endpoint = scope[\"endpo... | 1,497 | 157 |
gh_patches_debug_5225 | rasdani/github-patches | git_diff | fidals__shopelectro-462 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dc-volumes.yml:27-28: Repair npm container reusing at...
The puzzle `449-27d8c19e` from #449 has to be resolved:
https://github.com/fidals/shopelectro/blob/f8ce85246c00411fcb21d025b0fb42abab81c7d5/docker/dc-... | diff --git a/shopelectro/management/commands/_update_catalog/utils.py b/shopelectro/management/commands/_update_catalog/utils.py
--- a/shopelectro/management/commands/_update_catalog/utils.py
+++ b/shopelectro/management/commands/_update_catalog/utils.py
@@ -17,7 +17,7 @@
from shopelectro.exception import DownloadFile... | {"golden_diff": "diff --git a/shopelectro/management/commands/_update_catalog/utils.py b/shopelectro/management/commands/_update_catalog/utils.py\n--- a/shopelectro/management/commands/_update_catalog/utils.py\n+++ b/shopelectro/management/commands/_update_catalog/utils.py\n@@ -17,7 +17,7 @@\n from shopelectro.exceptio... | 1,735 | 156 |
gh_patches_debug_3806 | rasdani/github-patches | git_diff | paperless-ngx__paperless-ngx-2459 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] unable to change mail rule order in new frontend
### Description
i was setting up mail rules and wasn't able to get them to work properly until i realized that in the django admin i was able to set a o... | diff --git a/src/paperless_mail/views.py b/src/paperless_mail/views.py
--- a/src/paperless_mail/views.py
+++ b/src/paperless_mail/views.py
@@ -27,7 +27,7 @@
class MailRuleViewSet(ModelViewSet):
model = MailRule
- queryset = MailRule.objects.all().order_by("pk")
+ queryset = MailRule.objects.all().order_by... | {"golden_diff": "diff --git a/src/paperless_mail/views.py b/src/paperless_mail/views.py\n--- a/src/paperless_mail/views.py\n+++ b/src/paperless_mail/views.py\n@@ -27,7 +27,7 @@\n class MailRuleViewSet(ModelViewSet):\n model = MailRule\n \n- queryset = MailRule.objects.all().order_by(\"pk\")\n+ queryset = Mail... | 833 | 116 |
gh_patches_debug_11095 | rasdani/github-patches | git_diff | scikit-hep__pyhf-369 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
papermill seems to break? pin version?
# Description
In the CI for @nikoladze's PR https://github.com/diana-hep/pyhf/pull/365 it seems like papermill is breaking for unrelated reasons. Did something change... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@
'minuit': ['iminuit'],
'develop': [
'pyflakes',
- 'pytest>=3.5.1',
+ 'pytest<4.0.0,>=3.5.1',
'pytest-cov>=2.5.1',
'pytest-benchmark[histogram]',
'pytest-console-scripts',
@@ -41,7... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -31,7 +31,7 @@\n 'minuit': ['iminuit'],\n 'develop': [\n 'pyflakes',\n- 'pytest>=3.5.1',\n+ 'pytest<4.0.0,>=3.5.1',\n 'pytest-cov>=2.5.1',\n 'pytest-benchmark[histogram]',\n 'pytes... | 1,410 | 177 |
gh_patches_debug_11703 | rasdani/github-patches | git_diff | great-expectations__great_expectations-3811 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of th... | diff --git a/great_expectations/data_context/store/configuration_store.py b/great_expectations/data_context/store/configuration_store.py
--- a/great_expectations/data_context/store/configuration_store.py
+++ b/great_expectations/data_context/store/configuration_store.py
@@ -63,8 +63,8 @@
# Store Backend Cl... | {"golden_diff": "diff --git a/great_expectations/data_context/store/configuration_store.py b/great_expectations/data_context/store/configuration_store.py\n--- a/great_expectations/data_context/store/configuration_store.py\n+++ b/great_expectations/data_context/store/configuration_store.py\n@@ -63,8 +63,8 @@\n ... | 1,726 | 159 |
gh_patches_debug_17708 | rasdani/github-patches | git_diff | saleor__saleor-459 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Geoip conflicting with Python 3.5?
It appears that python-geoip won't work with the current setup (utilizing Python 3.5).
I get this stack trace:
```
Environment:
Request Method: GET
Request URL: http://127... | diff --git a/saleor/core/__init__.py b/saleor/core/__init__.py
--- a/saleor/core/__init__.py
+++ b/saleor/core/__init__.py
@@ -4,16 +4,20 @@
from django.conf import settings
from django_countries import countries
from django_countries.fields import Country
-from geoip import geolite2
+from geolite2 import geolite2
... | {"golden_diff": "diff --git a/saleor/core/__init__.py b/saleor/core/__init__.py\n--- a/saleor/core/__init__.py\n+++ b/saleor/core/__init__.py\n@@ -4,16 +4,20 @@\n from django.conf import settings\n from django_countries import countries\n from django_countries.fields import Country\n-from geoip import geolite2\n+from g... | 1,289 | 286 |
gh_patches_debug_10512 | rasdani/github-patches | git_diff | Lightning-AI__pytorch-lightning-2244 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Model.load_from_checkpoint tries to open file path as URL and fail
## 🐛 Bug
load_from_checkpoint tries to classify if the input is a file path or an URL and detects the hard drive letter as a scheme and th... | diff --git a/pytorch_lightning/utilities/cloud_io.py b/pytorch_lightning/utilities/cloud_io.py
--- a/pytorch_lightning/utilities/cloud_io.py
+++ b/pytorch_lightning/utilities/cloud_io.py
@@ -1,11 +1,12 @@
import torch
+from pathlib import Path
from urllib.parse import urlparse
def load(path_or_url: str, map_lo... | {"golden_diff": "diff --git a/pytorch_lightning/utilities/cloud_io.py b/pytorch_lightning/utilities/cloud_io.py\n--- a/pytorch_lightning/utilities/cloud_io.py\n+++ b/pytorch_lightning/utilities/cloud_io.py\n@@ -1,11 +1,12 @@\n import torch\n \n+from pathlib import Path\n from urllib.parse import urlparse\n \n \n def lo... | 540 | 168 |
gh_patches_debug_3956 | rasdani/github-patches | git_diff | facebookresearch__CompilerGym-736 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in llvm_rl benchmark when setting a max_benchmarks
https://github.com/facebookresearch/CompilerGym/blob/b803856257aa663b20a26e49125d5d603f84a9b9/examples/llvm_rl/model/benchmarks.py#L96-L98
should be
... | diff --git a/examples/llvm_rl/model/benchmarks.py b/examples/llvm_rl/model/benchmarks.py
--- a/examples/llvm_rl/model/benchmarks.py
+++ b/examples/llvm_rl/model/benchmarks.py
@@ -95,7 +95,7 @@
start = self.benchmarks_start_at
n = len(self.uris)
if self.max_benchmarks:
- n = min(len... | {"golden_diff": "diff --git a/examples/llvm_rl/model/benchmarks.py b/examples/llvm_rl/model/benchmarks.py\n--- a/examples/llvm_rl/model/benchmarks.py\n+++ b/examples/llvm_rl/model/benchmarks.py\n@@ -95,7 +95,7 @@\n start = self.benchmarks_start_at\n n = len(self.uris)\n if self.max_benchmarks:\n... | 1,705 | 135 |
gh_patches_debug_56909 | rasdani/github-patches | git_diff | NVIDIA__NVFlare-920 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Tenseal necessary, makes installation impossible on Apple Silicon.
As discussed in #130 tenseal remains unavailable for Apple Silicon. The current NVFlare version (2.2.0) has no optional features and ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -85,10 +85,10 @@
"psutil==5.9.1",
"PyYAML==6.0",
"six>=1.15.0",
- "tenseal==0.3.0",
"msgpack==1.0.3",
"docker>=6.0",
],
+ extras_require={"HE": ["tenseal==0.3.0"]},
entry_points={
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -85,10 +85,10 @@\n \"psutil==5.9.1\",\n \"PyYAML==6.0\",\n \"six>=1.15.0\",\n- \"tenseal==0.3.0\",\n \"msgpack==1.0.3\",\n \"docker>=6.0\",\n ],\n+ extras_require={\"HE\": [\"tense... | 1,411 | 143 |
gh_patches_debug_38392 | rasdani/github-patches | git_diff | kivy__python-for-android-1343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Numpy support w/ python3crystax
I'm trying to get my app to compile with Python 3 using the Crystax NDK. Everything is set up, and if I try to push my app to my device without specifying that numpy is needed... | diff --git a/pythonforandroid/recipes/numpy/__init__.py b/pythonforandroid/recipes/numpy/__init__.py
--- a/pythonforandroid/recipes/numpy/__init__.py
+++ b/pythonforandroid/recipes/numpy/__init__.py
@@ -1,48 +1,48 @@
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
from pythonforandroid.toolchain im... | {"golden_diff": "diff --git a/pythonforandroid/recipes/numpy/__init__.py b/pythonforandroid/recipes/numpy/__init__.py\n--- a/pythonforandroid/recipes/numpy/__init__.py\n+++ b/pythonforandroid/recipes/numpy/__init__.py\n@@ -1,48 +1,48 @@\n from pythonforandroid.recipe import CompiledComponentsPythonRecipe\n from pythonf... | 1,700 | 905 |
gh_patches_debug_40248 | rasdani/github-patches | git_diff | AlexsLemonade__refinebio-1740 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[HOTFIX] Prevent compendia jobs from getting cleaned up and fix QN jobs
## Issue Number
#1728
#1726
#1727
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of th... | diff --git a/foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py b/foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py
--- a/foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py
+++ b/foreman/data_refinery_foreman/foreman/management/commands/c... | {"golden_diff": "diff --git a/foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py b/foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py\n--- a/foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py\n+++ b/foreman/data_refinery_foreman/foreman/ma... | 1,330 | 685 |
gh_patches_debug_57712 | rasdani/github-patches | git_diff | activeloopai__deeplake-1998 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[FEATURE] Add license in PyPI packages
## 🚨🚨 Feature Request
- [x] A new implementation (Improvement)
### Is your feature request related to a problem?
deeplake, hub and libdeeplake currently use ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -103,6 +103,10 @@
"Documentation": "https://docs.activeloop.ai/",
"Source": "https://github.com/activeloopai/deeplake",
},
+ "license": "MPL-2.0",
+ "classifiers": [
+ "License :: OSI Approved :: Mozilla Public License... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -103,6 +103,10 @@\n \"Documentation\": \"https://docs.activeloop.ai/\",\n \"Source\": \"https://github.com/activeloopai/deeplake\",\n },\n+ \"license\": \"MPL-2.0\",\n+ \"classifiers\": [\n+ \"License ... | 1,562 | 121 |
gh_patches_debug_3411 | rasdani/github-patches | git_diff | rasterio__rasterio-1827 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
optimizing `transform_geom` for repeated transformations
Related to: https://github.com/Toblerity/Fiona/issues/799
Is there interest in adding this to rasterio as well?
--- END ISSUE ---
Below are some c... | diff --git a/rasterio/compat.py b/rasterio/compat.py
--- a/rasterio/compat.py
+++ b/rasterio/compat.py
@@ -26,3 +26,8 @@
from UserDict import UserDict
from inspect import getargspec
from collections import Iterable, Mapping
+
+# Users can pass in objects that subclass a few different objects
+# More spec... | {"golden_diff": "diff --git a/rasterio/compat.py b/rasterio/compat.py\n--- a/rasterio/compat.py\n+++ b/rasterio/compat.py\n@@ -26,3 +26,8 @@\n from UserDict import UserDict\n from inspect import getargspec\n from collections import Iterable, Mapping\n+\n+# Users can pass in objects that subclass a few diffe... | 559 | 134 |
gh_patches_debug_0 | rasdani/github-patches | git_diff | OpenEnergyPlatform__oeplatform-1353 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Version in CITATION.cff is out of date
## Description of the issue
We have introduced the citation.cff file, which also contains a version. This should be updated every time a release is made. It would be ... | diff --git a/oeplatform/__init__.py b/oeplatform/__init__.py
--- a/oeplatform/__init__.py
+++ b/oeplatform/__init__.py
@@ -0,0 +1 @@
+__version__ = "0.14.1"
| {"golden_diff": "diff --git a/oeplatform/__init__.py b/oeplatform/__init__.py\n--- a/oeplatform/__init__.py\n+++ b/oeplatform/__init__.py\n@@ -0,0 +1 @@\n+__version__ = \"0.14.1\"\n", "issue": "Version in CITATION.cff is out of date\n## Description of the issue\r\n\r\nWe have introduced the citation.cff file, which als... | 437 | 61 |
gh_patches_debug_10644 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-2593 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Provide better error for Union of scalars.
This keeps coming from questions on discord
```py
union: Union[List[int], List[str]]
```
gives something like
```console
File "/root/backend/env/lib/python3.... | diff --git a/strawberry/exceptions/invalid_union_type.py b/strawberry/exceptions/invalid_union_type.py
--- a/strawberry/exceptions/invalid_union_type.py
+++ b/strawberry/exceptions/invalid_union_type.py
@@ -33,7 +33,11 @@
if isinstance(invalid_type, ScalarWrapper):
type_name = invalid_type.wrap.__... | {"golden_diff": "diff --git a/strawberry/exceptions/invalid_union_type.py b/strawberry/exceptions/invalid_union_type.py\n--- a/strawberry/exceptions/invalid_union_type.py\n+++ b/strawberry/exceptions/invalid_union_type.py\n@@ -33,7 +33,11 @@\n if isinstance(invalid_type, ScalarWrapper):\n type_name ... | 1,203 | 181 |
gh_patches_debug_1951 | rasdani/github-patches | git_diff | googleapis__python-bigquery-974 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python to construct CASE WHEN update SQL statement
I try to update 2K rows in BQ
```
def update_bq_ads_status_failed(self, update_ads):
affected_rows = 0
for update_ads_chunk in s... | diff --git a/google/cloud/bigquery/retry.py b/google/cloud/bigquery/retry.py
--- a/google/cloud/bigquery/retry.py
+++ b/google/cloud/bigquery/retry.py
@@ -60,7 +60,7 @@
pass ``retry=bigquery.DEFAULT_RETRY.with_deadline(30)``.
"""
-DEFAULT_TIMEOUT = 5.0 * 60.0
+DEFAULT_TIMEOUT = None
"""The default API timeout.
... | {"golden_diff": "diff --git a/google/cloud/bigquery/retry.py b/google/cloud/bigquery/retry.py\n--- a/google/cloud/bigquery/retry.py\n+++ b/google/cloud/bigquery/retry.py\n@@ -60,7 +60,7 @@\n pass ``retry=bigquery.DEFAULT_RETRY.with_deadline(30)``.\n \"\"\"\n \n-DEFAULT_TIMEOUT = 5.0 * 60.0\n+DEFAULT_TIMEOUT = None\n \"... | 1,498 | 118 |
gh_patches_debug_7040 | rasdani/github-patches | git_diff | saleor__saleor-1208 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Superuser can change his status
In `StaffForm`:
https://github.com/mirumee/saleor/blob/master/saleor/dashboard/staff/forms.py#L12-L13
Widget is disabled `self.fields['is_staff'].widget.attrs['disabled'] = T... | diff --git a/saleor/dashboard/staff/forms.py b/saleor/dashboard/staff/forms.py
--- a/saleor/dashboard/staff/forms.py
+++ b/saleor/dashboard/staff/forms.py
@@ -9,8 +9,8 @@
kwargs.update(initial={'is_staff': True})
super(StaffForm, self).__init__(*args, **kwargs)
if self.user == self.instance:
... | {"golden_diff": "diff --git a/saleor/dashboard/staff/forms.py b/saleor/dashboard/staff/forms.py\n--- a/saleor/dashboard/staff/forms.py\n+++ b/saleor/dashboard/staff/forms.py\n@@ -9,8 +9,8 @@\n kwargs.update(initial={'is_staff': True})\n super(StaffForm, self).__init__(*args, **kwargs)\n if self.... | 527 | 152 |
gh_patches_debug_39158 | rasdani/github-patches | git_diff | quantumlib__Cirq-1668 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Class methods on GridQubit to create common lattices
Some obvious shapes
```GridQubit.square(3, 3)```
```GirdQubit.rect(2, 4)```
returning list of list with row and column. Default to 0,0 as one corner, ... | diff --git a/cirq/devices/grid_qubit.py b/cirq/devices/grid_qubit.py
--- a/cirq/devices/grid_qubit.py
+++ b/cirq/devices/grid_qubit.py
@@ -13,7 +13,7 @@
# limitations under the License.
-from typing import Dict
+from typing import Dict, List
from cirq import ops
@@ -38,6 +38,93 @@
return (isinstance(... | {"golden_diff": "diff --git a/cirq/devices/grid_qubit.py b/cirq/devices/grid_qubit.py\n--- a/cirq/devices/grid_qubit.py\n+++ b/cirq/devices/grid_qubit.py\n@@ -13,7 +13,7 @@\n # limitations under the License.\n \n \n-from typing import Dict\n+from typing import Dict, List\n \n from cirq import ops\n \n@@ -38,6 +38,93 @@... | 998 | 938 |
gh_patches_debug_2317 | rasdani/github-patches | git_diff | ivy-llc__ivy-23306 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
rfftfreq
--- 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/fft.py`
Content:
... | diff --git a/ivy/functional/frontends/paddle/fft.py b/ivy/functional/frontends/paddle/fft.py
--- a/ivy/functional/frontends/paddle/fft.py
+++ b/ivy/functional/frontends/paddle/fft.py
@@ -122,3 +122,12 @@
if ivy.isreal(x):
time_domain = ivy.real(time_domain)
return time_domain
+
+
+@to_ivy_arrays_and_... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/fft.py b/ivy/functional/frontends/paddle/fft.py\n--- a/ivy/functional/frontends/paddle/fft.py\n+++ b/ivy/functional/frontends/paddle/fft.py\n@@ -122,3 +122,12 @@\n if ivy.isreal(x):\n time_domain = ivy.real(time_domain)\n return time_domain\n... | 1,501 | 185 |
gh_patches_debug_12679 | rasdani/github-patches | git_diff | saulpw__visidata-1824 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
YAML fails reading files with tuples
Example file:
```
foo: !!python/tuple
- 1
- 2
- 3
```
Error:
```
ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/t... | diff --git a/visidata/loaders/yaml.py b/visidata/loaders/yaml.py
--- a/visidata/loaders/yaml.py
+++ b/visidata/loaders/yaml.py
@@ -12,8 +12,18 @@
class YamlSheet(JsonSheet):
def iterload(self):
yaml = vd.importExternal('yaml', 'PyYAML')
+
+ class PrettySafeLoader(yaml.SafeLoader):
+ def... | {"golden_diff": "diff --git a/visidata/loaders/yaml.py b/visidata/loaders/yaml.py\n--- a/visidata/loaders/yaml.py\n+++ b/visidata/loaders/yaml.py\n@@ -12,8 +12,18 @@\n class YamlSheet(JsonSheet):\n def iterload(self):\n yaml = vd.importExternal('yaml', 'PyYAML')\n+\n+ class PrettySafeLoader(yaml.Safe... | 705 | 201 |
gh_patches_debug_3864 | rasdani/github-patches | git_diff | elastic__apm-agent-python-1203 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
APM Agent Serialization Error
**Describe the bug**: APM Agent crashes when using Python AWS SDK's builder for DynamoDB Key condition expressions.
**To Reproduce**
1. Import `from boto3.dynamodb.conditio... | diff --git a/elasticapm/utils/json_encoder.py b/elasticapm/utils/json_encoder.py
--- a/elasticapm/utils/json_encoder.py
+++ b/elasticapm/utils/json_encoder.py
@@ -52,7 +52,10 @@
def default(self, obj):
if type(obj) in self.ENCODERS:
return self.ENCODERS[type(obj)](obj)
- return super(B... | {"golden_diff": "diff --git a/elasticapm/utils/json_encoder.py b/elasticapm/utils/json_encoder.py\n--- a/elasticapm/utils/json_encoder.py\n+++ b/elasticapm/utils/json_encoder.py\n@@ -52,7 +52,10 @@\n def default(self, obj):\n if type(obj) in self.ENCODERS:\n return self.ENCODERS[type(obj)](obj)\... | 1,651 | 138 |
gh_patches_debug_24746 | rasdani/github-patches | git_diff | elastic__apm-agent-python-1115 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python agent should show database as a dependency, shows up in span
**Is your feature request related to a problem? Please describe.**
I can see Postgres under **Time spent by span type** graph but it is not... | diff --git a/elasticapm/instrumentation/packages/asyncio/asyncpg.py b/elasticapm/instrumentation/packages/asyncio/asyncpg.py
--- a/elasticapm/instrumentation/packages/asyncio/asyncpg.py
+++ b/elasticapm/instrumentation/packages/asyncio/asyncpg.py
@@ -31,6 +31,7 @@
from elasticapm.contrib.asyncio.traces import async_ca... | {"golden_diff": "diff --git a/elasticapm/instrumentation/packages/asyncio/asyncpg.py b/elasticapm/instrumentation/packages/asyncio/asyncpg.py\n--- a/elasticapm/instrumentation/packages/asyncio/asyncpg.py\n+++ b/elasticapm/instrumentation/packages/asyncio/asyncpg.py\n@@ -31,6 +31,7 @@\n from elasticapm.contrib.asyncio.t... | 1,331 | 303 |
gh_patches_debug_23294 | rasdani/github-patches | git_diff | bridgecrewio__checkov-5275 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecate CKV_GCP_67
**Describe the issue**
CKV_GCP_67: https://docs.bridgecrew.io/docs/ensure-legacy-compute-engine-instance-metadata-apis-are-disabled
https://cloud.google.com/kubernetes-engine/docs/h... | diff --git a/checkov/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py b/checkov/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py
deleted file mode 100644
--- a/checkov/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from checkov.comm... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py b/checkov/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py\ndeleted file mode 100644\n--- a/checkov/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py\n+++ /dev/null\n@@ -1,36 +0,0 ... | 749 | 418 |
gh_patches_debug_13425 | rasdani/github-patches | git_diff | python-poetry__poetry-7140 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make config file relocation instructions more explicit
- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
## Issue
... | diff --git a/src/poetry/locations.py b/src/poetry/locations.py
--- a/src/poetry/locations.py
+++ b/src/poetry/locations.py
@@ -34,9 +34,12 @@
if any(file.exists() for file in (auth_toml, config_toml)):
logger.warning(
(
- "Configuration file exists at %s, reusing this directory... | {"golden_diff": "diff --git a/src/poetry/locations.py b/src/poetry/locations.py\n--- a/src/poetry/locations.py\n+++ b/src/poetry/locations.py\n@@ -34,9 +34,12 @@\n if any(file.exists() for file in (auth_toml, config_toml)):\n logger.warning(\n (\n- \"Configuration file exists at %... | 954 | 197 |
gh_patches_debug_17079 | rasdani/github-patches | git_diff | qutebrowser__qutebrowser-2953 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use CommandParser for configmodel.bind
In the `new-config` branch, there's a `CommandParser` in `commands/runners.py` which got split off from `CommandRunner` and can be used standalone. Various places doing ... | diff --git a/qutebrowser/completion/models/configmodel.py b/qutebrowser/completion/models/configmodel.py
--- a/qutebrowser/completion/models/configmodel.py
+++ b/qutebrowser/completion/models/configmodel.py
@@ -21,7 +21,7 @@
from qutebrowser.config import configdata, configexc
from qutebrowser.completion.models imp... | {"golden_diff": "diff --git a/qutebrowser/completion/models/configmodel.py b/qutebrowser/completion/models/configmodel.py\n--- a/qutebrowser/completion/models/configmodel.py\n+++ b/qutebrowser/completion/models/configmodel.py\n@@ -21,7 +21,7 @@\n \n from qutebrowser.config import configdata, configexc\n from qutebrowse... | 1,323 | 214 |
gh_patches_debug_198 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-2900 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
E1017 Select does not find already supported function when using complex list with nested Selects
### CloudFormation Lint Version
cfn-lint 0.80.4
### What operating system are you using?
Mac
### Describe ... | diff --git a/src/cfnlint/rules/functions/Select.py b/src/cfnlint/rules/functions/Select.py
--- a/src/cfnlint/rules/functions/Select.py
+++ b/src/cfnlint/rules/functions/Select.py
@@ -20,6 +20,7 @@
"Fn::If",
"Fn::Split",
"Fn::Cidr",
+ "Fn::Select", # issue: 2895
"Ref",
]
| {"golden_diff": "diff --git a/src/cfnlint/rules/functions/Select.py b/src/cfnlint/rules/functions/Select.py\n--- a/src/cfnlint/rules/functions/Select.py\n+++ b/src/cfnlint/rules/functions/Select.py\n@@ -20,6 +20,7 @@\n \"Fn::If\",\n \"Fn::Split\",\n \"Fn::Cidr\",\n+ \"Fn::Select\", # iss... | 1,924 | 103 |
gh_patches_debug_16863 | rasdani/github-patches | git_diff | TencentBlueKing__bk-user-1192 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
feat: add stringify_pydantic_error util
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/bk-user/bkuser... | diff --git a/src/bk-user/bkuser/common/passwd/__init__.py b/src/bk-user/bkuser/common/passwd/__init__.py
--- a/src/bk-user/bkuser/common/passwd/__init__.py
+++ b/src/bk-user/bkuser/common/passwd/__init__.py
@@ -8,7 +8,7 @@
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See t... | {"golden_diff": "diff --git a/src/bk-user/bkuser/common/passwd/__init__.py b/src/bk-user/bkuser/common/passwd/__init__.py\n--- a/src/bk-user/bkuser/common/passwd/__init__.py\n+++ b/src/bk-user/bkuser/common/passwd/__init__.py\n@@ -8,7 +8,7 @@\n an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex... | 597 | 212 |
gh_patches_debug_17775 | rasdani/github-patches | git_diff | ocf__ocfweb-131 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CSRF token PR fails in prod due to referer checks
The cookies seem to be working properly, but referer checks are failing?
```
Jan 31 18:46:57 coma gunicorn[23653]: Forbidden (Referer checking failed - https... | diff --git a/ocfweb/settings.py b/ocfweb/settings.py
--- a/ocfweb/settings.py
+++ b/ocfweb/settings.py
@@ -82,7 +82,13 @@
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
# XXX: DO NOT CHANGE
-# Ensure cookies can't be read by JavaScript.
+# Ensure cookies can't be read by JavaScript or users.
+# Our proxy... | {"golden_diff": "diff --git a/ocfweb/settings.py b/ocfweb/settings.py\n--- a/ocfweb/settings.py\n+++ b/ocfweb/settings.py\n@@ -82,7 +82,13 @@\n SESSION_ENGINE = 'django.contrib.sessions.backends.cache'\n \n # XXX: DO NOT CHANGE\n-# Ensure cookies can't be read by JavaScript.\n+# Ensure cookies can't be read by JavaScri... | 2,042 | 259 |
gh_patches_debug_23596 | rasdani/github-patches | git_diff | rasterio__rasterio-1851 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
WarpedVRT does not permit boundless reads (sample.py)
## Expected behavior and actual behavior.
```
def test_rasterio_vrt(self):
import rasterio
# tmp_file default crs is... | diff --git a/rasterio/sample.py b/rasterio/sample.py
--- a/rasterio/sample.py
+++ b/rasterio/sample.py
@@ -2,6 +2,7 @@
import numpy
+from rasterio.enums import MaskFlags
from rasterio.windows import Window
@@ -31,14 +32,24 @@
index = dataset.index
read = dataset.read
- if isinstance(indexes, in... | {"golden_diff": "diff --git a/rasterio/sample.py b/rasterio/sample.py\n--- a/rasterio/sample.py\n+++ b/rasterio/sample.py\n@@ -2,6 +2,7 @@\n \n import numpy\n \n+from rasterio.enums import MaskFlags\n from rasterio.windows import Window\n \n \n@@ -31,14 +32,24 @@\n index = dataset.index\n read = dataset.read\n ... | 1,043 | 403 |
gh_patches_debug_38933 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-2802 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider anthonys_restaurants is broken
During the global build at 2021-06-16-14-42-20, spider **anthonys_restaurants** failed with **0 features** and **0 errors**.
Here's [the log](https://data.alltheplaces.x... | diff --git a/locations/spiders/anthonys_restaurants.py b/locations/spiders/anthonys_restaurants.py
--- a/locations/spiders/anthonys_restaurants.py
+++ b/locations/spiders/anthonys_restaurants.py
@@ -1,41 +1,49 @@
# -*- coding: utf-8 -*-
+import json
+import re
+
import scrapy
+
from locations.items import GeojsonPoi... | {"golden_diff": "diff --git a/locations/spiders/anthonys_restaurants.py b/locations/spiders/anthonys_restaurants.py\n--- a/locations/spiders/anthonys_restaurants.py\n+++ b/locations/spiders/anthonys_restaurants.py\n@@ -1,41 +1,49 @@\n # -*- coding: utf-8 -*-\n+import json\n+import re\n+\n import scrapy\n+\n from locati... | 967 | 927 |
gh_patches_debug_11635 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-4320 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG]: Multi-rank on same device
### 🐛 Describe the bug
When I use colossalai CLI with 2 node, I got an error "rank 8 and rank 0 both on CUDA device d000"
I have examined my scripts and command. And torchr... | diff --git a/colossalai/cli/launcher/hostinfo.py b/colossalai/cli/launcher/hostinfo.py
--- a/colossalai/cli/launcher/hostinfo.py
+++ b/colossalai/cli/launcher/hostinfo.py
@@ -46,11 +46,8 @@
localhost = socket.gethostname()
localaddrs = socket.getaddrinfo(localhost, port)
targetaddrs = socket.... | {"golden_diff": "diff --git a/colossalai/cli/launcher/hostinfo.py b/colossalai/cli/launcher/hostinfo.py\n--- a/colossalai/cli/launcher/hostinfo.py\n+++ b/colossalai/cli/launcher/hostinfo.py\n@@ -46,11 +46,8 @@\n localhost = socket.gethostname()\n localaddrs = socket.getaddrinfo(localhost, port)\n ... | 1,683 | 207 |
gh_patches_debug_6423 | rasdani/github-patches | git_diff | pytorch__examples-229 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unused import of math in time_sequence_prediction example
The generate_sine_wave.py module imports math on the first line, but doesn't use it. This import should be removed.
--- END ISSUE ---
Below are some... | diff --git a/time_sequence_prediction/generate_sine_wave.py b/time_sequence_prediction/generate_sine_wave.py
--- a/time_sequence_prediction/generate_sine_wave.py
+++ b/time_sequence_prediction/generate_sine_wave.py
@@ -1,12 +1,13 @@
-import math
import numpy as np
import torch
+
+np.random.seed(2)
+
T = 20
L = 1000... | {"golden_diff": "diff --git a/time_sequence_prediction/generate_sine_wave.py b/time_sequence_prediction/generate_sine_wave.py\n--- a/time_sequence_prediction/generate_sine_wave.py\n+++ b/time_sequence_prediction/generate_sine_wave.py\n@@ -1,12 +1,13 @@\n-import math\n import numpy as np\n import torch\n+\n+np.random.se... | 429 | 214 |
gh_patches_debug_8809 | rasdani/github-patches | git_diff | conan-io__conan-center-index-16928 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[package] xorg-makedepend/any: Homepage url incorrect
### Description
In the `xorg-makedepend` recipe the homepage url is incorrectly set to "https://gitlab.freedesktop.org/xorg/util/cf" which is a different... | diff --git a/recipes/xorg-makedepend/all/conanfile.py b/recipes/xorg-makedepend/all/conanfile.py
--- a/recipes/xorg-makedepend/all/conanfile.py
+++ b/recipes/xorg-makedepend/all/conanfile.py
@@ -14,7 +14,7 @@
description = "Utility to parse C source files to make dependency lists for Makefiles"
topics = ("xor... | {"golden_diff": "diff --git a/recipes/xorg-makedepend/all/conanfile.py b/recipes/xorg-makedepend/all/conanfile.py\n--- a/recipes/xorg-makedepend/all/conanfile.py\n+++ b/recipes/xorg-makedepend/all/conanfile.py\n@@ -14,7 +14,7 @@\n description = \"Utility to parse C source files to make dependency lists for Makefile... | 1,343 | 180 |
gh_patches_debug_17607 | rasdani/github-patches | git_diff | DataDog__dd-trace-py-4246 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot call sqlite3.backup(db) on a TracedSQLite object
Thanks for taking the time for reporting an issue!
Before reporting an issue on dd-trace-py, please be sure to provide all
necessary information.
... | diff --git a/ddtrace/contrib/sqlite3/patch.py b/ddtrace/contrib/sqlite3/patch.py
--- a/ddtrace/contrib/sqlite3/patch.py
+++ b/ddtrace/contrib/sqlite3/patch.py
@@ -1,6 +1,7 @@
import os
import sqlite3
import sqlite3.dbapi2
+import sys
from ddtrace import config
from ddtrace.vendor import wrapt
@@ -75,3 +76,13 @@
... | {"golden_diff": "diff --git a/ddtrace/contrib/sqlite3/patch.py b/ddtrace/contrib/sqlite3/patch.py\n--- a/ddtrace/contrib/sqlite3/patch.py\n+++ b/ddtrace/contrib/sqlite3/patch.py\n@@ -1,6 +1,7 @@\n import os\n import sqlite3\n import sqlite3.dbapi2\n+import sys\n \n from ddtrace import config\n from ddtrace.vendor impor... | 1,259 | 307 |
gh_patches_debug_21357 | rasdani/github-patches | git_diff | nextcloud__appstore-282 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
API: registering an app id and uploading an app release needs to check revoked certificates
In order to prevent old or lost certificates from being abused we need to check if the certificate has been revoked.... | diff --git a/nextcloudappstore/core/certificate/validator.py b/nextcloudappstore/core/certificate/validator.py
--- a/nextcloudappstore/core/certificate/validator.py
+++ b/nextcloudappstore/core/certificate/validator.py
@@ -3,7 +3,7 @@
import pem
from OpenSSL.crypto import FILETYPE_PEM, load_certificate, verify, X50... | {"golden_diff": "diff --git a/nextcloudappstore/core/certificate/validator.py b/nextcloudappstore/core/certificate/validator.py\n--- a/nextcloudappstore/core/certificate/validator.py\n+++ b/nextcloudappstore/core/certificate/validator.py\n@@ -3,7 +3,7 @@\n \n import pem\n from OpenSSL.crypto import FILETYPE_PEM, load_c... | 1,467 | 323 |
gh_patches_debug_5815 | rasdani/github-patches | git_diff | pulp__pulpcore-4722 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
file:// sync deletes files from directory
**Version**
Pulpcore 3.39
**Describe the bug**
When syncing file:// repositories, files are disappearing after the sync.
**To Reproduce**
1) Copy these two r... | diff --git a/pulpcore/download/file.py b/pulpcore/download/file.py
--- a/pulpcore/download/file.py
+++ b/pulpcore/download/file.py
@@ -57,7 +57,7 @@
break # the reading is done
await self.handle_data(chunk)
return DownloadResult(
- path=self._path,
+ ... | {"golden_diff": "diff --git a/pulpcore/download/file.py b/pulpcore/download/file.py\n--- a/pulpcore/download/file.py\n+++ b/pulpcore/download/file.py\n@@ -57,7 +57,7 @@\n break # the reading is done\n await self.handle_data(chunk)\n return DownloadResult(\n- ... | 1,016 | 99 |
gh_patches_debug_2426 | rasdani/github-patches | git_diff | kserve__kserve-864 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
explanations no longer working with 0.3.0
Am following the steps in with 0.3.0 of kfserving: https://github.com/kubeflow/kfserving/tree/master/docs/samples/explanation/alibi/income
When I execute the curl ... | diff --git a/python/alibiexplainer/setup.py b/python/alibiexplainer/setup.py
--- a/python/alibiexplainer/setup.py
+++ b/python/alibiexplainer/setup.py
@@ -33,7 +33,7 @@
packages=find_packages("alibiexplainer"),
install_requires=[
"kfserving>=0.3.0",
- "alibi>=0.3",
+ "alibi==0.3.2",
... | {"golden_diff": "diff --git a/python/alibiexplainer/setup.py b/python/alibiexplainer/setup.py\n--- a/python/alibiexplainer/setup.py\n+++ b/python/alibiexplainer/setup.py\n@@ -33,7 +33,7 @@\n packages=find_packages(\"alibiexplainer\"),\n install_requires=[\n \"kfserving>=0.3.0\",\n- \"alibi>=0.3\"... | 1,712 | 136 |
gh_patches_debug_23599 | rasdani/github-patches | git_diff | svthalia__concrexit-1793 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Food order can be changed after paying
### Describe the bug
If you order a pizza and pay it, you can still change the product. If you change the product through the api, the payment is not removed.
### Ho... | diff --git a/website/pizzas/api/v2/views.py b/website/pizzas/api/v2/views.py
--- a/website/pizzas/api/v2/views.py
+++ b/website/pizzas/api/v2/views.py
@@ -12,6 +12,8 @@
from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly
from rest_framework.response import Response
+from payments.exceptions ... | {"golden_diff": "diff --git a/website/pizzas/api/v2/views.py b/website/pizzas/api/v2/views.py\n--- a/website/pizzas/api/v2/views.py\n+++ b/website/pizzas/api/v2/views.py\n@@ -12,6 +12,8 @@\n from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly\n from rest_framework.response import Response\n \n+f... | 1,638 | 259 |
gh_patches_debug_496 | rasdani/github-patches | git_diff | deepchecks__deepchecks-1494 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Add copy button to code snippets
We used to have this:

For all code snippets (currentl... | diff --git a/docs/source/user-guide/tabular/tutorials/plot_quick_data_integrity.py b/docs/source/user-guide/tabular/tutorials/plot_quick_data_integrity.py
--- a/docs/source/user-guide/tabular/tutorials/plot_quick_data_integrity.py
+++ b/docs/source/user-guide/tabular/tutorials/plot_quick_data_integrity.py
@@ -143,7 +14... | {"golden_diff": "diff --git a/docs/source/user-guide/tabular/tutorials/plot_quick_data_integrity.py b/docs/source/user-guide/tabular/tutorials/plot_quick_data_integrity.py\n--- a/docs/source/user-guide/tabular/tutorials/plot_quick_data_integrity.py\n+++ b/docs/source/user-guide/tabular/tutorials/plot_quick_data_integri... | 1,968 | 125 |
gh_patches_debug_9032 | rasdani/github-patches | git_diff | scikit-hep__pyhf-101 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
speed up CI tests (do we need all conda packages?)
By using Conda, unfortunately the setup phase of the CI jobs have become a bit slower than without conda, maybe we can look into speeding them up again by ch... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@
packages = find_packages(),
include_package_data = True,
install_requires = [
- 'numpy',
+ 'numpy>=1.14.3',
'scipy'
],
extras_require = {
@@ -24,7 +24,7 @@
],
'develop': [
'pyflakes',
- 'pyte... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -9,7 +9,7 @@\n packages = find_packages(),\n include_package_data = True,\n install_requires = [\n- 'numpy',\n+ 'numpy>=1.14.3',\n 'scipy'\n ],\n extras_require = {\n@@ -24,7 +24,7 @@\n ],\n 'develop': [\n ... | 696 | 151 |
gh_patches_debug_29080 | rasdani/github-patches | git_diff | matrix-org__synapse-7506 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement room version 6
Will contain additional features:
* #6898
* https://github.com/matrix-org/synapse/pull/7381
* #7501
Do not enable by default just yet.
--- END ISSUE ---
Below are some code se... | diff --git a/synapse/api/room_versions.py b/synapse/api/room_versions.py
--- a/synapse/api/room_versions.py
+++ b/synapse/api/room_versions.py
@@ -120,34 +120,14 @@
strict_canonicaljson=False,
limit_notifications_power_levels=False,
)
- MSC2432_DEV = RoomVersion(
- "org.matrix.msc2432",... | {"golden_diff": "diff --git a/synapse/api/room_versions.py b/synapse/api/room_versions.py\n--- a/synapse/api/room_versions.py\n+++ b/synapse/api/room_versions.py\n@@ -120,34 +120,14 @@\n strict_canonicaljson=False,\n limit_notifications_power_levels=False,\n )\n- MSC2432_DEV = RoomVersion(\n- ... | 1,953 | 423 |
gh_patches_debug_15497 | rasdani/github-patches | git_diff | ipython__ipython-4363 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`?` may generate hundreds of cell
By mistake I have executed a cell like
```
for i in range(3):
x= range?
```
but with ~70 instead of 3
which generated 70 code cell with just `x= range` in it.... | diff --git a/IPython/core/payload.py b/IPython/core/payload.py
--- a/IPython/core/payload.py
+++ b/IPython/core/payload.py
@@ -29,9 +29,23 @@
_payload = List([])
- def write_payload(self, data):
+ def write_payload(self, data, single=True):
+ """Include or update the specified `data` payload in th... | {"golden_diff": "diff --git a/IPython/core/payload.py b/IPython/core/payload.py\n--- a/IPython/core/payload.py\n+++ b/IPython/core/payload.py\n@@ -29,9 +29,23 @@\n \n _payload = List([])\n \n- def write_payload(self, data):\n+ def write_payload(self, data, single=True):\n+ \"\"\"Include or update the s... | 635 | 234 |
gh_patches_debug_66590 | rasdani/github-patches | git_diff | StackStorm__st2-3843 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Action 'linux.service' fails on Centos7
When I tried to execute restart some service on the Centos7 server got the following error:
```
Traceback (most recent call last):
File "/tmp/5a0459bc07ac686fb813a... | diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py
--- a/contrib/linux/actions/service.py
+++ b/contrib/linux/actions/service.py
@@ -18,7 +18,8 @@
else:
print("Unknown service")
sys.exit(2)
-elif re.search(distro, 'Redhat') or re.search(distro, 'Fedora'):
+elif re.se... | {"golden_diff": "diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py\n--- a/contrib/linux/actions/service.py\n+++ b/contrib/linux/actions/service.py\n@@ -18,7 +18,8 @@\n else:\n print(\"Unknown service\")\n sys.exit(2)\n-elif re.search(distro, 'Redhat') or re.search(dist... | 688 | 148 |
gh_patches_debug_13852 | rasdani/github-patches | git_diff | ESMCI__cime-2700 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issue downloading data (wildcards not supported in HTTP)
I was wanting to have a case download all of the data it needs. First create an empty tmp inputdata directory, set the DIN env vars. However, I got er... | diff --git a/scripts/lib/CIME/Servers/wget.py b/scripts/lib/CIME/Servers/wget.py
--- a/scripts/lib/CIME/Servers/wget.py
+++ b/scripts/lib/CIME/Servers/wget.py
@@ -46,7 +46,9 @@
def getdirectory(self, rel_path, full_path):
full_url = os.path.join(self._server_loc, rel_path)
stat, output, errput = ... | {"golden_diff": "diff --git a/scripts/lib/CIME/Servers/wget.py b/scripts/lib/CIME/Servers/wget.py\n--- a/scripts/lib/CIME/Servers/wget.py\n+++ b/scripts/lib/CIME/Servers/wget.py\n@@ -46,7 +46,9 @@\n def getdirectory(self, rel_path, full_path):\n full_url = os.path.join(self._server_loc, rel_path)\n ... | 1,404 | 215 |
gh_patches_debug_19063 | rasdani/github-patches | git_diff | streamlink__streamlink-185 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Plugin for Livestream.com not working right? exit's quickly for hls and not at all for normal streams
I am trying to get a live stream on livestreamer.com to work and i can't get it to play more then about 3... | diff --git a/src/streamlink/plugins/livestream.py b/src/streamlink/plugins/livestream.py
--- a/src/streamlink/plugins/livestream.py
+++ b/src/streamlink/plugins/livestream.py
@@ -22,7 +22,10 @@
),
}, None)
},
- validate.optional("playerUri"): validate.text
+ validate.optional("playerUri... | {"golden_diff": "diff --git a/src/streamlink/plugins/livestream.py b/src/streamlink/plugins/livestream.py\n--- a/src/streamlink/plugins/livestream.py\n+++ b/src/streamlink/plugins/livestream.py\n@@ -22,7 +22,10 @@\n ),\n }, None)\n },\n- validate.optional(\"playerUri\"): validate.text\n+ v... | 1,758 | 268 |
gh_patches_debug_282 | rasdani/github-patches | git_diff | opendatacube__datacube-core-1331 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Code includes Type Annotations, but they're not made available for type checking (PEP561)
**Summary**
The ODC code is fairly well annotated with [Python type hints](https://typing.readthedocs.io/en/latest... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -82,6 +82,7 @@
),
package_data={
'': ['*.yaml', '*/*.yaml'],
+ 'datacube': ['py.typed'],
},
scripts=[],
install_requires=[
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -82,6 +82,7 @@\n ),\n package_data={\n '': ['*.yaml', '*/*.yaml'],\n+ 'datacube': ['py.typed'],\n },\n scripts=[],\n install_requires=[\n", "issue": "Code includes Type Annotations, but they're not ... | 1,777 | 70 |
gh_patches_debug_26282 | rasdani/github-patches | git_diff | rotki__rotki-5256 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Think of a way to keep development accounts separately
## Abstract
Between multiple development machines and between `production`/`develop` it becomes harder to keep track of which database has been used ... | diff --git a/rotkehlchen/config.py b/rotkehlchen/config.py
--- a/rotkehlchen/config.py
+++ b/rotkehlchen/config.py
@@ -2,6 +2,7 @@
import os
import platform
import shutil
+import sys
from pathlib import Path
from rotkehlchen.logging import RotkehlchenLogsAdapter
@@ -42,14 +43,18 @@
An interesting lirary tha... | {"golden_diff": "diff --git a/rotkehlchen/config.py b/rotkehlchen/config.py\n--- a/rotkehlchen/config.py\n+++ b/rotkehlchen/config.py\n@@ -2,6 +2,7 @@\n import os\n import platform\n import shutil\n+import sys\n from pathlib import Path\n \n from rotkehlchen.logging import RotkehlchenLogsAdapter\n@@ -42,14 +43,18 @@\n ... | 1,043 | 357 |
gh_patches_debug_12204 | rasdani/github-patches | git_diff | conda__conda-5273 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
conda env export under python2 is ug
```
$ python2 -m conda_env export -p /conda
name: null
channels:
- !!python/unicode
'file:///Users/kfranz/.conda/conda-bld'
- !!python/unicode
'file:///conda/co... | diff --git a/conda_env/yaml.py b/conda_env/yaml.py
--- a/conda_env/yaml.py
+++ b/conda_env/yaml.py
@@ -6,6 +6,7 @@
from __future__ import absolute_import, print_function
from collections import OrderedDict
+from conda.common.compat import PY2
from conda.common.yaml import get_yaml
yaml = get_yaml()
@@ -24,6 +25... | {"golden_diff": "diff --git a/conda_env/yaml.py b/conda_env/yaml.py\n--- a/conda_env/yaml.py\n+++ b/conda_env/yaml.py\n@@ -6,6 +6,7 @@\n from __future__ import absolute_import, print_function\n from collections import OrderedDict\n \n+from conda.common.compat import PY2\n from conda.common.yaml import get_yaml\n yaml =... | 795 | 177 |
gh_patches_debug_11179 | rasdani/github-patches | git_diff | akvo__akvo-rsr-2213 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add reporting template for Plan Finland
We should add the reporting template that @stellanl and @Geerts are working on to the "My reports" section. Preferably so that only superusers / admins / Plan Finland e... | diff --git a/akvo/rsr/reports.py b/akvo/rsr/reports.py
--- a/akvo/rsr/reports.py
+++ b/akvo/rsr/reports.py
@@ -52,6 +52,15 @@
'formats': ['pdf', 'excel'],
'parameters': ['organisation', ],
'url': '/en/reports/data_quality/{organisation}?format={format}&download=true'
+ },
+ {
+ '... | {"golden_diff": "diff --git a/akvo/rsr/reports.py b/akvo/rsr/reports.py\n--- a/akvo/rsr/reports.py\n+++ b/akvo/rsr/reports.py\n@@ -52,6 +52,15 @@\n 'formats': ['pdf', 'excel'],\n 'parameters': ['organisation', ],\n 'url': '/en/reports/data_quality/{organisation}?format={format}&download=true'\n+... | 1,277 | 203 |
gh_patches_debug_26692 | rasdani/github-patches | git_diff | google__fuzzbench-291 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[GCP] Runners are not started.
I pulled master and tried to evaluate libfuzzer against honggfuzz in 5 trials for 1 hour on 1 benchmark (mbedtls_fuzz_dtlsclient). It doesn't generate the report anymore. The we... | diff --git a/common/benchmark_utils.py b/common/benchmark_utils.py
--- a/common/benchmark_utils.py
+++ b/common/benchmark_utils.py
@@ -48,9 +48,6 @@
"""Get the URL of the docker runner image for fuzzing the benchmark with
fuzzer."""
base_tag = experiment_utils.get_base_docker_tag(cloud_project)
- if i... | {"golden_diff": "diff --git a/common/benchmark_utils.py b/common/benchmark_utils.py\n--- a/common/benchmark_utils.py\n+++ b/common/benchmark_utils.py\n@@ -48,9 +48,6 @@\n \"\"\"Get the URL of the docker runner image for fuzzing the benchmark with\n fuzzer.\"\"\"\n base_tag = experiment_utils.get_base_docker... | 1,686 | 291 |
gh_patches_debug_4798 | rasdani/github-patches | git_diff | pytorch__vision-2793 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The ASPP layer has a hard-coded value that only works if the atrous_rates param is of length 3
## 🐛 Bug
The ASPP layer has a hard-coded value that only works if the list of atrous rates provided is of len... | diff --git a/torchvision/models/segmentation/deeplabv3.py b/torchvision/models/segmentation/deeplabv3.py
--- a/torchvision/models/segmentation/deeplabv3.py
+++ b/torchvision/models/segmentation/deeplabv3.py
@@ -80,7 +80,7 @@
self.convs = nn.ModuleList(modules)
self.project = nn.Sequential(
- ... | {"golden_diff": "diff --git a/torchvision/models/segmentation/deeplabv3.py b/torchvision/models/segmentation/deeplabv3.py\n--- a/torchvision/models/segmentation/deeplabv3.py\n+++ b/torchvision/models/segmentation/deeplabv3.py\n@@ -80,7 +80,7 @@\n self.convs = nn.ModuleList(modules)\n \n self.project = n... | 2,046 | 164 |
gh_patches_debug_14203 | rasdani/github-patches | git_diff | getsentry__sentry-python-2476 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
FastApiIntegration hides request handler function name
### How do you use Sentry?
Sentry Saas (sentry.io)
### Version
1.31.0
### Steps to Reproduce
Use the python sentry sdk in conjunction with FastAPI a... | diff --git a/sentry_sdk/integrations/fastapi.py b/sentry_sdk/integrations/fastapi.py
--- a/sentry_sdk/integrations/fastapi.py
+++ b/sentry_sdk/integrations/fastapi.py
@@ -1,6 +1,7 @@
import asyncio
from copy import deepcopy
+from sentry_sdk._functools import wraps
from sentry_sdk._types import TYPE_CHECKING
from ... | {"golden_diff": "diff --git a/sentry_sdk/integrations/fastapi.py b/sentry_sdk/integrations/fastapi.py\n--- a/sentry_sdk/integrations/fastapi.py\n+++ b/sentry_sdk/integrations/fastapi.py\n@@ -1,6 +1,7 @@\n import asyncio\n from copy import deepcopy\n \n+from sentry_sdk._functools import wraps\n from sentry_sdk._types im... | 1,898 | 178 |
gh_patches_debug_18754 | rasdani/github-patches | git_diff | streamlink__streamlink-4467 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove `streamlink.plugin.api.utils.itertags`
[`streamlink.plugin.api.utils.itertags`](https://github.com/streamlink/streamlink/blob/3.2.0/src/streamlink/plugin/api/utils.py#L16-L28) has become obsolete ever ... | diff --git a/src/streamlink/plugin/api/utils.py b/src/streamlink/plugin/api/utils.py
deleted file mode 100644
--- a/src/streamlink/plugin/api/utils.py
+++ /dev/null
@@ -1,28 +0,0 @@
-"""Useful wrappers and other tools."""
-import re
-from collections import namedtuple
-
-from streamlink.utils.parse import parse_json, p... | {"golden_diff": "diff --git a/src/streamlink/plugin/api/utils.py b/src/streamlink/plugin/api/utils.py\ndeleted file mode 100644\n--- a/src/streamlink/plugin/api/utils.py\n+++ /dev/null\n@@ -1,28 +0,0 @@\n-\"\"\"Useful wrappers and other tools.\"\"\"\n-import re\n-from collections import namedtuple\n-\n-from streamlink.... | 1,136 | 407 |
gh_patches_debug_60797 | rasdani/github-patches | git_diff | engnadeau__pybotics-751 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create a way to add your own arm model[FEATURE]
## User Story
<!-- A clear and concise description of what the problem is.
I want to add my own arm configuration to the list of pre-trained models.
## ... | diff --git a/pybotics/predefined_models.py b/pybotics/predefined_models.py
--- a/pybotics/predefined_models.py
+++ b/pybotics/predefined_models.py
@@ -1,4 +1,8 @@
-"""Predefined robot models."""
+"""Predefined robot models.
+
+These models correspond to the Modified Denavit–Hartenberg parameters:
+https://en.wikipedia.... | {"golden_diff": "diff --git a/pybotics/predefined_models.py b/pybotics/predefined_models.py\n--- a/pybotics/predefined_models.py\n+++ b/pybotics/predefined_models.py\n@@ -1,4 +1,8 @@\n-\"\"\"Predefined robot models.\"\"\"\n+\"\"\"Predefined robot models.\n+\n+These models correspond to the Modified Denavit\u2013Hartenb... | 1,335 | 115 |
gh_patches_debug_1536 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-2525 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Demo template management command unexpected args.
## Description
<!-- A clear and concise description of what the bug is. -->
After starting dev environment, the management command to setup the demo DB is... | diff --git a/demo/management/commands/setup_demo_template_db.py b/demo/management/commands/setup_demo_template_db.py
--- a/demo/management/commands/setup_demo_template_db.py
+++ b/demo/management/commands/setup_demo_template_db.py
@@ -12,7 +12,7 @@
help = 'Initialize the demo template database.'
def handle(... | {"golden_diff": "diff --git a/demo/management/commands/setup_demo_template_db.py b/demo/management/commands/setup_demo_template_db.py\n--- a/demo/management/commands/setup_demo_template_db.py\n+++ b/demo/management/commands/setup_demo_template_db.py\n@@ -12,7 +12,7 @@\n help = 'Initialize the demo template database... | 1,068 | 115 |
gh_patches_debug_5188 | rasdani/github-patches | git_diff | Lightning-Universe__lightning-flash-104 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Download Data Fails if Content Length Not Defined in Header
## 🐛 Bug
When I try to download a zip file using download_data from flash.core.data it fails because the response header does not contain a valu... | diff --git a/flash/core/data/utils.py b/flash/core/data/utils.py
--- a/flash/core/data/utils.py
+++ b/flash/core/data/utils.py
@@ -35,7 +35,7 @@
os.makedirs(path)
local_filename = os.path.join(path, url.split('/')[-1])
r = requests.get(url, stream=True)
- file_size = int(r.headers['Content-Length'... | {"golden_diff": "diff --git a/flash/core/data/utils.py b/flash/core/data/utils.py\n--- a/flash/core/data/utils.py\n+++ b/flash/core/data/utils.py\n@@ -35,7 +35,7 @@\n os.makedirs(path)\n local_filename = os.path.join(path, url.split('/')[-1])\n r = requests.get(url, stream=True)\n- file_size = int(r.... | 1,660 | 141 |
gh_patches_debug_7848 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-977 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Maptopicprio: Polygon may not be set
When I try to create a maptopic in the dashboard, it is not guaranteed that a polygon is already set. The map for setting a point therefore fails to display.
--- END ISSU... | diff --git a/meinberlin/apps/maptopicprio/dashboard.py b/meinberlin/apps/maptopicprio/dashboard.py
--- a/meinberlin/apps/maptopicprio/dashboard.py
+++ b/meinberlin/apps/maptopicprio/dashboard.py
@@ -15,7 +15,12 @@
def is_effective(self, module):
module_app = module.phases[0].content().app
- retur... | {"golden_diff": "diff --git a/meinberlin/apps/maptopicprio/dashboard.py b/meinberlin/apps/maptopicprio/dashboard.py\n--- a/meinberlin/apps/maptopicprio/dashboard.py\n+++ b/meinberlin/apps/maptopicprio/dashboard.py\n@@ -15,7 +15,12 @@\n \n def is_effective(self, module):\n module_app = module.phases[0].conte... | 760 | 177 |
gh_patches_debug_14220 | rasdani/github-patches | git_diff | fossasia__open-event-server-5229 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow bank, cheque and onsite for payment_mode in orders schema
**Describe the bug**
Currently setting bank, cheque and onsite for payment_mode returns 422 error.
**Expected behavior**
Payment Mode shoul... | diff --git a/app/api/schema/orders.py b/app/api/schema/orders.py
--- a/app/api/schema/orders.py
+++ b/app/api/schema/orders.py
@@ -56,8 +56,10 @@
completed_at = fields.DateTime(dump_only=True)
created_at = fields.DateTime(dump_only=True)
transaction_id = fields.Str(dump_only=True)
- payment_mode = fie... | {"golden_diff": "diff --git a/app/api/schema/orders.py b/app/api/schema/orders.py\n--- a/app/api/schema/orders.py\n+++ b/app/api/schema/orders.py\n@@ -56,8 +56,10 @@\n completed_at = fields.DateTime(dump_only=True)\n created_at = fields.DateTime(dump_only=True)\n transaction_id = fields.Str(dump_only=True)\... | 1,648 | 190 |
gh_patches_debug_63639 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-2239 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Logged out view of list of lists is empty
This is a 🤦 on my part -- it should directly query the list of public lists, instead of trying to use the redis cache, which relies on logged in users
--- END ISSUE... | diff --git a/bookwyrm/views/list/lists.py b/bookwyrm/views/list/lists.py
--- a/bookwyrm/views/list/lists.py
+++ b/bookwyrm/views/list/lists.py
@@ -17,7 +17,10 @@
def get(self, request):
"""display a book list"""
- lists = ListsStream().get_list_stream(request.user)
+ if request.user.is_aut... | {"golden_diff": "diff --git a/bookwyrm/views/list/lists.py b/bookwyrm/views/list/lists.py\n--- a/bookwyrm/views/list/lists.py\n+++ b/bookwyrm/views/list/lists.py\n@@ -17,7 +17,10 @@\n \n def get(self, request):\n \"\"\"display a book list\"\"\"\n- lists = ListsStream().get_list_stream(request.user)\n... | 1,040 | 149 |
gh_patches_debug_17668 | rasdani/github-patches | git_diff | scikit-image__scikit-image-3642 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
"[Errno 36] File name too long:" when using imread on remote resource with long querystring
## Description
When using skimage.io.imread with a remote resource, a long query string on the remote resource will... | diff --git a/skimage/io/util.py b/skimage/io/util.py
--- a/skimage/io/util.py
+++ b/skimage/io/util.py
@@ -1,4 +1,4 @@
-from urllib.request import urlopen
+import urllib.parse
import os
import re
@@ -19,10 +19,11 @@
def file_or_url_context(resource_name):
"""Yield name of file from the given resource (i.e. fi... | {"golden_diff": "diff --git a/skimage/io/util.py b/skimage/io/util.py\n--- a/skimage/io/util.py\n+++ b/skimage/io/util.py\n@@ -1,4 +1,4 @@\n-from urllib.request import urlopen\n+import urllib.parse\n \n import os\n import re\n@@ -19,10 +19,11 @@\n def file_or_url_context(resource_name):\n \"\"\"Yield name of file f... | 1,404 | 206 |
gh_patches_debug_25033 | rasdani/github-patches | git_diff | apache__airflow-6783 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[AIRFLOW-3014] Fix multiple alembic heads
Make sure you have checked _all_ steps below.
### Jira
- [ ] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues... | diff --git a/airflow/migrations/versions/c1840b4bcf1a_increase_length_of_password_column_in_.py b/airflow/migrations/versions/c1840b4bcf1a_increase_length_of_password_column_in_.py
deleted file mode 100644
--- a/airflow/migrations/versions/c1840b4bcf1a_increase_length_of_password_column_in_.py
+++ /dev/null
@@ -1,50 +0... | {"golden_diff": "diff --git a/airflow/migrations/versions/c1840b4bcf1a_increase_length_of_password_column_in_.py b/airflow/migrations/versions/c1840b4bcf1a_increase_length_of_password_column_in_.py\ndeleted file mode 100644\n--- a/airflow/migrations/versions/c1840b4bcf1a_increase_length_of_password_column_in_.py\n+++ /... | 1,293 | 553 |
gh_patches_debug_67223 | rasdani/github-patches | git_diff | svthalia__concrexit-1867 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix payable registry cache using old data
### Describe the bug
Payments are a mess. For example, if you pay for an event registration, delete the payment (through the admin or api), creating a new TPay payme... | diff --git a/website/payments/payables.py b/website/payments/payables.py
--- a/website/payments/payables.py
+++ b/website/payments/payables.py
@@ -56,7 +56,6 @@
def _get_key(self, model):
return f"{model._meta.app_label}_{model._meta.model_name}"
- @lru_cache(maxsize=None)
def get_payable(self, ... | {"golden_diff": "diff --git a/website/payments/payables.py b/website/payments/payables.py\n--- a/website/payments/payables.py\n+++ b/website/payments/payables.py\n@@ -56,7 +56,6 @@\n def _get_key(self, model):\n return f\"{model._meta.app_label}_{model._meta.model_name}\"\n \n- @lru_cache(maxsize=None)\n... | 1,003 | 135 |
gh_patches_debug_29304 | rasdani/github-patches | git_diff | cal-itp__benefits-755 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ensure relevant analytics events are fired for Login.gov IAL2 flow
Design to collaborate with Dev to ensure the behaviors they are interested in understanding are defined in Amplitude.
- [x] `cancel_sign_... | diff --git a/benefits/oauth/analytics.py b/benefits/oauth/analytics.py
--- a/benefits/oauth/analytics.py
+++ b/benefits/oauth/analytics.py
@@ -20,6 +20,13 @@
super().__init__(request, "started sign in")
+class CanceledSignInEvent(OAuthEvent):
+ """Analytics event representing the canceling of applicatio... | {"golden_diff": "diff --git a/benefits/oauth/analytics.py b/benefits/oauth/analytics.py\n--- a/benefits/oauth/analytics.py\n+++ b/benefits/oauth/analytics.py\n@@ -20,6 +20,13 @@\n super().__init__(request, \"started sign in\")\n \n \n+class CanceledSignInEvent(OAuthEvent):\n+ \"\"\"Analytics event representi... | 1,914 | 379 |
gh_patches_debug_37702 | rasdani/github-patches | git_diff | Textualize__textual-2605 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add a `description` parameter to the work decorator, to use in place of the auto-generated description.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files... | diff --git a/src/textual/_work_decorator.py b/src/textual/_work_decorator.py
--- a/src/textual/_work_decorator.py
+++ b/src/textual/_work_decorator.py
@@ -58,6 +58,7 @@
group: str = "default",
exit_on_error: bool = True,
exclusive: bool = False,
+ description: str | None = None,
) -> Callable[Factory... | {"golden_diff": "diff --git a/src/textual/_work_decorator.py b/src/textual/_work_decorator.py\n--- a/src/textual/_work_decorator.py\n+++ b/src/textual/_work_decorator.py\n@@ -58,6 +58,7 @@\n group: str = \"default\",\n exit_on_error: bool = True,\n exclusive: bool = False,\n+ description: str | None = No... | 1,282 | 546 |
gh_patches_debug_4548 | rasdani/github-patches | git_diff | capitalone__DataProfiler-739 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Windows Install error - ValueError: path 'resources/' cannot end with '/
https://github.com/capitalone/DataProfiler/blob/5b04b7fe5ee3556235c397efb69b32cd5d364a3b/setup.py#L33
Ran into an install isue
Val... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@
with open(path.join(here, "requirements-reports.txt"), encoding="utf-8") as f:
reports_packages = f.read().splitlines()
-resource_dir = "resources/"
+resource_dir = "resources"
default_labeler_files = [
(d, [os.path.join(d, f... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -30,7 +30,7 @@\n with open(path.join(here, \"requirements-reports.txt\"), encoding=\"utf-8\") as f:\n reports_packages = f.read().splitlines()\n \n-resource_dir = \"resources/\"\n+resource_dir = \"resources\"\n default_labeler_fil... | 1,658 | 113 |
gh_patches_debug_4972 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-3342 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider superonefoods is broken
During the global build at 2021-09-22-14-42-27, spider **superonefoods** failed with **0 features** and **1 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-0... | diff --git a/locations/spiders/superonefoods.py b/locations/spiders/superonefoods.py
--- a/locations/spiders/superonefoods.py
+++ b/locations/spiders/superonefoods.py
@@ -15,7 +15,7 @@
def parse(self, response):
# retrieve js data variable from script tag
- items = response.xpath('//script/text()... | {"golden_diff": "diff --git a/locations/spiders/superonefoods.py b/locations/spiders/superonefoods.py\n--- a/locations/spiders/superonefoods.py\n+++ b/locations/spiders/superonefoods.py\n@@ -15,7 +15,7 @@\n \n def parse(self, response):\n # retrieve js data variable from script tag\n- items = respons... | 825 | 149 |
gh_patches_debug_31326 | rasdani/github-patches | git_diff | apluslms__a-plus-575 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Compress HTML pages in the cache
Exercise and chapter pages are stored in the cache and only update if the backend reports that there is a change. Some pages might be large (e.g. 1M), but do compress relative... | diff --git a/exercise/cache/exercise.py b/exercise/cache/exercise.py
--- a/exercise/cache/exercise.py
+++ b/exercise/cache/exercise.py
@@ -1,4 +1,6 @@
+import logging
import time
+
from django.conf import settings
from django.db.models.signals import post_save, post_delete
@@ -6,6 +8,18 @@
from lib.remote_page im... | {"golden_diff": "diff --git a/exercise/cache/exercise.py b/exercise/cache/exercise.py\n--- a/exercise/cache/exercise.py\n+++ b/exercise/cache/exercise.py\n@@ -1,4 +1,6 @@\n+import logging\n import time\n+\n from django.conf import settings\n from django.db.models.signals import post_save, post_delete\n \n@@ -6,6 +8,18 ... | 834 | 377 |
gh_patches_debug_8197 | rasdani/github-patches | git_diff | sanic-org__sanic-2438 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Easier websocket interface annotation
Right now, to properly annotate a websocket endpoint you need to do this:
```python
from sanic.server.websockets.impl import WebsocketImplProtocol
from sanic import ... | diff --git a/sanic/__init__.py b/sanic/__init__.py
--- a/sanic/__init__.py
+++ b/sanic/__init__.py
@@ -4,6 +4,7 @@
from sanic.constants import HTTPMethod
from sanic.request import Request
from sanic.response import HTTPResponse, html, json, text
+from sanic.server.websockets.impl import WebsocketImplProtocol as Webs... | {"golden_diff": "diff --git a/sanic/__init__.py b/sanic/__init__.py\n--- a/sanic/__init__.py\n+++ b/sanic/__init__.py\n@@ -4,6 +4,7 @@\n from sanic.constants import HTTPMethod\n from sanic.request import Request\n from sanic.response import HTTPResponse, html, json, text\n+from sanic.server.websockets.impl import Webso... | 521 | 142 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.