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_41534 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-8855 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[CT-3107] [Bug] nested dependencies not installed when package is a tarball
### Is this a new bug in dbt-core?
- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and ... | diff --git a/core/dbt/deps/tarball.py b/core/dbt/deps/tarball.py
--- a/core/dbt/deps/tarball.py
+++ b/core/dbt/deps/tarball.py
@@ -1,7 +1,14 @@
+import functools
+import os
+from pathlib import Path
from typing import Dict
-from dbt.contracts.project import RegistryPackageMetadata, TarballPackage
-from dbt.deps.base... | {"golden_diff": "diff --git a/core/dbt/deps/tarball.py b/core/dbt/deps/tarball.py\n--- a/core/dbt/deps/tarball.py\n+++ b/core/dbt/deps/tarball.py\n@@ -1,7 +1,14 @@\n+import functools\n+import os\n+from pathlib import Path\n from typing import Dict\n \n-from dbt.contracts.project import RegistryPackageMetadata, TarballP... | 1,732 | 944 |
gh_patches_debug_27699 | rasdani/github-patches | git_diff | cowrie__cowrie-638 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
csirtg plugin no longer working
I'm not sure exactly when this happened, but just happend to check the logs today, and noticed the csirtg plugin has some errors.
```
2017-11-02T17:05:41-0400 [cowrie.telne... | diff --git a/cowrie/output/csirtg.py b/cowrie/output/csirtg.py
--- a/cowrie/output/csirtg.py
+++ b/cowrie/output/csirtg.py
@@ -7,8 +7,7 @@
from datetime import datetime
import logging
import os
-
-logger = logging.getLogger(__name__)
+from twisted.python import log
USERNAME = os.environ.get('CSIRTG_USER')
FEED =... | {"golden_diff": "diff --git a/cowrie/output/csirtg.py b/cowrie/output/csirtg.py\n--- a/cowrie/output/csirtg.py\n+++ b/cowrie/output/csirtg.py\n@@ -7,8 +7,7 @@\n from datetime import datetime\n import logging\n import os\n-\n-logger = logging.getLogger(__name__)\n+from twisted.python import log\n \n USERNAME = os.enviro... | 1,759 | 326 |
gh_patches_debug_26662 | rasdani/github-patches | git_diff | chainer__chainer-903 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Stream object should have .ptr set to 0, not None.
The event object expects the stream.ptr to be an integer (size_t) here:
https://github.com/pfnet/chainer/blob/master/cupy/cuda/stream.py#L56
https://github.c... | diff --git a/cupy/cuda/stream.py b/cupy/cuda/stream.py
--- a/cupy/cuda/stream.py
+++ b/cupy/cuda/stream.py
@@ -22,7 +22,7 @@
"""
def __init__(self, block=False, disable_timing=False, interprocess=False):
- self.ptr = None
+ self.ptr = 0
if interprocess and not disable_timing:
... | {"golden_diff": "diff --git a/cupy/cuda/stream.py b/cupy/cuda/stream.py\n--- a/cupy/cuda/stream.py\n+++ b/cupy/cuda/stream.py\n@@ -22,7 +22,7 @@\n \n \"\"\"\n def __init__(self, block=False, disable_timing=False, interprocess=False):\n- self.ptr = None\n+ self.ptr = 0\n \n if interprocess ... | 1,995 | 272 |
gh_patches_debug_18933 | rasdani/github-patches | git_diff | Qiskit__qiskit-1720 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BackendConfiguration fails validation if backend supports pulse
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### ... | diff --git a/qiskit/providers/models/backendconfiguration.py b/qiskit/providers/models/backendconfiguration.py
--- a/qiskit/providers/models/backendconfiguration.py
+++ b/qiskit/providers/models/backendconfiguration.py
@@ -7,7 +7,7 @@
"""Model and schema for backend configuration."""
-from marshmallow.validate imp... | {"golden_diff": "diff --git a/qiskit/providers/models/backendconfiguration.py b/qiskit/providers/models/backendconfiguration.py\n--- a/qiskit/providers/models/backendconfiguration.py\n+++ b/qiskit/providers/models/backendconfiguration.py\n@@ -7,7 +7,7 @@\n \n \"\"\"Model and schema for backend configuration.\"\"\"\n \n... | 1,745 | 209 |
gh_patches_debug_23149 | rasdani/github-patches | git_diff | frappe__frappe-26301 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typing validations should be ignored for tests
## Description of the issue
https://github.com/frappe/frappe/blob/010aa4636ace30a9df4c09f0ca991169f34274b9/frappe/utils/typing_validations.py#L164
If you're ... | diff --git a/frappe/utils/typing_validations.py b/frappe/utils/typing_validations.py
--- a/frappe/utils/typing_validations.py
+++ b/frappe/utils/typing_validations.py
@@ -3,6 +3,7 @@
from inspect import _empty, isclass, signature
from types import EllipsisType
from typing import ForwardRef, TypeVar, Union
+from unit... | {"golden_diff": "diff --git a/frappe/utils/typing_validations.py b/frappe/utils/typing_validations.py\n--- a/frappe/utils/typing_validations.py\n+++ b/frappe/utils/typing_validations.py\n@@ -3,6 +3,7 @@\n from inspect import _empty, isclass, signature\n from types import EllipsisType\n from typing import ForwardRef, Ty... | 2,006 | 251 |
gh_patches_debug_16021 | rasdani/github-patches | git_diff | wagtail__wagtail-8270 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ThumbnailMixin does not display in header the value defined under thumb_col_header_text
<!--
Found a bug? Please fill out the sections below. 👍
-->
### Issue Summary
When adding ThumbnailMixin to a ... | diff --git a/wagtail/contrib/modeladmin/mixins.py b/wagtail/contrib/modeladmin/mixins.py
--- a/wagtail/contrib/modeladmin/mixins.py
+++ b/wagtail/contrib/modeladmin/mixins.py
@@ -25,6 +25,7 @@
"The `wagtail.images` app must be installed in order "
"to use the `ThumbnailMixin` class."
... | {"golden_diff": "diff --git a/wagtail/contrib/modeladmin/mixins.py b/wagtail/contrib/modeladmin/mixins.py\n--- a/wagtail/contrib/modeladmin/mixins.py\n+++ b/wagtail/contrib/modeladmin/mixins.py\n@@ -25,6 +25,7 @@\n \"The `wagtail.images` app must be installed in order \"\n \"to use the `... | 1,307 | 197 |
gh_patches_debug_39253 | rasdani/github-patches | git_diff | lightly-ai__lightly-1531 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in `GatherLayer.backward`
Hi,
We've been implementing a model at [cellarium-ml](https://github.com/cellarium-ai/cellarium-ml) using your `NTXentLoss`. Comparing the model training with a single GPU and... | diff --git a/lightly/utils/dist.py b/lightly/utils/dist.py
--- a/lightly/utils/dist.py
+++ b/lightly/utils/dist.py
@@ -1,29 +1,29 @@
-from typing import Optional, Tuple
+from typing import Any, Callable, Optional, Tuple, TypeVar
import torch
import torch.distributed as dist
+from torch.autograd.function import Func... | {"golden_diff": "diff --git a/lightly/utils/dist.py b/lightly/utils/dist.py\n--- a/lightly/utils/dist.py\n+++ b/lightly/utils/dist.py\n@@ -1,29 +1,29 @@\n-from typing import Optional, Tuple\n+from typing import Any, Callable, Optional, Tuple, TypeVar\n \n import torch\n import torch.distributed as dist\n+from torch.aut... | 1,415 | 723 |
gh_patches_debug_23382 | rasdani/github-patches | git_diff | coala__coala-1290 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`DocstyleDefinition`: Accept a single marker set also
Via the normal constructor or a class method.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may... | diff --git a/coalib/bearlib/languages/documentation/DocstyleDefinition.py b/coalib/bearlib/languages/documentation/DocstyleDefinition.py
--- a/coalib/bearlib/languages/documentation/DocstyleDefinition.py
+++ b/coalib/bearlib/languages/documentation/DocstyleDefinition.py
@@ -23,12 +23,19 @@
`"P... | {"golden_diff": "diff --git a/coalib/bearlib/languages/documentation/DocstyleDefinition.py b/coalib/bearlib/languages/documentation/DocstyleDefinition.py\n--- a/coalib/bearlib/languages/documentation/DocstyleDefinition.py\n+++ b/coalib/bearlib/languages/documentation/DocstyleDefinition.py\n@@ -23,12 +23,19 @@\n ... | 1,632 | 284 |
gh_patches_debug_4297 | rasdani/github-patches | git_diff | NVIDIA-Merlin__NVTabular-1312 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Getting error when loading the TF4Rec PyTorch model to the TIS
**Describe the bug**
I am getting the following error when I load a trained TF4Rec PyTorch to TIS:
```
| t4r_pytorch_pt | 1 |... | diff --git a/nvtabular/inference/triton/__init__.py b/nvtabular/inference/triton/__init__.py
--- a/nvtabular/inference/triton/__init__.py
+++ b/nvtabular/inference/triton/__init__.py
@@ -25,6 +25,7 @@
from nvtabular.dispatch import _is_list_dtype, _is_string_dtype, _make_df # noqa
from nvtabular.inference.triton.e... | {"golden_diff": "diff --git a/nvtabular/inference/triton/__init__.py b/nvtabular/inference/triton/__init__.py\n--- a/nvtabular/inference/triton/__init__.py\n+++ b/nvtabular/inference/triton/__init__.py\n@@ -25,6 +25,7 @@\n \n from nvtabular.dispatch import _is_list_dtype, _is_string_dtype, _make_df # noqa\n from nvtab... | 1,744 | 145 |
gh_patches_debug_28929 | rasdani/github-patches | git_diff | iterative__dvc-7729 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dvc list: Error on empty directory.
# Bug Report
Got error message on an empty directory, shouldn't it show nothing? like ls command.
<!--
## Issue name
Issue names must follow the pattern `comma... | diff --git a/dvc/repo/ls.py b/dvc/repo/ls.py
--- a/dvc/repo/ls.py
+++ b/dvc/repo/ls.py
@@ -1,10 +1,22 @@
import os
from itertools import chain
+from typing import TYPE_CHECKING, Optional
from dvc.exceptions import PathMissingError
+if TYPE_CHECKING:
+ from dvc.fs.repo import RepoFileSystem
-def ls(url, path... | {"golden_diff": "diff --git a/dvc/repo/ls.py b/dvc/repo/ls.py\n--- a/dvc/repo/ls.py\n+++ b/dvc/repo/ls.py\n@@ -1,10 +1,22 @@\n import os\n from itertools import chain\n+from typing import TYPE_CHECKING, Optional\n \n from dvc.exceptions import PathMissingError\n \n+if TYPE_CHECKING:\n+ from dvc.fs.repo import RepoFi... | 1,662 | 448 |
gh_patches_debug_14771 | rasdani/github-patches | git_diff | litestar-org__litestar-992 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: Running `starlite run` after installing starlite[cli] gives error about missing cryptography package
The error is here:
```
Traceback (most recent call last):
File "C:\Users\hanne\Documents\Programm... | diff --git a/starlite/middleware/session/__init__.py b/starlite/middleware/session/__init__.py
--- a/starlite/middleware/session/__init__.py
+++ b/starlite/middleware/session/__init__.py
@@ -1,9 +1,27 @@
+from typing import Any
+
+from starlite.utils import warn_deprecation
+
from .base import SessionMiddleware
-from ... | {"golden_diff": "diff --git a/starlite/middleware/session/__init__.py b/starlite/middleware/session/__init__.py\n--- a/starlite/middleware/session/__init__.py\n+++ b/starlite/middleware/session/__init__.py\n@@ -1,9 +1,27 @@\n+from typing import Any\n+\n+from starlite.utils import warn_deprecation\n+\n from .base import... | 848 | 296 |
gh_patches_debug_19426 | rasdani/github-patches | git_diff | nautobot__nautobot-975 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`::1/128` is not a valid prefix
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nauto... | diff --git a/nautobot/ipam/fields.py b/nautobot/ipam/fields.py
--- a/nautobot/ipam/fields.py
+++ b/nautobot/ipam/fields.py
@@ -39,12 +39,17 @@
Parse `str`, `bytes` (varbinary), or `netaddr.IPAddress to `netaddr.IPAddress`.
"""
try:
- value = int.from_bytes(value, "big")
+ ... | {"golden_diff": "diff --git a/nautobot/ipam/fields.py b/nautobot/ipam/fields.py\n--- a/nautobot/ipam/fields.py\n+++ b/nautobot/ipam/fields.py\n@@ -39,12 +39,17 @@\n Parse `str`, `bytes` (varbinary), or `netaddr.IPAddress to `netaddr.IPAddress`.\n \"\"\"\n try:\n- value = int.from_byte... | 1,382 | 327 |
gh_patches_debug_5419 | rasdani/github-patches | git_diff | scrapy__scrapy-475 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ability to not send specific headers in HTTP requests
Some web servers behave differently when they are receive or don't receive specific headers.
For example FeedBurner (http://feeds.feedburner.com/someblog... | diff --git a/scrapy/http/headers.py b/scrapy/http/headers.py
--- a/scrapy/http/headers.py
+++ b/scrapy/http/headers.py
@@ -17,7 +17,9 @@
def normvalue(self, value):
"""Headers must not be unicode"""
- if not hasattr(value, '__iter__'):
+ if value is None:
+ value = []
+ e... | {"golden_diff": "diff --git a/scrapy/http/headers.py b/scrapy/http/headers.py\n--- a/scrapy/http/headers.py\n+++ b/scrapy/http/headers.py\n@@ -17,7 +17,9 @@\n \n def normvalue(self, value):\n \"\"\"Headers must not be unicode\"\"\"\n- if not hasattr(value, '__iter__'):\n+ if value is None:\n+ ... | 1,040 | 128 |
gh_patches_debug_6813 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-436 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make master exist when there are no tasks left.
Currently, master exists when there are no tasks left AND all workers are gone. It might left hanging if a worker got preempted.
--- END ISSUE ---
Below are s... | diff --git a/elasticdl/python/elasticdl/master/main.py b/elasticdl/python/elasticdl/master/main.py
--- a/elasticdl/python/elasticdl/master/main.py
+++ b/elasticdl/python/elasticdl/master/main.py
@@ -163,13 +163,7 @@
if args.num_worker:
# TODO: worker_manager.remove_workers supports synchronized call
... | {"golden_diff": "diff --git a/elasticdl/python/elasticdl/master/main.py b/elasticdl/python/elasticdl/master/main.py\n--- a/elasticdl/python/elasticdl/master/main.py\n+++ b/elasticdl/python/elasticdl/master/main.py\n@@ -163,13 +163,7 @@\n if args.num_worker:\n # TODO: worker_manager.remove_workers supports s... | 1,879 | 155 |
gh_patches_debug_38762 | rasdani/github-patches | git_diff | nilearn__nilearn-1225 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
remove examples/03_connectivity/plot_power_connectome.py ?
- Signal extraction from spheres placed on Power coordinates is already done in `examples/03_connectivity/plot_seed_based_connectome.py`
- Sparse inv... | diff --git a/examples/03_connectivity/plot_power_connectome.py b/examples/03_connectivity/plot_power_connectome.py
deleted file mode 100644
--- a/examples/03_connectivity/plot_power_connectome.py
+++ /dev/null
@@ -1,100 +0,0 @@
-"""
-Extracting signals and plotting a connectome for the Power-264 seed-region atlas
-====... | {"golden_diff": "diff --git a/examples/03_connectivity/plot_power_connectome.py b/examples/03_connectivity/plot_power_connectome.py\ndeleted file mode 100644\n--- a/examples/03_connectivity/plot_power_connectome.py\n+++ /dev/null\n@@ -1,100 +0,0 @@\n-\"\"\"\n-Extracting signals and plotting a connectome for the Power-2... | 1,261 | 840 |
gh_patches_debug_30188 | rasdani/github-patches | git_diff | internetarchive__openlibrary-8966 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support different seeds for random.hourly sort
These carousels are all sorted by random.hourly, but we want them to have a different random subset!

'random_1 as... | {"golden_diff": "diff --git a/openlibrary/plugins/worksearch/schemes/__init__.py b/openlibrary/plugins/worksearch/schemes/__init__.py\n--- a/openlibrary/plugins/worksearch/schemes/__init__.py\n+++ b/openlibrary/plugins/worksearch/schemes/__init__.py\n@@ -44,17 +44,27 @@\n >>> scheme.process_user_sort('random')\... | 1,515 | 454 |
gh_patches_debug_11300 | rasdani/github-patches | git_diff | pypa__setuptools-1986 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecated distutils bdist_wininst is going to be removed
I proposed to remove the bdist_winstinst command from distutils in Python 3.9:
* https://bugs.python.org/issue39541
* https://discuss.python.org/t... | diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py
--- a/setuptools/command/install_scripts.py
+++ b/setuptools/command/install_scripts.py
@@ -32,8 +32,11 @@
)
bs_cmd = self.get_finalized_command('build_scripts')
exec_param = getattr(bs_cmd, 'executable... | {"golden_diff": "diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py\n--- a/setuptools/command/install_scripts.py\n+++ b/setuptools/command/install_scripts.py\n@@ -32,8 +32,11 @@\n )\n bs_cmd = self.get_finalized_command('build_scripts')\n exec_param = geta... | 1,062 | 181 |
gh_patches_debug_39724 | rasdani/github-patches | git_diff | ephios-dev__ephios-178 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Event creation mails do not include event description
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ephi... | diff --git a/ephios/event_management/mail.py b/ephios/event_management/mail.py
--- a/ephios/event_management/mail.py
+++ b/ephios/event_management/mail.py
@@ -1,3 +1,5 @@
+from urllib.parse import urljoin
+
from django.core import mail
from django.core.mail import EmailMultiAlternatives
from django.template.loader i... | {"golden_diff": "diff --git a/ephios/event_management/mail.py b/ephios/event_management/mail.py\n--- a/ephios/event_management/mail.py\n+++ b/ephios/event_management/mail.py\n@@ -1,3 +1,5 @@\n+from urllib.parse import urljoin\n+\n from django.core import mail\n from django.core.mail import EmailMultiAlternatives\n from... | 1,686 | 709 |
gh_patches_debug_535 | rasdani/github-patches | git_diff | neptune-ai__neptune-client-155 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
create_experiment() fails on windows 10
Hi there,
I enjoy neptune very much and on my macbook everything works fine. But when I run the same code on my Windows 10 machine, I get an error when calling crea... | diff --git a/neptune/internal/streams/stdstream_uploader.py b/neptune/internal/streams/stdstream_uploader.py
--- a/neptune/internal/streams/stdstream_uploader.py
+++ b/neptune/internal/streams/stdstream_uploader.py
@@ -41,6 +41,9 @@
def flush(self):
self._stream.flush()
+ def fileno(self):
+ r... | {"golden_diff": "diff --git a/neptune/internal/streams/stdstream_uploader.py b/neptune/internal/streams/stdstream_uploader.py\n--- a/neptune/internal/streams/stdstream_uploader.py\n+++ b/neptune/internal/streams/stdstream_uploader.py\n@@ -41,6 +41,9 @@\n def flush(self):\n self._stream.flush()\n \n+ def ... | 1,283 | 105 |
gh_patches_debug_32741 | rasdani/github-patches | git_diff | WeblateOrg__weblate-9260 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Document weblate migrate command
### Describe the problem
`weblate migrate` command is mentioned in the docs, but not actually documented.
It is also used inconsistently:
1. https://docs.weblate.org/en/... | diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -1,6 +1,7 @@
"""Sphinx plugins for Weblate documentation."""
import re
+from docutils.nodes import literal
from sphinx import addnodes
from sphinx.domains.std import Cmdoption
@@ -8,22 +... | {"golden_diff": "diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py\n--- a/docs/_ext/djangodocs.py\n+++ b/docs/_ext/djangodocs.py\n@@ -1,6 +1,7 @@\n \"\"\"Sphinx plugins for Weblate documentation.\"\"\"\n import re\n \n+from docutils.nodes import literal\n from sphinx import addnodes\n from sphinx.domains.s... | 679 | 559 |
gh_patches_debug_32632 | rasdani/github-patches | git_diff | docker__docker-py-727 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
split_port() does not properly handle ":80" or "127.0.0.1:" properly
Initially reported as https://github.com/docker/compose/issues/1887
Example:
``` python
def test_port_only_with_colon(self):
... | diff --git a/docker/utils/ports/ports.py b/docker/utils/ports/ports.py
--- a/docker/utils/ports/ports.py
+++ b/docker/utils/ports/ports.py
@@ -1,5 +1,4 @@
-
def add_port_mapping(port_bindings, internal_port, external):
if internal_port in port_bindings:
port_bindings[internal_port].append(external)
@@ ... | {"golden_diff": "diff --git a/docker/utils/ports/ports.py b/docker/utils/ports/ports.py\n--- a/docker/utils/ports/ports.py\n+++ b/docker/utils/ports/ports.py\n@@ -1,5 +1,4 @@\n \n-\n def add_port_mapping(port_bindings, internal_port, external):\n if internal_port in port_bindings:\n port_bindings[internal_p... | 1,499 | 416 |
gh_patches_debug_35677 | rasdani/github-patches | git_diff | medtagger__MedTagger-519 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Log in user after registration
## Current Behavior
User needs to log in after first registration.
## Expected Behavior
User should be logged into MedTagger right after filling registration form.
#... | diff --git a/backend/medtagger/api/auth/business.py b/backend/medtagger/api/auth/business.py
--- a/backend/medtagger/api/auth/business.py
+++ b/backend/medtagger/api/auth/business.py
@@ -1,11 +1,12 @@
"""Module responsible for business logic in all Auth endpoint."""
+from typing import Tuple
from medtagger.api import... | {"golden_diff": "diff --git a/backend/medtagger/api/auth/business.py b/backend/medtagger/api/auth/business.py\n--- a/backend/medtagger/api/auth/business.py\n+++ b/backend/medtagger/api/auth/business.py\n@@ -1,11 +1,12 @@\n \"\"\"Module responsible for business logic in all Auth endpoint.\"\"\"\n+from typing import Tupl... | 1,188 | 555 |
gh_patches_debug_23773 | rasdani/github-patches | git_diff | mirumee__ariadne-481 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unexpected Snake Case for Acronyms
The snake case conversion of the `snake_case_fallback_resolvers` yields unexpected results for words with multiple uppercase letters in a row, e.g.
- `getHTTPResponse` is ... | diff --git a/ariadne/utils.py b/ariadne/utils.py
--- a/ariadne/utils.py
+++ b/ariadne/utils.py
@@ -6,20 +6,29 @@
def convert_camel_case_to_snake(graphql_name: str) -> str:
+ # pylint: disable=too-many-boolean-expressions
+ max_index = len(graphql_name) - 1
+ lowered_name = graphql_name.lower()
+
pyth... | {"golden_diff": "diff --git a/ariadne/utils.py b/ariadne/utils.py\n--- a/ariadne/utils.py\n+++ b/ariadne/utils.py\n@@ -6,20 +6,29 @@\n \n \n def convert_camel_case_to_snake(graphql_name: str) -> str:\n+ # pylint: disable=too-many-boolean-expressions\n+ max_index = len(graphql_name) - 1\n+ lowered_name = graphq... | 1,101 | 409 |
gh_patches_debug_23742 | rasdani/github-patches | git_diff | python-discord__bot-1556 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use embed timestamp in mod pings off
When a mods turns off mod pings, a confirmation is sent to inform the user that their pings have successfully been turned off.
In this confirmation, we currently includ... | diff --git a/bot/exts/moderation/modpings.py b/bot/exts/moderation/modpings.py
--- a/bot/exts/moderation/modpings.py
+++ b/bot/exts/moderation/modpings.py
@@ -3,11 +3,11 @@
from async_rediscache import RedisCache
from dateutil.parser import isoparse
-from discord import Member
+from discord import Embed, Member
fr... | {"golden_diff": "diff --git a/bot/exts/moderation/modpings.py b/bot/exts/moderation/modpings.py\n--- a/bot/exts/moderation/modpings.py\n+++ b/bot/exts/moderation/modpings.py\n@@ -3,11 +3,11 @@\n \n from async_rediscache import RedisCache\n from dateutil.parser import isoparse\n-from discord import Member\n+from discord... | 2,018 | 313 |
gh_patches_debug_8649 | rasdani/github-patches | git_diff | mlcommons__GaNDLF-390 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GaNDLF is not running on macOS
**Describe the bug**
Currently, we are requiring `torch==1.8.2`:
https://github.com/CBICA/GaNDLF/blob/e8f922266ec7af1c3fac36439290d22a5e63866d/setup.py#L56
Which is not suppo... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -53,7 +53,6 @@
"numpy==1.21.0",
"scipy",
"SimpleITK!=2.0.*",
- "torch==1.8.2",
"torchvision",
"tqdm",
"torchio==0.18.57",
@@ -82,6 +81,12 @@
"onnx",
]
+# pytorch doesn't have LTS support on OSX - https://github.co... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -53,7 +53,6 @@\n \"numpy==1.21.0\",\n \"scipy\",\n \"SimpleITK!=2.0.*\",\n- \"torch==1.8.2\",\n \"torchvision\",\n \"tqdm\",\n \"torchio==0.18.57\",\n@@ -82,6 +81,12 @@\n \"onnx\",\n ]\n \n+# pytorch doe... | 1,927 | 194 |
gh_patches_debug_18920 | rasdani/github-patches | git_diff | google__turbinia-1098 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set a default file size limit for PlasoTask hashers
Currently, all PlasoTask instances will attempt to hash files of any size, potentially very large ones .This could lead to unusually long processing times.
... | diff --git a/turbinia/workers/plaso.py b/turbinia/workers/plaso.py
--- a/turbinia/workers/plaso.py
+++ b/turbinia/workers/plaso.py
@@ -39,6 +39,7 @@
# the Plaso documentation
'status_view': 'none',
'hashers': 'all',
+ 'hasher_file_size_limit': '1073741824',
'partitions': 'all',
'... | {"golden_diff": "diff --git a/turbinia/workers/plaso.py b/turbinia/workers/plaso.py\n--- a/turbinia/workers/plaso.py\n+++ b/turbinia/workers/plaso.py\n@@ -39,6 +39,7 @@\n # the Plaso documentation\n 'status_view': 'none',\n 'hashers': 'all',\n+ 'hasher_file_size_limit': '1073741824',\n 'par... | 1,751 | 282 |
gh_patches_debug_2514 | rasdani/github-patches | git_diff | liberapay__liberapay.com-173 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Changing organization type doesn't work
In identity tab, when I change the organization type to set Organization instead of Business, my changes are not saved.
--- END ISSUE ---
Below are some code segmen... | diff --git a/liberapay/security/authentication.py b/liberapay/security/authentication.py
--- a/liberapay/security/authentication.py
+++ b/liberapay/security/authentication.py
@@ -44,6 +44,8 @@
k, 'password',
id, body.pop('log-in.password')
)
+ if not p:
+ state['sign... | {"golden_diff": "diff --git a/liberapay/security/authentication.py b/liberapay/security/authentication.py\n--- a/liberapay/security/authentication.py\n+++ b/liberapay/security/authentication.py\n@@ -44,6 +44,8 @@\n k, 'password',\n id, body.pop('log-in.password')\n )\n+ if not p:\... | 1,944 | 108 |
gh_patches_debug_49043 | rasdani/github-patches | git_diff | arviz-devs__arviz-2032 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plot_dot
**Describe the bug**
plotdot fig size doesn't behave the way I expect, in that when I set `figsize` in an axes that triple a previous one its not triple the size. There also are some minor bugs whe... | diff --git a/arviz/plots/backends/matplotlib/dotplot.py b/arviz/plots/backends/matplotlib/dotplot.py
--- a/arviz/plots/backends/matplotlib/dotplot.py
+++ b/arviz/plots/backends/matplotlib/dotplot.py
@@ -106,7 +106,7 @@
else:
ax.tick_params(left=False, labelleft=False)
- ax.set_aspect("equal", adjusta... | {"golden_diff": "diff --git a/arviz/plots/backends/matplotlib/dotplot.py b/arviz/plots/backends/matplotlib/dotplot.py\n--- a/arviz/plots/backends/matplotlib/dotplot.py\n+++ b/arviz/plots/backends/matplotlib/dotplot.py\n@@ -106,7 +106,7 @@\n else:\n ax.tick_params(left=False, labelleft=False)\n \n- ax.set... | 1,564 | 127 |
gh_patches_debug_9828 | rasdani/github-patches | git_diff | secdev__scapy-3473 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
L2TP post_build is broken
### Brief description
l2tp.py post_build is supposed to update the length. However, it only does this if current length is None, and the length field is initialized to 0, not None, ... | diff --git a/scapy/layers/l2tp.py b/scapy/layers/l2tp.py
--- a/scapy/layers/l2tp.py
+++ b/scapy/layers/l2tp.py
@@ -25,7 +25,7 @@
'res06', 'sequence', 'res08', 'res09', 'length', 'control']), # noqa: E501
BitEnumField("version", 2, 4, {2: 'L2TPv2'}),
- ConditionalFie... | {"golden_diff": "diff --git a/scapy/layers/l2tp.py b/scapy/layers/l2tp.py\n--- a/scapy/layers/l2tp.py\n+++ b/scapy/layers/l2tp.py\n@@ -25,7 +25,7 @@\n 'res06', 'sequence', 'res08', 'res09', 'length', 'control']), # noqa: E501\n BitEnumField(\"version\", 2, 4, {2: 'L2TPv2'}),\n... | 1,130 | 173 |
gh_patches_debug_18028 | rasdani/github-patches | git_diff | Mailu__Mailu-1316 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Rainloop Webmail - Authentication fails if you have a special character in your password
In the admin interface, you can define a new password and you can put a special character like `è`.
It works fine wi... | diff --git a/core/admin/mailu/internal/nginx.py b/core/admin/mailu/internal/nginx.py
--- a/core/admin/mailu/internal/nginx.py
+++ b/core/admin/mailu/internal/nginx.py
@@ -37,8 +37,14 @@
# Authenticated user
elif method == "plain":
server, port = get_server(headers["Auth-Protocol"], True)
- use... | {"golden_diff": "diff --git a/core/admin/mailu/internal/nginx.py b/core/admin/mailu/internal/nginx.py\n--- a/core/admin/mailu/internal/nginx.py\n+++ b/core/admin/mailu/internal/nginx.py\n@@ -37,8 +37,14 @@\n # Authenticated user\n elif method == \"plain\":\n server, port = get_server(headers[\"Auth-Prot... | 1,481 | 291 |
gh_patches_debug_15801 | rasdani/github-patches | git_diff | pyca__cryptography-1430 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OpenSSL's HMAC Context isn't marked as implementing MACContext
It ought to be.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BE... | diff --git a/cryptography/hazmat/backends/commoncrypto/hmac.py b/cryptography/hazmat/backends/commoncrypto/hmac.py
--- a/cryptography/hazmat/backends/commoncrypto/hmac.py
+++ b/cryptography/hazmat/backends/commoncrypto/hmac.py
@@ -18,6 +18,7 @@
from cryptography.hazmat.primitives import interfaces
+@utils.register... | {"golden_diff": "diff --git a/cryptography/hazmat/backends/commoncrypto/hmac.py b/cryptography/hazmat/backends/commoncrypto/hmac.py\n--- a/cryptography/hazmat/backends/commoncrypto/hmac.py\n+++ b/cryptography/hazmat/backends/commoncrypto/hmac.py\n@@ -18,6 +18,7 @@\n from cryptography.hazmat.primitives import interfaces... | 1,741 | 252 |
gh_patches_debug_23552 | rasdani/github-patches | git_diff | dotkom__onlineweb4-1914 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
G Suite group syncer does not respect group syncer whitelist
## What kind of an issue is this?
- [x] Bug report
## What is the expected behaviour?
If a group is not in the OW4_GSUITE_SETTINGS groups ... | diff --git a/apps/gsuite/mail_syncer/main.py b/apps/gsuite/mail_syncer/main.py
--- a/apps/gsuite/mail_syncer/main.py
+++ b/apps/gsuite/mail_syncer/main.py
@@ -1,5 +1,7 @@
import logging
+from django.conf import settings
+
from apps.gsuite.mail_syncer.utils import (get_excess_groups_for_user, get_excess_users_in_g_s... | {"golden_diff": "diff --git a/apps/gsuite/mail_syncer/main.py b/apps/gsuite/mail_syncer/main.py\n--- a/apps/gsuite/mail_syncer/main.py\n+++ b/apps/gsuite/mail_syncer/main.py\n@@ -1,5 +1,7 @@\n import logging\n \n+from django.conf import settings\n+\n from apps.gsuite.mail_syncer.utils import (get_excess_groups_for_user... | 1,971 | 251 |
gh_patches_debug_6549 | rasdani/github-patches | git_diff | encode__uvicorn-754 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lifespan scope is missing asgi dict
the lifespan scope (https://asgi.readthedocs.io/en/latest/specs/lifespan.html#scope) is missing the asgi dict
prompted by
_Originally posted by @florimondmanca in htt... | diff --git a/uvicorn/lifespan/on.py b/uvicorn/lifespan/on.py
--- a/uvicorn/lifespan/on.py
+++ b/uvicorn/lifespan/on.py
@@ -44,7 +44,10 @@
async def main(self):
try:
app = self.config.loaded_app
- scope = {"type": "lifespan"}
+ scope = {
+ "type": "lifespan... | {"golden_diff": "diff --git a/uvicorn/lifespan/on.py b/uvicorn/lifespan/on.py\n--- a/uvicorn/lifespan/on.py\n+++ b/uvicorn/lifespan/on.py\n@@ -44,7 +44,10 @@\n async def main(self):\n try:\n app = self.config.loaded_app\n- scope = {\"type\": \"lifespan\"}\n+ scope = {\n+ ... | 1,173 | 153 |
gh_patches_debug_3306 | rasdani/github-patches | git_diff | kivy__python-for-android-1815 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
packaged python is built with IPv6 disabled
Is there any reason for IPv6 being disabled?
https://github.com/kivy/python-for-android/blob/f16a66590c92bb57c69b214b2b69dfaa6dc1e0ed/pythonforandroid/recipes/pyth... | diff --git a/pythonforandroid/recipes/python3/__init__.py b/pythonforandroid/recipes/python3/__init__.py
--- a/pythonforandroid/recipes/python3/__init__.py
+++ b/pythonforandroid/recipes/python3/__init__.py
@@ -34,7 +34,7 @@
'--host={android_host}',
'--build={android_build}',
'--enable-shared... | {"golden_diff": "diff --git a/pythonforandroid/recipes/python3/__init__.py b/pythonforandroid/recipes/python3/__init__.py\n--- a/pythonforandroid/recipes/python3/__init__.py\n+++ b/pythonforandroid/recipes/python3/__init__.py\n@@ -34,7 +34,7 @@\n '--host={android_host}',\n '--build={android_build}',\n ... | 880 | 132 |
gh_patches_debug_596 | rasdani/github-patches | git_diff | pex-tool__pex-1673 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.72
On the docket:
+ [x] Fix Locker to prune un-downloaded entries. (#1666)
+ [x] Fix venv creation to ignore ambient PEX env vars. #1669
+ [x] Lockfiles: requirement might not be compatible wit... | 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.71"
+__version__ = "2.1.72"
| {"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.71\"\n+__version__ = \"2.1.72\"\n", "... | 386 | 96 |
gh_patches_debug_361 | rasdani/github-patches | git_diff | NVIDIA__NVFlare-1314 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Command "nvflare" not found
Unfortunately I can't run nvflare on Ubuntu because it tells me that the command (`nvflare simulator -h`) is not found. Even if I use the Docker solution. Inside the docker ... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -76,6 +76,7 @@
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.autosectionlabel",
+ "sphinx_copybutton",
]
autoclass_content = "both"
| {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -76,6 +76,7 @@\n \"sphinx.ext.autodoc\",\n \"sphinx.ext.viewcode\",\n \"sphinx.ext.autosectionlabel\",\n+ \"sphinx_copybutton\",\n ]\n \n autoclass_content = \"both\"\n", "issue": "[BUG] Command \"nvflar... | 1,760 | 80 |
gh_patches_debug_906 | rasdani/github-patches | git_diff | dotkom__onlineweb4-501 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
UserResource in API should not display last login date publicly
Somewhat sensitive information...
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may c... | diff --git a/apps/api/v0/authentication.py b/apps/api/v0/authentication.py
--- a/apps/api/v0/authentication.py
+++ b/apps/api/v0/authentication.py
@@ -11,4 +11,4 @@
class Meta:
queryset = User.objects.all()
resource_name = 'user'
- fields = ['username', 'first_name', 'last_name', 'last_log... | {"golden_diff": "diff --git a/apps/api/v0/authentication.py b/apps/api/v0/authentication.py\n--- a/apps/api/v0/authentication.py\n+++ b/apps/api/v0/authentication.py\n@@ -11,4 +11,4 @@\n class Meta:\n queryset = User.objects.all()\n resource_name = 'user'\n- fields = ['username', 'first_name'... | 390 | 108 |
gh_patches_debug_11661 | rasdani/github-patches | git_diff | projectmesa__mesa-1439 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Seed and random should not be class attributes
**Describe the bug**
<!-- A clear and concise description the bug -->
Every time a model instance is created, it updates the seed and random attribute of eve... | diff --git a/mesa/model.py b/mesa/model.py
--- a/mesa/model.py
+++ b/mesa/model.py
@@ -21,9 +21,10 @@
def __new__(cls, *args: Any, **kwargs: Any) -> Any:
"""Create a new model object and instantiate its RNG automatically."""
- cls._seed = kwargs.get("seed", None)
- cls.random = random.Rand... | {"golden_diff": "diff --git a/mesa/model.py b/mesa/model.py\n--- a/mesa/model.py\n+++ b/mesa/model.py\n@@ -21,9 +21,10 @@\n \n def __new__(cls, *args: Any, **kwargs: Any) -> Any:\n \"\"\"Create a new model object and instantiate its RNG automatically.\"\"\"\n- cls._seed = kwargs.get(\"seed\", None)\n... | 1,215 | 184 |
gh_patches_debug_25285 | rasdani/github-patches | git_diff | DataDog__dd-agent-2139 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot find Docker cgroup directory. Be sure your system is supported.
Running docker 1.8.3 on Ubuntu 14.04. Running dd-agent under Kubernetes. Kept getting the error message in the subject until I made a pa... | diff --git a/utils/dockerutil.py b/utils/dockerutil.py
--- a/utils/dockerutil.py
+++ b/utils/dockerutil.py
@@ -89,6 +89,7 @@
stat_file_path_coreos = os.path.join(mountpoint, "system.slice")
stat_file_path_kubernetes = os.path.join(mountpoint, container_id)
stat_file_path_kubernetes_docker = o... | {"golden_diff": "diff --git a/utils/dockerutil.py b/utils/dockerutil.py\n--- a/utils/dockerutil.py\n+++ b/utils/dockerutil.py\n@@ -89,6 +89,7 @@\n stat_file_path_coreos = os.path.join(mountpoint, \"system.slice\")\n stat_file_path_kubernetes = os.path.join(mountpoint, container_id)\n stat_file_p... | 1,944 | 287 |
gh_patches_debug_11715 | rasdani/github-patches | git_diff | safe-global__safe-config-service-361 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Gas price editable from the Chain model
Please make the Gas Price editable directly via Chain configs.
Like we did for Features and Wallets.
Thanks!
--- END ISSUE ---
Below are some code segments, each fr... | diff --git a/src/chains/admin.py b/src/chains/admin.py
--- a/src/chains/admin.py
+++ b/src/chains/admin.py
@@ -4,6 +4,12 @@
from .models import Chain, Feature, GasPrice, Wallet
+class GasPriceInline(admin.TabularInline[Model]):
+ model = GasPrice
+ extra = 0
+ verbose_name_plural = "Gas prices set for thi... | {"golden_diff": "diff --git a/src/chains/admin.py b/src/chains/admin.py\n--- a/src/chains/admin.py\n+++ b/src/chains/admin.py\n@@ -4,6 +4,12 @@\n from .models import Chain, Feature, GasPrice, Wallet\n \n \n+class GasPriceInline(admin.TabularInline[Model]):\n+ model = GasPrice\n+ extra = 0\n+ verbose_name_plura... | 696 | 183 |
gh_patches_debug_18892 | rasdani/github-patches | git_diff | python__peps-634 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pep2rss can raise UnicodeEncodeError on certain platforms
This is due to the default encoding of [`open()`](https://docs.python.org/3/library/functions.html#open) being platform dependent.
For example, on ... | diff --git a/pep2rss.py b/pep2rss.py
--- a/pep2rss.py
+++ b/pep2rss.py
@@ -1,16 +1,15 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# usage: pep-hook.py $REPOS $REV
# (standard post-commit args)
import os, glob, time, datetime, stat, re, sys
-import codecs
import PyRSS2Gen as rssgen
RSS_PATH = os.path.jo... | {"golden_diff": "diff --git a/pep2rss.py b/pep2rss.py\n--- a/pep2rss.py\n+++ b/pep2rss.py\n@@ -1,16 +1,15 @@\n-#!/usr/bin/env python\n+#!/usr/bin/env python3\n \n # usage: pep-hook.py $REPOS $REV\n # (standard post-commit args)\n \n import os, glob, time, datetime, stat, re, sys\n-import codecs\n import PyRSS2Gen as rs... | 1,271 | 270 |
gh_patches_debug_4567 | rasdani/github-patches | git_diff | mozmeao__snippets-service-813 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
UnicodeEncodeError when Slack request.post
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 258-264: Body ('γιώργος') is not valid Latin-1. Use body.encode('utf-8') if you want to send ... | diff --git a/snippets/base/slack.py b/snippets/base/slack.py
--- a/snippets/base/slack.py
+++ b/snippets/base/slack.py
@@ -21,7 +21,7 @@
return
try:
- response = requests.post(settings.SLACK_WEBHOOK, data=data,
+ response = requests.post(settings.SLACK_WEBHOOK, data=data.encode('utf-8'),
... | {"golden_diff": "diff --git a/snippets/base/slack.py b/snippets/base/slack.py\n--- a/snippets/base/slack.py\n+++ b/snippets/base/slack.py\n@@ -21,7 +21,7 @@\n return\n \n try:\n- response = requests.post(settings.SLACK_WEBHOOK, data=data,\n+ response = requests.post(settings.SLACK_WEBHOOK, dat... | 589 | 112 |
gh_patches_debug_11352 | rasdani/github-patches | git_diff | netket__netket-1487 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error in fermi-hubbard example
Hello, there.
It seems that the definition of create and annihilation operators are defined reversely in fermi-hubbard model, and results are wrong. [link](https://github.com... | diff --git a/Examples/Fermions/fermi_hubbard.py b/Examples/Fermions/fermi_hubbard.py
--- a/Examples/Fermions/fermi_hubbard.py
+++ b/Examples/Fermions/fermi_hubbard.py
@@ -23,11 +23,11 @@
# we will create a helper function to abbreviate the creation, destruction and number operators
# each operator has a site and spin... | {"golden_diff": "diff --git a/Examples/Fermions/fermi_hubbard.py b/Examples/Fermions/fermi_hubbard.py\n--- a/Examples/Fermions/fermi_hubbard.py\n+++ b/Examples/Fermions/fermi_hubbard.py\n@@ -23,11 +23,11 @@\n # we will create a helper function to abbreviate the creation, destruction and number operators\n # each operat... | 1,472 | 219 |
gh_patches_debug_25100 | rasdani/github-patches | git_diff | ros__ros_comm-433 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
message_filters: Incorporate python approximate time synchronizer
https://github.com/ros-perception/image_pipeline/issues/76
--- END ISSUE ---
Below are some code segments, each from a relevant file. One o... | diff --git a/utilities/message_filters/src/message_filters/__init__.py b/utilities/message_filters/src/message_filters/__init__.py
--- a/utilities/message_filters/src/message_filters/__init__.py
+++ b/utilities/message_filters/src/message_filters/__init__.py
@@ -30,6 +30,7 @@
======================
"""
+import iter... | {"golden_diff": "diff --git a/utilities/message_filters/src/message_filters/__init__.py b/utilities/message_filters/src/message_filters/__init__.py\n--- a/utilities/message_filters/src/message_filters/__init__.py\n+++ b/utilities/message_filters/src/message_filters/__init__.py\n@@ -30,6 +30,7 @@\n =====================... | 1,780 | 432 |
gh_patches_debug_5242 | rasdani/github-patches | git_diff | wemake-services__wemake-python-styleguide-884 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong and correct examples of nested annotations mixed up in docs for Union type
# Bug report
<!--
Hi, thanks for submitting a bug. We appreciate that.
But, we will need some information about what's w... | diff --git a/wemake_python_styleguide/violations/annotations.py b/wemake_python_styleguide/violations/annotations.py
--- a/wemake_python_styleguide/violations/annotations.py
+++ b/wemake_python_styleguide/violations/annotations.py
@@ -79,11 +79,11 @@
Example::
# Correct:
Literal[1, 2, 3, "foo", 5... | {"golden_diff": "diff --git a/wemake_python_styleguide/violations/annotations.py b/wemake_python_styleguide/violations/annotations.py\n--- a/wemake_python_styleguide/violations/annotations.py\n+++ b/wemake_python_styleguide/violations/annotations.py\n@@ -79,11 +79,11 @@\n Example::\n # Correct:\n Li... | 1,322 | 182 |
gh_patches_debug_1372 | rasdani/github-patches | git_diff | wright-group__WrightTools-361 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
collection.keys returns data objects
should return names, but get objects
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FI... | diff --git a/WrightTools/collection/_collection.py b/WrightTools/collection/_collection.py
--- a/WrightTools/collection/_collection.py
+++ b/WrightTools/collection/_collection.py
@@ -37,7 +37,7 @@
def __next__(self):
if self.__n < len(self):
- out = self[self.__n]
+ out = self.item... | {"golden_diff": "diff --git a/WrightTools/collection/_collection.py b/WrightTools/collection/_collection.py\n--- a/WrightTools/collection/_collection.py\n+++ b/WrightTools/collection/_collection.py\n@@ -37,7 +37,7 @@\n \n def __next__(self):\n if self.__n < len(self):\n- out = self[self.__n]\n+ ... | 1,387 | 109 |
gh_patches_debug_27078 | rasdani/github-patches | git_diff | dotkom__onlineweb4-524 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
(User creation) Some fields are required that should not be
Address, zip and phone should not be required. People will complain.
--- END ISSUE ---
Below are some code segments, each from a relevant file. O... | diff --git a/apps/authentication/forms.py b/apps/authentication/forms.py
--- a/apps/authentication/forms.py
+++ b/apps/authentication/forms.py
@@ -47,9 +47,9 @@
email = forms.EmailField(label=_("Epost"), max_length=50)
password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_("Passord... | {"golden_diff": "diff --git a/apps/authentication/forms.py b/apps/authentication/forms.py\n--- a/apps/authentication/forms.py\n+++ b/apps/authentication/forms.py\n@@ -47,9 +47,9 @@\n email = forms.EmailField(label=_(\"Epost\"), max_length=50)\n password = forms.CharField(widget=forms.PasswordInput(render_value=... | 1,450 | 364 |
gh_patches_debug_27889 | rasdani/github-patches | git_diff | bridgecrewio__checkov-5753 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Azure Function App Slots - Ensure Azure Function App Slots use at least TLS 1.2
**Describe the issue**
It seems that there are no checks that ensure that the following resources to use at least TLS 1.2 :
... | diff --git a/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py
--- a/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py
+++ b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py
@@ -4,15 +4,27 @@
... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py\n--- a/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py\n+++ b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py\n@... | 915 | 409 |
gh_patches_debug_9248 | rasdani/github-patches | git_diff | hylang__hy-1813 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
REPL crashes when ~/.hy-history is inaccessible
I've been working on updating the Hy package in Debian and in running the tests, I've noticed that the `test_bin` tests appear to expect to be able to do someth... | diff --git a/hy/completer.py b/hy/completer.py
--- a/hy/completer.py
+++ b/hy/completer.py
@@ -123,7 +123,7 @@
try:
readline.read_history_file(history)
except IOError:
- open(history, 'a').close()
+ pass
readline.parse_and_bind(readline_bind)
@@ -131,4 +... | {"golden_diff": "diff --git a/hy/completer.py b/hy/completer.py\n--- a/hy/completer.py\n+++ b/hy/completer.py\n@@ -123,7 +123,7 @@\n try:\n readline.read_history_file(history)\n except IOError:\n- open(history, 'a').close()\n+ pass\n \n readline.parse_and_bind(r... | 1,439 | 143 |
gh_patches_debug_25027 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-2810 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider planned_parenthood is broken
During the global build at 2021-05-26-14-42-23, spider **planned_parenthood** failed with **598 features** and **598 errors**.
Here's [the log](https://data.alltheplaces.x... | diff --git a/locations/spiders/planned_parenthood.py b/locations/spiders/planned_parenthood.py
--- a/locations/spiders/planned_parenthood.py
+++ b/locations/spiders/planned_parenthood.py
@@ -27,9 +27,14 @@
yield scrapy.Request(
response.urljoin(path),
callback=self.parse_v... | {"golden_diff": "diff --git a/locations/spiders/planned_parenthood.py b/locations/spiders/planned_parenthood.py\n--- a/locations/spiders/planned_parenthood.py\n+++ b/locations/spiders/planned_parenthood.py\n@@ -27,9 +27,14 @@\n yield scrapy.Request(\n response.urljoin(path),\n ... | 966 | 283 |
gh_patches_debug_23474 | rasdani/github-patches | git_diff | aws-powertools__powertools-lambda-python-186 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Case insensitive lookup of header values in http proxy events
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always fr... | diff --git a/aws_lambda_powertools/utilities/data_classes/common.py b/aws_lambda_powertools/utilities/data_classes/common.py
--- a/aws_lambda_powertools/utilities/data_classes/common.py
+++ b/aws_lambda_powertools/utilities/data_classes/common.py
@@ -48,7 +48,9 @@
params = self.query_string_parameters
... | {"golden_diff": "diff --git a/aws_lambda_powertools/utilities/data_classes/common.py b/aws_lambda_powertools/utilities/data_classes/common.py\n--- a/aws_lambda_powertools/utilities/data_classes/common.py\n+++ b/aws_lambda_powertools/utilities/data_classes/common.py\n@@ -48,7 +48,9 @@\n params = self.query_strin... | 1,344 | 291 |
gh_patches_debug_66082 | rasdani/github-patches | git_diff | freedomofpress__securedrop-5595 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dev server hot reload has stopped working
## Description
In #5532 the `env` attribute was dropped from `SDConfig` in `sdconfig.py`. That value is checked in [`source.py`](https://github.com/freedomofpress/... | diff --git a/securedrop/sdconfig.py b/securedrop/sdconfig.py
--- a/securedrop/sdconfig.py
+++ b/securedrop/sdconfig.py
@@ -53,7 +53,8 @@
self.WORKER_PIDFILE = _config.WORKER_PIDFILE # type: str
- if _config.env == 'test':
+ self.env = getattr(_config, 'env', 'prod') # type: str
+ if ... | {"golden_diff": "diff --git a/securedrop/sdconfig.py b/securedrop/sdconfig.py\n--- a/securedrop/sdconfig.py\n+++ b/securedrop/sdconfig.py\n@@ -53,7 +53,8 @@\n \n self.WORKER_PIDFILE = _config.WORKER_PIDFILE # type: str\n \n- if _config.env == 'test':\n+ self.env = getattr(_config, 'env', 'prod') ... | 1,771 | 145 |
gh_patches_debug_38040 | rasdani/github-patches | git_diff | getsentry__sentry-16440 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
User-creation should not fail, when the account already exists
I'm creating an Ansible role for installing sentry on our network. The software is installed via `pip` -- version 8.22.0, which seems to be the l... | diff --git a/src/sentry/runner/commands/createuser.py b/src/sentry/runner/commands/createuser.py
--- a/src/sentry/runner/commands/createuser.py
+++ b/src/sentry/runner/commands/createuser.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import, print_function
import click
+import sys
from sentry.runner.decorator... | {"golden_diff": "diff --git a/src/sentry/runner/commands/createuser.py b/src/sentry/runner/commands/createuser.py\n--- a/src/sentry/runner/commands/createuser.py\n+++ b/src/sentry/runner/commands/createuser.py\n@@ -1,6 +1,7 @@\n from __future__ import absolute_import, print_function\n \n import click\n+import sys\n fro... | 1,425 | 760 |
gh_patches_debug_6595 | rasdani/github-patches | git_diff | vispy__vispy-712 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bump VisPy version?
Should we bump the version to 0.4.0-dev or something? Currently it is 0.3.0, which doesn't seem right.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or ... | diff --git a/vispy/__init__.py b/vispy/__init__.py
--- a/vispy/__init__.py
+++ b/vispy/__init__.py
@@ -22,7 +22,7 @@
__all__ = ['use', 'sys_info', 'set_log_level', 'test']
# Definition of the version number
-version_info = 0, 3, 0, '' # major, minor, patch, extra
+version_info = 0, 4, 0, 'dev' # major, minor, pat... | {"golden_diff": "diff --git a/vispy/__init__.py b/vispy/__init__.py\n--- a/vispy/__init__.py\n+++ b/vispy/__init__.py\n@@ -22,7 +22,7 @@\n __all__ = ['use', 'sys_info', 'set_log_level', 'test']\n \n # Definition of the version number\n-version_info = 0, 3, 0, '' # major, minor, patch, extra\n+version_info = 0, 4, 0, '... | 612 | 169 |
gh_patches_debug_23769 | rasdani/github-patches | git_diff | pyca__cryptography-1201 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make it harder to allow truncation on a GCM tag
`GCM()` should take a `min_tag_length` parameter, which defaults to `GCM.MAX_TAG_LENGTH`, then we can make it error out on truncated tags by default, while stil... | diff --git a/cryptography/__about__.py b/cryptography/__about__.py
--- a/cryptography/__about__.py
+++ b/cryptography/__about__.py
@@ -28,4 +28,4 @@
__email__ = "cryptography-dev@python.org"
__license__ = "Apache License, Version 2.0"
-__copyright__ = "Copyright 2013-2014 %s" % __author__
+__copyright__ = "Copyrigh... | {"golden_diff": "diff --git a/cryptography/__about__.py b/cryptography/__about__.py\n--- a/cryptography/__about__.py\n+++ b/cryptography/__about__.py\n@@ -28,4 +28,4 @@\n __email__ = \"cryptography-dev@python.org\"\n \n __license__ = \"Apache License, Version 2.0\"\n-__copyright__ = \"Copyright 2013-2014 %s\" % __autho... | 1,715 | 397 |
gh_patches_debug_29942 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-1818 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Exception calling application: dictionary changed size during iteration
The exception occasionally happens when the worker reports gradients to ps.

self.is_slot... | {"golden_diff": "diff --git a/elasticdl/python/ps/embedding_table.py b/elasticdl/python/ps/embedding_table.py\n--- a/elasticdl/python/ps/embedding_table.py\n+++ b/elasticdl/python/ps/embedding_table.py\n@@ -1,3 +1,5 @@\n+import threading\n+\n import numpy as np\n import tensorflow as tf\n \n@@ -44,6 +46,7 @@\n ... | 1,502 | 351 |
gh_patches_debug_11089 | rasdani/github-patches | git_diff | encode__starlette-1218 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Consider making `starlette.templating.Jinja2Templates.get_env` "protected"
Hi,
Thank you very much for your project! We are using it intensively through FastAPI.
While I was exploring the code base and lo... | diff --git a/starlette/templating.py b/starlette/templating.py
--- a/starlette/templating.py
+++ b/starlette/templating.py
@@ -56,9 +56,9 @@
def __init__(self, directory: str) -> None:
assert jinja2 is not None, "jinja2 must be installed to use Jinja2Templates"
- self.env = self.get_env(directory... | {"golden_diff": "diff --git a/starlette/templating.py b/starlette/templating.py\n--- a/starlette/templating.py\n+++ b/starlette/templating.py\n@@ -56,9 +56,9 @@\n \n def __init__(self, directory: str) -> None:\n assert jinja2 is not None, \"jinja2 must be installed to use Jinja2Templates\"\n- self.en... | 1,338 | 179 |
gh_patches_debug_15302 | rasdani/github-patches | git_diff | dj-stripe__dj-stripe-975 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Document our plan to standardise on storing currency in cents
- [x] Add note on field classes that StripeQuantumCurrencyAmountField should be used for new fields
- [x] Update changelog about 3.0 migration to... | diff --git a/djstripe/fields.py b/djstripe/fields.py
--- a/djstripe/fields.py
+++ b/djstripe/fields.py
@@ -47,14 +47,22 @@
class StripeQuantumCurrencyAmountField(models.IntegerField):
+ """
+ A field used to store currency amounts in cents (etc) as per stripe.
+ """
+
pass
class StripeDecimalCur... | {"golden_diff": "diff --git a/djstripe/fields.py b/djstripe/fields.py\n--- a/djstripe/fields.py\n+++ b/djstripe/fields.py\n@@ -47,14 +47,22 @@\n \n \n class StripeQuantumCurrencyAmountField(models.IntegerField):\n+ \"\"\"\n+ A field used to store currency amounts in cents (etc) as per stripe.\n+ \"\"\"\n+\n ... | 1,476 | 239 |
gh_patches_debug_23652 | rasdani/github-patches | git_diff | Mailu__Mailu-2150 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
fix key error in dictionary
## What type of PR?
(Feature, enhancement, bug-fix, documentation)
## What does this PR do?
### Related issue(s)
- Auto close an issue like: closes #2145
## Prerequisi... | diff --git a/core/admin/mailu/internal/views/auth.py b/core/admin/mailu/internal/views/auth.py
--- a/core/admin/mailu/internal/views/auth.py
+++ b/core/admin/mailu/internal/views/auth.py
@@ -18,7 +18,8 @@
response.headers['Auth-Error-Code'] = '502 5.5.1'
utils.limiter.rate_limit_ip(client_ip)
... | {"golden_diff": "diff --git a/core/admin/mailu/internal/views/auth.py b/core/admin/mailu/internal/views/auth.py\n--- a/core/admin/mailu/internal/views/auth.py\n+++ b/core/admin/mailu/internal/views/auth.py\n@@ -18,7 +18,8 @@\n response.headers['Auth-Error-Code'] = '502 5.5.1'\n utils.limiter.rate_limit_... | 1,715 | 292 |
gh_patches_debug_6805 | rasdani/github-patches | git_diff | Pylons__pyramid-2672 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
reify docstring doesn't render properly
The testsetup section is omitted from the rendered docs at http://pyramid.readthedocs.io/en/latest/api/decorator.html#pyramid.decorator.reify
Unfortunately this sectio... | diff --git a/pyramid/decorator.py b/pyramid/decorator.py
--- a/pyramid/decorator.py
+++ b/pyramid/decorator.py
@@ -8,6 +8,16 @@
replacing the function it decorates with an instance variable. It is, in
Python parlance, a non-data descriptor. An example:
+ .. code-block:: python
+
+ from pyramid.d... | {"golden_diff": "diff --git a/pyramid/decorator.py b/pyramid/decorator.py\n--- a/pyramid/decorator.py\n+++ b/pyramid/decorator.py\n@@ -8,6 +8,16 @@\n replacing the function it decorates with an instance variable. It is, in\n Python parlance, a non-data descriptor. An example:\n \n+ .. code-block:: python\n... | 719 | 149 |
gh_patches_debug_17650 | rasdani/github-patches | git_diff | conan-io__conan-4834 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
conan export-pkg with --package-folder does not set the metadata info
When an export-pkg command is used with the ``--package-folder``, the *metadata.json* is not updated with the package ID and package revis... | diff --git a/conans/client/cmd/export_pkg.py b/conans/client/cmd/export_pkg.py
--- a/conans/client/cmd/export_pkg.py
+++ b/conans/client/cmd/export_pkg.py
@@ -50,9 +50,9 @@
packager.create_package(conanfile, package_id, source_folder, build_folder,
dest_package_folder, install_... | {"golden_diff": "diff --git a/conans/client/cmd/export_pkg.py b/conans/client/cmd/export_pkg.py\n--- a/conans/client/cmd/export_pkg.py\n+++ b/conans/client/cmd/export_pkg.py\n@@ -50,9 +50,9 @@\n packager.create_package(conanfile, package_id, source_folder, build_folder,\n dest_pa... | 1,259 | 223 |
gh_patches_debug_17967 | rasdani/github-patches | git_diff | WeblateOrg__weblate-11641 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
No way to set default notification setting for watched projects
### Describe the issue
Thanks for this great project. On the notifications part there is some room for improvements as when you come from trans... | diff --git a/weblate/accounts/data.py b/weblate/accounts/data.py
--- a/weblate/accounts/data.py
+++ b/weblate/accounts/data.py
@@ -4,6 +4,7 @@
from weblate.accounts.notifications import (
FREQ_INSTANT,
+ FREQ_WEEKLY,
SCOPE_ADMIN,
SCOPE_ALL,
SCOPE_WATCHED,
@@ -14,6 +15,7 @@
(SCOPE_WATCHED,... | {"golden_diff": "diff --git a/weblate/accounts/data.py b/weblate/accounts/data.py\n--- a/weblate/accounts/data.py\n+++ b/weblate/accounts/data.py\n@@ -4,6 +4,7 @@\n \n from weblate.accounts.notifications import (\n FREQ_INSTANT,\n+ FREQ_WEEKLY,\n SCOPE_ADMIN,\n SCOPE_ALL,\n SCOPE_WATCHED,\n@@ -14,6 +... | 858 | 226 |
gh_patches_debug_28982 | rasdani/github-patches | git_diff | bokeh__bokeh-5327 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Examples with deprecation warnings
As of 0.12.3, the following examples have deprecation warnings
- plotting/file/hover.py
- plotting/file/tap.py
--- END ISSUE ---
Below are some code segments, each from a... | diff --git a/examples/plotting/file/hover.py b/examples/plotting/file/hover.py
--- a/examples/plotting/file/hover.py
+++ b/examples/plotting/file/hover.py
@@ -28,8 +28,8 @@
p = figure(title="Hoverful Scatter", tools=TOOLS)
-p.circle(x, y, radius=radii, source=source,
- fill_color=colors, fill_alpha=0.6, li... | {"golden_diff": "diff --git a/examples/plotting/file/hover.py b/examples/plotting/file/hover.py\n--- a/examples/plotting/file/hover.py\n+++ b/examples/plotting/file/hover.py\n@@ -28,8 +28,8 @@\n \n p = figure(title=\"Hoverful Scatter\", tools=TOOLS)\n \n-p.circle(x, y, radius=radii, source=source,\n- fill_color... | 1,261 | 531 |
gh_patches_debug_96 | rasdani/github-patches | git_diff | pymodbus-dev__pymodbus-1422 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
py.typed missing in pip install
### Versions
- Python: 3.11
- OS: macOS
- Pymodbus: 3.2.0 (pip install)
- Modbus Hardware (if used):
### Description
running mypy on my project complains about mi... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -30,4 +30,5 @@
setup(
install_requires=install_req,
extras_require=dependencies,
+ package_data={"pymodbus": ["py.typed"]},
)
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -30,4 +30,5 @@\n setup(\n install_requires=install_req,\n extras_require=dependencies,\n+ package_data={\"pymodbus\": [\"py.typed\"]},\n )\n", "issue": "py.typed missing in pip install\n\r\n### Versions\r\n\r\n- Python: 3.1... | 847 | 64 |
gh_patches_debug_23502 | rasdani/github-patches | git_diff | uccser__cs-unplugged-255 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create example test for templatetags
Create example test for templatetags
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN ... | diff --git a/csunplugged/general/templatetags/render_html_field.py b/csunplugged/general/templatetags/render_html_field.py
--- a/csunplugged/general/templatetags/render_html_field.py
+++ b/csunplugged/general/templatetags/render_html_field.py
@@ -3,6 +3,12 @@
from django import template
from django.template import Te... | {"golden_diff": "diff --git a/csunplugged/general/templatetags/render_html_field.py b/csunplugged/general/templatetags/render_html_field.py\n--- a/csunplugged/general/templatetags/render_html_field.py\n+++ b/csunplugged/general/templatetags/render_html_field.py\n@@ -3,6 +3,12 @@\n from django import template\n from dja... | 667 | 274 |
gh_patches_debug_10305 | rasdani/github-patches | git_diff | scikit-hep__pyhf-1242 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add pyhf.writexml and pyhf.readxml to public API docs
# Description
As first brought up in PR #1125, `pyhf.writexml` and `pyhf.readxml` are not currently documented in the public Python API docs. This shou... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -49,16 +49,19 @@
)
)
extras_require['docs'] = sorted(
- {
- 'sphinx>=3.1.2',
- 'sphinxcontrib-bibtex~=1.0',
- 'sphinx-click',
- 'sphinx_rtd_theme',
- 'nbsphinx',
- 'ipywidgets',
- 'sphinx-issues'... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -49,16 +49,19 @@\n )\n )\n extras_require['docs'] = sorted(\n- {\n- 'sphinx>=3.1.2',\n- 'sphinxcontrib-bibtex~=1.0',\n- 'sphinx-click',\n- 'sphinx_rtd_theme',\n- 'nbsphinx',\n- 'ipywidg... | 1,068 | 239 |
gh_patches_debug_38716 | rasdani/github-patches | git_diff | psychopy__psychopy-1542 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
no documentation for trialHandler.data.addDataType
The TrialHandler.py demo uses the function addDataType:
```
trials.data.addDataType('choice') # this will help store things with the stimuli
trials.dat... | diff --git a/psychopy/demos/coder/experiment control/TrialHandler.py b/psychopy/demos/coder/experiment control/TrialHandler.py
--- a/psychopy/demos/coder/experiment control/TrialHandler.py
+++ b/psychopy/demos/coder/experiment control/TrialHandler.py
@@ -3,6 +3,9 @@
"""
Demo of TrialHandler
+
+The contents of thi... | {"golden_diff": "diff --git a/psychopy/demos/coder/experiment control/TrialHandler.py b/psychopy/demos/coder/experiment control/TrialHandler.py\n--- a/psychopy/demos/coder/experiment control/TrialHandler.py\t\n+++ b/psychopy/demos/coder/experiment control/TrialHandler.py\t\n@@ -3,6 +3,9 @@\n \n \"\"\"\n Demo of TrialHa... | 1,060 | 820 |
gh_patches_debug_2575 | rasdani/github-patches | git_diff | coala__coala-3608 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove call_without_output from Shell.py L7
This line was used by the requirement classes, it isnt used anymore as they use sarge, so it should be removed.
difficulty/newcomer
--- END ISSUE ---
Below are s... | diff --git a/coalib/misc/Shell.py b/coalib/misc/Shell.py
--- a/coalib/misc/Shell.py
+++ b/coalib/misc/Shell.py
@@ -1,14 +1,6 @@
from contextlib import contextmanager
-import functools
import shlex
-from subprocess import PIPE, Popen, call, DEVNULL
-
-
-call_without_output = functools.partial(call, stdout=DEVNULL, std... | {"golden_diff": "diff --git a/coalib/misc/Shell.py b/coalib/misc/Shell.py\n--- a/coalib/misc/Shell.py\n+++ b/coalib/misc/Shell.py\n@@ -1,14 +1,6 @@\n from contextlib import contextmanager\n-import functools\n import shlex\n-from subprocess import PIPE, Popen, call, DEVNULL\n-\n-\n-call_without_output = functools.partia... | 1,579 | 135 |
gh_patches_debug_52259 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-6127 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`view.flows.add` command does not exist but the examples reference it
#### Problem Description
The `view.flows.add` command does not exist but the example `duplicate-modify-replay.py` shows this command be... | diff --git a/examples/addons/duplicate-modify-replay.py b/examples/addons/duplicate-modify-replay.py
--- a/examples/addons/duplicate-modify-replay.py
+++ b/examples/addons/duplicate-modify-replay.py
@@ -10,6 +10,6 @@
# Only interactive tools have a view. If we have one, add a duplicate entry
# for our flow.
... | {"golden_diff": "diff --git a/examples/addons/duplicate-modify-replay.py b/examples/addons/duplicate-modify-replay.py\n--- a/examples/addons/duplicate-modify-replay.py\n+++ b/examples/addons/duplicate-modify-replay.py\n@@ -10,6 +10,6 @@\n # Only interactive tools have a view. If we have one, add a duplicate entry\n... | 487 | 152 |
gh_patches_debug_17692 | rasdani/github-patches | git_diff | sopel-irc__sopel-1262 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[wikipedia] Queries with e.g. & do not work properly
````
<dgw> ;w Miraculous Ladybug
<Kaede> KeyError: u'extract' (file "/usr/local/lib/python2.7/dist-packages/sopel/modules/wikipedia.py",
line 87... | diff --git a/sopel/modules/wikipedia.py b/sopel/modules/wikipedia.py
--- a/sopel/modules/wikipedia.py
+++ b/sopel/modules/wikipedia.py
@@ -10,10 +10,12 @@
import sys
if sys.version_info.major < 3:
+ from urllib import quote as _quote
from urlparse import unquote as _unquote
+ quote = lambda s: _quote(s.e... | {"golden_diff": "diff --git a/sopel/modules/wikipedia.py b/sopel/modules/wikipedia.py\n--- a/sopel/modules/wikipedia.py\n+++ b/sopel/modules/wikipedia.py\n@@ -10,10 +10,12 @@\n \n import sys\n if sys.version_info.major < 3:\n+ from urllib import quote as _quote\n from urlparse import unquote as _unquote\n+ qu... | 1,965 | 242 |
gh_patches_debug_33382 | rasdani/github-patches | git_diff | conan-io__conan-center-index-438 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[package] sqlite3/all: Discussion of default options
Having a look at the options of the sqlite3 recipe you see most of them defaulted to false. However, there are some recipes like qt from bincrafters that a... | diff --git a/recipes/sqlite3/all/conanfile.py b/recipes/sqlite3/all/conanfile.py
--- a/recipes/sqlite3/all/conanfile.py
+++ b/recipes/sqlite3/all/conanfile.py
@@ -22,19 +22,21 @@
"enable_fts5": [True, False],
"enable_json1": [True, False],
"enable_rtree": [True, False],
-... | {"golden_diff": "diff --git a/recipes/sqlite3/all/conanfile.py b/recipes/sqlite3/all/conanfile.py\n--- a/recipes/sqlite3/all/conanfile.py\n+++ b/recipes/sqlite3/all/conanfile.py\n@@ -22,19 +22,21 @@\n \"enable_fts5\": [True, False],\n \"enable_json1\": [True, False],\n \"ena... | 1,689 | 405 |
gh_patches_debug_31335 | rasdani/github-patches | git_diff | pfnet__pytorch-pfn-extras-367 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ProgressBar extension doesn't show correct `iters/sec` in ppe==0.5.0
The `ProgressBar` extension shows `iters/sec` as well as the progress bar, but I noticed that in ppe==0.5.0 it becomes always `inf iters/se... | diff --git a/pytorch_pfn_extras/training/extensions/util.py b/pytorch_pfn_extras/training/extensions/util.py
--- a/pytorch_pfn_extras/training/extensions/util.py
+++ b/pytorch_pfn_extras/training/extensions/util.py
@@ -1,8 +1,8 @@
+import collections
import os
import sys
-import queue
import time
-from typing import... | {"golden_diff": "diff --git a/pytorch_pfn_extras/training/extensions/util.py b/pytorch_pfn_extras/training/extensions/util.py\n--- a/pytorch_pfn_extras/training/extensions/util.py\n+++ b/pytorch_pfn_extras/training/extensions/util.py\n@@ -1,8 +1,8 @@\n+import collections\n import os\n import sys\n-import queue\n import... | 2,033 | 493 |
gh_patches_debug_26402 | rasdani/github-patches | git_diff | statsmodels__statsmodels-6654 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Handle pathlib paths with `get_file_obj`
#### Is your feature request related to a problem? Please describe
I'm trying to read a statsmodels.tsa.statespace.sarimax.SARIMAXResults pickle file I've saved. I'd ... | diff --git a/statsmodels/iolib/openfile.py b/statsmodels/iolib/openfile.py
--- a/statsmodels/iolib/openfile.py
+++ b/statsmodels/iolib/openfile.py
@@ -34,13 +34,14 @@
def get_file_obj(fname, mode='r', encoding=None):
"""
- Light wrapper to handle strings and let files (anything else) pass through.
+ Light... | {"golden_diff": "diff --git a/statsmodels/iolib/openfile.py b/statsmodels/iolib/openfile.py\n--- a/statsmodels/iolib/openfile.py\n+++ b/statsmodels/iolib/openfile.py\n@@ -34,13 +34,14 @@\n \n def get_file_obj(fname, mode='r', encoding=None):\n \"\"\"\n- Light wrapper to handle strings and let files (anything els... | 1,067 | 388 |
gh_patches_debug_29404 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-2151 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ID sequence isn't being created for tables
## Description
<!-- A clear and concise description of what the bug is. -->
I cannot add a new record to a new table because the ID does not have a default value. ... | diff --git a/db/tables/operations/split.py b/db/tables/operations/split.py
--- a/db/tables/operations/split.py
+++ b/db/tables/operations/split.py
@@ -89,6 +89,8 @@
fk_column_name,
)
conn.execute(split_ins)
+ update_pk_sequence_to_latest(conn, engine, extracted_table)
+
re... | {"golden_diff": "diff --git a/db/tables/operations/split.py b/db/tables/operations/split.py\n--- a/db/tables/operations/split.py\n+++ b/db/tables/operations/split.py\n@@ -89,6 +89,8 @@\n fk_column_name,\n )\n conn.execute(split_ins)\n+ update_pk_sequence_to_latest(conn, engine, extrac... | 1,674 | 443 |
gh_patches_debug_12548 | rasdani/github-patches | git_diff | mabel-dev__opteryx-1691 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
🪲 VIEWs load error should be in debug mode only
### 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 abo... | diff --git a/opteryx/__version__.py b/opteryx/__version__.py
--- a/opteryx/__version__.py
+++ b/opteryx/__version__.py
@@ -1,4 +1,4 @@
-__build__ = 523
+__build__ = 526
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/o... | {"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__ = 523\n+__build__ = 526\n \n # Licensed under the Apache License, Version 2.0 (the \"License\");\n # you may not use this file except in compliance with ... | 1,248 | 238 |
gh_patches_debug_20772 | rasdani/github-patches | git_diff | nvaccess__nvda-10144 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error in alpha with built-in audacity appmod
### Steps to reproduce:
1. open audacity.
2. select audio. ctrl+a works.
3. press alt+c, and press c until "compresser" is found.
4. press enter.
5. press t... | diff --git a/source/appModules/audacity.py b/source/appModules/audacity.py
--- a/source/appModules/audacity.py
+++ b/source/appModules/audacity.py
@@ -1,9 +1,8 @@
# -*- coding: UTF-8 -*-
-#appModules/audacity.py
-#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2018 NV Access Limited, Robert Hänggi
... | {"golden_diff": "diff --git a/source/appModules/audacity.py b/source/appModules/audacity.py\n--- a/source/appModules/audacity.py\n+++ b/source/appModules/audacity.py\n@@ -1,9 +1,8 @@\n # -*- coding: UTF-8 -*-\r\n-#appModules/audacity.py\r\n-#A part of NonVisual Desktop Access (NVDA)\r\n-#Copyright (C) 2006-2018 NV Acce... | 881 | 339 |
gh_patches_debug_20232 | rasdani/github-patches | git_diff | ansible__ansible-17394 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
network _template not checking arguments correctly
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
lib/ansible/plugins/action/net_template.py
##### ANSIBLE VERSION
devel
##### CONFIGURATION
##### OS / EN... | diff --git a/lib/ansible/plugins/action/net_template.py b/lib/ansible/plugins/action/net_template.py
--- a/lib/ansible/plugins/action/net_template.py
+++ b/lib/ansible/plugins/action/net_template.py
@@ -41,7 +41,7 @@
try:
self._handle_template()
- except ValueError as exc:
+ except... | {"golden_diff": "diff --git a/lib/ansible/plugins/action/net_template.py b/lib/ansible/plugins/action/net_template.py\n--- a/lib/ansible/plugins/action/net_template.py\n+++ b/lib/ansible/plugins/action/net_template.py\n@@ -41,7 +41,7 @@\n \n try:\n self._handle_template()\n- except ValueError... | 1,638 | 235 |
gh_patches_debug_28348 | rasdani/github-patches | git_diff | ibis-project__ibis-3263 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
docs: add blurb about the datafusion backend
After #2918 lands, we need to mention it in the docs.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may c... | diff --git a/ibis/backends/datafusion/__init__.py b/ibis/backends/datafusion/__init__.py
--- a/ibis/backends/datafusion/__init__.py
+++ b/ibis/backends/datafusion/__init__.py
@@ -83,6 +83,20 @@
return tables
def table(self, name, schema=None):
+ """Get an ibis expression representing a DataFusion... | {"golden_diff": "diff --git a/ibis/backends/datafusion/__init__.py b/ibis/backends/datafusion/__init__.py\n--- a/ibis/backends/datafusion/__init__.py\n+++ b/ibis/backends/datafusion/__init__.py\n@@ -83,6 +83,20 @@\n return tables\n \n def table(self, name, schema=None):\n+ \"\"\"Get an ibis expressio... | 1,572 | 401 |
gh_patches_debug_2007 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-5683 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 'datastore 1.7.0'
Major changes are:
- Add support for Python 3.7.
- Drop support for Python 3.4.
- Bugfix: query offsets (#4675).
--- END ISSUE ---
Below are some code segments, each from a re... | diff --git a/datastore/setup.py b/datastore/setup.py
--- a/datastore/setup.py
+++ b/datastore/setup.py
@@ -22,7 +22,7 @@
name = 'google-cloud-datastore'
description = 'Google Cloud Datastore API client library'
-version = '1.6.0'
+version = '1.7.0'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Devel... | {"golden_diff": "diff --git a/datastore/setup.py b/datastore/setup.py\n--- a/datastore/setup.py\n+++ b/datastore/setup.py\n@@ -22,7 +22,7 @@\n \n name = 'google-cloud-datastore'\n description = 'Google Cloud Datastore API client library'\n-version = '1.6.0'\n+version = '1.7.0'\n # Should be one of:\n # 'Development Sta... | 1,115 | 105 |
gh_patches_debug_2550 | rasdani/github-patches | git_diff | semgrep__semgrep-rules-1051 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
python tempfile-without-flush: Don't require .write() for exception?
**Describe the bug**
The `python.lang.correctness.tempfile.flush.tempfile-without-flush` rule has [exceptions](https://github.com/returnto... | diff --git a/python/lang/correctness/tempfile/flush.py b/python/lang/correctness/tempfile/flush.py
--- a/python/lang/correctness/tempfile/flush.py
+++ b/python/lang/correctness/tempfile/flush.py
@@ -61,3 +61,12 @@
print(fout.name)
# ruleid:tempfile-without-flush
cmd = [binary_name, fout.name, *[str(path)... | {"golden_diff": "diff --git a/python/lang/correctness/tempfile/flush.py b/python/lang/correctness/tempfile/flush.py\n--- a/python/lang/correctness/tempfile/flush.py\n+++ b/python/lang/correctness/tempfile/flush.py\n@@ -61,3 +61,12 @@\n print(fout.name)\n # ruleid:tempfile-without-flush\n cmd = [binary_name,... | 1,404 | 153 |
gh_patches_debug_14362 | rasdani/github-patches | git_diff | python-poetry__poetry-620 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Arbitrary equality in pip freeze causes crash
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure the followi... | diff --git a/poetry/repositories/installed_repository.py b/poetry/repositories/installed_repository.py
--- a/poetry/repositories/installed_repository.py
+++ b/poetry/repositories/installed_repository.py
@@ -1,3 +1,5 @@
+import re
+
from poetry.packages import Package
from poetry.utils.env import Env
@@ -17,7 +19,7 ... | {"golden_diff": "diff --git a/poetry/repositories/installed_repository.py b/poetry/repositories/installed_repository.py\n--- a/poetry/repositories/installed_repository.py\n+++ b/poetry/repositories/installed_repository.py\n@@ -1,3 +1,5 @@\n+import re\n+\n from poetry.packages import Package\n from poetry.utils.env impo... | 995 | 174 |
gh_patches_debug_94 | rasdani/github-patches | git_diff | open-mmlab__mmsegmentation-658 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
error in train.py
error in line 134 in mmsegmentation/tools/train.py
model.init_weights() is error
model.init_weight() is ok
--- END ISSUE ---
Below are some code segments, each from a relevant file. ... | diff --git a/mmseg/__init__.py b/mmseg/__init__.py
--- a/mmseg/__init__.py
+++ b/mmseg/__init__.py
@@ -2,7 +2,7 @@
from .version import __version__, version_info
-MMCV_MIN = '1.3.1'
+MMCV_MIN = '1.3.7'
MMCV_MAX = '1.4.0'
| {"golden_diff": "diff --git a/mmseg/__init__.py b/mmseg/__init__.py\n--- a/mmseg/__init__.py\n+++ b/mmseg/__init__.py\n@@ -2,7 +2,7 @@\n \n from .version import __version__, version_info\n \n-MMCV_MIN = '1.3.1'\n+MMCV_MIN = '1.3.7'\n MMCV_MAX = '1.4.0'\n", "issue": "error in train.py\nerror in line 134 in mmsegmentatio... | 581 | 92 |
gh_patches_debug_1570 | rasdani/github-patches | git_diff | statsmodels__statsmodels-578 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PatsyData detection buglet
If exog is None, then is_using_patsy data utility function returns False. It's a quick fix, but I'm starting to use patsy a bit more internally for convenience (e.g., passing in nam... | diff --git a/statsmodels/tools/data.py b/statsmodels/tools/data.py
--- a/statsmodels/tools/data.py
+++ b/statsmodels/tools/data.py
@@ -122,5 +122,6 @@
def _is_using_patsy(endog, exog):
# we get this when a structured array is passed through a formula
- return is_design_matrix(endog) and is_design_matrix(exog... | {"golden_diff": "diff --git a/statsmodels/tools/data.py b/statsmodels/tools/data.py\n--- a/statsmodels/tools/data.py\n+++ b/statsmodels/tools/data.py\n@@ -122,5 +122,6 @@\n \n def _is_using_patsy(endog, exog):\n # we get this when a structured array is passed through a formula\n- return is_design_matrix(endog) a... | 1,451 | 118 |
gh_patches_debug_29826 | rasdani/github-patches | git_diff | getsentry__sentry-python-593 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Memory leak introduced in 0.12.3
Dear maintainers,
I recently noticed that my application containers started going out of memory fairly quickly. Upon investigation, I found that recent upgrade of sentry-sd... | diff --git a/sentry_sdk/worker.py b/sentry_sdk/worker.py
--- a/sentry_sdk/worker.py
+++ b/sentry_sdk/worker.py
@@ -22,7 +22,7 @@
def __init__(self):
# type: () -> None
check_thread_support()
- self._queue = queue.Queue(-1) # type: Queue[Any]
+ self._queue = queue.Queue(30) # type:... | {"golden_diff": "diff --git a/sentry_sdk/worker.py b/sentry_sdk/worker.py\n--- a/sentry_sdk/worker.py\n+++ b/sentry_sdk/worker.py\n@@ -22,7 +22,7 @@\n def __init__(self):\n # type: () -> None\n check_thread_support()\n- self._queue = queue.Queue(-1) # type: Queue[Any]\n+ self._queue =... | 1,683 | 390 |
gh_patches_debug_7727 | rasdani/github-patches | git_diff | bridgecrewio__checkov-5696 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Terraform check "CKV_AZURE_158" - Typo within the name
**Describe the issue**
It seems that there is a typo within the name of the check CKV_AZURE_158 for Terraform resources.
**Examples**
````python
fr... | diff --git a/checkov/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py b/checkov/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py
--- a/checkov/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py
+++ b/checkov/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py b/checkov/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py\n--- a/checkov/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py\n+++ b/checkov/terraform/checks/resource/azure/DatabricksWo... | 777 | 177 |
gh_patches_debug_63151 | rasdani/github-patches | git_diff | frappe__frappe-7705 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hard coded localhost for pgsql setup
The postgresql setup is using `localhost` instead of the `db_host` from the site configuration:
https://github.com/frappe/frappe/blob/17c43b4e1d2506e5b1498e52f3aa6c81277d... | diff --git a/frappe/database/postgres/setup_db.py b/frappe/database/postgres/setup_db.py
--- a/frappe/database/postgres/setup_db.py
+++ b/frappe/database/postgres/setup_db.py
@@ -17,7 +17,7 @@
subprocess_env['PGPASSWORD'] = str(frappe.conf.db_password)
# bootstrap db
subprocess.check_output([
- 'psql', frappe.co... | {"golden_diff": "diff --git a/frappe/database/postgres/setup_db.py b/frappe/database/postgres/setup_db.py\n--- a/frappe/database/postgres/setup_db.py\n+++ b/frappe/database/postgres/setup_db.py\n@@ -17,7 +17,7 @@\n \tsubprocess_env['PGPASSWORD'] = str(frappe.conf.db_password)\n \t# bootstrap db\n \tsubprocess.check_out... | 1,045 | 166 |
gh_patches_debug_1782 | rasdani/github-patches | git_diff | python__python-docs-es-1714 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Translate 'library/http.server.po'
This needs to reach 100% translated.
The rendered version of this file will be available at https://docs.python.org/es/3.10/library/http.server.html once translated.
Meanwh... | diff --git a/scripts/translate.py b/scripts/translate.py
--- a/scripts/translate.py
+++ b/scripts/translate.py
@@ -46,8 +46,8 @@
"``[^`]+``",
"`[^`]+`__",
"`[^`]+`_",
- "\*\*.+\*\*", # bold text between **
- "\*.+\*", # italic text between *
+ "\*\*[^\*]+\*\*", # bold text between **
+ "\*... | {"golden_diff": "diff --git a/scripts/translate.py b/scripts/translate.py\n--- a/scripts/translate.py\n+++ b/scripts/translate.py\n@@ -46,8 +46,8 @@\n \"``[^`]+``\",\n \"`[^`]+`__\",\n \"`[^`]+`_\",\n- \"\\*\\*.+\\*\\*\", # bold text between **\n- \"\\*.+\\*\", # italic text between *\n+ \"\\*\\*... | 1,569 | 137 |
gh_patches_debug_8128 | rasdani/github-patches | git_diff | ethereum__web3.py-1930 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Changed pypiwin32 to pywin32
### What was wrong?
pypiwin32 is just an empty package requiring pywin32, so this can just be required directly. As far as I know, pypiwin32 is only there for historical reasons.... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -82,7 +82,7 @@
"jsonschema>=3.2.0,<4.0.0",
"lru-dict>=1.1.6,<2.0.0",
"protobuf>=3.10.0,<4",
- "pypiwin32>=223;platform_system=='Windows'",
+ "pywin32>=223;platform_system=='Windows'",
"requests>=2.16.0,<3... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -82,7 +82,7 @@\n \"jsonschema>=3.2.0,<4.0.0\",\n \"lru-dict>=1.1.6,<2.0.0\",\n \"protobuf>=3.10.0,<4\",\n- \"pypiwin32>=223;platform_system=='Windows'\",\n+ \"pywin32>=223;platform_system=='Window... | 1,764 | 176 |
gh_patches_debug_9273 | rasdani/github-patches | git_diff | google__fuzzbench-309 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
master cannot pass "make presubmit"
Current master branch has one failed at "``make presubmit``".
To reproduce: ``git clone https://github.com/google/fuzzbench ; cd fuzzbench ; git submodule update --init ... | diff --git a/conftest.py b/conftest.py
--- a/conftest.py
+++ b/conftest.py
@@ -73,9 +73,9 @@
@pytest.fixture
-def experiment(tmp_path, environ): # pylint: disable=redefined-outer-name,unused-argument
+def experiment(environ): # pylint: disable=redefined-outer-name,unused-argument
"""Mock an experiment."""
-... | {"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -73,9 +73,9 @@\n \n \n @pytest.fixture\n-def experiment(tmp_path, environ): # pylint: disable=redefined-outer-name,unused-argument\n+def experiment(environ): # pylint: disable=redefined-outer-name,unused-argument\n \... | 1,205 | 166 |
gh_patches_debug_43702 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-605 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Static/Assets directories in apps
Django says to include app specific static files in a `/static` directory in the root of the particular app (https://docs.djangoproject.com/en/1.11/howto/static-files/). On `... | diff --git a/apps/dashboard/blueprints.py b/apps/dashboard/blueprints.py
--- a/apps/dashboard/blueprints.py
+++ b/apps/dashboard/blueprints.py
@@ -28,7 +28,7 @@
content=[
ideas_phases.CollectPhase(),
],
- image='images/blueprints/brainstorming.svg',
+ image='images/brai... | {"golden_diff": "diff --git a/apps/dashboard/blueprints.py b/apps/dashboard/blueprints.py\n--- a/apps/dashboard/blueprints.py\n+++ b/apps/dashboard/blueprints.py\n@@ -28,7 +28,7 @@\n content=[\n ideas_phases.CollectPhase(),\n ],\n- image='images/blueprints/brainstorming.svg',\n+ ... | 1,946 | 753 |
gh_patches_debug_9626 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-1545 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Jaeger Propagator not handling missing carrier
Python 3.8 / Flask injector 0.17b0
**Steps to reproduce**
If jaeger is the text map and you do not send a carrier header then the parser fails when it trie... | diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py
--- a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py
+++ b/propagator/opente... | {"golden_diff": "diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py\n--- a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py\n+++ ... | 1,885 | 252 |
gh_patches_debug_9572 | rasdani/github-patches | git_diff | ESMCI__cime-1428 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Clean up python in unit_testing
Clean up code in unit_testing/python
--- 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/scripts/lib/CIME/code_checker.py b/scripts/lib/CIME/code_checker.py
--- a/scripts/lib/CIME/code_checker.py
+++ b/scripts/lib/CIME/code_checker.py
@@ -26,7 +26,7 @@
cmd_options += " --init-hook='sys.path.extend((\"%s\",\"%s\",\"%s\"))'"%\
(os.path.join(cimeroot,"scripts","lib"),
os.p... | {"golden_diff": "diff --git a/scripts/lib/CIME/code_checker.py b/scripts/lib/CIME/code_checker.py\n--- a/scripts/lib/CIME/code_checker.py\n+++ b/scripts/lib/CIME/code_checker.py\n@@ -26,7 +26,7 @@\n cmd_options += \" --init-hook='sys.path.extend((\\\"%s\\\",\\\"%s\\\",\\\"%s\\\"))'\"%\\\n (os.path.join(cime... | 1,469 | 173 |
gh_patches_debug_452 | rasdani/github-patches | git_diff | Flexget__Flexget-2652 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dependencies on non pure Python modules
Hi,
Sorry for [x-posting](https://discuss.flexget.com/t/dependencies-on-non-pure-python-modules/5086). This is kind of a development issue so it might fit here bette... | diff --git a/flexget/tray_icon.py b/flexget/tray_icon.py
--- a/flexget/tray_icon.py
+++ b/flexget/tray_icon.py
@@ -17,7 +17,7 @@
_import_success = True
except Exception as e:
- logger.debug('Could not import pystray: {}', e)
+ logger.debug('Could not load tray icon: {}', e)
_import_success = False
| {"golden_diff": "diff --git a/flexget/tray_icon.py b/flexget/tray_icon.py\n--- a/flexget/tray_icon.py\n+++ b/flexget/tray_icon.py\n@@ -17,7 +17,7 @@\n \n _import_success = True\n except Exception as e:\n- logger.debug('Could not import pystray: {}', e)\n+ logger.debug('Could not load tray icon: {}', e)\n ... | 1,818 | 103 |
gh_patches_debug_11938 | rasdani/github-patches | git_diff | inventree__InvenTree-1890 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't start inventree server
It seems that error at `https://api.exchangerate.host/latest` blocks server startup.
```
# curl https://api.exchangerate.host/latest
<html>
<head><title>521 Origin Down</tit... | diff --git a/InvenTree/InvenTree/exchange.py b/InvenTree/InvenTree/exchange.py
--- a/InvenTree/InvenTree/exchange.py
+++ b/InvenTree/InvenTree/exchange.py
@@ -1,4 +1,5 @@
from common.settings import currency_code_default, currency_codes
+from urllib.error import HTTPError, URLError
from djmoney.contrib.exchange.bac... | {"golden_diff": "diff --git a/InvenTree/InvenTree/exchange.py b/InvenTree/InvenTree/exchange.py\n--- a/InvenTree/InvenTree/exchange.py\n+++ b/InvenTree/InvenTree/exchange.py\n@@ -1,4 +1,5 @@\n from common.settings import currency_code_default, currency_codes\n+from urllib.error import HTTPError, URLError\n \n from djmo... | 1,716 | 185 |
gh_patches_debug_29185 | rasdani/github-patches | git_diff | fossasia__open-event-server-4267 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement User Emails
Parent Issue: #4196
Requires #4210 to be merged
- [x] Email verification email - To the user who registered
- [x] A welcome email - After registration. Before email verification.... | diff --git a/app/api/auth.py b/app/api/auth.py
--- a/app/api/auth.py
+++ b/app/api/auth.py
@@ -1,11 +1,14 @@
import base64
+from flask import request, jsonify, abort, make_response, Blueprint
+from sqlalchemy.orm.exc import NoResultFound
-from flask import Blueprint, abort, make_response
-from flask import request, ... | {"golden_diff": "diff --git a/app/api/auth.py b/app/api/auth.py\n--- a/app/api/auth.py\n+++ b/app/api/auth.py\n@@ -1,11 +1,14 @@\n import base64\n+from flask import request, jsonify, abort, make_response, Blueprint\n+from sqlalchemy.orm.exc import NoResultFound\n \n-from flask import Blueprint, abort, make_response\n-f... | 683 | 458 |
gh_patches_debug_11828 | rasdani/github-patches | git_diff | pypi__warehouse-2524 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Validate username format before attempting to flush it to the db
Validate a valid username prior to trying to save it to the database, using the same logic as is already in the database.
---
https://sentry.... | diff --git a/warehouse/accounts/forms.py b/warehouse/accounts/forms.py
--- a/warehouse/accounts/forms.py
+++ b/warehouse/accounts/forms.py
@@ -29,6 +29,18 @@
"a username with under 50 characters."
)
),
+ # the regexp below must match the CheckConstraint
+ ... | {"golden_diff": "diff --git a/warehouse/accounts/forms.py b/warehouse/accounts/forms.py\n--- a/warehouse/accounts/forms.py\n+++ b/warehouse/accounts/forms.py\n@@ -29,6 +29,18 @@\n \"a username with under 50 characters.\"\n )\n ),\n+ # the regexp below must matc... | 1,844 | 196 |
gh_patches_debug_19 | rasdani/github-patches | git_diff | pwndbg__pwndbg-381 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Broken `entry` command
### Description
The `entry` command pass arguments differently then the `run` command.
### Steps to reproduce
```
[dc@dc:pwndbg|dev *$%]$ gdb python
Loaded 113 commands. Type... | diff --git a/pwndbg/prompt.py b/pwndbg/prompt.py
--- a/pwndbg/prompt.py
+++ b/pwndbg/prompt.py
@@ -43,4 +43,5 @@
+
gdb.prompt_hook = prompt_hook
| {"golden_diff": "diff --git a/pwndbg/prompt.py b/pwndbg/prompt.py\n--- a/pwndbg/prompt.py\n+++ b/pwndbg/prompt.py\n@@ -43,4 +43,5 @@\n \n \n \n+\n gdb.prompt_hook = prompt_hook\n", "issue": "Broken `entry` command\n### Description\r\n\r\nThe `entry` command pass arguments differently then the `run` command.\r\n\r\n### ... | 1,227 | 58 |
gh_patches_debug_57501 | rasdani/github-patches | git_diff | dotkom__onlineweb4-1652 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Application for extending membership marks field of study as guest
When someone applies to get their membership prolonged their field of study is set to "guest" instead of what they previously were registered... | diff --git a/apps/approval/views.py b/apps/approval/views.py
--- a/apps/approval/views.py
+++ b/apps/approval/views.py
@@ -101,6 +101,7 @@
application = MembershipApproval(
applicant=request.user,
+ field_of_study=request.user.field_of_study,
new_expiry_date=new_expiratio... | {"golden_diff": "diff --git a/apps/approval/views.py b/apps/approval/views.py\n--- a/apps/approval/views.py\n+++ b/apps/approval/views.py\n@@ -101,6 +101,7 @@\n \n application = MembershipApproval(\n applicant=request.user,\n+ field_of_study=request.user.field_of_study,\n new_... | 1,696 | 88 |
gh_patches_debug_24042 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-4112 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
user front end: make username in idea list bold
**URL:** https://meinberlin-dev.liqd.net/projekte/brainstorming-2/
**user:** any
**expected behaviour:**
**behaviour:** better distinguish username and date... | diff --git a/meinberlin/apps/budgeting/api.py b/meinberlin/apps/budgeting/api.py
--- a/meinberlin/apps/budgeting/api.py
+++ b/meinberlin/apps/budgeting/api.py
@@ -45,17 +45,6 @@
"""
filters = {}
- ordering_choices = [('-created', _('Most recent')), ]
- if self.module.has_feature('rate'... | {"golden_diff": "diff --git a/meinberlin/apps/budgeting/api.py b/meinberlin/apps/budgeting/api.py\n--- a/meinberlin/apps/budgeting/api.py\n+++ b/meinberlin/apps/budgeting/api.py\n@@ -45,17 +45,6 @@\n \"\"\"\n filters = {}\n \n- ordering_choices = [('-created', _('Most recent')), ]\n- if se... | 1,817 | 320 |
gh_patches_debug_28459 | rasdani/github-patches | git_diff | saleor__saleor-336 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Removing category redirects to category update view
Confirmation modal contains "update" button that redirects to update view, instead of sending a POST request to remove the category.
--- END ISSUE ---
B... | diff --git a/saleor/dashboard/category/views.py b/saleor/dashboard/category/views.py
--- a/saleor/dashboard/category/views.py
+++ b/saleor/dashboard/category/views.py
@@ -1,4 +1,6 @@
from django.contrib import messages
+from django.core.urlresolvers import reverse
+from django.http import JsonResponse
from django.sho... | {"golden_diff": "diff --git a/saleor/dashboard/category/views.py b/saleor/dashboard/category/views.py\n--- a/saleor/dashboard/category/views.py\n+++ b/saleor/dashboard/category/views.py\n@@ -1,4 +1,6 @@\n from django.contrib import messages\n+from django.core.urlresolvers import reverse\n+from django.http import JsonRe... | 1,058 | 289 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.