problem_id stringlengths 18 22 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 58 | prompt stringlengths 1.71k 18.9k | golden_diff stringlengths 145 5.13k | verification_info stringlengths 465 23.6k | num_tokens_prompt int64 556 4.1k | num_tokens_diff int64 47 1.02k |
|---|---|---|---|---|---|---|---|---|
gh_patches_debug_32737 | rasdani/github-patches | git_diff | dask__dask-586 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Additional improvement for da.image.imread
I think following 2 improvements make the function better.
#### 1. Allow custom `imread` function.
Some prefer `opencv` which reads color in BGR order, otherwise `ski... | diff --git a/dask/array/image.py b/dask/array/image.py
--- a/dask/array/image.py
+++ b/dask/array/image.py
@@ -13,7 +13,7 @@
return x[None, ...]
-def imread(filename):
+def imread(filename, imread=None, preprocess=None):
""" Read a stack of images into a dask array
Parameters
@@ -21,6 +21,13 @@
... | {"golden_diff": "diff --git a/dask/array/image.py b/dask/array/image.py\n--- a/dask/array/image.py\n+++ b/dask/array/image.py\n@@ -13,7 +13,7 @@\n return x[None, ...]\n \n \n-def imread(filename):\n+def imread(filename, imread=None, preprocess=None):\n \"\"\" Read a stack of images into a dask array\n \n Pa... | 1,119 | 497 |
gh_patches_debug_3876 | rasdani/github-patches | git_diff | xorbitsai__inference-299 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
FEAT: Disable Gradio Telemetry
Pull requests are disabled but see here:
https://github.com/arch-btw/inference/pull/1
</issue>
<code>
[start of examples/gradio_chatinterface.py]
1 from typing import Dict, Li... | diff --git a/examples/gradio_chatinterface.py b/examples/gradio_chatinterface.py
--- a/examples/gradio_chatinterface.py
+++ b/examples/gradio_chatinterface.py
@@ -105,6 +105,7 @@
demo = gr.ChatInterface(
fn=generate_wrapper,
+ analytics_enabled=False,
examples=[
"Show me a t... | {"golden_diff": "diff --git a/examples/gradio_chatinterface.py b/examples/gradio_chatinterface.py\n--- a/examples/gradio_chatinterface.py\n+++ b/examples/gradio_chatinterface.py\n@@ -105,6 +105,7 @@\n \n demo = gr.ChatInterface(\n fn=generate_wrapper,\n+ analytics_enabled=False,\n examples=[\... | 1,628 | 103 |
gh_patches_debug_16504 | rasdani/github-patches | git_diff | mampfes__hacs_waste_collection_schedule-1693 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[Bug]: portenf_sa_gov_au reporting incorrect dates
### I Have A Problem With:
A specific source
### What's Your Problem
The portenf_sa_gov_au sensor has been reporting incorrectly since it updated itse... | diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/portenf_sa_gov_au.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/portenf_sa_gov_au.py
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/portenf_sa_gov_au.py
+++ b... | {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/portenf_sa_gov_au.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/portenf_sa_gov_au.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/portenf_... | 4,010 | 273 |
gh_patches_debug_4863 | rasdani/github-patches | git_diff | digitalfabrik__integreat-cms-1210 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
PDF Export URL pattern
### Describe the Bug
The web app calls `/REGION/LANG/wp-json/ig-mpdf/v1/pdf` to export a PDF which returns a 404. Our API currently uses `REGION/LANG/pdf`.
The normal mapping does not... | diff --git a/integreat_cms/api/urls.py b/integreat_cms/api/urls.py
--- a/integreat_cms/api/urls.py
+++ b/integreat_cms/api/urls.py
@@ -136,6 +136,11 @@
"<slug:language_slug>/wp-json/extensions/v3/",
include(content_api_urlpatterns),
),
+ path(
+ ... | {"golden_diff": "diff --git a/integreat_cms/api/urls.py b/integreat_cms/api/urls.py\n--- a/integreat_cms/api/urls.py\n+++ b/integreat_cms/api/urls.py\n@@ -136,6 +136,11 @@\n \"<slug:language_slug>/wp-json/extensions/v3/\",\n include(content_api_urlpatterns),\n ),\... | 1,934 | 129 |
gh_patches_debug_29434 | rasdani/github-patches | git_diff | plone__Products.CMFPlone-1515 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Resources from third party add-ons are not being included in compiled plone-legacy bundle
Seems JS resources registered in Plone 5 using old approach (`jsregistry.xml`) are not included in the final compilation... | diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py
--- a/Products/CMFPlone/resources/browser/combine.py
+++ b/Products/CMFPlone/resources/browser/combine.py
@@ -30,6 +30,14 @@
def get_resource(context, path):
+ if path.startswith('++plone++'):
+ #... | {"golden_diff": "diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py\n--- a/Products/CMFPlone/resources/browser/combine.py\n+++ b/Products/CMFPlone/resources/browser/combine.py\n@@ -30,6 +30,14 @@\n \n \n def get_resource(context, path):\n+ if path.startswith(... | 1,665 | 338 |
gh_patches_debug_22011 | rasdani/github-patches | git_diff | docker__docker-py-1330 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Add docker network IPAM options parameter
IPAM driver missing options
supports an options field in the IPAM config
It introduced in API v1.22.
```
POST /networks/create Now supports an options field in the I... | diff --git a/docker/types/networks.py b/docker/types/networks.py
--- a/docker/types/networks.py
+++ b/docker/types/networks.py
@@ -50,6 +50,8 @@
driver (str): The IPAM driver to use. Defaults to ``default``.
pool_configs (list): A list of pool configurations
(:py:class:`~docker.types.IPAMPo... | {"golden_diff": "diff --git a/docker/types/networks.py b/docker/types/networks.py\n--- a/docker/types/networks.py\n+++ b/docker/types/networks.py\n@@ -50,6 +50,8 @@\n driver (str): The IPAM driver to use. Defaults to ``default``.\n pool_configs (list): A list of pool configurations\n (:py:clas... | 1,578 | 254 |
gh_patches_debug_2452 | rasdani/github-patches | git_diff | pyinstaller__pyinstaller-2225 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
missing hidden import for skimage
When packaging an application that imports skimage.feature (and nothing else), the app would not run due to an ImportError on the "transform" module. This can be fixed by addi... | diff --git a/PyInstaller/hooks/hook-skimage.transform.py b/PyInstaller/hooks/hook-skimage.transform.py
--- a/PyInstaller/hooks/hook-skimage.transform.py
+++ b/PyInstaller/hooks/hook-skimage.transform.py
@@ -12,6 +12,7 @@
# 64-bit
hiddenimports = ['skimage.draw.draw',
'skimage._shared.geometry',
+ ... | {"golden_diff": "diff --git a/PyInstaller/hooks/hook-skimage.transform.py b/PyInstaller/hooks/hook-skimage.transform.py\n--- a/PyInstaller/hooks/hook-skimage.transform.py\n+++ b/PyInstaller/hooks/hook-skimage.transform.py\n@@ -12,6 +12,7 @@\n # 64-bit\n hiddenimports = ['skimage.draw.draw',\n 'skimage.... | 868 | 116 |
gh_patches_debug_7034 | rasdani/github-patches | git_diff | aws__aws-cli-5019 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Add support for PyYAML 5.3
Closes: https://github.com/aws/aws-cli/issues/4828
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
*Issue #, if available:*
*Description of changes:*
By submitting ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -28,13 +28,14 @@
'docutils>=0.10,<0.16',
'rsa>=3.1.2,<=3.5.0',
's3transfer>=0.3.0,<0.4.0',
- 'PyYAML>=3.10,<5.3',
]
if sys.version_info[:2] == (3, 4):
+ install_requires.append('PyYAML>=3.10,<5.3')
install_requires.append(... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -28,13 +28,14 @@\n 'docutils>=0.10,<0.16',\n 'rsa>=3.1.2,<=3.5.0',\n 's3transfer>=0.3.0,<0.4.0',\n- 'PyYAML>=3.10,<5.3',\n ]\n \n \n if sys.version_info[:2] == (3, 4):\n+ install_requires.append('PyYAML>=3.10,<5.3')\... | 1,561 | 196 |
gh_patches_debug_18897 | rasdani/github-patches | git_diff | quantumlib__Cirq-1897 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Handedness between ISwapPowGate and FSim is different.
The ISwapPowGate and FSim gate rotate in different directions on the |01>, |10> subspace. This feels a bit odd to me.
</issue>
<code>
[start of cirq/ops... | diff --git a/cirq/ops/fsim_gate.py b/cirq/ops/fsim_gate.py
--- a/cirq/ops/fsim_gate.py
+++ b/cirq/ops/fsim_gate.py
@@ -53,14 +53,23 @@
a = cos(theta)
b = -i·sin(theta)
c = exp(-i·phi)
+
+ Note the difference in sign conventions between FSimGate and the
+ ISWAP and CZPowGate:
+
+ ... | {"golden_diff": "diff --git a/cirq/ops/fsim_gate.py b/cirq/ops/fsim_gate.py\n--- a/cirq/ops/fsim_gate.py\n+++ b/cirq/ops/fsim_gate.py\n@@ -53,14 +53,23 @@\n a = cos(theta)\n b = -i\u00b7sin(theta)\n c = exp(-i\u00b7phi)\n+\n+ Note the difference in sign conventions between FSimGate and the\n+... | 2,399 | 319 |
gh_patches_debug_7774 | rasdani/github-patches | git_diff | aio-libs__aiohttp-4120 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Fix connection info in ClientConnectorError client exception
The message like `Cannot connect to host www.google.com:443 ssl:None` is misleading.
`ssl:None` means 'default', not 'disabled'
`Cannot connect t... | diff --git a/aiohttp/client_exceptions.py b/aiohttp/client_exceptions.py
--- a/aiohttp/client_exceptions.py
+++ b/aiohttp/client_exceptions.py
@@ -136,8 +136,9 @@
return self._conn_key.ssl
def __str__(self) -> str:
- return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{1}]'
- ... | {"golden_diff": "diff --git a/aiohttp/client_exceptions.py b/aiohttp/client_exceptions.py\n--- a/aiohttp/client_exceptions.py\n+++ b/aiohttp/client_exceptions.py\n@@ -136,8 +136,9 @@\n return self._conn_key.ssl\n \n def __str__(self) -> str:\n- return ('Cannot connect to host {0.host}:{0.port} ssl:{0... | 3,065 | 173 |
gh_patches_debug_26432 | rasdani/github-patches | git_diff | stephenmcd__mezzanine-846 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
UnicodeDecodeError ('ascii' codec can't decode) when memcached enabled
I can reproduce this on Ubuntu 12 and CentOS 6.
memcached installed and enabled.
Install new virtualenv and activate
~/venv/workingv... | diff --git a/mezzanine/core/middleware.py b/mezzanine/core/middleware.py
--- a/mezzanine/core/middleware.py
+++ b/mezzanine/core/middleware.py
@@ -149,7 +149,12 @@
# content. Split on the delimiter the ``nevercache`` tag
# wrapped its contents in, and render only the content
# enclosed by it,... | {"golden_diff": "diff --git a/mezzanine/core/middleware.py b/mezzanine/core/middleware.py\n--- a/mezzanine/core/middleware.py\n+++ b/mezzanine/core/middleware.py\n@@ -149,7 +149,12 @@\n # content. Split on the delimiter the ``nevercache`` tag\n # wrapped its contents in, and render only the content\n ... | 3,634 | 278 |
gh_patches_debug_14458 | rasdani/github-patches | git_diff | kovidgoyal__kitty-5211 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
MacOS: Launch OS Window via Remote Control
**Describe the bug**
Ref: https://github.com/kovidgoyal/kitty/issues/45#issuecomment-915753960
Remote control via socket doesn't work opening a new OS window ... | diff --git a/kitty/rc/launch.py b/kitty/rc/launch.py
--- a/kitty/rc/launch.py
+++ b/kitty/rc/launch.py
@@ -81,11 +81,14 @@
if val is None:
val = default_value
setattr(opts, key, val)
+ target_tab = None
tabs = self.tabs_for_match_payload(boss, window, payload_g... | {"golden_diff": "diff --git a/kitty/rc/launch.py b/kitty/rc/launch.py\n--- a/kitty/rc/launch.py\n+++ b/kitty/rc/launch.py\n@@ -81,11 +81,14 @@\n if val is None:\n val = default_value\n setattr(opts, key, val)\n+ target_tab = None\n tabs = self.tabs_for_match_payloa... | 2,265 | 236 |
gh_patches_debug_23025 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-862 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Empty hook file causes cryptic error
If you have a pre_gen_project.sh or a post_gen_project.sh file with no data in it, cookiecutter fails with an unhelpful traceback.
```
Traceback (most recent call last):
... | diff --git a/cookiecutter/hooks.py b/cookiecutter/hooks.py
--- a/cookiecutter/hooks.py
+++ b/cookiecutter/hooks.py
@@ -2,6 +2,7 @@
"""Functions for discovering and executing various cookiecutter hooks."""
+import errno
import io
import logging
import os
@@ -79,15 +80,26 @@
utils.make_executable(script_pa... | {"golden_diff": "diff --git a/cookiecutter/hooks.py b/cookiecutter/hooks.py\n--- a/cookiecutter/hooks.py\n+++ b/cookiecutter/hooks.py\n@@ -2,6 +2,7 @@\n \n \"\"\"Functions for discovering and executing various cookiecutter hooks.\"\"\"\n \n+import errno\n import io\n import logging\n import os\n@@ -79,15 +80,26 @@\n \n... | 2,297 | 328 |
gh_patches_debug_14431 | rasdani/github-patches | git_diff | tiangolo__fastapi-637 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
JSON output reordered by pydantic @validator
This isn't a big problem, but I'm wondering if it's possible to keep the JSON output key ordering unaffected by the presence of a Pydantic `@validator(...)`? I like ... | diff --git a/fastapi/utils.py b/fastapi/utils.py
--- a/fastapi/utils.py
+++ b/fastapi/utils.py
@@ -59,12 +59,11 @@
if lenient_issubclass(original_type, BaseModel):
original_type = cast(Type[BaseModel], original_type)
use_type = create_model(
- original_type.__name__,
- __con... | {"golden_diff": "diff --git a/fastapi/utils.py b/fastapi/utils.py\n--- a/fastapi/utils.py\n+++ b/fastapi/utils.py\n@@ -59,12 +59,11 @@\n if lenient_issubclass(original_type, BaseModel):\n original_type = cast(Type[BaseModel], original_type)\n use_type = create_model(\n- original_type.__na... | 2,754 | 182 |
gh_patches_debug_6280 | rasdani/github-patches | git_diff | PennyLaneAI__pennylane-2060 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Raise exception or warning when `qml.adjoint` is used on operation list instead of function.
The newer `qml.adjoint` function does not have any effect when acting on operation lists like in the following exampl... | diff --git a/pennylane/transforms/adjoint.py b/pennylane/transforms/adjoint.py
--- a/pennylane/transforms/adjoint.py
+++ b/pennylane/transforms/adjoint.py
@@ -108,6 +108,12 @@
>>> print(qml.draw(circuit)())
0: --RX(0.123)--RX(-0.123)--| <Z>
"""
+ if not callable(fn):
+ raise ValueEr... | {"golden_diff": "diff --git a/pennylane/transforms/adjoint.py b/pennylane/transforms/adjoint.py\n--- a/pennylane/transforms/adjoint.py\n+++ b/pennylane/transforms/adjoint.py\n@@ -108,6 +108,12 @@\n >>> print(qml.draw(circuit)())\r\n 0: --RX(0.123)--RX(-0.123)--| <Z>\r\n \"\"\"\r\n+ if not callabl... | 2,162 | 182 |
gh_patches_debug_14172 | rasdani/github-patches | git_diff | gammapy__gammapy-3905 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
FluxEstimator._set_norm_parameter crashes
**Gammapy version**
0.19
**Bug description**
Any code passing trough the "scan" branch of `FluxPointsEstimator._nan_result()` will crash due the invocation of `_se... | diff --git a/gammapy/estimators/flux.py b/gammapy/estimators/flux.py
--- a/gammapy/estimators/flux.py
+++ b/gammapy/estimators/flux.py
@@ -113,10 +113,12 @@
ref_model = models[self.source].spectral_model
scale_model = ScaleSpectralModel(ref_model)
- if "amplitude" in ref_model.parameters.name... | {"golden_diff": "diff --git a/gammapy/estimators/flux.py b/gammapy/estimators/flux.py\n--- a/gammapy/estimators/flux.py\n+++ b/gammapy/estimators/flux.py\n@@ -113,10 +113,12 @@\n ref_model = models[self.source].spectral_model\n scale_model = ScaleSpectralModel(ref_model)\n \n- if \"amplitude\" in... | 2,371 | 206 |
gh_patches_debug_21471 | rasdani/github-patches | git_diff | pymedusa__Medusa-9939 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[APP SUBMITTED]: AttributeError: 'NoneType' object has no attribute 'json'
### INFO
**Python Version**: `3.8.5 (default, Aug 2 2020, 15:09:07) [GCC 9.3.0]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-... | diff --git a/medusa/providers/torrent/json/privatehd.py b/medusa/providers/torrent/json/privatehd.py
--- a/medusa/providers/torrent/json/privatehd.py
+++ b/medusa/providers/torrent/json/privatehd.py
@@ -91,7 +91,7 @@
if not jdata.get('data') or not len(jdata['data']):
log.d... | {"golden_diff": "diff --git a/medusa/providers/torrent/json/privatehd.py b/medusa/providers/torrent/json/privatehd.py\n--- a/medusa/providers/torrent/json/privatehd.py\n+++ b/medusa/providers/torrent/json/privatehd.py\n@@ -91,7 +91,7 @@\n if not jdata.get('data') or not len(jdata['data']):\n ... | 2,758 | 204 |
gh_patches_debug_15701 | rasdani/github-patches | git_diff | aio-libs__aiohttp-3055 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
3.3 socket read timeouts not working correctly
@asvetlov looks like the new `sock_read` timeout implementation is not working, see testcase:
```python
import multiprocessing
import asyncio
import aiohttp
... | diff --git a/aiohttp/client_proto.py b/aiohttp/client_proto.py
--- a/aiohttp/client_proto.py
+++ b/aiohttp/client_proto.py
@@ -51,6 +51,7 @@
transport.close()
self.transport = None
self._payload = None
+ self._drop_timeout()
return transport
def is_conne... | {"golden_diff": "diff --git a/aiohttp/client_proto.py b/aiohttp/client_proto.py\n--- a/aiohttp/client_proto.py\n+++ b/aiohttp/client_proto.py\n@@ -51,6 +51,7 @@\n transport.close()\n self.transport = None\n self._payload = None\n+ self._drop_timeout()\n return tran... | 3,251 | 188 |
gh_patches_debug_37620 | rasdani/github-patches | git_diff | great-expectations__great_expectations-627 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
SparkDFDatasource can't use DatabricksTableGenerator
I'm trying to use `SparkDFDatasource` with a `DatabricksTableGenerator`. To me , it seems multiple problems are happening:
* `Datasource.add_generator` do... | diff --git a/great_expectations/datasource/generator/__init__.py b/great_expectations/datasource/generator/__init__.py
--- a/great_expectations/datasource/generator/__init__.py
+++ b/great_expectations/datasource/generator/__init__.py
@@ -0,0 +1 @@
+from .databricks_generator import DatabricksTableGenerator
\ No newlin... | {"golden_diff": "diff --git a/great_expectations/datasource/generator/__init__.py b/great_expectations/datasource/generator/__init__.py\n--- a/great_expectations/datasource/generator/__init__.py\n+++ b/great_expectations/datasource/generator/__init__.py\n@@ -0,0 +1 @@\n+from .databricks_generator import DatabricksTable... | 2,944 | 679 |
gh_patches_debug_35249 | rasdani/github-patches | git_diff | sktime__sktime-911 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[BUG] Prophet adapter fails to clone after setting parameters
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
Using sklearn's `clone` on `Prophet` after either `seasonali... | diff --git a/sktime/forecasting/fbprophet.py b/sktime/forecasting/fbprophet.py
--- a/sktime/forecasting/fbprophet.py
+++ b/sktime/forecasting/fbprophet.py
@@ -2,6 +2,8 @@
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
+"""Prophet forecaster by wrapping fbprophet."""
... | {"golden_diff": "diff --git a/sktime/forecasting/fbprophet.py b/sktime/forecasting/fbprophet.py\n--- a/sktime/forecasting/fbprophet.py\n+++ b/sktime/forecasting/fbprophet.py\n@@ -2,6 +2,8 @@\n # -*- coding: utf-8 -*-\n # copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n \n+\"\"\"Prophet forecaster... | 3,297 | 476 |
gh_patches_debug_19776 | rasdani/github-patches | git_diff | azavea__raster-vision-1484 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Local runner should write makefile to temporary dir
Instead, it writes it to the `root_uri` which might be an S3 URI, and `make`, which is used by the local runner cannot handle that.
Makefile error when `root_... | diff --git a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py
--- a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py
+++ b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py
@@ -2,7 +2,7 @@
from os.... | {"golden_diff": "diff --git a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py\n--- a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py\n+++ b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py\n@@ -2... | 1,650 | 267 |
gh_patches_debug_34217 | rasdani/github-patches | git_diff | mne-tools__mne-bids-pipeline-647 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Print heartbeat log messages
Some steps take quite a while to complete without printing log messages. This causes issues with CircleCI, which may believe the job is stuck; but it's also an issue for users, who ... | diff --git a/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py b/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py
--- a/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py
+++ b/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py
@@ -37,7 +37,8 @@
from ..._decoding import L... | {"golden_diff": "diff --git a/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py b/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py\n--- a/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py\n+++ b/mne_bids_pipeline/scripts/sensor/_03_decoding_time_by_time.py\n@@ -37,7 +37,8 @@\n from ... | 3,129 | 514 |
gh_patches_debug_26415 | rasdani/github-patches | git_diff | bokeh__bokeh-9163 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Update dataset for parallel coords plot examples
The example currently does this:
```
df = pd.read_csv("https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv")
```
Which is not rea... | diff --git a/examples/custom/parallel_plot/parallel_plot.py b/examples/custom/parallel_plot/parallel_plot.py
--- a/examples/custom/parallel_plot/parallel_plot.py
+++ b/examples/custom/parallel_plot/parallel_plot.py
@@ -1,11 +1,11 @@
import numpy as np
-import pandas as pd
from bokeh.plotting import figure
from bok... | {"golden_diff": "diff --git a/examples/custom/parallel_plot/parallel_plot.py b/examples/custom/parallel_plot/parallel_plot.py\n--- a/examples/custom/parallel_plot/parallel_plot.py\n+++ b/examples/custom/parallel_plot/parallel_plot.py\n@@ -1,11 +1,11 @@\n import numpy as np\n-import pandas as pd\n \n from bokeh.plotting... | 1,904 | 302 |
gh_patches_debug_19448 | rasdani/github-patches | git_diff | openstates__openstates-scrapers-2886 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
KS failing since at least 2019-02-24
KS has been failing since 2019-02-24
Based on automated runs it appears that KS has not run successfully in 2 days (2019-02-24).
```
06:02:22 INFO pupa: save jurisdicti... | diff --git a/openstates/ks/bills.py b/openstates/ks/bills.py
--- a/openstates/ks/bills.py
+++ b/openstates/ks/bills.py
@@ -1,6 +1,7 @@
import re
import json
import datetime
+import requests
import lxml.html
from pupa.scrape import Scraper, Bill, VoteEvent
@@ -179,8 +180,16 @@
... | {"golden_diff": "diff --git a/openstates/ks/bills.py b/openstates/ks/bills.py\n--- a/openstates/ks/bills.py\n+++ b/openstates/ks/bills.py\n@@ -1,6 +1,7 @@\n import re\n import json\n import datetime\n+import requests\n \n import lxml.html\n from pupa.scrape import Scraper, Bill, VoteEvent\n@@ -179,8 +180,16 @@\n ... | 3,929 | 245 |
gh_patches_debug_5990 | rasdani/github-patches | git_diff | googleapis__python-bigquery-672 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
AttributeError in `resource_name_to_date()` samples fixture
See this samples [test run](https://source.cloud.google.com/results/invocations/e5c424d5-84a6-4505-ae44-3bc70fa94e44/targets/cloud-devrel%2Fclient-lib... | diff --git a/samples/snippets/conftest.py b/samples/snippets/conftest.py
--- a/samples/snippets/conftest.py
+++ b/samples/snippets/conftest.py
@@ -33,7 +33,7 @@
def resource_name_to_date(resource_name: str):
start_date = len(RESOURCE_PREFIX) + 1
date_string = resource_name[start_date : start_date + RESOURCE_... | {"golden_diff": "diff --git a/samples/snippets/conftest.py b/samples/snippets/conftest.py\n--- a/samples/snippets/conftest.py\n+++ b/samples/snippets/conftest.py\n@@ -33,7 +33,7 @@\n def resource_name_to_date(resource_name: str):\n start_date = len(RESOURCE_PREFIX) + 1\n date_string = resource_name[start_date :... | 1,460 | 132 |
gh_patches_debug_60681 | rasdani/github-patches | git_diff | OCHA-DAP__hdx-ckan-1830 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Organization view pages result in 500 error
Only on stag. I tested several different orgs.

</is... | diff --git a/ckanext-hdx_search/ckanext/hdx_search/plugin.py b/ckanext-hdx_search/ckanext/hdx_search/plugin.py
--- a/ckanext-hdx_search/ckanext/hdx_search/plugin.py
+++ b/ckanext-hdx_search/ckanext/hdx_search/plugin.py
@@ -36,7 +36,7 @@
return map
def before_search(self, search_params):
- search_... | {"golden_diff": "diff --git a/ckanext-hdx_search/ckanext/hdx_search/plugin.py b/ckanext-hdx_search/ckanext/hdx_search/plugin.py\n--- a/ckanext-hdx_search/ckanext/hdx_search/plugin.py\n+++ b/ckanext-hdx_search/ckanext/hdx_search/plugin.py\n@@ -36,7 +36,7 @@\n return map\n \n def before_search(self, search_pa... | 1,280 | 168 |
gh_patches_debug_11541 | rasdani/github-patches | git_diff | Kinto__kinto-555 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
500 error when json validation fails with additional properties
`<ValidationError: "Additional properties are not allowed ('blockID', 'id' were unexpected)">`
```
File "/home/mathieu/Code/Mozilla/cliquet/cli... | diff --git a/kinto/views/records.py b/kinto/views/records.py
--- a/kinto/views/records.py
+++ b/kinto/views/records.py
@@ -73,7 +73,10 @@
stripped.pop(self.schema_field, None)
jsonschema.validate(stripped, schema)
except jsonschema_exceptions.ValidationError as e:
- field =... | {"golden_diff": "diff --git a/kinto/views/records.py b/kinto/views/records.py\n--- a/kinto/views/records.py\n+++ b/kinto/views/records.py\n@@ -73,7 +73,10 @@\n stripped.pop(self.schema_field, None)\n jsonschema.validate(stripped, schema)\n except jsonschema_exceptions.ValidationError as ... | 2,187 | 151 |
gh_patches_debug_5673 | rasdani/github-patches | git_diff | scikit-hep__pyhf-1546 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Different ordering of channels between model.config.channels and mode.config.channel_nbins
# Description
We've recently observed that the ordering of channels outputted from `model.config.channels` differs f... | diff --git a/src/pyhf/mixins.py b/src/pyhf/mixins.py
--- a/src/pyhf/mixins.py
+++ b/src/pyhf/mixins.py
@@ -42,6 +42,9 @@
self.samples = sorted(list(set(self.samples)))
self.parameters = sorted(list(set(self.parameters)))
self.modifiers = sorted(list(set(self.modifiers)))
+ self.channel... | {"golden_diff": "diff --git a/src/pyhf/mixins.py b/src/pyhf/mixins.py\n--- a/src/pyhf/mixins.py\n+++ b/src/pyhf/mixins.py\n@@ -42,6 +42,9 @@\n self.samples = sorted(list(set(self.samples)))\n self.parameters = sorted(list(set(self.parameters)))\n self.modifiers = sorted(list(set(self.modifiers))... | 1,629 | 124 |
gh_patches_debug_12861 | rasdani/github-patches | git_diff | python-discord__bot-352 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Bot changing off-topic channel names more than once per daily cycle
The bot should change the channel names of the three off-topic channels only once after hitting UTC midnight. However, we've noticed that it m... | diff --git a/bot/cogs/off_topic_names.py b/bot/cogs/off_topic_names.py
--- a/bot/cogs/off_topic_names.py
+++ b/bot/cogs/off_topic_names.py
@@ -48,9 +48,11 @@
"""
while True:
+ # Since we truncate the compute timedelta to seconds, we add one second to ensure
+ # we go past midnight in the `seco... | {"golden_diff": "diff --git a/bot/cogs/off_topic_names.py b/bot/cogs/off_topic_names.py\n--- a/bot/cogs/off_topic_names.py\n+++ b/bot/cogs/off_topic_names.py\n@@ -48,9 +48,11 @@\n \"\"\"\n \n while True:\n+ # Since we truncate the compute timedelta to seconds, we add one second to ensure\n+ # we g... | 3,009 | 196 |
gh_patches_debug_12825 | rasdani/github-patches | git_diff | fossasia__open-event-server-4403 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Verify Email endpoint doesn’t work.
**I'm submitting a ...** (check one with "x")
- [X] bug report
- [ ] feature request
- [ ] support request => Please do not submit support requests here, instead ask you... | diff --git a/app/api/auth.py b/app/api/auth.py
--- a/app/api/auth.py
+++ b/app/api/auth.py
@@ -35,6 +35,8 @@
)
else:
user.is_verified = True
+ save_to_db(user)
+ return make_response(jsonify(message="Email Verified"), 200)
@auth_routes.route('/reset-password', methods=['POST'])... | {"golden_diff": "diff --git a/app/api/auth.py b/app/api/auth.py\n--- a/app/api/auth.py\n+++ b/app/api/auth.py\n@@ -35,6 +35,8 @@\n )\n else:\n user.is_verified = True\n+ save_to_db(user)\n+ return make_response(jsonify(message=\"Email Verified\"), 200)\n \n \n @auth_routes.route('/rese... | 1,552 | 170 |
gh_patches_debug_37390 | rasdani/github-patches | git_diff | vllm-project__vllm-1239 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Installation Error
When I install vLLM, I have pull the docker as the tutorial and install from source. But there are an error encountered, how can I fix this:
`ValueError: Unsupported CUDA arch (5.2). Valid C... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@
ROOT_DIR = os.path.dirname(__file__)
# Supported NVIDIA GPU architectures.
-SUPPORTED_ARCHS = ["7.0", "7.5", "8.0", "8.6", "8.9", "9.0"]
+SUPPORTED_ARCHS = {"7.0", "7.5", "8.0", "8.6", "8.9", "9.0"}
# Compiler flags.
CXX_FLAGS = ["... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -13,7 +13,7 @@\n ROOT_DIR = os.path.dirname(__file__)\n \n # Supported NVIDIA GPU architectures.\n-SUPPORTED_ARCHS = [\"7.0\", \"7.5\", \"8.0\", \"8.6\", \"8.9\", \"9.0\"]\n+SUPPORTED_ARCHS = {\"7.0\", \"7.5\", \"8.0\", \"8.6\", \"8.9... | 3,774 | 727 |
gh_patches_debug_7577 | rasdani/github-patches | git_diff | webkom__lego-24 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Add shell pluss and django extensions
</issue>
<code>
[start of lego/settings/base.py]
1 import sys
2 import os
3 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
4
5 SECRET_KEY = 'This is supersecret'
... | diff --git a/lego/settings/base.py b/lego/settings/base.py
--- a/lego/settings/base.py
+++ b/lego/settings/base.py
@@ -6,6 +6,8 @@
TESTING = 'test' in sys.argv # Check if manage.py test has been run
+SHELL_PLUS = "ipython"
+
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
@@ -20,6 +22,8 @@
'django.c... | {"golden_diff": "diff --git a/lego/settings/base.py b/lego/settings/base.py\n--- a/lego/settings/base.py\n+++ b/lego/settings/base.py\n@@ -6,6 +6,8 @@\n \n TESTING = 'test' in sys.argv # Check if manage.py test has been run\n \n+SHELL_PLUS = \"ipython\"\n+\n DEBUG = True\n TEMPLATE_DEBUG = True\n ALLOWED_HOSTS = []\n@... | 1,047 | 134 |
gh_patches_debug_19933 | rasdani/github-patches | git_diff | pyro-ppl__pyro-1760 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
pip install pyro-ppl failing in Python 3
```
$ conda create -n test3 python=3
...
$ source activate test3
$ pip install pyro-ppl
Collecting pyro-ppl
Downloading https://files.pythonhosted.org/packages/7... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -27,8 +27,9 @@
if not current_tag == version:
commit_sha = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'],
cwd=PROJECT_PATH).decode('ascii').strip()
-except OSError:
- pass
+... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -27,8 +27,9 @@\n if not current_tag == version:\n commit_sha = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'],\n cwd=PROJECT_PATH).decode('ascii').strip()\n-exc... | 2,324 | 211 |
gh_patches_debug_25227 | rasdani/github-patches | git_diff | Textualize__textual-584 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Lazy load Widgets
We have a `widgets` module that imports all the widgets. THis allows for easy imports like:
```python
from textual.widgets import DataTable, Button
```
The downside is that all widgets... | diff --git a/src/textual/widgets/__init__.py b/src/textual/widgets/__init__.py
--- a/src/textual/widgets/__init__.py
+++ b/src/textual/widgets/__init__.py
@@ -1,21 +1,41 @@
-from ._footer import Footer
-from ._header import Header
-from ._button import Button
-from ._placeholder import Placeholder
-from ._static import... | {"golden_diff": "diff --git a/src/textual/widgets/__init__.py b/src/textual/widgets/__init__.py\n--- a/src/textual/widgets/__init__.py\n+++ b/src/textual/widgets/__init__.py\n@@ -1,21 +1,41 @@\n-from ._footer import Footer\n-from ._header import Header\n-from ._button import Button\n-from ._placeholder import Placehold... | 771 | 458 |
gh_patches_debug_22944 | rasdani/github-patches | git_diff | plone__Products.CMFPlone-3963 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
CMFPlone must not depend on plone.api
Dependency in setup.py, used in
https://github.com/plone/Products.CMFPlone/blob/5f866f56d979ca0879181823a1a802035f727079/Products/CMFPlone/controlpanel/browser/error_lo... | diff --git a/Products/CMFPlone/controlpanel/browser/error_log_form.py b/Products/CMFPlone/controlpanel/browser/error_log_form.py
--- a/Products/CMFPlone/controlpanel/browser/error_log_form.py
+++ b/Products/CMFPlone/controlpanel/browser/error_log_form.py
@@ -1,14 +1,14 @@
from DateTime import DateTime
from plone.base... | {"golden_diff": "diff --git a/Products/CMFPlone/controlpanel/browser/error_log_form.py b/Products/CMFPlone/controlpanel/browser/error_log_form.py\n--- a/Products/CMFPlone/controlpanel/browser/error_log_form.py\n+++ b/Products/CMFPlone/controlpanel/browser/error_log_form.py\n@@ -1,14 +1,14 @@\n from DateTime import Date... | 2,691 | 309 |
gh_patches_debug_14294 | rasdani/github-patches | git_diff | scikit-image__scikit-image-4172 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
IO: unhandled exception, in case the URL cannot be opened
## Description

## Way to reproduce... | diff --git a/skimage/io/util.py b/skimage/io/util.py
--- a/skimage/io/util.py
+++ b/skimage/io/util.py
@@ -1,5 +1,6 @@
import urllib.parse
import urllib.request
+from urllib.error import URLError, HTTPError
import os
import re
@@ -28,7 +29,15 @@
f.write(u.read())
# f must be closed b... | {"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,5 +1,6 @@\n import urllib.parse\n import urllib.request\n+from urllib.error import URLError, HTTPError\n \n import os\n import re\n@@ -28,7 +29,15 @@\n f.write(u.read())\n ... | 1,655 | 187 |
gh_patches_debug_12519 | rasdani/github-patches | git_diff | litestar-org__litestar-771 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Properly indented docstrings result in incorrectly rendered Markdown in openapi docs
**Describe the bug**
A properly formatted docstring is indented to match the indentation of the function or method. The ma... | diff --git a/starlite/openapi/path_item.py b/starlite/openapi/path_item.py
--- a/starlite/openapi/path_item.py
+++ b/starlite/openapi/path_item.py
@@ -1,3 +1,4 @@
+from inspect import cleandoc
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast
from pydantic_openapi_schema.v3_1_0.operation import Op... | {"golden_diff": "diff --git a/starlite/openapi/path_item.py b/starlite/openapi/path_item.py\n--- a/starlite/openapi/path_item.py\n+++ b/starlite/openapi/path_item.py\n@@ -1,3 +1,4 @@\n+from inspect import cleandoc\n from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast\n \n from pydantic_openapi_schema.v3... | 2,299 | 162 |
gh_patches_debug_48738 | rasdani/github-patches | git_diff | encode__uvicorn-962 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
WSGI middleware error in non-latin1 path
### Checklist
<!-- Please make sure you check all these items before submitting your bug report. -->
- [x] The bug is reproducible against the latest release and/o... | diff --git a/uvicorn/middleware/wsgi.py b/uvicorn/middleware/wsgi.py
--- a/uvicorn/middleware/wsgi.py
+++ b/uvicorn/middleware/wsgi.py
@@ -11,7 +11,7 @@
environ = {
"REQUEST_METHOD": scope["method"],
"SCRIPT_NAME": "",
- "PATH_INFO": scope["path"],
+ "PATH_INFO": scope["path"].encod... | {"golden_diff": "diff --git a/uvicorn/middleware/wsgi.py b/uvicorn/middleware/wsgi.py\n--- a/uvicorn/middleware/wsgi.py\n+++ b/uvicorn/middleware/wsgi.py\n@@ -11,7 +11,7 @@\n environ = {\n \"REQUEST_METHOD\": scope[\"method\"],\n \"SCRIPT_NAME\": \"\",\n- \"PATH_INFO\": scope[\"path\"],\n+ ... | 3,563 | 147 |
gh_patches_debug_33372 | rasdani/github-patches | git_diff | rasterio__rasterio-241 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
rio merge assumes nodata
Running `rio merge` over a set of images without a nodata value results in an error:
```
(rio-test)$ rio merge warped.tif merged.tif
ERROR:rio:Failed. Exception caught
Traceback (most ... | diff --git a/rasterio/rio/merge.py b/rasterio/rio/merge.py
--- a/rasterio/rio/merge.py
+++ b/rasterio/rio/merge.py
@@ -36,31 +36,39 @@
with rasterio.open(files[0]) as first:
kwargs = first.meta
kwargs['transform'] = kwargs.pop('affine')
- dest = np.empty((fi... | {"golden_diff": "diff --git a/rasterio/rio/merge.py b/rasterio/rio/merge.py\n--- a/rasterio/rio/merge.py\n+++ b/rasterio/rio/merge.py\n@@ -36,31 +36,39 @@\n with rasterio.open(files[0]) as first:\n kwargs = first.meta\n kwargs['transform'] = kwargs.pop('affine')\n- ... | 1,669 | 491 |
gh_patches_debug_14851 | rasdani/github-patches | git_diff | python-poetry__poetry-289 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
CLI help for install is ambiguous
<!-- Checked checkbox should look like this: [x] -->
- [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version.
- [x] I have searched the... | diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py
--- a/poetry/console/commands/install.py
+++ b/poetry/console/commands/install.py
@@ -13,12 +13,12 @@
{ --develop=* : Install given packages in development mode. }
"""
- help = """The <info>install</info> command rea... | {"golden_diff": "diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py\n--- a/poetry/console/commands/install.py\n+++ b/poetry/console/commands/install.py\n@@ -13,12 +13,12 @@\n { --develop=* : Install given packages in development mode. }\n \"\"\"\n \n- help = \"\"\"The <i... | 1,543 | 214 |
gh_patches_debug_19685 | rasdani/github-patches | git_diff | quantumlib__Cirq-1345 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Make ControlledGate work with gates that only provide a decomposition
The following should work:
```
import cirq
class G(cirq.TwoQubitGate):
def _decompose_(self, qubits):
a, b = qubits
... | diff --git a/cirq/ops/controlled_gate.py b/cirq/ops/controlled_gate.py
--- a/cirq/ops/controlled_gate.py
+++ b/cirq/ops/controlled_gate.py
@@ -115,7 +115,18 @@
def _circuit_diagram_info_(self,
args: protocols.CircuitDiagramInfoArgs
) -> protocols.Circ... | {"golden_diff": "diff --git a/cirq/ops/controlled_gate.py b/cirq/ops/controlled_gate.py\n--- a/cirq/ops/controlled_gate.py\n+++ b/cirq/ops/controlled_gate.py\n@@ -115,7 +115,18 @@\n def _circuit_diagram_info_(self,\n args: protocols.CircuitDiagramInfoArgs\n ... | 2,041 | 252 |
gh_patches_debug_18024 | rasdani/github-patches | git_diff | pretalx__pretalx-643 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Having only one submission type shows all submission types
## Current Behavior
If an event only uses one submission type, the submission form shows submission types for ALL events
## Expected Behavior
On... | diff --git a/src/pretalx/submission/forms/submission.py b/src/pretalx/submission/forms/submission.py
--- a/src/pretalx/submission/forms/submission.py
+++ b/src/pretalx/submission/forms/submission.py
@@ -66,14 +66,12 @@
pks = set(types.values_list('pk', flat=True))
if instance and instance.pk:
... | {"golden_diff": "diff --git a/src/pretalx/submission/forms/submission.py b/src/pretalx/submission/forms/submission.py\n--- a/src/pretalx/submission/forms/submission.py\n+++ b/src/pretalx/submission/forms/submission.py\n@@ -66,14 +66,12 @@\n pks = set(types.values_list('pk', flat=True))\n if instance and... | 2,915 | 255 |
gh_patches_debug_133 | rasdani/github-patches | git_diff | holoviz__panel-752 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
panel/examples/apps/django2/ example doesn't work
The django2 example doesn't work at least for Django 2.2. The interactive plot doesn't show up and there are no clear error messages either. However, the same e... | diff --git a/examples/apps/django2/sliders/bk_sliders.py b/examples/apps/django2/sliders/bk_sliders.py
--- a/examples/apps/django2/sliders/bk_sliders.py
+++ b/examples/apps/django2/sliders/bk_sliders.py
@@ -5,4 +5,4 @@
def app(doc):
sw = SineWave()
row = pn.Row(sw.param, sw.plot)
- row._get_root(doc)
+ ... | {"golden_diff": "diff --git a/examples/apps/django2/sliders/bk_sliders.py b/examples/apps/django2/sliders/bk_sliders.py\n--- a/examples/apps/django2/sliders/bk_sliders.py\n+++ b/examples/apps/django2/sliders/bk_sliders.py\n@@ -5,4 +5,4 @@\n def app(doc):\n sw = SineWave()\n row = pn.Row(sw.param, sw.plot)\n- ... | 673 | 107 |
gh_patches_debug_23962 | rasdani/github-patches | git_diff | ansible__ansible-42068 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
service_facts returns misleading state on systemd hosts
##### SUMMARY
The system module service_facts returns misleading state information on systemd hosts.
##### ISSUE TYPE
- Bug Report
##### COMPONEN... | diff --git a/lib/ansible/modules/system/service_facts.py b/lib/ansible/modules/system/service_facts.py
--- a/lib/ansible/modules/system/service_facts.py
+++ b/lib/ansible/modules/system/service_facts.py
@@ -178,16 +178,16 @@
systemctl_path = self.module.get_bin_path("systemctl", opt_dirs=["/usr/bin", "/usr/loc... | {"golden_diff": "diff --git a/lib/ansible/modules/system/service_facts.py b/lib/ansible/modules/system/service_facts.py\n--- a/lib/ansible/modules/system/service_facts.py\n+++ b/lib/ansible/modules/system/service_facts.py\n@@ -178,16 +178,16 @@\n systemctl_path = self.module.get_bin_path(\"systemctl\", opt_dirs... | 3,772 | 376 |
gh_patches_debug_11398 | rasdani/github-patches | git_diff | dotkom__onlineweb4-741 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Ability to format company-url

Like in this case, this ugly url should be format... | diff --git a/apps/companyprofile/models.py b/apps/companyprofile/models.py
--- a/apps/companyprofile/models.py
+++ b/apps/companyprofile/models.py
@@ -14,7 +14,7 @@
image = FileBrowseField(_(u"bilde"),
max_length=200, directory=IMAGE_FOLDER,
extensions=IMAGE_EXTENSIONS, null=False, blank=False)
... | {"golden_diff": "diff --git a/apps/companyprofile/models.py b/apps/companyprofile/models.py\n--- a/apps/companyprofile/models.py\n+++ b/apps/companyprofile/models.py\n@@ -14,7 +14,7 @@\n image = FileBrowseField(_(u\"bilde\"), \n max_length=200, directory=IMAGE_FOLDER,\n extensions=IMAGE_EXTENSIONS, ... | 975 | 173 |
gh_patches_debug_40688 | rasdani/github-patches | git_diff | localstack__localstack-4875 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
SSM - labeling more than 10 parameters does not work right
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
Adding and labeling more than 10 param... | diff --git a/localstack/services/ssm/ssm_listener.py b/localstack/services/ssm/ssm_listener.py
--- a/localstack/services/ssm/ssm_listener.py
+++ b/localstack/services/ssm/ssm_listener.py
@@ -1,7 +1,6 @@
import json
import logging
import time
-import traceback
from requests.models import Request
@@ -90,57 +89,6 ... | {"golden_diff": "diff --git a/localstack/services/ssm/ssm_listener.py b/localstack/services/ssm/ssm_listener.py\n--- a/localstack/services/ssm/ssm_listener.py\n+++ b/localstack/services/ssm/ssm_listener.py\n@@ -1,7 +1,6 @@\n import json\n import logging\n import time\n-import traceback\n \n from requests.models import ... | 3,146 | 750 |
gh_patches_debug_578 | rasdani/github-patches | git_diff | mlcommons__GaNDLF-537 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Radiology DataLoader takes up a *lot* memory during certain conditions
**Describe the bug**
During sanity checking of subjects, the queue construction seems to take up a lot of memory.
**To Reproduce**
Ste... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -53,6 +53,7 @@
"numpy==1.22.0",
"scipy",
"SimpleITK!=2.0.*",
+ "SimpleITK!=2.2.1", # https://github.com/mlcommons/GaNDLF/issues/536
"torchvision",
"tqdm",
"torchio==0.18.75",
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -53,6 +53,7 @@\n \"numpy==1.22.0\",\n \"scipy\",\n \"SimpleITK!=2.0.*\",\n+ \"SimpleITK!=2.2.1\", # https://github.com/mlcommons/GaNDLF/issues/536\n \"torchvision\",\n \"tqdm\",\n \"torchio==0.18.75\",\n", ... | 2,060 | 114 |
gh_patches_debug_2803 | rasdani/github-patches | git_diff | sopel-irc__sopel-1261 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Results from currency conversion should be rounded to 2 decimals
At the moment, the results of a currency conversion query is reported as a float:
< mynick> .cur 100 SEK to USD
< mybot> 100.0 SEK (S... | diff --git a/sopel/modules/currency.py b/sopel/modules/currency.py
--- a/sopel/modules/currency.py
+++ b/sopel/modules/currency.py
@@ -74,7 +74,7 @@
return NOLIMIT
result = amount / of_rate * to_rate
- bot.say("{} {} ({}) = {} {} ({})".format(amount, of.upper(), of_name,
+ bot.say("{:.2f} {} ({}) ... | {"golden_diff": "diff --git a/sopel/modules/currency.py b/sopel/modules/currency.py\n--- a/sopel/modules/currency.py\n+++ b/sopel/modules/currency.py\n@@ -74,7 +74,7 @@\n return NOLIMIT\n \n result = amount / of_rate * to_rate\n- bot.say(\"{} {} ({}) = {} {} ({})\".format(amount, of.upper(), of_name,\n+ ... | 1,787 | 131 |
gh_patches_debug_1569 | rasdani/github-patches | git_diff | voicepaw__so-vits-svc-fork-1139 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
scipy ImportError on multiple platforms
### Describe the bug
When attempting to Infer, the process is cancelled with the following error message:
[10:53:57] ERROR [10:53:57] cannot import name 'kaiser' f... | diff --git a/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py b/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py
--- a/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py
+++ b/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py
@@ -6,7 +6,7 @@
import numpy as np
import torch
import torch.nn.fu... | {"golden_diff": "diff --git a/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py b/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py\n--- a/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py\n+++ b/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py\n@@ -6,7 +6,7 @@\n import numpy as np\n import tor... | 2,924 | 163 |
gh_patches_debug_2768 | rasdani/github-patches | git_diff | microsoft__botbuilder-python-2117 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
valid_token_issuers incorrectly populated during SingleTenant validation
### [Github issues](https://github.com/Microsoft/botbuilder-python) should be used for bugs and feature requests. Use [Stack Overflow](ht... | diff --git a/libraries/botframework-connector/botframework/connector/auth/skill_validation.py b/libraries/botframework-connector/botframework/connector/auth/skill_validation.py
--- a/libraries/botframework-connector/botframework/connector/auth/skill_validation.py
+++ b/libraries/botframework-connector/botframework/conn... | {"golden_diff": "diff --git a/libraries/botframework-connector/botframework/connector/auth/skill_validation.py b/libraries/botframework-connector/botframework/connector/auth/skill_validation.py\n--- a/libraries/botframework-connector/botframework/connector/auth/skill_validation.py\n+++ b/libraries/botframework-connecto... | 2,845 | 136 |
gh_patches_debug_445 | rasdani/github-patches | git_diff | docker__docker-py-1156 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Requests v2.11.0 causes breakage
This is a known issue within requests and looks like it will be fixed in v2.11.1. Documenting for the benefit of anyone else who runs into this :).
After a recent pip upgrade I... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@
SOURCE_DIR = os.path.join(ROOT_DIR)
requirements = [
- 'requests >= 2.5.2',
+ 'requests >= 2.5.2, < 2.11',
'six >= 1.4.0',
'websocket-client >= 0.32.0',
]
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -9,7 +9,7 @@\n SOURCE_DIR = os.path.join(ROOT_DIR)\n \n requirements = [\n- 'requests >= 2.5.2',\n+ 'requests >= 2.5.2, < 2.11',\n 'six >= 1.4.0',\n 'websocket-client >= 0.32.0',\n ]\n", "issue": "Requests v2.11.0 causes... | 1,374 | 99 |
gh_patches_debug_50128 | rasdani/github-patches | git_diff | optuna__optuna-50 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
`pfnopt.minimize` fails under `strorage=None` (default)
```python
import pfnopt
def obj(client):
x = client.sample_uniform('x', 0.1, 0.2)
return x
def main():
pfnopt.minimize(obj, n_tr... | diff --git a/pfnopt/study.py b/pfnopt/study.py
--- a/pfnopt/study.py
+++ b/pfnopt/study.py
@@ -140,7 +140,7 @@
study=None, # type: Study
):
# type: (...) -> Study
-
+ storage = storage or storages.InMemoryStorage()
study = study or create_new_study(storage=storage, sampler=sampler, pruner=pruner... | {"golden_diff": "diff --git a/pfnopt/study.py b/pfnopt/study.py\n--- a/pfnopt/study.py\n+++ b/pfnopt/study.py\n@@ -140,7 +140,7 @@\n study=None, # type: Study\n ):\n # type: (...) -> Study\n-\n+ storage = storage or storages.InMemoryStorage()\n study = study or create_new_study(storage=storage, samp... | 2,193 | 126 |
gh_patches_debug_30893 | rasdani/github-patches | git_diff | microsoft__AzureTRE-1764 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Change firewall bundle to read rules from resource properties
In order for the firewall to be updated by the API / other resources as part of pipelines, it must read the 'configurable' properties (parts of the ... | diff --git a/api_app/_version.py b/api_app/_version.py
--- a/api_app/_version.py
+++ b/api_app/_version.py
@@ -1 +1 @@
-__version__ = "0.2.23"
+__version__ = "0.2.24"
diff --git a/api_app/models/domain/resource_template.py b/api_app/models/domain/resource_template.py
--- a/api_app/models/domain/resource_template.py
+++... | {"golden_diff": "diff --git a/api_app/_version.py b/api_app/_version.py\n--- a/api_app/_version.py\n+++ b/api_app/_version.py\n@@ -1 +1 @@\n-__version__ = \"0.2.23\"\n+__version__ = \"0.2.24\"\ndiff --git a/api_app/models/domain/resource_template.py b/api_app/models/domain/resource_template.py\n--- a/api_app/models/dom... | 2,973 | 436 |
gh_patches_debug_8977 | rasdani/github-patches | git_diff | paperless-ngx__paperless-ngx-1670 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[BUG] 1.9.1 OCR output mode "none" is not valid
### Description
Very similar to #1643
Updating via portainer, and with the following ENV:
PAPERLESS_OCR_CLEAN=none
the startup of the web server goes i... | diff --git a/src/paperless/checks.py b/src/paperless/checks.py
--- a/src/paperless/checks.py
+++ b/src/paperless/checks.py
@@ -130,7 +130,7 @@
if settings.OCR_MODE not in {"force", "skip", "redo", "skip_noarchive"}:
msgs.append(Error(f'OCR output mode "{settings.OCR_MODE}" is not valid'))
- ... | {"golden_diff": "diff --git a/src/paperless/checks.py b/src/paperless/checks.py\n--- a/src/paperless/checks.py\n+++ b/src/paperless/checks.py\n@@ -130,7 +130,7 @@\n if settings.OCR_MODE not in {\"force\", \"skip\", \"redo\", \"skip_noarchive\"}:\n msgs.append(Error(f'OCR output mode \"{settings.OCR_... | 2,144 | 157 |
gh_patches_debug_39038 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-3314 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Spider kum_and_go is broken
During the global build at 2021-08-25-14-42-15, spider **kum_and_go** failed with **0 features** and **0 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-25-14-... | diff --git a/locations/spiders/kum_and_go.py b/locations/spiders/kum_and_go.py
--- a/locations/spiders/kum_and_go.py
+++ b/locations/spiders/kum_and_go.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+import csv
import scrapy
import json
@@ -12,56 +13,27 @@
allowed_domains = ["kumandgo.com"]
def start_reque... | {"golden_diff": "diff --git a/locations/spiders/kum_and_go.py b/locations/spiders/kum_and_go.py\n--- a/locations/spiders/kum_and_go.py\n+++ b/locations/spiders/kum_and_go.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+import csv\n import scrapy\n import json\n \n@@ -12,56 +13,27 @@\n allowed_domains = [\"kumandgo.... | 1,427 | 827 |
gh_patches_debug_16932 | rasdani/github-patches | git_diff | Mailu__Mailu-812 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Password field(s) of type "text" instead of "password"
In 1.5 [this line](https://github.com/Mailu/Mailu/blob/master/core/admin/mailu/ui/templates/fetch/create.html#L22) creates a field of type _text_ not _pass... | diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py
--- a/core/admin/mailu/ui/forms.py
+++ b/core/admin/mailu/ui/forms.py
@@ -165,11 +165,11 @@
protocol = fields.SelectField(_('Protocol'), choices=[
('imap', 'IMAP'), ('pop3', 'POP3')
])
- host = fields.StringField(_('Hostname ... | {"golden_diff": "diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py\n--- a/core/admin/mailu/ui/forms.py\n+++ b/core/admin/mailu/ui/forms.py\n@@ -165,11 +165,11 @@\n protocol = fields.SelectField(_('Protocol'), choices=[\n ('imap', 'IMAP'), ('pop3', 'POP3')\n ])\n- host = fields.... | 2,771 | 234 |
gh_patches_debug_13116 | rasdani/github-patches | git_diff | nipy__nipype-2767 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Req to deal with SLURM socket errors more patiently
### Summary
At end of issue #2693 @effigies noted that the error that @dalejn was experiencing was due to the SLURM master throwing an error when it was po... | diff --git a/nipype/pipeline/plugins/slurm.py b/nipype/pipeline/plugins/slurm.py
--- a/nipype/pipeline/plugins/slurm.py
+++ b/nipype/pipeline/plugins/slurm.py
@@ -70,6 +70,14 @@
terminal_output='allatonce').run()
return res.runtime.stdout.find(str(taskid)) > -1
except RuntimeError... | {"golden_diff": "diff --git a/nipype/pipeline/plugins/slurm.py b/nipype/pipeline/plugins/slurm.py\n--- a/nipype/pipeline/plugins/slurm.py\n+++ b/nipype/pipeline/plugins/slurm.py\n@@ -70,6 +70,14 @@\n terminal_output='allatonce').run()\n return res.runtime.stdout.find(str(taskid)) > -1\n ... | 2,607 | 189 |
gh_patches_debug_27197 | rasdani/github-patches | git_diff | ansible__ansible-modules-core-3886 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
junos_facts - config parameter should have a default value
##### COMPONENT NAME
module : junos_facts
```
network/junos_facts.py
```
##### ANSIBLE VERSION
2.1.0.0
##### OS / ENVIRONMENT
Mac OS 10.11.5
##### ... | diff --git a/network/junos/junos_facts.py b/network/junos/junos_facts.py
--- a/network/junos/junos_facts.py
+++ b/network/junos/junos_facts.py
@@ -37,8 +37,8 @@
is then included in return facts. By default, the configuration
is returned as text. The C(config_format) can be used to return
di... | {"golden_diff": "diff --git a/network/junos/junos_facts.py b/network/junos/junos_facts.py\n--- a/network/junos/junos_facts.py\n+++ b/network/junos/junos_facts.py\n@@ -37,8 +37,8 @@\n is then included in return facts. By default, the configuration\n is returned as text. The C(config_format) can be used... | 1,898 | 295 |
gh_patches_debug_5836 | rasdani/github-patches | git_diff | sanic-org__sanic-961 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Cookie secure option not encoded properly
When `Cookies.encode` encounters `response.cookies["<cookie>"]["secure"] = False` then it outputs:
`b'Domain=xad.com; Path=/; Secure=False'`
where it should outpu... | diff --git a/sanic/cookies.py b/sanic/cookies.py
--- a/sanic/cookies.py
+++ b/sanic/cookies.py
@@ -98,7 +98,8 @@
def __setitem__(self, key, value):
if key not in self._keys:
raise KeyError("Unknown cookie property")
- return super().__setitem__(key, value)
+ if value is not Fals... | {"golden_diff": "diff --git a/sanic/cookies.py b/sanic/cookies.py\n--- a/sanic/cookies.py\n+++ b/sanic/cookies.py\n@@ -98,7 +98,8 @@\n def __setitem__(self, key, value):\n if key not in self._keys:\n raise KeyError(\"Unknown cookie property\")\n- return super().__setitem__(key, value)\n+ ... | 1,978 | 132 |
gh_patches_debug_20089 | rasdani/github-patches | git_diff | translate__translate-3400 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
json2po output strings in wrong order
Running `json2po` outputs a valid PO files, but the strings are in the wrong order. I’m not sure exactly _which_ order it is, but is _neither_ the original order, the rever... | diff --git a/translate/storage/jsonl10n.py b/translate/storage/jsonl10n.py
--- a/translate/storage/jsonl10n.py
+++ b/translate/storage/jsonl10n.py
@@ -64,7 +64,6 @@
- Handle ``\u`` and other escapes in Unicode
- Manage data type storage and conversion. True --> "True" --> True
-- Sort the extracted data to the orde... | {"golden_diff": "diff --git a/translate/storage/jsonl10n.py b/translate/storage/jsonl10n.py\n--- a/translate/storage/jsonl10n.py\n+++ b/translate/storage/jsonl10n.py\n@@ -64,7 +64,6 @@\n \n - Handle ``\\u`` and other escapes in Unicode\n - Manage data type storage and conversion. True --> \"True\" --> True\n-- Sort the... | 3,088 | 240 |
gh_patches_debug_39301 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-114 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Handle routing takeover at client
Currently, routing is handled by Django. When the user visits the application initially, the routing should be handled by Django, and after the application loads, the routing s... | diff --git a/mathesar/urls.py b/mathesar/urls.py
--- a/mathesar/urls.py
+++ b/mathesar/urls.py
@@ -14,11 +14,7 @@
urlpatterns = [
path('', frontend.index, name="index"),
- path(
- 'tables/<int:pk>/',
- frontend.TableDetail.as_view(),
- name='frontend-table-detail',
- ),
+ path('tab... | {"golden_diff": "diff --git a/mathesar/urls.py b/mathesar/urls.py\n--- a/mathesar/urls.py\n+++ b/mathesar/urls.py\n@@ -14,11 +14,7 @@\n \n urlpatterns = [\n path('', frontend.index, name=\"index\"),\n- path(\n- 'tables/<int:pk>/',\n- frontend.TableDetail.as_view(),\n- name='frontend-table-de... | 1,165 | 736 |
gh_patches_debug_20660 | rasdani/github-patches | git_diff | jazzband__pip-tools-975 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
pip-compile bumps setuptools within commented-out spec
If you have a `requirements.in` which contains a package which depends on `setuptools`, for example:
```
$ cat requirements.in
protobuf # or google-ap... | diff --git a/piptools/writer.py b/piptools/writer.py
--- a/piptools/writer.py
+++ b/piptools/writer.py
@@ -189,17 +189,18 @@
yield MESSAGE_UNSAFE_PACKAGES
for ireq in unsafe_requirements:
- req = self._format_requirement(
- ireq,
- rev... | {"golden_diff": "diff --git a/piptools/writer.py b/piptools/writer.py\n--- a/piptools/writer.py\n+++ b/piptools/writer.py\n@@ -189,17 +189,18 @@\n yield MESSAGE_UNSAFE_PACKAGES\n \n for ireq in unsafe_requirements:\n- req = self._format_requirement(\n- ireq,... | 3,312 | 244 |
gh_patches_debug_19303 | rasdani/github-patches | git_diff | netbox-community__netbox-5286 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Plugins must define app_name in api/urls.py to be included in API root view
### Environment
* Python version: 3.6.9
* NetBox version: 2.9.7
### Steps to Reproduce
I'm actually not certain whether this is ... | diff --git a/netbox/extras/plugins/views.py b/netbox/extras/plugins/views.py
--- a/netbox/extras/plugins/views.py
+++ b/netbox/extras/plugins/views.py
@@ -10,8 +10,6 @@
from rest_framework.reverse import reverse
from rest_framework.views import APIView
-from extras.plugins.utils import import_object
-
class Inst... | {"golden_diff": "diff --git a/netbox/extras/plugins/views.py b/netbox/extras/plugins/views.py\n--- a/netbox/extras/plugins/views.py\n+++ b/netbox/extras/plugins/views.py\n@@ -10,8 +10,6 @@\n from rest_framework.reverse import reverse\n from rest_framework.views import APIView\n \n-from extras.plugins.utils import impor... | 1,725 | 219 |
gh_patches_debug_8842 | rasdani/github-patches | git_diff | deepset-ai__haystack-1620 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Connection Error. Is Haystack running? JSON Issue with Docker Compose On Fresh Repo and Image Pulls
### Discussed in https://github.com/deepset-ai/haystack/discussions/1617
<div type='discussions-op-text'>
... | diff --git a/ui/utils.py b/ui/utils.py
--- a/ui/utils.py
+++ b/ui/utils.py
@@ -25,7 +25,7 @@
def retrieve_doc(query, filters=None, top_k_reader=5, top_k_retriever=5):
# Query Haystack API
url = f"{API_ENDPOINT}/{DOC_REQUEST}"
- params = {"filters": filters, "ESRetriever": {"top_k": top_k_retriever}, "Read... | {"golden_diff": "diff --git a/ui/utils.py b/ui/utils.py\n--- a/ui/utils.py\n+++ b/ui/utils.py\n@@ -25,7 +25,7 @@\n def retrieve_doc(query, filters=None, top_k_reader=5, top_k_retriever=5):\n # Query Haystack API\n url = f\"{API_ENDPOINT}/{DOC_REQUEST}\"\n- params = {\"filters\": filters, \"ESRetriever\": {\"... | 1,344 | 173 |
gh_patches_debug_21955 | rasdani/github-patches | git_diff | netbox-community__netbox-15135 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Tunnel Group is not selectable as column in VPN tunnels list
### Deployment Type
Self-hosted
### NetBox Version
v3.7.2
### Python Version
3.11
### Steps to Reproduce
1. Go to VPN - Tunnels
2. Click Conf... | diff --git a/netbox/vpn/tables/tunnels.py b/netbox/vpn/tables/tunnels.py
--- a/netbox/vpn/tables/tunnels.py
+++ b/netbox/vpn/tables/tunnels.py
@@ -40,6 +40,10 @@
verbose_name=_('Name'),
linkify=True
)
+ group = tables.Column(
+ verbose_name=_('Group'),
+ linkify=True
+ )
... | {"golden_diff": "diff --git a/netbox/vpn/tables/tunnels.py b/netbox/vpn/tables/tunnels.py\n--- a/netbox/vpn/tables/tunnels.py\n+++ b/netbox/vpn/tables/tunnels.py\n@@ -40,6 +40,10 @@\n verbose_name=_('Name'),\n linkify=True\n )\n+ group = tables.Column(\n+ verbose_name=_('Group'),\n+ ... | 1,653 | 340 |
gh_patches_debug_2126 | rasdani/github-patches | git_diff | Mailu__Mailu-1196 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
refining the default password scheme
In https://github.com/Mailu/Mailu/pull/647 the default scheme was switched to BCRYPT. The argumentation was:
> bcrypt is fast¹ and secure[...]
While it's actually secu... | diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py
--- a/core/admin/mailu/configuration.py
+++ b/core/admin/mailu/configuration.py
@@ -51,7 +51,7 @@
'RECAPTCHA_PUBLIC_KEY': '',
'RECAPTCHA_PRIVATE_KEY': '',
# Advanced settings
- 'PASSWORD_SCHEME': 'BLF-CRYPT',
+ 'PASS... | {"golden_diff": "diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py\n--- a/core/admin/mailu/configuration.py\n+++ b/core/admin/mailu/configuration.py\n@@ -51,7 +51,7 @@\n 'RECAPTCHA_PUBLIC_KEY': '',\n 'RECAPTCHA_PRIVATE_KEY': '',\n # Advanced settings\n- 'PASSWORD_SCHEME':... | 2,406 | 119 |
gh_patches_debug_31423 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-8374 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Wendy's incorrect hours
ATP populates incorrect hours for Wendy's. It's populating 10:30 when [the Wendy's website](https://locations.wendys.com/united-states/oh/loveland/10601-loveland-madeira-rd) says 12:00am... | diff --git a/locations/spiders/wendys.py b/locations/spiders/wendys.py
--- a/locations/spiders/wendys.py
+++ b/locations/spiders/wendys.py
@@ -1,10 +1,48 @@
+import json
+
from scrapy.spiders import SitemapSpider
+from locations.hours import OpeningHours
from locations.structured_data_spider import StructuredDataSp... | {"golden_diff": "diff --git a/locations/spiders/wendys.py b/locations/spiders/wendys.py\n--- a/locations/spiders/wendys.py\n+++ b/locations/spiders/wendys.py\n@@ -1,10 +1,48 @@\n+import json\n+\n from scrapy.spiders import SitemapSpider\n \n+from locations.hours import OpeningHours\n from locations.structured_data_spid... | 869 | 568 |
gh_patches_debug_23365 | rasdani/github-patches | git_diff | biopython__biopython-4029 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Add option to silence/capture stdout/stderr from Bio.PDB.PSEA
Spun from #3980.
Running `p-sea` through `Bio.PDB.PSEA` will always print output to standard out. We should refactor the code to use `subprocess.... | diff --git a/Bio/PDB/PSEA.py b/Bio/PDB/PSEA.py
--- a/Bio/PDB/PSEA.py
+++ b/Bio/PDB/PSEA.py
@@ -17,11 +17,12 @@
"""
import subprocess
+import os
from Bio.PDB.Polypeptide import is_aa
-def run_psea(fname):
+def run_psea(fname, verbose=False):
"""Run PSEA and return output filename.
Note that this a... | {"golden_diff": "diff --git a/Bio/PDB/PSEA.py b/Bio/PDB/PSEA.py\n--- a/Bio/PDB/PSEA.py\n+++ b/Bio/PDB/PSEA.py\n@@ -17,11 +17,12 @@\n \"\"\"\n \n import subprocess\n+import os\n \n from Bio.PDB.Polypeptide import is_aa\n \n \n-def run_psea(fname):\n+def run_psea(fname, verbose=False):\n \"\"\"Run PSEA and return out... | 1,692 | 338 |
gh_patches_debug_2944 | rasdani/github-patches | git_diff | ivy-llc__ivy-14663 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Fix generating_index_arrays.test_numpy_diag_indices
| | |
|---|---|
|paddle|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-... | diff --git a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
--- a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
+++ b/ivy/functional/frontends/numpy/indexing_routines/generating_index... | {"golden_diff": "diff --git a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py\n--- a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py\n+++ b/ivy/functional/frontends/numpy/indexing_routin... | 1,251 | 197 |
gh_patches_debug_5021 | rasdani/github-patches | git_diff | huggingface__transformers-10070 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
BertGenerationTokenizer provides an unexpected value for BertGenerationModel
- `transformers` version: 4.2.2
- PyTorch version (GPU?): 1.7.0+cu101
- tokenizers: @n1t0, @LysandreJik
## Information
in bot... | diff --git a/src/transformers/models/bert_generation/tokenization_bert_generation.py b/src/transformers/models/bert_generation/tokenization_bert_generation.py
--- a/src/transformers/models/bert_generation/tokenization_bert_generation.py
+++ b/src/transformers/models/bert_generation/tokenization_bert_generation.py
@@ -5... | {"golden_diff": "diff --git a/src/transformers/models/bert_generation/tokenization_bert_generation.py b/src/transformers/models/bert_generation/tokenization_bert_generation.py\n--- a/src/transformers/models/bert_generation/tokenization_bert_generation.py\n+++ b/src/transformers/models/bert_generation/tokenization_bert_... | 2,241 | 148 |
gh_patches_debug_22964 | rasdani/github-patches | git_diff | Cloud-CV__EvalAI-2132 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Update seed script to add challenge slug
## Current Behaviour:
Currently, when the challenge is created using the seed script, the `slug` field is not populated.
## Expected Behaviour:
When the seed script... | diff --git a/scripts/seed.py b/scripts/seed.py
--- a/scripts/seed.py
+++ b/scripts/seed.py
@@ -1,4 +1,5 @@
# Command to run : python manage.py shell < scripts/seed.py
+import datetime
import os
import random
import string
@@ -137,6 +138,9 @@
evaluation_script = open(
os.path.join(settings.BASE_DIR, '... | {"golden_diff": "diff --git a/scripts/seed.py b/scripts/seed.py\n--- a/scripts/seed.py\n+++ b/scripts/seed.py\n@@ -1,4 +1,5 @@\n # Command to run : python manage.py shell < scripts/seed.py\n+import datetime\n import os\n import random\n import string\n@@ -137,6 +138,9 @@\n evaluation_script = open(\n os.pa... | 3,475 | 238 |
gh_patches_debug_38909 | rasdani/github-patches | git_diff | bridgecrewio__checkov-2330 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
BC_AWS_PUBLIC_1 does not take Conditions into account
**Describe the bug**
BC_AWS_PUBLIC_1 seems to only look for the principal in a ECR Resource Policy. If you want to control access to a repo based on the pr... | diff --git a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py
--- a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py
+++ b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py
@@ -31,9 +31,22 @@
for statement_index, statemen... | {"golden_diff": "diff --git a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py\n--- a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py\n+++ b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py\n@@ -31,9 +31,22 @@\n for stat... | 1,791 | 641 |
gh_patches_debug_30456 | rasdani/github-patches | git_diff | enthought__chaco-734 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Replace mutable default argument in plot_factory create_*_plot functions
Replace the use of mutable default `data` argument to the `create_*_plot` functions in the `plot_factory` module.
https://github.com/e... | diff --git a/chaco/plot_factory.py b/chaco/plot_factory.py
--- a/chaco/plot_factory.py
+++ b/chaco/plot_factory.py
@@ -48,7 +48,7 @@
def create_scatter_plot(
- data=[],
+ data=None,
index_bounds=None,
value_bounds=None,
orientation="h",
@@ -69,6 +69,8 @@
Pre-existing "index" and "value"... | {"golden_diff": "diff --git a/chaco/plot_factory.py b/chaco/plot_factory.py\n--- a/chaco/plot_factory.py\n+++ b/chaco/plot_factory.py\n@@ -48,7 +48,7 @@\n \n \n def create_scatter_plot(\n- data=[],\n+ data=None,\n index_bounds=None,\n value_bounds=None,\n orientation=\"h\",\n@@ -69,6 +69,8 @@\n \n ... | 3,933 | 364 |
gh_patches_debug_66083 | rasdani/github-patches | git_diff | freedomofpress__securedrop-3917 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Posting a Reply should return a UUID
## Description
The API should not return 204, but should return 200 with an object containing the UUID of the reply. Without doing that, there is no way for a client to s... | diff --git a/securedrop/journalist_app/api.py b/securedrop/journalist_app/api.py
--- a/securedrop/journalist_app/api.py
+++ b/securedrop/journalist_app/api.py
@@ -244,7 +244,8 @@
db.session.add(reply)
db.session.add(source)
db.session.commit()
- return jsonify({'message... | {"golden_diff": "diff --git a/securedrop/journalist_app/api.py b/securedrop/journalist_app/api.py\n--- a/securedrop/journalist_app/api.py\n+++ b/securedrop/journalist_app/api.py\n@@ -244,7 +244,8 @@\n db.session.add(reply)\n db.session.add(source)\n db.session.commit()\n- ... | 3,877 | 150 |
gh_patches_debug_48734 | rasdani/github-patches | git_diff | microsoft__torchgeo-2100 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
PatternNet download link is broken
### Description
[PatterNet dataset](https://torchgeo.readthedocs.io/en/stable/_modules/torchgeo/datasets/patternnet.html#PatternNet) [download link ](https://drive.google.c... | diff --git a/torchgeo/datasets/patternnet.py b/torchgeo/datasets/patternnet.py
--- a/torchgeo/datasets/patternnet.py
+++ b/torchgeo/datasets/patternnet.py
@@ -78,7 +78,7 @@
* https://doi.org/10.1016/j.isprsjprs.2018.01.004
"""
- url = 'https://drive.google.com/file/d/127lxXYqzO6Bd0yZhvEbgIfz95HaEnr9K'
+ ... | {"golden_diff": "diff --git a/torchgeo/datasets/patternnet.py b/torchgeo/datasets/patternnet.py\n--- a/torchgeo/datasets/patternnet.py\n+++ b/torchgeo/datasets/patternnet.py\n@@ -78,7 +78,7 @@\n * https://doi.org/10.1016/j.isprsjprs.2018.01.004\n \"\"\"\n \n- url = 'https://drive.google.com/file/d/127lxXYqzO... | 2,584 | 256 |
gh_patches_debug_35698 | rasdani/github-patches | git_diff | nv-legate__cunumeric-766 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
cunumeric does not issue unimplemented warnings for functions in submodules
For example, calling unsupported functions in the `random` module silently fall back to numpy instead of issuing a warning.
</issue>
... | diff --git a/cunumeric/coverage.py b/cunumeric/coverage.py
--- a/cunumeric/coverage.py
+++ b/cunumeric/coverage.py
@@ -17,7 +17,13 @@
import warnings
from dataclasses import dataclass
from functools import wraps
-from types import FunctionType, MethodDescriptorType, MethodType, ModuleType
+from types import (
+ B... | {"golden_diff": "diff --git a/cunumeric/coverage.py b/cunumeric/coverage.py\n--- a/cunumeric/coverage.py\n+++ b/cunumeric/coverage.py\n@@ -17,7 +17,13 @@\n import warnings\n from dataclasses import dataclass\n from functools import wraps\n-from types import FunctionType, MethodDescriptorType, MethodType, ModuleType\n+f... | 3,920 | 557 |
gh_patches_debug_88 | rasdani/github-patches | git_diff | watchdogpolska__small_eod-479 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Tagi
Stworzenie ekranu Tagi
tabela zawiera kolumnę
* tag (pole `name` w serializatorze)
Ekran paginowy wielkość strony 20
Ekran dostępny z menu bocznego
</issue>
<code>
[start of backend-project/small... | diff --git a/backend-project/small_eod/tags/serializers.py b/backend-project/small_eod/tags/serializers.py
--- a/backend-project/small_eod/tags/serializers.py
+++ b/backend-project/small_eod/tags/serializers.py
@@ -7,4 +7,5 @@
model = Tag
fields = [
"name",
+ "id",
]
| {"golden_diff": "diff --git a/backend-project/small_eod/tags/serializers.py b/backend-project/small_eod/tags/serializers.py\n--- a/backend-project/small_eod/tags/serializers.py\n+++ b/backend-project/small_eod/tags/serializers.py\n@@ -7,4 +7,5 @@\n model = Tag\n fields = [\n \"name\",\n+ ... | 654 | 82 |
gh_patches_debug_31692 | rasdani/github-patches | git_diff | ARM-DOE__ACT-540 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
ARM Data API Returns Text when File not Available
I tried to download gucceilpblhtM1.a0 but it's not available through the webservice due to it being an a0-level file. Instead the API returned text that was i... | diff --git a/act/discovery/get_armfiles.py b/act/discovery/get_armfiles.py
--- a/act/discovery/get_armfiles.py
+++ b/act/discovery/get_armfiles.py
@@ -4,6 +4,7 @@
"""
import argparse
+import contextlib
import json
import os
import sys
@@ -143,17 +144,28 @@
if time is not None:
if ti... | {"golden_diff": "diff --git a/act/discovery/get_armfiles.py b/act/discovery/get_armfiles.py\n--- a/act/discovery/get_armfiles.py\n+++ b/act/discovery/get_armfiles.py\n@@ -4,6 +4,7 @@\n \"\"\"\n \n import argparse\n+import contextlib\n import json\n import os\n import sys\n@@ -143,17 +144,28 @@\n if time is ... | 2,635 | 381 |
gh_patches_debug_59569 | rasdani/github-patches | git_diff | ytdl-org__youtube-dl-18343 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Gfycat cajax json endpoint is gone
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.11.23*. If it's not, read [this FAQ entry](https://github.com/rg3... | diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py
--- a/youtube_dl/extractor/gfycat.py
+++ b/youtube_dl/extractor/gfycat.py
@@ -53,7 +53,7 @@
video_id = self._match_id(url)
gfy = self._download_json(
- 'http://gfycat.com/cajax/get/%s' % video_id,
+ 'h... | {"golden_diff": "diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py\n--- a/youtube_dl/extractor/gfycat.py\n+++ b/youtube_dl/extractor/gfycat.py\n@@ -53,7 +53,7 @@\n video_id = self._match_id(url)\n \n gfy = self._download_json(\n- 'http://gfycat.com/cajax/get/%s' % v... | 3,466 | 170 |
gh_patches_debug_37653 | rasdani/github-patches | git_diff | python-telegram-bot__python-telegram-bot-2149 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[BUG] Update timerbot example
https://github.com/python-telegram-bot/python-telegram-bot/blob/3b4559dd95d14a4c9a9ca54237b5fe547386b666/examples/timerbot.py#L56-L58
If the job has already run, those lines giv... | diff --git a/examples/timerbot.py b/examples/timerbot.py
--- a/examples/timerbot.py
+++ b/examples/timerbot.py
@@ -42,6 +42,16 @@
context.bot.send_message(job.context, text='Beep!')
+def remove_job_if_exists(name, context):
+ """Remove job with given name. Returns whether job was removed."""
+ current_jo... | {"golden_diff": "diff --git a/examples/timerbot.py b/examples/timerbot.py\n--- a/examples/timerbot.py\n+++ b/examples/timerbot.py\n@@ -42,6 +42,16 @@\n context.bot.send_message(job.context, text='Beep!')\n \n \n+def remove_job_if_exists(name, context):\n+ \"\"\"Remove job with given name. Returns whether job was... | 1,733 | 667 |
gh_patches_debug_29449 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-4910 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Breadcrumb in modul "Priorisierung mit Karte" is saying always "list"
**URL:** https://meinberlin-dev.liqd.net/maptopicprio/2022-00910/
**user:** any
**expected behaviour:** When coming from map I don't want... | diff --git a/meinberlin/apps/budgeting/views.py b/meinberlin/apps/budgeting/views.py
--- a/meinberlin/apps/budgeting/views.py
+++ b/meinberlin/apps/budgeting/views.py
@@ -140,21 +140,22 @@
are remembered when going back, we check if the referer is a
module or project detail view and add the appropriat... | {"golden_diff": "diff --git a/meinberlin/apps/budgeting/views.py b/meinberlin/apps/budgeting/views.py\n--- a/meinberlin/apps/budgeting/views.py\n+++ b/meinberlin/apps/budgeting/views.py\n@@ -140,21 +140,22 @@\n are remembered when going back, we check if the referer is a\n module or project detail view ... | 3,285 | 311 |
gh_patches_debug_32102 | rasdani/github-patches | git_diff | getsentry__sentry-2226 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
500 error when rename team slug
Error raised if same slug already exists
Traceback:
```
File "/home/www/pyenv/versions/sentry/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_respon... | diff --git a/src/sentry/web/frontend/team_settings.py b/src/sentry/web/frontend/team_settings.py
--- a/src/sentry/web/frontend/team_settings.py
+++ b/src/sentry/web/frontend/team_settings.py
@@ -3,6 +3,7 @@
from django import forms
from django.contrib import messages
from django.core.urlresolvers import reverse
+fro... | {"golden_diff": "diff --git a/src/sentry/web/frontend/team_settings.py b/src/sentry/web/frontend/team_settings.py\n--- a/src/sentry/web/frontend/team_settings.py\n+++ b/src/sentry/web/frontend/team_settings.py\n@@ -3,6 +3,7 @@\n from django import forms\n from django.contrib import messages\n from django.core.urlresolv... | 1,980 | 418 |
gh_patches_debug_29925 | rasdani/github-patches | git_diff | kornia__kornia-2009 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Update `make test-all`
```Makefile
# TODO: Add cuda-float16 when #649 is solved
test-all: FORCE
pytest -v --device all --dtype float32,float64 --cov=kornia test/ --flake8 --mypy
```
Maybe instead of just ... | diff --git a/kornia/enhance/core.py b/kornia/enhance/core.py
--- a/kornia/enhance/core.py
+++ b/kornia/enhance/core.py
@@ -1,8 +1,12 @@
-from kornia.core import Module, Tensor
+from typing import Union
+
+from kornia.core import Module, Tensor, tensor
from kornia.testing import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR
... | {"golden_diff": "diff --git a/kornia/enhance/core.py b/kornia/enhance/core.py\n--- a/kornia/enhance/core.py\n+++ b/kornia/enhance/core.py\n@@ -1,8 +1,12 @@\n-from kornia.core import Module, Tensor\n+from typing import Union\n+\n+from kornia.core import Module, Tensor, tensor\n from kornia.testing import KORNIA_CHECK, K... | 1,689 | 441 |
gh_patches_debug_18224 | rasdani/github-patches | git_diff | internetarchive__openlibrary-6910 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Data Dumps not auto-generating
Despite #5263 being resolved, it looks like the data dumps weren't uploaded on July 1st :/
### Relevant URL?
* https://github.com/internetarchive/openlibrary/wiki/Generating-... | diff --git a/scripts/oldump.py b/scripts/oldump.py
--- a/scripts/oldump.py
+++ b/scripts/oldump.py
@@ -19,6 +19,7 @@
if __name__ == "__main__":
+ from contextlib import redirect_stdout
from infogami import config
from openlibrary.config import load_config
from openlibrary.data import dump
@@ -29,... | {"golden_diff": "diff --git a/scripts/oldump.py b/scripts/oldump.py\n--- a/scripts/oldump.py\n+++ b/scripts/oldump.py\n@@ -19,6 +19,7 @@\n \n \n if __name__ == \"__main__\":\n+ from contextlib import redirect_stdout\n from infogami import config\n from openlibrary.config import load_config\n from openlib... | 1,312 | 228 |
gh_patches_debug_23651 | rasdani/github-patches | git_diff | netbox-community__netbox-1565 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Add Primary IP for a device to Search Results
<!--
Before opening a new issue, please search through the existing issues to
see if your topic has already been addressed. Note that you may need to
... | diff --git a/netbox/netbox/views.py b/netbox/netbox/views.py
--- a/netbox/netbox/views.py
+++ b/netbox/netbox/views.py
@@ -14,7 +14,7 @@
from circuits.tables import CircuitTable, ProviderTable
from dcim.filters import DeviceFilter, DeviceTypeFilter, RackFilter, SiteFilter
from dcim.models import ConsolePort, Device,... | {"golden_diff": "diff --git a/netbox/netbox/views.py b/netbox/netbox/views.py\n--- a/netbox/netbox/views.py\n+++ b/netbox/netbox/views.py\n@@ -14,7 +14,7 @@\n from circuits.tables import CircuitTable, ProviderTable\n from dcim.filters import DeviceFilter, DeviceTypeFilter, RackFilter, SiteFilter\n from dcim.models impo... | 3,447 | 261 |
gh_patches_debug_11510 | rasdani/github-patches | git_diff | googleapis__google-api-python-client-550 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
googleapiclient/channel.py has no license header
There is no license header at all in channel.py
googleapiclient/channel.py has no license header
There is no license header at all in channel.py
</issue>
<cod... | diff --git a/googleapiclient/channel.py b/googleapiclient/channel.py
--- a/googleapiclient/channel.py
+++ b/googleapiclient/channel.py
@@ -1,3 +1,17 @@
+# Copyright 2014 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in complian... | {"golden_diff": "diff --git a/googleapiclient/channel.py b/googleapiclient/channel.py\n--- a/googleapiclient/channel.py\n+++ b/googleapiclient/channel.py\n@@ -1,3 +1,17 @@\n+# Copyright 2014 Google Inc. All Rights Reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use th... | 3,579 | 201 |
gh_patches_debug_9976 | rasdani/github-patches | git_diff | mkdocs__mkdocs-2421 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
file-system race condition while testing with mkdocs serve
when mkdocs serve is shutting down, it cleans up after itself removing the temporary directory created earlier.
the condition whether the directory ... | diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -2,7 +2,7 @@
import shutil
import tempfile
-from os.path import isfile, join
+from os.path import isdir, isfile, join
from mkdocs.commands.build import build
from mkdocs.config import ... | {"golden_diff": "diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py\n--- a/mkdocs/commands/serve.py\n+++ b/mkdocs/commands/serve.py\n@@ -2,7 +2,7 @@\n import shutil\n import tempfile\n \n-from os.path import isfile, join\n+from os.path import isdir, isfile, join\n from mkdocs.commands.build import build\n... | 1,454 | 158 |
gh_patches_debug_27698 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-3299 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
</issue>
<code>
[start of applications/Chat/inference/utils.py]
1 import re
2 from threading import Lock
3 from typing imp... | diff --git a/applications/Chat/inference/utils.py b/applications/Chat/inference/utils.py
--- a/applications/Chat/inference/utils.py
+++ b/applications/Chat/inference/utils.py
@@ -2,6 +2,7 @@
from threading import Lock
from typing import Any, Callable, Generator, List, Optional
import json
+import jieba
import tor... | {"golden_diff": "diff --git a/applications/Chat/inference/utils.py b/applications/Chat/inference/utils.py\n--- a/applications/Chat/inference/utils.py\n+++ b/applications/Chat/inference/utils.py\n@@ -2,6 +2,7 @@\n from threading import Lock\n from typing import Any, Callable, Generator, List, Optional\n import json\n+im... | 2,890 | 348 |
gh_patches_debug_12053 | rasdani/github-patches | git_diff | lnbits__lnbits-215 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
No success message and URL returned with LNURLp links
As the title says, the neither the URL, nor the message are returned to the wallet making the payment. This used to work when I was still on the [latest `ra... | diff --git a/lnbits/extensions/lnurlp/lnurl.py b/lnbits/extensions/lnurlp/lnurl.py
--- a/lnbits/extensions/lnurlp/lnurl.py
+++ b/lnbits/extensions/lnurlp/lnurl.py
@@ -95,13 +95,17 @@
extra={"tag": "lnurlp", "link": link.id, "comment": comment},
)
- resp = {
- "routes": [],
- "pr": payme... | {"golden_diff": "diff --git a/lnbits/extensions/lnurlp/lnurl.py b/lnbits/extensions/lnurlp/lnurl.py\n--- a/lnbits/extensions/lnurlp/lnurl.py\n+++ b/lnbits/extensions/lnurlp/lnurl.py\n@@ -95,13 +95,17 @@\n extra={\"tag\": \"lnurlp\", \"link\": link.id, \"comment\": comment},\n )\n \n- resp = {\n- \... | 1,754 | 231 |
gh_patches_debug_2997 | rasdani/github-patches | git_diff | ivy-llc__ivy-20554 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
rfftn
</issue>
<code>
[start of ivy/functional/frontends/scipy/fft/fft.py]
1 # global
2 import ivy
3 from ivy.functional.frontends.scipy.func_wrapper import (
4 to_ivy_arrays_and_back,
5 )
6
7
8 # fft
9... | diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py
--- a/ivy/functional/frontends/scipy/fft/fft.py
+++ b/ivy/functional/frontends/scipy/fft/fft.py
@@ -40,3 +40,10 @@
x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None
):
return ivy.if... | {"golden_diff": "diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py\n--- a/ivy/functional/frontends/scipy/fft/fft.py\n+++ b/ivy/functional/frontends/scipy/fft/fft.py\n@@ -40,3 +40,10 @@\n x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None\n... | 1,026 | 185 |
gh_patches_debug_35161 | rasdani/github-patches | git_diff | streamlit__streamlit-4869 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Add tooltip to st.metric(0 to provide more information on a KPI
### Problem
It would help our business users to have a bit more description available on KPIs.
### Solution
**MVP:** Could we add a too... | diff --git a/e2e/scripts/st_tooltips.py b/e2e/scripts/st_tooltips.py
--- a/e2e/scripts/st_tooltips.py
+++ b/e2e/scripts/st_tooltips.py
@@ -70,3 +70,4 @@
st.text_area("textarea", help=leading_indent_regular_text_tooltip)
st.select_slider("selectslider", options=["a", "b", "c"], help=indented_code_tooltip)
st.button("... | {"golden_diff": "diff --git a/e2e/scripts/st_tooltips.py b/e2e/scripts/st_tooltips.py\n--- a/e2e/scripts/st_tooltips.py\n+++ b/e2e/scripts/st_tooltips.py\n@@ -70,3 +70,4 @@\n st.text_area(\"textarea\", help=leading_indent_regular_text_tooltip)\n st.select_slider(\"selectslider\", options=[\"a\", \"b\", \"c\"], help=ind... | 3,843 | 469 |
gh_patches_debug_11283 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-1852 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Ignoring ${} parameters from Fn::Sub checks
*cfn-lint version: 0.44.1*
*Description of issue.*
I using the `AWS::ApiGatewayV2::Api` clause and referencing the [`RouteSelectionExpression`](https://docs.aws.... | diff --git a/src/cfnlint/rules/functions/SubNeeded.py b/src/cfnlint/rules/functions/SubNeeded.py
--- a/src/cfnlint/rules/functions/SubNeeded.py
+++ b/src/cfnlint/rules/functions/SubNeeded.py
@@ -20,7 +20,8 @@
# Free-form text properties to exclude from this rule
excludes = ['UserData', 'ZipFile', 'Condition',... | {"golden_diff": "diff --git a/src/cfnlint/rules/functions/SubNeeded.py b/src/cfnlint/rules/functions/SubNeeded.py\n--- a/src/cfnlint/rules/functions/SubNeeded.py\n+++ b/src/cfnlint/rules/functions/SubNeeded.py\n@@ -20,7 +20,8 @@\n # Free-form text properties to exclude from this rule\n excludes = ['UserData', '... | 2,864 | 169 |
gh_patches_debug_10770 | rasdani/github-patches | git_diff | conda__conda-build-825 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
conda-build 1.19.1 breaks C compilation
I am using conda build on [this recipe](https://github.com/mmp2/megaman/tree/master/conda_recipes/pyamg)
It works on 1.19.0, but on 1.19.1 fails with this message:
```
... | diff --git a/conda_build/environ.py b/conda_build/environ.py
--- a/conda_build/environ.py
+++ b/conda_build/environ.py
@@ -209,7 +209,7 @@
d['OSX_ARCH'] = 'i386' if cc.bits == 32 else 'x86_64'
d['CFLAGS'] = cflags + ' -arch %(OSX_ARCH)s' % d
d['CXXFLAGS'] = cxxflags + ' -arch %(OSX_ARCH)s' % ... | {"golden_diff": "diff --git a/conda_build/environ.py b/conda_build/environ.py\n--- a/conda_build/environ.py\n+++ b/conda_build/environ.py\n@@ -209,7 +209,7 @@\n d['OSX_ARCH'] = 'i386' if cc.bits == 32 else 'x86_64'\n d['CFLAGS'] = cflags + ' -arch %(OSX_ARCH)s' % d\n d['CXXFLAGS'] = cxxflags + '... | 3,986 | 229 |
gh_patches_debug_7600 | rasdani/github-patches | git_diff | microsoft__DeepSpeed-4985 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[BUG] Deepspeed elastic launcher is incompatible with torch 2.0
**Describe the bug**
If I run `deepspeed` with `--elastic_training`, I got the following error:
```
Traceback (most recent call last):
F... | diff --git a/deepspeed/elasticity/elastic_agent.py b/deepspeed/elasticity/elastic_agent.py
--- a/deepspeed/elasticity/elastic_agent.py
+++ b/deepspeed/elasticity/elastic_agent.py
@@ -39,7 +39,10 @@
self.ds_env = env
@staticmethod
- def _set_master_addr_port(store: Store, master_addr: Optional[str], m... | {"golden_diff": "diff --git a/deepspeed/elasticity/elastic_agent.py b/deepspeed/elasticity/elastic_agent.py\n--- a/deepspeed/elasticity/elastic_agent.py\n+++ b/deepspeed/elasticity/elastic_agent.py\n@@ -39,7 +39,10 @@\n self.ds_env = env\n \n @staticmethod\n- def _set_master_addr_port(store: Store, maste... | 3,221 | 160 |
gh_patches_debug_38330 | rasdani/github-patches | git_diff | piskvorky__gensim-463 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
dict.iteritems() usage breaks "keywords" function in python 3
Calling `gensim.summarization.keywords` in python3 results in `AttributeError: 'dict' object has no attribute 'iteritems'`.
Looks like there are of... | diff --git a/gensim/summarization/keywords.py b/gensim/summarization/keywords.py
--- a/gensim/summarization/keywords.py
+++ b/gensim/summarization/keywords.py
@@ -8,9 +8,11 @@
from gensim.summarization.textcleaner import tokenize_by_word as _tokenize_by_word
from gensim.summarization.commons import build_graph as _bu... | {"golden_diff": "diff --git a/gensim/summarization/keywords.py b/gensim/summarization/keywords.py\n--- a/gensim/summarization/keywords.py\n+++ b/gensim/summarization/keywords.py\n@@ -8,9 +8,11 @@\n from gensim.summarization.textcleaner import tokenize_by_word as _tokenize_by_word\n from gensim.summarization.commons imp... | 3,072 | 515 |
gh_patches_debug_14237 | rasdani/github-patches | git_diff | mne-tools__mne-python-10739 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
montage_sgskip.py example doesn't run
When trying to run the example in `examples/visualization/montage_sgskip.py`, I get an exception:
```python
ValueError: A head<->mri transformation matrix (trans) is re... | diff --git a/examples/visualization/montage_sgskip.py b/examples/visualization/montage_sgskip.py
--- a/examples/visualization/montage_sgskip.py
+++ b/examples/visualization/montage_sgskip.py
@@ -16,6 +16,7 @@
# %%
import os.path as op
+import numpy as np
import mne
from mne.channels.montage import get_builtin_m... | {"golden_diff": "diff --git a/examples/visualization/montage_sgskip.py b/examples/visualization/montage_sgskip.py\n--- a/examples/visualization/montage_sgskip.py\n+++ b/examples/visualization/montage_sgskip.py\n@@ -16,6 +16,7 @@\n # %%\n \n import os.path as op\n+import numpy as np\n \n import mne\n from mne.channels.m... | 1,342 | 206 |
gh_patches_debug_27163 | rasdani/github-patches | git_diff | wemake-services__wemake-python-styleguide-844 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
`if` after `else` in `try` raises false positive WPS513
# Bug report
<!--
Hi, thanks for submitting a bug. We appreciate that.
But, we will need some information about what's wrong to help you.
-->
#... | diff --git a/wemake_python_styleguide/visitors/tokenize/conditions.py b/wemake_python_styleguide/visitors/tokenize/conditions.py
--- a/wemake_python_styleguide/visitors/tokenize/conditions.py
+++ b/wemake_python_styleguide/visitors/tokenize/conditions.py
@@ -57,11 +57,36 @@
"""
self._check_implicit_el... | {"golden_diff": "diff --git a/wemake_python_styleguide/visitors/tokenize/conditions.py b/wemake_python_styleguide/visitors/tokenize/conditions.py\n--- a/wemake_python_styleguide/visitors/tokenize/conditions.py\n+++ b/wemake_python_styleguide/visitors/tokenize/conditions.py\n@@ -57,11 +57,36 @@\n \"\"\"\n ... | 1,294 | 426 |
gh_patches_debug_10618 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-1854 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
User confirmation
**Describe the bug**
When a new user has not yet confirmed their email address, if the site settings change to disable email address confirmation, the user's status stays inactive and the c... | diff --git a/bookwyrm/models/site.py b/bookwyrm/models/site.py
--- a/bookwyrm/models/site.py
+++ b/bookwyrm/models/site.py
@@ -90,6 +90,14 @@
return get_absolute_url(uploaded)
return urljoin(STATIC_FULL_URL, default_path)
+ def save(self, *args, **kwargs):
+ """if require_confirm_email... | {"golden_diff": "diff --git a/bookwyrm/models/site.py b/bookwyrm/models/site.py\n--- a/bookwyrm/models/site.py\n+++ b/bookwyrm/models/site.py\n@@ -90,6 +90,14 @@\n return get_absolute_url(uploaded)\n return urljoin(STATIC_FULL_URL, default_path)\n \n+ def save(self, *args, **kwargs):\n+ \"... | 2,400 | 172 |
gh_patches_debug_1607 | rasdani/github-patches | git_diff | rotki__rotki-5059 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Unicode logging entries in Windows
## Problem Definition
While checking the logs of a Windows user I noticed the following repeating multiple times inside rotki-electron.log
```--- Logging error ---
Trac... | diff --git a/rotkehlchen/logging.py b/rotkehlchen/logging.py
--- a/rotkehlchen/logging.py
+++ b/rotkehlchen/logging.py
@@ -176,6 +176,7 @@
'backupCount': backups_num,
'level': loglevel,
'formatter': 'default',
+ 'encoding': 'utf-8',
}
else:
select... | {"golden_diff": "diff --git a/rotkehlchen/logging.py b/rotkehlchen/logging.py\n--- a/rotkehlchen/logging.py\n+++ b/rotkehlchen/logging.py\n@@ -176,6 +176,7 @@\n 'backupCount': backups_num,\n 'level': loglevel,\n 'formatter': 'default',\n+ 'encoding': 'utf-8',\n }\n... | 3,594 | 98 |
gh_patches_debug_23971 | rasdani/github-patches | git_diff | mne-tools__mne-bids-pipeline-813 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Logging output is much more verbose when running with n_jobs > 1 vs n_jobs=1
After #799, I still see lots of output when Reports are created – but only if `n_jobs > 1`. For `n_jobs = 1`, things are working as e... | diff --git a/mne_bids_pipeline/_parallel.py b/mne_bids_pipeline/_parallel.py
--- a/mne_bids_pipeline/_parallel.py
+++ b/mne_bids_pipeline/_parallel.py
@@ -4,6 +4,7 @@
from types import SimpleNamespace
import joblib
+from mne.utils import use_log_level, logger as mne_logger
from ._logging import logger, gen_log_k... | {"golden_diff": "diff --git a/mne_bids_pipeline/_parallel.py b/mne_bids_pipeline/_parallel.py\n--- a/mne_bids_pipeline/_parallel.py\n+++ b/mne_bids_pipeline/_parallel.py\n@@ -4,6 +4,7 @@\n from types import SimpleNamespace\n \n import joblib\n+from mne.utils import use_log_level, logger as mne_logger\n \n from ._loggin... | 3,694 | 356 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.