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_56182 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-1562 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
prompt.read_user_dict() is broken due to click upgrade from 7.1.2 to 8.0.0
* Cookiecutter version: 1.7.3
* Template project url: -
* Python version: 3.9.5
* Operating System: macOS Catalina 10.15.7
### De... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@
requirements = [
'binaryornot>=0.4.4',
'Jinja2>=2.7,<4.0.0',
- 'click>=7.0',
+ 'click>=7.0,<8.0.0',
'pyyaml>=5.3.1',
'jinja2-time>=0.2.0',
'python-slugify>=4.0.0',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -10,7 +10,7 @@\n requirements = [\n 'binaryornot>=0.4.4',\n 'Jinja2>=2.7,<4.0.0',\n- 'click>=7.0',\n+ 'click>=7.0,<8.0.0',\n 'pyyaml>=5.3.1',\n 'jinja2-time>=0.2.0',\n 'python-slugify>=4.0.0',\n", "issue": "p... | 2,233 | 124 |
gh_patches_debug_3807 | rasdani/github-patches | git_diff | quantumlib__Cirq-3574 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Docs build is failing
Since the black formatter merge the RTD builds are failing with some weird pip error:
https://readthedocs.org/projects/cirq/builds/
Need to look into it and resolve it if the error i... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,7 @@
url='http://github.com/quantumlib/cirq',
author='The Cirq Developers',
author_email='cirq@googlegroups.com',
- python_requires=('>=3.6.0'),
+ python_requires=('>=3.7.0'),
install_requires=requirements,
extras... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -62,7 +62,7 @@\n url='http://github.com/quantumlib/cirq',\n author='The Cirq Developers',\n author_email='cirq@googlegroups.com',\n- python_requires=('>=3.6.0'),\n+ python_requires=('>=3.7.0'),\n install_requires... | 1,480 | 107 |
gh_patches_debug_27198 | rasdani/github-patches | git_diff | python-poetry__poetry-1910 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
poetry complains about missing argument when using `--help`
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure... | diff --git a/poetry/console/config/application_config.py b/poetry/console/config/application_config.py
--- a/poetry/console/config/application_config.py
+++ b/poetry/console/config/application_config.py
@@ -9,6 +9,7 @@
from clikit.api.event import PreHandleEvent
from clikit.api.event import PreResolveEvent
from clik... | {"golden_diff": "diff --git a/poetry/console/config/application_config.py b/poetry/console/config/application_config.py\n--- a/poetry/console/config/application_config.py\n+++ b/poetry/console/config/application_config.py\n@@ -9,6 +9,7 @@\n from clikit.api.event import PreHandleEvent\n from clikit.api.event import PreR... | 2,705 | 308 |
gh_patches_debug_2706 | rasdani/github-patches | git_diff | fossasia__open-event-server-4302 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Custom-forms: Change data.type in custom-form
**I'm submitting a ...** (check one with "x")
- [x] bug report
- [ ] feature request
- [ ] support request => Please do not submit support requests here, instea... | diff --git a/app/api/custom_forms.py b/app/api/custom_forms.py
--- a/app/api/custom_forms.py
+++ b/app/api/custom_forms.py
@@ -24,7 +24,7 @@
"""
Meta class for CustomForm Schema
"""
- type_ = 'custom_form'
+ type_ = 'custom-form'
self_view = 'v1.custom_form_detail'
... | {"golden_diff": "diff --git a/app/api/custom_forms.py b/app/api/custom_forms.py\n--- a/app/api/custom_forms.py\n+++ b/app/api/custom_forms.py\n@@ -24,7 +24,7 @@\n \"\"\"\n Meta class for CustomForm Schema\n \"\"\"\n- type_ = 'custom_form'\n+ type_ = 'custom-form'\n self_vie... | 1,928 | 105 |
gh_patches_debug_30587 | rasdani/github-patches | git_diff | networkx__networkx-2618 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
`networkx.version` shadows any other module named `version` if imported first
Steps to reproduce:
```
$ pip freeze | grep networkx
networkx==1.11
$ touch version.py
$ python -c 'import version; print(ver... | diff --git a/networkx/release.py b/networkx/release.py
--- a/networkx/release.py
+++ b/networkx/release.py
@@ -101,9 +101,9 @@
# This is *good*, and the most likely place users will be when
# running setup.py. We do not want to overwrite version.py.
# Grab the version so that setu... | {"golden_diff": "diff --git a/networkx/release.py b/networkx/release.py\n--- a/networkx/release.py\n+++ b/networkx/release.py\n@@ -101,9 +101,9 @@\n # This is *good*, and the most likely place users will be when\n # running setup.py. We do not want to overwrite version.py.\n # Grab t... | 3,116 | 353 |
gh_patches_debug_37642 | rasdani/github-patches | git_diff | learningequality__kolibri-12059 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Feature Request: Add --manifest-only option to exportcontent
My understanding is that 0.16 will generate a channel manifest during
`kolibri manage exportcontent`
My request is that you add an option that... | diff --git a/kolibri/core/content/management/commands/exportcontent.py b/kolibri/core/content/management/commands/exportcontent.py
--- a/kolibri/core/content/management/commands/exportcontent.py
+++ b/kolibri/core/content/management/commands/exportcontent.py
@@ -60,6 +60,12 @@
parser.add_argument("channel_id... | {"golden_diff": "diff --git a/kolibri/core/content/management/commands/exportcontent.py b/kolibri/core/content/management/commands/exportcontent.py\n--- a/kolibri/core/content/management/commands/exportcontent.py\n+++ b/kolibri/core/content/management/commands/exportcontent.py\n@@ -60,6 +60,12 @@\n \n parser.ad... | 2,233 | 574 |
gh_patches_debug_38180 | rasdani/github-patches | git_diff | streamlink__streamlink-5147 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
plugins.nimotv: live stream stops after couple of seconds
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streaml... | diff --git a/src/streamlink/plugins/nimotv.py b/src/streamlink/plugins/nimotv.py
--- a/src/streamlink/plugins/nimotv.py
+++ b/src/streamlink/plugins/nimotv.py
@@ -9,7 +9,7 @@
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import useragents, validate
-from streamlink.stream.hls import... | {"golden_diff": "diff --git a/src/streamlink/plugins/nimotv.py b/src/streamlink/plugins/nimotv.py\n--- a/src/streamlink/plugins/nimotv.py\n+++ b/src/streamlink/plugins/nimotv.py\n@@ -9,7 +9,7 @@\n \n from streamlink.plugin import Plugin, pluginmatcher\n from streamlink.plugin.api import useragents, validate\n-from stre... | 3,876 | 648 |
gh_patches_debug_227 | rasdani/github-patches | git_diff | sktime__sktime-3618 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[BUG] ShapeletTransformClassifier numba error when dtype is not float64
**Describe the bug**
Seems that when using `ShapeletTransformClassifier` there is some Numba accelerated functions that break if the data... | diff --git a/sktime/utils/numba/general.py b/sktime/utils/numba/general.py
--- a/sktime/utils/numba/general.py
+++ b/sktime/utils/numba/general.py
@@ -34,6 +34,5 @@
if std > 0:
X_n = (X - np.mean(X)) / std
else:
- X_n = np.zeros(len(X))
-
+ X_n = X - np.mean(X)
return X_n
| {"golden_diff": "diff --git a/sktime/utils/numba/general.py b/sktime/utils/numba/general.py\n--- a/sktime/utils/numba/general.py\n+++ b/sktime/utils/numba/general.py\n@@ -34,6 +34,5 @@\n if std > 0:\n X_n = (X - np.mean(X)) / std\n else:\n- X_n = np.zeros(len(X))\n-\n+ X_n = X - np.mean(X)... | 1,468 | 111 |
gh_patches_debug_20253 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-901 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
`mathesar_temp_schema` should be hidden
## Description
<!-- A clear and concise description of what the bug is. -->
Currently, the system schema `mathesar_temp_schema` is returned as a standard schema, and ... | diff --git a/db/constants.py b/db/constants.py
--- a/db/constants.py
+++ b/db/constants.py
@@ -1,3 +1,4 @@
MATHESAR_PREFIX = "mathesar_"
ID = "id"
ID_ORIGINAL = "id_original"
+INFERENCE_SCHEMA = f"{MATHESAR_PREFIX}inference_schema"
diff --git a/db/schemas/operations/select.py b/db/schemas/operations/select.py
--- a/... | {"golden_diff": "diff --git a/db/constants.py b/db/constants.py\n--- a/db/constants.py\n+++ b/db/constants.py\n@@ -1,3 +1,4 @@\n MATHESAR_PREFIX = \"mathesar_\"\n ID = \"id\"\n ID_ORIGINAL = \"id_original\"\n+INFERENCE_SCHEMA = f\"{MATHESAR_PREFIX}inference_schema\"\ndiff --git a/db/schemas/operations/select.py b/db/sc... | 1,888 | 338 |
gh_patches_debug_2157 | rasdani/github-patches | git_diff | scipy__scipy-10353 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
BUG: interpolate.NearestNDInterpolator with pandas
interpolate.NearestNDInterpolator does not work as expected when used with selected pandas dataframe.
This is due to the index being maintained when making s... | diff --git a/scipy/interpolate/ndgriddata.py b/scipy/interpolate/ndgriddata.py
--- a/scipy/interpolate/ndgriddata.py
+++ b/scipy/interpolate/ndgriddata.py
@@ -62,7 +62,7 @@
if tree_options is None:
tree_options = dict()
self.tree = cKDTree(self.points, **tree_options)
- self.values... | {"golden_diff": "diff --git a/scipy/interpolate/ndgriddata.py b/scipy/interpolate/ndgriddata.py\n--- a/scipy/interpolate/ndgriddata.py\n+++ b/scipy/interpolate/ndgriddata.py\n@@ -62,7 +62,7 @@\n if tree_options is None:\n tree_options = dict()\n self.tree = cKDTree(self.points, **tree_option... | 3,425 | 120 |
gh_patches_debug_60593 | rasdani/github-patches | git_diff | pytorch__TensorRT-196 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
🐛 [Bug] UnicodeDecodeError running setup.py
## Bug Description
Trying to run "python setup.py install" fails with a unicode error when reading README.md.
## To Reproduce
Steps to reproduce the behavi... | diff --git a/py/setup.py b/py/setup.py
--- a/py/setup.py
+++ b/py/setup.py
@@ -190,7 +190,7 @@
)
]
-with open("README.md", "r") as fh:
+with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
| {"golden_diff": "diff --git a/py/setup.py b/py/setup.py\n--- a/py/setup.py\n+++ b/py/setup.py\n@@ -190,7 +190,7 @@\n )\n ]\n \n-with open(\"README.md\", \"r\") as fh:\n+with open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n long_description = fh.read()\n \n setup(\n", "issue": "\ud... | 3,664 | 83 |
gh_patches_debug_50801 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-6841 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Container: Regional Cluster support for GKE clusters
I'm unable to get or create regional clusters using the container_v1 client APIs. The [documentation](https://googleapis.github.io/google-cloud-python/late... | diff --git a/container/setup.py b/container/setup.py
--- a/container/setup.py
+++ b/container/setup.py
@@ -22,7 +22,7 @@
name = 'google-cloud-container'
description = 'Google Container Engine API client library'
-version = '0.1.1'
+version = '0.2.0'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Deve... | {"golden_diff": "diff --git a/container/setup.py b/container/setup.py\n--- a/container/setup.py\n+++ b/container/setup.py\n@@ -22,7 +22,7 @@\n \n name = 'google-cloud-container'\n description = 'Google Container Engine API client library'\n-version = '0.1.1'\n+version = '0.2.0'\n # Should be one of:\n # 'Development St... | 1,698 | 99 |
gh_patches_debug_21296 | rasdani/github-patches | git_diff | open-mmlab__mmpose-258 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Pylint: C0325
```bash
mmpose/core/evaluation/mesh_eval.py:27:0: C0325: Unnecessary parens after 'assert' keyword (superfluous-parens)
mmpose/datasets/datasets/mesh/mesh_h36m_dataset.py:94:0: C0325: Unnecessar... | diff --git a/mmpose/core/evaluation/mesh_eval.py b/mmpose/core/evaluation/mesh_eval.py
--- a/mmpose/core/evaluation/mesh_eval.py
+++ b/mmpose/core/evaluation/mesh_eval.py
@@ -24,8 +24,8 @@
source_points_hat (np.ndarray([N, 3])): Transformed source point set.
"""
- assert (target_points.shape[0] == so... | {"golden_diff": "diff --git a/mmpose/core/evaluation/mesh_eval.py b/mmpose/core/evaluation/mesh_eval.py\n--- a/mmpose/core/evaluation/mesh_eval.py\n+++ b/mmpose/core/evaluation/mesh_eval.py\n@@ -24,8 +24,8 @@\n source_points_hat (np.ndarray([N, 3])): Transformed source point set.\n \"\"\"\n \n- assert (t... | 2,766 | 418 |
gh_patches_debug_1513 | rasdani/github-patches | git_diff | searx__searx-1093 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[bug] Python 3.6 Autocomplete not work
Use searx with archlinux and python 3.6 [https://aur.archlinux.org/packages/searx-py3](https://aur.archlinux.org/packages/searx-py3)
Autocomplete not working, log :
```
... | diff --git a/searx/query.py b/searx/query.py
--- a/searx/query.py
+++ b/searx/query.py
@@ -51,7 +51,7 @@
self.query_parts = []
# split query, including whitespaces
- raw_query_parts = re.split(r'(\s+)', self.query)
+ raw_query_parts = re.split(r'(\s+)' if isinstance(self.query, str) el... | {"golden_diff": "diff --git a/searx/query.py b/searx/query.py\n--- a/searx/query.py\n+++ b/searx/query.py\n@@ -51,7 +51,7 @@\n self.query_parts = []\n \n # split query, including whitespaces\n- raw_query_parts = re.split(r'(\\s+)', self.query)\n+ raw_query_parts = re.split(r'(\\s+)' if isi... | 2,333 | 115 |
gh_patches_debug_60828 | rasdani/github-patches | git_diff | microsoft__AzureTRE-524 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[BUG] Service bus message times out on deployment of workspace template
**Describe the bug**
When deploying a template that takes > 10 minutes, although deployment is successful the status is not updated.
... | diff --git a/processor_function/vm_porter/runner.py b/processor_function/vm_porter/runner.py
--- a/processor_function/vm_porter/runner.py
+++ b/processor_function/vm_porter/runner.py
@@ -33,7 +33,7 @@
"""
async with service_bus_client:
q_name = env_vars["resource_request_queue"]
- renewer = Au... | {"golden_diff": "diff --git a/processor_function/vm_porter/runner.py b/processor_function/vm_porter/runner.py\n--- a/processor_function/vm_porter/runner.py\n+++ b/processor_function/vm_porter/runner.py\n@@ -33,7 +33,7 @@\n \"\"\"\n async with service_bus_client:\n q_name = env_vars[\"resource_request_qu... | 3,387 | 146 |
gh_patches_debug_948 | rasdani/github-patches | git_diff | deis__deis-280 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Update chef_version in provisioning scripts
I see in the digitalocean support that @bacongobbler removed the --bootstrap-version=11.4.4 and things still seem to work with more current Chef (11.6.2). This wasn't... | diff --git a/cm/chef.py b/cm/chef.py
--- a/cm/chef.py
+++ b/cm/chef.py
@@ -21,7 +21,7 @@
CHEF_INSTALL_TYPE = 'gems'
CHEF_RUBY_VERSION = '1.9.1'
CHEF_ENVIRONMENT = '_default'
-CHEF_CLIENT_VERSION = '11.4.4'
+CHEF_CLIENT_VERSION = '11.6.2'
# load chef config using CHEF_CONFIG_PATH
try:
| {"golden_diff": "diff --git a/cm/chef.py b/cm/chef.py\n--- a/cm/chef.py\n+++ b/cm/chef.py\n@@ -21,7 +21,7 @@\n CHEF_INSTALL_TYPE = 'gems'\n CHEF_RUBY_VERSION = '1.9.1'\n CHEF_ENVIRONMENT = '_default'\n-CHEF_CLIENT_VERSION = '11.4.4'\n+CHEF_CLIENT_VERSION = '11.6.2'\n \n # load chef config using CHEF_CONFIG_PATH\n try:\... | 4,004 | 110 |
gh_patches_debug_22524 | rasdani/github-patches | git_diff | napari__napari-1402 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Colormap in 3D broken by Image Layer Event Handler
## 🐛 Bug
Changing the colormap in 3D doesn't cause the colormap for the actual data to update. The thumbnail does update. This was likely introduced in #13... | diff --git a/napari/_vispy/vispy_image_layer.py b/napari/_vispy/vispy_image_layer.py
--- a/napari/_vispy/vispy_image_layer.py
+++ b/napari/_vispy/vispy_image_layer.py
@@ -159,6 +159,13 @@
node_cmap = Colormap(cmap[np.linspace(0, 1, 256) ** self._gamma])
else:
node_cmap = cmap
+ ... | {"golden_diff": "diff --git a/napari/_vispy/vispy_image_layer.py b/napari/_vispy/vispy_image_layer.py\n--- a/napari/_vispy/vispy_image_layer.py\n+++ b/napari/_vispy/vispy_image_layer.py\n@@ -159,6 +159,13 @@\n node_cmap = Colormap(cmap[np.linspace(0, 1, 256) ** self._gamma])\n else:\n no... | 3,547 | 328 |
gh_patches_debug_31286 | rasdani/github-patches | git_diff | ocf__ocfweb-57 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Home page should have a link to password reset, check print quota, view print queue
</issue>
<code>
[start of ocfweb/context_processors.py]
1 import re
2 from datetime import date
3 from datetime import datet... | diff --git a/ocfweb/context_processors.py b/ocfweb/context_processors.py
--- a/ocfweb/context_processors.py
+++ b/ocfweb/context_processors.py
@@ -1,12 +1,20 @@
import re
from datetime import date
from datetime import datetime
+from ipaddress import ip_address
+from ipaddress import ip_network
+from ipware.ip impo... | {"golden_diff": "diff --git a/ocfweb/context_processors.py b/ocfweb/context_processors.py\n--- a/ocfweb/context_processors.py\n+++ b/ocfweb/context_processors.py\n@@ -1,12 +1,20 @@\n import re\n from datetime import date\n from datetime import datetime\n+from ipaddress import ip_address\n+from ipaddress import ip_netwo... | 1,429 | 498 |
gh_patches_debug_16219 | rasdani/github-patches | git_diff | getsentry__sentry-5339 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Localhost filter should consider affected URL
Right now the "localhost" filter only consider's the affected User's IP: https://github.com/getsentry/sentry/blob/master/src/sentry/filters/localhost.py
But user... | diff --git a/src/sentry/filters/localhost.py b/src/sentry/filters/localhost.py
--- a/src/sentry/filters/localhost.py
+++ b/src/sentry/filters/localhost.py
@@ -1,8 +1,10 @@
from __future__ import absolute_import
from .base import Filter
+from six.moves.urllib.parse import urlparse
LOCAL_IPS = frozenset(['127.0.0.... | {"golden_diff": "diff --git a/src/sentry/filters/localhost.py b/src/sentry/filters/localhost.py\n--- a/src/sentry/filters/localhost.py\n+++ b/src/sentry/filters/localhost.py\n@@ -1,8 +1,10 @@\n from __future__ import absolute_import\n \n from .base import Filter\n+from six.moves.urllib.parse import urlparse\n \n LOCAL_... | 809 | 254 |
gh_patches_debug_51927 | rasdani/github-patches | git_diff | cisagov__manage.get.gov-1683 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Handle www. prefix when input in /availability API
[PR#100 in getgov-home for additional context
](https://github.com/cisagov/getgov-home/pull/100)
Handle edge case of including [www](http://www/). in the sea... | diff --git a/src/registrar/models/utility/domain_helper.py b/src/registrar/models/utility/domain_helper.py
--- a/src/registrar/models/utility/domain_helper.py
+++ b/src/registrar/models/utility/domain_helper.py
@@ -57,6 +57,9 @@
# If blank ok is true, just return the domain
return domain
+ ... | {"golden_diff": "diff --git a/src/registrar/models/utility/domain_helper.py b/src/registrar/models/utility/domain_helper.py\n--- a/src/registrar/models/utility/domain_helper.py\n+++ b/src/registrar/models/utility/domain_helper.py\n@@ -57,6 +57,9 @@\n # If blank ok is true, just return the domain\n ... | 2,597 | 105 |
gh_patches_debug_1182 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-1049 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
efs tag support
I am finding that searching for tagging of EFS resources does not consistently report the correct results. It did find an EFS that was incorrectly tagged, but after it was corrected it continue... | diff --git a/c7n/resources/efs.py b/c7n/resources/efs.py
--- a/c7n/resources/efs.py
+++ b/c7n/resources/efs.py
@@ -27,6 +27,7 @@
name = 'Name'
date = 'CreationTime'
dimension = None
+ detail_spec = ('describe_tags', 'FileSystemId', 'FileSystemId', None)
@ElasticFileSystem.action_r... | {"golden_diff": "diff --git a/c7n/resources/efs.py b/c7n/resources/efs.py\n--- a/c7n/resources/efs.py\n+++ b/c7n/resources/efs.py\n@@ -27,6 +27,7 @@\n name = 'Name'\n date = 'CreationTime'\n dimension = None\n+ detail_spec = ('describe_tags', 'FileSystemId', 'FileSystemId', None)\n \n \n ... | 1,259 | 100 |
gh_patches_debug_56095 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-4864 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[BUG]: colossalai 0.3.3 + torch 2.0.1 + baichuan-2 7b 训练保存 lr_scheduler 时会报 NotImplementedError 错
### 🐛 Describe the bug
用 colossalai 0.3.3 + torch 2.0.1 + baichuan-2 7b 训练保存 lr_scheduler 时 colossalai/nn... | diff --git a/colossalai/nn/lr_scheduler/delayed.py b/colossalai/nn/lr_scheduler/delayed.py
--- a/colossalai/nn/lr_scheduler/delayed.py
+++ b/colossalai/nn/lr_scheduler/delayed.py
@@ -1,4 +1,10 @@
-from torch.optim.lr_scheduler import _LRScheduler
+import torch
+from packaging.version import Version
+
+if Version(torch.... | {"golden_diff": "diff --git a/colossalai/nn/lr_scheduler/delayed.py b/colossalai/nn/lr_scheduler/delayed.py\n--- a/colossalai/nn/lr_scheduler/delayed.py\n+++ b/colossalai/nn/lr_scheduler/delayed.py\n@@ -1,4 +1,10 @@\n-from torch.optim.lr_scheduler import _LRScheduler\n+import torch\n+from packaging.version import Versi... | 3,887 | 155 |
gh_patches_debug_35227 | rasdani/github-patches | git_diff | openshift__openshift-ansible-3055 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
openshift_image_tag=latest broken again
https://github.com/openshift/openshift-ansible/pull/2882 allowed for `openshift_image_tag=latest`.
I think is was broken shortly thereafter with https://github.com/opens... | diff --git a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py b/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py
--- a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py
+++ b/roles/openshift_master_fac... | {"golden_diff": "diff --git a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py b/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py\n--- a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py\n+++ b/roles/o... | 2,782 | 722 |
gh_patches_debug_13132 | rasdani/github-patches | git_diff | conan-io__conan-14185 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[bug] Can't call `conan upload --recipe-only` twice with backup sources enabled
### Steps to reproduce
1. Enable backup sources
2. Export a recipe that downloads file
3. Call conan upload only recipe for r... | diff --git a/conans/client/downloaders/download_cache.py b/conans/client/downloaders/download_cache.py
--- a/conans/client/downloaders/download_cache.py
+++ b/conans/client/downloaders/download_cache.py
@@ -60,9 +60,12 @@
if excluded_urls is None:
excluded_urls = []
- all_refs = {str(k) f... | {"golden_diff": "diff --git a/conans/client/downloaders/download_cache.py b/conans/client/downloaders/download_cache.py\n--- a/conans/client/downloaders/download_cache.py\n+++ b/conans/client/downloaders/download_cache.py\n@@ -60,9 +60,12 @@\n if excluded_urls is None:\n excluded_urls = []\n \n- ... | 1,749 | 205 |
gh_patches_debug_8952 | rasdani/github-patches | git_diff | googleapis__google-auth-library-python-1413 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
utcnow is deprecated in python 3.12
#### Environment details
- OS: Linux
- Python version: 3.12.0
- pip version: 23.2.1
- `google-auth` version: 2.9.1
#### Issue
Here is the related code
... | diff --git a/google/auth/_helpers.py b/google/auth/_helpers.py
--- a/google/auth/_helpers.py
+++ b/google/auth/_helpers.py
@@ -92,7 +92,14 @@
Returns:
datetime: The current time in UTC.
"""
- return datetime.datetime.utcnow()
+ # We used datetime.utcnow() before, since it's deprecated from pyth... | {"golden_diff": "diff --git a/google/auth/_helpers.py b/google/auth/_helpers.py\n--- a/google/auth/_helpers.py\n+++ b/google/auth/_helpers.py\n@@ -92,7 +92,14 @@\n Returns:\n datetime: The current time in UTC.\n \"\"\"\n- return datetime.datetime.utcnow()\n+ # We used datetime.utcnow() before, sin... | 3,242 | 189 |
gh_patches_debug_15574 | rasdani/github-patches | git_diff | HypothesisWorks__hypothesis-872 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Verbose output not shown unless -s is specified
I am running a test suite with hypothesis using py.test, when setting HYPOTHESIS_VERBOSITY_LEVEL=verbose environment variable I expected to see the intermediate r... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -69,7 +69,8 @@
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
- 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None)
+ 'pandas': ... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -69,7 +69,8 @@\n intersphinx_mapping = {\n 'python': ('https://docs.python.org/3/', None),\n 'numpy': ('https://docs.scipy.org/doc/numpy/', None),\n- 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/... | 1,915 | 228 |
gh_patches_debug_11949 | rasdani/github-patches | git_diff | cupy__cupy-2923 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Windows: module 'numpy' has no attribute 'complex256'
In file: [cupy/cupyx/scipy/ndimage/filters.py] (https://github.com/cupy/cupy/blob/master/cupyx/scipy/ndimage/filters.py)
Line 83: ` if input.dtype in (n... | diff --git a/cupyx/scipy/ndimage/filters.py b/cupyx/scipy/ndimage/filters.py
--- a/cupyx/scipy/ndimage/filters.py
+++ b/cupyx/scipy/ndimage/filters.py
@@ -1,5 +1,3 @@
-import numpy
-
import cupy
from cupy import util
@@ -80,7 +78,7 @@
def _correlate_or_convolve(input, weights, output, mode, cval, origin,
... | {"golden_diff": "diff --git a/cupyx/scipy/ndimage/filters.py b/cupyx/scipy/ndimage/filters.py\n--- a/cupyx/scipy/ndimage/filters.py\n+++ b/cupyx/scipy/ndimage/filters.py\n@@ -1,5 +1,3 @@\n-import numpy\n-\n import cupy\n from cupy import util\n \n@@ -80,7 +78,7 @@\n \n def _correlate_or_convolve(input, weights, output,... | 3,416 | 184 |
gh_patches_debug_9373 | rasdani/github-patches | git_diff | PaddlePaddle__PaddleSeg-1788 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Kappa系数大于1
版本:Paddle2.2,PaddleSeg版本:2.3.0。在评估模型时发现**Kappa系数大于1**。请问这是什么情况?
如下图所示:

配置文件如下:
``... | diff --git a/paddleseg/utils/metrics.py b/paddleseg/utils/metrics.py
--- a/paddleseg/utils/metrics.py
+++ b/paddleseg/utils/metrics.py
@@ -200,9 +200,9 @@
Returns:
float: kappa coefficient.
"""
- intersect_area = intersect_area.numpy()
- pred_area = pred_area.numpy()
- label_area = label_are... | {"golden_diff": "diff --git a/paddleseg/utils/metrics.py b/paddleseg/utils/metrics.py\n--- a/paddleseg/utils/metrics.py\n+++ b/paddleseg/utils/metrics.py\n@@ -200,9 +200,9 @@\n Returns:\n float: kappa coefficient.\n \"\"\"\n- intersect_area = intersect_area.numpy()\n- pred_area = pred_area.numpy()... | 3,363 | 178 |
gh_patches_debug_47466 | rasdani/github-patches | git_diff | bokeh__bokeh-8634 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Stocks Example is not working properly
https://github.com/bokeh/bokeh/tree/master/examples/app/stocks
The example suppose to change the stats according to the selected points. For some reason
de... | diff --git a/examples/app/stocks/main.py b/examples/app/stocks/main.py
--- a/examples/app/stocks/main.py
+++ b/examples/app/stocks/main.py
@@ -130,7 +130,7 @@
data = data.iloc[selected, :]
update_stats(data, t1, t2)
-source.on_change('selected', selection_change)
+source.selected.on_change('indices', se... | {"golden_diff": "diff --git a/examples/app/stocks/main.py b/examples/app/stocks/main.py\n--- a/examples/app/stocks/main.py\n+++ b/examples/app/stocks/main.py\n@@ -130,7 +130,7 @@\n data = data.iloc[selected, :]\n update_stats(data, t1, t2)\n \n-source.on_change('selected', selection_change)\n+source.selecte... | 2,313 | 108 |
gh_patches_debug_22014 | rasdani/github-patches | git_diff | pytorch__text-361 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
MosesTokenizer has been moved out of NLTK due to licensing issues
@jekbradbury great work here!
Due to https://github.com/nltk/nltk/issues/2000, we had to remove MosesTokenizer out of NLTK but now it's hoste... | diff --git a/torchtext/data/utils.py b/torchtext/data/utils.py
--- a/torchtext/data/utils.py
+++ b/torchtext/data/utils.py
@@ -21,16 +21,22 @@
raise
elif tokenizer == "moses":
try:
- from nltk.tokenize.moses import MosesTokenizer
+ from sacremoses import MosesTokenizer
... | {"golden_diff": "diff --git a/torchtext/data/utils.py b/torchtext/data/utils.py\n--- a/torchtext/data/utils.py\n+++ b/torchtext/data/utils.py\n@@ -21,16 +21,22 @@\n raise\n elif tokenizer == \"moses\":\n try:\n- from nltk.tokenize.moses import MosesTokenizer\n+ from sacremo... | 1,744 | 299 |
gh_patches_debug_43415 | rasdani/github-patches | git_diff | kserve__kserve-2817 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Knative KafaSource detects wrong URL to serve events
/kind bug
**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]
- Deployed knative-eventing and kafkasour... | diff --git a/docs/samples/kafka/image_transformer/image_transformer.py b/docs/samples/kafka/image_transformer/image_transformer.py
--- a/docs/samples/kafka/image_transformer/image_transformer.py
+++ b/docs/samples/kafka/image_transformer/image_transformer.py
@@ -11,13 +11,14 @@
# See the License for the specific langu... | {"golden_diff": "diff --git a/docs/samples/kafka/image_transformer/image_transformer.py b/docs/samples/kafka/image_transformer/image_transformer.py\n--- a/docs/samples/kafka/image_transformer/image_transformer.py\n+++ b/docs/samples/kafka/image_transformer/image_transformer.py\n@@ -11,13 +11,14 @@\n # See the License f... | 2,303 | 914 |
gh_patches_debug_9600 | rasdani/github-patches | git_diff | ansible__ansible-17457 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Ansible fails to create retry files with [Errno 2] No such file or directory: ''
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
retry files
##### ANSIBLE VERSION
```
ansible 2.1.1.0
config file =
con... | diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py
--- a/lib/ansible/executor/playbook_executor.py
+++ b/lib/ansible/executor/playbook_executor.py
@@ -186,7 +186,7 @@
if C.RETRY_FILES_SAVE_PATH:
basedir = C.she... | {"golden_diff": "diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py\n--- a/lib/ansible/executor/playbook_executor.py\n+++ b/lib/ansible/executor/playbook_executor.py\n@@ -186,7 +186,7 @@\n if C.RETRY_FILES_SAVE_PATH:\n ... | 4,074 | 126 |
gh_patches_debug_4660 | rasdani/github-patches | git_diff | bridgecrewio__checkov-2935 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
False positive for CKV_AZURE_43 when using the "random" provider resources
**Describe the issue**
Check ID: CKV_AZURE_43
When using any of the random_* resources from the [random provider](https://registry.te... | diff --git a/checkov/terraform/checks/resource/azure/StorageAccountName.py b/checkov/terraform/checks/resource/azure/StorageAccountName.py
--- a/checkov/terraform/checks/resource/azure/StorageAccountName.py
+++ b/checkov/terraform/checks/resource/azure/StorageAccountName.py
@@ -5,7 +5,7 @@
from checkov.common.models.e... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/StorageAccountName.py b/checkov/terraform/checks/resource/azure/StorageAccountName.py\n--- a/checkov/terraform/checks/resource/azure/StorageAccountName.py\n+++ b/checkov/terraform/checks/resource/azure/StorageAccountName.py\n@@ -5,7 +5,7 @@\n from ch... | 1,169 | 167 |
gh_patches_debug_14368 | rasdani/github-patches | git_diff | scrapy__scrapy-1131 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Unhandled error in Deferred (RobotsTxtMiddleware)
**Dev story**:
Let's say spider downloads all .zip files from http://habrahabr.ru/post/212029/ page
Url with .zip files looks like this: http://layer6.jenkins.t... | diff --git a/scrapy/contrib/downloadermiddleware/robotstxt.py b/scrapy/contrib/downloadermiddleware/robotstxt.py
--- a/scrapy/contrib/downloadermiddleware/robotstxt.py
+++ b/scrapy/contrib/downloadermiddleware/robotstxt.py
@@ -49,8 +49,14 @@
)
dfd = self.crawler.engine.download(robotsreq, spid... | {"golden_diff": "diff --git a/scrapy/contrib/downloadermiddleware/robotstxt.py b/scrapy/contrib/downloadermiddleware/robotstxt.py\n--- a/scrapy/contrib/downloadermiddleware/robotstxt.py\n+++ b/scrapy/contrib/downloadermiddleware/robotstxt.py\n@@ -49,8 +49,14 @@\n )\n dfd = self.crawler.engine.do... | 1,458 | 217 |
gh_patches_debug_3525 | rasdani/github-patches | git_diff | microsoft__botbuilder-python-1747 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
port: turn memory scope includesnapshot to false (#5441)
The changes in [turn memory scope includesnapshot to false (#5441)](https://github.com/microsoft/botbuilder-dotnet/pull/5441) may need to be ported to ma... | diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py
--- a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py
+++ b/libraries/botbuilder-dialogs/botbuilder/dial... | {"golden_diff": "diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py\n--- a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py\n+++ b/libraries/botbuilder-dial... | 1,457 | 167 |
gh_patches_debug_14752 | rasdani/github-patches | git_diff | pymodbus-dev__pymodbus-2186 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
ssl.SSLWantReadError: The operation did not complete (read) when using ModbusTlsClient
<!--
Before opening a new issue, make sure you do the following:
- Check that your issue isn't already filed: https://g... | diff --git a/pymodbus/framer/old_framer_tls.py b/pymodbus/framer/old_framer_tls.py
--- a/pymodbus/framer/old_framer_tls.py
+++ b/pymodbus/framer/old_framer_tls.py
@@ -1,5 +1,6 @@
"""TLS framer."""
import struct
+from time import sleep
from pymodbus.exceptions import (
ModbusIOException,
@@ -42,6 +43,11 @@
... | {"golden_diff": "diff --git a/pymodbus/framer/old_framer_tls.py b/pymodbus/framer/old_framer_tls.py\n--- a/pymodbus/framer/old_framer_tls.py\n+++ b/pymodbus/framer/old_framer_tls.py\n@@ -1,5 +1,6 @@\n \"\"\"TLS framer.\"\"\"\n import struct\n+from time import sleep\n \n from pymodbus.exceptions import (\n ModbusIOE... | 3,121 | 200 |
gh_patches_debug_8913 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-2644 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
I re-read the specification. I think the requirement is to json encode the non-string attribute values not just the sequence type. For example `_check_value(True)` returns `'True'` which should actually be `'tr... | diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py
--- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py
+++ b/exporter/opent... | {"golden_diff": "diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py\n--- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py\n+... | 2,781 | 189 |
gh_patches_debug_30826 | rasdani/github-patches | git_diff | freedomofpress__securedrop-4133 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
[xenial] Verify Trusty backup -> Xenial recovery story
We should ensure that a SecureDrop backup completed on 14.04 can successfully be recovered on 16.04. Whether we ask admins to perform this step manually, o... | diff --git a/install_files/ansible-base/roles/restore/files/restore.py b/install_files/ansible-base/roles/restore/files/restore.py
--- a/install_files/ansible-base/roles/restore/files/restore.py
+++ b/install_files/ansible-base/roles/restore/files/restore.py
@@ -8,6 +8,7 @@
"""
import os
+import shutil
import subp... | {"golden_diff": "diff --git a/install_files/ansible-base/roles/restore/files/restore.py b/install_files/ansible-base/roles/restore/files/restore.py\n--- a/install_files/ansible-base/roles/restore/files/restore.py\n+++ b/install_files/ansible-base/roles/restore/files/restore.py\n@@ -8,6 +8,7 @@\n \"\"\"\n \n import os\n... | 1,185 | 415 |
gh_patches_debug_30080 | rasdani/github-patches | git_diff | zulip__zulip-21977 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Update "notifications language" setting to use the "Default language" picker modal
The settings UI for picking the "notifications language" (previously "Default language for new users"; see #20866) should use t... | diff --git a/version.py b/version.py
--- a/version.py
+++ b/version.py
@@ -48,4 +48,4 @@
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
-PROVISION_VERSION = "190.0"
+PROVISION_VERSION = "190.1"
diff --git a/zerver/lib/home.py b/zerver/lib/home.py
--- a/zerver... | {"golden_diff": "diff --git a/version.py b/version.py\n--- a/version.py\n+++ b/version.py\n@@ -48,4 +48,4 @@\n # historical commits sharing the same major version, in which case a\n # minor version bump suffices.\n \n-PROVISION_VERSION = \"190.0\"\n+PROVISION_VERSION = \"190.1\"\ndiff --git a/zerver/lib/home.py b/z... | 3,788 | 392 |
gh_patches_debug_34300 | rasdani/github-patches | git_diff | jupyterhub__jupyterhub-142 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Admin UI suggestions
As I've been using the admin UI a bit for my class, I just had a few things that I thought would be nice to have/change in it:
- move the "add user" button to the top -- it is annoying with... | diff --git a/jupyterhub/apihandlers/base.py b/jupyterhub/apihandlers/base.py
--- a/jupyterhub/apihandlers/base.py
+++ b/jupyterhub/apihandlers/base.py
@@ -42,7 +42,7 @@
reason = getattr(exception, 'reason', '')
if reason:
status_message = reason
-
+ self.set_hea... | {"golden_diff": "diff --git a/jupyterhub/apihandlers/base.py b/jupyterhub/apihandlers/base.py\n--- a/jupyterhub/apihandlers/base.py\n+++ b/jupyterhub/apihandlers/base.py\n@@ -42,7 +42,7 @@\n reason = getattr(exception, 'reason', '')\n if reason:\n status_message = reason\n- ... | 1,597 | 629 |
gh_patches_debug_1499 | rasdani/github-patches | git_diff | inventree__InvenTree-5627 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Stocktake doesn't save parts with no stock
### Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find a similar issue
### Describe the bug*
Stocktake is ignoring active... | diff --git a/InvenTree/part/stocktake.py b/InvenTree/part/stocktake.py
--- a/InvenTree/part/stocktake.py
+++ b/InvenTree/part/stocktake.py
@@ -249,10 +249,6 @@
location=location,
)
- if stocktake.quantity == 0:
- # Skip rows with zero total quantity
- continue
-
... | {"golden_diff": "diff --git a/InvenTree/part/stocktake.py b/InvenTree/part/stocktake.py\n--- a/InvenTree/part/stocktake.py\n+++ b/InvenTree/part/stocktake.py\n@@ -249,10 +249,6 @@\n location=location,\n )\n \n- if stocktake.quantity == 0:\n- # Skip rows with zero total quantity\n- ... | 3,977 | 111 |
gh_patches_debug_15429 | rasdani/github-patches | git_diff | ipython__ipython-10264 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
TAB key does not indent
In the git version of IPython, type
```
def foo(a):
pass<ENTER>
```
The new line is not correctly indented, and the tab key does not insert 4 spaces.
/cc @Carreau @takluyver
</... | diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py
--- a/IPython/terminal/shortcuts.py
+++ b/IPython/terminal/shortcuts.py
@@ -100,12 +100,14 @@
b.cancel_completion()
return
- if not (d.on_last_line or d.cursor_position_row >= d.line_count
- - d.... | {"golden_diff": "diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py\n--- a/IPython/terminal/shortcuts.py\n+++ b/IPython/terminal/shortcuts.py\n@@ -100,12 +100,14 @@\n b.cancel_completion()\n return\n \n- if not (d.on_last_line or d.cursor_position_row >= d.line... | 2,458 | 241 |
gh_patches_debug_23562 | rasdani/github-patches | git_diff | internetarchive__openlibrary-6807 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
librarian merge queue fixes
Closes #6807
- allows flexible sorting with ?order=asc or desc -- piggy backs on #6785
- adds total counts to Open and Closed
- removes "All"
- fixes bug where page? persists ... | diff --git a/openlibrary/plugins/upstream/edits.py b/openlibrary/plugins/upstream/edits.py
--- a/openlibrary/plugins/upstream/edits.py
+++ b/openlibrary/plugins/upstream/edits.py
@@ -96,19 +96,26 @@
)
def GET(self):
- i = web.input(page=1, limit=25, mode="open", submitter=None, reviewer=N... | {"golden_diff": "diff --git a/openlibrary/plugins/upstream/edits.py b/openlibrary/plugins/upstream/edits.py\n--- a/openlibrary/plugins/upstream/edits.py\n+++ b/openlibrary/plugins/upstream/edits.py\n@@ -96,19 +96,26 @@\n )\n \n def GET(self):\n- i = web.input(page=1, limit=25, mode=\"open\", ... | 2,035 | 323 |
gh_patches_debug_15287 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-642 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Expand Environment Variables in Cookiecutter Configuration File
I set my cookiecutterrc file via an environment variable, like this:
```
export COOKIECUTTER_CONFIG="$XDG_CONFIG_HOME/cookiecutter/cookiecutterrc... | diff --git a/cookiecutter/config.py b/cookiecutter/config.py
--- a/cookiecutter/config.py
+++ b/cookiecutter/config.py
@@ -31,6 +31,13 @@
}
+def _expand_path(path):
+ """Expand both environment variables and user home in the given path."""
+ path = os.path.expandvars(path)
+ path = os.path.expanduser(path... | {"golden_diff": "diff --git a/cookiecutter/config.py b/cookiecutter/config.py\n--- a/cookiecutter/config.py\n+++ b/cookiecutter/config.py\n@@ -31,6 +31,13 @@\n }\n \n \n+def _expand_path(path):\n+ \"\"\"Expand both environment variables and user home in the given path.\"\"\"\n+ path = os.path.expandvars(path)\n+ ... | 1,486 | 226 |
gh_patches_debug_60945 | rasdani/github-patches | git_diff | Netflix__lemur-766 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Set lemur to log to stdout
When running lemur inside docker I would like to have it log everything to `stdout` so that I can forward logs to splunk. At the moment `lemur.config.py` has a `LEMUR_LOG` parameter t... | diff --git a/lemur/factory.py b/lemur/factory.py
--- a/lemur/factory.py
+++ b/lemur/factory.py
@@ -153,7 +153,7 @@
app.logger.addHandler(handler)
stream_handler = StreamHandler()
- stream_handler.setLevel(app.config.get('LOG_LEVEL'))
+ stream_handler.setLevel(app.config.get('LOG_LEVEL', 'DEBUG'))
... | {"golden_diff": "diff --git a/lemur/factory.py b/lemur/factory.py\n--- a/lemur/factory.py\n+++ b/lemur/factory.py\n@@ -153,7 +153,7 @@\n app.logger.addHandler(handler)\n \n stream_handler = StreamHandler()\n- stream_handler.setLevel(app.config.get('LOG_LEVEL'))\n+ stream_handler.setLevel(app.config.get('L... | 2,297 | 98 |
gh_patches_debug_29313 | rasdani/github-patches | git_diff | bokeh__bokeh-7934 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
flask_gunicorn_embed.py does not work with Tornado 5
ref: https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/flask_gunicorn_embed.py
Running as is gets:
```
Exception in thread Thread-1... | diff --git a/examples/howto/server_embed/flask_gunicorn_embed.py b/examples/howto/server_embed/flask_gunicorn_embed.py
--- a/examples/howto/server_embed/flask_gunicorn_embed.py
+++ b/examples/howto/server_embed/flask_gunicorn_embed.py
@@ -1,3 +1,8 @@
+try:
+ import asyncio
+except ImportError:
+ raise RuntimeErro... | {"golden_diff": "diff --git a/examples/howto/server_embed/flask_gunicorn_embed.py b/examples/howto/server_embed/flask_gunicorn_embed.py\n--- a/examples/howto/server_embed/flask_gunicorn_embed.py\n+++ b/examples/howto/server_embed/flask_gunicorn_embed.py\n@@ -1,3 +1,8 @@\n+try:\n+ import asyncio\n+except ImportError:... | 1,920 | 428 |
gh_patches_debug_19411 | rasdani/github-patches | git_diff | MongoEngine__mongoengine-1668 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
'readPreference' param in config URI was ignored in mongoengine.register_connection
I have a config string `'mongodb://mongodb01.test.vpc,mongodb02.test.vpc,mongodb03.test.vpc/prod?readPreference=secondaryPrefe... | diff --git a/mongoengine/connection.py b/mongoengine/connection.py
--- a/mongoengine/connection.py
+++ b/mongoengine/connection.py
@@ -103,6 +103,18 @@
conn_settings['authentication_source'] = uri_options['authsource']
if 'authmechanism' in uri_options:
conn_settings['auth... | {"golden_diff": "diff --git a/mongoengine/connection.py b/mongoengine/connection.py\n--- a/mongoengine/connection.py\n+++ b/mongoengine/connection.py\n@@ -103,6 +103,18 @@\n conn_settings['authentication_source'] = uri_options['authsource']\n if 'authmechanism' in uri_options:\n ... | 3,718 | 227 |
gh_patches_debug_9231 | rasdani/github-patches | git_diff | privacyidea__privacyidea-2615 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
no serial in polling on /ttype/push
We may have a bug in push polling. This exception occurs on polling
https://gist.github.com/laclaro/743618d11f61f8a817e273db6b804a9a
This may be related to #2534.
</is... | diff --git a/privacyidea/api/ttype.py b/privacyidea/api/ttype.py
--- a/privacyidea/api/ttype.py
+++ b/privacyidea/api/ttype.py
@@ -69,6 +69,7 @@
# access_route contains the ip adresses of all clients, hops and proxies.
g.client_ip = get_client_ip(request,
get_from_config(SYSCO... | {"golden_diff": "diff --git a/privacyidea/api/ttype.py b/privacyidea/api/ttype.py\n--- a/privacyidea/api/ttype.py\n+++ b/privacyidea/api/ttype.py\n@@ -69,6 +69,7 @@\n # access_route contains the ip adresses of all clients, hops and proxies.\n g.client_ip = get_client_ip(request,\n ... | 1,811 | 134 |
gh_patches_debug_6576 | rasdani/github-patches | git_diff | ephios-dev__ephios-757 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Make minors identifiable on event detail page
As an Einsatzleiter, I want to quickly grasp which participants are younger than 18 years. For that purpose, I want to have the participation boxes on the event det... | diff --git a/ephios/core/signup/participants.py b/ephios/core/signup/participants.py
--- a/ephios/core/signup/participants.py
+++ b/ephios/core/signup/participants.py
@@ -27,6 +27,12 @@
today, born = today or date.today(), self.date_of_birth
return today.year - born.year - ((today.month, today.day) < ... | {"golden_diff": "diff --git a/ephios/core/signup/participants.py b/ephios/core/signup/participants.py\n--- a/ephios/core/signup/participants.py\n+++ b/ephios/core/signup/participants.py\n@@ -27,6 +27,12 @@\n today, born = today or date.today(), self.date_of_birth\n return today.year - born.year - ((toda... | 1,607 | 152 |
gh_patches_debug_37692 | rasdani/github-patches | git_diff | astronomer__astro-sdk-325 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Astro Build's Integration Test breaking on 0.8.1
broken on - 0.8.1 , but works with 0.7.0.
In this test dag, task_5 joins tables from task_3 (snowflake) and task_4 (postgres). The task’s print statement shows ... | diff --git a/src/astro/utils/table_handler.py b/src/astro/utils/table_handler.py
--- a/src/astro/utils/table_handler.py
+++ b/src/astro/utils/table_handler.py
@@ -16,28 +16,51 @@
"""
first_table: Optional[Table] = None
if self.op_args:
- table_index = [x for x, t in enumerate(self.... | {"golden_diff": "diff --git a/src/astro/utils/table_handler.py b/src/astro/utils/table_handler.py\n--- a/src/astro/utils/table_handler.py\n+++ b/src/astro/utils/table_handler.py\n@@ -16,28 +16,51 @@\n \"\"\"\n first_table: Optional[Table] = None\n if self.op_args:\n- table_index = [x ... | 1,817 | 635 |
gh_patches_debug_14014 | rasdani/github-patches | git_diff | sanic-org__sanic-1857 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Nightly build fails due to websockets version not matching setup.py
on setup.py: >=0.7.0,<0.9
on tox.ini: >=0.7.0,<0.8
</issue>
<code>
[start of sanic/websocket.py]
1 from typing import (
2 Any,
3 Awa... | diff --git a/sanic/websocket.py b/sanic/websocket.py
--- a/sanic/websocket.py
+++ b/sanic/websocket.py
@@ -113,7 +113,7 @@
# hook up the websocket protocol
self.websocket = WebSocketCommonProtocol(
- timeout=self.websocket_timeout,
+ close_timeout=self.websocket_timeout,
... | {"golden_diff": "diff --git a/sanic/websocket.py b/sanic/websocket.py\n--- a/sanic/websocket.py\n+++ b/sanic/websocket.py\n@@ -113,7 +113,7 @@\n \n # hook up the websocket protocol\n self.websocket = WebSocketCommonProtocol(\n- timeout=self.websocket_timeout,\n+ close_timeout=self.... | 3,407 | 209 |
gh_patches_debug_29685 | rasdani/github-patches | git_diff | avocado-framework__avocado-4644 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Functional test for requirements resolver fails easily
The PASS or FAIL result for the functional tests for the requirement resolver is very much a hit/miss, but it's somewhat easy to reproduce with:
```
$ ... | diff --git a/avocado/core/runners/requirement_package.py b/avocado/core/runners/requirement_package.py
--- a/avocado/core/runners/requirement_package.py
+++ b/avocado/core/runners/requirement_package.py
@@ -46,9 +46,14 @@
if software_manager.install(package):
stdout = MESSAGES[cmd]['succes... | {"golden_diff": "diff --git a/avocado/core/runners/requirement_package.py b/avocado/core/runners/requirement_package.py\n--- a/avocado/core/runners/requirement_package.py\n+++ b/avocado/core/runners/requirement_package.py\n@@ -46,9 +46,14 @@\n if software_manager.install(package):\n stdout =... | 2,983 | 381 |
gh_patches_debug_64110 | rasdani/github-patches | git_diff | projectmesa__mesa-561 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Update tests to use pytest, not nose
Update tests to use pytest, not nose. nose is not maintained anymore.
</issue>
<code>
[start of setup.py]
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 import re
4
... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,8 @@
'dev': [
'coverage',
'flake8',
- 'nose',
+ 'pytest',
+ 'pytest-cov',
'sphinx',
],
'docs': [
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -20,7 +20,8 @@\n 'dev': [\n 'coverage',\n 'flake8',\n- 'nose',\n+ 'pytest',\n+ 'pytest-cov',\n 'sphinx',\n ],\n 'docs': [\n", "issue": "Update tests to use pytest, not nose\nUpd... | 1,193 | 76 |
gh_patches_debug_20766 | rasdani/github-patches | git_diff | microsoft__botbuilder-python-2069 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Recommended change to 3.8.6 or above
https://github.com/microsoft/botbuilder-python/blob/7b064bb9f916afc10e931f3713183f57e1d7ca47/libraries/botbuilder-integration-aiohttp/setup.py#L13
I have a conflict when ... | diff --git a/libraries/botbuilder-ai/setup.py b/libraries/botbuilder-ai/setup.py
--- a/libraries/botbuilder-ai/setup.py
+++ b/libraries/botbuilder-ai/setup.py
@@ -8,7 +8,7 @@
"azure-cognitiveservices-language-luis==0.2.0",
"botbuilder-schema==4.15.0",
"botbuilder-core==4.15.0",
- "aiohttp==3.8.5",
+ ... | {"golden_diff": "diff --git a/libraries/botbuilder-ai/setup.py b/libraries/botbuilder-ai/setup.py\n--- a/libraries/botbuilder-ai/setup.py\n+++ b/libraries/botbuilder-ai/setup.py\n@@ -8,7 +8,7 @@\n \"azure-cognitiveservices-language-luis==0.2.0\",\n \"botbuilder-schema==4.15.0\",\n \"botbuilder-core==4.15.0\... | 2,351 | 460 |
gh_patches_debug_33101 | rasdani/github-patches | git_diff | pypa__virtualenv-1578 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
virtualenv 20: is the symlink hack really worth it?
I did some timing and it seems like the trouble it causes is not really worth it -- at the very least I'd like an option which copies instead of symlinks
H... | diff --git a/src/virtualenv/seed/via_app_data/via_app_data.py b/src/virtualenv/seed/via_app_data/via_app_data.py
--- a/src/virtualenv/seed/via_app_data/via_app_data.py
+++ b/src/virtualenv/seed/via_app_data/via_app_data.py
@@ -9,6 +9,7 @@
import six
from virtualenv.dirs import default_data_dir
+from virtualenv.info... | {"golden_diff": "diff --git a/src/virtualenv/seed/via_app_data/via_app_data.py b/src/virtualenv/seed/via_app_data/via_app_data.py\n--- a/src/virtualenv/seed/via_app_data/via_app_data.py\n+++ b/src/virtualenv/seed/via_app_data/via_app_data.py\n@@ -9,6 +9,7 @@\n import six\n \n from virtualenv.dirs import default_data_di... | 2,448 | 491 |
gh_patches_debug_3606 | rasdani/github-patches | git_diff | OBOFoundry__OBOFoundry.github.io-802 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
travis on master failing, due to metadata violations from new jsonschema checks
There are two things wrong:
- the validate script assumes a util/reports folder
- hp is failing; we already know that hp has... | diff --git a/util/validate-metadata.py b/util/validate-metadata.py
--- a/util/validate-metadata.py
+++ b/util/validate-metadata.py
@@ -7,9 +7,9 @@
import re
# file paths
-data_file = "../registry/ontologies.jsonld"
-schema_file = "metadata-schema.json"
-schema_lite_file = "metadata-schema-lite.json"
+data_file = "r... | {"golden_diff": "diff --git a/util/validate-metadata.py b/util/validate-metadata.py\n--- a/util/validate-metadata.py\n+++ b/util/validate-metadata.py\n@@ -7,9 +7,9 @@\n import re\n \n # file paths\n-data_file = \"../registry/ontologies.jsonld\"\n-schema_file = \"metadata-schema.json\"\n-schema_lite_file = \"metadata-sc... | 1,886 | 133 |
gh_patches_debug_437 | rasdani/github-patches | git_diff | pypa__setuptools-2584 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
Add mechanism for side-by-side comparison of setup.py and its equivalent setup.cfg
We have many documentation examples that are purely declarative and are either documented as `setup.py` or `setup.cfg`. It woul... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -93,3 +93,6 @@
html_theme = 'alabaster'
templates_path = ['_templates']
html_sidebars = {'index': ['tidelift-sidebar.html']}
+
+# Add support for inline tabs
+extensions += ['sphinx_inline_tabs']
| {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -93,3 +93,6 @@\n html_theme = 'alabaster'\n templates_path = ['_templates']\n html_sidebars = {'index': ['tidelift-sidebar.html']}\n+\n+# Add support for inline tabs\n+extensions += ['sphinx_inline_tabs']\n", "issue": ... | 1,813 | 82 |
gh_patches_debug_22113 | rasdani/github-patches | git_diff | rlworkgroup__garage-1879 | You will be provided with a partial code base and an issue statement explaining a problem to resolve.
<issue>
TF 2.3.0 incompatibility
TF 2.3.0 was released yesterday, and seems to be incompatible with TFP <0.11.0 and breaks imports (https://travis-ci.com/github/rlworkgroup/garage/jobs/365922927#L3061). We pin TFP to <... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -4,30 +4,26 @@
from setuptools import find_packages, setup
GARAGE_GH_TOKEN = os.environ.get('GARAGE_GH_TOKEN') or 'git'
-GYM_VERSION = '0.15.4'
+GYM_VERSION = '0.17.2'
# Required dependencies
REQUIRED = [
# Please keep alphabetized
'akr... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -4,30 +4,26 @@\n from setuptools import find_packages, setup\n \n GARAGE_GH_TOKEN = os.environ.get('GARAGE_GH_TOKEN') or 'git'\n-GYM_VERSION = '0.15.4'\n+GYM_VERSION = '0.17.2'\n \n # Required dependencies\n REQUIRED = [\n # Pleas... | 1,990 | 387 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.