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_19281 | rasdani/github-patches | git_diff | pyinstaller__pyinstaller-7251 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`TypeError: unsupported operand type(s) for |: 'KeyboardModifier' and 'Key'` with PySide 6.4.0.1 application
<!--
Welcome to the PyInstaller issue tracker! Before creating an issue, please heed the following... | diff --git a/PyInstaller/hooks/hook-PySide6.py b/PyInstaller/hooks/hook-PySide6.py
--- a/PyInstaller/hooks/hook-PySide6.py
+++ b/PyInstaller/hooks/hook-PySide6.py
@@ -9,11 +9,17 @@
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#----------------------------------------------------------------... | {"golden_diff": "diff --git a/PyInstaller/hooks/hook-PySide6.py b/PyInstaller/hooks/hook-PySide6.py\n--- a/PyInstaller/hooks/hook-PySide6.py\n+++ b/PyInstaller/hooks/hook-PySide6.py\n@@ -9,11 +9,17 @@\n # SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)\n #------------------------------------------... | 1,600 | 269 |
gh_patches_debug_26508 | rasdani/github-patches | git_diff | gammapy__gammapy-1567 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
What's the correct value for errordef in iminuit?
see https://github.com/gammapy/gammapy/blob/master/gammapy/utils/fitting/iminuit.py#L88
Reminder:
out fit statistic is -2 log (likelihood)
https://github... | diff --git a/gammapy/utils/fitting/iminuit.py b/gammapy/utils/fitting/iminuit.py
--- a/gammapy/utils/fitting/iminuit.py
+++ b/gammapy/utils/fitting/iminuit.py
@@ -36,6 +36,10 @@
opts_minuit = {}
opts_minuit.update(make_minuit_par_kwargs(parameters))
+ # In Gammapy, we have the factor 2 in the likelih... | {"golden_diff": "diff --git a/gammapy/utils/fitting/iminuit.py b/gammapy/utils/fitting/iminuit.py\n--- a/gammapy/utils/fitting/iminuit.py\n+++ b/gammapy/utils/fitting/iminuit.py\n@@ -36,6 +36,10 @@\n opts_minuit = {}\n opts_minuit.update(make_minuit_par_kwargs(parameters))\n \n+ # In Gammapy, we have the... | 1,329 | 355 |
gh_patches_debug_2560 | rasdani/github-patches | git_diff | python-poetry__poetry-1673 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`poetry shell` with fish does not echo in python REPL
- [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/sdi... | diff --git a/poetry/utils/shell.py b/poetry/utils/shell.py
--- a/poetry/utils/shell.py
+++ b/poetry/utils/shell.py
@@ -58,7 +58,7 @@
self._path, ["-i"], dimensions=(terminal.height, terminal.width)
)
- if not self._name == "bash":
+ if self._name == "zsh":
c.se... | {"golden_diff": "diff --git a/poetry/utils/shell.py b/poetry/utils/shell.py\n--- a/poetry/utils/shell.py\n+++ b/poetry/utils/shell.py\n@@ -58,7 +58,7 @@\n self._path, [\"-i\"], dimensions=(terminal.height, terminal.width)\n )\n \n- if not self._name == \"bash\":\n+ if self._nam... | 1,345 | 111 |
gh_patches_debug_34178 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-1127 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add check for mandatory functions in model files
Users are required to implement some functions(e.g, `loss()`) in the model file. We can add some checks for the model file to see if these required functions a... | diff --git a/elasticdl/python/common/model_helper.py b/elasticdl/python/common/model_helper.py
--- a/elasticdl/python/common/model_helper.py
+++ b/elasticdl/python/common/model_helper.py
@@ -14,9 +14,6 @@
return module
-# TODO: Discuss whether we need to support default model
-# function/class names such as `c... | {"golden_diff": "diff --git a/elasticdl/python/common/model_helper.py b/elasticdl/python/common/model_helper.py\n--- a/elasticdl/python/common/model_helper.py\n+++ b/elasticdl/python/common/model_helper.py\n@@ -14,9 +14,6 @@\n return module\n \n \n-# TODO: Discuss whether we need to support default model\n-# functi... | 1,763 | 520 |
gh_patches_debug_39525 | rasdani/github-patches | git_diff | lnbits__lnbits-836 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Poetry does not gracefully shutdown on CTRL+C
This is a bit critical, bad things can happen if LNbits is just killed without finishing off all routines.
Poetry with `poetry run lnbits`:
<img width="700" a... | diff --git a/build.py b/build.py
--- a/build.py
+++ b/build.py
@@ -8,6 +8,7 @@
LNBITS_PATH = path.dirname(path.realpath(__file__)) + "/lnbits"
+
def get_js_vendored(prefer_minified: bool = False) -> List[str]:
paths = get_vendored(".js", prefer_minified)
@@ -71,6 +72,7 @@
def url_for_vendored(abspath: str... | {"golden_diff": "diff --git a/build.py b/build.py\n--- a/build.py\n+++ b/build.py\n@@ -8,6 +8,7 @@\n \n LNBITS_PATH = path.dirname(path.realpath(__file__)) + \"/lnbits\"\n \n+\n def get_js_vendored(prefer_minified: bool = False) -> List[str]:\n paths = get_vendored(\".js\", prefer_minified)\n \n@@ -71,6 +72,7 @@\n ... | 1,709 | 881 |
gh_patches_debug_32972 | rasdani/github-patches | git_diff | cleanlab__cleanlab-980 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Revert version upper bound of termcolor dependency
## Background
In #905 , an upper bound to the version of termcolor was added. This was a temporary fix to pass CI on existing PRs.
https://github.com/c... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -70,10 +70,10 @@
"Natural Language :: English",
# We believe this package works will these versions, but we do not guarantee it!
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.7",
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -70,10 +70,10 @@\n \"Natural Language :: English\",\n # We believe this package works will these versions, but we do not guarantee it!\n \"Programming Language :: Python :: 3\",\n- \"Programming Language... | 1,826 | 427 |
gh_patches_debug_646 | rasdani/github-patches | git_diff | pex-tool__pex-2034 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.120
On the docket:
+ [x] Support REPL command history #2019
+ [x] Using --complete-platform with --resolve-local-platforms should build sdists when local platform provides a subset of complete-... | 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.119"
+__version__ = "2.1.120"
| {"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.119\"\n+__version__ = \"2.1.120\"\n",... | 398 | 98 |
gh_patches_debug_6399 | rasdani/github-patches | git_diff | facebookresearch__hydra-277 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Clean up --cfg
It will be cleaner for --cfg to always take one of job|hydra|all, and not have it default to job.
this will eliminate the problem that occures when --cfg is not the last flag in the command li... | diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py
--- a/hydra/_internal/utils.py
+++ b/hydra/_internal/utils.py
@@ -92,10 +92,8 @@
parser.add_argument(
"--cfg",
"-c",
- const="job",
- nargs="?",
choices=["job", "hydra", "all"],
- help="Show config inst... | {"golden_diff": "diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py\n--- a/hydra/_internal/utils.py\n+++ b/hydra/_internal/utils.py\n@@ -92,10 +92,8 @@\n parser.add_argument(\n \"--cfg\",\n \"-c\",\n- const=\"job\",\n- nargs=\"?\",\n choices=[\"job\", \"hydra\", \... | 1,526 | 152 |
gh_patches_debug_33836 | rasdani/github-patches | git_diff | bridgecrewio__checkov-1166 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to see any CKV2 checks in the list
**Describe the bug**
I posted this on Slack first and was confirmed it's a bug. I can't see any of the CKV2 checks when running `checkov -l`
**Expected behavior**... | diff --git a/checkov/terraform/checks_infra/registry.py b/checkov/terraform/checks_infra/registry.py
--- a/checkov/terraform/checks_infra/registry.py
+++ b/checkov/terraform/checks_infra/registry.py
@@ -25,15 +25,20 @@
def _load_checks_from_dir(self, directory: str):
dir = os.path.expanduser(directory)
... | {"golden_diff": "diff --git a/checkov/terraform/checks_infra/registry.py b/checkov/terraform/checks_infra/registry.py\n--- a/checkov/terraform/checks_infra/registry.py\n+++ b/checkov/terraform/checks_infra/registry.py\n@@ -25,15 +25,20 @@\n \n def _load_checks_from_dir(self, directory: str):\n dir = os.path... | 1,673 | 453 |
gh_patches_debug_801 | rasdani/github-patches | git_diff | google__flax-2407 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Outdated `rich` dependency version
The version of `rich` is currently limited to `rich~=11.1`, causing problems with `pip` dependency resolution when installing with other packages.
https://github.com/goog... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@
"matplotlib", # only needed for tensorboard export
"msgpack",
"optax",
- "rich~=11.1",
+ "rich>=11.1",
"typing_extensions>=4.1.1",
"PyYAML>=5.4.1",
]
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -30,7 +30,7 @@\n \"matplotlib\", # only needed for tensorboard export\n \"msgpack\",\n \"optax\",\n- \"rich~=11.1\",\n+ \"rich>=11.1\",\n \"typing_extensions>=4.1.1\",\n \"PyYAML>=5.4.1\",\n ]\n", "issue": "... | 1,229 | 99 |
gh_patches_debug_7456 | rasdani/github-patches | git_diff | encode__httpx-421 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
HTTPError should be importable frop the top-level httpx package
From #365:
> `HTTPError` is not available at the top level like the other exceptions and like it was in requests. This is a somewhat common e... | diff --git a/httpx/__init__.py b/httpx/__init__.py
--- a/httpx/__init__.py
+++ b/httpx/__init__.py
@@ -27,6 +27,7 @@
ConnectTimeout,
CookieConflict,
DecodingError,
+ HTTPError,
InvalidURL,
NotRedirectResponse,
PoolTimeout,
@@ -97,6 +98,7 @@
"ConnectTimeout",
"CookieConflict",
... | {"golden_diff": "diff --git a/httpx/__init__.py b/httpx/__init__.py\n--- a/httpx/__init__.py\n+++ b/httpx/__init__.py\n@@ -27,6 +27,7 @@\n ConnectTimeout,\n CookieConflict,\n DecodingError,\n+ HTTPError,\n InvalidURL,\n NotRedirectResponse,\n PoolTimeout,\n@@ -97,6 +98,7 @@\n \"ConnectTim... | 1,431 | 129 |
gh_patches_debug_10189 | rasdani/github-patches | git_diff | beetbox__beets-1980 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
hook: Crash when using non-ASCII paths in command template
Using the config
```
hook:
hooks:
- event: album_imported
command: beet convert -ay path:{album.path}
```
and this command
```
beet im... | diff --git a/beetsplug/hook.py b/beetsplug/hook.py
--- a/beetsplug/hook.py
+++ b/beetsplug/hook.py
@@ -47,7 +47,9 @@
self._log.error('invalid command "{0}"', command)
return
- formatted_command = command.format(event=event, **kwargs)
+ unicode_co... | {"golden_diff": "diff --git a/beetsplug/hook.py b/beetsplug/hook.py\n--- a/beetsplug/hook.py\n+++ b/beetsplug/hook.py\n@@ -47,7 +47,9 @@\n self._log.error('invalid command \"{0}\"', command)\n return\n \n- formatted_command = command.format(event=event, **kwargs)\n... | 943 | 127 |
gh_patches_debug_2863 | rasdani/github-patches | git_diff | Kinto__kinto-1786 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove colander deprecations
```
/home/mathieu/Code/Mozilla/kinto/.venv/lib/python3.6/site-packages/cornice/validators/_colander.py:110: DeprecationWarning: Setting schema to a class is deprecated. Set sche... | diff --git a/kinto/core/views/batch.py b/kinto/core/views/batch.py
--- a/kinto/core/views/batch.py
+++ b/kinto/core/views/batch.py
@@ -111,7 +111,7 @@
description='Batch operations')
-@batch.post(schema=BatchRequest,
+@batch.post(schema=BatchRequest(),
validators=(colander_validator,),... | {"golden_diff": "diff --git a/kinto/core/views/batch.py b/kinto/core/views/batch.py\n--- a/kinto/core/views/batch.py\n+++ b/kinto/core/views/batch.py\n@@ -111,7 +111,7 @@\n description='Batch operations')\n \n \n-@batch.post(schema=BatchRequest,\n+@batch.post(schema=BatchRequest(),\n validat... | 1,961 | 100 |
gh_patches_debug_37135 | rasdani/github-patches | git_diff | sopel-irc__sopel-843 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Strip leading . on .tld queries
`.tld .py` should be the same as `.tld py`
--- 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/willie/modules/tld.py b/willie/modules/tld.py
--- a/willie/modules/tld.py
+++ b/willie/modules/tld.py
@@ -24,13 +24,16 @@
def gettld(bot, trigger):
"""Show information about the given Top Level Domain."""
page = web.get(uri)
+ tld = trigger.group(2)
+ if tld[0] == '.':
+ tld = tld[1... | {"golden_diff": "diff --git a/willie/modules/tld.py b/willie/modules/tld.py\n--- a/willie/modules/tld.py\n+++ b/willie/modules/tld.py\n@@ -24,13 +24,16 @@\n def gettld(bot, trigger):\n \"\"\"Show information about the given Top Level Domain.\"\"\"\n page = web.get(uri)\n+ tld = trigger.group(2)\n+ if tld[... | 1,277 | 668 |
gh_patches_debug_25153 | rasdani/github-patches | git_diff | pytorch__pytorch-1404 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dropout documentation is incorrect
"Randomly zeroes some of the elements of the input tensor. The elements to zero are randomized on every forward call."
This is incorrect; the function also scales up by 1... | diff --git a/torch/nn/modules/dropout.py b/torch/nn/modules/dropout.py
--- a/torch/nn/modules/dropout.py
+++ b/torch/nn/modules/dropout.py
@@ -3,9 +3,19 @@
class Dropout(Module):
- r"""Randomly zeroes some of the elements of the input tensor.
+ r"""During training, randomly zeroes some of the elements of the... | {"golden_diff": "diff --git a/torch/nn/modules/dropout.py b/torch/nn/modules/dropout.py\n--- a/torch/nn/modules/dropout.py\n+++ b/torch/nn/modules/dropout.py\n@@ -3,9 +3,19 @@\n \n \n class Dropout(Module):\n- r\"\"\"Randomly zeroes some of the elements of the input tensor.\n+ r\"\"\"During training, randomly zer... | 1,905 | 366 |
gh_patches_debug_4999 | rasdani/github-patches | git_diff | encode__starlette-434 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Path prefix for PATH_INFO with WSGIMiddleware
When mounting an app (e.g. Django) through `WSGIMiddleware` it seems to be required to also adjust `PATH_INFO` accordingly.
With the following, Django would e.... | diff --git a/starlette/middleware/wsgi.py b/starlette/middleware/wsgi.py
--- a/starlette/middleware/wsgi.py
+++ b/starlette/middleware/wsgi.py
@@ -13,7 +13,7 @@
"""
environ = {
"REQUEST_METHOD": scope["method"],
- "SCRIPT_NAME": "",
+ "SCRIPT_NAME": scope.get("root_path", ""),
... | {"golden_diff": "diff --git a/starlette/middleware/wsgi.py b/starlette/middleware/wsgi.py\n--- a/starlette/middleware/wsgi.py\n+++ b/starlette/middleware/wsgi.py\n@@ -13,7 +13,7 @@\n \"\"\"\n environ = {\n \"REQUEST_METHOD\": scope[\"method\"],\n- \"SCRIPT_NAME\": \"\",\n+ \"SCRIPT_NAME\":... | 1,947 | 125 |
gh_patches_debug_22474 | rasdani/github-patches | git_diff | tobymao__sqlglot-3385 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't parse `trim` in TrinoSQL
**Fully reproducible code snippet**
Please include a fully reproducible code snippet or the input sql, dialect, and expected output.
```python
import sqlglot
print(sqlglot._... | diff --git a/sqlglot/dialects/trino.py b/sqlglot/dialects/trino.py
--- a/sqlglot/dialects/trino.py
+++ b/sqlglot/dialects/trino.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from sqlglot import exp
-from sqlglot.dialects.dialect import merge_without_target_sql
+from sqlglot.dialects.dialect import merge_wit... | {"golden_diff": "diff --git a/sqlglot/dialects/trino.py b/sqlglot/dialects/trino.py\n--- a/sqlglot/dialects/trino.py\n+++ b/sqlglot/dialects/trino.py\n@@ -1,7 +1,7 @@\n from __future__ import annotations\n \n from sqlglot import exp\n-from sqlglot.dialects.dialect import merge_without_target_sql\n+from sqlglot.dialects... | 1,899 | 294 |
gh_patches_debug_6777 | rasdani/github-patches | git_diff | nautobot__nautobot-604 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OPTIONS returns all Status choices instead of ones only related to the specific model
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting rep... | diff --git a/nautobot/extras/api/fields.py b/nautobot/extras/api/fields.py
--- a/nautobot/extras/api/fields.py
+++ b/nautobot/extras/api/fields.py
@@ -38,6 +38,12 @@
data = data.lower()
return super().to_internal_value(data)
+ def get_queryset(self):
+ """Only emit status options for t... | {"golden_diff": "diff --git a/nautobot/extras/api/fields.py b/nautobot/extras/api/fields.py\n--- a/nautobot/extras/api/fields.py\n+++ b/nautobot/extras/api/fields.py\n@@ -38,6 +38,12 @@\n data = data.lower()\n return super().to_internal_value(data)\n \n+ def get_queryset(self):\n+ \"\"\"On... | 1,809 | 148 |
gh_patches_debug_19871 | rasdani/github-patches | git_diff | ManimCommunity__manim-1516 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove references to t_min and t_max in ParametricFunction
## Description of bug / unexpected behavior
With PR #1161 the old way of setting the parameter's range (e.g. by setting `t_min` and `t_max`) was r... | diff --git a/manim/mobject/functions.py b/manim/mobject/functions.py
--- a/manim/mobject/functions.py
+++ b/manim/mobject/functions.py
@@ -25,7 +25,7 @@
return np.array((np.sin(2 * t), np.sin(3 * t), 0))
def construct(self):
- func = ParametricFunction(self.func, t_max = T... | {"golden_diff": "diff --git a/manim/mobject/functions.py b/manim/mobject/functions.py\n--- a/manim/mobject/functions.py\n+++ b/manim/mobject/functions.py\n@@ -25,7 +25,7 @@\n return np.array((np.sin(2 * t), np.sin(3 * t), 0))\n \n def construct(self):\n- func = ParametricFunct... | 1,458 | 276 |
gh_patches_debug_3330 | rasdani/github-patches | git_diff | LibraryOfCongress__concordia-240 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Enable Adobe DTM for Analytics (closes #160)
This embeds the code but Adobe’s instructions violate web
performance guidelines and we should review this carefully
to see how much Adobe is affecting site perf... | diff --git a/concordia/context_processors.py b/concordia/context_processors.py
--- a/concordia/context_processors.py
+++ b/concordia/context_processors.py
@@ -6,7 +6,10 @@
Expose some system configuration to the default template context
"""
- return {"SENTRY_PUBLIC_DSN": getattr(settings, "SENTRY_PUBLIC_... | {"golden_diff": "diff --git a/concordia/context_processors.py b/concordia/context_processors.py\n--- a/concordia/context_processors.py\n+++ b/concordia/context_processors.py\n@@ -6,7 +6,10 @@\n Expose some system configuration to the default template context\n \"\"\"\n \n- return {\"SENTRY_PUBLIC_DSN\": geta... | 477 | 134 |
gh_patches_debug_26332 | rasdani/github-patches | git_diff | jupyter__docker-stacks-388 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Consider not writing in user home
All the images (starting from base notebook) write part of the configuration inside the user home folder, and assume that `/home/$NB_USER/work` will be mounted. This has a pr... | diff --git a/scipy-notebook/mplimporthook.py b/scipy-notebook/mplimporthook.py
deleted file mode 100644
--- a/scipy-notebook/mplimporthook.py
+++ /dev/null
@@ -1,55 +0,0 @@
-"""Startup script for IPython kernel.
-
-Installs an import hook to configure the matplotlib backend on the fly.
-
-Originally from @minrk at
-ht... | {"golden_diff": "diff --git a/scipy-notebook/mplimporthook.py b/scipy-notebook/mplimporthook.py\ndeleted file mode 100644\n--- a/scipy-notebook/mplimporthook.py\n+++ /dev/null\n@@ -1,55 +0,0 @@\n-\"\"\"Startup script for IPython kernel.\n-\n-Installs an import hook to configure the matplotlib backend on the fly.\n-\n-O... | 812 | 463 |
gh_patches_debug_14024 | rasdani/github-patches | git_diff | ivy-llc__ivy-16042 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cosine_similarity
#15051
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/n... | diff --git a/ivy/functional/frontends/paddle/nn/functional/common.py b/ivy/functional/frontends/paddle/nn/functional/common.py
--- a/ivy/functional/frontends/paddle/nn/functional/common.py
+++ b/ivy/functional/frontends/paddle/nn/functional/common.py
@@ -1 +1,25 @@
# local
+import ivy
+from ivy.functional.frontends.pa... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/nn/functional/common.py b/ivy/functional/frontends/paddle/nn/functional/common.py\n--- a/ivy/functional/frontends/paddle/nn/functional/common.py\n+++ b/ivy/functional/frontends/paddle/nn/functional/common.py\n@@ -1 +1,25 @@\n # local\n+import ivy\n+from ivy.... | 283 | 380 |
gh_patches_debug_31672 | rasdani/github-patches | git_diff | python-discord__bot-1088 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Catch error when source command cannot retrieve lines or file
Sentry Issue: [BOT-7K](https://sentry.io/organizations/python-discord/issues/1816540252/?referrer=github_integration)
This happens if the targe... | diff --git a/bot/cogs/source.py b/bot/cogs/source.py
--- a/bot/cogs/source.py
+++ b/bot/cogs/source.py
@@ -60,11 +60,12 @@
await ctx.send(embed=embed)
def get_source_link(self, source_item: SourceType) -> Tuple[str, str, Optional[int]]:
- """Build GitHub link of source item, return this link, fil... | {"golden_diff": "diff --git a/bot/cogs/source.py b/bot/cogs/source.py\n--- a/bot/cogs/source.py\n+++ b/bot/cogs/source.py\n@@ -60,11 +60,12 @@\n await ctx.send(embed=embed)\n \n def get_source_link(self, source_item: SourceType) -> Tuple[str, str, Optional[int]]:\n- \"\"\"Build GitHub link of source ... | 1,985 | 423 |
gh_patches_debug_38915 | rasdani/github-patches | git_diff | lisa-lab__pylearn2-1512 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
speed up NanGuardMode on GPU and move to Theano.
This can be done as in gh-1054. Do the reduction on the GPU, then this will transfer much less data.
The CudaNdarray object do not support many reduction, but... | diff --git a/pylearn2/devtools/nan_guard.py b/pylearn2/devtools/nan_guard.py
--- a/pylearn2/devtools/nan_guard.py
+++ b/pylearn2/devtools/nan_guard.py
@@ -11,6 +11,8 @@
import logging
from theano.compile import Mode
import theano
+import theano.tensor as T
+import theano.sandbox.cuda as cuda
import numpy as np
fro... | {"golden_diff": "diff --git a/pylearn2/devtools/nan_guard.py b/pylearn2/devtools/nan_guard.py\n--- a/pylearn2/devtools/nan_guard.py\n+++ b/pylearn2/devtools/nan_guard.py\n@@ -11,6 +11,8 @@\n import logging\n from theano.compile import Mode\n import theano\n+import theano.tensor as T\n+import theano.sandbox.cuda as cuda... | 1,424 | 666 |
gh_patches_debug_12776 | rasdani/github-patches | git_diff | platformsh__platformsh-docs-2105 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
:arrow_up: Update MeiliSearch
### What needs to be documented?
We should update MeiliSearch to version 0.25. This means we have to change how we manage API keys. It does mean we can create more keys for mo... | diff --git a/search/main.py b/search/main.py
--- a/search/main.py
+++ b/search/main.py
@@ -119,10 +119,14 @@
# Delete previous index
if len(client.get_indexes()):
- client.get_index(self.docs_index).delete()
+ client.index(self.docs_index).delete()
# Create a new ind... | {"golden_diff": "diff --git a/search/main.py b/search/main.py\n--- a/search/main.py\n+++ b/search/main.py\n@@ -119,10 +119,14 @@\n \n # Delete previous index\n if len(client.get_indexes()):\n- client.get_index(self.docs_index).delete()\n+ client.index(self.docs_index).delete()\n \n... | 1,861 | 185 |
gh_patches_debug_5561 | rasdani/github-patches | git_diff | Showndarya__Hacktoberfest-545 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make JSON linting more verbose ?
Currently we simply check :
1. json is valid
2. json contains the keys we want
3. those keys are not empty
the problem is with step 1, it's not very helpful if people ha... | diff --git a/.travis.py b/.travis.py
--- a/.travis.py
+++ b/.travis.py
@@ -34,7 +34,7 @@
file_content = json.loads(data_file.read())
except json.decoder.JSONDecodeError:
there_was_an_error = True
- print("🔥 JSON could not be parsed.")
+ print(f"🔥 JSON could not be parsed. Foll... | {"golden_diff": "diff --git a/.travis.py b/.travis.py\n--- a/.travis.py\n+++ b/.travis.py\n@@ -34,7 +34,7 @@\n file_content = json.loads(data_file.read())\n except json.decoder.JSONDecodeError:\n there_was_an_error = True\n- print(\"\ud83d\udd25 JSON could not be parsed.\")\n+ prin... | 978 | 128 |
gh_patches_debug_38657 | rasdani/github-patches | git_diff | litestar-org__litestar-1780 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/usin... | diff --git a/litestar/contrib/sqlalchemy/types.py b/litestar/contrib/sqlalchemy/types.py
--- a/litestar/contrib/sqlalchemy/types.py
+++ b/litestar/contrib/sqlalchemy/types.py
@@ -4,11 +4,12 @@
from base64 import b64decode
from typing import TYPE_CHECKING, Any, cast
+from sqlalchemy import text, util
from sqlalchem... | {"golden_diff": "diff --git a/litestar/contrib/sqlalchemy/types.py b/litestar/contrib/sqlalchemy/types.py\n--- a/litestar/contrib/sqlalchemy/types.py\n+++ b/litestar/contrib/sqlalchemy/types.py\n@@ -4,11 +4,12 @@\n from base64 import b64decode\n from typing import TYPE_CHECKING, Any, cast\n \n+from sqlalchemy import te... | 1,496 | 681 |
gh_patches_debug_19016 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-1401 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[PS-1] RPC service `pull_embedding_vector` implementation
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `... | diff --git a/elasticdl/python/ps/servicer.py b/elasticdl/python/ps/servicer.py
--- a/elasticdl/python/ps/servicer.py
+++ b/elasticdl/python/ps/servicer.py
@@ -4,6 +4,7 @@
from elasticdl.proto import elasticdl_pb2, elasticdl_pb2_grpc
from elasticdl.python.common.dtypes import dtype_numpy_to_tensor
+from elasticdl.py... | {"golden_diff": "diff --git a/elasticdl/python/ps/servicer.py b/elasticdl/python/ps/servicer.py\n--- a/elasticdl/python/ps/servicer.py\n+++ b/elasticdl/python/ps/servicer.py\n@@ -4,6 +4,7 @@\n \n from elasticdl.proto import elasticdl_pb2, elasticdl_pb2_grpc\n from elasticdl.python.common.dtypes import dtype_numpy_to_te... | 864 | 255 |
gh_patches_debug_40818 | rasdani/github-patches | git_diff | UTNkar__moore-195 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use person number for appoint->overturn field
<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se -->
### Prerequisites
* [X] Put an X be... | diff --git a/src/involvement/forms.py b/src/involvement/forms.py
--- a/src/involvement/forms.py
+++ b/src/involvement/forms.py
@@ -3,6 +3,7 @@
from django.utils.translation import ugettext_lazy as _
from involvement.models import Application, Reference
+from members.forms import PersonNumberField
from utils.forms ... | {"golden_diff": "diff --git a/src/involvement/forms.py b/src/involvement/forms.py\n--- a/src/involvement/forms.py\n+++ b/src/involvement/forms.py\n@@ -3,6 +3,7 @@\n from django.utils.translation import ugettext_lazy as _\n \n from involvement.models import Application, Reference\n+from members.forms import PersonNumber... | 1,909 | 610 |
gh_patches_debug_16671 | rasdani/github-patches | git_diff | CiviWiki__OpenCiviWiki-1116 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG]: FrontEnd routing issues
### Description
The header in the application routes the application incorrectly and needs to be fixed. If it routes the anchor tag incorrectly, we'll be having a nested rout... | diff --git a/project/frontend_views/urls.py b/project/frontend_views/urls.py
--- a/project/frontend_views/urls.py
+++ b/project/frontend_views/urls.py
@@ -3,10 +3,10 @@
urlpatterns = [
path("about/", views.about_view, name="about"),
- path("support_us/", views.support_us_view, name="support us"),
- path("... | {"golden_diff": "diff --git a/project/frontend_views/urls.py b/project/frontend_views/urls.py\n--- a/project/frontend_views/urls.py\n+++ b/project/frontend_views/urls.py\n@@ -3,10 +3,10 @@\n \n urlpatterns = [\n path(\"about/\", views.about_view, name=\"about\"),\n- path(\"support_us/\", views.support_us_view, n... | 574 | 254 |
gh_patches_debug_23139 | rasdani/github-patches | git_diff | Pyomo__pyomo-2740 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecate the old 'pyomo' command syntax
In earlier releases, we supported commands like
` pyomo --solver=glpk foo.py bar.dat`
And we moved to a nested pyomo command, which uses the following syntax:
` p... | diff --git a/pyomo/scripting/pyomo_main.py b/pyomo/scripting/pyomo_main.py
--- a/pyomo/scripting/pyomo_main.py
+++ b/pyomo/scripting/pyomo_main.py
@@ -11,6 +11,7 @@
import sys
import copy
+from pyomo.common.deprecation import deprecation_warning
try:
import pkg_resources
@@ -59,13 +60,16 @@
#
if n... | {"golden_diff": "diff --git a/pyomo/scripting/pyomo_main.py b/pyomo/scripting/pyomo_main.py\n--- a/pyomo/scripting/pyomo_main.py\n+++ b/pyomo/scripting/pyomo_main.py\n@@ -11,6 +11,7 @@\n \n import sys\n import copy\n+from pyomo.common.deprecation import deprecation_warning\n \n try:\n import pkg_resources\n@@ -59,1... | 1,363 | 306 |
gh_patches_debug_21797 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-664 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
403 attempting to login

It looks like if I open another tab I am... | diff --git a/bookwyrm/views/authentication.py b/bookwyrm/views/authentication.py
--- a/bookwyrm/views/authentication.py
+++ b/bookwyrm/views/authentication.py
@@ -6,6 +6,7 @@
from django.template.response import TemplateResponse
from django.utils import timezone
from django.utils.decorators import method_decorator
+... | {"golden_diff": "diff --git a/bookwyrm/views/authentication.py b/bookwyrm/views/authentication.py\n--- a/bookwyrm/views/authentication.py\n+++ b/bookwyrm/views/authentication.py\n@@ -6,6 +6,7 @@\n from django.template.response import TemplateResponse\n from django.utils import timezone\n from django.utils.decorators im... | 1,454 | 205 |
gh_patches_debug_18116 | rasdani/github-patches | git_diff | beeware__toga-2139 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Android Read-only Multi-line text input displays suggestions (Spell Checking)
### Describe the bug
When using the "MultilineTextInput" with the "readonly" parameter set to "True" on Android, it will suggest ... | diff --git a/android/src/toga_android/widgets/textinput.py b/android/src/toga_android/widgets/textinput.py
--- a/android/src/toga_android/widgets/textinput.py
+++ b/android/src/toga_android/widgets/textinput.py
@@ -77,9 +77,19 @@
if readonly:
# Implicitly calls setFocusableInTouchMode(False)
... | {"golden_diff": "diff --git a/android/src/toga_android/widgets/textinput.py b/android/src/toga_android/widgets/textinput.py\n--- a/android/src/toga_android/widgets/textinput.py\n+++ b/android/src/toga_android/widgets/textinput.py\n@@ -77,9 +77,19 @@\n if readonly:\n # Implicitly calls setFocusableIn... | 1,670 | 234 |
gh_patches_debug_14420 | rasdani/github-patches | git_diff | pyinstaller__pyinstaller-6774 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
XDG_DATA_DIRS environment variable being overriden when running packaged app
I have a simple app that runs a local Flask web server and opens a web browser to show it on start up using the following command: ... | diff --git a/PyInstaller/hooks/rthooks/pyi_rth_glib.py b/PyInstaller/hooks/rthooks/pyi_rth_glib.py
--- a/PyInstaller/hooks/rthooks/pyi_rth_glib.py
+++ b/PyInstaller/hooks/rthooks/pyi_rth_glib.py
@@ -12,4 +12,20 @@
import os
import sys
-os.environ['XDG_DATA_DIRS'] = os.path.join(sys._MEIPASS, 'share')
+# Prepend the... | {"golden_diff": "diff --git a/PyInstaller/hooks/rthooks/pyi_rth_glib.py b/PyInstaller/hooks/rthooks/pyi_rth_glib.py\n--- a/PyInstaller/hooks/rthooks/pyi_rth_glib.py\n+++ b/PyInstaller/hooks/rthooks/pyi_rth_glib.py\n@@ -12,4 +12,20 @@\n import os\n import sys\n \n-os.environ['XDG_DATA_DIRS'] = os.path.join(sys._MEIPASS,... | 769 | 333 |
gh_patches_debug_28621 | rasdani/github-patches | git_diff | conan-io__conan-center-index-20413 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cocoyaxi: make deprecated
Specify library name and version: **cocoyaxi/***
---
- [x] I've read the [contributing guidelines](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md).... | diff --git a/recipes/cocoyaxi/all/conanfile.py b/recipes/cocoyaxi/all/conanfile.py
--- a/recipes/cocoyaxi/all/conanfile.py
+++ b/recipes/cocoyaxi/all/conanfile.py
@@ -30,6 +30,7 @@
"with_libcurl": False,
"with_openssl": False,
}
+ deprecated = "coost"
def config_options(self):
... | {"golden_diff": "diff --git a/recipes/cocoyaxi/all/conanfile.py b/recipes/cocoyaxi/all/conanfile.py\n--- a/recipes/cocoyaxi/all/conanfile.py\n+++ b/recipes/cocoyaxi/all/conanfile.py\n@@ -30,6 +30,7 @@\n \"with_libcurl\": False,\n \"with_openssl\": False,\n }\n+ deprecated = \"coost\"\n \n def... | 1,504 | 385 |
gh_patches_debug_11424 | rasdani/github-patches | git_diff | cobbler__cobbler-3552 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SafeConfigParser was removed in 3.12
### Describe the bug
From https://docs.python.org/3.12/whatsnew/3.12.html:
Several names deprecated in the configparser way back in 3.2 have been removed per gh-8933... | diff --git a/cobbler/modules/authorization/configfile.py b/cobbler/modules/authorization/configfile.py
--- a/cobbler/modules/authorization/configfile.py
+++ b/cobbler/modules/authorization/configfile.py
@@ -10,7 +10,7 @@
import os
-from configparser import SafeConfigParser
+from configparser import ConfigParser
f... | {"golden_diff": "diff --git a/cobbler/modules/authorization/configfile.py b/cobbler/modules/authorization/configfile.py\n--- a/cobbler/modules/authorization/configfile.py\n+++ b/cobbler/modules/authorization/configfile.py\n@@ -10,7 +10,7 @@\n \n \n import os\n-from configparser import SafeConfigParser\n+from configpars... | 1,315 | 161 |
gh_patches_debug_19861 | rasdani/github-patches | git_diff | doccano__doccano-1958 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug report] Static files are not copied on pip installation
How to reproduce the behaviour
---------
Seems like (some?) static files are not copied on pip installation.
For instance `http://site.com/favic... | diff --git a/backend/config/urls.py b/backend/config/urls.py
--- a/backend/config/urls.py
+++ b/backend/config/urls.py
@@ -15,6 +15,7 @@
"""
import os
import re
+from pathlib import Path
from django.conf import settings
from django.contrib import admin
@@ -36,6 +37,7 @@
urlpatterns = []
if settings.DEBUG or ... | {"golden_diff": "diff --git a/backend/config/urls.py b/backend/config/urls.py\n--- a/backend/config/urls.py\n+++ b/backend/config/urls.py\n@@ -15,6 +15,7 @@\n \"\"\"\n import os\n import re\n+from pathlib import Path\n \n from django.conf import settings\n from django.contrib import admin\n@@ -36,6 +37,7 @@\n \n urlpat... | 1,121 | 223 |
gh_patches_debug_3129 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-3523 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Demo is broken for 0.1.6
## Description
<!-- A clear and concise description of what the bug is. -->
The demo can't be deployed with the current `master` branch (0.1.6)
The reasons are:
- We didn't ... | diff --git a/demo/settings.py b/demo/settings.py
--- a/demo/settings.py
+++ b/demo/settings.py
@@ -10,6 +10,9 @@
"demo.middleware.LiveDemoModeMiddleware",
]
+
+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
+
MATHESAR_MODE = 'PRODUCTION'
MATHESAR_LIVE_DEMO = True
MATHESAR_LIVE_DEMO_USERNAME = ... | {"golden_diff": "diff --git a/demo/settings.py b/demo/settings.py\n--- a/demo/settings.py\n+++ b/demo/settings.py\n@@ -10,6 +10,9 @@\n \"demo.middleware.LiveDemoModeMiddleware\",\n ]\n \n+\n+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\n+\n MATHESAR_MODE = 'PRODUCTION'\n MATHESAR_LIVE_DEMO = True\n... | 661 | 114 |
gh_patches_debug_43254 | rasdani/github-patches | git_diff | streamlink__streamlink-4759 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plugins.atresplayer: Live streams is not working.
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink... | diff --git a/src/streamlink/plugins/atresplayer.py b/src/streamlink/plugins/atresplayer.py
--- a/src/streamlink/plugins/atresplayer.py
+++ b/src/streamlink/plugins/atresplayer.py
@@ -7,12 +7,12 @@
import logging
import re
+from urllib.parse import urlparse
from streamlink.plugin import Plugin, pluginmatcher
fro... | {"golden_diff": "diff --git a/src/streamlink/plugins/atresplayer.py b/src/streamlink/plugins/atresplayer.py\n--- a/src/streamlink/plugins/atresplayer.py\n+++ b/src/streamlink/plugins/atresplayer.py\n@@ -7,12 +7,12 @@\n \n import logging\n import re\n+from urllib.parse import urlparse\n \n from streamlink.plugin import ... | 1,463 | 920 |
gh_patches_debug_81 | rasdani/github-patches | git_diff | ocadotechnology__aimmo-60 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix warning about deprecation of TEMPLATE_DEBUG
When starting aimmo locally the following message is displayed:
> WARNINGS:
> ?: (1_8.W001) The standalone TEMPLATE_\* settings were deprecated in Django 1.8 a... | diff --git a/example_project/example_project/settings.py b/example_project/example_project/settings.py
--- a/example_project/example_project/settings.py
+++ b/example_project/example_project/settings.py
@@ -38,7 +38,6 @@
import os
DEBUG = True
-TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
| {"golden_diff": "diff --git a/example_project/example_project/settings.py b/example_project/example_project/settings.py\n--- a/example_project/example_project/settings.py\n+++ b/example_project/example_project/settings.py\n@@ -38,7 +38,6 @@\n import os\n \n DEBUG = True\n-TEMPLATE_DEBUG = DEBUG\n \n DATABASES = {\n ... | 1,424 | 70 |
gh_patches_debug_38408 | rasdani/github-patches | git_diff | great-expectations__great_expectations-5077 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of th... | diff --git a/great_expectations/rule_based_profiler/data_assistant/data_assistant_dispatcher.py b/great_expectations/rule_based_profiler/data_assistant/data_assistant_dispatcher.py
--- a/great_expectations/rule_based_profiler/data_assistant/data_assistant_dispatcher.py
+++ b/great_expectations/rule_based_profiler/data_... | {"golden_diff": "diff --git a/great_expectations/rule_based_profiler/data_assistant/data_assistant_dispatcher.py b/great_expectations/rule_based_profiler/data_assistant/data_assistant_dispatcher.py\n--- a/great_expectations/rule_based_profiler/data_assistant/data_assistant_dispatcher.py\n+++ b/great_expectations/rule_b... | 1,374 | 625 |
gh_patches_debug_13415 | rasdani/github-patches | git_diff | AnalogJ__lexicon-106 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
function update_record() in namesilo.py has wrong query parameter
origin: data['rdata'] = content
modified: data['rrvalue'] = content
--- END ISSUE ---
Below are some code segments, each from a relevant fi... | diff --git a/lexicon/providers/namesilo.py b/lexicon/providers/namesilo.py
--- a/lexicon/providers/namesilo.py
+++ b/lexicon/providers/namesilo.py
@@ -75,7 +75,7 @@
if name:
data['rrhost'] = self._relative_name(name)
if content:
- data['rdata'] = content
+ data['rrva... | {"golden_diff": "diff --git a/lexicon/providers/namesilo.py b/lexicon/providers/namesilo.py\n--- a/lexicon/providers/namesilo.py\n+++ b/lexicon/providers/namesilo.py\n@@ -75,7 +75,7 @@\n if name:\n data['rrhost'] = self._relative_name(name)\n if content:\n- data['rdata'] = content... | 1,618 | 189 |
gh_patches_debug_16041 | rasdani/github-patches | git_diff | pypa__setuptools-3709 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] AttributeError: module 'distutils.log' has no attribute 'warning'
### setuptools version
setuptools==65.6.2
### Python version
Python 3.8.15
### OS
macOS 12.5.1
### Additional environment informat... | diff --git a/setuptools/logging.py b/setuptools/logging.py
--- a/setuptools/logging.py
+++ b/setuptools/logging.py
@@ -1,4 +1,5 @@
import sys
+import inspect
import logging
import distutils.log
from . import monkey
@@ -22,7 +23,7 @@
handlers = err_handler, out_handler
logging.basicConfig(
format=... | {"golden_diff": "diff --git a/setuptools/logging.py b/setuptools/logging.py\n--- a/setuptools/logging.py\n+++ b/setuptools/logging.py\n@@ -1,4 +1,5 @@\n import sys\n+import inspect\n import logging\n import distutils.log\n from . import monkey\n@@ -22,7 +23,7 @@\n handlers = err_handler, out_handler\n logging.b... | 1,468 | 165 |
gh_patches_debug_6045 | rasdani/github-patches | git_diff | ManimCommunity__manim-509 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ValueTracker must support increment also using +=
Just what the title says. Here's an example
```python
class Test(Scene):
def construct(self):
tracker = ValueTracker(0.0)
tracker.se... | diff --git a/manim/mobject/value_tracker.py b/manim/mobject/value_tracker.py
--- a/manim/mobject/value_tracker.py
+++ b/manim/mobject/value_tracker.py
@@ -57,6 +57,10 @@
def increment_value(self, d_value):
self.set_value(self.get_value() + d_value)
+ def __iadd__(self, d_value):
+ self.increme... | {"golden_diff": "diff --git a/manim/mobject/value_tracker.py b/manim/mobject/value_tracker.py\n--- a/manim/mobject/value_tracker.py\n+++ b/manim/mobject/value_tracker.py\n@@ -57,6 +57,10 @@\n def increment_value(self, d_value):\n self.set_value(self.get_value() + d_value)\n \n+ def __iadd__(self, d_value... | 1,168 | 135 |
gh_patches_debug_32578 | rasdani/github-patches | git_diff | elastic__apm-agent-python-1566 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tornado <6.0 still tries to instrument (and fails with cryptic warning)
Flower version is flower==0.9.3
elastic-apm==6.7.2
Flower service is not working for elastic-apm==6.7.2.
Can you please suggest wh... | diff --git a/elasticapm/instrumentation/packages/tornado.py b/elasticapm/instrumentation/packages/tornado.py
--- a/elasticapm/instrumentation/packages/tornado.py
+++ b/elasticapm/instrumentation/packages/tornado.py
@@ -35,9 +35,25 @@
from elasticapm.instrumentation.packages.asyncio.base import AbstractInstrumentedModu... | {"golden_diff": "diff --git a/elasticapm/instrumentation/packages/tornado.py b/elasticapm/instrumentation/packages/tornado.py\n--- a/elasticapm/instrumentation/packages/tornado.py\n+++ b/elasticapm/instrumentation/packages/tornado.py\n@@ -35,9 +35,25 @@\n from elasticapm.instrumentation.packages.asyncio.base import Abs... | 1,863 | 438 |
gh_patches_debug_56182 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-1562 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
prompt.read_user_dict() is broken due to click upgrade from 7.1.2 to 8.0.0
* Cookiecutter version: 1.7.3
* Template project url: -
* Python version: 3.9.5
* Operating System: macOS Catalina 10.15.7
### ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@
requirements = [
'binaryornot>=0.4.4',
'Jinja2>=2.7,<4.0.0',
- 'click>=7.0',
+ 'click>=7.0,<8.0.0',
'pyyaml>=5.3.1',
'jinja2-time>=0.2.0',
'python-slugify>=4.0.0',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -10,7 +10,7 @@\n requirements = [\n 'binaryornot>=0.4.4',\n 'Jinja2>=2.7,<4.0.0',\n- 'click>=7.0',\n+ 'click>=7.0,<8.0.0',\n 'pyyaml>=5.3.1',\n 'jinja2-time>=0.2.0',\n 'python-slugify>=4.0.0',\n", "issue": "p... | 1,960 | 124 |
gh_patches_debug_3807 | rasdani/github-patches | git_diff | quantumlib__Cirq-3574 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docs build is failing
Since the black formatter merge the RTD builds are failing with some weird pip error:
https://readthedocs.org/projects/cirq/builds/
Need to look into it and resolve it if the error... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,7 @@
url='http://github.com/quantumlib/cirq',
author='The Cirq Developers',
author_email='cirq@googlegroups.com',
- python_requires=('>=3.6.0'),
+ python_requires=('>=3.7.0'),
install_requires=requirements,
extras... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -62,7 +62,7 @@\n url='http://github.com/quantumlib/cirq',\n author='The Cirq Developers',\n author_email='cirq@googlegroups.com',\n- python_requires=('>=3.6.0'),\n+ python_requires=('>=3.7.0'),\n install_requires... | 1,207 | 107 |
gh_patches_debug_2706 | rasdani/github-patches | git_diff | fossasia__open-event-server-4302 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Custom-forms: Change data.type in custom-form
**I'm submitting a ...** (check one with "x")
- [x] bug report
- [ ] feature request
- [ ] support request => Please do not submit support requests here, inst... | diff --git a/app/api/custom_forms.py b/app/api/custom_forms.py
--- a/app/api/custom_forms.py
+++ b/app/api/custom_forms.py
@@ -24,7 +24,7 @@
"""
Meta class for CustomForm Schema
"""
- type_ = 'custom_form'
+ type_ = 'custom-form'
self_view = 'v1.custom_form_detail'
... | {"golden_diff": "diff --git a/app/api/custom_forms.py b/app/api/custom_forms.py\n--- a/app/api/custom_forms.py\n+++ b/app/api/custom_forms.py\n@@ -24,7 +24,7 @@\n \"\"\"\n Meta class for CustomForm Schema\n \"\"\"\n- type_ = 'custom_form'\n+ type_ = 'custom-form'\n self_vie... | 1,652 | 105 |
gh_patches_debug_37642 | rasdani/github-patches | git_diff | learningequality__kolibri-12059 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Feature Request: Add --manifest-only option to exportcontent
My understanding is that 0.16 will generate a channel manifest during
`kolibri manage exportcontent`
My request is that you add an option th... | diff --git a/kolibri/core/content/management/commands/exportcontent.py b/kolibri/core/content/management/commands/exportcontent.py
--- a/kolibri/core/content/management/commands/exportcontent.py
+++ b/kolibri/core/content/management/commands/exportcontent.py
@@ -60,6 +60,12 @@
parser.add_argument("channel_id... | {"golden_diff": "diff --git a/kolibri/core/content/management/commands/exportcontent.py b/kolibri/core/content/management/commands/exportcontent.py\n--- a/kolibri/core/content/management/commands/exportcontent.py\n+++ b/kolibri/core/content/management/commands/exportcontent.py\n@@ -60,6 +60,12 @@\n \n parser.ad... | 1,951 | 574 |
gh_patches_debug_227 | rasdani/github-patches | git_diff | sktime__sktime-3618 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] ShapeletTransformClassifier numba error when dtype is not float64
**Describe the bug**
Seems that when using `ShapeletTransformClassifier` there is some Numba accelerated functions that break if the da... | diff --git a/sktime/utils/numba/general.py b/sktime/utils/numba/general.py
--- a/sktime/utils/numba/general.py
+++ b/sktime/utils/numba/general.py
@@ -34,6 +34,5 @@
if std > 0:
X_n = (X - np.mean(X)) / std
else:
- X_n = np.zeros(len(X))
-
+ X_n = X - np.mean(X)
return X_n
| {"golden_diff": "diff --git a/sktime/utils/numba/general.py b/sktime/utils/numba/general.py\n--- a/sktime/utils/numba/general.py\n+++ b/sktime/utils/numba/general.py\n@@ -34,6 +34,5 @@\n if std > 0:\n X_n = (X - np.mean(X)) / std\n else:\n- X_n = np.zeros(len(X))\n-\n+ X_n = X - np.mean(X)... | 1,189 | 111 |
gh_patches_debug_20253 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-901 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`mathesar_temp_schema` should be hidden
## Description
<!-- A clear and concise description of what the bug is. -->
Currently, the system schema `mathesar_temp_schema` is returned as a standard schema, an... | diff --git a/db/constants.py b/db/constants.py
--- a/db/constants.py
+++ b/db/constants.py
@@ -1,3 +1,4 @@
MATHESAR_PREFIX = "mathesar_"
ID = "id"
ID_ORIGINAL = "id_original"
+INFERENCE_SCHEMA = f"{MATHESAR_PREFIX}inference_schema"
diff --git a/db/schemas/operations/select.py b/db/schemas/operations/select.py
--- a/... | {"golden_diff": "diff --git a/db/constants.py b/db/constants.py\n--- a/db/constants.py\n+++ b/db/constants.py\n@@ -1,3 +1,4 @@\n MATHESAR_PREFIX = \"mathesar_\"\n ID = \"id\"\n ID_ORIGINAL = \"id_original\"\n+INFERENCE_SCHEMA = f\"{MATHESAR_PREFIX}inference_schema\"\ndiff --git a/db/schemas/operations/select.py b/db/sc... | 1,606 | 338 |
gh_patches_debug_50801 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-6841 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Container: Regional Cluster support for GKE clusters
I'm unable to get or create regional clusters using the container_v1 client APIs. The [documentation](https://googleapis.github.io/google-cloud-python/la... | diff --git a/container/setup.py b/container/setup.py
--- a/container/setup.py
+++ b/container/setup.py
@@ -22,7 +22,7 @@
name = 'google-cloud-container'
description = 'Google Container Engine API client library'
-version = '0.1.1'
+version = '0.2.0'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Deve... | {"golden_diff": "diff --git a/container/setup.py b/container/setup.py\n--- a/container/setup.py\n+++ b/container/setup.py\n@@ -22,7 +22,7 @@\n \n name = 'google-cloud-container'\n description = 'Google Container Engine API client library'\n-version = '0.1.1'\n+version = '0.2.0'\n # Should be one of:\n # 'Development St... | 1,424 | 99 |
gh_patches_debug_31286 | rasdani/github-patches | git_diff | ocf__ocfweb-57 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Home page should have a link to password reset, check print quota, view print queue
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
-... | diff --git a/ocfweb/context_processors.py b/ocfweb/context_processors.py
--- a/ocfweb/context_processors.py
+++ b/ocfweb/context_processors.py
@@ -1,12 +1,20 @@
import re
from datetime import date
from datetime import datetime
+from ipaddress import ip_address
+from ipaddress import ip_network
+from ipware.ip impo... | {"golden_diff": "diff --git a/ocfweb/context_processors.py b/ocfweb/context_processors.py\n--- a/ocfweb/context_processors.py\n+++ b/ocfweb/context_processors.py\n@@ -1,12 +1,20 @@\n import re\n from datetime import date\n from datetime import datetime\n+from ipaddress import ip_address\n+from ipaddress import ip_netwo... | 1,152 | 498 |
gh_patches_debug_16219 | rasdani/github-patches | git_diff | getsentry__sentry-5339 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Localhost filter should consider affected URL
Right now the "localhost" filter only consider's the affected User's IP: https://github.com/getsentry/sentry/blob/master/src/sentry/filters/localhost.py
But us... | diff --git a/src/sentry/filters/localhost.py b/src/sentry/filters/localhost.py
--- a/src/sentry/filters/localhost.py
+++ b/src/sentry/filters/localhost.py
@@ -1,8 +1,10 @@
from __future__ import absolute_import
from .base import Filter
+from six.moves.urllib.parse import urlparse
LOCAL_IPS = frozenset(['127.0.0.... | {"golden_diff": "diff --git a/src/sentry/filters/localhost.py b/src/sentry/filters/localhost.py\n--- a/src/sentry/filters/localhost.py\n+++ b/src/sentry/filters/localhost.py\n@@ -1,8 +1,10 @@\n from __future__ import absolute_import\n \n from .base import Filter\n+from six.moves.urllib.parse import urlparse\n \n LOCAL_... | 530 | 254 |
gh_patches_debug_1182 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-1049 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
efs tag support
I am finding that searching for tagging of EFS resources does not consistently report the correct results. It did find an EFS that was incorrectly tagged, but after it was corrected it contin... | diff --git a/c7n/resources/efs.py b/c7n/resources/efs.py
--- a/c7n/resources/efs.py
+++ b/c7n/resources/efs.py
@@ -27,6 +27,7 @@
name = 'Name'
date = 'CreationTime'
dimension = None
+ detail_spec = ('describe_tags', 'FileSystemId', 'FileSystemId', None)
@ElasticFileSystem.action_r... | {"golden_diff": "diff --git a/c7n/resources/efs.py b/c7n/resources/efs.py\n--- a/c7n/resources/efs.py\n+++ b/c7n/resources/efs.py\n@@ -27,6 +27,7 @@\n name = 'Name'\n date = 'CreationTime'\n dimension = None\n+ detail_spec = ('describe_tags', 'FileSystemId', 'FileSystemId', None)\n \n \n ... | 981 | 100 |
gh_patches_debug_13132 | rasdani/github-patches | git_diff | conan-io__conan-14185 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[bug] Can't call `conan upload --recipe-only` twice with backup sources enabled
### Steps to reproduce
1. Enable backup sources
2. Export a recipe that downloads file
3. Call conan upload only recipe for... | diff --git a/conans/client/downloaders/download_cache.py b/conans/client/downloaders/download_cache.py
--- a/conans/client/downloaders/download_cache.py
+++ b/conans/client/downloaders/download_cache.py
@@ -60,9 +60,12 @@
if excluded_urls is None:
excluded_urls = []
- all_refs = {str(k) f... | {"golden_diff": "diff --git a/conans/client/downloaders/download_cache.py b/conans/client/downloaders/download_cache.py\n--- a/conans/client/downloaders/download_cache.py\n+++ b/conans/client/downloaders/download_cache.py\n@@ -60,9 +60,12 @@\n if excluded_urls is None:\n excluded_urls = []\n \n- ... | 1,470 | 205 |
gh_patches_debug_15574 | rasdani/github-patches | git_diff | HypothesisWorks__hypothesis-872 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Verbose output not shown unless -s is specified
I am running a test suite with hypothesis using py.test, when setting HYPOTHESIS_VERBOSITY_LEVEL=verbose environment variable I expected to see the intermediate... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -69,7 +69,8 @@
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
- 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None)
+ 'pandas': ... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -69,7 +69,8 @@\n intersphinx_mapping = {\n 'python': ('https://docs.python.org/3/', None),\n 'numpy': ('https://docs.scipy.org/doc/numpy/', None),\n- 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/... | 1,641 | 228 |
gh_patches_debug_47466 | rasdani/github-patches | git_diff | bokeh__bokeh-8634 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Stocks Example is not working properly
https://github.com/bokeh/bokeh/tree/master/examples/app/stocks
The example suppose to change the stats according to the selected points. For some reason
... | diff --git a/examples/app/stocks/main.py b/examples/app/stocks/main.py
--- a/examples/app/stocks/main.py
+++ b/examples/app/stocks/main.py
@@ -130,7 +130,7 @@
data = data.iloc[selected, :]
update_stats(data, t1, t2)
-source.on_change('selected', selection_change)
+source.selected.on_change('indices', se... | {"golden_diff": "diff --git a/examples/app/stocks/main.py b/examples/app/stocks/main.py\n--- a/examples/app/stocks/main.py\n+++ b/examples/app/stocks/main.py\n@@ -130,7 +130,7 @@\n data = data.iloc[selected, :]\n update_stats(data, t1, t2)\n \n-source.on_change('selected', selection_change)\n+source.selecte... | 2,036 | 108 |
gh_patches_debug_22014 | rasdani/github-patches | git_diff | pytorch__text-361 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MosesTokenizer has been moved out of NLTK due to licensing issues
@jekbradbury great work here!
Due to https://github.com/nltk/nltk/issues/2000, we had to remove MosesTokenizer out of NLTK but now it's hos... | diff --git a/torchtext/data/utils.py b/torchtext/data/utils.py
--- a/torchtext/data/utils.py
+++ b/torchtext/data/utils.py
@@ -21,16 +21,22 @@
raise
elif tokenizer == "moses":
try:
- from nltk.tokenize.moses import MosesTokenizer
+ from sacremoses import MosesTokenizer
... | {"golden_diff": "diff --git a/torchtext/data/utils.py b/torchtext/data/utils.py\n--- a/torchtext/data/utils.py\n+++ b/torchtext/data/utils.py\n@@ -21,16 +21,22 @@\n raise\n elif tokenizer == \"moses\":\n try:\n- from nltk.tokenize.moses import MosesTokenizer\n+ from sacremo... | 1,468 | 299 |
gh_patches_debug_43415 | rasdani/github-patches | git_diff | kserve__kserve-2817 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Knative KafaSource detects wrong URL to serve events
/kind bug
**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]
- Deployed knative-eventing and kafkaso... | diff --git a/docs/samples/kafka/image_transformer/image_transformer.py b/docs/samples/kafka/image_transformer/image_transformer.py
--- a/docs/samples/kafka/image_transformer/image_transformer.py
+++ b/docs/samples/kafka/image_transformer/image_transformer.py
@@ -11,13 +11,14 @@
# See the License for the specific langu... | {"golden_diff": "diff --git a/docs/samples/kafka/image_transformer/image_transformer.py b/docs/samples/kafka/image_transformer/image_transformer.py\n--- a/docs/samples/kafka/image_transformer/image_transformer.py\n+++ b/docs/samples/kafka/image_transformer/image_transformer.py\n@@ -11,13 +11,14 @@\n # See the License f... | 2,017 | 914 |
gh_patches_debug_4660 | rasdani/github-patches | git_diff | bridgecrewio__checkov-2935 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
False positive for CKV_AZURE_43 when using the "random" provider resources
**Describe the issue**
Check ID: CKV_AZURE_43
When using any of the random_* resources from the [random provider](https://registry.... | diff --git a/checkov/terraform/checks/resource/azure/StorageAccountName.py b/checkov/terraform/checks/resource/azure/StorageAccountName.py
--- a/checkov/terraform/checks/resource/azure/StorageAccountName.py
+++ b/checkov/terraform/checks/resource/azure/StorageAccountName.py
@@ -5,7 +5,7 @@
from checkov.common.models.e... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/StorageAccountName.py b/checkov/terraform/checks/resource/azure/StorageAccountName.py\n--- a/checkov/terraform/checks/resource/azure/StorageAccountName.py\n+++ b/checkov/terraform/checks/resource/azure/StorageAccountName.py\n@@ -5,7 +5,7 @@\n from ch... | 884 | 167 |
gh_patches_debug_14368 | rasdani/github-patches | git_diff | scrapy__scrapy-1131 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unhandled error in Deferred (RobotsTxtMiddleware)
**Dev story**:
Let's say spider downloads all .zip files from http://habrahabr.ru/post/212029/ page
Url with .zip files looks like this: http://layer6.jenkins... | diff --git a/scrapy/contrib/downloadermiddleware/robotstxt.py b/scrapy/contrib/downloadermiddleware/robotstxt.py
--- a/scrapy/contrib/downloadermiddleware/robotstxt.py
+++ b/scrapy/contrib/downloadermiddleware/robotstxt.py
@@ -49,8 +49,14 @@
)
dfd = self.crawler.engine.download(robotsreq, spid... | {"golden_diff": "diff --git a/scrapy/contrib/downloadermiddleware/robotstxt.py b/scrapy/contrib/downloadermiddleware/robotstxt.py\n--- a/scrapy/contrib/downloadermiddleware/robotstxt.py\n+++ b/scrapy/contrib/downloadermiddleware/robotstxt.py\n@@ -49,8 +49,14 @@\n )\n dfd = self.crawler.engine.do... | 1,177 | 217 |
gh_patches_debug_3525 | rasdani/github-patches | git_diff | microsoft__botbuilder-python-1747 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
port: turn memory scope includesnapshot to false (#5441)
The changes in [turn memory scope includesnapshot to false (#5441)](https://github.com/microsoft/botbuilder-dotnet/pull/5441) may need to be ported to ... | diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py
--- a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py
+++ b/libraries/botbuilder-dialogs/botbuilder/dial... | {"golden_diff": "diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py\n--- a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py\n+++ b/libraries/botbuilder-dial... | 1,167 | 167 |
gh_patches_debug_30826 | rasdani/github-patches | git_diff | freedomofpress__securedrop-4133 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[xenial] Verify Trusty backup -> Xenial recovery story
We should ensure that a SecureDrop backup completed on 14.04 can successfully be recovered on 16.04. Whether we ask admins to perform this step manually,... | diff --git a/install_files/ansible-base/roles/restore/files/restore.py b/install_files/ansible-base/roles/restore/files/restore.py
--- a/install_files/ansible-base/roles/restore/files/restore.py
+++ b/install_files/ansible-base/roles/restore/files/restore.py
@@ -8,6 +8,7 @@
"""
import os
+import shutil
import subp... | {"golden_diff": "diff --git a/install_files/ansible-base/roles/restore/files/restore.py b/install_files/ansible-base/roles/restore/files/restore.py\n--- a/install_files/ansible-base/roles/restore/files/restore.py\n+++ b/install_files/ansible-base/roles/restore/files/restore.py\n@@ -8,6 +8,7 @@\n \"\"\"\n \n import os\n... | 901 | 415 |
gh_patches_debug_34300 | rasdani/github-patches | git_diff | jupyterhub__jupyterhub-142 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Admin UI suggestions
As I've been using the admin UI a bit for my class, I just had a few things that I thought would be nice to have/change in it:
- move the "add user" button to the top -- it is annoying wi... | diff --git a/jupyterhub/apihandlers/base.py b/jupyterhub/apihandlers/base.py
--- a/jupyterhub/apihandlers/base.py
+++ b/jupyterhub/apihandlers/base.py
@@ -42,7 +42,7 @@
reason = getattr(exception, 'reason', '')
if reason:
status_message = reason
-
+ self.set_hea... | {"golden_diff": "diff --git a/jupyterhub/apihandlers/base.py b/jupyterhub/apihandlers/base.py\n--- a/jupyterhub/apihandlers/base.py\n+++ b/jupyterhub/apihandlers/base.py\n@@ -42,7 +42,7 @@\n reason = getattr(exception, 'reason', '')\n if reason:\n status_message = reason\n- ... | 1,315 | 629 |
gh_patches_debug_23562 | rasdani/github-patches | git_diff | internetarchive__openlibrary-6807 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
librarian merge queue fixes
Closes #6807
- allows flexible sorting with ?order=asc or desc -- piggy backs on #6785
- adds total counts to Open and Closed
- removes "All"
- fixes bug where page? persist... | diff --git a/openlibrary/plugins/upstream/edits.py b/openlibrary/plugins/upstream/edits.py
--- a/openlibrary/plugins/upstream/edits.py
+++ b/openlibrary/plugins/upstream/edits.py
@@ -96,19 +96,26 @@
)
def GET(self):
- i = web.input(page=1, limit=25, mode="open", submitter=None, reviewer=N... | {"golden_diff": "diff --git a/openlibrary/plugins/upstream/edits.py b/openlibrary/plugins/upstream/edits.py\n--- a/openlibrary/plugins/upstream/edits.py\n+++ b/openlibrary/plugins/upstream/edits.py\n@@ -96,19 +96,26 @@\n )\n \n def GET(self):\n- i = web.input(page=1, limit=25, mode=\"open\", ... | 1,755 | 323 |
gh_patches_debug_15287 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-642 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Expand Environment Variables in Cookiecutter Configuration File
I set my cookiecutterrc file via an environment variable, like this:
```
export COOKIECUTTER_CONFIG="$XDG_CONFIG_HOME/cookiecutter/cookiecutter... | diff --git a/cookiecutter/config.py b/cookiecutter/config.py
--- a/cookiecutter/config.py
+++ b/cookiecutter/config.py
@@ -31,6 +31,13 @@
}
+def _expand_path(path):
+ """Expand both environment variables and user home in the given path."""
+ path = os.path.expandvars(path)
+ path = os.path.expanduser(path... | {"golden_diff": "diff --git a/cookiecutter/config.py b/cookiecutter/config.py\n--- a/cookiecutter/config.py\n+++ b/cookiecutter/config.py\n@@ -31,6 +31,13 @@\n }\n \n \n+def _expand_path(path):\n+ \"\"\"Expand both environment variables and user home in the given path.\"\"\"\n+ path = os.path.expandvars(path)\n+ ... | 1,210 | 226 |
gh_patches_debug_60945 | rasdani/github-patches | git_diff | Netflix__lemur-766 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set lemur to log to stdout
When running lemur inside docker I would like to have it log everything to `stdout` so that I can forward logs to splunk. At the moment `lemur.config.py` has a `LEMUR_LOG` parameter... | diff --git a/lemur/factory.py b/lemur/factory.py
--- a/lemur/factory.py
+++ b/lemur/factory.py
@@ -153,7 +153,7 @@
app.logger.addHandler(handler)
stream_handler = StreamHandler()
- stream_handler.setLevel(app.config.get('LOG_LEVEL'))
+ stream_handler.setLevel(app.config.get('LOG_LEVEL', 'DEBUG'))
... | {"golden_diff": "diff --git a/lemur/factory.py b/lemur/factory.py\n--- a/lemur/factory.py\n+++ b/lemur/factory.py\n@@ -153,7 +153,7 @@\n app.logger.addHandler(handler)\n \n stream_handler = StreamHandler()\n- stream_handler.setLevel(app.config.get('LOG_LEVEL'))\n+ stream_handler.setLevel(app.config.get('L... | 2,021 | 98 |
gh_patches_debug_29313 | rasdani/github-patches | git_diff | bokeh__bokeh-7934 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
flask_gunicorn_embed.py does not work with Tornado 5
ref: https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/flask_gunicorn_embed.py
Running as is gets:
```
Exception in thread Thread... | diff --git a/examples/howto/server_embed/flask_gunicorn_embed.py b/examples/howto/server_embed/flask_gunicorn_embed.py
--- a/examples/howto/server_embed/flask_gunicorn_embed.py
+++ b/examples/howto/server_embed/flask_gunicorn_embed.py
@@ -1,3 +1,8 @@
+try:
+ import asyncio
+except ImportError:
+ raise RuntimeErro... | {"golden_diff": "diff --git a/examples/howto/server_embed/flask_gunicorn_embed.py b/examples/howto/server_embed/flask_gunicorn_embed.py\n--- a/examples/howto/server_embed/flask_gunicorn_embed.py\n+++ b/examples/howto/server_embed/flask_gunicorn_embed.py\n@@ -1,3 +1,8 @@\n+try:\n+ import asyncio\n+except ImportError:... | 1,638 | 428 |
gh_patches_debug_9231 | rasdani/github-patches | git_diff | privacyidea__privacyidea-2615 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
no serial in polling on /ttype/push
We may have a bug in push polling. This exception occurs on polling
https://gist.github.com/laclaro/743618d11f61f8a817e273db6b804a9a
This may be related to #2534.
--... | diff --git a/privacyidea/api/ttype.py b/privacyidea/api/ttype.py
--- a/privacyidea/api/ttype.py
+++ b/privacyidea/api/ttype.py
@@ -69,6 +69,7 @@
# access_route contains the ip adresses of all clients, hops and proxies.
g.client_ip = get_client_ip(request,
get_from_config(SYSCO... | {"golden_diff": "diff --git a/privacyidea/api/ttype.py b/privacyidea/api/ttype.py\n--- a/privacyidea/api/ttype.py\n+++ b/privacyidea/api/ttype.py\n@@ -69,6 +69,7 @@\n # access_route contains the ip adresses of all clients, hops and proxies.\n g.client_ip = get_client_ip(request,\n ... | 1,534 | 134 |
gh_patches_debug_6576 | rasdani/github-patches | git_diff | ephios-dev__ephios-757 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make minors identifiable on event detail page
As an Einsatzleiter, I want to quickly grasp which participants are younger than 18 years. For that purpose, I want to have the participation boxes on the event d... | diff --git a/ephios/core/signup/participants.py b/ephios/core/signup/participants.py
--- a/ephios/core/signup/participants.py
+++ b/ephios/core/signup/participants.py
@@ -27,6 +27,12 @@
today, born = today or date.today(), self.date_of_birth
return today.year - born.year - ((today.month, today.day) < ... | {"golden_diff": "diff --git a/ephios/core/signup/participants.py b/ephios/core/signup/participants.py\n--- a/ephios/core/signup/participants.py\n+++ b/ephios/core/signup/participants.py\n@@ -27,6 +27,12 @@\n today, born = today or date.today(), self.date_of_birth\n return today.year - born.year - ((toda... | 1,327 | 152 |
gh_patches_debug_37692 | rasdani/github-patches | git_diff | astronomer__astro-sdk-325 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Astro Build's Integration Test breaking on 0.8.1
broken on - 0.8.1 , but works with 0.7.0.
In this test dag, task_5 joins tables from task_3 (snowflake) and task_4 (postgres). The task’s print statement show... | diff --git a/src/astro/utils/table_handler.py b/src/astro/utils/table_handler.py
--- a/src/astro/utils/table_handler.py
+++ b/src/astro/utils/table_handler.py
@@ -16,28 +16,51 @@
"""
first_table: Optional[Table] = None
if self.op_args:
- table_index = [x for x, t in enumerate(self.... | {"golden_diff": "diff --git a/src/astro/utils/table_handler.py b/src/astro/utils/table_handler.py\n--- a/src/astro/utils/table_handler.py\n+++ b/src/astro/utils/table_handler.py\n@@ -16,28 +16,51 @@\n \"\"\"\n first_table: Optional[Table] = None\n if self.op_args:\n- table_index = [x ... | 1,539 | 635 |
gh_patches_debug_64110 | rasdani/github-patches | git_diff | projectmesa__mesa-561 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update tests to use pytest, not nose
Update tests to use pytest, not nose. nose is not maintained anymore.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these fi... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,8 @@
'dev': [
'coverage',
'flake8',
- 'nose',
+ 'pytest',
+ 'pytest-cov',
'sphinx',
],
'docs': [
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -20,7 +20,8 @@\n 'dev': [\n 'coverage',\n 'flake8',\n- 'nose',\n+ 'pytest',\n+ 'pytest-cov',\n 'sphinx',\n ],\n 'docs': [\n", "issue": "Update tests to use pytest, not nose\nUpd... | 920 | 76 |
gh_patches_debug_3606 | rasdani/github-patches | git_diff | OBOFoundry__OBOFoundry.github.io-802 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
travis on master failing, due to metadata violations from new jsonschema checks
There are two things wrong:
- the validate script assumes a util/reports folder
- hp is failing; we already know that hp h... | diff --git a/util/validate-metadata.py b/util/validate-metadata.py
--- a/util/validate-metadata.py
+++ b/util/validate-metadata.py
@@ -7,9 +7,9 @@
import re
# file paths
-data_file = "../registry/ontologies.jsonld"
-schema_file = "metadata-schema.json"
-schema_lite_file = "metadata-schema-lite.json"
+data_file = "r... | {"golden_diff": "diff --git a/util/validate-metadata.py b/util/validate-metadata.py\n--- a/util/validate-metadata.py\n+++ b/util/validate-metadata.py\n@@ -7,9 +7,9 @@\n import re\n \n # file paths\n-data_file = \"../registry/ontologies.jsonld\"\n-schema_file = \"metadata-schema.json\"\n-schema_lite_file = \"metadata-sc... | 1,610 | 133 |
gh_patches_debug_437 | rasdani/github-patches | git_diff | pypa__setuptools-2584 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add mechanism for side-by-side comparison of setup.py and its equivalent setup.cfg
We have many documentation examples that are purely declarative and are either documented as `setup.py` or `setup.cfg`. It wo... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -93,3 +93,6 @@
html_theme = 'alabaster'
templates_path = ['_templates']
html_sidebars = {'index': ['tidelift-sidebar.html']}
+
+# Add support for inline tabs
+extensions += ['sphinx_inline_tabs']
| {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -93,3 +93,6 @@\n html_theme = 'alabaster'\n templates_path = ['_templates']\n html_sidebars = {'index': ['tidelift-sidebar.html']}\n+\n+# Add support for inline tabs\n+extensions += ['sphinx_inline_tabs']\n", "issue": ... | 1,539 | 82 |
gh_patches_debug_22113 | rasdani/github-patches | git_diff | rlworkgroup__garage-1879 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TF 2.3.0 incompatibility
TF 2.3.0 was released yesterday, and seems to be incompatible with TFP <0.11.0 and breaks imports (https://travis-ci.com/github/rlworkgroup/garage/jobs/365922927#L3061). We pin TFP to... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -4,30 +4,26 @@
from setuptools import find_packages, setup
GARAGE_GH_TOKEN = os.environ.get('GARAGE_GH_TOKEN') or 'git'
-GYM_VERSION = '0.15.4'
+GYM_VERSION = '0.17.2'
# Required dependencies
REQUIRED = [
# Please keep alphabetized
'akr... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -4,30 +4,26 @@\n from setuptools import find_packages, setup\n \n GARAGE_GH_TOKEN = os.environ.get('GARAGE_GH_TOKEN') or 'git'\n-GYM_VERSION = '0.15.4'\n+GYM_VERSION = '0.17.2'\n \n # Required dependencies\n REQUIRED = [\n # Pleas... | 1,717 | 387 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.