problem_id stringlengths 18 22 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 58 | prompt stringlengths 1.1k 10.2k | golden_diff stringlengths 151 4.94k | verification_info stringlengths 582 21k | num_tokens int64 271 2.05k | num_tokens_diff int64 47 1.02k |
|---|---|---|---|---|---|---|---|---|
gh_patches_debug_19195 | rasdani/github-patches | git_diff | ansible__ansible-modules-extras-1570 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Verbs change in Elasticsearch 2.0.0
Since Elasticsearch 2.0.0 `plugin` dropped the double-dash for verbs. So what used to be `--install` now became `install`. Hence, [this](https://github.com/ansible/ansible-... | diff --git a/packaging/elasticsearch_plugin.py b/packaging/elasticsearch_plugin.py
--- a/packaging/elasticsearch_plugin.py
+++ b/packaging/elasticsearch_plugin.py
@@ -33,7 +33,7 @@
options:
name:
description:
- - Name of the plugin to install
+ - Name of the plugin to install. In ES... | {"golden_diff": "diff --git a/packaging/elasticsearch_plugin.py b/packaging/elasticsearch_plugin.py\n--- a/packaging/elasticsearch_plugin.py\n+++ b/packaging/elasticsearch_plugin.py\n@@ -33,7 +33,7 @@\n options:\n name:\n description:\n- - Name of the plugin to install\n+ - Name of the... | 1,841 | 234 |
gh_patches_debug_35368 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-2262 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Adding IAM parameters to redshift adapter
### Describe the feature
I would the arguments to get_cluster_credentials to be added to the dbt profile configuration. In particular DbGroups to allow the temporary... | diff --git a/plugins/redshift/dbt/adapters/redshift/connections.py b/plugins/redshift/dbt/adapters/redshift/connections.py
--- a/plugins/redshift/dbt/adapters/redshift/connections.py
+++ b/plugins/redshift/dbt/adapters/redshift/connections.py
@@ -14,7 +14,7 @@
from hologram.helpers import StrEnum
from dataclasses i... | {"golden_diff": "diff --git a/plugins/redshift/dbt/adapters/redshift/connections.py b/plugins/redshift/dbt/adapters/redshift/connections.py\n--- a/plugins/redshift/dbt/adapters/redshift/connections.py\n+++ b/plugins/redshift/dbt/adapters/redshift/connections.py\n@@ -14,7 +14,7 @@\n from hologram.helpers import StrEnum\... | 1,756 | 417 |
gh_patches_debug_27588 | rasdani/github-patches | git_diff | engnadeau__pybotics-412 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Flaky `test_fk()` results
- Fails occasionally due to a small difference in the x-component of the transform matrix
- https://ci.appveyor.com/project/nnadeau/pybotics/build/1.0.732/job/c9mmdfvctt9jasie
... | diff --git a/pybotics/predefined_models.py b/pybotics/predefined_models.py
--- a/pybotics/predefined_models.py
+++ b/pybotics/predefined_models.py
@@ -1,4 +1,5 @@
"""Predefined robot models."""
+from copy import deepcopy
from typing import Any
import numpy as np # type: ignore
@@ -25,7 +26,7 @@
def __init_... | {"golden_diff": "diff --git a/pybotics/predefined_models.py b/pybotics/predefined_models.py\n--- a/pybotics/predefined_models.py\n+++ b/pybotics/predefined_models.py\n@@ -1,4 +1,5 @@\n \"\"\"Predefined robot models.\"\"\"\n+from copy import deepcopy\n from typing import Any\n \n import numpy as np # type: ignore\n@@ -... | 1,682 | 369 |
gh_patches_debug_640 | rasdani/github-patches | git_diff | pex-tool__pex-1922 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.106
On the docket:
+ [x] Providing a direct reference to a wheel with a local version fails to resolve #1919
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or m... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = "2.1.105"
+__version__ = "2.1.106"
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.105\"\n+__version__ = \"2.1.106\"\n",... | 347 | 98 |
gh_patches_debug_20855 | rasdani/github-patches | git_diff | pydantic__pydantic-1328 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Configurable SecretStr
This issue revisits this comment https://github.com/samuelcolvin/pydantic/issues/462#issuecomment-480326378 by @tiangolo.
I think it would be a good idea that there is a standard way... | diff --git a/docs/examples/types_secret_types.py b/docs/examples/types_secret_types.py
--- a/docs/examples/types_secret_types.py
+++ b/docs/examples/types_secret_types.py
@@ -9,6 +9,7 @@
# Standard access methods will not display the secret
print(sm)
print(sm.password)
+print(sm.dict())
print(sm.json())
# Use ge... | {"golden_diff": "diff --git a/docs/examples/types_secret_types.py b/docs/examples/types_secret_types.py\n--- a/docs/examples/types_secret_types.py\n+++ b/docs/examples/types_secret_types.py\n@@ -9,6 +9,7 @@\n # Standard access methods will not display the secret\n print(sm)\n print(sm.password)\n+print(sm.dict())\n pri... | 761 | 307 |
gh_patches_debug_13660 | rasdani/github-patches | git_diff | Lightning-AI__pytorch-lightning-3042 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incorrect default cuda device when using single gpu other than cuda:0
## 🐛 Bug
The default `cuda` is not set properly to the `trainer.root_gpu` in single-GPU mode. The tensors created with `device='cuda'`... | diff --git a/pytorch_lightning/accelerators/gpu_backend.py b/pytorch_lightning/accelerators/gpu_backend.py
--- a/pytorch_lightning/accelerators/gpu_backend.py
+++ b/pytorch_lightning/accelerators/gpu_backend.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under... | {"golden_diff": "diff --git a/pytorch_lightning/accelerators/gpu_backend.py b/pytorch_lightning/accelerators/gpu_backend.py\n--- a/pytorch_lightning/accelerators/gpu_backend.py\n+++ b/pytorch_lightning/accelerators/gpu_backend.py\n@@ -12,6 +12,7 @@\n # See the License for the specific language governing permissions and... | 1,526 | 172 |
gh_patches_debug_6024 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-340 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SQLAlchemy executemany not detected in hooks
In the Django ORM integration, we record `executemany` calls as the `SQL/Many` operation, but this is missing in the SQLAlchemy integration.
--- END ISSUE ---
Be... | diff --git a/src/scout_apm/sqlalchemy.py b/src/scout_apm/sqlalchemy.py
--- a/src/scout_apm/sqlalchemy.py
+++ b/src/scout_apm/sqlalchemy.py
@@ -7,8 +7,12 @@
def before_cursor_execute(conn, cursor, statement, parameters, context, executemany):
+ if executemany:
+ operation = "SQL/Many"
+ else:
+ ... | {"golden_diff": "diff --git a/src/scout_apm/sqlalchemy.py b/src/scout_apm/sqlalchemy.py\n--- a/src/scout_apm/sqlalchemy.py\n+++ b/src/scout_apm/sqlalchemy.py\n@@ -7,8 +7,12 @@\n \n \n def before_cursor_execute(conn, cursor, statement, parameters, context, executemany):\n+ if executemany:\n+ operation = \"SQL/... | 598 | 148 |
gh_patches_debug_38250 | rasdani/github-patches | git_diff | DDMAL__CantusDB-536 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Certain Genre Detail pages are _very_ slow to load
I think the problem is trying to display the "chants by genre" table - for a genre with lots of example chants, e.g. [Antiphon](http://206.12.88.113/genre/12... | diff --git a/django/cantusdb_project/main_app/views/genre.py b/django/cantusdb_project/main_app/views/genre.py
--- a/django/cantusdb_project/main_app/views/genre.py
+++ b/django/cantusdb_project/main_app/views/genre.py
@@ -1,81 +1,13 @@
-from typing import Dict, List
-
-from django.views.generic import ListView
-from d... | {"golden_diff": "diff --git a/django/cantusdb_project/main_app/views/genre.py b/django/cantusdb_project/main_app/views/genre.py\n--- a/django/cantusdb_project/main_app/views/genre.py\n+++ b/django/cantusdb_project/main_app/views/genre.py\n@@ -1,81 +1,13 @@\n-from typing import Dict, List\n-\n-from django.views.generic ... | 1,315 | 865 |
gh_patches_debug_39013 | rasdani/github-patches | git_diff | pytorch__ignite-2091 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make `MetricsLambda` update it's underlying metrics
## 🚀 Feature
As title.
The current state is that we cannot use `MetricsLambda` as a standard metric because it doesn't update/reset it's underlying m... | diff --git a/ignite/metrics/metrics_lambda.py b/ignite/metrics/metrics_lambda.py
--- a/ignite/metrics/metrics_lambda.py
+++ b/ignite/metrics/metrics_lambda.py
@@ -15,9 +15,9 @@
The result of the new metric is defined to be the result
of applying the function to the result of argument metrics.
- When upda... | {"golden_diff": "diff --git a/ignite/metrics/metrics_lambda.py b/ignite/metrics/metrics_lambda.py\n--- a/ignite/metrics/metrics_lambda.py\n+++ b/ignite/metrics/metrics_lambda.py\n@@ -15,9 +15,9 @@\n The result of the new metric is defined to be the result\n of applying the function to the result of argument met... | 2,022 | 598 |
gh_patches_debug_15081 | rasdani/github-patches | git_diff | vispy__vispy-713 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement reusable GLSL functions for color space transformations
At least RGB <-> HSV. Put them in `vispy.visuals.glsl`.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or m... | diff --git a/vispy/visuals/glsl/color.py b/vispy/visuals/glsl/color.py
--- a/vispy/visuals/glsl/color.py
+++ b/vispy/visuals/glsl/color.py
@@ -38,3 +38,33 @@
return texture2D($colormap, vec2(x, .5)).rgb;
}
"""
+
+
+# -----------------------------------------------------------------------------
+# Color space tra... | {"golden_diff": "diff --git a/vispy/visuals/glsl/color.py b/vispy/visuals/glsl/color.py\n--- a/vispy/visuals/glsl/color.py\n+++ b/vispy/visuals/glsl/color.py\n@@ -38,3 +38,33 @@\n return texture2D($colormap, vec2(x, .5)).rgb;\n }\n \"\"\"\n+\n+\n+# -------------------------------------------------------------------... | 561 | 438 |
gh_patches_debug_39445 | rasdani/github-patches | git_diff | mampfes__hacs_waste_collection_schedule-1558 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Garden waste type to Cornwall, UK source
### I propose a feature for:
Sources
### Describe your wanted feature
Can you please add Garden to the cornwall_gov_uk.py source?
Change - COLLECTIONS = {"Ru... | diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/cornwall_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/cornwall_gov_uk.py
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/cornwall_gov_uk.py
+++ b/custo... | {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/cornwall_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/cornwall_gov_uk.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/cornwall_gov... | 1,278 | 782 |
gh_patches_debug_25618 | rasdani/github-patches | git_diff | fonttools__fonttools-2014 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove MacOS module in macCreatorType
utils.macCreatorType uses either the `xattr` module or the `MacOS` module to do its thing. But the MacOS module has been removed from Python 3.x. If we only support 3.x, ... | diff --git a/Lib/fontTools/misc/macCreatorType.py b/Lib/fontTools/misc/macCreatorType.py
--- a/Lib/fontTools/misc/macCreatorType.py
+++ b/Lib/fontTools/misc/macCreatorType.py
@@ -4,10 +4,6 @@
import xattr
except ImportError:
xattr = None
-try:
- import MacOS
-except ImportError:
- MacOS = None
def _reverseStr... | {"golden_diff": "diff --git a/Lib/fontTools/misc/macCreatorType.py b/Lib/fontTools/misc/macCreatorType.py\n--- a/Lib/fontTools/misc/macCreatorType.py\n+++ b/Lib/fontTools/misc/macCreatorType.py\n@@ -4,10 +4,6 @@\n \timport xattr\n except ImportError:\n \txattr = None\n-try:\n-\timport MacOS\n-except ImportError:\n-\tMa... | 1,017 | 378 |
gh_patches_debug_90 | rasdani/github-patches | git_diff | archlinux__archinstall-470 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PermissionError redeclared in exceptions.py shadows built-in PermissionError class
```
class PermissionError(BaseException):
pass
```
Can we remove this and just use the built-in? Or we could rename ou... | diff --git a/archinstall/lib/exceptions.py b/archinstall/lib/exceptions.py
--- a/archinstall/lib/exceptions.py
+++ b/archinstall/lib/exceptions.py
@@ -29,10 +29,6 @@
pass
-class PermissionError(BaseException):
- pass
-
-
class UserError(BaseException):
pass
| {"golden_diff": "diff --git a/archinstall/lib/exceptions.py b/archinstall/lib/exceptions.py\n--- a/archinstall/lib/exceptions.py\n+++ b/archinstall/lib/exceptions.py\n@@ -29,10 +29,6 @@\n \tpass\n \n \n-class PermissionError(BaseException):\n-\tpass\n-\n-\n class UserError(BaseException):\n \tpass\n", "issue": "Permiss... | 531 | 73 |
gh_patches_debug_26469 | rasdani/github-patches | git_diff | optuna__optuna-1074 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Apply lazy import for `optuna.dashboard`.
Optuna always imports the dependencies of `optuna.dashboard` (e.g., `bokeh`), which makes unnecessary overhead in many use cases. Similar to #334, we can apply lazy i... | diff --git a/optuna/__init__.py b/optuna/__init__.py
--- a/optuna/__init__.py
+++ b/optuna/__init__.py
@@ -1,4 +1,6 @@
-from optuna import dashboard # NOQA
+import importlib
+import types
+
from optuna import distributions # NOQA
from optuna import exceptions # NOQA
from optuna import importance # NOQA
@@ -20,3 ... | {"golden_diff": "diff --git a/optuna/__init__.py b/optuna/__init__.py\n--- a/optuna/__init__.py\n+++ b/optuna/__init__.py\n@@ -1,4 +1,6 @@\n-from optuna import dashboard # NOQA\n+import importlib\n+import types\n+\n from optuna import distributions # NOQA\n from optuna import exceptions # NOQA\n from optuna import i... | 583 | 435 |
gh_patches_debug_4624 | rasdani/github-patches | git_diff | conan-io__conan-2419 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
'install_folder' attribute is not always set
To reproduce, take https://github.com/memsharded/conan-hello example with one addition:
```python
def package(self):
print("self.source_folder:", se... | diff --git a/conans/client/packager.py b/conans/client/packager.py
--- a/conans/client/packager.py
+++ b/conans/client/packager.py
@@ -27,6 +27,7 @@
output.highlight("Calling package()")
conanfile.package_folder = package_folder
conanfile.source_folder = source_folder
+ conanfile.insta... | {"golden_diff": "diff --git a/conans/client/packager.py b/conans/client/packager.py\n--- a/conans/client/packager.py\n+++ b/conans/client/packager.py\n@@ -27,6 +27,7 @@\n output.highlight(\"Calling package()\")\n conanfile.package_folder = package_folder\n conanfile.source_folder = source_folder... | 1,614 | 110 |
gh_patches_debug_15615 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-2832 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hardcoded language ISO in instance info
This line of code
https://github.com/bookwyrm-social/bookwyrm/blob/290b74039297349693f4f139fa58659a19d1e1ac/bookwyrm/views/wellknown.py#L113
needs to be changed ... | diff --git a/bookwyrm/views/wellknown.py b/bookwyrm/views/wellknown.py
--- a/bookwyrm/views/wellknown.py
+++ b/bookwyrm/views/wellknown.py
@@ -9,7 +9,7 @@
from django.views.decorators.http import require_GET
from bookwyrm import models
-from bookwyrm.settings import DOMAIN, VERSION
+from bookwyrm.settings import DO... | {"golden_diff": "diff --git a/bookwyrm/views/wellknown.py b/bookwyrm/views/wellknown.py\n--- a/bookwyrm/views/wellknown.py\n+++ b/bookwyrm/views/wellknown.py\n@@ -9,7 +9,7 @@\n from django.views.decorators.http import require_GET\n \n from bookwyrm import models\n-from bookwyrm.settings import DOMAIN, VERSION\n+from bo... | 1,745 | 174 |
gh_patches_debug_19455 | rasdani/github-patches | git_diff | python__peps-2658 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Links on topic pages are broken
If you go to a page like https://peps.python.org/topic/packaging/ and try to click on any of the PEPs, you get a github 404, and the URL is ``https://peps.python.org/topic/pep-... | diff --git a/pep_sphinx_extensions/__init__.py b/pep_sphinx_extensions/__init__.py
--- a/pep_sphinx_extensions/__init__.py
+++ b/pep_sphinx_extensions/__init__.py
@@ -57,7 +57,7 @@
def _update_config_for_builder(app: Sphinx) -> None:
app.env.document_ids = {} # For PEPReferenceRoleTitleText
if app.builder.n... | {"golden_diff": "diff --git a/pep_sphinx_extensions/__init__.py b/pep_sphinx_extensions/__init__.py\n--- a/pep_sphinx_extensions/__init__.py\n+++ b/pep_sphinx_extensions/__init__.py\n@@ -57,7 +57,7 @@\n def _update_config_for_builder(app: Sphinx) -> None:\n app.env.document_ids = {} # For PEPReferenceRoleTitleText... | 1,500 | 269 |
gh_patches_debug_30969 | rasdani/github-patches | git_diff | opensearch-project__opensearch-build-1395 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[META] Automate artifact signing with OpensearchSignerClient for linux
### Is your feature request related to a problem? Please describe
Signing currently is a long painstaking process. It needs to be auto... | diff --git a/src/sign_workflow/signer.py b/src/sign_workflow/signer.py
--- a/src/sign_workflow/signer.py
+++ b/src/sign_workflow/signer.py
@@ -26,12 +26,15 @@
self.git_repo.execute("rm config.cfg")
def sign_artifact(self, artifact, basepath, signature_type):
+ if not self.is_valid_file_type(artif... | {"golden_diff": "diff --git a/src/sign_workflow/signer.py b/src/sign_workflow/signer.py\n--- a/src/sign_workflow/signer.py\n+++ b/src/sign_workflow/signer.py\n@@ -26,12 +26,15 @@\n self.git_repo.execute(\"rm config.cfg\")\n \n def sign_artifact(self, artifact, basepath, signature_type):\n+ if not sel... | 1,126 | 346 |
gh_patches_debug_40057 | rasdani/github-patches | git_diff | larq__larq-97 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support epoch level logging for QuantizedLogger
Currently this only work on a per batch bases and not with tensorboard using `update_freq="epoch"`
--- END ISSUE ---
Below are some code segments, each from a... | diff --git a/larq/callbacks.py b/larq/callbacks.py
--- a/larq/callbacks.py
+++ b/larq/callbacks.py
@@ -11,10 +11,7 @@
!!! example
```python
- callbacks = [
- QuantizationLogger(update_freq=100),
- tf.keras.callbacks.TensorBoard(update_freq=100),
- ]
+ callbacks... | {"golden_diff": "diff --git a/larq/callbacks.py b/larq/callbacks.py\n--- a/larq/callbacks.py\n+++ b/larq/callbacks.py\n@@ -11,10 +11,7 @@\n \n !!! example\n ```python\n- callbacks = [\n- QuantizationLogger(update_freq=100),\n- tf.keras.callbacks.TensorBoard(update_freq=100),\n- ... | 887 | 776 |
gh_patches_debug_11194 | rasdani/github-patches | git_diff | Textualize__textual-4266 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`Switch.action_toggle` name clash
Similar to #4214 `Switch` has an `action_toggle` method whose name and form clash with `DOMNode.action_toggle`.
--- END ISSUE ---
Below are some code segments, each from a ... | diff --git a/src/textual/widgets/_switch.py b/src/textual/widgets/_switch.py
--- a/src/textual/widgets/_switch.py
+++ b/src/textual/widgets/_switch.py
@@ -26,7 +26,7 @@
"""
BINDINGS: ClassVar[list[BindingType]] = [
- Binding("enter,space", "toggle", "Toggle", show=False),
+ Binding("enter,spac... | {"golden_diff": "diff --git a/src/textual/widgets/_switch.py b/src/textual/widgets/_switch.py\n--- a/src/textual/widgets/_switch.py\n+++ b/src/textual/widgets/_switch.py\n@@ -26,7 +26,7 @@\n \"\"\"\n \n BINDINGS: ClassVar[list[BindingType]] = [\n- Binding(\"enter,space\", \"toggle\", \"Toggle\", show=Fal... | 1,894 | 172 |
gh_patches_debug_9359 | rasdani/github-patches | git_diff | saleor__saleor-4919 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add description and deprecation support to filters
`FilterInputObjectType` doesn't provide a way to document fields. We could add two fields to the meta-class: `descriptions = {field: description}` and `depre... | diff --git a/saleor/graphql/core/types/filter_input.py b/saleor/graphql/core/types/filter_input.py
--- a/saleor/graphql/core/types/filter_input.py
+++ b/saleor/graphql/core/types/filter_input.py
@@ -58,7 +58,7 @@
field_type = convert_form_field(filter_field)
else:
field_ty... | {"golden_diff": "diff --git a/saleor/graphql/core/types/filter_input.py b/saleor/graphql/core/types/filter_input.py\n--- a/saleor/graphql/core/types/filter_input.py\n+++ b/saleor/graphql/core/types/filter_input.py\n@@ -58,7 +58,7 @@\n field_type = convert_form_field(filter_field)\n else:\n ... | 938 | 135 |
gh_patches_debug_15934 | rasdani/github-patches | git_diff | python-trio__trio-502 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
trio.Path.iterdir wrapping is broken
Given `pathlib.Path.iterdir` returns a generator that does IO access on each iteration, `trio.Path.iterdir` is currently broken given it currently only generates the gener... | diff --git a/trio/_path.py b/trio/_path.py
--- a/trio/_path.py
+++ b/trio/_path.py
@@ -128,6 +128,28 @@
self._wrapped = pathlib.Path(*args)
+ async def iterdir(self):
+ """
+ Like :meth:`pathlib.Path.iterdir`, but async.
+
+ This is an async method that returns a synchronous iterato... | {"golden_diff": "diff --git a/trio/_path.py b/trio/_path.py\n--- a/trio/_path.py\n+++ b/trio/_path.py\n@@ -128,6 +128,28 @@\n \n self._wrapped = pathlib.Path(*args)\n \n+ async def iterdir(self):\n+ \"\"\"\n+ Like :meth:`pathlib.Path.iterdir`, but async.\n+\n+ This is an async method tha... | 1,906 | 260 |
gh_patches_debug_15652 | rasdani/github-patches | git_diff | airctic__icevision-1058 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
getting_started_object_detection.ipynb fails after CentripetalNet support merge
## 🐛 Bug
**Describe the bug**
`getting_started_object_detection.ipynb` fails to run with the following error.
`AttributeEr... | diff --git a/icevision/models/mmdet/utils.py b/icevision/models/mmdet/utils.py
--- a/icevision/models/mmdet/utils.py
+++ b/icevision/models/mmdet/utils.py
@@ -6,6 +6,7 @@
"create_model_config",
]
+from numpy import False_
from icevision.imports import *
from icevision.utils import *
from icevision.backbones ... | {"golden_diff": "diff --git a/icevision/models/mmdet/utils.py b/icevision/models/mmdet/utils.py\n--- a/icevision/models/mmdet/utils.py\n+++ b/icevision/models/mmdet/utils.py\n@@ -6,6 +6,7 @@\n \"create_model_config\",\n ]\n \n+from numpy import False_\n from icevision.imports import *\n from icevision.utils import ... | 1,639 | 198 |
gh_patches_debug_32487 | rasdani/github-patches | git_diff | PlasmaPy__PlasmaPy-2730 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Expands examples in docstrings of `HarrisSheet` and its methods
Currently, the docstring for `HarrisSheet` ([permalink](https://github.com/PlasmaPy/PlasmaPy/blob/2c1ee2e74e86d9519d1a306a6f78413683ca9a02/src/p... | diff --git a/src/plasmapy/plasma/equilibria1d.py b/src/plasmapy/plasma/equilibria1d.py
--- a/src/plasmapy/plasma/equilibria1d.py
+++ b/src/plasmapy/plasma/equilibria1d.py
@@ -72,6 +72,18 @@
----------
y : `~astropy.units.Quantity`
Orthogonal distance from the current sheet center.
+
+ ... | {"golden_diff": "diff --git a/src/plasmapy/plasma/equilibria1d.py b/src/plasmapy/plasma/equilibria1d.py\n--- a/src/plasmapy/plasma/equilibria1d.py\n+++ b/src/plasmapy/plasma/equilibria1d.py\n@@ -72,6 +72,18 @@\n ----------\n y : `~astropy.units.Quantity`\n Orthogonal distance from the current... | 1,607 | 685 |
gh_patches_debug_26647 | rasdani/github-patches | git_diff | doccano__doccano-1989 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Proposal] Warn and/or fail if default admin's password hasn't been changed
Feature description
---------
Proposal: warn and/or fail if default `admin`'s password hasn't been changed.
--- END ISSUE ---
Be... | diff --git a/backend/api/management/commands/create_admin.py b/backend/api/management/commands/create_admin.py
--- a/backend/api/management/commands/create_admin.py
+++ b/backend/api/management/commands/create_admin.py
@@ -13,9 +13,17 @@
password = options.get("password")
username = options.get("usern... | {"golden_diff": "diff --git a/backend/api/management/commands/create_admin.py b/backend/api/management/commands/create_admin.py\n--- a/backend/api/management/commands/create_admin.py\n+++ b/backend/api/management/commands/create_admin.py\n@@ -13,9 +13,17 @@\n password = options.get(\"password\")\n usern... | 595 | 350 |
gh_patches_debug_21351 | rasdani/github-patches | git_diff | microsoft__ptvsd-343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Running program to completion now prints `Terminated` in the console window
* Python program contains `print("Hello world")`
* Debug the above code without any breakpoints
* I.e. let it run to completion
... | diff --git a/ptvsd/daemon.py b/ptvsd/daemon.py
--- a/ptvsd/daemon.py
+++ b/ptvsd/daemon.py
@@ -40,6 +40,7 @@
self.killonclose = killonclose
self._closed = False
+ self._exiting_via_atexit_handler = False
self._pydevd = None
self._server = None
@@ -124,6 +125,7 @@
de... | {"golden_diff": "diff --git a/ptvsd/daemon.py b/ptvsd/daemon.py\n--- a/ptvsd/daemon.py\n+++ b/ptvsd/daemon.py\n@@ -40,6 +40,7 @@\n self.killonclose = killonclose\n \n self._closed = False\n+ self._exiting_via_atexit_handler = False\n \n self._pydevd = None\n self._server = None\n@... | 2,024 | 247 |
gh_patches_debug_40653 | rasdani/github-patches | git_diff | crytic__slither-240 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improvements on solc-version detectors
The allowed version is out of date:
https://github.com/crytic/slither/blob/0891f9a8a5e5e096084476e4b2bd292c3685f251/slither/detectors/attributes/incorrect_solc.py#L39
... | diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py
--- a/slither/detectors/attributes/incorrect_solc.py
+++ b/slither/detectors/attributes/incorrect_solc.py
@@ -23,31 +23,43 @@
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassifi... | {"golden_diff": "diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py\n--- a/slither/detectors/attributes/incorrect_solc.py\n+++ b/slither/detectors/attributes/incorrect_solc.py\n@@ -23,31 +23,43 @@\n IMPACT = DetectorClassification.INFORMATIONAL\n CONFIDE... | 1,468 | 926 |
gh_patches_debug_5974 | rasdani/github-patches | git_diff | google__pytype-20 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
python -m pip install -U . doesn't work.
It ought to be possible to install pytype using pip by running
```
python -m pip install -U .
```
but doing so causes an error message.
--- END ISSUE ---
Below ar... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,8 @@
],
scripts=['scripts/pytype', 'scripts/pytd'],
package_data={'pytype': ['pytd/builtins/*',
- 'pytd/stdlib/*',
+ 'pytd/stdlib/os/*.pytd',
+ ... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -36,7 +36,8 @@\n ],\n scripts=['scripts/pytype', 'scripts/pytd'],\n package_data={'pytype': ['pytd/builtins/*',\n- 'pytd/stdlib/*',\n+ 'pytd/stdlib/os/*.pytd... | 668 | 119 |
gh_patches_debug_35793 | rasdani/github-patches | git_diff | CTPUG__wafer-221 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Duplicate page created
On https://wafertest.debconf.org, I created the following page: https://wafertest.debconf.org/debconf-16-bursaries-instructions, when my Wafer pages page loaded, I saw that there existe... | diff --git a/wafer/pages/admin.py b/wafer/pages/admin.py
--- a/wafer/pages/admin.py
+++ b/wafer/pages/admin.py
@@ -7,7 +7,8 @@
class PageAdmin(CompareVersionAdmin, admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
- list_display = ('name', 'slug', 'get_people_display_names', 'get_in_schedule')
+ ... | {"golden_diff": "diff --git a/wafer/pages/admin.py b/wafer/pages/admin.py\n--- a/wafer/pages/admin.py\n+++ b/wafer/pages/admin.py\n@@ -7,7 +7,8 @@\n \n class PageAdmin(CompareVersionAdmin, admin.ModelAdmin):\n prepopulated_fields = {\"slug\": (\"name\",)}\n- list_display = ('name', 'slug', 'get_people_display_na... | 1,499 | 557 |
gh_patches_debug_31451 | rasdani/github-patches | git_diff | getredash__redash-831 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Download DataSheets as Excel file.
Csv file with utf-8 is hard to use in excel. So I want to download data sheets as .xlsx file
--- END ISSUE ---
Below are some code segments, each from a relevant file. On... | diff --git a/redash/handlers/query_results.py b/redash/handlers/query_results.py
--- a/redash/handlers/query_results.py
+++ b/redash/handlers/query_results.py
@@ -5,7 +5,7 @@
from flask import make_response, request
from flask.ext.restful import abort
-
+import xlsxwriter
from redash import models, settings, utils... | {"golden_diff": "diff --git a/redash/handlers/query_results.py b/redash/handlers/query_results.py\n--- a/redash/handlers/query_results.py\n+++ b/redash/handlers/query_results.py\n@@ -5,7 +5,7 @@\n \n from flask import make_response, request\n from flask.ext.restful import abort\n-\n+import xlsxwriter\n from redash impo... | 1,933 | 436 |
gh_patches_debug_7804 | rasdani/github-patches | git_diff | apache__airflow-15207 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Specify that exit code -9 is due to RAM
Related to https://github.com/apache/airflow/issues/9655
It would be nice to add a message when you get this error with some info, like 'This probably is because a l... | diff --git a/airflow/task/task_runner/standard_task_runner.py b/airflow/task/task_runner/standard_task_runner.py
--- a/airflow/task/task_runner/standard_task_runner.py
+++ b/airflow/task/task_runner/standard_task_runner.py
@@ -121,3 +121,11 @@
if self._rc is None:
# Something else reaped it before... | {"golden_diff": "diff --git a/airflow/task/task_runner/standard_task_runner.py b/airflow/task/task_runner/standard_task_runner.py\n--- a/airflow/task/task_runner/standard_task_runner.py\n+++ b/airflow/task/task_runner/standard_task_runner.py\n@@ -121,3 +121,11 @@\n if self._rc is None:\n # Something... | 1,654 | 190 |
gh_patches_debug_14224 | rasdani/github-patches | git_diff | privacyidea__privacyidea-3176 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix recovery link in email
The email that is sent when resetting a password, contains a faulty link.
Currentlly `https://piserver/#/reset/...` is sent. It has to be `https://piserver/#!/reset/..`.
This ... | diff --git a/privacyidea/lib/passwordreset.py b/privacyidea/lib/passwordreset.py
--- a/privacyidea/lib/passwordreset.py
+++ b/privacyidea/lib/passwordreset.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
#
+# 2022-06-06 Cornelius Kölbel <cornelius.koelbel@netknights.it>
+# Fix recovery link
# 2015-01-06 Cor... | {"golden_diff": "diff --git a/privacyidea/lib/passwordreset.py b/privacyidea/lib/passwordreset.py\n--- a/privacyidea/lib/passwordreset.py\n+++ b/privacyidea/lib/passwordreset.py\n@@ -1,5 +1,7 @@\n # -*- coding: utf-8 -*-\n #\n+# 2022-06-06 Cornelius K\u00f6lbel <cornelius.koelbel@netknights.it>\n+# Fix rec... | 1,925 | 209 |
gh_patches_debug_1134 | rasdani/github-patches | git_diff | openstates__openstates-scrapers-2982 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OR failing since at least 2019-06-09
OR has been failing since 2019-06-09
Based on automated runs it appears that OR has not run successfully in 2 days (2019-06-09).
```
loaded Open States pupa settings.... | diff --git a/openstates/or/__init__.py b/openstates/or/__init__.py
--- a/openstates/or/__init__.py
+++ b/openstates/or/__init__.py
@@ -108,6 +108,7 @@
]
ignored_scraped_sessions = [
"Today",
+ "2019-2020 Interim",
"2017-2018 Interim",
"2015-2016 Interim",
"2013 1st S... | {"golden_diff": "diff --git a/openstates/or/__init__.py b/openstates/or/__init__.py\n--- a/openstates/or/__init__.py\n+++ b/openstates/or/__init__.py\n@@ -108,6 +108,7 @@\n ]\n ignored_scraped_sessions = [\n \"Today\",\n+ \"2019-2020 Interim\",\n \"2017-2018 Interim\",\n \"2015-20... | 1,987 | 123 |
gh_patches_debug_16048 | rasdani/github-patches | git_diff | pwndbg__pwndbg-473 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TypeError exception raised on up/down commands.
### Description
When running the command `up` or `down` with an integer argument, the following exception is raised:
```
Traceback (most recent call last... | diff --git a/pwndbg/commands/ida.py b/pwndbg/commands/ida.py
--- a/pwndbg/commands/ida.py
+++ b/pwndbg/commands/ida.py
@@ -43,10 +43,10 @@
"""
f = gdb.selected_frame()
- for i in range(n):
- o = f.older()
- if o:
- o.select()
+ for i in range(int(n)):
+ if f.older():
+ ... | {"golden_diff": "diff --git a/pwndbg/commands/ida.py b/pwndbg/commands/ida.py\n--- a/pwndbg/commands/ida.py\n+++ b/pwndbg/commands/ida.py\n@@ -43,10 +43,10 @@\n \"\"\"\n f = gdb.selected_frame()\n \n- for i in range(n):\n- o = f.older()\n- if o:\n- o.select()\n+ for i in range(int... | 1,666 | 250 |
gh_patches_debug_9390 | rasdani/github-patches | git_diff | pandas-dev__pandas-18844 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TST: make _skip_if into pytest decorators
- [X] _skip_if_32bit (#18693)
- [X] _skip_if_no_mpl (#18427)
- [X] _skip_if_mpl_1_5 (#18682)
- [x] _skip_if_no_scipy (#18794)
- [x] _skip_if_no_lzma (#18820)
- [... | diff --git a/pandas/conftest.py b/pandas/conftest.py
--- a/pandas/conftest.py
+++ b/pandas/conftest.py
@@ -3,7 +3,6 @@
from distutils.version import LooseVersion
import numpy
import pandas
-import pandas.util.testing as tm
import dateutil
@@ -51,7 +50,6 @@
@pytest.fixture(params=['bsr', 'coo', 'csc', 'csr', ... | {"golden_diff": "diff --git a/pandas/conftest.py b/pandas/conftest.py\n--- a/pandas/conftest.py\n+++ b/pandas/conftest.py\n@@ -3,7 +3,6 @@\n from distutils.version import LooseVersion\n import numpy\n import pandas\n-import pandas.util.testing as tm\n import dateutil\n \n \n@@ -51,7 +50,6 @@\n \n @pytest.fixture(params... | 1,398 | 148 |
gh_patches_debug_38130 | rasdani/github-patches | git_diff | modoboa__modoboa-726 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create alias with tag (+) in recipient address with internal domain
It's impossible to create new alias with tag in recipient address.
Example :
- I've contact@example.com mailbox
- I would like to create f... | diff --git a/modoboa/extensions/admin/forms/alias.py b/modoboa/extensions/admin/forms/alias.py
--- a/modoboa/extensions/admin/forms/alias.py
+++ b/modoboa/extensions/admin/forms/alias.py
@@ -96,31 +96,36 @@
raise BadRequest(
u"%s %s" % (_("Invalid mailbox"), v)
)
-... | {"golden_diff": "diff --git a/modoboa/extensions/admin/forms/alias.py b/modoboa/extensions/admin/forms/alias.py\n--- a/modoboa/extensions/admin/forms/alias.py\n+++ b/modoboa/extensions/admin/forms/alias.py\n@@ -96,31 +96,36 @@\n raise BadRequest(\n u\"%s %s\" % (_(\"Invalid mailbox\"... | 1,807 | 621 |
gh_patches_debug_1856 | rasdani/github-patches | git_diff | Kaggle__docker-python-1326 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
NameError: name 'io' is not defined
## 🐛 Bug
I am trying to run my scripts on GPU notebook, and I keep getting the following error.
```shell
Traceback (most recent call last):
File "/opt/conda/lib/... | diff --git a/patches/log.py b/patches/log.py
--- a/patches/log.py
+++ b/patches/log.py
@@ -1,3 +1,4 @@
+import io
import logging
import os
@@ -129,4 +130,4 @@
logging.basicConfig(level=logging.INFO, handlers=[handler])
Log._initialized = True
-Log._static_init()
\ No newline at end of file
+Log.... | {"golden_diff": "diff --git a/patches/log.py b/patches/log.py\n--- a/patches/log.py\n+++ b/patches/log.py\n@@ -1,3 +1,4 @@\n+import io\n import logging\n import os\n \n@@ -129,4 +130,4 @@\n logging.basicConfig(level=logging.INFO, handlers=[handler])\n Log._initialized = True\n \n-Log._static_init()\n\\ ... | 2,017 | 100 |
gh_patches_debug_14097 | rasdani/github-patches | git_diff | pretix__pretix-1443 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Required file question breaks validation on edit
Editing an order with a product with a required file question breaks when the customer tries to edit the order. In that case even if the customer already provi... | diff --git a/src/pretix/base/forms/widgets.py b/src/pretix/base/forms/widgets.py
--- a/src/pretix/base/forms/widgets.py
+++ b/src/pretix/base/forms/widgets.py
@@ -46,6 +46,14 @@
class UploadedFileWidget(forms.ClearableFileInput):
def __init__(self, *args, **kwargs):
+ # Browsers can't recognize that the ... | {"golden_diff": "diff --git a/src/pretix/base/forms/widgets.py b/src/pretix/base/forms/widgets.py\n--- a/src/pretix/base/forms/widgets.py\n+++ b/src/pretix/base/forms/widgets.py\n@@ -46,6 +46,14 @@\n \n class UploadedFileWidget(forms.ClearableFileInput):\n def __init__(self, *args, **kwargs):\n+ # Browsers c... | 1,933 | 214 |
gh_patches_debug_28274 | rasdani/github-patches | git_diff | certbot__certbot-427 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
nginxparser does not recognize 'if' statements
E.g., this is unparseable by nginxparser:
```
if ($http_origin ~* ^https://www\.example\.com) {
add_header Access-Control-Allow-Origin "$http_origin";
}... | diff --git a/letsencrypt_nginx/nginxparser.py b/letsencrypt_nginx/nginxparser.py
--- a/letsencrypt_nginx/nginxparser.py
+++ b/letsencrypt_nginx/nginxparser.py
@@ -3,7 +3,7 @@
from pyparsing import (
Literal, White, Word, alphanums, CharsNotIn, Forward, Group,
- Optional, OneOrMore, ZeroOrMore, pythonStyleCom... | {"golden_diff": "diff --git a/letsencrypt_nginx/nginxparser.py b/letsencrypt_nginx/nginxparser.py\n--- a/letsencrypt_nginx/nginxparser.py\n+++ b/letsencrypt_nginx/nginxparser.py\n@@ -3,7 +3,7 @@\n \n from pyparsing import (\n Literal, White, Word, alphanums, CharsNotIn, Forward, Group,\n- Optional, OneOrMore, Ze... | 1,501 | 399 |
gh_patches_debug_238 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-6117 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Warn new users about the lazy creation of connections (when requests are expected to be served in the script fully and only)
#### Problem Description
The [example script](https://docs.mitmproxy.org/stable/ad... | diff --git a/examples/addons/http-reply-from-proxy.py b/examples/addons/http-reply-from-proxy.py
--- a/examples/addons/http-reply-from-proxy.py
+++ b/examples/addons/http-reply-from-proxy.py
@@ -1,4 +1,4 @@
-"""Send a reply from the proxy without sending any data to the remote server."""
+"""Send a reply from the proxy... | {"golden_diff": "diff --git a/examples/addons/http-reply-from-proxy.py b/examples/addons/http-reply-from-proxy.py\n--- a/examples/addons/http-reply-from-proxy.py\n+++ b/examples/addons/http-reply-from-proxy.py\n@@ -1,4 +1,4 @@\n-\"\"\"Send a reply from the proxy without sending any data to the remote server.\"\"\"\n+\"... | 738 | 95 |
gh_patches_debug_65366 | rasdani/github-patches | git_diff | PaddlePaddle__models-399 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
使用 generate_sequence_by_rnn_lm 进行train的时候报错
在 generate_sequence_by_rnn_lm 这个模型下运行 train.py 的时候,当测试文件的路径不存在的时候会报错。错误的原因是把conf写成了config。错误行数是train.py 的112行
--- END ISSUE ---
Below are some code segments, each... | diff --git a/generate_sequence_by_rnn_lm/train.py b/generate_sequence_by_rnn_lm/train.py
--- a/generate_sequence_by_rnn_lm/train.py
+++ b/generate_sequence_by_rnn_lm/train.py
@@ -109,7 +109,7 @@
test_reader = paddle.batch(
paddle.reader.shuffle(
reader.rnn_reader(**reader_args), b... | {"golden_diff": "diff --git a/generate_sequence_by_rnn_lm/train.py b/generate_sequence_by_rnn_lm/train.py\n--- a/generate_sequence_by_rnn_lm/train.py\n+++ b/generate_sequence_by_rnn_lm/train.py\n@@ -109,7 +109,7 @@\n test_reader = paddle.batch(\n paddle.reader.shuffle(\n reader.rnn_r... | 1,550 | 113 |
gh_patches_debug_2394 | rasdani/github-patches | git_diff | pyca__cryptography-1530 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release Automation Fixes for Seventh Release
The release script is not properly waiting for the wheel job it starts to finish before downloading. This causes it to download previous releases and attempt to up... | diff --git a/tasks.py b/tasks.py
--- a/tasks.py
+++ b/tasks.py
@@ -17,6 +17,9 @@
def wait_for_build_completed(session):
+ # Wait 3 seconds before actually checking if the build is complete, to
+ # ensure that it had time to really start.
+ time.sleep(3)
while True:
response = session.get(
... | {"golden_diff": "diff --git a/tasks.py b/tasks.py\n--- a/tasks.py\n+++ b/tasks.py\n@@ -17,6 +17,9 @@\n \n \n def wait_for_build_completed(session):\n+ # Wait 3 seconds before actually checking if the build is complete, to\n+ # ensure that it had time to really start.\n+ time.sleep(3)\n while True:\n ... | 1,253 | 104 |
gh_patches_debug_59731 | rasdani/github-patches | git_diff | Textualize__textual-772 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Grid cell margin issue
Adding margin: 1 to the cells within this grid causes unexpected output:
<img width="752" alt="image" src="https://user-images.githubusercontent.com/5740731/190180955-3b10bd1f-60ca-4... | diff --git a/src/textual/layouts/grid.py b/src/textual/layouts/grid.py
--- a/src/textual/layouts/grid.py
+++ b/src/textual/layouts/grid.py
@@ -150,7 +150,7 @@
fraction_unit,
)
region = (
- Region(x, y, int(width), int(height))
+ Region(x, y, int(w... | {"golden_diff": "diff --git a/src/textual/layouts/grid.py b/src/textual/layouts/grid.py\n--- a/src/textual/layouts/grid.py\n+++ b/src/textual/layouts/grid.py\n@@ -150,7 +150,7 @@\n fraction_unit,\n )\n region = (\n- Region(x, y, int(width), int(height))\n+ ... | 2,043 | 108 |
gh_patches_debug_698 | rasdani/github-patches | git_diff | open-mmlab__mmdetection-6034 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing '**kwargs' parameters passing to imshow_bboxes() in show_result() of rpn.py
https://github.com/open-mmlab/mmdetection/blob/bde7b4b7eea9dd6ee91a486c6996b2d68662366d/mmdet/models/detectors/rpn.py#L155
... | diff --git a/mmdet/models/detectors/rpn.py b/mmdet/models/detectors/rpn.py
--- a/mmdet/models/detectors/rpn.py
+++ b/mmdet/models/detectors/rpn.py
@@ -152,4 +152,4 @@
Returns:
np.ndarray: The image with bboxes drawn on it.
"""
- mmcv.imshow_bboxes(data, result, top_k=top_k)
+ ... | {"golden_diff": "diff --git a/mmdet/models/detectors/rpn.py b/mmdet/models/detectors/rpn.py\n--- a/mmdet/models/detectors/rpn.py\n+++ b/mmdet/models/detectors/rpn.py\n@@ -152,4 +152,4 @@\n Returns:\n np.ndarray: The image with bboxes drawn on it.\n \"\"\"\n- mmcv.imshow_bboxes(data, r... | 2,039 | 119 |
gh_patches_debug_5207 | rasdani/github-patches | git_diff | pytorch__ignite-3219 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add python 3.12 to CI
## 🚀 Feature
Add python 3.12 to CI: https://github.com/pytorch/ignite/blob/master/.github/workflows/unit-tests.yml
--- END ISSUE ---
Below are some code segments, each from a rel... | diff --git a/examples/mnist/mnist.py b/examples/mnist/mnist.py
--- a/examples/mnist/mnist.py
+++ b/examples/mnist/mnist.py
@@ -96,7 +96,7 @@
@trainer.on(Events.EPOCH_COMPLETED | Events.COMPLETED)
def log_time(engine):
- tqdm.write(f"{trainer.last_event_name.name} took { trainer.state.times[trainer.la... | {"golden_diff": "diff --git a/examples/mnist/mnist.py b/examples/mnist/mnist.py\n--- a/examples/mnist/mnist.py\n+++ b/examples/mnist/mnist.py\n@@ -96,7 +96,7 @@\n \n @trainer.on(Events.EPOCH_COMPLETED | Events.COMPLETED)\n def log_time(engine):\n- tqdm.write(f\"{trainer.last_event_name.name} took { train... | 1,739 | 138 |
gh_patches_debug_61331 | rasdani/github-patches | git_diff | nerfstudio-project__nerfstudio-913 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
tanh instead of tan bug
Hi,
please change tanh (hyperbolic tan) to tan
https://github.com/nerfstudio-project/nerfstudio/blob/1a24f3e58c544bc0211563e770d425426284256c/nerfstudio/data/dataparsers/instant_n... | diff --git a/nerfstudio/data/dataparsers/instant_ngp_dataparser.py b/nerfstudio/data/dataparsers/instant_ngp_dataparser.py
--- a/nerfstudio/data/dataparsers/instant_ngp_dataparser.py
+++ b/nerfstudio/data/dataparsers/instant_ngp_dataparser.py
@@ -130,7 +130,7 @@
fl_x, fl_y = 0, 0
def fov_to_focal_le... | {"golden_diff": "diff --git a/nerfstudio/data/dataparsers/instant_ngp_dataparser.py b/nerfstudio/data/dataparsers/instant_ngp_dataparser.py\n--- a/nerfstudio/data/dataparsers/instant_ngp_dataparser.py\n+++ b/nerfstudio/data/dataparsers/instant_ngp_dataparser.py\n@@ -130,7 +130,7 @@\n fl_x, fl_y = 0, 0\n \n ... | 1,978 | 173 |
gh_patches_debug_20678 | rasdani/github-patches | git_diff | freqtrade__freqtrade-7571 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow freqai to pull prediction_models from user_data
Currently, only classes present in `freqai/prediction_models` are available for backtesting/trading.
Allowing the user to define a custom model to be use... | diff --git a/freqtrade/configuration/directory_operations.py b/freqtrade/configuration/directory_operations.py
--- a/freqtrade/configuration/directory_operations.py
+++ b/freqtrade/configuration/directory_operations.py
@@ -3,7 +3,8 @@
from pathlib import Path
from typing import Optional
-from freqtrade.constants im... | {"golden_diff": "diff --git a/freqtrade/configuration/directory_operations.py b/freqtrade/configuration/directory_operations.py\n--- a/freqtrade/configuration/directory_operations.py\n+++ b/freqtrade/configuration/directory_operations.py\n@@ -3,7 +3,8 @@\n from pathlib import Path\n from typing import Optional\n \n-fro... | 1,238 | 276 |
gh_patches_debug_1797 | rasdani/github-patches | git_diff | readthedocs__readthedocs.org-5346 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove all warnings from pytest
When running `tox` we see these warnings in the summary.
We should use `request` fixture and access to `request.config` instead.
Docs: https://docs.pytest.org/en/latest/f... | diff --git a/conftest.py b/conftest.py
--- a/conftest.py
+++ b/conftest.py
@@ -47,6 +47,12 @@
def settings_modification(settings):
settings.CELERY_ALWAYS_EAGER = True
+
@pytest.fixture
def api_client():
return APIClient()
+
+
+@pytest.fixture(scope="class")
+def url_scheme(request):
+ request.cls.url_... | {"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -47,6 +47,12 @@\n def settings_modification(settings):\n settings.CELERY_ALWAYS_EAGER = True\n \n+\n @pytest.fixture\n def api_client():\n return APIClient()\n+\n+\n+@pytest.fixture(scope=\"class\")\n+def url_schem... | 1,437 | 101 |
gh_patches_debug_22245 | rasdani/github-patches | git_diff | saulpw__visidata-543 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TSV file with column name "length" causes TypeError
**Small description**
Files in TSV format containing a column named `length` cannot be loaded.
**Expected result**
See content of TSV file.
**Actual... | diff --git a/visidata/utils.py b/visidata/utils.py
--- a/visidata/utils.py
+++ b/visidata/utils.py
@@ -70,17 +70,13 @@
def __init__(self, L=None, **kwargs):
if L is None:
- L = [None]*self.length()
- elif len(L) < self.length():
- L.extend([None]*(self.le... | {"golden_diff": "diff --git a/visidata/utils.py b/visidata/utils.py\n--- a/visidata/utils.py\n+++ b/visidata/utils.py\n@@ -70,17 +70,13 @@\n \n def __init__(self, L=None, **kwargs):\n if L is None:\n- L = [None]*self.length()\n- elif len(L) < self.length():\n- ... | 1,277 | 282 |
gh_patches_debug_8342 | rasdani/github-patches | git_diff | PaddlePaddle__models-799 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
policy_gradient 原理介绍部分内容格式存在问题
https://github.com/PaddlePaddle/models/tree/develop/fluid/policy_gradient
policy_gradient demo介绍部分,看起来格式存在问题,能辛苦调整下吗?或者以什么样的方式可以看到原始的文档呢? @wanghaoshuang @lcy-seso
--- END ... | diff --git a/fluid/policy_gradient/brain.py b/fluid/policy_gradient/brain.py
--- a/fluid/policy_gradient/brain.py
+++ b/fluid/policy_gradient/brain.py
@@ -45,7 +45,7 @@
label=acts) # this is negative log of chosen action
neg_log_prob_weight = fluid.layers.elementwise_mul(x=neg_log_prob, y=vt)
... | {"golden_diff": "diff --git a/fluid/policy_gradient/brain.py b/fluid/policy_gradient/brain.py\n--- a/fluid/policy_gradient/brain.py\n+++ b/fluid/policy_gradient/brain.py\n@@ -45,7 +45,7 @@\n label=acts) # this is negative log of chosen action\n neg_log_prob_weight = fluid.layers.elementwise_mul(x=n... | 1,364 | 148 |
gh_patches_debug_22549 | rasdani/github-patches | git_diff | psf__black-3543 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GitHub Action: Use action version as default Black version, instead of latest
> I'm alright with making the default Black version tied to the action version being used. For context `version` was introduced be... | diff --git a/action/main.py b/action/main.py
--- a/action/main.py
+++ b/action/main.py
@@ -22,12 +22,34 @@
extra_deps = "[colorama,jupyter]"
else:
extra_deps = "[colorama]"
-req = f"black{extra_deps}{version_specifier}"
+if version_specifier:
+ req = f"black{extra_deps}{version_specifier}"
+else:
+ des... | {"golden_diff": "diff --git a/action/main.py b/action/main.py\n--- a/action/main.py\n+++ b/action/main.py\n@@ -22,12 +22,34 @@\n extra_deps = \"[colorama,jupyter]\"\n else:\n extra_deps = \"[colorama]\"\n-req = f\"black{extra_deps}{version_specifier}\"\n+if version_specifier:\n+ req = f\"black{extra_deps}{ve... | 923 | 393 |
gh_patches_debug_27942 | rasdani/github-patches | git_diff | pyjanitor-devs__pyjanitor-461 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[DOC] API Documentation for Biology functions is not standardized
# Brief Description of Fix
<!-- Please describe the fix in terms of a "before" and "after". In other words, what's not so good about the cu... | diff --git a/janitor/biology.py b/janitor/biology.py
--- a/janitor/biology.py
+++ b/janitor/biology.py
@@ -18,7 +18,7 @@
@pf.register_dataframe_method
@deprecated_alias(col_name="column_name")
def join_fasta(
- df: pd.DataFrame, filename: str, id_col: str, column_name
+ df: pd.DataFrame, filename: str, id_col:... | {"golden_diff": "diff --git a/janitor/biology.py b/janitor/biology.py\n--- a/janitor/biology.py\n+++ b/janitor/biology.py\n@@ -18,7 +18,7 @@\n @pf.register_dataframe_method\n @deprecated_alias(col_name=\"column_name\")\n def join_fasta(\n- df: pd.DataFrame, filename: str, id_col: str, column_name\n+ df: pd.DataFr... | 1,632 | 392 |
gh_patches_debug_13931 | rasdani/github-patches | git_diff | sopel-irc__sopel-987 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
KeyError trying to reload a system module name
`KeyError: 'time' (file "/opt/rh/python33/root/usr/lib/python3.3/site-packages/sopel/modules/reload.py", line 62, in f_reload)` should be a sane error message
... | diff --git a/sopel/modules/reload.py b/sopel/modules/reload.py
--- a/sopel/modules/reload.py
+++ b/sopel/modules/reload.py
@@ -40,7 +40,7 @@
return bot.reply('done')
if name not in sys.modules:
- return bot.reply('%s: not loaded, try the `load` command' % name)
+ return bot.reply('"%s" not... | {"golden_diff": "diff --git a/sopel/modules/reload.py b/sopel/modules/reload.py\n--- a/sopel/modules/reload.py\n+++ b/sopel/modules/reload.py\n@@ -40,7 +40,7 @@\n return bot.reply('done')\n \n if name not in sys.modules:\n- return bot.reply('%s: not loaded, try the `load` command' % name)\n+ r... | 1,628 | 205 |
gh_patches_debug_33914 | rasdani/github-patches | git_diff | quantumlib__Cirq-853 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement equality for CircuitDag
Implement `__eq__` for CircuitDag using `networkx.is_isomorphic()`. Use the node_match argument of is_isomorphic: `node_match=lambda n: n.val`.
This may be useful for #83... | diff --git a/cirq/circuits/circuit_dag.py b/cirq/circuits/circuit_dag.py
--- a/cirq/circuits/circuit_dag.py
+++ b/cirq/circuits/circuit_dag.py
@@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from typing import Any, Callable, Generic, Iterator... | {"golden_diff": "diff --git a/cirq/circuits/circuit_dag.py b/cirq/circuits/circuit_dag.py\n--- a/cirq/circuits/circuit_dag.py\n+++ b/cirq/circuits/circuit_dag.py\n@@ -12,8 +12,9 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-from typing import Any, Cal... | 1,925 | 528 |
gh_patches_debug_10721 | rasdani/github-patches | git_diff | pypi__warehouse-3979 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
use CSP: sandbox on /simple/ pages
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox + https://www.youtube.com/watch?v=fbhW37JZtSA&feature=youtu.be
I believe this is... | diff --git a/warehouse/csp.py b/warehouse/csp.py
--- a/warehouse/csp.py
+++ b/warehouse/csp.py
@@ -34,6 +34,12 @@
except ValueError:
policy = collections.defaultdict(list)
+ # Replace CSP headers on /simple/ pages.
+ if request.path.startswith("/simple/"):
+ policy = col... | {"golden_diff": "diff --git a/warehouse/csp.py b/warehouse/csp.py\n--- a/warehouse/csp.py\n+++ b/warehouse/csp.py\n@@ -34,6 +34,12 @@\n except ValueError:\n policy = collections.defaultdict(list)\n \n+ # Replace CSP headers on /simple/ pages.\n+ if request.path.startswith(\"/simple/\")... | 1,215 | 153 |
gh_patches_debug_16614 | rasdani/github-patches | git_diff | inventree__InvenTree-4492 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Email settings not configured
### Deployment Method
- [ ] Installer
- [ ] Docker Development
- [X] Docker Production
- [ ] Bare metal Development
- [ ] Bare metal Production
- [ ] Digital Ocean image
- [ ] O... | diff --git a/InvenTree/InvenTree/status.py b/InvenTree/InvenTree/status.py
--- a/InvenTree/InvenTree/status.py
+++ b/InvenTree/InvenTree/status.py
@@ -61,19 +61,13 @@
if not settings.TESTING: # pragma: no cover
logger.debug("EMAIL_HOST is not configured")
- if not settings.EMAIL_HOST_USER:
-... | {"golden_diff": "diff --git a/InvenTree/InvenTree/status.py b/InvenTree/InvenTree/status.py\n--- a/InvenTree/InvenTree/status.py\n+++ b/InvenTree/InvenTree/status.py\n@@ -61,19 +61,13 @@\n if not settings.TESTING: # pragma: no cover\n logger.debug(\"EMAIL_HOST is not configured\")\n \n- if not s... | 1,531 | 277 |
gh_patches_debug_4837 | rasdani/github-patches | git_diff | kivy__python-for-android-2800 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python 3.10 cffi build fails
<!--
The issue tracker is a tool to address bugs NOT a support platform.
Please use the Discord community or Stack Overflow for support questions,
more information at https://g... | diff --git a/pythonforandroid/recipes/cffi/__init__.py b/pythonforandroid/recipes/cffi/__init__.py
--- a/pythonforandroid/recipes/cffi/__init__.py
+++ b/pythonforandroid/recipes/cffi/__init__.py
@@ -7,7 +7,7 @@
Extra system dependencies: autoconf, automake and libtool.
"""
name = 'cffi'
- version = '1... | {"golden_diff": "diff --git a/pythonforandroid/recipes/cffi/__init__.py b/pythonforandroid/recipes/cffi/__init__.py\n--- a/pythonforandroid/recipes/cffi/__init__.py\n+++ b/pythonforandroid/recipes/cffi/__init__.py\n@@ -7,7 +7,7 @@\n Extra system dependencies: autoconf, automake and libtool.\n \"\"\"\n name ... | 1,595 | 153 |
gh_patches_debug_25476 | rasdani/github-patches | git_diff | AnalogJ__lexicon-476 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TLDExtract Private Domains for Dynamic DNS Providers
Hello all,
I'm currently putting together the plugin for dynu.com (listed in NYI proiders).
As Dynu also acts as Dynamic DNS provider with several topl... | diff --git a/lexicon/client.py b/lexicon/client.py
--- a/lexicon/client.py
+++ b/lexicon/client.py
@@ -1,6 +1,7 @@
"""Main module of Lexicon. Defines the Client class, that holds all Lexicon logic."""
from __future__ import absolute_import
import importlib
+import os
import tldextract
@@ -10,6 +11,9 @@
leg... | {"golden_diff": "diff --git a/lexicon/client.py b/lexicon/client.py\n--- a/lexicon/client.py\n+++ b/lexicon/client.py\n@@ -1,6 +1,7 @@\n \"\"\"Main module of Lexicon. Defines the Client class, that holds all Lexicon logic.\"\"\"\n from __future__ import absolute_import\n import importlib\n+import os\n \n import tldextr... | 1,956 | 277 |
gh_patches_debug_3931 | rasdani/github-patches | git_diff | google__clusterfuzz-995 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Initialize issue_body_footer when reading issue tracker config
It seems like we forgot to add initialization of `issue_body_footer` in https://github.com/google/clusterfuzz/blob/dfe686cde7429ed0ba482b0b0b4f27... | diff --git a/src/appengine/libs/issue_management/issue_tracker_policy.py b/src/appengine/libs/issue_management/issue_tracker_policy.py
--- a/src/appengine/libs/issue_management/issue_tracker_policy.py
+++ b/src/appengine/libs/issue_management/issue_tracker_policy.py
@@ -126,6 +126,10 @@
if labels:
policy.la... | {"golden_diff": "diff --git a/src/appengine/libs/issue_management/issue_tracker_policy.py b/src/appengine/libs/issue_management/issue_tracker_policy.py\n--- a/src/appengine/libs/issue_management/issue_tracker_policy.py\n+++ b/src/appengine/libs/issue_management/issue_tracker_policy.py\n@@ -126,6 +126,10 @@\n if lab... | 1,989 | 146 |
gh_patches_debug_3903 | rasdani/github-patches | git_diff | archlinux__archinstall-1674 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
archinstall won't start due to TypeError
# Error
When I execute `archinstall` I get the following error:
```
...
File "/usr/lib/python3.10/site-packages/archinstall/lib/packages/packages.py", line 115, ... | diff --git a/archinstall/lib/packages/packages.py b/archinstall/lib/packages/packages.py
--- a/archinstall/lib/packages/packages.py
+++ b/archinstall/lib/packages/packages.py
@@ -1,3 +1,4 @@
+import dataclasses
import json
import ssl
from typing import Dict, Any, Tuple, List
@@ -112,4 +113,4 @@
except SysCallError... | {"golden_diff": "diff --git a/archinstall/lib/packages/packages.py b/archinstall/lib/packages/packages.py\n--- a/archinstall/lib/packages/packages.py\n+++ b/archinstall/lib/packages/packages.py\n@@ -1,3 +1,4 @@\n+import dataclasses\n import json\n import ssl\n from typing import Dict, Any, Tuple, List\n@@ -112,4 +113,4... | 1,728 | 122 |
gh_patches_debug_29273 | rasdani/github-patches | git_diff | digitalfabrik__integreat-cms-577 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Old permalinks not mapped in single page API endpoint
### Describe the Bug
<!-- A clear and concise description of what the bug is. -->
The permalink is checked for correctness in the single page API endpoi... | diff --git a/src/api/v3/single_page.py b/src/api/v3/single_page.py
--- a/src/api/v3/single_page.py
+++ b/src/api/v3/single_page.py
@@ -5,7 +5,7 @@
from django.http import JsonResponse, Http404
from django.shortcuts import get_object_or_404
-from cms.models import Region, Page
+from cms.models import Region
from .p... | {"golden_diff": "diff --git a/src/api/v3/single_page.py b/src/api/v3/single_page.py\n--- a/src/api/v3/single_page.py\n+++ b/src/api/v3/single_page.py\n@@ -5,7 +5,7 @@\n from django.http import JsonResponse, Http404\n from django.shortcuts import get_object_or_404\n \n-from cms.models import Region, Page\n+from cms.mode... | 1,050 | 366 |
gh_patches_debug_24049 | rasdani/github-patches | git_diff | mozilla__bugbug-140 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Print progress bar while downloading bugs
Similar to what we're doing for commits data: 28b83c12c29185c52afb58d94a533a9448969a8a.
--- END ISSUE ---
Below are some code segments, each from a relevant file. O... | diff --git a/bugbug/bugzilla.py b/bugbug/bugzilla.py
--- a/bugbug/bugzilla.py
+++ b/bugbug/bugzilla.py
@@ -8,6 +8,7 @@
import requests
from libmozdata import bugzilla
+from tqdm import tqdm
from bugbug import db
@@ -136,19 +137,17 @@
new_bug_ids = sorted(list(new_bug_ids))
- total_downloaded = 0
... | {"golden_diff": "diff --git a/bugbug/bugzilla.py b/bugbug/bugzilla.py\n--- a/bugbug/bugzilla.py\n+++ b/bugbug/bugzilla.py\n@@ -8,6 +8,7 @@\n \n import requests\n from libmozdata import bugzilla\n+from tqdm import tqdm\n \n from bugbug import db\n \n@@ -136,19 +137,17 @@\n \n new_bug_ids = sorted(list(new_bug_ids))\... | 1,897 | 421 |
gh_patches_debug_21571 | rasdani/github-patches | git_diff | e-valuation__EvaP-1805 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove sass + ts compilation from ./manage.py run
These slow down starting the development server.
For developers actually changing TS or SASS files, they are not helpful enough, and those will likely star... | diff --git a/evap/development/management/commands/run.py b/evap/development/management/commands/run.py
--- a/evap/development/management/commands/run.py
+++ b/evap/development/management/commands/run.py
@@ -1,4 +1,5 @@
import sys
+from subprocess import Popen # nosec
from django.core.management import execute_from... | {"golden_diff": "diff --git a/evap/development/management/commands/run.py b/evap/development/management/commands/run.py\n--- a/evap/development/management/commands/run.py\n+++ b/evap/development/management/commands/run.py\n@@ -1,4 +1,5 @@\n import sys\n+from subprocess import Popen # nosec\n \n from django.core.manage... | 562 | 381 |
gh_patches_debug_562 | rasdani/github-patches | git_diff | mabel-dev__opteryx-1641 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
🪲 Python 3.9 tests stalling
### Thank you for taking the time to report a problem with Opteryx.
_To help us to respond to your request we ask that you try to provide the below detail about the bug._
**De... | diff --git a/opteryx/__version__.py b/opteryx/__version__.py
--- a/opteryx/__version__.py
+++ b/opteryx/__version__.py
@@ -1,4 +1,4 @@
-__build__ = 477
+__build__ = 482
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
| {"golden_diff": "diff --git a/opteryx/__version__.py b/opteryx/__version__.py\n--- a/opteryx/__version__.py\n+++ b/opteryx/__version__.py\n@@ -1,4 +1,4 @@\n-__build__ = 477\n+__build__ = 482\n \n # Licensed under the Apache License, Version 2.0 (the \"License\");\n # you may not use this file except in compliance with ... | 779 | 101 |
gh_patches_debug_36740 | rasdani/github-patches | git_diff | plotly__dash-1970 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Dropdown: Selected options not showing when the `value` contains a comma
As [reported on the forum by @ marcus](https://community.plotly.com/t/dcc-dropdown-bug-suspected-please-confirm-or-correct-me/6... | diff --git a/components/dash-html-components/dash_html_components_base/__init__.py b/components/dash-html-components/dash_html_components_base/__init__.py
--- a/components/dash-html-components/dash_html_components_base/__init__.py
+++ b/components/dash-html-components/dash_html_components_base/__init__.py
@@ -33,27 +33... | {"golden_diff": "diff --git a/components/dash-html-components/dash_html_components_base/__init__.py b/components/dash-html-components/dash_html_components_base/__init__.py\n--- a/components/dash-html-components/dash_html_components_base/__init__.py\n+++ b/components/dash-html-components/dash_html_components_base/__init... | 1,468 | 764 |
gh_patches_debug_15670 | rasdani/github-patches | git_diff | Mailu__Mailu-1925 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Optimize Rainloop image
## Before you open your issue
- [X] Check if no issue or pull-request for this already exists.
- [X] Check [documentation](https://mailu.io/master/) and [FAQ](https://mailu.io/master... | diff --git a/webmails/rainloop/start.py b/webmails/rainloop/start.py
--- a/webmails/rainloop/start.py
+++ b/webmails/rainloop/start.py
@@ -19,12 +19,11 @@
os.makedirs(base + "domains", exist_ok=True)
os.makedirs(base + "configs", exist_ok=True)
-conf.jinja("/default.ini", os.environ, "/data/_data_/_default_/domains... | {"golden_diff": "diff --git a/webmails/rainloop/start.py b/webmails/rainloop/start.py\n--- a/webmails/rainloop/start.py\n+++ b/webmails/rainloop/start.py\n@@ -19,12 +19,11 @@\n os.makedirs(base + \"domains\", exist_ok=True)\n os.makedirs(base + \"configs\", exist_ok=True)\n \n-conf.jinja(\"/default.ini\", os.environ, \... | 942 | 315 |
gh_patches_debug_56203 | rasdani/github-patches | git_diff | pypi__warehouse-3130 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Change "Edit" to "Manage" in "Your Projects"
Change the button/link text "Edit" to "Manage" in "Your Projects".
From IRC conversation with @alanbato, @ewdurbin and @nlhkabu .
~~~
<EWDurbin> I think per... | diff --git a/warehouse/packaging/views.py b/warehouse/packaging/views.py
--- a/warehouse/packaging/views.py
+++ b/warehouse/packaging/views.py
@@ -132,7 +132,7 @@
@view_config(
route_name="includes.edit-project-button",
- renderer="includes/edit-project-button.html",
+ renderer="includes/manage-project-bu... | {"golden_diff": "diff --git a/warehouse/packaging/views.py b/warehouse/packaging/views.py\n--- a/warehouse/packaging/views.py\n+++ b/warehouse/packaging/views.py\n@@ -132,7 +132,7 @@\n \n @view_config(\n route_name=\"includes.edit-project-button\",\n- renderer=\"includes/edit-project-button.html\",\n+ rendere... | 2,012 | 99 |
gh_patches_debug_31146 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-2594 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
install.sh fails with empty secret_key on Mac OS Ventura
## Description
Mathesar fails to start because secret_key is empty in .env file after running `install.sh`. The script also fails due to that and st... | diff --git a/db/engine.py b/db/engine.py
--- a/db/engine.py
+++ b/db/engine.py
@@ -1,14 +1,11 @@
import copy
from sqlalchemy import create_engine as sa_create_engine
+from sqlalchemy.engine import URL
from db.types.custom.base import CUSTOM_DB_TYPE_TO_SA_CLASS
-def get_connection_string(username, password, h... | {"golden_diff": "diff --git a/db/engine.py b/db/engine.py\n--- a/db/engine.py\n+++ b/db/engine.py\n@@ -1,14 +1,11 @@\n import copy\n \n from sqlalchemy import create_engine as sa_create_engine\n+from sqlalchemy.engine import URL\n \n from db.types.custom.base import CUSTOM_DB_TYPE_TO_SA_CLASS\n \n \n-def get_connection... | 1,063 | 396 |
gh_patches_debug_33551 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-5443 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Counting Comments on map popup and list items (2 issues - similar problem in a+)
**URL:** https://meinberlin-dev.liqd.net/mapideas/2023-01031/ ; https://meinberlin-dev.liqd.net/projekte/testprojekt-newslette... | diff --git a/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py b/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py
--- a/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py
+++ b/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py
@@ -1,4 +1,7 @@
from django impo... | {"golden_diff": "diff --git a/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py b/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py\n--- a/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py\n+++ b/meinberlin/apps/projects/templatetags/meinberlin_project_tags.py\n@@ -1,4 +1,7 ... | 1,440 | 598 |
gh_patches_debug_30154 | rasdani/github-patches | git_diff | fal-ai__dbt-fal-190 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python script should be able to handle relative imports
I was trying execute a script using `fal`, it works fine when full code is in a single script but breaks down when I write down my script to different m... | diff --git a/src/fal/cli/fal_runner.py b/src/fal/cli/fal_runner.py
--- a/src/fal/cli/fal_runner.py
+++ b/src/fal/cli/fal_runner.py
@@ -1,5 +1,6 @@
import argparse
from typing import List
+from pathlib import Path
import os
import dbt.exceptions
@@ -105,7 +106,7 @@
model_scripts = model.get_scripts(ar... | {"golden_diff": "diff --git a/src/fal/cli/fal_runner.py b/src/fal/cli/fal_runner.py\n--- a/src/fal/cli/fal_runner.py\n+++ b/src/fal/cli/fal_runner.py\n@@ -1,5 +1,6 @@\n import argparse\n from typing import List\n+from pathlib import Path\n import os\n \n import dbt.exceptions\n@@ -105,7 +106,7 @@\n model_sc... | 1,985 | 370 |
gh_patches_debug_18860 | rasdani/github-patches | git_diff | Qiskit__qiskit-2755 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
inconsistency between CU1 and CU3 gate definitions
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea doe... | diff --git a/qiskit/extensions/standard/cu3.py b/qiskit/extensions/standard/cu3.py
--- a/qiskit/extensions/standard/cu3.py
+++ b/qiskit/extensions/standard/cu3.py
@@ -33,7 +33,7 @@
def _define(self):
"""
gate cu3(theta,phi,lambda) c, t
- { u1((lambda-phi)/2) t; cx c,t;
+ { u1((lambd... | {"golden_diff": "diff --git a/qiskit/extensions/standard/cu3.py b/qiskit/extensions/standard/cu3.py\n--- a/qiskit/extensions/standard/cu3.py\n+++ b/qiskit/extensions/standard/cu3.py\n@@ -33,7 +33,7 @@\n def _define(self):\n \"\"\"\n gate cu3(theta,phi,lambda) c, t\n- { u1((lambda-phi)/2) t; c... | 1,320 | 313 |
gh_patches_debug_251 | rasdani/github-patches | git_diff | pyjanitor-devs__pyjanitor-497 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[DOC] Clarify Python version requirements
# Brief Description of Fix
I was looking through documentation (for users and contributors), and it was unclear to me which python versions we actually support. It... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -15,4 +15,5 @@
url="https://github.com/ericmjl/pyjanitor",
packages=["janitor"],
install_requires=requirements(),
+ python_requires=">=3.6",
)
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -15,4 +15,5 @@\n url=\"https://github.com/ericmjl/pyjanitor\",\n packages=[\"janitor\"],\n install_requires=requirements(),\n+ python_requires=\">=3.6\",\n )\n", "issue": "[DOC] Clarify Python version requirements\n# Br... | 636 | 70 |
gh_patches_debug_16797 | rasdani/github-patches | git_diff | semgrep__semgrep-rules-1457 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
False positive for return-in-init when return in internal function
**Describe the bug**
[`return-in-init`](https://github.com/returntocorp/semgrep-rules/blob/master/python/lang/correctness/return-in-init.y... | diff --git a/python/lang/correctness/return-in-init.py b/python/lang/correctness/return-in-init.py
--- a/python/lang/correctness/return-in-init.py
+++ b/python/lang/correctness/return-in-init.py
@@ -75,3 +75,41 @@
def __init__(self, x):
# ok:return-in-init
return None
+
+class Odd:
+ def __ini... | {"golden_diff": "diff --git a/python/lang/correctness/return-in-init.py b/python/lang/correctness/return-in-init.py\n--- a/python/lang/correctness/return-in-init.py\n+++ b/python/lang/correctness/return-in-init.py\n@@ -75,3 +75,41 @@\n def __init__(self, x):\n # ok:return-in-init\n return None\n+\n+... | 992 | 334 |
gh_patches_debug_40443 | rasdani/github-patches | git_diff | DDMAL__CantusDB-1280 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
We need a new API that displays concordances information for all chants in the database
In an email from Jan:
> The intensive process of getting all the data from CD via individual json-cid requests (59.00... | diff --git a/django/cantusdb_project/main_app/management/commands/update_cached_concordances.py b/django/cantusdb_project/main_app/management/commands/update_cached_concordances.py
--- a/django/cantusdb_project/main_app/management/commands/update_cached_concordances.py
+++ b/django/cantusdb_project/main_app/management/... | {"golden_diff": "diff --git a/django/cantusdb_project/main_app/management/commands/update_cached_concordances.py b/django/cantusdb_project/main_app/management/commands/update_cached_concordances.py\n--- a/django/cantusdb_project/main_app/management/commands/update_cached_concordances.py\n+++ b/django/cantusdb_project/m... | 1,524 | 831 |
gh_patches_debug_1320 | rasdani/github-patches | git_diff | conda__conda-5124 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
export toposort for conda-build
export toposort for conda-build
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
... | diff --git a/conda/exports.py b/conda/exports.py
--- a/conda/exports.py
+++ b/conda/exports.py
@@ -30,6 +30,9 @@
from .gateways.connection import CondaSession # NOQA
CondaSession = CondaSession
+from .common.toposort import _toposort
+_toposort = _toposort
+
from .gateways.disk.link import lchmod # NOQA
lchmod ... | {"golden_diff": "diff --git a/conda/exports.py b/conda/exports.py\n--- a/conda/exports.py\n+++ b/conda/exports.py\n@@ -30,6 +30,9 @@\n from .gateways.connection import CondaSession # NOQA\n CondaSession = CondaSession\n \n+from .common.toposort import _toposort\n+_toposort = _toposort\n+\n from .gateways.disk.link imp... | 2,030 | 110 |
gh_patches_debug_1450 | rasdani/github-patches | git_diff | pyca__cryptography-3731 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
release infrastrucutre doesn't handle "out of order" releases
Specifically if we issue an `0.X` release, then an `0.X+1` release, and then we go to do an `0.X.1` release, the wheel automation won't work, sinc... | diff --git a/release.py b/release.py
--- a/release.py
+++ b/release.py
@@ -126,6 +126,7 @@
"{0}/build".format(JENKINS_URL),
params={
"token": token,
+ "BUILD_VERSION": version,
"cause": "Building wheels for {0}".format(version)
}
)
| {"golden_diff": "diff --git a/release.py b/release.py\n--- a/release.py\n+++ b/release.py\n@@ -126,6 +126,7 @@\n \"{0}/build\".format(JENKINS_URL),\n params={\n \"token\": token,\n+ \"BUILD_VERSION\": version,\n \"cause\": \"Building wheels for {0}\".format(version)\n ... | 1,590 | 82 |
gh_patches_debug_7406 | rasdani/github-patches | git_diff | interlegis__sapl-1191 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Integração do SAPL 3.1 e Portal Modelo
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sapl/base/templatet... | diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py
--- a/sapl/base/templatetags/common_tags.py
+++ b/sapl/base/templatetags/common_tags.py
@@ -117,6 +117,23 @@
except:
return ''
+@register.filter
+def has_iframe(request):
+
+ iframe = request.session.get('ifram... | {"golden_diff": "diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py\n--- a/sapl/base/templatetags/common_tags.py\n+++ b/sapl/base/templatetags/common_tags.py\n@@ -117,6 +117,23 @@\n except:\n return ''\n \n+@register.filter\n+def has_iframe(request):\n+\n+ iframe =... | 1,496 | 218 |
gh_patches_debug_29041 | rasdani/github-patches | git_diff | CTFd__CTFd-1699 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unnecessary ping event
**Environment**:
- CTFd Version/Commit: 3.1.1, latest commit
- Operating System: any
- Web Browser and Version: any
in the comment you said "Immediately yield a ping event to fo... | diff --git a/CTFd/utils/events/__init__.py b/CTFd/utils/events/__init__.py
--- a/CTFd/utils/events/__init__.py
+++ b/CTFd/utils/events/__init__.py
@@ -54,12 +54,11 @@
q = defaultdict(Queue)
self.clients[id(q)] = q
try:
+ # Immediately yield a ping event to force Response headers to... | {"golden_diff": "diff --git a/CTFd/utils/events/__init__.py b/CTFd/utils/events/__init__.py\n--- a/CTFd/utils/events/__init__.py\n+++ b/CTFd/utils/events/__init__.py\n@@ -54,12 +54,11 @@\n q = defaultdict(Queue)\n self.clients[id(q)] = q\n try:\n+ # Immediately yield a ping event to f... | 1,492 | 340 |
gh_patches_debug_971 | rasdani/github-patches | git_diff | docker__docker-py-1204 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issue with requests dependency
I found that commit 95d9306d2a1fd22dffb12a0548abf2d2f744ed9d excludes requests 2.11 for a bug that is fixed now on requests 2.11.1. And that's giving me a version conflict with ... | 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, < 2.11',
+ 'requests >= 2.5.2',
'six >= 1.4.0',
'websocket-client >= 0.32.0',
'docker-pycreds >= 0.2.1'
| {"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, < 2.11',\n+ 'requests >= 2.5.2',\n 'six >= 1.4.0',\n 'websocket-client >= 0.32.0',\n 'docker-pycreds >= 0.2.1'\n", "issu... | 993 | 112 |
gh_patches_debug_63551 | rasdani/github-patches | git_diff | falconry__falcon-602 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hoist HTTPStatus into falcon top-level namespace
I.e., add an import line to `falcon/__init__.py`
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may c... | diff --git a/falcon/__init__.py b/falcon/__init__.py
--- a/falcon/__init__.py
+++ b/falcon/__init__.py
@@ -34,6 +34,7 @@
from falcon.errors import * # NOQA
from falcon.redirects import * # NOQA
from falcon.http_error import HTTPError # NOQA
+from falcon.http_status import HTTPStatus # NOQA
from falcon.util impo... | {"golden_diff": "diff --git a/falcon/__init__.py b/falcon/__init__.py\n--- a/falcon/__init__.py\n+++ b/falcon/__init__.py\n@@ -34,6 +34,7 @@\n from falcon.errors import * # NOQA\n from falcon.redirects import * # NOQA\n from falcon.http_error import HTTPError # NOQA\n+from falcon.http_status import HTTPStatus # NOQ... | 692 | 136 |
gh_patches_debug_18108 | rasdani/github-patches | git_diff | projectmesa__mesa-1355 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
refactor: Remove dependency on jQuery
We should replace the `$(...)` with vanilla JS.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,7 @@
def ensure_JS_dep_single(url, out_name=None):
- # Used for downloading e.g. jQuery single file
+ # Used for downloading e.g. D3.js single file
if out_name is None:
out_name = url.split("/")[-1]
dst_path = os.p... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -51,7 +51,7 @@\n \n \n def ensure_JS_dep_single(url, out_name=None):\n- # Used for downloading e.g. jQuery single file\n+ # Used for downloading e.g. D3.js single file\n if out_name is None:\n out_name = url.split(\"... | 1,815 | 220 |
gh_patches_debug_22620 | rasdani/github-patches | git_diff | getnikola__nikola-1582 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build fails with IPython 3.0
Trying to use ipython notebooks with the current dev version of IPython (3.0.0) fails building with some warnings etc. because the `nbformat` interface has changed a little:
```
... | diff --git a/nikola/plugins/compile/ipynb/__init__.py b/nikola/plugins/compile/ipynb/__init__.py
--- a/nikola/plugins/compile/ipynb/__init__.py
+++ b/nikola/plugins/compile/ipynb/__init__.py
@@ -31,8 +31,15 @@
import os
try:
+ import IPython
from IPython.nbconvert.exporters import HTMLExporter
- from IPy... | {"golden_diff": "diff --git a/nikola/plugins/compile/ipynb/__init__.py b/nikola/plugins/compile/ipynb/__init__.py\n--- a/nikola/plugins/compile/ipynb/__init__.py\n+++ b/nikola/plugins/compile/ipynb/__init__.py\n@@ -31,8 +31,15 @@\n import os\n \n try:\n+ import IPython\n from IPython.nbconvert.exporters import H... | 1,405 | 316 |
gh_patches_debug_10289 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-5661 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Include crawl date in data
I'm looking at an old output directory, trying to workout which release it is.
I think we could add the crawl time and/or build id to the dataset attributes easily.
I think @r... | diff --git a/locations/exporters/geojson.py b/locations/exporters/geojson.py
--- a/locations/exporters/geojson.py
+++ b/locations/exporters/geojson.py
@@ -1,4 +1,5 @@
import base64
+import datetime
import hashlib
import io
import json
@@ -88,6 +89,7 @@
# See https://github.com/alltheplaces/alltheplaces/iss... | {"golden_diff": "diff --git a/locations/exporters/geojson.py b/locations/exporters/geojson.py\n--- a/locations/exporters/geojson.py\n+++ b/locations/exporters/geojson.py\n@@ -1,4 +1,5 @@\n import base64\n+import datetime\n import hashlib\n import io\n import json\n@@ -88,6 +89,7 @@\n # See https://github.com/al... | 1,818 | 154 |
gh_patches_debug_11428 | rasdani/github-patches | git_diff | saleor__saleor-11825 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: Unable to update Warehouse address
### What are you trying to achieve?
I'm trying to update the warehouse update, with the country set to "UK", according to addressValidationRules query, the required fi... | diff --git a/saleor/account/forms.py b/saleor/account/forms.py
--- a/saleor/account/forms.py
+++ b/saleor/account/forms.py
@@ -14,11 +14,9 @@
initial = {}
if country_code:
initial["phone"] = "+{}".format(country_code_for_region(country_code))
-
address_form_class = get_address_form_class(cou... | {"golden_diff": "diff --git a/saleor/account/forms.py b/saleor/account/forms.py\n--- a/saleor/account/forms.py\n+++ b/saleor/account/forms.py\n@@ -14,11 +14,9 @@\n initial = {}\n if country_code:\n initial[\"phone\"] = \"+{}\".format(country_code_for_region(country_code))\n-\n address_form_class... | 764 | 137 |
gh_patches_debug_19322 | rasdani/github-patches | git_diff | psf__black-3282 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support formatting Jupyter Notebooks in GitHub Actions
**Is your feature request related to a problem? Please describe.**
I'm trying to setup a GitHub Action that runs Black on a project that includes *.py... | diff --git a/action/main.py b/action/main.py
--- a/action/main.py
+++ b/action/main.py
@@ -9,6 +9,7 @@
ENV_BIN = ENV_PATH / ("Scripts" if sys.platform == "win32" else "bin")
OPTIONS = os.getenv("INPUT_OPTIONS", default="")
SRC = os.getenv("INPUT_SRC", default="")
+JUPYTER = os.getenv("INPUT_JUPYTER") == "true"
BLAC... | {"golden_diff": "diff --git a/action/main.py b/action/main.py\n--- a/action/main.py\n+++ b/action/main.py\n@@ -9,6 +9,7 @@\n ENV_BIN = ENV_PATH / (\"Scripts\" if sys.platform == \"win32\" else \"bin\")\n OPTIONS = os.getenv(\"INPUT_OPTIONS\", default=\"\")\n SRC = os.getenv(\"INPUT_SRC\", default=\"\")\n+JUPYTER = os.g... | 1,650 | 256 |
gh_patches_debug_57398 | rasdani/github-patches | git_diff | translate__pootle-5797 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pootle_fs not expiring cache_keys
When a project uses pootle FS, stats are not updated. We have to manually call `pootle flush_cache --lru --django-cache` to update it manually.
--- END ISSUE ---
Below are ... | diff --git a/pootle/apps/pootle_revision/receivers.py b/pootle/apps/pootle_revision/receivers.py
--- a/pootle/apps/pootle_revision/receivers.py
+++ b/pootle/apps/pootle_revision/receivers.py
@@ -23,10 +23,12 @@
@receiver(post_save, sender=Directory)
def handle_directory_save(**kwargs):
- if kwargs.get("created")... | {"golden_diff": "diff --git a/pootle/apps/pootle_revision/receivers.py b/pootle/apps/pootle_revision/receivers.py\n--- a/pootle/apps/pootle_revision/receivers.py\n+++ b/pootle/apps/pootle_revision/receivers.py\n@@ -23,10 +23,12 @@\n \n @receiver(post_save, sender=Directory)\n def handle_directory_save(**kwargs):\n- ... | 643 | 178 |
gh_patches_debug_61634 | rasdani/github-patches | git_diff | pytorch__ignite-484 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Metrics] add indexing synthetic sugar
Idea is to improve the current implementation of `Metric` and to be able to do the following:
```
# A custom class ConfusionMatrix
cm = ConfusionMatrix(num_classes=3,... | diff --git a/ignite/metrics/metric.py b/ignite/metrics/metric.py
--- a/ignite/metrics/metric.py
+++ b/ignite/metrics/metric.py
@@ -142,3 +142,7 @@
def wrapper(*args, **kwargs):
return MetricsLambda(fn, self, *args, **kwargs)
return wrapper
+
+ def __getitem__(self, index):
+ fro... | {"golden_diff": "diff --git a/ignite/metrics/metric.py b/ignite/metrics/metric.py\n--- a/ignite/metrics/metric.py\n+++ b/ignite/metrics/metric.py\n@@ -142,3 +142,7 @@\n def wrapper(*args, **kwargs):\n return MetricsLambda(fn, self, *args, **kwargs)\n return wrapper\n+\n+ def __getitem__(s... | 1,842 | 114 |
gh_patches_debug_27040 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-1005 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Imported ratings added as reviews
During a goodreads import, star ratings seem to be added as Reviews, rather than ReviewRatings
--- END ISSUE ---
Below are some code segments, each from a relevant file. On... | diff --git a/bookwyrm/importers/importer.py b/bookwyrm/importers/importer.py
--- a/bookwyrm/importers/importer.py
+++ b/bookwyrm/importers/importer.py
@@ -116,24 +116,33 @@
read.save()
if include_reviews and (item.rating or item.review):
- review_title = (
- "Review of {!r} on {!r}".fo... | {"golden_diff": "diff --git a/bookwyrm/importers/importer.py b/bookwyrm/importers/importer.py\n--- a/bookwyrm/importers/importer.py\n+++ b/bookwyrm/importers/importer.py\n@@ -116,24 +116,33 @@\n read.save()\n \n if include_reviews and (item.rating or item.review):\n- review_title = (\n- \"... | 1,566 | 380 |
gh_patches_debug_22233 | rasdani/github-patches | git_diff | statsmodels__statsmodels-4999 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[MAINT/CLN] remove function explicitly marked as duplicate
In the function docstring:
`duplicate: Skipper added sm.tools.drop_missing`
<b>update</b> The relevant function is not used outside this module; ... | diff --git a/statsmodels/tools/wrappers.py b/statsmodels/tools/wrappers.py
deleted file mode 100644
--- a/statsmodels/tools/wrappers.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-"""Convenience Wrappers
-
-Created on Sat Oct 30 14:56:35 2010
-
-Author: josef-pktd
-License: BSD
-"""
-
-import numpy as np
-... | {"golden_diff": "diff --git a/statsmodels/tools/wrappers.py b/statsmodels/tools/wrappers.py\ndeleted file mode 100644\n--- a/statsmodels/tools/wrappers.py\n+++ /dev/null\n@@ -1,52 +0,0 @@\n-# -*- coding: utf-8 -*-\n-\"\"\"Convenience Wrappers\n-\n-Created on Sat Oct 30 14:56:35 2010\n-\n-Author: josef-pktd\n-License: B... | 790 | 464 |
gh_patches_debug_4669 | rasdani/github-patches | git_diff | joke2k__faker-1441 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Change in Python 3.9.5 (and 3.8.10) causes Faker's list_module() to fail
* Faker version: 8.1.2
* OS: macOS 11.3.1
A [regression in Python](https://bugs.python.org/issue44061) breaks Faker, specifically [... | diff --git a/faker/utils/loading.py b/faker/utils/loading.py
--- a/faker/utils/loading.py
+++ b/faker/utils/loading.py
@@ -32,7 +32,7 @@
# PyInstaller
return [file.parent.name for file in Path(path).glob('*/__init__.py')]
else:
- return [name for _, name, is_pkg in pkgutil.iter_modules([pa... | {"golden_diff": "diff --git a/faker/utils/loading.py b/faker/utils/loading.py\n--- a/faker/utils/loading.py\n+++ b/faker/utils/loading.py\n@@ -32,7 +32,7 @@\n # PyInstaller\n return [file.parent.name for file in Path(path).glob('*/__init__.py')]\n else:\n- return [name for _, name, is_pkg in ... | 1,528 | 135 |
gh_patches_debug_14375 | rasdani/github-patches | git_diff | mabel-dev__opteryx-1467 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
🪲 Column Names not Aliased
**Sample Code/Statement** _If you can, please submit the SQL statement or Python code snippet, or a representative example using the sample datasets._
Example from user
~~~sq... | diff --git a/opteryx/operators/exit_node.py b/opteryx/operators/exit_node.py
--- a/opteryx/operators/exit_node.py
+++ b/opteryx/operators/exit_node.py
@@ -64,6 +64,14 @@
message=f"Query result contains multiple instances of the same column(s) - `{'`, `'.join(matches)}`"
)
+ if len... | {"golden_diff": "diff --git a/opteryx/operators/exit_node.py b/opteryx/operators/exit_node.py\n--- a/opteryx/operators/exit_node.py\n+++ b/opteryx/operators/exit_node.py\n@@ -64,6 +64,14 @@\n message=f\"Query result contains multiple instances of the same column(s) - `{'`, `'.join(matches)}`\"\n ... | 1,281 | 198 |
gh_patches_debug_26167 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-969 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Indent JSON data while exporting it as Python code
I was testing out a web API and used the "Export flow as Python code" feature for the first time as user, and noticed an improvement.
Currently we just expo... | diff --git a/mitmproxy/flow_export.py b/mitmproxy/flow_export.py
--- a/mitmproxy/flow_export.py
+++ b/mitmproxy/flow_export.py
@@ -1,7 +1,10 @@
+import json
import urllib
-import netlib.http
from textwrap import dedent
+import netlib.http
+from netlib.utils import parse_content_type
+
def curl_command(flow):
... | {"golden_diff": "diff --git a/mitmproxy/flow_export.py b/mitmproxy/flow_export.py\n--- a/mitmproxy/flow_export.py\n+++ b/mitmproxy/flow_export.py\n@@ -1,7 +1,10 @@\n+import json\n import urllib\n-import netlib.http\n from textwrap import dedent\n \n+import netlib.http\n+from netlib.utils import parse_content_type\n+\n ... | 982 | 408 |
gh_patches_debug_13045 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-2891 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
E2520 false positive for CloudWatch Alarm with expression
### CloudFormation Lint Version
0.80.3
### What operating system are you using?
MacOS
### Describe the bug
A valid CloudWatch alarm tha... | diff --git a/src/cfnlint/rules/resources/properties/Exclusive.py b/src/cfnlint/rules/resources/properties/Exclusive.py
--- a/src/cfnlint/rules/resources/properties/Exclusive.py
+++ b/src/cfnlint/rules/resources/properties/Exclusive.py
@@ -40,7 +40,7 @@
for prop in obj:
if p... | {"golden_diff": "diff --git a/src/cfnlint/rules/resources/properties/Exclusive.py b/src/cfnlint/rules/resources/properties/Exclusive.py\n--- a/src/cfnlint/rules/resources/properties/Exclusive.py\n+++ b/src/cfnlint/rules/resources/properties/Exclusive.py\n@@ -40,7 +40,7 @@\n for prop in obj:\n ... | 1,814 | 139 |
gh_patches_debug_252 | rasdani/github-patches | git_diff | google-deepmind__dm-haiku-48 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Jax version upgrade (AttributeError: CallPrimitive)
Using the current version of master 66f9c69 of Haiku, I am getting the following error on Colab
```
AttributeError Traceback (m... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -37,8 +37,8 @@
_VERSION = _get_version()
EXTRA_PACKAGES = {
- 'jax': ['jax>=0.1.55'],
- 'jaxlib': ['jaxlib>=0.1.37'],
+ 'jax': ['jax>=0.1.71'],
+ 'jaxlib': ['jaxlib>=0.1.49'],
}
setup(
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,8 +37,8 @@\n _VERSION = _get_version()\n \n EXTRA_PACKAGES = {\n- 'jax': ['jax>=0.1.55'],\n- 'jaxlib': ['jaxlib>=0.1.37'],\n+ 'jax': ['jax>=0.1.71'],\n+ 'jaxlib': ['jaxlib>=0.1.49'],\n }\n \n setup(\n", "issue": "Jax v... | 1,727 | 113 |
gh_patches_debug_3065 | rasdani/github-patches | git_diff | coala__coala-3348 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong doc string syntax in coalib.bearlib.aspects.Root
The doc string of the `Root` aspectclass has a formatting issue at https://github.com/coala/coala/blob/master/coalib/bearlib/aspects/__init__.py#L61
Y... | diff --git a/coalib/bearlib/aspects/__init__.py b/coalib/bearlib/aspects/__init__.py
--- a/coalib/bearlib/aspects/__init__.py
+++ b/coalib/bearlib/aspects/__init__.py
@@ -58,7 +58,8 @@
>>> LineLength('Python', max_line_length="100").tastes
{'max_line_length': 100}
- If no settings are given, the defaults... | {"golden_diff": "diff --git a/coalib/bearlib/aspects/__init__.py b/coalib/bearlib/aspects/__init__.py\n--- a/coalib/bearlib/aspects/__init__.py\n+++ b/coalib/bearlib/aspects/__init__.py\n@@ -58,7 +58,8 @@\n >>> LineLength('Python', max_line_length=\"100\").tastes\n {'max_line_length': 100}\n \n- If no settin... | 1,518 | 151 |
gh_patches_debug_17047 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-2079 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Skipped Baggage entries in propagation still count against max entries
The decrement operation should be moved after the last continue block if the over-long entry is truly skipped, otherwise this behavior sh... | diff --git a/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py b/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py
--- a/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py
+++ b/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py
@@ -54,9 +54,6 @@
... | {"golden_diff": "diff --git a/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py b/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py\n--- a/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py\n+++ b/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py\n@... | 1,429 | 221 |
gh_patches_debug_30793 | rasdani/github-patches | git_diff | ytdl-org__youtube-dl-28849 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Tver] Can`t download Fuji TV video
<!--
######################################################################
WARNING!
IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
##... | diff --git a/youtube_dl/extractor/tver.py b/youtube_dl/extractor/tver.py
--- a/youtube_dl/extractor/tver.py
+++ b/youtube_dl/extractor/tver.py
@@ -9,7 +9,6 @@
int_or_none,
remove_start,
smuggle_url,
- strip_or_none,
try_get,
)
@@ -45,32 +44,18 @@
query={'token': self._TOKEN})['mai... | {"golden_diff": "diff --git a/youtube_dl/extractor/tver.py b/youtube_dl/extractor/tver.py\n--- a/youtube_dl/extractor/tver.py\n+++ b/youtube_dl/extractor/tver.py\n@@ -9,7 +9,6 @@\n int_or_none,\n remove_start,\n smuggle_url,\n- strip_or_none,\n try_get,\n )\n \n@@ -45,32 +44,18 @@\n query... | 1,811 | 545 |
gh_patches_debug_3979 | rasdani/github-patches | git_diff | pyca__cryptography-1246 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Need binding to void GENERAL_NAMES_free(GENERAL_NAMES *)
the function call to d2i methods on the altSubjectName extension returned a dynamicly allocated memory object that must be garbage collected so bindin... | diff --git a/cryptography/hazmat/bindings/openssl/x509v3.py b/cryptography/hazmat/bindings/openssl/x509v3.py
--- a/cryptography/hazmat/bindings/openssl/x509v3.py
+++ b/cryptography/hazmat/bindings/openssl/x509v3.py
@@ -82,6 +82,7 @@
void X509V3_set_ctx(X509V3_CTX *, X509 *, X509 *, X509_REQ *, X509_CRL *, int);
X509_... | {"golden_diff": "diff --git a/cryptography/hazmat/bindings/openssl/x509v3.py b/cryptography/hazmat/bindings/openssl/x509v3.py\n--- a/cryptography/hazmat/bindings/openssl/x509v3.py\n+++ b/cryptography/hazmat/bindings/openssl/x509v3.py\n@@ -82,6 +82,7 @@\n void X509V3_set_ctx(X509V3_CTX *, X509 *, X509 *, X509_REQ *, X50... | 1,493 | 186 |
gh_patches_debug_5324 | rasdani/github-patches | git_diff | deepchecks__deepchecks-968 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[FEAT][CV] Add conditions to checks missing conditions
Some checks are missing conditions:
- [x] Heatmap
- [x] Image Drift
- [x] Train Test Drift
- [x] Robustness
--- END ISSUE ---
Below are some cod... | diff --git a/deepchecks/vision/suites/default_suites.py b/deepchecks/vision/suites/default_suites.py
--- a/deepchecks/vision/suites/default_suites.py
+++ b/deepchecks/vision/suites/default_suites.py
@@ -31,7 +31,7 @@
'Train Test Validation Suite',
HeatmapComparison(),
TrainTestLabelDrift(),
-... | {"golden_diff": "diff --git a/deepchecks/vision/suites/default_suites.py b/deepchecks/vision/suites/default_suites.py\n--- a/deepchecks/vision/suites/default_suites.py\n+++ b/deepchecks/vision/suites/default_suites.py\n@@ -31,7 +31,7 @@\n 'Train Test Validation Suite',\n HeatmapComparison(),\n T... | 908 | 143 |
gh_patches_debug_35089 | rasdani/github-patches | git_diff | aio-libs__aiohttp-2237 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'NoneType' object has no attribute 'errno'
## Long story short
Trying to resolve a domain which is an alias for another one, which does not have an A or CNAME record, raises AttributeError:... | diff --git a/aiohttp/resolver.py b/aiohttp/resolver.py
--- a/aiohttp/resolver.py
+++ b/aiohttp/resolver.py
@@ -60,31 +60,42 @@
if not hasattr(self._resolver, 'gethostbyname'):
# aiodns 1.1 is not available, fallback to DNSResolver.query
- self.resolve = self.resolve_with_query
+ ... | {"golden_diff": "diff --git a/aiohttp/resolver.py b/aiohttp/resolver.py\n--- a/aiohttp/resolver.py\n+++ b/aiohttp/resolver.py\n@@ -60,31 +60,42 @@\n \n if not hasattr(self._resolver, 'gethostbyname'):\n # aiodns 1.1 is not available, fallback to DNSResolver.query\n- self.resolve = self.re... | 1,740 | 525 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.