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_9074 | rasdani/github-patches | git_diff | googleapis__google-auth-library-python-630 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tests broken on Python < 3.8
```python
_______ ERROR collecting tests_async/transport/test_aiohttp_requests.py ________
ImportError while importing test module '/home/tseaver/projects/agendaless/Google/src/... | diff --git a/noxfile.py b/noxfile.py
--- a/noxfile.py
+++ b/noxfile.py
@@ -30,7 +30,7 @@
"grpcio",
]
-ASYNC_DEPENDENCIES = ["pytest-asyncio", "aioresponses"]
+ASYNC_DEPENDENCIES = ["pytest-asyncio", "aioresponses", "asynctest"]
BLACK_VERSION = "black==19.3b0"
BLACK_PATHS = [
@@ -144,6 +144,7 @@
@nox.sessio... | {"golden_diff": "diff --git a/noxfile.py b/noxfile.py\n--- a/noxfile.py\n+++ b/noxfile.py\n@@ -30,7 +30,7 @@\n \"grpcio\",\n ]\n \n-ASYNC_DEPENDENCIES = [\"pytest-asyncio\", \"aioresponses\"]\n+ASYNC_DEPENDENCIES = [\"pytest-asyncio\", \"aioresponses\", \"asynctest\"]\n \n BLACK_VERSION = \"black==19.3b0\"\n BLACK_... | 2,001 | 164 |
gh_patches_debug_25585 | rasdani/github-patches | git_diff | talonhub__community-758 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve phrase history mechanism
instead of this:
https://github.com/knausj85/knausj_talon/blob/3e57e0165257cf07b0e21880d44a91e79cb3ef16/code/history.py#L19-L29
consider something like this:
```py
d... | diff --git a/code/history.py b/code/history.py
--- a/code/history.py
+++ b/code/history.py
@@ -1,3 +1,4 @@
+from typing import Optional
from talon import imgui, Module, speech_system, actions, app
# We keep command_history_size lines of history, but by default display only
@@ -12,20 +13,15 @@
history = []
-def... | {"golden_diff": "diff --git a/code/history.py b/code/history.py\n--- a/code/history.py\n+++ b/code/history.py\n@@ -1,3 +1,4 @@\n+from typing import Optional\n from talon import imgui, Module, speech_system, actions, app\n \n # We keep command_history_size lines of history, but by default display only\n@@ -12,20 +13,15 ... | 1,026 | 341 |
gh_patches_debug_25169 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-617 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement adding a new empty table
## Problem
<!-- Please provide a clear and concise description of the problem that this feature request is designed to solve.-->
Users may want to create an empty table.
... | diff --git a/mathesar/api/viewsets/tables.py b/mathesar/api/viewsets/tables.py
--- a/mathesar/api/viewsets/tables.py
+++ b/mathesar/api/viewsets/tables.py
@@ -31,26 +31,15 @@
serializer = TableSerializer(data=request.data, context={'request': request})
serializer.is_valid(raise_exception=True)
- ... | {"golden_diff": "diff --git a/mathesar/api/viewsets/tables.py b/mathesar/api/viewsets/tables.py\n--- a/mathesar/api/viewsets/tables.py\n+++ b/mathesar/api/viewsets/tables.py\n@@ -31,26 +31,15 @@\n serializer = TableSerializer(data=request.data, context={'request': request})\n serializer.is_valid(raise_e... | 2,039 | 317 |
gh_patches_debug_54590 | rasdani/github-patches | git_diff | zulip__zulip-20491 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove "Send a reply" new user tip
After implementing #19900, there are two places where new users are told how to reply to a message: in the Welcome Bot text and in the "Send a reply" new user tip immediatel... | diff --git a/zerver/lib/hotspots.py b/zerver/lib/hotspots.py
--- a/zerver/lib/hotspots.py
+++ b/zerver/lib/hotspots.py
@@ -9,10 +9,6 @@
from zerver.models import UserHotspot, UserProfile
INTRO_HOTSPOTS: Dict[str, Dict[str, Promise]] = {
- "intro_reply": {
- "title": gettext_lazy("Reply to a message"),
- ... | {"golden_diff": "diff --git a/zerver/lib/hotspots.py b/zerver/lib/hotspots.py\n--- a/zerver/lib/hotspots.py\n+++ b/zerver/lib/hotspots.py\n@@ -9,10 +9,6 @@\n from zerver.models import UserHotspot, UserProfile\n \n INTRO_HOTSPOTS: Dict[str, Dict[str, Promise]] = {\n- \"intro_reply\": {\n- \"title\": gettext_la... | 1,593 | 143 |
gh_patches_debug_5182 | rasdani/github-patches | git_diff | Gallopsled__pwntools-1852 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`atexit.register` does not work
### What I did
```python3
from pwn import *
atexit.register(print, "hello world")
exit()
```
### What I expected to see
```python3 test.py
hello world
```
### What I ... | diff --git a/pwnlib/atexit.py b/pwnlib/atexit.py
--- a/pwnlib/atexit.py
+++ b/pwnlib/atexit.py
@@ -13,6 +13,7 @@
import sys
import threading
import traceback
+import atexit as std_atexit
from pwnlib.context import context
@@ -95,4 +96,8 @@
if hasattr(sys, "exitfunc"):
register(sys.exitfunc)
-sys.exitfun... | {"golden_diff": "diff --git a/pwnlib/atexit.py b/pwnlib/atexit.py\n--- a/pwnlib/atexit.py\n+++ b/pwnlib/atexit.py\n@@ -13,6 +13,7 @@\n import sys\n import threading\n import traceback\n+import atexit as std_atexit\n \n from pwnlib.context import context\n \n@@ -95,4 +96,8 @@\n if hasattr(sys, \"exitfunc\"):\n regis... | 1,241 | 146 |
gh_patches_debug_20723 | rasdani/github-patches | git_diff | streamlit__streamlit-1737 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
st.write throws value is null when string is too big
# Summary
calling `st.write` with a string that is too big will result on an error message on the front end with message "value is null"
<img width="55... | diff --git a/lib/streamlit/server/server_util.py b/lib/streamlit/server/server_util.py
--- a/lib/streamlit/server/server_util.py
+++ b/lib/streamlit/server/server_util.py
@@ -68,22 +68,19 @@
msg_str = msg.SerializeToString()
if len(msg_str) > MESSAGE_SIZE_LIMIT:
- _convert_msg_to_exception_msg(msg, R... | {"golden_diff": "diff --git a/lib/streamlit/server/server_util.py b/lib/streamlit/server/server_util.py\n--- a/lib/streamlit/server/server_util.py\n+++ b/lib/streamlit/server/server_util.py\n@@ -68,22 +68,19 @@\n msg_str = msg.SerializeToString()\n \n if len(msg_str) > MESSAGE_SIZE_LIMIT:\n- _convert_msg... | 1,945 | 298 |
gh_patches_debug_26174 | rasdani/github-patches | git_diff | python-telegram-bot__python-telegram-bot-776 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove botan from our library
according to [this](https://github.com/botanio/sdk#py) botan has it's own implementation for python. No need to reinvent the wheel. I suggest we remove it from ptb in the next ma... | diff --git a/telegram/contrib/__init__.py b/telegram/contrib/__init__.py
deleted file mode 100644
--- a/telegram/contrib/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .botan import Botan
-
-__all__ = ['Botan']
diff --git a/telegram/contrib/botan.py b/telegram/contrib/botan.py
deleted file mode 100644
--- a/telegram/c... | {"golden_diff": "diff --git a/telegram/contrib/__init__.py b/telegram/contrib/__init__.py\ndeleted file mode 100644\n--- a/telegram/contrib/__init__.py\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-from .botan import Botan\n-\n-__all__ = ['Botan']\ndiff --git a/telegram/contrib/botan.py b/telegram/contrib/botan.py\ndeleted file mo... | 769 | 498 |
gh_patches_debug_16746 | rasdani/github-patches | git_diff | scikit-image__scikit-image-1927 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DOC: Reduce size image in plot_inpaint
In reference to #1920
- Reduce the size of the image in doc/examples/filters/plot_inpaint.py to show more clearly the result of the algorithm.
--- END ISSUE ---
Bel... | diff --git a/doc/examples/filters/plot_inpaint.py b/doc/examples/filters/plot_inpaint.py
--- a/doc/examples/filters/plot_inpaint.py
+++ b/doc/examples/filters/plot_inpaint.py
@@ -26,13 +26,13 @@
from skimage import data, color
from skimage.restoration import inpaint
-image_orig = data.astronaut()
+image_orig = data... | {"golden_diff": "diff --git a/doc/examples/filters/plot_inpaint.py b/doc/examples/filters/plot_inpaint.py\n--- a/doc/examples/filters/plot_inpaint.py\n+++ b/doc/examples/filters/plot_inpaint.py\n@@ -26,13 +26,13 @@\n from skimage import data, color\n from skimage.restoration import inpaint\n \n-image_orig = data.astron... | 950 | 300 |
gh_patches_debug_37093 | rasdani/github-patches | git_diff | TheAlgorithms__Python-2221 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
maths/number_of_digits.py is naive!
<code>[maths/number_of_digits.py](https://github.com/TheAlgorithms/Python/blob/master/maths/number_of_digits.py)</code> has a naive method. The suggested method has a time ... | diff --git a/maths/number_of_digits.py b/maths/number_of_digits.py
--- a/maths/number_of_digits.py
+++ b/maths/number_of_digits.py
@@ -1,3 +1,7 @@
+import math
+from timeit import timeit
+
+
def num_digits(n: int) -> int:
"""
Find the number of digits in a number.
@@ -14,5 +18,82 @@
return digits
+d... | {"golden_diff": "diff --git a/maths/number_of_digits.py b/maths/number_of_digits.py\n--- a/maths/number_of_digits.py\n+++ b/maths/number_of_digits.py\n@@ -1,3 +1,7 @@\n+import math\n+from timeit import timeit\n+\n+\n def num_digits(n: int) -> int:\n \"\"\"\n Find the number of digits in a number.\n@@ -14,5 +18,... | 474 | 977 |
gh_patches_debug_3043 | rasdani/github-patches | git_diff | docker__docker-py-1250 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
attach is causing an "Invalid Argument" exception from os.read
``` python
stream = client.attach(container, stream=True, stdout=True, stderr=True)
for chunk in stream:
pass
```
Results in:
```
File "/... | diff --git a/docker/utils/socket.py b/docker/utils/socket.py
--- a/docker/utils/socket.py
+++ b/docker/utils/socket.py
@@ -69,7 +69,11 @@
"""
Returns a generator of frames read from socket
"""
- n = next_frame_size(socket)
- while n > 0:
- yield read(socket, n)
+ while True:
n = ... | {"golden_diff": "diff --git a/docker/utils/socket.py b/docker/utils/socket.py\n--- a/docker/utils/socket.py\n+++ b/docker/utils/socket.py\n@@ -69,7 +69,11 @@\n \"\"\"\n Returns a generator of frames read from socket\n \"\"\"\n- n = next_frame_size(socket)\n- while n > 0:\n- yield read(socket, n... | 1,028 | 134 |
gh_patches_debug_2193 | rasdani/github-patches | git_diff | ansible-collections__community.general-6695 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
read_csv - Key 'Name' was not found in the CSV header fields
##### SUMMARY
The `read_csv` module fails to identify a field, yet displaces the field in the list of available fields.
##### ISSUE TYPE
- Bug... | diff --git a/plugins/module_utils/csv.py b/plugins/module_utils/csv.py
--- a/plugins/module_utils/csv.py
+++ b/plugins/module_utils/csv.py
@@ -55,8 +55,10 @@
def read_csv(data, dialect, fieldnames=None):
-
+ BOM = to_native(u'\ufeff')
data = to_native(data, errors='surrogate_or_strict')
+ if data.starts... | {"golden_diff": "diff --git a/plugins/module_utils/csv.py b/plugins/module_utils/csv.py\n--- a/plugins/module_utils/csv.py\n+++ b/plugins/module_utils/csv.py\n@@ -55,8 +55,10 @@\n \n \n def read_csv(data, dialect, fieldnames=None):\n-\n+ BOM = to_native(u'\\ufeff')\n data = to_native(data, errors='surrogate_or_s... | 1,631 | 116 |
gh_patches_debug_11630 | rasdani/github-patches | git_diff | mozilla__bugbug-407 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Not all training tasks need commits DB
Indeed I think none of the ones we currently run as part of the data pipeline need the commits.
We should:
- Make the trainer script only download the DBs which are ne... | diff --git a/scripts/trainer.py b/scripts/trainer.py
--- a/scripts/trainer.py
+++ b/scripts/trainer.py
@@ -73,13 +73,6 @@
logger.info("Decompressing bugs database")
self.decompress_file("data/bugs.json")
- # Commits.json
- logger.info("Downloading commits database")
- commits_ur... | {"golden_diff": "diff --git a/scripts/trainer.py b/scripts/trainer.py\n--- a/scripts/trainer.py\n+++ b/scripts/trainer.py\n@@ -73,13 +73,6 @@\n logger.info(\"Decompressing bugs database\")\n self.decompress_file(\"data/bugs.json\")\n \n- # Commits.json\n- logger.info(\"Downloading commits ... | 1,363 | 173 |
gh_patches_debug_10182 | rasdani/github-patches | git_diff | getredash__redash-998 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Embed query description appearing larger than vizualization name
The query description is appearing larger then the visualization name:
)
return render_template("embed.html"... | {"golden_diff": "diff --git a/redash/handlers/embed.py b/redash/handlers/embed.py\n--- a/redash/handlers/embed.py\n+++ b/redash/handlers/embed.py\n@@ -41,7 +41,6 @@\n vis['query'] = project(vis['query'], ('created_at', 'description', 'name', 'id', 'latest_query_data_id', 'name', 'updated_at'))\n \n return rende... | 1,097 | 124 |
gh_patches_debug_12620 | rasdani/github-patches | git_diff | kivy__kivy-5187 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Kivy breaks Clipboard
### Versions
* Python: 2.7.12
* OS: Windows 10
* Kivy: 1.9.2-dev0
* Kivy installation method: wheel
### Description
When pasting some data into a `TextInput`, the clipboard b... | diff --git a/kivy/core/clipboard/clipboard_winctypes.py b/kivy/core/clipboard/clipboard_winctypes.py
--- a/kivy/core/clipboard/clipboard_winctypes.py
+++ b/kivy/core/clipboard/clipboard_winctypes.py
@@ -27,9 +27,13 @@
GetClipboardData.restype = wintypes.HANDLE
user32.OpenClipboard(user32.GetActiveWi... | {"golden_diff": "diff --git a/kivy/core/clipboard/clipboard_winctypes.py b/kivy/core/clipboard/clipboard_winctypes.py\n--- a/kivy/core/clipboard/clipboard_winctypes.py\n+++ b/kivy/core/clipboard/clipboard_winctypes.py\n@@ -27,9 +27,13 @@\n GetClipboardData.restype = wintypes.HANDLE\n \n user32.OpenClipb... | 1,026 | 204 |
gh_patches_debug_5831 | rasdani/github-patches | git_diff | sherlock-project__sherlock-139 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sites sorting
It may be a good idea to sort the sites in sites.md and data.json alphabetically. When I'm looking for sites to add, I always have to Ctrl+F in this repo or just scroll through the file... Also ... | diff --git a/site_list.py b/site_list.py
--- a/site_list.py
+++ b/site_list.py
@@ -7,6 +7,11 @@
with open("data.json", "r", encoding="utf-8") as data_file:
data = json.load(data_file)
+sorted_json_data = json.dumps(data, indent=2, sort_keys=True)
+
+with open("data.json", "w") as data_file:
+ data_file.write... | {"golden_diff": "diff --git a/site_list.py b/site_list.py\n--- a/site_list.py\n+++ b/site_list.py\n@@ -7,6 +7,11 @@\n with open(\"data.json\", \"r\", encoding=\"utf-8\") as data_file:\n data = json.load(data_file)\n \n+sorted_json_data = json.dumps(data, indent=2, sort_keys=True)\n+\n+with open(\"data.json\", \"w\"... | 497 | 140 |
gh_patches_debug_5674 | rasdani/github-patches | git_diff | mozilla__bugbug-1214 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Log number of spam/non-spam bugs in SpamBug get_labels
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bug... | diff --git a/bugbug/models/spambug.py b/bugbug/models/spambug.py
--- a/bugbug/models/spambug.py
+++ b/bugbug/models/spambug.py
@@ -85,6 +85,17 @@
):
classes[bug_id] = 1
+ print(
+ "{} bugs are classified as non-spam".format(
+ sum(1 for label in classes.v... | {"golden_diff": "diff --git a/bugbug/models/spambug.py b/bugbug/models/spambug.py\n--- a/bugbug/models/spambug.py\n+++ b/bugbug/models/spambug.py\n@@ -85,6 +85,17 @@\n ):\n classes[bug_id] = 1\n \n+ print(\n+ \"{} bugs are classified as non-spam\".format(\n+ ... | 1,218 | 167 |
gh_patches_debug_16905 | rasdani/github-patches | git_diff | deeppavlov__DeepPavlov-101 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Downloading requirements
I was trying to install deeppavlov and had a problem following the installation steps.
1) There is no download.py file in root folder, it is in `deeppavlov/download.py`
``` sh
py... | diff --git a/telegram_utils/telegram_ui.py b/telegram_utils/telegram_ui.py
--- a/telegram_utils/telegram_ui.py
+++ b/telegram_utils/telegram_ui.py
@@ -13,6 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
"""
+from pathlib import Path
+
import telebot
fr... | {"golden_diff": "diff --git a/telegram_utils/telegram_ui.py b/telegram_utils/telegram_ui.py\n--- a/telegram_utils/telegram_ui.py\n+++ b/telegram_utils/telegram_ui.py\n@@ -13,6 +13,8 @@\n See the License for the specific language governing permissions and\n limitations under the License.\n \"\"\"\n+from pathlib import P... | 1,529 | 196 |
gh_patches_debug_11304 | rasdani/github-patches | git_diff | comic__grand-challenge.org-1450 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add example code for overlay segment configuration for workstation
--- 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/app/grandchallenge/workstation_configs/forms.py b/app/grandchallenge/workstation_configs/forms.py
--- a/app/grandchallenge/workstation_configs/forms.py
+++ b/app/grandchallenge/workstation_configs/forms.py
@@ -36,3 +36,14 @@
schema=OVERLAY_SEGMENTS_SCHEMA
),
}
+ ... | {"golden_diff": "diff --git a/app/grandchallenge/workstation_configs/forms.py b/app/grandchallenge/workstation_configs/forms.py\n--- a/app/grandchallenge/workstation_configs/forms.py\n+++ b/app/grandchallenge/workstation_configs/forms.py\n@@ -36,3 +36,14 @@\n schema=OVERLAY_SEGMENTS_SCHEMA\n ... | 564 | 220 |
gh_patches_debug_27161 | rasdani/github-patches | git_diff | ytdl-org__youtube-dl-18228 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add support for nzz.ch
rudolffischer@BueroPC-RF:~$ youtube-dl "http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209" -v
[debug] System config: []
[debug] User config: []
[debug] Command-lin... | diff --git a/youtube_dl/extractor/nzz.py b/youtube_dl/extractor/nzz.py
--- a/youtube_dl/extractor/nzz.py
+++ b/youtube_dl/extractor/nzz.py
@@ -11,20 +11,27 @@
class NZZIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?nzz\.ch/(?:[^/]+/)*[^/?#]+-ld\.(?P<id>\d+)'
- _TEST = {
+ _TESTS = [{
'url':... | {"golden_diff": "diff --git a/youtube_dl/extractor/nzz.py b/youtube_dl/extractor/nzz.py\n--- a/youtube_dl/extractor/nzz.py\n+++ b/youtube_dl/extractor/nzz.py\n@@ -11,20 +11,27 @@\n \n class NZZIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?nzz\\.ch/(?:[^/]+/)*[^/?#]+-ld\\.(?P<id>\\d+)'\n- _TEST = {\n+ ... | 1,537 | 420 |
gh_patches_debug_25079 | rasdani/github-patches | git_diff | Kinto__kinto-630 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Enabling the flush endpoint through env vars does not seem to work
I'm running Kinto + postgres with docker-compose (using the example docker-compose.yml in the repo).
Adding `KINTO_FLUSH_ENDPOINT_ENABLED` ... | diff --git a/kinto/__init__.py b/kinto/__init__.py
--- a/kinto/__init__.py
+++ b/kinto/__init__.py
@@ -19,6 +19,7 @@
DEFAULT_SETTINGS = {
+ 'flush_endpoint_enabled': False,
'retry_after_seconds': 3,
'cache_backend': 'kinto.core.cache.memory',
'permission_backend': 'kinto.core.permission.memory',
... | {"golden_diff": "diff --git a/kinto/__init__.py b/kinto/__init__.py\n--- a/kinto/__init__.py\n+++ b/kinto/__init__.py\n@@ -19,6 +19,7 @@\n \n \n DEFAULT_SETTINGS = {\n+ 'flush_endpoint_enabled': False,\n 'retry_after_seconds': 3,\n 'cache_backend': 'kinto.core.cache.memory',\n 'permission_backend': 'kint... | 1,043 | 272 |
gh_patches_debug_63214 | rasdani/github-patches | git_diff | ManimCommunity__manim-3108 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The documentation for the `--resolution` flag in the cli is wrong
The current documentation of the `--resolution` flag says the format is `(W,H)` which is confusing because the passed value needs to be of the... | diff --git a/manim/cli/render/render_options.py b/manim/cli/render/render_options.py
--- a/manim/cli/render/render_options.py
+++ b/manim/cli/render/render_options.py
@@ -83,7 +83,7 @@
"--resolution",
callback=validate_resolution,
default=None,
- help="Resolution in (W,H) for when 16:9... | {"golden_diff": "diff --git a/manim/cli/render/render_options.py b/manim/cli/render/render_options.py\n--- a/manim/cli/render/render_options.py\n+++ b/manim/cli/render/render_options.py\n@@ -83,7 +83,7 @@\n \"--resolution\",\n callback=validate_resolution,\n default=None,\n- help=\"Resolu... | 1,551 | 122 |
gh_patches_debug_39951 | rasdani/github-patches | git_diff | liqd__a4-opin-346 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Choose template: Small issues
There are some small wording issues when you choose a template to create a project in the dashboard. See comments in screenshot.

-
-
-@register.simp... | {"golden_diff": "diff --git a/euth/dashboard/templatetags/dashboard_templatetags.py b/euth/dashboard/templatetags/dashboard_templatetags.py\ndeleted file mode 100644\n--- a/euth/dashboard/templatetags/dashboard_templatetags.py\n+++ /dev/null\n@@ -1,11 +0,0 @@\n-from django import template\n-\n-register = template.Libra... | 986 | 685 |
gh_patches_debug_33519 | rasdani/github-patches | git_diff | TheAlgorithms__Python-10121 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve our test coverage
### Feature description
Many of our existing algorithm files have little to no unit testing. This is problematic because this can easily let bugs slip through. We want some assura... | diff --git a/maths/binary_exponentiation_2.py b/maths/binary_exponentiation_2.py
--- a/maths/binary_exponentiation_2.py
+++ b/maths/binary_exponentiation_2.py
@@ -1,17 +1,33 @@
"""
-* Binary Exponentiation for Powers
-* This is a method to find a^b in a time complexity of O(log b)
-* This is one of the most commonly u... | {"golden_diff": "diff --git a/maths/binary_exponentiation_2.py b/maths/binary_exponentiation_2.py\n--- a/maths/binary_exponentiation_2.py\n+++ b/maths/binary_exponentiation_2.py\n@@ -1,17 +1,33 @@\n \"\"\"\n-* Binary Exponentiation for Powers\n-* This is a method to find a^b in a time complexity of O(log b)\n-* This is... | 1,656 | 955 |
gh_patches_debug_25843 | rasdani/github-patches | git_diff | fidals__shopelectro-965 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create a custom page for 500 error
The page should have an apology and an suggestion to continue the purchase with the help of a consultant
--- END ISSUE ---
Below are some code segments, each from a releva... | diff --git a/shopelectro/urls.py b/shopelectro/urls.py
--- a/shopelectro/urls.py
+++ b/shopelectro/urls.py
@@ -1,15 +1,15 @@
-from datetime import timedelta
from collections import OrderedDict
+from datetime import timedelta
from django.conf import settings
from django.conf.urls import url, include
from django.co... | {"golden_diff": "diff --git a/shopelectro/urls.py b/shopelectro/urls.py\n--- a/shopelectro/urls.py\n+++ b/shopelectro/urls.py\n@@ -1,15 +1,15 @@\n-from datetime import timedelta\n from collections import OrderedDict\n+from datetime import timedelta\n \n from django.conf import settings\n from django.conf.urls import ur... | 2,018 | 324 |
gh_patches_debug_56718 | rasdani/github-patches | git_diff | mosaicml__composer-293 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ResNet56 default num_classes argument
## 🚀 Feature Request
The `num_classes` argument for [ResNet56_cifar10](https://github.com/mosaicml/composer/blob/main/composer/models/resnet56_cifar10/model.py) should ... | diff --git a/composer/models/resnet56_cifar10/model.py b/composer/models/resnet56_cifar10/model.py
--- a/composer/models/resnet56_cifar10/model.py
+++ b/composer/models/resnet56_cifar10/model.py
@@ -22,7 +22,7 @@
def __init__(
self,
- num_classes: int,
+ num_classes: int = 10,
ini... | {"golden_diff": "diff --git a/composer/models/resnet56_cifar10/model.py b/composer/models/resnet56_cifar10/model.py\n--- a/composer/models/resnet56_cifar10/model.py\n+++ b/composer/models/resnet56_cifar10/model.py\n@@ -22,7 +22,7 @@\n \n def __init__(\n self,\n- num_classes: int,\n+ num_classe... | 756 | 127 |
gh_patches_debug_1114 | rasdani/github-patches | git_diff | Pylons__pyramid-2224 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update to Sphinx 1.3.4 when released
There is a [bug in Sphinx 1.3.3 and 1.3.1](https://github.com/sphinx-doc/sphinx/issues/2189) (I haven't tried 1.3.2) where next and previous links in Sphinx documentation ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@
tests_require.append('zope.component>=3.11.0')
docs_extras = [
- 'Sphinx >= 1.3.1',
+ 'Sphinx >= 1.3.4',
'docutils',
'repoze.sphinx.autointerface',
'pylons_sphinx_latesturl',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -56,7 +56,7 @@\n tests_require.append('zope.component>=3.11.0')\n \n docs_extras = [\n- 'Sphinx >= 1.3.1',\n+ 'Sphinx >= 1.3.4',\n 'docutils',\n 'repoze.sphinx.autointerface',\n 'pylons_sphinx_latesturl',\n", "is... | 1,823 | 106 |
gh_patches_debug_25116 | rasdani/github-patches | git_diff | lutris__lutris-2682 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Failure to read Steam's config.vdf due to wrong case
Lutris can't read Steam's config.vdf file because the "Steam" value is actually lowercase when Lutris expects it to be uppercase.
:
"""Read the Steam configuration and return it as an object"""
+
+ def get_entry_case_insensitive(config_dict, path):
... | {"golden_diff": "diff --git a/lutris/util/steam/config.py b/lutris/util/steam/config.py\n--- a/lutris/util/steam/config.py\n+++ b/lutris/util/steam/config.py\n@@ -26,18 +26,25 @@\n \n def read_config(steam_data_dir):\n \"\"\"Read the Steam configuration and return it as an object\"\"\"\n+\n+ def get_entry_case_i... | 1,171 | 353 |
gh_patches_debug_29875 | rasdani/github-patches | git_diff | streamlink__streamlink-1727 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Request: Add more functions to facebook plugin
### Checklist
- [x] This is a bug report.
- [ ] This is a feature request.
- [x] This is a plugin (improvement) request.
- [ ] I have read the contribution... | diff --git a/src/streamlink/plugins/facebook.py b/src/streamlink/plugins/facebook.py
--- a/src/streamlink/plugins/facebook.py
+++ b/src/streamlink/plugins/facebook.py
@@ -1,26 +1,42 @@
import re
from streamlink.plugin import Plugin
-from streamlink.stream import HLSStream
-
-_playlist_url = "https://www.facebook.co... | {"golden_diff": "diff --git a/src/streamlink/plugins/facebook.py b/src/streamlink/plugins/facebook.py\n--- a/src/streamlink/plugins/facebook.py\n+++ b/src/streamlink/plugins/facebook.py\n@@ -1,26 +1,42 @@\n import re\n \n from streamlink.plugin import Plugin\n-from streamlink.stream import HLSStream\n-\n-_playlist_url ... | 590 | 584 |
gh_patches_debug_126 | rasdani/github-patches | git_diff | holoviz__panel-3990 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Clearing value of a DatetimePicker
#### Description of expected behavior and the observed behavior
Not sure if this is a bug or a new feature to Panel. Let's say I have a layout consisting of a button named ... | diff --git a/panel/models/datetime_picker.py b/panel/models/datetime_picker.py
--- a/panel/models/datetime_picker.py
+++ b/panel/models/datetime_picker.py
@@ -10,7 +10,7 @@
'''
- value = String(help="""
+ value = Nullable(String, help="""
The initial or picked date.
""")
| {"golden_diff": "diff --git a/panel/models/datetime_picker.py b/panel/models/datetime_picker.py\n--- a/panel/models/datetime_picker.py\n+++ b/panel/models/datetime_picker.py\n@@ -10,7 +10,7 @@\n \n '''\n \n- value = String(help=\"\"\"\n+ value = Nullable(String, help=\"\"\"\n The initial or picked date.\n... | 1,024 | 84 |
gh_patches_debug_8704 | rasdani/github-patches | git_diff | sublimelsp__LSP-1557 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[regression] lsp_execute does nothing due to empty session
Since this [commit](https://github.com/sublimelsp/LSP/commit/7d05794fa3cc4ecd3931d09a90e801addc70d9fa) the `capability` variable got deleted which me... | diff --git a/plugin/execute_command.py b/plugin/execute_command.py
--- a/plugin/execute_command.py
+++ b/plugin/execute_command.py
@@ -27,7 +27,7 @@
listener.do_signature_help_async(manual=False)
return sublime.set_timeout_async(run_async)
- session = self.session_by_name(sess... | {"golden_diff": "diff --git a/plugin/execute_command.py b/plugin/execute_command.py\n--- a/plugin/execute_command.py\n+++ b/plugin/execute_command.py\n@@ -27,7 +27,7 @@\n listener.do_signature_help_async(manual=False)\n \n return sublime.set_timeout_async(run_async)\n- session = s... | 1,189 | 124 |
gh_patches_debug_38287 | rasdani/github-patches | git_diff | microsoft__MLOS-358 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
flake8 and/or prettier setup for devcontainer
Per comments in #354 and #340
We should "just" add flake8 and some type of auto prettier to the devcontainer setup so that those types of things are caught duri... | diff --git a/mlos_bench/setup.py b/mlos_bench/setup.py
--- a/mlos_bench/setup.py
+++ b/mlos_bench/setup.py
@@ -18,14 +18,14 @@
from setuptools_scm import get_version
version = get_version(root='..', relative_to=__file__)
if version is not None:
- _VERSION = version
+ _VERSION = version # n... | {"golden_diff": "diff --git a/mlos_bench/setup.py b/mlos_bench/setup.py\n--- a/mlos_bench/setup.py\n+++ b/mlos_bench/setup.py\n@@ -18,14 +18,14 @@\n from setuptools_scm import get_version\n version = get_version(root='..', relative_to=__file__)\n if version is not None:\n- _VERSION = version\n+ ... | 1,935 | 744 |
gh_patches_debug_20127 | rasdani/github-patches | git_diff | rotki__rotki-591 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sign In Failed - TypeError
Good evening!
I'm here on Linux, I've just tried to log in to my Rotki database created with 1.0.4 (using 1.0.5 now). After I type in my password and log in, I get the message
... | diff --git a/rotkehlchen/db/settings.py b/rotkehlchen/db/settings.py
--- a/rotkehlchen/db/settings.py
+++ b/rotkehlchen/db/settings.py
@@ -68,7 +68,23 @@
elif key == 'include_crypto2crypto':
specified_args[key] = read_boolean(value)
elif key == 'taxfree_after_period':
- specifi... | {"golden_diff": "diff --git a/rotkehlchen/db/settings.py b/rotkehlchen/db/settings.py\n--- a/rotkehlchen/db/settings.py\n+++ b/rotkehlchen/db/settings.py\n@@ -68,7 +68,23 @@\n elif key == 'include_crypto2crypto':\n specified_args[key] = read_boolean(value)\n elif key == 'taxfree_after_period... | 1,588 | 276 |
gh_patches_debug_27214 | rasdani/github-patches | git_diff | mdn__kuma-6134 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove contributor notification post account creation
Once a user has successfully signed up, we show a banner similar to the one below either just below the page header, or generally at the top of the page.
... | diff --git a/kuma/users/signal_handlers.py b/kuma/users/signal_handlers.py
--- a/kuma/users/signal_handlers.py
+++ b/kuma/users/signal_handlers.py
@@ -1,14 +1,11 @@
from allauth.account.signals import email_confirmed, user_signed_up
from allauth.socialaccount.signals import social_account_removed
-from django.contrib... | {"golden_diff": "diff --git a/kuma/users/signal_handlers.py b/kuma/users/signal_handlers.py\n--- a/kuma/users/signal_handlers.py\n+++ b/kuma/users/signal_handlers.py\n@@ -1,14 +1,11 @@\n from allauth.account.signals import email_confirmed, user_signed_up\n from allauth.socialaccount.signals import social_account_remove... | 1,577 | 288 |
gh_patches_debug_11004 | rasdani/github-patches | git_diff | OpenNMT__OpenNMT-py-1841 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Alpha channel and grayscale in image-to-text with -image_channel_size=3
For training image to text, the argument `-image_channel_size=3` imply that the images already have the good number of channel. However,... | diff --git a/onmt/inputters/image_dataset.py b/onmt/inputters/image_dataset.py
--- a/onmt/inputters/image_dataset.py
+++ b/onmt/inputters/image_dataset.py
@@ -75,7 +75,8 @@
img = transforms.ToTensor()(
Image.fromarray(cv2.imread(img_path, 0)))
else:
- im... | {"golden_diff": "diff --git a/onmt/inputters/image_dataset.py b/onmt/inputters/image_dataset.py\n--- a/onmt/inputters/image_dataset.py\n+++ b/onmt/inputters/image_dataset.py\n@@ -75,7 +75,8 @@\n img = transforms.ToTensor()(\n Image.fromarray(cv2.imread(img_path, 0)))\n el... | 1,553 | 158 |
gh_patches_debug_39793 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-2965 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider tijuanaflats is broken
During the global build at 2021-05-26-14-42-23, spider **tijuanaflats** failed with **0 features** and **0 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-... | diff --git a/locations/spiders/tijuanaflats.py b/locations/spiders/tijuanaflats.py
--- a/locations/spiders/tijuanaflats.py
+++ b/locations/spiders/tijuanaflats.py
@@ -1,47 +1,45 @@
# -*- coding: utf-8 -*-
+import json
+
import scrapy
-import re
from locations.items import GeojsonPointItem
class TijuanaFlatsSp... | {"golden_diff": "diff --git a/locations/spiders/tijuanaflats.py b/locations/spiders/tijuanaflats.py\n--- a/locations/spiders/tijuanaflats.py\n+++ b/locations/spiders/tijuanaflats.py\n@@ -1,47 +1,45 @@\n # -*- coding: utf-8 -*-\n+import json\n+\n import scrapy\n-import re\n \n from locations.items import GeojsonPointIte... | 1,075 | 1,003 |
gh_patches_debug_836 | rasdani/github-patches | git_diff | lutris__lutris-2472 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Don't show Steam Linux Runtime when importing games
Link to the tool on steamdb: https://steamdb.info/app/1070560/
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of t... | diff --git a/lutris/services/steam.py b/lutris/services/steam.py
--- a/lutris/services/steam.py
+++ b/lutris/services/steam.py
@@ -20,6 +20,7 @@
installer_slug = "steam"
excluded_appids = [
"228980", # Steamworks Common Redistributables
+ "1070560", # Steam Linux Runtime
]
@classm... | {"golden_diff": "diff --git a/lutris/services/steam.py b/lutris/services/steam.py\n--- a/lutris/services/steam.py\n+++ b/lutris/services/steam.py\n@@ -20,6 +20,7 @@\n installer_slug = \"steam\"\n excluded_appids = [\n \"228980\", # Steamworks Common Redistributables\n+ \"1070560\", # Steam Linux... | 2,020 | 107 |
gh_patches_debug_7645 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-3327 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.... | diff --git a/colossalai/context/random/__init__.py b/colossalai/context/random/__init__.py
--- a/colossalai/context/random/__init__.py
+++ b/colossalai/context/random/__init__.py
@@ -1,5 +1,16 @@
-from ._helper import (seed, set_mode, with_seed, add_seed, get_seeds, get_states, get_current_mode, set_seed_states,
- ... | {"golden_diff": "diff --git a/colossalai/context/random/__init__.py b/colossalai/context/random/__init__.py\n--- a/colossalai/context/random/__init__.py\n+++ b/colossalai/context/random/__init__.py\n@@ -1,5 +1,16 @@\n-from ._helper import (seed, set_mode, with_seed, add_seed, get_seeds, get_states, get_current_mode, se... | 397 | 217 |
gh_patches_debug_1703 | rasdani/github-patches | git_diff | unionai-oss__pandera-1591 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error Importing Pandera with Polars extra
**Describe the bug**
I get an error when importing pandera after installing the latest 0.19.0b2 version with the polars extra in a clean environment. I can import it... | diff --git a/pandera/external_config.py b/pandera/external_config.py
--- a/pandera/external_config.py
+++ b/pandera/external_config.py
@@ -21,6 +21,8 @@
os.environ["PYARROW_IGNORE_TIMEZONE"] = "1"
import pyspark.pandas
+except (ImportError, ModuleNotFoundError):
+ pass
finally:
if is_spark_loca... | {"golden_diff": "diff --git a/pandera/external_config.py b/pandera/external_config.py\n--- a/pandera/external_config.py\n+++ b/pandera/external_config.py\n@@ -21,6 +21,8 @@\n os.environ[\"PYARROW_IGNORE_TIMEZONE\"] = \"1\"\n \n import pyspark.pandas\n+except (ImportError, ModuleNotFoundError):\n+ pass\n ... | 945 | 109 |
gh_patches_debug_22260 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-1392 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
E0002 bug when using parameters for DynamoDB AttributeDefinitions
*cfn-lint version: 0.28.2*
*Description of issue.*
Rule E3039 (added in 0.28.0) doesn't support Refs and results in a E0002 error for th... | diff --git a/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py b/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py
--- a/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py
+++ b/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py
@@ -77,7 +77,8 @@
message = 'The set of Attribut... | {"golden_diff": "diff --git a/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py b/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py\n--- a/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py\n+++ b/src/cfnlint/rules/resources/dynamodb/AttributeMismatch.py\n@@ -77,7 +77,8 @@\n message =... | 1,753 | 256 |
gh_patches_debug_5432 | rasdani/github-patches | git_diff | lhotse-speech__lhotse-240 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cut concatenate doesn't consider the first sample in each batch
Found in #234
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEG... | diff --git a/lhotse/dataset/cut_transforms/concatenate.py b/lhotse/dataset/cut_transforms/concatenate.py
--- a/lhotse/dataset/cut_transforms/concatenate.py
+++ b/lhotse/dataset/cut_transforms/concatenate.py
@@ -62,7 +62,7 @@
return CutSet.from_cuts(cuts)
cuts = sorted(cuts, key=lambda c: c.duration, rever... | {"golden_diff": "diff --git a/lhotse/dataset/cut_transforms/concatenate.py b/lhotse/dataset/cut_transforms/concatenate.py\n--- a/lhotse/dataset/cut_transforms/concatenate.py\n+++ b/lhotse/dataset/cut_transforms/concatenate.py\n@@ -62,7 +62,7 @@\n return CutSet.from_cuts(cuts)\n cuts = sorted(cuts, key=lambd... | 1,140 | 154 |
gh_patches_debug_34601 | rasdani/github-patches | git_diff | sunpy__sunpy-7316 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Resampling Maps in the example gallery gives a confusing example for the superpixel method
### Provide a general description of the issue or problem.
That's a minor thing perhaps but checking this [page](htt... | diff --git a/examples/map/map_resampling_and_superpixels.py b/examples/map/map_resampling_and_superpixels.py
--- a/examples/map/map_resampling_and_superpixels.py
+++ b/examples/map/map_resampling_and_superpixels.py
@@ -13,15 +13,16 @@
import sunpy.data.sample
import sunpy.map
-######################################... | {"golden_diff": "diff --git a/examples/map/map_resampling_and_superpixels.py b/examples/map/map_resampling_and_superpixels.py\n--- a/examples/map/map_resampling_and_superpixels.py\n+++ b/examples/map/map_resampling_and_superpixels.py\n@@ -13,15 +13,16 @@\n import sunpy.data.sample\n import sunpy.map\n \n-##############... | 888 | 554 |
gh_patches_debug_11324 | rasdani/github-patches | git_diff | spack__spack-5006 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issue while building mpiP
Trying to build this on ubuntu desktop gives (config.log):
```
configure:4289: /home/guest/workarena/softwares/sources/spack/lib/spack/env/gcc/gcc -c conftest.c >&5
conftest.c... | diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py
--- a/var/spack/repos/builtin/packages/mpip/package.py
+++ b/var/spack/repos/builtin/packages/mpip/package.py
@@ -33,10 +33,14 @@
version("3.4.1", "1168adc83777ac31d6ebd385823aabbd")
- depends_on... | {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py\n--- a/var/spack/repos/builtin/packages/mpip/package.py\n+++ b/var/spack/repos/builtin/packages/mpip/package.py\n@@ -33,10 +33,14 @@\n \n version(\"3.4.1\", \"1168adc83777ac31d6ebd385823... | 2,008 | 301 |
gh_patches_debug_12235 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-2303 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
_OTEL_METRICS_EXPORTER env var should be OTEL_METRICS_EXPORTER
The environment variable `_OTEL_METRICS_EXPORTER` is prefixed with an underscore, but there's no need for it as that environment variable is mark... | diff --git a/opentelemetry-api/src/opentelemetry/environment_variables.py b/opentelemetry-api/src/opentelemetry/environment_variables.py
--- a/opentelemetry-api/src/opentelemetry/environment_variables.py
+++ b/opentelemetry-api/src/opentelemetry/environment_variables.py
@@ -12,6 +12,12 @@
# See the License for the spe... | {"golden_diff": "diff --git a/opentelemetry-api/src/opentelemetry/environment_variables.py b/opentelemetry-api/src/opentelemetry/environment_variables.py\n--- a/opentelemetry-api/src/opentelemetry/environment_variables.py\n+++ b/opentelemetry-api/src/opentelemetry/environment_variables.py\n@@ -12,6 +12,12 @@\n # See th... | 777 | 206 |
gh_patches_debug_42145 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-1140 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Walmart Spider Error
Something with the Walmart spider appears to be failing. When importing the geojson file from alltheplaces.xyz to qgis or geojson.io, there are a large number of locations missing in the ... | diff --git a/locations/spiders/walmart.py b/locations/spiders/walmart.py
--- a/locations/spiders/walmart.py
+++ b/locations/spiders/walmart.py
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
import scrapy
import json
+import re
+from collections import defaultdict
from locations.items import GeojsonPointItem
@@ -11,1... | {"golden_diff": "diff --git a/locations/spiders/walmart.py b/locations/spiders/walmart.py\n--- a/locations/spiders/walmart.py\n+++ b/locations/spiders/walmart.py\n@@ -1,7 +1,9 @@\n # -*- coding: utf-8 -*-\n import scrapy\n import json\n+import re\n \n+from collections import defaultdict\n from locations.items import Ge... | 834 | 1,012 |
gh_patches_debug_12789 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-1463 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error validating return types when using a Generic in Union
There seems to be an issue with types.
Generics worked fine and dandy until I've tried to use them in a Union.
```python
@strawberry.type
clas... | diff --git a/strawberry/types/types.py b/strawberry/types/types.py
--- a/strawberry/types/types.py
+++ b/strawberry/types/types.py
@@ -152,6 +152,13 @@
# Check if the expected type matches the type found on the type_map
real_concrete_type = type(getattr(root, generic_field.name))
+
+ ... | {"golden_diff": "diff --git a/strawberry/types/types.py b/strawberry/types/types.py\n--- a/strawberry/types/types.py\n+++ b/strawberry/types/types.py\n@@ -152,6 +152,13 @@\n \n # Check if the expected type matches the type found on the type_map\n real_concrete_type = type(getattr(root, generic_f... | 1,930 | 187 |
gh_patches_debug_18543 | rasdani/github-patches | git_diff | mne-tools__mne-python-9055 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
use bibtex in multi_comp.py
convert references in `mne/stats/multi_comp.py` to use footcite / footbibliography
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of the... | diff --git a/mne/stats/multi_comp.py b/mne/stats/multi_comp.py
--- a/mne/stats/multi_comp.py
+++ b/mne/stats/multi_comp.py
@@ -17,7 +17,7 @@
def fdr_correction(pvals, alpha=0.05, method='indep'):
"""P-value correction with False Discovery Rate (FDR).
- Correction for multiple comparison using FDR [1]_.
+ ... | {"golden_diff": "diff --git a/mne/stats/multi_comp.py b/mne/stats/multi_comp.py\n--- a/mne/stats/multi_comp.py\n+++ b/mne/stats/multi_comp.py\n@@ -17,7 +17,7 @@\n def fdr_correction(pvals, alpha=0.05, method='indep'):\n \"\"\"P-value correction with False Discovery Rate (FDR).\n \n- Correction for multiple compa... | 1,359 | 258 |
gh_patches_debug_30754 | rasdani/github-patches | git_diff | cal-itp__benefits-441 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add logging for OAuth flows
We merged the basic implementation in #414, but neglected to include any additional logging around the new flows/logic.
Some ideas of what we should log:
- [x] The `OAUTH_CLI... | diff --git a/benefits/oauth/views.py b/benefits/oauth/views.py
--- a/benefits/oauth/views.py
+++ b/benefits/oauth/views.py
@@ -1,3 +1,5 @@
+import logging
+
from django.shortcuts import redirect
from django.urls import reverse
@@ -7,7 +9,12 @@
from benefits.settings import OAUTH_CLIENT_NAME
+logger = logging.g... | {"golden_diff": "diff --git a/benefits/oauth/views.py b/benefits/oauth/views.py\n--- a/benefits/oauth/views.py\n+++ b/benefits/oauth/views.py\n@@ -1,3 +1,5 @@\n+import logging\n+\n from django.shortcuts import redirect\n from django.urls import reverse\n \n@@ -7,7 +9,12 @@\n from benefits.settings import OAUTH_CLIENT_N... | 662 | 330 |
gh_patches_debug_13770 | rasdani/github-patches | git_diff | openstates__openstates-scrapers-1435 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RI: state legislator first names contain middle initials
For example, https://openstates.org/api/v1/legislators/RIL000179/ has first_name of "Moira J." and nothing in middle_name for Moira J. Walsh.
--- END ... | diff --git a/openstates/ri/legislators.py b/openstates/ri/legislators.py
--- a/openstates/ri/legislators.py
+++ b/openstates/ri/legislators.py
@@ -128,8 +128,14 @@
if d['address'] is '':
d['address'] = 'No Address Found'
+ # RI is very fond of First M. Last name formats and
+ ... | {"golden_diff": "diff --git a/openstates/ri/legislators.py b/openstates/ri/legislators.py\n--- a/openstates/ri/legislators.py\n+++ b/openstates/ri/legislators.py\n@@ -128,8 +128,14 @@\n if d['address'] is '':\n d['address'] = 'No Address Found'\n \n+ # RI is very fond of First M. ... | 1,904 | 203 |
gh_patches_debug_1787 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-9068 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[CT-3377] [Regression] `dbt deps` fails on tarball dependencies
### Is this a regression in a recent version of dbt-core?
- [X] I believe this is a regression in dbt-core functionality
- [X] I have searched ... | 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
@@ -31,8 +31,7 @@
def to_dict(self) -> Dict[str, str]:
return {
"tarball": self.tarball,
- "version": self.version,
- "package": self.package,
+... | {"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@@ -31,8 +31,7 @@\n def to_dict(self) -> Dict[str, str]:\n return {\n \"tarball\": self.tarball,\n- \"version\": self.version,\n- ... | 1,614 | 117 |
gh_patches_debug_38546 | rasdani/github-patches | git_diff | beetbox__beets-1129 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
zero: Permit stripping album art
It would be nice to have the option of automatically clearing embedded art when an item is imported. Whether or not a media item actually contains embedded art, beets should ... | diff --git a/beetsplug/zero.py b/beetsplug/zero.py
--- a/beetsplug/zero.py
+++ b/beetsplug/zero.py
@@ -17,7 +17,7 @@
import re
import logging
from beets.plugins import BeetsPlugin
-from beets.library import Item
+from beets.mediafile import MediaFile
from beets.importer import action
from beets.util import confit
... | {"golden_diff": "diff --git a/beetsplug/zero.py b/beetsplug/zero.py\n--- a/beetsplug/zero.py\n+++ b/beetsplug/zero.py\n@@ -17,7 +17,7 @@\n import re\n import logging\n from beets.plugins import BeetsPlugin\n-from beets.library import Item\n+from beets.mediafile import MediaFile\n from beets.importer import action\n fro... | 1,415 | 549 |
gh_patches_debug_32722 | rasdani/github-patches | git_diff | pypa__pip-3443 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Protect a few more requests imports
In Debian, we unbundle requests, and further, we unbundled all vendored packages from requests. This causes pip's vendoring algorithm to fail. I had to add this patch to ... | diff --git a/pip/_vendor/__init__.py b/pip/_vendor/__init__.py
--- a/pip/_vendor/__init__.py
+++ b/pip/_vendor/__init__.py
@@ -32,10 +32,22 @@
try:
__import__(vendored_name, globals(), locals(), level=0)
except ImportError:
- __import__(modulename, globals(), locals(), level=0)
- sys.mo... | {"golden_diff": "diff --git a/pip/_vendor/__init__.py b/pip/_vendor/__init__.py\n--- a/pip/_vendor/__init__.py\n+++ b/pip/_vendor/__init__.py\n@@ -32,10 +32,22 @@\n try:\n __import__(vendored_name, globals(), locals(), level=0)\n except ImportError:\n- __import__(modulename, globals(), locals(), ... | 1,918 | 553 |
gh_patches_debug_20500 | rasdani/github-patches | git_diff | AlexsLemonade__refinebio-3299 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cache Docker Images by Branch
### Context
We want to be able to cache docker image layers that are created locally as testing artfacts locally to be used by github actions.
The current prepare_images.sh d... | diff --git a/common/setup.py b/common/setup.py
--- a/common/setup.py
+++ b/common/setup.py
@@ -1,4 +1,6 @@
import os
+import re
+from datetime import datetime
from setuptools import find_packages, setup
@@ -11,11 +13,21 @@
version_string = version_file.read().strip().split("-")[0]
except OSError:
p... | {"golden_diff": "diff --git a/common/setup.py b/common/setup.py\n--- a/common/setup.py\n+++ b/common/setup.py\n@@ -1,4 +1,6 @@\n import os\n+import re\n+from datetime import datetime\n \n from setuptools import find_packages, setup\n \n@@ -11,11 +13,21 @@\n version_string = version_file.read().strip().split(\"-... | 972 | 353 |
gh_patches_debug_25112 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-668 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
capture_backtrace raises AttributeError on PEP-420 namespace packages
The new `capture_backtrace` function in `scout_apm.core.backtrace` raises an AttributeError when the stack includes a [PEP-420] namespace ... | diff --git a/src/scout_apm/core/backtrace.py b/src/scout_apm/core/backtrace.py
--- a/src/scout_apm/core/backtrace.py
+++ b/src/scout_apm/core/backtrace.py
@@ -7,6 +7,9 @@
import sysconfig
import traceback
import warnings
+from logging import getLogger
+
+logger = getLogger(__name__)
# Maximum non-Scout frames to ... | {"golden_diff": "diff --git a/src/scout_apm/core/backtrace.py b/src/scout_apm/core/backtrace.py\n--- a/src/scout_apm/core/backtrace.py\n+++ b/src/scout_apm/core/backtrace.py\n@@ -7,6 +7,9 @@\n import sysconfig\n import traceback\n import warnings\n+from logging import getLogger\n+\n+logger = getLogger(__name__)\n \n # ... | 1,748 | 388 |
gh_patches_debug_14653 | rasdani/github-patches | git_diff | conda__conda-4327 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Channels in centrally installed .condarc file are being ignored in conda 4.3.4
Hi, I am testing a centrally installed Anaconda setup with Anaconda installed under `C:\Program Files\Anaconda3`. I have a condar... | diff --git a/conda/__init__.py b/conda/__init__.py
--- a/conda/__init__.py
+++ b/conda/__init__.py
@@ -6,7 +6,9 @@
"""OS-agnostic, system-level binary package manager."""
from __future__ import absolute_import, division, print_function, unicode_literals
+import os
from os.path import dirname
+import sys
from ._... | {"golden_diff": "diff --git a/conda/__init__.py b/conda/__init__.py\n--- a/conda/__init__.py\n+++ b/conda/__init__.py\n@@ -6,7 +6,9 @@\n \"\"\"OS-agnostic, system-level binary package manager.\"\"\"\n from __future__ import absolute_import, division, print_function, unicode_literals\n \n+import os\n from os.path import... | 1,236 | 181 |
gh_patches_debug_19684 | rasdani/github-patches | git_diff | Azure__azure-cli-extensions-2985 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The parameter for --administration-members is incorrectly stated as optional
For the function 'az powerbi embedded-capacity create', the parameter for --administration-members is incorrectly stated as option... | diff --git a/src/powerbidedicated/azext_powerbidedicated/_params.py b/src/powerbidedicated/azext_powerbidedicated/_params.py
--- a/src/powerbidedicated/azext_powerbidedicated/_params.py
+++ b/src/powerbidedicated/azext_powerbidedicated/_params.py
@@ -41,7 +41,7 @@
c.argument('sku_name', sku_name_type)
... | {"golden_diff": "diff --git a/src/powerbidedicated/azext_powerbidedicated/_params.py b/src/powerbidedicated/azext_powerbidedicated/_params.py\n--- a/src/powerbidedicated/azext_powerbidedicated/_params.py\n+++ b/src/powerbidedicated/azext_powerbidedicated/_params.py\n@@ -41,7 +41,7 @@\n c.argument('sku_name', sk... | 1,727 | 297 |
gh_patches_debug_10979 | rasdani/github-patches | git_diff | bokeh__bokeh-10074 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[DOCS] Page wise display of documentation search
**Is your feature request related to a problem?**
Yes. I searched for a relatively simple query in the documentation search bar of https://docs.bokeh.org, an... | diff --git a/sphinx/docserver.py b/sphinx/docserver.py
--- a/sphinx/docserver.py
+++ b/sphinx/docserver.py
@@ -1,3 +1,4 @@
+import asyncio
import os
import sys
import threading
@@ -10,6 +11,11 @@
from tornado.ioloop import IOLoop
from tornado.wsgi import WSGIContainer
+# Needed for Windows + Python 3.8 config
+i... | {"golden_diff": "diff --git a/sphinx/docserver.py b/sphinx/docserver.py\n--- a/sphinx/docserver.py\n+++ b/sphinx/docserver.py\n@@ -1,3 +1,4 @@\n+import asyncio\n import os\n import sys\n import threading\n@@ -10,6 +11,11 @@\n from tornado.ioloop import IOLoop\n from tornado.wsgi import WSGIContainer\n \n+# Needed for W... | 1,253 | 170 |
gh_patches_debug_31758 | rasdani/github-patches | git_diff | docker__docker-py-384 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Do not support sslv3 (poodle)
In Docker 1.3.1 (coming very soon), only TLS1.0+ will be supported.
Ping @shin-
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of thes... | diff --git a/docker/ssladapter/ssladapter.py b/docker/ssladapter/ssladapter.py
--- a/docker/ssladapter/ssladapter.py
+++ b/docker/ssladapter/ssladapter.py
@@ -4,6 +4,7 @@
"""
from distutils.version import StrictVersion
from requests.adapters import HTTPAdapter
+import ssl
try:
import requests.packages.urllib3 ... | {"golden_diff": "diff --git a/docker/ssladapter/ssladapter.py b/docker/ssladapter/ssladapter.py\n--- a/docker/ssladapter/ssladapter.py\n+++ b/docker/ssladapter/ssladapter.py\n@@ -4,6 +4,7 @@\n \"\"\"\n from distutils.version import StrictVersion\n from requests.adapters import HTTPAdapter\n+import ssl\n try:\n impo... | 1,376 | 458 |
gh_patches_debug_36699 | rasdani/github-patches | git_diff | secdev__scapy-2078 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeErrror: module 'os' has no attribute 'popen2' when using voip module
Hello I have installed the last scapy version, I want to use the module voip but i has the issue
AttributeErrror: module 'os' ha... | diff --git a/scapy/modules/voip.py b/scapy/modules/voip.py
--- a/scapy/modules/voip.py
+++ b/scapy/modules/voip.py
@@ -8,7 +8,7 @@
"""
from __future__ import absolute_import
-import os
+import subprocess
###################
# Listen VoIP #
###################
@@ -21,12 +21,12 @@
from scapy.modules.six.moves... | {"golden_diff": "diff --git a/scapy/modules/voip.py b/scapy/modules/voip.py\n--- a/scapy/modules/voip.py\n+++ b/scapy/modules/voip.py\n@@ -8,7 +8,7 @@\n \"\"\"\n \n from __future__ import absolute_import\n-import os\n+import subprocess\n ###################\n # Listen VoIP #\n ###################\n@@ -21,12 +21,12 ... | 1,915 | 692 |
gh_patches_debug_27244 | rasdani/github-patches | git_diff | falconry__falcon-1182 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Drop support for Python 3.3
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 impor... | diff --git a/falcon/media/msgpack.py b/falcon/media/msgpack.py
--- a/falcon/media/msgpack.py
+++ b/falcon/media/msgpack.py
@@ -19,9 +19,6 @@
.. code::
$ pip install msgpack
-
- Python 2.6 users will need to use the deprecated ``msgpack-python``
- package instead, pinned to version ... | {"golden_diff": "diff --git a/falcon/media/msgpack.py b/falcon/media/msgpack.py\n--- a/falcon/media/msgpack.py\n+++ b/falcon/media/msgpack.py\n@@ -19,9 +19,6 @@\n .. code::\n \n $ pip install msgpack\n-\n- Python 2.6 users will need to use the deprecated ``msgpack-python``\n- package i... | 2,037 | 365 |
gh_patches_debug_11025 | rasdani/github-patches | git_diff | Qiskit__qiskit-3555 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't invert gate created from QuantumCircuit.to_gate
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informatio... | diff --git a/qiskit/converters/circuit_to_gate.py b/qiskit/converters/circuit_to_gate.py
--- a/qiskit/converters/circuit_to_gate.py
+++ b/qiskit/converters/circuit_to_gate.py
@@ -81,9 +81,14 @@
if gate.num_qubits > 0:
q = QuantumRegister(gate.num_qubits, 'q')
- definition = list(map(lambda x:
- ... | {"golden_diff": "diff --git a/qiskit/converters/circuit_to_gate.py b/qiskit/converters/circuit_to_gate.py\n--- a/qiskit/converters/circuit_to_gate.py\n+++ b/qiskit/converters/circuit_to_gate.py\n@@ -81,9 +81,14 @@\n if gate.num_qubits > 0:\n q = QuantumRegister(gate.num_qubits, 'q')\n \n- definition = li... | 1,340 | 228 |
gh_patches_debug_62393 | rasdani/github-patches | git_diff | AUTOMATIC1111__stable-diffusion-webui-6772 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: New SHA256 hash takes extremely long time up to a point of of model load being unusable
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent buil... | diff --git a/modules/hashes.py b/modules/hashes.py
--- a/modules/hashes.py
+++ b/modules/hashes.py
@@ -34,9 +34,10 @@
def calculate_sha256(filename):
hash_sha256 = hashlib.sha256()
+ blksize = 1024 * 1024
with open(filename, "rb") as f:
- for chunk in iter(lambda: f.read(4096), b""):
+ ... | {"golden_diff": "diff --git a/modules/hashes.py b/modules/hashes.py\n--- a/modules/hashes.py\n+++ b/modules/hashes.py\n@@ -34,9 +34,10 @@\n \r\n def calculate_sha256(filename):\r\n hash_sha256 = hashlib.sha256()\r\n+ blksize = 1024 * 1024\r\n \r\n with open(filename, \"rb\") as f:\r\n- for chunk in it... | 1,459 | 148 |
gh_patches_debug_605 | rasdani/github-patches | git_diff | pex-tool__pex-1664 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.71
On the docket:
+ [x] Secure Pex against sha1 collision attacks. #1662
+ [x] Problems building venvs from certain distributions. #1656
--- END ISSUE ---
Below are some code segments, each f... | 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.70"
+__version__ = "2.1.71"
| {"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.70\"\n+__version__ = \"2.1.71\"\n", "... | 359 | 96 |
gh_patches_debug_881 | rasdani/github-patches | git_diff | python__peps-3263 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Infra: Check Sphinx warnings on CI
This is similar to what we have in the CPython repo, most recently: https://github.com/python/cpython/pull/106460, and will help us gradually remove Sphinx warnings, and avo... | diff --git a/conf.py b/conf.py
--- a/conf.py
+++ b/conf.py
@@ -45,6 +45,9 @@
"pep-0012/pep-NNNN.rst",
]
+# Warn on missing references
+nitpicky = True
+
# Intersphinx configuration
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
| {"golden_diff": "diff --git a/conf.py b/conf.py\n--- a/conf.py\n+++ b/conf.py\n@@ -45,6 +45,9 @@\n \"pep-0012/pep-NNNN.rst\",\n ]\n \n+# Warn on missing references\n+nitpicky = True\n+\n # Intersphinx configuration\n intersphinx_mapping = {\n 'python': ('https://docs.python.org/3/', None),\n", "issue": "Infra: ... | 1,252 | 92 |
gh_patches_debug_32502 | rasdani/github-patches | git_diff | TileDB-Inc__TileDB-Py-263 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
multi_index not accepting tuples
The [UDF apply docs](https://docs.tiledb.com/cloud/client-api/serverless-udfs#multi-index-usage) imply the tuples and slices are interchangeable. The standard API throws an e... | diff --git a/tiledb/multirange_indexing.py b/tiledb/multirange_indexing.py
--- a/tiledb/multirange_indexing.py
+++ b/tiledb/multirange_indexing.py
@@ -8,11 +8,6 @@
except:
from tiledb.indexing import multi_index
-def _index_as_tuple(idx):
- """Forces scalar index objects to a tuple representation"""
- if ... | {"golden_diff": "diff --git a/tiledb/multirange_indexing.py b/tiledb/multirange_indexing.py\n--- a/tiledb/multirange_indexing.py\n+++ b/tiledb/multirange_indexing.py\n@@ -8,11 +8,6 @@\n except:\n from tiledb.indexing import multi_index\n \n-def _index_as_tuple(idx):\n- \"\"\"Forces scalar index objects to a tupl... | 1,933 | 427 |
gh_patches_debug_3260 | rasdani/github-patches | git_diff | getredash__redash-5623 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Loading schema for Sqlite DB with "Order" column name fails
### Issue Summary
I added a Sqlite Database which has an column with the name `Order`.
When I try to create a query, the error `Schema refresh f... | diff --git a/redash/query_runner/sqlite.py b/redash/query_runner/sqlite.py
--- a/redash/query_runner/sqlite.py
+++ b/redash/query_runner/sqlite.py
@@ -29,7 +29,7 @@
def _get_tables(self, schema):
query_table = "select tbl_name from sqlite_master where type='table'"
- query_columns = "PRAGMA table... | {"golden_diff": "diff --git a/redash/query_runner/sqlite.py b/redash/query_runner/sqlite.py\n--- a/redash/query_runner/sqlite.py\n+++ b/redash/query_runner/sqlite.py\n@@ -29,7 +29,7 @@\n \n def _get_tables(self, schema):\n query_table = \"select tbl_name from sqlite_master where type='table'\"\n- que... | 1,087 | 120 |
gh_patches_debug_35067 | rasdani/github-patches | git_diff | fedora-infra__bodhi-3276 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RSS feed gives no information about packages build
Since commit 60dc56c that RSS feed doesn't give information about the packages affected in a build.
Example from [Fedora30 Stable - RSS](https://bodhi.fedor... | diff --git a/bodhi/server/renderers.py b/bodhi/server/renderers.py
--- a/bodhi/server/renderers.py
+++ b/bodhi/server/renderers.py
@@ -23,6 +23,8 @@
from feedgen.feed import FeedGenerator
from pyramid.exceptions import HTTPBadRequest
+from bodhi.server.util import markup
+
log = logging.getLogger(__name__)
@@ ... | {"golden_diff": "diff --git a/bodhi/server/renderers.py b/bodhi/server/renderers.py\n--- a/bodhi/server/renderers.py\n+++ b/bodhi/server/renderers.py\n@@ -23,6 +23,8 @@\n from feedgen.feed import FeedGenerator\n from pyramid.exceptions import HTTPBadRequest\n \n+from bodhi.server.util import markup\n+\n \n log = loggin... | 2,030 | 536 |
gh_patches_debug_36153 | rasdani/github-patches | git_diff | scikit-hep__pyhf-1556 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove Python 2 syntax from events examples in comments
# Description
In `pyhf.events` there are a two examples of Python 2 syntax being used for
https://github.com/scikit-hep/pyhf/blob/29c3df0e23a4280... | diff --git a/src/pyhf/events.py b/src/pyhf/events.py
--- a/src/pyhf/events.py
+++ b/src/pyhf/events.py
@@ -89,22 +89,27 @@
"""
Subscribe a function or object method as a callback to an event.
- Note: this is meant to be used as a decorator.
+ .. note::
+
+ This is meant to be used as a decorator.
... | {"golden_diff": "diff --git a/src/pyhf/events.py b/src/pyhf/events.py\n--- a/src/pyhf/events.py\n+++ b/src/pyhf/events.py\n@@ -89,22 +89,27 @@\n \"\"\"\n Subscribe a function or object method as a callback to an event.\n \n- Note: this is meant to be used as a decorator.\n+ .. note::\n+\n+ This is mea... | 1,988 | 715 |
gh_patches_debug_11482 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-228 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Capture details of Celery Chains and Chords
Celery has some more advanced features to join multiple jobs into one. The agent needs testing and investigation into how they can be best instrumented.
--- END IS... | diff --git a/src/scout_apm/celery.py b/src/scout_apm/celery.py
--- a/src/scout_apm/celery.py
+++ b/src/scout_apm/celery.py
@@ -29,6 +29,13 @@
else:
tracked_request.tag("queue_time", queue_time)
+ task_id = getattr(task.request, "id", None)
+ if task_id:
+ tracked_request.tag("task_i... | {"golden_diff": "diff --git a/src/scout_apm/celery.py b/src/scout_apm/celery.py\n--- a/src/scout_apm/celery.py\n+++ b/src/scout_apm/celery.py\n@@ -29,6 +29,13 @@\n else:\n tracked_request.tag(\"queue_time\", queue_time)\n \n+ task_id = getattr(task.request, \"id\", None)\n+ if task_id:\n+ ... | 837 | 190 |
gh_patches_debug_20353 | rasdani/github-patches | git_diff | WeblateOrg__weblate-10604 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Some languages don't have all strings available for translation
### Describe the issue
My project is here: https://hosted.weblate.org/projects/feeder/android-strings
A few languages Polish, French and Chi... | diff --git a/weblate/addons/cleanup.py b/weblate/addons/cleanup.py
--- a/weblate/addons/cleanup.py
+++ b/weblate/addons/cleanup.py
@@ -34,7 +34,7 @@
if filenames is None:
continue
self.extra_files.extend(filenames)
- translation.store_hash()
+ # Do not up... | {"golden_diff": "diff --git a/weblate/addons/cleanup.py b/weblate/addons/cleanup.py\n--- a/weblate/addons/cleanup.py\n+++ b/weblate/addons/cleanup.py\n@@ -34,7 +34,7 @@\n if filenames is None:\n continue\n self.extra_files.extend(filenames)\n- translation.store_hash()\... | 1,143 | 230 |
gh_patches_debug_3202 | rasdani/github-patches | git_diff | hylang__hy-2190 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add `project_urls` to `setup.py`
This would allow us to provide links to our GitHub repository etc. in a sidebar on PyPI.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or mo... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -66,5 +66,9 @@
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Libraries",
- ]
+ ],
+ project_urls={
+ "Documentation": "https:... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -66,5 +66,9 @@\n \"Topic :: Software Development :: Code Generators\",\n \"Topic :: Software Development :: Compilers\",\n \"Topic :: Software Development :: Libraries\",\n- ]\n+ ],\n+ project_urls={\n... | 1,002 | 107 |
gh_patches_debug_39739 | rasdani/github-patches | git_diff | streamlink__streamlink-1878 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Problem with live.russia.tv
I have Problem with the Plugin live.russia.tv :
```
#SERVICE 4097:0:1:0:0:0:224:0:0:0:http%3a//127.0.0.1%3a8088/https%3a//live.russia.tv/index/index/channel_id/76:Москва 24 HD
... | diff --git a/src/streamlink/plugins/live_russia_tv.py b/src/streamlink/plugins/live_russia_tv.py
--- a/src/streamlink/plugins/live_russia_tv.py
+++ b/src/streamlink/plugins/live_russia_tv.py
@@ -1,33 +1,81 @@
+import logging
import re
+
from streamlink.plugin import Plugin
-from streamlink.plugin.api import http
-fro... | {"golden_diff": "diff --git a/src/streamlink/plugins/live_russia_tv.py b/src/streamlink/plugins/live_russia_tv.py\n--- a/src/streamlink/plugins/live_russia_tv.py\n+++ b/src/streamlink/plugins/live_russia_tv.py\n@@ -1,33 +1,81 @@\n+import logging\n import re\n+\n from streamlink.plugin import Plugin\n-from streamlink.pl... | 939 | 980 |
gh_patches_debug_11877 | rasdani/github-patches | git_diff | CTFd__CTFd-1048 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
import will crash ctfd
<!--
If this is a bug report please fill out the template below.
If this is a feature request please describe the behavior that you'd like to see.
-->
**Environment**:
- CT... | diff --git a/migrations/versions/b5551cd26764_add_captain_column_to_teams.py b/migrations/versions/b5551cd26764_add_captain_column_to_teams.py
--- a/migrations/versions/b5551cd26764_add_captain_column_to_teams.py
+++ b/migrations/versions/b5551cd26764_add_captain_column_to_teams.py
@@ -30,7 +30,11 @@
def upgrade():
... | {"golden_diff": "diff --git a/migrations/versions/b5551cd26764_add_captain_column_to_teams.py b/migrations/versions/b5551cd26764_add_captain_column_to_teams.py\n--- a/migrations/versions/b5551cd26764_add_captain_column_to_teams.py\n+++ b/migrations/versions/b5551cd26764_add_captain_column_to_teams.py\n@@ -30,7 +30,11 @... | 991 | 257 |
gh_patches_debug_7915 | rasdani/github-patches | git_diff | psychopy__psychopy-3457 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Windows seg fault when defaultView set to Runner
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `psychopy/... | diff --git a/psychopy/app/pavlovia_ui/menu.py b/psychopy/app/pavlovia_ui/menu.py
--- a/psychopy/app/pavlovia_ui/menu.py
+++ b/psychopy/app/pavlovia_ui/menu.py
@@ -82,9 +82,9 @@
self.setUser(user)
def setUser(self, user=None):
-
- if user is None and PavloviaMenu.appData['pavloviaUser']:
- ... | {"golden_diff": "diff --git a/psychopy/app/pavlovia_ui/menu.py b/psychopy/app/pavlovia_ui/menu.py\n--- a/psychopy/app/pavlovia_ui/menu.py\n+++ b/psychopy/app/pavlovia_ui/menu.py\n@@ -82,9 +82,9 @@\n self.setUser(user)\n \n def setUser(self, user=None):\n-\n- if user is None and PavloviaMenu.appData['... | 1,796 | 195 |
gh_patches_debug_11710 | rasdani/github-patches | git_diff | Textualize__textual-2317 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Scrolling containers should be focusable by default
`ScrollHorizontal` and `ScrollVertical` should have `can_focus=True`.
Check this doesn't break any of the example apps.
--- END ISSUE ---
Below are some ... | diff --git a/src/textual/containers.py b/src/textual/containers.py
--- a/src/textual/containers.py
+++ b/src/textual/containers.py
@@ -31,7 +31,7 @@
"""
-class VerticalScroll(Widget):
+class VerticalScroll(Widget, can_focus=True):
"""A container which arranges children vertically, with an automatic vertic... | {"golden_diff": "diff --git a/src/textual/containers.py b/src/textual/containers.py\n--- a/src/textual/containers.py\n+++ b/src/textual/containers.py\n@@ -31,7 +31,7 @@\n \"\"\"\n \n \n-class VerticalScroll(Widget):\n+class VerticalScroll(Widget, can_focus=True):\n \"\"\"A container which arranges children vert... | 1,002 | 144 |
gh_patches_debug_14494 | rasdani/github-patches | git_diff | quantumlib__Cirq-3163 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update code for when Engine metric qubits are formatted differently
There is currently code in calibration.py that looks at qubit ids that start with `q` and removes this `q` before getting the grid qubit. I... | diff --git a/cirq/google/engine/calibration.py b/cirq/google/engine/calibration.py
--- a/cirq/google/engine/calibration.py
+++ b/cirq/google/engine/calibration.py
@@ -67,12 +67,8 @@
getattr(v, v.WhichOneof('val')) for v in metric.values
]
if metric.targets:
- ta... | {"golden_diff": "diff --git a/cirq/google/engine/calibration.py b/cirq/google/engine/calibration.py\n--- a/cirq/google/engine/calibration.py\n+++ b/cirq/google/engine/calibration.py\n@@ -67,12 +67,8 @@\n getattr(v, v.WhichOneof('val')) for v in metric.values\n ]\n if metric.targe... | 2,045 | 215 |
gh_patches_debug_35158 | rasdani/github-patches | git_diff | python-discord__bot-527 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Restricting/redirecting output of commands to bot-commands for regular users
**Edit:** I've decided to make this a general issue, since the `!free` command turns out to be a bit disruptive as well. In python-... | diff --git a/bot/cogs/free.py b/bot/cogs/free.py
--- a/bot/cogs/free.py
+++ b/bot/cogs/free.py
@@ -72,30 +72,27 @@
# Display all potentially inactive channels
# in descending order of inactivity
if free_channels:
- embed.description += "**The following channel{0} look{1} free:**\n\... | {"golden_diff": "diff --git a/bot/cogs/free.py b/bot/cogs/free.py\n--- a/bot/cogs/free.py\n+++ b/bot/cogs/free.py\n@@ -72,30 +72,27 @@\n # Display all potentially inactive channels\n # in descending order of inactivity\n if free_channels:\n- embed.description += \"**The following chan... | 1,845 | 551 |
gh_patches_debug_11955 | rasdani/github-patches | git_diff | MongoEngine__mongoengine-1430 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Drop Python 2.6 support
For the most relevant discussion about the topic, see #1294.
Plan:
1. In the upcoming minor release, I'm going to include `warnings.warn(msg, DeprecationWarning)`. with the message... | diff --git a/mongoengine/python_support.py b/mongoengine/python_support.py
--- a/mongoengine/python_support.py
+++ b/mongoengine/python_support.py
@@ -1,9 +1,22 @@
-"""Helper functions and types to aid with Python 2.5 - 3 support."""
+"""Helper functions and types to aid with Python 2.6 - 3 support."""
import sys
+i... | {"golden_diff": "diff --git a/mongoengine/python_support.py b/mongoengine/python_support.py\n--- a/mongoengine/python_support.py\n+++ b/mongoengine/python_support.py\n@@ -1,9 +1,22 @@\n-\"\"\"Helper functions and types to aid with Python 2.5 - 3 support.\"\"\"\n+\"\"\"Helper functions and types to aid with Python 2.6 -... | 702 | 253 |
gh_patches_debug_11989 | rasdani/github-patches | git_diff | sagemath__sage-36173 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unoptimal memory complexity of `sage.matrix.berlekamp`
The code here is unoptimal:
https://github.com/sagemath/sage/blob/6695becb762aebab78ef47d0fb12eae52be5d79d/src/sage/matrix/berlekamp_massey.py#L90-L98... | diff --git a/src/sage/matrix/berlekamp_massey.py b/src/sage/matrix/berlekamp_massey.py
--- a/src/sage/matrix/berlekamp_massey.py
+++ b/src/sage/matrix/berlekamp_massey.py
@@ -84,15 +84,11 @@
K = a[0].parent().fraction_field()
except AttributeError:
K = sage.rings.rational_field.RationalField()
- ... | {"golden_diff": "diff --git a/src/sage/matrix/berlekamp_massey.py b/src/sage/matrix/berlekamp_massey.py\n--- a/src/sage/matrix/berlekamp_massey.py\n+++ b/src/sage/matrix/berlekamp_massey.py\n@@ -84,15 +84,11 @@\n K = a[0].parent().fraction_field()\n except AttributeError:\n K = sage.rings.rational_f... | 1,705 | 362 |
gh_patches_debug_2024 | rasdani/github-patches | git_diff | facebookresearch__fairseq-214 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Size Mismatch in AdaptiveSoftmax when targets are not specified
Following up on #212 , I'm updating `sequence_generator.py` to generate text from a pre-trained language model (initially trained with adaptive ... | diff --git a/fairseq/modules/adaptive_softmax.py b/fairseq/modules/adaptive_softmax.py
--- a/fairseq/modules/adaptive_softmax.py
+++ b/fairseq/modules/adaptive_softmax.py
@@ -22,6 +22,9 @@
if vocab_size > cutoff[-1]:
cutoff = cutoff + [vocab_size]
+ else:
+ assert vocab_size ==... | {"golden_diff": "diff --git a/fairseq/modules/adaptive_softmax.py b/fairseq/modules/adaptive_softmax.py\n--- a/fairseq/modules/adaptive_softmax.py\n+++ b/fairseq/modules/adaptive_softmax.py\n@@ -22,6 +22,9 @@\n \n if vocab_size > cutoff[-1]:\n cutoff = cutoff + [vocab_size]\n+ else:\n+ ... | 1,818 | 119 |
gh_patches_debug_34863 | rasdani/github-patches | git_diff | microsoft__lisa-836 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ubuntu 20.04 - platform.dist() is deprecated since Python 3.5 and removed in Python 3.8
Affected distro - ubuntu 20.04 (use python 3.8)
Affected case - WALA-VERIFY-VERBOSE-ENABLED-LOGS
Use distro.linux_dis... | diff --git a/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py b/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py
--- a/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py
+++ b/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py
@@ -7,6 +7,7 @@
import os
import platform
import time
+import sys
parse... | {"golden_diff": "diff --git a/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py b/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py\n--- a/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py\n+++ b/Testscripts/Linux/WALA-VERIFY-VERBOSE-ENABLED-LOGS.py\n@@ -7,6 +7,7 @@\n import os\n import platform\n import ti... | 1,169 | 564 |
gh_patches_debug_9987 | rasdani/github-patches | git_diff | cltk__cltk-906 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix broken NER doctest
Open to anyone.
This simple NER doctest: https://github.com/cltk/cltk/blob/9b9cdb42dcc1c707ab3db3ef8214837bb7c262b5/cltk/tag/ner.py#L78
is all of a sudden failing (example: https:... | diff --git a/cltk/tag/ner.py b/cltk/tag/ner.py
--- a/cltk/tag/ner.py
+++ b/cltk/tag/ner.py
@@ -74,10 +74,6 @@
def tag_ner(lang, input_text, output_type=list):
"""Run NER for chosen language.
- Choosing output_type=list, returns a list of tuples:
-
- >>> tag_ner('latin', input_text='ut Venus, ut Sirius... | {"golden_diff": "diff --git a/cltk/tag/ner.py b/cltk/tag/ner.py\n--- a/cltk/tag/ner.py\n+++ b/cltk/tag/ner.py\n@@ -74,10 +74,6 @@\n \n def tag_ner(lang, input_text, output_type=list):\n \"\"\"Run NER for chosen language.\n- Choosing output_type=list, returns a list of tuples:\n- \n- >>> tag_ner('latin', in... | 1,786 | 189 |
gh_patches_debug_10497 | rasdani/github-patches | git_diff | lhotse-speech__lhotse-138 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: broken import from augmentations
Hi I installed the latest pip version of lhotse and I am getting an import error when using the lhotse CLI:
Setup:
```
python3.7.0
lhotse==0.2.0
```
To reprodu... | diff --git a/lhotse/augmentation/__init__.py b/lhotse/augmentation/__init__.py
--- a/lhotse/augmentation/__init__.py
+++ b/lhotse/augmentation/__init__.py
@@ -1,3 +1,3 @@
from .common import AugmentFn
from .torchaudio import *
-from .wavaugment import WavAugmenter, is_wav_augment_available
+from .wavaugment import Wa... | {"golden_diff": "diff --git a/lhotse/augmentation/__init__.py b/lhotse/augmentation/__init__.py\n--- a/lhotse/augmentation/__init__.py\n+++ b/lhotse/augmentation/__init__.py\n@@ -1,3 +1,3 @@\n from .common import AugmentFn\n from .torchaudio import *\n-from .wavaugment import WavAugmenter, is_wav_augment_available\n+fr... | 1,057 | 219 |
gh_patches_debug_15590 | rasdani/github-patches | git_diff | plone__Products.CMFPlone-3688 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update package metadata in PyPi
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 f... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -32,6 +32,19 @@
author_email='releasemanager@plone.org',
url='https://plone.org',
license='GPL version 2',
+ project_urls={
+ "Homepage": "https://plone.org",
+ "Documentation": "https://docs.plone.org",
+ "PyPI": "... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -32,6 +32,19 @@\n author_email='releasemanager@plone.org',\n url='https://plone.org',\n license='GPL version 2',\n+ project_urls={\n+ \"Homepage\": \"https://plone.org\",\n+ \"Documentation\": \"https://do... | 1,474 | 268 |
gh_patches_debug_42382 | rasdani/github-patches | git_diff | lutris__lutris-2973 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add option to turn columns on/off in List View
When right-clicking to table headbar in List View, you expect to get a menu for turning columns on/off, but you just select first game in the list.
--- END ISSU... | diff --git a/lutris/gui/views/list.py b/lutris/gui/views/list.py
--- a/lutris/gui/views/list.py
+++ b/lutris/gui/views/list.py
@@ -39,7 +39,7 @@
name_cell = self.set_text_cell()
name_cell.set_padding(5, 0)
- self.set_column(name_cell, _("Name"), COL_NAME, 200)
+ self.set_column(name_ce... | {"golden_diff": "diff --git a/lutris/gui/views/list.py b/lutris/gui/views/list.py\n--- a/lutris/gui/views/list.py\n+++ b/lutris/gui/views/list.py\n@@ -39,7 +39,7 @@\n name_cell = self.set_text_cell()\n name_cell.set_padding(5, 0)\n \n- self.set_column(name_cell, _(\"Name\"), COL_NAME, 200)\n+ ... | 1,718 | 839 |
gh_patches_debug_4556 | rasdani/github-patches | git_diff | scrapy__scrapy-4599 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
KeyError in is_generator_with_return_value
```Python traceback
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
... | diff --git a/scrapy/utils/datatypes.py b/scrapy/utils/datatypes.py
--- a/scrapy/utils/datatypes.py
+++ b/scrapy/utils/datatypes.py
@@ -105,8 +105,8 @@
def __getitem__(self, key):
try:
return super(LocalWeakReferencedCache, self).__getitem__(key)
- except TypeError:
- return ... | {"golden_diff": "diff --git a/scrapy/utils/datatypes.py b/scrapy/utils/datatypes.py\n--- a/scrapy/utils/datatypes.py\n+++ b/scrapy/utils/datatypes.py\n@@ -105,8 +105,8 @@\n def __getitem__(self, key):\n try:\n return super(LocalWeakReferencedCache, self).__getitem__(key)\n- except TypeErr... | 1,895 | 130 |
gh_patches_debug_11812 | rasdani/github-patches | git_diff | craiga__will-of-the-prophets-196 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Visiting /roll raises an error if no rolls exist
```
Environment:
Request Method: GET
Request URL: http://localhost:8000/roll/
Django Version: 2.2
Python Version: 3.7.3
Installed Applications:
['... | diff --git a/will_of_the_prophets/views.py b/will_of_the_prophets/views.py
--- a/will_of_the_prophets/views.py
+++ b/will_of_the_prophets/views.py
@@ -76,10 +76,14 @@
def get_context_data(self, **kwargs):
last_roll = models.Roll.objects.order_by("-embargo").first()
+ last_roll_embargo = None
+ ... | {"golden_diff": "diff --git a/will_of_the_prophets/views.py b/will_of_the_prophets/views.py\n--- a/will_of_the_prophets/views.py\n+++ b/will_of_the_prophets/views.py\n@@ -76,10 +76,14 @@\n \n def get_context_data(self, **kwargs):\n last_roll = models.Roll.objects.order_by(\"-embargo\").first()\n+ las... | 1,798 | 176 |
gh_patches_debug_3598 | rasdani/github-patches | git_diff | Zeroto521__my-data-toolkit-580 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MAINT: Simplify `register_method_factory`
<!--
Thanks for contributing a pull request!
Please follow these standard acronyms to start the commit message:
- ENH: enhancement
- BUG: bug fix
- DOC: docu... | diff --git a/dtoolkit/accessor/register.py b/dtoolkit/accessor/register.py
--- a/dtoolkit/accessor/register.py
+++ b/dtoolkit/accessor/register.py
@@ -34,6 +34,7 @@
# based on pandas_flavor/register.py
def register_accessor_method(method: Callable, name: str):
+ @wraps(method)
def method_acc... | {"golden_diff": "diff --git a/dtoolkit/accessor/register.py b/dtoolkit/accessor/register.py\n--- a/dtoolkit/accessor/register.py\n+++ b/dtoolkit/accessor/register.py\n@@ -34,6 +34,7 @@\n \n # based on pandas_flavor/register.py\n def register_accessor_method(method: Callable, name: str):\n+ @wraps(method)... | 2,019 | 109 |
gh_patches_debug_5416 | rasdani/github-patches | git_diff | rasterio__rasterio-1192 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
query params in https url is not working
Hi
I wanted to use rasterio with a https url that has query-params, for example: https://.....?a=a&b=b
First I wanted to see if gdal supports that kind of url and... | diff --git a/rasterio/vfs.py b/rasterio/vfs.py
--- a/rasterio/vfs.py
+++ b/rasterio/vfs.py
@@ -41,6 +41,8 @@
parts = urlparse(path)
scheme = parts.scheme
path = parts.path
+ if parts.query:
+ path += "?" + parts.query
if parts.netloc and parts.netloc != 'localhost':... | {"golden_diff": "diff --git a/rasterio/vfs.py b/rasterio/vfs.py\n--- a/rasterio/vfs.py\n+++ b/rasterio/vfs.py\n@@ -41,6 +41,8 @@\n parts = urlparse(path)\n scheme = parts.scheme\n path = parts.path\n+ if parts.query:\n+ path += \"?\" + parts.query\n if parts.netloc and ... | 1,370 | 118 |
gh_patches_debug_2624 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-6488 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Possible erreur 500 à la résolution d'une alerte sur un contenu qui n'est plus public
Rapporté par Sentry. J'ai eu du mal à comprendre comment le bug a pu se produire, mais j'ai réussi à le reproduire (d'une ... | diff --git a/zds/tutorialv2/views/alerts.py b/zds/tutorialv2/views/alerts.py
--- a/zds/tutorialv2/views/alerts.py
+++ b/zds/tutorialv2/views/alerts.py
@@ -62,6 +62,9 @@
except (KeyError, ValueError):
raise Http404("L'alerte n'existe pas.")
+ if alert.solved:
+ raise Http404("L'... | {"golden_diff": "diff --git a/zds/tutorialv2/views/alerts.py b/zds/tutorialv2/views/alerts.py\n--- a/zds/tutorialv2/views/alerts.py\n+++ b/zds/tutorialv2/views/alerts.py\n@@ -62,6 +62,9 @@\n except (KeyError, ValueError):\n raise Http404(\"L'alerte n'existe pas.\")\n \n+ if alert.solved:\n+ ... | 1,562 | 127 |
gh_patches_debug_1631 | rasdani/github-patches | git_diff | vyperlang__vyper-3340 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: compiler dislikes `x not in [a, b]` in 0.3.8, whereas it was fine in 0.3.7
### Version Information
* vyper Version (output of `vyper --version`): 0.3.8
* OS: osx
* Python Version (output of `python ... | diff --git a/vyper/semantics/environment.py b/vyper/semantics/environment.py
--- a/vyper/semantics/environment.py
+++ b/vyper/semantics/environment.py
@@ -57,12 +57,7 @@
return result
-# Not sure this is necessary, but add an ad-hoc type for `self` for clarity
-class _SelfT(AddressT):
- pass
-
-
-MUTABLE_EN... | {"golden_diff": "diff --git a/vyper/semantics/environment.py b/vyper/semantics/environment.py\n--- a/vyper/semantics/environment.py\n+++ b/vyper/semantics/environment.py\n@@ -57,12 +57,7 @@\n return result\n \n \n-# Not sure this is necessary, but add an ad-hoc type for `self` for clarity\n-class _SelfT(AddressT):\... | 1,099 | 143 |
gh_patches_debug_12382 | rasdani/github-patches | git_diff | Lightning-AI__pytorch-lightning-1748 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Checkpoint adding "version_" at the start of the logger name
**To reproduce :**
```python
logger = pl.loggers.TensorBoardLogger(
save_dir='.',
version='my_name'
... | diff --git a/pytorch_lightning/trainer/callback_config.py b/pytorch_lightning/trainer/callback_config.py
--- a/pytorch_lightning/trainer/callback_config.py
+++ b/pytorch_lightning/trainer/callback_config.py
@@ -49,10 +49,12 @@
if self.weights_save_path is not None:
save_dir = self.... | {"golden_diff": "diff --git a/pytorch_lightning/trainer/callback_config.py b/pytorch_lightning/trainer/callback_config.py\n--- a/pytorch_lightning/trainer/callback_config.py\n+++ b/pytorch_lightning/trainer/callback_config.py\n@@ -49,10 +49,12 @@\n if self.weights_save_path is not None:\n ... | 1,827 | 152 |
gh_patches_debug_20094 | rasdani/github-patches | git_diff | Flexget__Flexget-2495 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unhandled error in plugin exists: 'PosixPath' object has no attribute 'walk'
<!---
Before opening an issue, verify:
- Is this a feature request? Post it on https://feathub.com/Flexget/Flexget
- Did you r... | diff --git a/flexget/plugins/filter/exists.py b/flexget/plugins/filter/exists.py
--- a/flexget/plugins/filter/exists.py
+++ b/flexget/plugins/filter/exists.py
@@ -38,12 +38,13 @@
folder = Path(folder).expanduser()
if not folder.exists():
raise plugin.PluginWarning('Path %s doe... | {"golden_diff": "diff --git a/flexget/plugins/filter/exists.py b/flexget/plugins/filter/exists.py\n--- a/flexget/plugins/filter/exists.py\n+++ b/flexget/plugins/filter/exists.py\n@@ -38,12 +38,13 @@\n folder = Path(folder).expanduser()\n if not folder.exists():\n raise plugin.Plu... | 1,607 | 248 |
gh_patches_debug_33506 | rasdani/github-patches | git_diff | optuna__optuna-1285 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`experimental` decorator breaks class documentation.
The `experimental` decorator used on classes break documentation. This could be one manifestation but there is an issue with how the documentation includin... | diff --git a/optuna/_experimental.py b/optuna/_experimental.py
--- a/optuna/_experimental.py
+++ b/optuna/_experimental.py
@@ -18,35 +18,6 @@
"""
-def _make_func_spec_str(func: Callable[..., Any]) -> str:
-
- name = func.__name__
- argspec = inspect.getfullargspec(func)
-
- n_defaults = len(argspec.defaul... | {"golden_diff": "diff --git a/optuna/_experimental.py b/optuna/_experimental.py\n--- a/optuna/_experimental.py\n+++ b/optuna/_experimental.py\n@@ -18,35 +18,6 @@\n \"\"\"\n \n \n-def _make_func_spec_str(func: Callable[..., Any]) -> str:\n-\n- name = func.__name__\n- argspec = inspect.getfullargspec(func)\n-\n- ... | 1,662 | 540 |
gh_patches_debug_25202 | rasdani/github-patches | git_diff | opsdroid__opsdroid-12 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Connectors should fork
When a connector is started it should fork into its own process. This is because connectors block to accept messages from their source.
This requires #5 to enable persistent memory bet... | diff --git a/opsdroid/core.py b/opsdroid/core.py
--- a/opsdroid/core.py
+++ b/opsdroid/core.py
@@ -3,6 +3,7 @@
import logging
import sys
import weakref
+from multiprocessing import Process
from opsdroid.helper import match
from opsdroid.memory import Memory
@@ -17,6 +18,7 @@
self.bot_name = 'opsdroid'
... | {"golden_diff": "diff --git a/opsdroid/core.py b/opsdroid/core.py\n--- a/opsdroid/core.py\n+++ b/opsdroid/core.py\n@@ -3,6 +3,7 @@\n import logging\n import sys\n import weakref\n+from multiprocessing import Process\n from opsdroid.helper import match\n from opsdroid.memory import Memory\n \n@@ -17,6 +18,7 @@\n ... | 1,093 | 251 |
gh_patches_debug_31638 | rasdani/github-patches | git_diff | bridgecrewio__checkov-5766 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Azure Function App Slots - Ensure web app redirects all HTTP traffic to HTTPS in Azure Function App Slots
**Describe the issue**
It seems that there are no checks that ensure that the following resource only... | diff --git a/checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py b/checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py
--- a/checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py
+++ b/checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHt... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py b/checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py\n--- a/checkov/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py\n+++ b/checkov/terraform/checks/resource/azure/FunctionA... | 815 | 555 |
gh_patches_debug_2348 | rasdani/github-patches | git_diff | cornellius-gp__gpytorch-2285 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Docs] Bernoulli likelihoods
# 📚 Documentation/Examples
In the document for [Bernoulli likelihoods](https://docs.gpytorch.ai/en/stable/likelihoods.html), since the labels take value in {0, 1}, the likeli... | diff --git a/gpytorch/likelihoods/bernoulli_likelihood.py b/gpytorch/likelihoods/bernoulli_likelihood.py
--- a/gpytorch/likelihoods/bernoulli_likelihood.py
+++ b/gpytorch/likelihoods/bernoulli_likelihood.py
@@ -18,8 +18,11 @@
.. math::
\begin{equation*}
- p(Y=y|f)=\Phi(yf)
+ p(Y=y|... | {"golden_diff": "diff --git a/gpytorch/likelihoods/bernoulli_likelihood.py b/gpytorch/likelihoods/bernoulli_likelihood.py\n--- a/gpytorch/likelihoods/bernoulli_likelihood.py\n+++ b/gpytorch/likelihoods/bernoulli_likelihood.py\n@@ -18,8 +18,11 @@\n \n .. math::\n \\begin{equation*}\n- p(Y=y|f)=\\P... | 978 | 159 |
gh_patches_debug_1415 | rasdani/github-patches | git_diff | bokeh__bokeh-1434 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tools get lost on Grid Plots
JS logic error prevents all tools from showing up in the toolbar. (cf. comment in #1342)
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more ... | diff --git a/examples/plotting/file/grid.py b/examples/plotting/file/grid.py
--- a/examples/plotting/file/grid.py
+++ b/examples/plotting/file/grid.py
@@ -7,7 +7,7 @@
x = np.linspace(0, 4*np.pi, N)
y = np.sin(x)
-TOOLS = "pan,wheel_zoom,box_zoom,reset,save"
+TOOLS = "pan,wheel_zoom,box_zoom,reset,save,crosshair"
... | {"golden_diff": "diff --git a/examples/plotting/file/grid.py b/examples/plotting/file/grid.py\n--- a/examples/plotting/file/grid.py\n+++ b/examples/plotting/file/grid.py\n@@ -7,7 +7,7 @@\n x = np.linspace(0, 4*np.pi, N)\n y = np.sin(x)\n \n-TOOLS = \"pan,wheel_zoom,box_zoom,reset,save\"\n+TOOLS = \"pan,wheel_zoom,box_z... | 628 | 132 |
gh_patches_debug_2061 | rasdani/github-patches | git_diff | plotly__dash-565 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
New version of dash_renderer is not automatically installed with Dash 0.36.0
Deploying apps on Dash Deployment Server results in `dash-renderer` not being updated if it is already installed (even if that vers... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,10 @@
'Flask>=0.12',
'flask-compress',
'plotly',
- 'dash_renderer',
+ 'dash_renderer==0.17.0',
+ 'dash-core-components==0.43.0',
+ 'dash-html-components==0.13.5',
+ 'dash-table==3.3.... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -20,7 +20,10 @@\n 'Flask>=0.12',\n 'flask-compress',\n 'plotly',\n- 'dash_renderer',\n+ 'dash_renderer==0.17.0',\n+ 'dash-core-components==0.43.0',\n+ 'dash-html-components==0.13.5',... | 932 | 126 |
gh_patches_debug_10715 | rasdani/github-patches | git_diff | akvo__akvo-rsr-2711 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Custom stylesheets for Akvo pages missing
The custom CSS that can be uploaded to an Akvo page site is currently not served.
This is due to the link to it accidentally being removed when the main stylesheet... | diff --git a/akvo/rsr/context_processors.py b/akvo/rsr/context_processors.py
--- a/akvo/rsr/context_processors.py
+++ b/akvo/rsr/context_processors.py
@@ -58,7 +58,7 @@
'organisation': page.organisation,
'return_url': page.return_url,
'return_url_text': page.custom_return_url_text... | {"golden_diff": "diff --git a/akvo/rsr/context_processors.py b/akvo/rsr/context_processors.py\n--- a/akvo/rsr/context_processors.py\n+++ b/akvo/rsr/context_processors.py\n@@ -58,7 +58,7 @@\n 'organisation': page.organisation,\n 'return_url': page.return_url,\n 'return_url_text': page... | 956 | 145 |
gh_patches_debug_129 | rasdani/github-patches | git_diff | librosa__librosa-1839 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
librosa 0.10.2 is not compatible with matplotlib <3.5
***BEFORE POSTING A BUG REPORT*** Please look through [existing issues (both open and closed)](https://github.com/librosa/librosa/issues?q=is%3Aissue) to ... | diff --git a/librosa/version.py b/librosa/version.py
--- a/librosa/version.py
+++ b/librosa/version.py
@@ -6,7 +6,7 @@
import importlib
short_version = "0.10"
-version = "0.10.2"
+version = "0.10.2.post1"
def __get_mod_version(modname):
| {"golden_diff": "diff --git a/librosa/version.py b/librosa/version.py\n--- a/librosa/version.py\n+++ b/librosa/version.py\n@@ -6,7 +6,7 @@\n import importlib\n \n short_version = \"0.10\"\n-version = \"0.10.2\"\n+version = \"0.10.2.post1\"\n \n \n def __get_mod_version(modname):\n", "issue": "librosa 0.10.2 is not comp... | 1,473 | 87 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.