problem_id stringlengths 18 22 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 58 | prompt stringlengths 1.1k 25.4k | golden_diff stringlengths 145 5.13k | verification_info stringlengths 582 39.1k | num_tokens int64 271 4.1k | num_tokens_diff int64 47 1.02k |
|---|---|---|---|---|---|---|---|---|
gh_patches_debug_42262 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-806 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ext/pyramid: add docs page
An entry in the docs is missing for the pyramid instrumentation.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain ... | diff --git a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py b/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py
--- a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py
+++ b/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py
@@ -2... | {"golden_diff": "diff --git a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py b/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py\n--- a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py\n+++ b/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyrami... | 1,691 | 789 |
gh_patches_debug_5821 | rasdani/github-patches | git_diff | learningequality__kolibri-1348 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
After submitting the exam the learner is still allowed to start the exam.
## Summary
After submitting the exam the learner is still allowed to start the exam. Where as it should show the **Completed** and th... | diff --git a/kolibri/logger/serializers.py b/kolibri/logger/serializers.py
--- a/kolibri/logger/serializers.py
+++ b/kolibri/logger/serializers.py
@@ -31,7 +31,7 @@
# This has changed, set the completion timestamp
if validated_data.get('closed') and not instance.closed:
instance.completio... | {"golden_diff": "diff --git a/kolibri/logger/serializers.py b/kolibri/logger/serializers.py\n--- a/kolibri/logger/serializers.py\n+++ b/kolibri/logger/serializers.py\n@@ -31,7 +31,7 @@\n # This has changed, set the completion timestamp\n if validated_data.get('closed') and not instance.closed:\n ... | 2,305 | 118 |
gh_patches_debug_8008 | rasdani/github-patches | git_diff | Mailu__Mailu-2923 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
IMAP container error on reboot
<!--
Thank you for opening an issue with Mailu. Please understand that issues are meant for bugs and enhancement-requests.
For **user-support questions**, reach out to us o... | diff --git a/core/base/libs/socrate/socrate/system.py b/core/base/libs/socrate/socrate/system.py
--- a/core/base/libs/socrate/socrate/system.py
+++ b/core/base/libs/socrate/socrate/system.py
@@ -97,6 +97,8 @@
for secret in required_secrets:
os.environ[f'{secret}_KEY'] = hmac.new(bytearray(secret_key, 'utf... | {"golden_diff": "diff --git a/core/base/libs/socrate/socrate/system.py b/core/base/libs/socrate/socrate/system.py\n--- a/core/base/libs/socrate/socrate/system.py\n+++ b/core/base/libs/socrate/socrate/system.py\n@@ -97,6 +97,8 @@\n for secret in required_secrets:\n os.environ[f'{secret}_KEY'] = hmac.new(byte... | 2,250 | 167 |
gh_patches_debug_37427 | rasdani/github-patches | git_diff | svthalia__concrexit-1293 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Newsletter HTML is not saved when sending
### Describe the bug
Newsletter HTML is not saved when sending
### How to reproduce
Steps to reproduce the behaviour:
1. Create a newsletter
2. Send it
3. A... | diff --git a/website/newsletters/emails.py b/website/newsletters/emails.py
--- a/website/newsletters/emails.py
+++ b/website/newsletters/emails.py
@@ -62,8 +62,6 @@
html_message = html_template.render(context)
text_message = text_template.render(context)
- services.write_to_file(newsletter.pk... | {"golden_diff": "diff --git a/website/newsletters/emails.py b/website/newsletters/emails.py\n--- a/website/newsletters/emails.py\n+++ b/website/newsletters/emails.py\n@@ -62,8 +62,6 @@\n html_message = html_template.render(context)\n text_message = text_template.render(context)\n \n- services.wri... | 2,058 | 596 |
gh_patches_debug_39266 | rasdani/github-patches | git_diff | nf-core__tools-1450 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`create`: check HTML response is 200 when fetching logo
### Description of the bug
After an automated sync of the nf-core tools v2.2, the dark logo for Epitopeprediction was not created and instead this wa... | diff --git a/nf_core/create.py b/nf_core/create.py
--- a/nf_core/create.py
+++ b/nf_core/create.py
@@ -4,13 +4,16 @@
"""
from genericpath import exists
import git
+import imghdr
import jinja2
import logging
import os
import pathlib
+import random
import requests
import shutil
import sys
+import time
import... | {"golden_diff": "diff --git a/nf_core/create.py b/nf_core/create.py\n--- a/nf_core/create.py\n+++ b/nf_core/create.py\n@@ -4,13 +4,16 @@\n \"\"\"\n from genericpath import exists\n import git\n+import imghdr\n import jinja2\n import logging\n import os\n import pathlib\n+import random\n import requests\n import shutil\... | 3,042 | 833 |
gh_patches_debug_22082 | rasdani/github-patches | git_diff | microsoft__Qcodes-1922 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
QCoDeS monitor broken on master
The qcodes monitor is broken on the latest master. The error is occuring somewhere in the javascript as the data is still correctly sent over the websocket.
### Steps to rep... | diff --git a/qcodes/monitor/monitor.py b/qcodes/monitor/monitor.py
--- a/qcodes/monitor/monitor.py
+++ b/qcodes/monitor/monitor.py
@@ -26,7 +26,7 @@
import time
import json
from contextlib import suppress
-from typing import Dict, Any, Optional, Sequence, Callable, Awaitable
+from typing import Dict, Union, Any, Opt... | {"golden_diff": "diff --git a/qcodes/monitor/monitor.py b/qcodes/monitor/monitor.py\n--- a/qcodes/monitor/monitor.py\n+++ b/qcodes/monitor/monitor.py\n@@ -26,7 +26,7 @@\n import time\n import json\n from contextlib import suppress\n-from typing import Dict, Any, Optional, Sequence, Callable, Awaitable\n+from typing imp... | 3,280 | 246 |
gh_patches_debug_18633 | rasdani/github-patches | git_diff | microsoft__botbuilder-python-1970 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Version dependency between Botbuilder and Question Answering
### [Github issues](https://github.com/Microsoft/botbuilder-python) should be used for bugs and feature requests. Use [Stack Overflow](https://stac... | diff --git a/libraries/botbuilder-schema/setup.py b/libraries/botbuilder-schema/setup.py
--- a/libraries/botbuilder-schema/setup.py
+++ b/libraries/botbuilder-schema/setup.py
@@ -6,7 +6,7 @@
NAME = "botbuilder-schema"
VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"
-REQUIRE... | {"golden_diff": "diff --git a/libraries/botbuilder-schema/setup.py b/libraries/botbuilder-schema/setup.py\n--- a/libraries/botbuilder-schema/setup.py\n+++ b/libraries/botbuilder-schema/setup.py\n@@ -6,7 +6,7 @@\n \r\n NAME = \"botbuilder-schema\"\r\n VERSION = os.environ[\"packageVersion\"] if \"packageVersion\" in os.... | 1,605 | 331 |
gh_patches_debug_41823 | rasdani/github-patches | git_diff | SeldonIO__MLServer-925 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
splitting aggregated batched requests parameters
The reverse of https://github.com/SeldonIO/MLServer/issues/915 and https://github.com/SeldonIO/MLServer/pull/916 should also be implemented since when a series... | diff --git a/mlserver/batching/requests.py b/mlserver/batching/requests.py
--- a/mlserver/batching/requests.py
+++ b/mlserver/batching/requests.py
@@ -1,5 +1,5 @@
from collections import defaultdict, OrderedDict
-from typing import Dict, List, Optional, Union
+from typing import Dict, List, Optional, Union, Any, Defau... | {"golden_diff": "diff --git a/mlserver/batching/requests.py b/mlserver/batching/requests.py\n--- a/mlserver/batching/requests.py\n+++ b/mlserver/batching/requests.py\n@@ -1,5 +1,5 @@\n from collections import defaultdict, OrderedDict\n-from typing import Dict, List, Optional, Union\n+from typing import Dict, List, Opti... | 3,051 | 803 |
gh_patches_debug_14945 | rasdani/github-patches | git_diff | ansible__molecule-3468 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
3.6.0 login to podman fails '/usr/bin/env /bin/podman' No such file
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Do not report bugs before reproducing them with the code of ... | diff --git a/src/molecule/command/login.py b/src/molecule/command/login.py
--- a/src/molecule/command/login.py
+++ b/src/molecule/command/login.py
@@ -21,11 +21,12 @@
import logging
import os
+import shlex
+import subprocess
import click
from molecule import scenarios, util
-from molecule.app import app
from... | {"golden_diff": "diff --git a/src/molecule/command/login.py b/src/molecule/command/login.py\n--- a/src/molecule/command/login.py\n+++ b/src/molecule/command/login.py\n@@ -21,11 +21,12 @@\n \n import logging\n import os\n+import shlex\n+import subprocess\n \n import click\n \n from molecule import scenarios, util\n-from... | 3,391 | 184 |
gh_patches_debug_37720 | rasdani/github-patches | git_diff | zulip__zulip-19858 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
markdown/tabbed_sections: Raise exception for missing tab name.
As discovered in #19807, missing tab names are currently silently ignored by our `tabbed_sections` Markdown extension, this is not right. We sho... | diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py
--- a/zerver/lib/markdown/tabbed_sections.py
+++ b/zerver/lib/markdown/tabbed_sections.py
@@ -27,7 +27,7 @@
""".strip()
NAV_LIST_ITEM_TEMPLATE = """
-<li data-language="{data_language}" tabindex="0">{name}</li>
+<li data-la... | {"golden_diff": "diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py\n--- a/zerver/lib/markdown/tabbed_sections.py\n+++ b/zerver/lib/markdown/tabbed_sections.py\n@@ -27,7 +27,7 @@\n \"\"\".strip()\n \n NAV_LIST_ITEM_TEMPLATE = \"\"\"\n-<li data-language=\"{data_language}\" tabin... | 2,163 | 572 |
gh_patches_debug_30898 | rasdani/github-patches | git_diff | mlflow__mlflow-5403 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] XGBoost autologging breaks when metric with @ is used
Thank you for submitting an issue. Please refer to our [issue policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md) for addition... | diff --git a/mlflow/xgboost/_autolog.py b/mlflow/xgboost/_autolog.py
--- a/mlflow/xgboost/_autolog.py
+++ b/mlflow/xgboost/_autolog.py
@@ -6,9 +6,15 @@
from mlflow.utils.autologging_utils import ExceptionSafeAbstractClass
+def _patch_metric_names(metric_dict):
+ # XGBoost provides some metrics with "@", e.g. "n... | {"golden_diff": "diff --git a/mlflow/xgboost/_autolog.py b/mlflow/xgboost/_autolog.py\n--- a/mlflow/xgboost/_autolog.py\n+++ b/mlflow/xgboost/_autolog.py\n@@ -6,9 +6,15 @@\n from mlflow.utils.autologging_utils import ExceptionSafeAbstractClass\n \n \n+def _patch_metric_names(metric_dict):\n+ # XGBoost provides some ... | 1,967 | 384 |
gh_patches_debug_34585 | rasdani/github-patches | git_diff | nonebot__nonebot2-2192 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: Quart 驱动器 WebSocket 上下文错误
### 操作系统
Windows
### Python 版本
Any
### NoneBot 版本
2.0.0
### 适配器
OneBot v11
### 协议端
/
### 描述问题
Related to https://github.com/nonebot/adapter-onebot/issues/68
### 复现步骤... | diff --git a/nonebot/drivers/quart.py b/nonebot/drivers/quart.py
--- a/nonebot/drivers/quart.py
+++ b/nonebot/drivers/quart.py
@@ -17,7 +17,18 @@
import asyncio
from functools import wraps
-from typing import Any, Dict, List, Tuple, Union, TypeVar, Callable, Optional, Coroutine
+from typing import (
+ Any,
+ ... | {"golden_diff": "diff --git a/nonebot/drivers/quart.py b/nonebot/drivers/quart.py\n--- a/nonebot/drivers/quart.py\n+++ b/nonebot/drivers/quart.py\n@@ -17,7 +17,18 @@\n \n import asyncio\n from functools import wraps\n-from typing import Any, Dict, List, Tuple, Union, TypeVar, Callable, Optional, Coroutine\n+from typing... | 3,182 | 490 |
gh_patches_debug_21014 | rasdani/github-patches | git_diff | python__peps-3559 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Infra: Allow dismissing the historical note banner
These notes take up more than a 1/3 of my screen and make it significantly harder to read the PEP. I can developer console it out of existence on my laptop, ... | diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py
--- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py
+++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py
@@ -34,6 +34,9 @@
... | {"golden_diff": "diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py\n--- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py\n+++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py\n@... | 1,311 | 263 |
gh_patches_debug_34755 | rasdani/github-patches | git_diff | pydantic__pydantic-4007 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Feature request] [VS Code] No auto complete when using pydantic.dataclasses.dataclass
# Feature request
Similar to the issue that #2721 solves, VS Code can't auto complete models constructor parameters wh... | diff --git a/pydantic/dataclasses.py b/pydantic/dataclasses.py
--- a/pydantic/dataclasses.py
+++ b/pydantic/dataclasses.py
@@ -1,10 +1,10 @@
-from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Type, TypeVar, Union, overload
+from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, Optional, Type, ... | {"golden_diff": "diff --git a/pydantic/dataclasses.py b/pydantic/dataclasses.py\n--- a/pydantic/dataclasses.py\n+++ b/pydantic/dataclasses.py\n@@ -1,10 +1,10 @@\n-from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Type, TypeVar, Union, overload\n+from typing import TYPE_CHECKING, Any, Callable, ClassVar, ... | 3,797 | 558 |
gh_patches_debug_3682 | rasdani/github-patches | git_diff | pydantic__pydantic-4886 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pydantic 1.10.3 incompatible with typing-extensions 4.1.1
### Initial Checks
- [X] I have searched GitHub for a duplicate issue and I'm sure this is something new
- [X] I have searched Google & StackOverf... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -130,7 +130,7 @@
python_requires='>=3.7',
zip_safe=False, # https://mypy.readthedocs.io/en/latest/installed_packages.html
install_requires=[
- 'typing-extensions>=4.1.0'
+ 'typing-extensions>=4.2.0'
],
extras_requi... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -130,7 +130,7 @@\n python_requires='>=3.7',\n zip_safe=False, # https://mypy.readthedocs.io/en/latest/installed_packages.html\n install_requires=[\n- 'typing-extensions>=4.1.0'\n+ 'typing-extensions>=4.2.0'\... | 2,646 | 115 |
gh_patches_debug_13591 | rasdani/github-patches | git_diff | freqtrade__freqtrade-4189 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
StoplossGuard should include stoploss_on_exchange as well
The document is here: https://www.freqtrade.io/en/latest/configuration/#stoploss-guard
But it should include stoploss_on_exchange as well.
--- END... | diff --git a/freqtrade/plugins/protections/stoploss_guard.py b/freqtrade/plugins/protections/stoploss_guard.py
--- a/freqtrade/plugins/protections/stoploss_guard.py
+++ b/freqtrade/plugins/protections/stoploss_guard.py
@@ -53,8 +53,9 @@
# trades = Trade.get_trades(filters).all()
trades1 = Trade.get_... | {"golden_diff": "diff --git a/freqtrade/plugins/protections/stoploss_guard.py b/freqtrade/plugins/protections/stoploss_guard.py\n--- a/freqtrade/plugins/protections/stoploss_guard.py\n+++ b/freqtrade/plugins/protections/stoploss_guard.py\n@@ -53,8 +53,9 @@\n # trades = Trade.get_trades(filters).all()\n \n ... | 1,257 | 228 |
gh_patches_debug_4850 | rasdani/github-patches | git_diff | python__python-docs-es-1000 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Translate `library/signal.po`
This needs to reach 100% translated.
Current stats for `library/signal.po`:
- Fuzzy: 0
- Percent translated: 0%
- Entries: 0 / 119
- Untranslated: 119
Please, comment here if ... | diff --git a/conf.py b/conf.py
--- a/conf.py
+++ b/conf.py
@@ -42,8 +42,9 @@
# Extend settings from upstream
_exclude_patterns = [
- # This file is not included and it not marked as :orphan:
- '*/distutils/_setuptools_disclaimer.rst',
+ # This file is not included and it's not marked as :orphan:
+ 'dist... | {"golden_diff": "diff --git a/conf.py b/conf.py\n--- a/conf.py\n+++ b/conf.py\n@@ -42,8 +42,9 @@\n \n # Extend settings from upstream\n _exclude_patterns = [\n- # This file is not included and it not marked as :orphan:\n- '*/distutils/_setuptools_disclaimer.rst',\n+ # This file is not included and it's not mar... | 1,918 | 140 |
gh_patches_debug_11792 | rasdani/github-patches | git_diff | Parsl__parsl-447 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
IPP `engine_dir` has no effect if indicated dir does not exist
Reported by @daheise.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
... | diff --git a/parsl/executors/ipp.py b/parsl/executors/ipp.py
--- a/parsl/executors/ipp.py
+++ b/parsl/executors/ipp.py
@@ -160,7 +160,8 @@
logger.error("Could not open engine_json : ", self.engine_file)
raise e
- return """cd {0}
+ return """mkdir -p {0}
+cd {0}
cat <<EOF > ip... | {"golden_diff": "diff --git a/parsl/executors/ipp.py b/parsl/executors/ipp.py\n--- a/parsl/executors/ipp.py\n+++ b/parsl/executors/ipp.py\n@@ -160,7 +160,8 @@\n logger.error(\"Could not open engine_json : \", self.engine_file)\n raise e\n \n- return \"\"\"cd {0}\n+ return \"\"\"mkd... | 3,564 | 188 |
gh_patches_debug_17067 | rasdani/github-patches | git_diff | keras-team__autokeras-241 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
"numpy.linalg.linalg.LinAlgError: N-th leading minor of the array is not positive definite" exception while training ImageClassifier
<!---
**If you are reporting a bug:**
* Verify that your issue is not be... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -5,12 +5,12 @@
packages=['autokeras'], # this must be the same as the name above
install_requires=['torch==0.4.1', 'torchvision==0.2.1', 'numpy>=1.14.5', 'keras==2.2.2', 'scikit-learn==0.19.1',
'tensorflow>=1.10.0', 'tqd... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -5,12 +5,12 @@\n packages=['autokeras'], # this must be the same as the name above\n install_requires=['torch==0.4.1', 'torchvision==0.2.1', 'numpy>=1.14.5', 'keras==2.2.2', 'scikit-learn==0.19.1',\n 'te... | 860 | 266 |
gh_patches_debug_10707 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-3844 | 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/nn/optimizer/fused_adam.py b/colossalai/nn/optimizer/fused_adam.py
--- a/colossalai/nn/optimizer/fused_adam.py
+++ b/colossalai/nn/optimizer/fused_adam.py
@@ -134,8 +134,8 @@
# Exponential moving average of squared gradient values
state['exp_avg_sq'] = t... | {"golden_diff": "diff --git a/colossalai/nn/optimizer/fused_adam.py b/colossalai/nn/optimizer/fused_adam.py\n--- a/colossalai/nn/optimizer/fused_adam.py\n+++ b/colossalai/nn/optimizer/fused_adam.py\n@@ -134,8 +134,8 @@\n # Exponential moving average of squared gradient values\n s... | 2,073 | 201 |
gh_patches_debug_22848 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-864 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
wsgi: set error status on span
The wsgi instrumentation does not set an error status if an exception is caught while handling a request:
https://github.com/open-telemetry/opentelemetry-python/blob/master/e... | diff --git a/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py b/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py
--- a/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py
+++ b/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py
@@ -11,7 +11,6 @@
# WITHOUT ... | {"golden_diff": "diff --git a/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py b/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py\n--- a/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py\n+++ b/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py\n@@ -11,7 ... | 2,624 | 269 |
gh_patches_debug_31843 | rasdani/github-patches | git_diff | freedomofpress__securedrop-238 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Overly permissive Database privileges for “securedrop” user
The privileges given the MySQL user accessing the SecureDrop database
are overly permissive and allow an attacker after a successful SQL
injection a... | diff --git a/install_files/document.config.py b/install_files/document.config.py
--- a/install_files/document.config.py
+++ b/install_files/document.config.py
@@ -46,15 +46,15 @@
# Database Configuration
# Default to using a sqlite database file for development
-#DATABASE_ENGINE = 'sqlite'
-#DATABASE_FILE=os.path.j... | {"golden_diff": "diff --git a/install_files/document.config.py b/install_files/document.config.py\n--- a/install_files/document.config.py\n+++ b/install_files/document.config.py\n@@ -46,15 +46,15 @@\n # Database Configuration\n \n # Default to using a sqlite database file for development\n-#DATABASE_ENGINE = 'sqlite'\n... | 1,753 | 481 |
gh_patches_debug_3216 | rasdani/github-patches | git_diff | ray-project__ray-6475 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Inconsistency in Diagonal Gaussian between log probability and entropy
In the DiagonalGaussian action distribution the logp is calculated like so:
` return (-0.5 * tf.reduce_sum(
tf.squ... | diff --git a/rllib/models/tf/tf_action_dist.py b/rllib/models/tf/tf_action_dist.py
--- a/rllib/models/tf/tf_action_dist.py
+++ b/rllib/models/tf/tf_action_dist.py
@@ -166,7 +166,7 @@
@override(ActionDistribution)
def entropy(self):
return tf.reduce_sum(
- .5 * self.log_std + .5 * np.log(2.... | {"golden_diff": "diff --git a/rllib/models/tf/tf_action_dist.py b/rllib/models/tf/tf_action_dist.py\n--- a/rllib/models/tf/tf_action_dist.py\n+++ b/rllib/models/tf/tf_action_dist.py\n@@ -166,7 +166,7 @@\n @override(ActionDistribution)\n def entropy(self):\n return tf.reduce_sum(\n- .5 * self.... | 3,911 | 145 |
gh_patches_debug_22441 | rasdani/github-patches | git_diff | OpenNMT__OpenNMT-tf-823 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Feature request: Log time for events during training
Hi Guillaume and others, thanks a lot for the great work you are doing!
I was thinking if it's possible to add time tracking to the logger during traini... | diff --git a/opennmt/bin/main.py b/opennmt/bin/main.py
--- a/opennmt/bin/main.py
+++ b/opennmt/bin/main.py
@@ -24,8 +24,22 @@
}
-def _set_log_level(log_level):
- tf.get_logger().setLevel(log_level)
+def _initialize_logging(log_level):
+ logger = tf.get_logger()
+ logger.setLevel(log_level)
+
+ # Config... | {"golden_diff": "diff --git a/opennmt/bin/main.py b/opennmt/bin/main.py\n--- a/opennmt/bin/main.py\n+++ b/opennmt/bin/main.py\n@@ -24,8 +24,22 @@\n }\n \n \n-def _set_log_level(log_level):\n- tf.get_logger().setLevel(log_level)\n+def _initialize_logging(log_level):\n+ logger = tf.get_logger()\n+ logger.setLeve... | 3,734 | 338 |
gh_patches_debug_158 | rasdani/github-patches | git_diff | mindsdb__mindsdb-2137 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: PIP installation error
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
Hello,
using ```pip install mindsdb``` I've got this error:
```
Trac... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@
exec(fp.read(), about)
-with open("README.md", "r") as fh:
+with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -6,7 +6,7 @@\n exec(fp.read(), about)\n \n \n-with open(\"README.md\", \"r\") as fh:\n+with open(\"README.md\", \"r\", encoding=\"utf8\") as fh:\n long_description = fh.read()\n", "issue": "[Bug]: PIP installation error\n### I... | 1,517 | 75 |
gh_patches_debug_20224 | rasdani/github-patches | git_diff | getsentry__sentry-44899 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Project Transfer] Request Approval Email Uses Incorrect Customer Subdomain
r### Environment
SaaS (https://sentry.io/)
### Version
n/a
### Link
[relevant transaction](https://sentry.sentry.io/d... | diff --git a/src/sentry/api/endpoints/project_transfer.py b/src/sentry/api/endpoints/project_transfer.py
--- a/src/sentry/api/endpoints/project_transfer.py
+++ b/src/sentry/api/endpoints/project_transfer.py
@@ -13,6 +13,7 @@
from sentry.api.decorators import sudo_required
from sentry.models import OrganizationMember
... | {"golden_diff": "diff --git a/src/sentry/api/endpoints/project_transfer.py b/src/sentry/api/endpoints/project_transfer.py\n--- a/src/sentry/api/endpoints/project_transfer.py\n+++ b/src/sentry/api/endpoints/project_transfer.py\n@@ -13,6 +13,7 @@\n from sentry.api.decorators import sudo_required\n from sentry.models impo... | 1,548 | 218 |
gh_patches_debug_60614 | rasdani/github-patches | git_diff | cloudtools__troposphere-1670 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Security Hub tags not formatted correctly
Using the following code for a Security Hub resource results in tags that don't follow the structure of Security Hub Cloudformation:
```
hub = tpl.add_resource(Hu... | diff --git a/troposphere/securityhub.py b/troposphere/securityhub.py
--- a/troposphere/securityhub.py
+++ b/troposphere/securityhub.py
@@ -8,12 +8,12 @@
from . import AWSObject
-from troposphere import Tags
+from .validators import json_checker
class Hub(AWSObject):
resource_type = "AWS::SecurityHub::Hub... | {"golden_diff": "diff --git a/troposphere/securityhub.py b/troposphere/securityhub.py\n--- a/troposphere/securityhub.py\n+++ b/troposphere/securityhub.py\n@@ -8,12 +8,12 @@\n \n \n from . import AWSObject\n-from troposphere import Tags\n+from .validators import json_checker\n \n \n class Hub(AWSObject):\n resource_... | 704 | 116 |
gh_patches_debug_3933 | rasdani/github-patches | git_diff | microsoft__ptvsd-1559 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
attach_socket_import tests hang waiting for "process" event
(https://github.com/microsoft/ptvsd/tree/dbg_adapter_refactor)
When running multiple tests with `start_method` set to `attach_socket_cmdline` or ... | diff --git a/src/ptvsd/__init__.py b/src/ptvsd/__init__.py
--- a/src/ptvsd/__init__.py
+++ b/src/ptvsd/__init__.py
@@ -24,6 +24,14 @@
__file__ = path.abspath(__file__)
del path
+# Preload encodings that we're going to use to avoid import deadlocks on Python 2.
+import codecs
+codecs.lookup('ascii')
+codecs.lookup('... | {"golden_diff": "diff --git a/src/ptvsd/__init__.py b/src/ptvsd/__init__.py\n--- a/src/ptvsd/__init__.py\n+++ b/src/ptvsd/__init__.py\n@@ -24,6 +24,14 @@\n __file__ = path.abspath(__file__)\n del path\n \n+# Preload encodings that we're going to use to avoid import deadlocks on Python 2.\n+import codecs\n+codecs.lookup... | 658 | 163 |
gh_patches_debug_10766 | rasdani/github-patches | git_diff | microsoft__ptvsd-1949 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Debugging with new_ptvsd is crashing because of TypeError: Struct()
<!-- Please search existing issues to avoid creating duplicates. -->
## Environment data
- VS Code version: 1.40.1
- Extension versio... | diff --git a/src/ptvsd/launcher/debuggee.py b/src/ptvsd/launcher/debuggee.py
--- a/src/ptvsd/launcher/debuggee.py
+++ b/src/ptvsd/launcher/debuggee.py
@@ -12,7 +12,7 @@
import sys
import threading
-from ptvsd.common import fmt, log, messaging
+from ptvsd.common import fmt, log, messaging, compat
process = None... | {"golden_diff": "diff --git a/src/ptvsd/launcher/debuggee.py b/src/ptvsd/launcher/debuggee.py\n--- a/src/ptvsd/launcher/debuggee.py\n+++ b/src/ptvsd/launcher/debuggee.py\n@@ -12,7 +12,7 @@\n import sys\n import threading\n \n-from ptvsd.common import fmt, log, messaging\n+from ptvsd.common import fmt, log, messaging, c... | 2,929 | 178 |
gh_patches_debug_47811 | rasdani/github-patches | git_diff | CTFd__CTFd-1921 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Stub issue for ctfcli #13
https://github.com/CTFd/ctfcli/issues/13
This needs to be resolved in CTFd most likely.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of... | diff --git a/CTFd/plugins/dynamic_challenges/__init__.py b/CTFd/plugins/dynamic_challenges/__init__.py
--- a/CTFd/plugins/dynamic_challenges/__init__.py
+++ b/CTFd/plugins/dynamic_challenges/__init__.py
@@ -22,7 +22,7 @@
def __init__(self, *args, **kwargs):
super(DynamicChallenge, self).__init__(**kwarg... | {"golden_diff": "diff --git a/CTFd/plugins/dynamic_challenges/__init__.py b/CTFd/plugins/dynamic_challenges/__init__.py\n--- a/CTFd/plugins/dynamic_challenges/__init__.py\n+++ b/CTFd/plugins/dynamic_challenges/__init__.py\n@@ -22,7 +22,7 @@\n \n def __init__(self, *args, **kwargs):\n super(DynamicChallenge,... | 1,761 | 125 |
gh_patches_debug_16486 | rasdani/github-patches | git_diff | ultrabug__py3status-1374 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Disk read/write stats in diskdata isn't computed correctly when a disk is specified
When a disk is specified, a logic error in _get_io_stats() results in statistics for all drives being summed, rather than ju... | diff --git a/py3status/modules/diskdata.py b/py3status/modules/diskdata.py
--- a/py3status/modules/diskdata.py
+++ b/py3status/modules/diskdata.py
@@ -165,12 +165,12 @@
write = 0
with open('/proc/diskstats', 'r') as fd:
for line in fd:
- if disk and disk in line:
- ... | {"golden_diff": "diff --git a/py3status/modules/diskdata.py b/py3status/modules/diskdata.py\n--- a/py3status/modules/diskdata.py\n+++ b/py3status/modules/diskdata.py\n@@ -165,12 +165,12 @@\n write = 0\n with open('/proc/diskstats', 'r') as fd:\n for line in fd:\n- if disk and ... | 2,556 | 233 |
gh_patches_debug_58258 | rasdani/github-patches | git_diff | psychopy__psychopy-2846 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Math formulas not rendering in documentation
Math formulas are not rendered in documentation on website, for example on https://www.psychopy.org/general/gamma.html. See image:
<img width="362" alt="gamma" ... | diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -208,5 +208,5 @@
# If false, no module index is generated.
#latex_use_modindex = True
-# path to mathjax on a public server (or could put on our own in static path?)
-mathjax_path = 'http://mathjax.connectm... | {"golden_diff": "diff --git a/docs/source/conf.py b/docs/source/conf.py\n--- a/docs/source/conf.py\n+++ b/docs/source/conf.py\n@@ -208,5 +208,5 @@\n # If false, no module index is generated.\n #latex_use_modindex = True\n \n-# path to mathjax on a public server (or could put on our own in static path?)\n-mathjax_path =... | 2,770 | 149 |
gh_patches_debug_21182 | rasdani/github-patches | git_diff | saleor__saleor-527 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
302 Status in Shipping Method.
**TD;LR** When I enter the "Shipping Address" entire as anonymous or create a new address. It makes me submit it again and again.
Using c79bdbb13c399b253e3a26480d01f1cb219b470... | diff --git a/saleor/core/__init__.py b/saleor/core/__init__.py
--- a/saleor/core/__init__.py
+++ b/saleor/core/__init__.py
@@ -2,6 +2,7 @@
from babel.numbers import get_territory_currencies
from django.conf import settings
+from django.core.checks import register, Tags, Warning
from django_countries import countri... | {"golden_diff": "diff --git a/saleor/core/__init__.py b/saleor/core/__init__.py\n--- a/saleor/core/__init__.py\n+++ b/saleor/core/__init__.py\n@@ -2,6 +2,7 @@\n \n from babel.numbers import get_territory_currencies\n from django.conf import settings\n+from django.core.checks import register, Tags, Warning\n from django... | 812 | 284 |
gh_patches_debug_5118 | rasdani/github-patches | git_diff | akvo__akvo-rsr-2254 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create a 500 page
Create a (working) 500 page with a message like:
> Oops something went wrong. We have been notified and will take action asap. Please check in later or contact us at xyz. RSR team
--- END... | diff --git a/akvo/rsr/views/error.py b/akvo/rsr/views/error.py
--- a/akvo/rsr/views/error.py
+++ b/akvo/rsr/views/error.py
@@ -6,8 +6,12 @@
see < http://www.gnu.org/licenses/agpl.html >.
"""
-from django.http import HttpResponse
+from django.shortcuts import render_to_response
+from django.template import Reque... | {"golden_diff": "diff --git a/akvo/rsr/views/error.py b/akvo/rsr/views/error.py\n--- a/akvo/rsr/views/error.py\n+++ b/akvo/rsr/views/error.py\n@@ -6,8 +6,12 @@\n see < http://www.gnu.org/licenses/agpl.html >.\n \"\"\"\n \n-from django.http import HttpResponse\n+from django.shortcuts import render_to_response\n+from... | 439 | 157 |
gh_patches_debug_41797 | rasdani/github-patches | git_diff | mosaicml__composer-2031 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ModuleNotFound error with latest release
**Environment**
<!-- Please copy paste the output of running `composer_collect_env` below-->
mosaicml==0.13.0
Running `composer_collect_env` fails with:
```
... | diff --git a/composer/callbacks/health_checker.py b/composer/callbacks/health_checker.py
--- a/composer/callbacks/health_checker.py
+++ b/composer/callbacks/health_checker.py
@@ -3,26 +3,18 @@
"""Check GPU Health during training."""
import logging
+import os
from collections import deque
from datetime import date... | {"golden_diff": "diff --git a/composer/callbacks/health_checker.py b/composer/callbacks/health_checker.py\n--- a/composer/callbacks/health_checker.py\n+++ b/composer/callbacks/health_checker.py\n@@ -3,26 +3,18 @@\n \n \"\"\"Check GPU Health during training.\"\"\"\n import logging\n+import os\n from collections import d... | 2,916 | 781 |
gh_patches_debug_10432 | rasdani/github-patches | git_diff | pretix__pretix-1776 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong PositionId on imported Orders
When importing multiple OrderPositions into a single Order, the resulting OrderPositions will all have the same positionid `1`.
Wrong PositionId on imported Orders
When imp... | diff --git a/src/pretix/base/services/orderimport.py b/src/pretix/base/services/orderimport.py
--- a/src/pretix/base/services/orderimport.py
+++ b/src/pretix/base/services/orderimport.py
@@ -103,7 +103,7 @@
order._address.name_parts = {'_scheme': event.settings.name_scheme}
ord... | {"golden_diff": "diff --git a/src/pretix/base/services/orderimport.py b/src/pretix/base/services/orderimport.py\n--- a/src/pretix/base/services/orderimport.py\n+++ b/src/pretix/base/services/orderimport.py\n@@ -103,7 +103,7 @@\n order._address.name_parts = {'_scheme': event.settings.name_scheme}\n ... | 2,049 | 138 |
gh_patches_debug_31160 | rasdani/github-patches | git_diff | ibis-project__ibis-2308 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Impala pandas_interop.py DataFrameWriter.write_csv() fails with PermissionError on Windows Platforms
pandas_interop.py DataFrameWriter.write_csv() fails with PermissionError on Windows Platforms due to how Py... | diff --git a/ibis/impala/pandas_interop.py b/ibis/impala/pandas_interop.py
--- a/ibis/impala/pandas_interop.py
+++ b/ibis/impala/pandas_interop.py
@@ -13,8 +13,8 @@
# limitations under the License.
import csv
+import os
import tempfile
-
from posixpath import join as pjoin
import ibis.common.exceptions as com
... | {"golden_diff": "diff --git a/ibis/impala/pandas_interop.py b/ibis/impala/pandas_interop.py\n--- a/ibis/impala/pandas_interop.py\n+++ b/ibis/impala/pandas_interop.py\n@@ -13,8 +13,8 @@\n # limitations under the License.\n \n import csv\n+import os\n import tempfile\n-\n from posixpath import join as pjoin\n \n import i... | 1,720 | 395 |
gh_patches_debug_28378 | rasdani/github-patches | git_diff | redis__redis-py-2982 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
resp3 parser async parser incorrectly parses maps
Issue discovered in pr #2947
the evaulation order of `key:val` in `{key():val() for foo in bar}` dict comprehension is undefined in Python. It mostly is l... | diff --git a/redis/_parsers/resp3.py b/redis/_parsers/resp3.py
--- a/redis/_parsers/resp3.py
+++ b/redis/_parsers/resp3.py
@@ -96,8 +96,9 @@
pass
# map response
elif byte == b"%":
- # we use this approach and not dict comprehension here
- # because this dict comp... | {"golden_diff": "diff --git a/redis/_parsers/resp3.py b/redis/_parsers/resp3.py\n--- a/redis/_parsers/resp3.py\n+++ b/redis/_parsers/resp3.py\n@@ -96,8 +96,9 @@\n pass\n # map response\n elif byte == b\"%\":\n- # we use this approach and not dict comprehension here\n- ... | 3,043 | 389 |
gh_patches_debug_22935 | rasdani/github-patches | git_diff | PennyLaneAI__pennylane-162 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Top-level Jacobian only works with integer argnum (not list)
This seems to be due to a bug in how we are interfacing with autograd, or -- less likely -- a bug in autograd itself.
If the user provides a qua... | diff --git a/pennylane/__init__.py b/pennylane/__init__.py
--- a/pennylane/__init__.py
+++ b/pennylane/__init__.py
@@ -238,8 +238,8 @@
a combination of quantum and classical nodes. The output of the computation
must consist of a single NumPy array (if classical) or a tuple of
expe... | {"golden_diff": "diff --git a/pennylane/__init__.py b/pennylane/__init__.py\n--- a/pennylane/__init__.py\n+++ b/pennylane/__init__.py\n@@ -238,8 +238,8 @@\n a combination of quantum and classical nodes. The output of the computation\n must consist of a single NumPy array (if classical) or a tupl... | 3,008 | 292 |
gh_patches_debug_47444 | rasdani/github-patches | git_diff | google__turbinia-944 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Recipe validation fails
When trying to submit a recipe over turbiniactl, the recipe validation fails:
turbiniactl -P ./temp/recipe.yaml googleclouddisk -d disk-name
2021-11-19 09:48:04 [INFO] Turbinia v... | diff --git a/turbinia/task_utils.py b/turbinia/task_utils.py
--- a/turbinia/task_utils.py
+++ b/turbinia/task_utils.py
@@ -79,7 +79,7 @@
Returns:
bool: True if task with the given name exists, else False
"""
- for task in TASK_LIST:
+ for task in self.TASK_LIST:
if task.lower() == task_nam... | {"golden_diff": "diff --git a/turbinia/task_utils.py b/turbinia/task_utils.py\n--- a/turbinia/task_utils.py\n+++ b/turbinia/task_utils.py\n@@ -79,7 +79,7 @@\n Returns:\n bool: True if task with the given name exists, else False\n \"\"\"\n- for task in TASK_LIST:\n+ for task in self.TASK_LIST:\n ... | 2,949 | 108 |
gh_patches_debug_4876 | rasdani/github-patches | git_diff | akvo__akvo-rsr-1921 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Project editor crash for conditions without a text
## Test plan
1. Open the project editor, and click the 'Show advanced IATI fields' button
2. In the results and indicators section, add a project condition w... | diff --git a/akvo/rsr/models/project_condition.py b/akvo/rsr/models/project_condition.py
--- a/akvo/rsr/models/project_condition.py
+++ b/akvo/rsr/models/project_condition.py
@@ -23,7 +23,7 @@
choices=codelist_choices(CONDITION_TYPE))
def __unicode__(self):
- return self.text... | {"golden_diff": "diff --git a/akvo/rsr/models/project_condition.py b/akvo/rsr/models/project_condition.py\n--- a/akvo/rsr/models/project_condition.py\n+++ b/akvo/rsr/models/project_condition.py\n@@ -23,7 +23,7 @@\n choices=codelist_choices(CONDITION_TYPE))\n \n def __unicode__(self):\n-... | 759 | 136 |
gh_patches_debug_3195 | rasdani/github-patches | git_diff | hartwork__jawanndenn-225 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
missing rapid-json dependency for pip
installing via pip3 does not also install the rapid-json dependency.
missing rapid-json dependency for pip
installing via pip3 does not also install the rapid-json depend... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -52,6 +52,8 @@
'djangorestframework>=3.11.0',
'gunicorn>=20.0.4',
'gunicorn-color>=0.1.0',
+ 'python-dateutil>=2.8.1',
+ 'python-rapidjson>=1.0',
],
extras_require=_extras_req... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -52,6 +52,8 @@\n 'djangorestframework>=3.11.0',\n 'gunicorn>=20.0.4',\n 'gunicorn-color>=0.1.0',\n+ 'python-dateutil>=2.8.1',\n+ 'python-rapidjson>=1.0',\n ],\n ... | 1,097 | 111 |
gh_patches_debug_781 | rasdani/github-patches | git_diff | quantopian__zipline-1625 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
conflicting CLI flags for `clean`
Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
# Environment
* Operating System: `OS X 10.12.1`
* Python Version: `2.7`... | diff --git a/zipline/__main__.py b/zipline/__main__.py
--- a/zipline/__main__.py
+++ b/zipline/__main__.py
@@ -323,7 +323,7 @@
help='The data bundle to clean.',
)
@click.option(
- '-b',
+ '-e',
'--before',
type=Timestamp(),
help='Clear all data before TIMESTAMP.'
| {"golden_diff": "diff --git a/zipline/__main__.py b/zipline/__main__.py\n--- a/zipline/__main__.py\n+++ b/zipline/__main__.py\n@@ -323,7 +323,7 @@\n help='The data bundle to clean.',\n )\n @click.option(\n- '-b',\n+ '-e',\n '--before',\n type=Timestamp(),\n help='Clear all data before TIMESTAMP.'\... | 3,963 | 96 |
gh_patches_debug_18134 | rasdani/github-patches | git_diff | ocadotechnology__aimmo-350 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Functional Test 1 - Effect expiry
We want to check that the effect can expire. This would be as follows:
Place an avatar on the map in one of the cells.
Place a pickup somewhere.
Make a move in some directi... | diff --git a/aimmo-game/simulation/effects.py b/aimmo-game/simulation/effects.py
--- a/aimmo-game/simulation/effects.py
+++ b/aimmo-game/simulation/effects.py
@@ -1,9 +1,10 @@
from abc import ABCMeta, abstractmethod
import math
-
import sys
+INVULNERABILITY_RESISTANCE = 1000
+
class _Effect(object):
__me... | {"golden_diff": "diff --git a/aimmo-game/simulation/effects.py b/aimmo-game/simulation/effects.py\n--- a/aimmo-game/simulation/effects.py\n+++ b/aimmo-game/simulation/effects.py\n@@ -1,9 +1,10 @@\n from abc import ABCMeta, abstractmethod\n \n import math\n-\n import sys\n \n+INVULNERABILITY_RESISTANCE = 1000\n+\n \n cl... | 892 | 245 |
gh_patches_debug_28628 | rasdani/github-patches | git_diff | RedHatInsights__insights-core-2983 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
YumRepolist parser throws an exception parsing valid repolist data
The [YumRepolist parser](https://github.com/RedHatInsights/insights-core/blob/master/insights/parsers/yum.py) throws an exception when attemp... | diff --git a/insights/parsers/yum.py b/insights/parsers/yum.py
--- a/insights/parsers/yum.py
+++ b/insights/parsers/yum.py
@@ -11,7 +11,7 @@
"""
from insights import parser, CommandParser
-from insights.parsers import SkipException, parse_fixed_table
+from insights.parsers import SkipException, parse_fixed_table, P... | {"golden_diff": "diff --git a/insights/parsers/yum.py b/insights/parsers/yum.py\n--- a/insights/parsers/yum.py\n+++ b/insights/parsers/yum.py\n@@ -11,7 +11,7 @@\n \"\"\"\n \n from insights import parser, CommandParser\n-from insights.parsers import SkipException, parse_fixed_table\n+from insights.parsers import SkipExc... | 3,201 | 378 |
gh_patches_debug_5845 | rasdani/github-patches | git_diff | geopandas__geopandas-1598 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: TypeError exception shows the type of the wrong variable
https://github.com/geopandas/geopandas/blob/b366d890c35d68a52f7f608e47f00b89eaa85850/geopandas/tools/clip.py#L130
This should reference 'mask' ... | diff --git a/geopandas/tools/clip.py b/geopandas/tools/clip.py
--- a/geopandas/tools/clip.py
+++ b/geopandas/tools/clip.py
@@ -127,7 +127,7 @@
if not isinstance(mask, (GeoDataFrame, GeoSeries, Polygon, MultiPolygon)):
raise TypeError(
"'mask' should be GeoDataFrame, GeoSeries or"
- ... | {"golden_diff": "diff --git a/geopandas/tools/clip.py b/geopandas/tools/clip.py\n--- a/geopandas/tools/clip.py\n+++ b/geopandas/tools/clip.py\n@@ -127,7 +127,7 @@\n if not isinstance(mask, (GeoDataFrame, GeoSeries, Polygon, MultiPolygon)):\n raise TypeError(\n \"'mask' should be GeoDataFrame, Ge... | 2,895 | 131 |
gh_patches_debug_12044 | rasdani/github-patches | git_diff | chainer__chainer-5333 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PrintHook may fail
* Conditions
```
>>> chainer.print_runtime_info()
Platform: Darwin-17.7.0-x86_64-i386-64bit
Chainer: 5.0.0b4
NumPy: 1.16.0.dev0+591880b
CuPy: Not Available
```
* Code to reproduce
... | diff --git a/chainer/function_hooks/debug_print.py b/chainer/function_hooks/debug_print.py
--- a/chainer/function_hooks/debug_print.py
+++ b/chainer/function_hooks/debug_print.py
@@ -73,9 +73,12 @@
if out_grad is not None:
self._print('output gradient')
for d in out_grad:
- ... | {"golden_diff": "diff --git a/chainer/function_hooks/debug_print.py b/chainer/function_hooks/debug_print.py\n--- a/chainer/function_hooks/debug_print.py\n+++ b/chainer/function_hooks/debug_print.py\n@@ -73,9 +73,12 @@\n if out_grad is not None:\n self._print('output gradient')\n for d in... | 1,958 | 178 |
gh_patches_debug_18139 | rasdani/github-patches | git_diff | Qiskit__qiskit-10411 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deepcopy of control flow with standalone clbit results in invalid circuit
### Environment
- **Qiskit Terra version**: 0.24.1 (but also on main)
- **Python version**: 3.11
- **Operating system**: Linux
... | diff --git a/qiskit/circuit/bit.py b/qiskit/circuit/bit.py
--- a/qiskit/circuit/bit.py
+++ b/qiskit/circuit/bit.py
@@ -13,6 +13,7 @@
"""
Quantum bit and Classical bit objects.
"""
+import copy
from qiskit.circuit.exceptions import CircuitError
from qiskit.utils.deprecation import deprecate_func
@@ -120,3 +121,20... | {"golden_diff": "diff --git a/qiskit/circuit/bit.py b/qiskit/circuit/bit.py\n--- a/qiskit/circuit/bit.py\n+++ b/qiskit/circuit/bit.py\n@@ -13,6 +13,7 @@\n \"\"\"\n Quantum bit and Classical bit objects.\n \"\"\"\n+import copy\n \n from qiskit.circuit.exceptions import CircuitError\n from qiskit.utils.deprecation import... | 1,978 | 272 |
gh_patches_debug_42062 | rasdani/github-patches | git_diff | hydroshare__hydroshare-5449 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow basic auth using email
**Description of the bug**
Authentication attempt using hsrest client with bad (typo etc) credentials.
```
---------------------------------------------------------------------... | diff --git a/hs_core/authentication.py b/hs_core/authentication.py
--- a/hs_core/authentication.py
+++ b/hs_core/authentication.py
@@ -5,9 +5,9 @@
from django.urls import reverse, resolve
from django.conf import settings
from django.utils.http import urlencode
-from django.contrib.auth.models import User
from rest_... | {"golden_diff": "diff --git a/hs_core/authentication.py b/hs_core/authentication.py\n--- a/hs_core/authentication.py\n+++ b/hs_core/authentication.py\n@@ -5,9 +5,9 @@\n from django.urls import reverse, resolve\n from django.conf import settings\n from django.utils.http import urlencode\n-from django.contrib.auth.models... | 3,834 | 753 |
gh_patches_debug_14702 | rasdani/github-patches | git_diff | freedomofpress__securedrop-6299 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
add `robots.txt` and a `nofollow` robots meta tag to dissuade legitimate crawlers from crawling tor2webb-ed instances
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more ... | diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py
--- a/securedrop/source_app/main.py
+++ b/securedrop/source_app/main.py
@@ -8,7 +8,7 @@
import werkzeug
from flask import (Blueprint, render_template, flash, redirect, url_for,
- session, current_app, request, Markup, abort... | {"golden_diff": "diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py\n--- a/securedrop/source_app/main.py\n+++ b/securedrop/source_app/main.py\n@@ -8,7 +8,7 @@\n \n import werkzeug\n from flask import (Blueprint, render_template, flash, redirect, url_for,\n- session, current_app... | 3,810 | 211 |
gh_patches_debug_4004 | rasdani/github-patches | git_diff | tobymao__sqlglot-552 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cast to map with clickhouse dialect ignores case
Yet another clickhouse case sensitivity bug :)
ClickHouse CLI:
```
albatross :) select cast(map('a', 1, 'b', 2) as Map(String, Int8));
SELECT CAST(... | diff --git a/sqlglot/dialects/clickhouse.py b/sqlglot/dialects/clickhouse.py
--- a/sqlglot/dialects/clickhouse.py
+++ b/sqlglot/dialects/clickhouse.py
@@ -51,6 +51,9 @@
**Generator.TYPE_MAPPING,
exp.DataType.Type.NULLABLE: "Nullable",
exp.DataType.Type.DATETIME: "DateTime64",
+ ... | {"golden_diff": "diff --git a/sqlglot/dialects/clickhouse.py b/sqlglot/dialects/clickhouse.py\n--- a/sqlglot/dialects/clickhouse.py\n+++ b/sqlglot/dialects/clickhouse.py\n@@ -51,6 +51,9 @@\n **Generator.TYPE_MAPPING,\n exp.DataType.Type.NULLABLE: \"Nullable\",\n exp.DataType.Type.DAT... | 1,156 | 135 |
gh_patches_debug_13797 | rasdani/github-patches | git_diff | rootpy__rootpy-297 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
path module overriden by path variable
On
https://github.com/rootpy/rootpy/blob/master/rootpy/io/file.py#L43
the module path is overriden by the variable path.
Locally, pyflakes also warns me about it:
`... | diff --git a/rootpy/io/file.py b/rootpy/io/file.py
--- a/rootpy/io/file.py
+++ b/rootpy/io/file.py
@@ -10,7 +10,7 @@
from ..context import preserve_current_directory
from .. import asrootpy, QROOT
from . import utils, DoesNotExist
-from ..util import path
+from ..util.path import expand as expand_path
import temp... | {"golden_diff": "diff --git a/rootpy/io/file.py b/rootpy/io/file.py\n--- a/rootpy/io/file.py\n+++ b/rootpy/io/file.py\n@@ -10,7 +10,7 @@\n from ..context import preserve_current_directory\n from .. import asrootpy, QROOT\n from . import utils, DoesNotExist\n-from ..util import path\n+from ..util.path import expand as e... | 2,917 | 178 |
gh_patches_debug_1784 | rasdani/github-patches | git_diff | iterative__dvc-4066 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
.dvcignore - new lines throw error, expected str instance, NoneType found.
```
DVC version: 1.0.0b2
Python version: 3.7.6
Platform: Ubuntu 18.04.4 LTS
Package: dvc_1.0.0b2_amd64.deb
Filesystem: ceph-fuse... | diff --git a/dvc/ignore.py b/dvc/ignore.py
--- a/dvc/ignore.py
+++ b/dvc/ignore.py
@@ -39,6 +39,7 @@
for ignore, group in groupby(
regex_pattern_list, lambda x: x[1]
)
+ if ignore is not None
]
def __call__(self, root, dirs, files... | {"golden_diff": "diff --git a/dvc/ignore.py b/dvc/ignore.py\n--- a/dvc/ignore.py\n+++ b/dvc/ignore.py\n@@ -39,6 +39,7 @@\n for ignore, group in groupby(\n regex_pattern_list, lambda x: x[1]\n )\n+ if ignore is not None\n ]\n \n def __cal... | 3,763 | 91 |
gh_patches_debug_38089 | rasdani/github-patches | git_diff | SciTools__cartopy-685 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cartopy coastlines issue with shapely 1.5.13
With shapely 1.5.13 the following cartopy example generates an incomplete figure:
```
import os
import matplotlib.pyplot as plt
from cartopy import config
import... | diff --git a/lib/cartopy/mpl/feature_artist.py b/lib/cartopy/mpl/feature_artist.py
--- a/lib/cartopy/mpl/feature_artist.py
+++ b/lib/cartopy/mpl/feature_artist.py
@@ -31,16 +31,43 @@
import cartopy.mpl.patch as cpatch
+class _GeomKey(object):
+ """
+ Provide id() based equality and hashing for geometries.
+
... | {"golden_diff": "diff --git a/lib/cartopy/mpl/feature_artist.py b/lib/cartopy/mpl/feature_artist.py\n--- a/lib/cartopy/mpl/feature_artist.py\n+++ b/lib/cartopy/mpl/feature_artist.py\n@@ -31,16 +31,43 @@\n import cartopy.mpl.patch as cpatch\n \n \n+class _GeomKey(object):\n+ \"\"\"\n+ Provide id() based equality a... | 2,155 | 718 |
gh_patches_debug_14670 | rasdani/github-patches | git_diff | ipython__ipython-3669 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'BlockingKernelClient' object has no attribute 'started_channels'
I have an app that is centered around IPython running in qt (https://github.com/neuropy/neuropy/blob/master/neuropy/main.py). ... | diff --git a/IPython/qt/manager.py b/IPython/qt/manager.py
--- a/IPython/qt/manager.py
+++ b/IPython/qt/manager.py
@@ -4,7 +4,7 @@
from IPython.external.qt import QtCore
# Local imports
-from IPython.utils.traitlets import Bool
+from IPython.utils.traitlets import Bool, DottedObjectName
from IPython.kernel impor... | {"golden_diff": "diff --git a/IPython/qt/manager.py b/IPython/qt/manager.py\n--- a/IPython/qt/manager.py\n+++ b/IPython/qt/manager.py\n@@ -4,7 +4,7 @@\n from IPython.external.qt import QtCore\n \n # Local imports\n-from IPython.utils.traitlets import Bool\n+from IPython.utils.traitlets import Bool, DottedObjectName\n \... | 951 | 177 |
gh_patches_debug_16747 | rasdani/github-patches | git_diff | streamlit__streamlit-6321 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in clearing cache of cached function via .clear() in streamlit==1.20.0
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I... | diff --git a/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py b/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py
--- a/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py
+++ b/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py
@@ -193,9 +193,13 @@
... | {"golden_diff": "diff --git a/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py b/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py\n--- a/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py\n+++ b/lib/streamlit/runtime/caching/storage/local_disk_cache_storage.py\n@@ -193,9... | 3,662 | 253 |
gh_patches_debug_15489 | rasdani/github-patches | git_diff | pyro-ppl__pyro-3220 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`ProvenanceTensor` bug when used with `torch.set_default_device`
When trying to debug the code from the [forum post](https://forum.pyro.ai/t/running-pyro-plate-on-gpu/5097/8) I came across this bug:
```py
... | diff --git a/pyro/ops/provenance.py b/pyro/ops/provenance.py
--- a/pyro/ops/provenance.py
+++ b/pyro/ops/provenance.py
@@ -46,14 +46,15 @@
assert not isinstance(data, ProvenanceTensor)
if not provenance:
return data
- return super().__new__(cls)
+ ret = data.as_subclass(cls)... | {"golden_diff": "diff --git a/pyro/ops/provenance.py b/pyro/ops/provenance.py\n--- a/pyro/ops/provenance.py\n+++ b/pyro/ops/provenance.py\n@@ -46,14 +46,15 @@\n assert not isinstance(data, ProvenanceTensor)\n if not provenance:\n return data\n- return super().__new__(cls)\n+ re... | 2,356 | 241 |
gh_patches_debug_67296 | rasdani/github-patches | git_diff | qutip__qutip-1390 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation of qutip shows various warnings on ubuntu 20.04.1
**Describe the bug**
Installing the qutip on ubuntu 20.04.1 shows the following warnings:
```
$ sudo apt install python3-qutip
…
Entpacken ... | diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py
--- a/qutip/_mkl/spmv.py
+++ b/qutip/_mkl/spmv.py
@@ -50,7 +50,7 @@
indices = A.indices.ctypes.data_as(POINTER(c_int))
# Allocate output, using same conventions as input
- if x.ndim is 1:
+ if x.ndim == 1:
y = np.empty(m,dtype=np.comple... | {"golden_diff": "diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py\n--- a/qutip/_mkl/spmv.py\n+++ b/qutip/_mkl/spmv.py\n@@ -50,7 +50,7 @@\n indices = A.indices.ctypes.data_as(POINTER(c_int))\n \n # Allocate output, using same conventions as input\n- if x.ndim is 1:\n+ if x.ndim == 1:\n y = ... | 1,844 | 154 |
gh_patches_debug_21565 | rasdani/github-patches | git_diff | OCA__server-tools-508 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix travis build on 9.0 branch
the 9.0 branch of the project is red, with really strange errors about computed fields. There have been such errors since the merge of #469 but for some reason they were neither... | diff --git a/database_cleanup/models/purge_wizard.py b/database_cleanup/models/purge_wizard.py
--- a/database_cleanup/models/purge_wizard.py
+++ b/database_cleanup/models/purge_wizard.py
@@ -24,8 +24,8 @@
@api.model
def create(self, values):
# make sure the user trying this is actually supposed to do... | {"golden_diff": "diff --git a/database_cleanup/models/purge_wizard.py b/database_cleanup/models/purge_wizard.py\n--- a/database_cleanup/models/purge_wizard.py\n+++ b/database_cleanup/models/purge_wizard.py\n@@ -24,8 +24,8 @@\n @api.model\n def create(self, values):\n # make sure the user trying this is ... | 1,222 | 257 |
gh_patches_debug_17088 | rasdani/github-patches | git_diff | mne-tools__mne-bids-199 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
align readme.md and readme.rst
our README and the landing page of our homepage are very dissimilar: This is not good.
We should align them somewhat.
--- END ISSUE ---
Below are some code segments, each f... | diff --git a/doc/conf.py b/doc/conf.py
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -114,6 +114,7 @@
'navbar_links': [
("Gallery", "auto_examples/index"),
("API", "api"),
+ ("What's new", "whats_new"),
("Github", "https://github.com/mne-tools/mne-bids", True),
]}
diff --git a/set... | {"golden_diff": "diff --git a/doc/conf.py b/doc/conf.py\n--- a/doc/conf.py\n+++ b/doc/conf.py\n@@ -114,6 +114,7 @@\n 'navbar_links': [\n (\"Gallery\", \"auto_examples/index\"),\n (\"API\", \"api\"),\n+ (\"What's new\", \"whats_new\"),\n (\"Github\", \"https://github.com/mne-tools/mne-... | 2,626 | 210 |
gh_patches_debug_40944 | rasdani/github-patches | git_diff | keras-team__keras-nlp-908 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Return All Beams from Beam Search Utility
Follow-up to https://github.com/keras-team/keras-nlp/issues/750#issuecomment-1439963933
- Return all beams (tensor of shape `(batch_size, num_beams, sequence_lengt... | diff --git a/keras_nlp/samplers/beam_sampler.py b/keras_nlp/samplers/beam_sampler.py
--- a/keras_nlp/samplers/beam_sampler.py
+++ b/keras_nlp/samplers/beam_sampler.py
@@ -36,11 +36,14 @@
Args:
num_beams: int. The number of beams that should be kept at each
time-step. `num_beams` should be str... | {"golden_diff": "diff --git a/keras_nlp/samplers/beam_sampler.py b/keras_nlp/samplers/beam_sampler.py\n--- a/keras_nlp/samplers/beam_sampler.py\n+++ b/keras_nlp/samplers/beam_sampler.py\n@@ -36,11 +36,14 @@\n Args:\n num_beams: int. The number of beams that should be kept at each\n time-step. `n... | 2,526 | 964 |
gh_patches_debug_5371 | rasdani/github-patches | git_diff | getnikola__nikola-3511 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incorrect time zone guessing on macOS
On macOS Big Sur 11.2, we guess the full path to the zoneinfo file (instead of just the zone name).
```
$ nikola init
…
Time zone [private/var/db/timezone/tz/2021a.... | diff --git a/nikola/packages/tzlocal/unix.py b/nikola/packages/tzlocal/unix.py
--- a/nikola/packages/tzlocal/unix.py
+++ b/nikola/packages/tzlocal/unix.py
@@ -116,8 +116,9 @@
while start != 0:
tzpath = tzpath[start:]
try:
- dateutil.tz.gettz(tzpath)
- ret... | {"golden_diff": "diff --git a/nikola/packages/tzlocal/unix.py b/nikola/packages/tzlocal/unix.py\n--- a/nikola/packages/tzlocal/unix.py\n+++ b/nikola/packages/tzlocal/unix.py\n@@ -116,8 +116,9 @@\n while start != 0:\n tzpath = tzpath[start:]\n try:\n- dateutil.tz.gettz(tzpa... | 1,730 | 149 |
gh_patches_debug_2221 | rasdani/github-patches | git_diff | pre-commit__pre-commit-2740 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
/dev/null not found with pre-commit 3.0.2
### search you tried in the issue tracker
/dev/null
### describe your issue
After upgrading to pre-commit 3.0.2, one of my users (on up-to-date macos) is reporting... | diff --git a/pre_commit/languages/ruby.py b/pre_commit/languages/ruby.py
--- a/pre_commit/languages/ruby.py
+++ b/pre_commit/languages/ruby.py
@@ -39,7 +39,6 @@
('GEM_HOME', os.path.join(venv, 'gems')),
('GEM_PATH', UNSET),
('BUNDLE_IGNORE_CONFIG', '1'),
- ('BUNDLE_GEMFILE', os.devnull... | {"golden_diff": "diff --git a/pre_commit/languages/ruby.py b/pre_commit/languages/ruby.py\n--- a/pre_commit/languages/ruby.py\n+++ b/pre_commit/languages/ruby.py\n@@ -39,7 +39,6 @@\n ('GEM_HOME', os.path.join(venv, 'gems')),\n ('GEM_PATH', UNSET),\n ('BUNDLE_IGNORE_CONFIG', '1'),\n- ('BUN... | 2,807 | 114 |
gh_patches_debug_26724 | rasdani/github-patches | git_diff | ivy-llc__ivy-14028 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
diag_indices_from
mask_indices
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/j... | diff --git a/ivy/functional/frontends/jax/numpy/indexing.py b/ivy/functional/frontends/jax/numpy/indexing.py
--- a/ivy/functional/frontends/jax/numpy/indexing.py
+++ b/ivy/functional/frontends/jax/numpy/indexing.py
@@ -1,3 +1,6 @@
+# global
+import inspect
+
# local
import ivy
from ivy.functional.frontends.jax.func_... | {"golden_diff": "diff --git a/ivy/functional/frontends/jax/numpy/indexing.py b/ivy/functional/frontends/jax/numpy/indexing.py\n--- a/ivy/functional/frontends/jax/numpy/indexing.py\n+++ b/ivy/functional/frontends/jax/numpy/indexing.py\n@@ -1,3 +1,6 @@\n+# global\n+import inspect\n+\n # local\n import ivy\n from ivy.func... | 767 | 464 |
gh_patches_debug_20739 | rasdani/github-patches | git_diff | googleapis__python-bigquery-725 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
free(): invalid pointer Aborted error when importing from google.cloud import bigquery in python
I started facing this peculiar issue while import importing BigQuery in python scripts as well as in the term... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -29,6 +29,7 @@
# 'Development Status :: 5 - Production/Stable'
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
+ "grpcio >= 1.38.1, < 2.0dev", # https://github.com/googleapis/python-bigquery/issues/695
"google-... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -29,6 +29,7 @@\n # 'Development Status :: 5 - Production/Stable'\n release_status = \"Development Status :: 5 - Production/Stable\"\n dependencies = [\n+ \"grpcio >= 1.38.1, < 2.0dev\", # https://github.com/googleapis/python-bigqu... | 1,989 | 322 |
gh_patches_debug_3574 | rasdani/github-patches | git_diff | google__TensorNetwork-746 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
add dynamic programming contractor of opt_einsum
We should update this asap
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN ... | diff --git a/tensornetwork/contractors/opt_einsum_paths/path_contractors.py b/tensornetwork/contractors/opt_einsum_paths/path_contractors.py
--- a/tensornetwork/contractors/opt_einsum_paths/path_contractors.py
+++ b/tensornetwork/contractors/opt_einsum_paths/path_contractors.py
@@ -117,7 +117,8 @@
Returns:
The ... | {"golden_diff": "diff --git a/tensornetwork/contractors/opt_einsum_paths/path_contractors.py b/tensornetwork/contractors/opt_einsum_paths/path_contractors.py\n--- a/tensornetwork/contractors/opt_einsum_paths/path_contractors.py\n+++ b/tensornetwork/contractors/opt_einsum_paths/path_contractors.py\n@@ -117,7 +117,8 @@\n... | 3,616 | 162 |
gh_patches_debug_11928 | rasdani/github-patches | git_diff | keras-team__keras-2986 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Why TF-IDF matrix generated by keras.preprocessing.text.Tokenizer() has negative values?
Say, if run the following script:
> > > import keras
> > > tk = keras.preprocessing.text.Tokenizer()
> > > texts = ['I... | diff --git a/keras/preprocessing/text.py b/keras/preprocessing/text.py
--- a/keras/preprocessing/text.py
+++ b/keras/preprocessing/text.py
@@ -209,8 +209,8 @@
# Use weighting scheme 2 in
# https://en.wikipedia.org/wiki/Tf%E2%80%93idf
tf = 1 + np.log(c)
- ... | {"golden_diff": "diff --git a/keras/preprocessing/text.py b/keras/preprocessing/text.py\n--- a/keras/preprocessing/text.py\n+++ b/keras/preprocessing/text.py\n@@ -209,8 +209,8 @@\n # Use weighting scheme 2 in\n # https://en.wikipedia.org/wiki/Tf%E2%80%93idf\n ... | 2,898 | 192 |
gh_patches_debug_27207 | rasdani/github-patches | git_diff | pyodide__pyodide-1742 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Passing python dict into a js function
Hi, I just noticed that we now (v0.17.0) convert python dict to a `Map` in js, and it break my previous code.
I have 3 questions:
1. What would be the easiest way to... | diff --git a/src/py/_pyodide/_core_docs.py b/src/py/_pyodide/_core_docs.py
--- a/src/py/_pyodide/_core_docs.py
+++ b/src/py/_pyodide/_core_docs.py
@@ -1,6 +1,6 @@
# type: ignore
-from typing import Any, Callable
+from typing import Any, Callable, Iterable
# All docstrings for public `core` APIs should be extracte... | {"golden_diff": "diff --git a/src/py/_pyodide/_core_docs.py b/src/py/_pyodide/_core_docs.py\n--- a/src/py/_pyodide/_core_docs.py\n+++ b/src/py/_pyodide/_core_docs.py\n@@ -1,6 +1,6 @@\n # type: ignore\n \n-from typing import Any, Callable\n+from typing import Any, Callable, Iterable\n \n # All docstrings for public `cor... | 2,389 | 374 |
gh_patches_debug_13141 | rasdani/github-patches | git_diff | freedomofpress__securedrop-5932 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Be nicer to admins when an uploaded logo doesn't work.
## Description
If an uploaded logo can't be processed, the [error message shown to admins](https://github.com/freedomofpress/securedrop/blob/427675858... | diff --git a/securedrop/journalist_app/admin.py b/securedrop/journalist_app/admin.py
--- a/securedrop/journalist_app/admin.py
+++ b/securedrop/journalist_app/admin.py
@@ -53,7 +53,10 @@
flash(gettext("Image updated."), "logo-success")
except Exception:
# Translators: This ... | {"golden_diff": "diff --git a/securedrop/journalist_app/admin.py b/securedrop/journalist_app/admin.py\n--- a/securedrop/journalist_app/admin.py\n+++ b/securedrop/journalist_app/admin.py\n@@ -53,7 +53,10 @@\n flash(gettext(\"Image updated.\"), \"logo-success\")\n except Exception:\n ... | 3,871 | 167 |
gh_patches_debug_31241 | rasdani/github-patches | git_diff | python-discord__bot-1532 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Default duration for !superstar command if no duration is specified
## Context
The `!superstar` command currently requires a duration to be specified when invoked.
Often we want to change someone's nickn... | diff --git a/bot/exts/moderation/infraction/superstarify.py b/bot/exts/moderation/infraction/superstarify.py
--- a/bot/exts/moderation/infraction/superstarify.py
+++ b/bot/exts/moderation/infraction/superstarify.py
@@ -11,7 +11,7 @@
from bot import constants
from bot.bot import Bot
-from bot.converters import Expir... | {"golden_diff": "diff --git a/bot/exts/moderation/infraction/superstarify.py b/bot/exts/moderation/infraction/superstarify.py\n--- a/bot/exts/moderation/infraction/superstarify.py\n+++ b/bot/exts/moderation/infraction/superstarify.py\n@@ -11,7 +11,7 @@\n \n from bot import constants\n from bot.bot import Bot\n-from bot... | 3,043 | 388 |
gh_patches_debug_1501 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-6332 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 'api_core-1.6.0a2'? or 'api_core-1.5.1'?
I'd like to use the changes from https://github.com/googleapis/google-cloud-python/pull/6310 in the library I'm working on.
Not sure about the version numbe... | diff --git a/api_core/setup.py b/api_core/setup.py
--- a/api_core/setup.py
+++ b/api_core/setup.py
@@ -22,7 +22,7 @@
name = 'google-api-core'
description = 'Google API client core library'
-version = '1.6.0a1'
+version = '1.5.1'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 -... | {"golden_diff": "diff --git a/api_core/setup.py b/api_core/setup.py\n--- a/api_core/setup.py\n+++ b/api_core/setup.py\n@@ -22,7 +22,7 @@\n \n name = 'google-api-core'\n description = 'Google API client core library'\n-version = '1.6.0a1'\n+version = '1.5.1'\n # Should be one of:\n # 'Development Status :: 3 - Alpha'\n ... | 1,319 | 104 |
gh_patches_debug_4670 | rasdani/github-patches | git_diff | DDMAL__CantusDB-1215 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
typo in "Bibliography"
Source view has "bibilography" and not bibliography:
<img width="250" alt="image" src="https://github.com/DDMAL/CantusDB/assets/67451875/42a71b35-3598-4e66-abd2-1830d44a9ce6">
Source... | diff --git a/django/cantusdb_project/main_app/admin.py b/django/cantusdb_project/main_app/admin.py
--- a/django/cantusdb_project/main_app/admin.py
+++ b/django/cantusdb_project/main_app/admin.py
@@ -16,15 +16,14 @@
)
# these fields should not be editable by all classes
-EXCLUDE = (
- "json_info",
-)
+EXCLUDE = (... | {"golden_diff": "diff --git a/django/cantusdb_project/main_app/admin.py b/django/cantusdb_project/main_app/admin.py\n--- a/django/cantusdb_project/main_app/admin.py\n+++ b/django/cantusdb_project/main_app/admin.py\n@@ -16,15 +16,14 @@\n )\n \n # these fields should not be editable by all classes\n-EXCLUDE = (\n- \"j... | 2,396 | 144 |
gh_patches_debug_29753 | rasdani/github-patches | git_diff | google__clusterfuzz-2642 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Endpoints "/fuzz-strategy-selection" and "/fuzzer-and-job-weights" under cron-service failed.
Hi,
Deploy was done from the master, not from the latest tag.
The reason in both cases is the same:
**"Ta... | diff --git a/src/appengine/handlers/cron/load_bigquery_stats.py b/src/appengine/handlers/cron/load_bigquery_stats.py
--- a/src/appengine/handlers/cron/load_bigquery_stats.py
+++ b/src/appengine/handlers/cron/load_bigquery_stats.py
@@ -77,7 +77,7 @@
return self._execute_insert_request(dataset_insert)
- def _cr... | {"golden_diff": "diff --git a/src/appengine/handlers/cron/load_bigquery_stats.py b/src/appengine/handlers/cron/load_bigquery_stats.py\n--- a/src/appengine/handlers/cron/load_bigquery_stats.py\n+++ b/src/appengine/handlers/cron/load_bigquery_stats.py\n@@ -77,7 +77,7 @@\n \n return self._execute_insert_request(datase... | 2,660 | 377 |
gh_patches_debug_22057 | rasdani/github-patches | git_diff | facebookresearch__hydra-2713 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hydra ray launcher requirements update
# 🚀 Feature Request
The requirements of `hydra-ray-launcher` are too restrictive. Please provide wider bounds. In particular, so that is compatible with the latest v... | diff --git a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py
--- a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py
+++ b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py
@@ -1... | {"golden_diff": "diff --git a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py\n--- a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py\n+++ b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launche... | 986 | 431 |
gh_patches_debug_12563 | rasdani/github-patches | git_diff | pypi__warehouse-669 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Figure out uWSGI Configuration Options
We're currently serving Warehouse on Heroku using gunicorn with the eventlet workers. I started using gunicorn because it's simple, and eventually switched from sync to ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -73,8 +73,6 @@
"boto3",
"celery>=3.1",
"click",
- "eventlet",
- "gunicorn",
"hiredis",
"html5lib",
"itsdangerous",
@@ -94,7 +92,6 @@
"requests",
"redis>=2.8.0",
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -73,8 +73,6 @@\n \"boto3\",\n \"celery>=3.1\",\n \"click\",\n- \"eventlet\",\n- \"gunicorn\",\n \"hiredis\",\n \"html5lib\",\n \"itsdangerous\",\n@@ -94,7 +92,6 @@\n ... | 2,112 | 199 |
gh_patches_debug_1855 | rasdani/github-patches | git_diff | flairNLP__flair-300 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update torch version to 1.0.0
torch version 1.0.0 is available. Use torch version 1.0.0 in Flair.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may co... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@
packages=find_packages(exclude='test'), # same as name
license='MIT',
install_requires=[
- 'torch==0.4.1',
+ 'torch==1.0.0',
'gensim==3.4.0',
'typing==3.6.4',
'tqdm==4.26.0',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -12,7 +12,7 @@\n packages=find_packages(exclude='test'), # same as name\n license='MIT',\n install_requires=[\n- 'torch==0.4.1',\n+ 'torch==1.0.0',\n 'gensim==3.4.0',\n 'typing==3.6.4',\n ... | 618 | 112 |
gh_patches_debug_18221 | rasdani/github-patches | git_diff | PrefectHQ__prefect-2686 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Google Imports are Tied Together
## Description
*A clear description of the bug*
I’m using the new `GCSResult` and I’m getting an import error when I don’t also specify `google-cloud-bigquery` as a dependen... | diff --git a/src/prefect/utilities/gcp.py b/src/prefect/utilities/gcp.py
--- a/src/prefect/utilities/gcp.py
+++ b/src/prefect/utilities/gcp.py
@@ -3,7 +3,6 @@
"""
import prefect
-from google.cloud import bigquery, storage
from google.oauth2.service_account import Credentials
@@ -47,6 +46,8 @@
Returns:
... | {"golden_diff": "diff --git a/src/prefect/utilities/gcp.py b/src/prefect/utilities/gcp.py\n--- a/src/prefect/utilities/gcp.py\n+++ b/src/prefect/utilities/gcp.py\n@@ -3,7 +3,6 @@\n \"\"\"\n import prefect\n \n-from google.cloud import bigquery, storage\n from google.oauth2.service_account import Credentials\n \n \n@@ -... | 1,906 | 188 |
gh_patches_debug_12930 | rasdani/github-patches | git_diff | spyder-ide__spyder-5128 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error when trying to load third-party plugins
## Description
**What steps will reproduce the problem?**
1. Start sypder.
2.
3.
**What is the expected output? What do you see instead?**
It shows ... | diff --git a/spyder/otherplugins.py b/spyder/otherplugins.py
--- a/spyder/otherplugins.py
+++ b/spyder/otherplugins.py
@@ -54,10 +54,16 @@
# Is this a Spyder plugin?
if not name.startswith(PLUGIN_PREFIX):
continue
+
# Ensure right type of plugin
if is_io != name.sta... | {"golden_diff": "diff --git a/spyder/otherplugins.py b/spyder/otherplugins.py\n--- a/spyder/otherplugins.py\n+++ b/spyder/otherplugins.py\n@@ -54,10 +54,16 @@\n # Is this a Spyder plugin?\r\n if not name.startswith(PLUGIN_PREFIX):\r\n continue\r\n+\r\n # Ensure right type of plugin\r... | 1,947 | 172 |
gh_patches_debug_7825 | rasdani/github-patches | git_diff | spack__spack-4606 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: mxml / adios link error
This seems to be related to the pull request https://github.com/LLNL/spack/pull/3696 that I abandoned a few months back, but which has now come back to haunt me.
If I use the cur... | diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py
--- a/var/spack/repos/builtin/packages/mxml/package.py
+++ b/var/spack/repos/builtin/packages/mxml/package.py
@@ -48,5 +48,9 @@
return 'https://github.com/michaelrsweet/mxml/releases/download/re... | {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py\n--- a/var/spack/repos/builtin/packages/mxml/package.py\n+++ b/var/spack/repos/builtin/packages/mxml/package.py\n@@ -48,5 +48,9 @@\n return 'https://github.com/michaelrsweet/mxml... | 1,779 | 184 |
gh_patches_debug_29724 | rasdani/github-patches | git_diff | pallets__click-545 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bash completion for MultiCommands returns subcommands twice until it stops.
Python 2.7.10
broken in click >= 6
ok in click (5.1)
```
manage hello hello world world
```
--- END ISSUE ---
Below are some cod... | diff --git a/click/_bashcomplete.py b/click/_bashcomplete.py
--- a/click/_bashcomplete.py
+++ b/click/_bashcomplete.py
@@ -30,27 +30,19 @@
def resolve_ctx(cli, prog_name, args):
ctx = cli.make_context(prog_name, args, resilient_parsing=True)
- while ctx.args and isinstance(ctx.command, MultiCommand):
- ... | {"golden_diff": "diff --git a/click/_bashcomplete.py b/click/_bashcomplete.py\n--- a/click/_bashcomplete.py\n+++ b/click/_bashcomplete.py\n@@ -30,27 +30,19 @@\n \n def resolve_ctx(cli, prog_name, args):\n ctx = cli.make_context(prog_name, args, resilient_parsing=True)\n- while ctx.args and isinstance(ctx.command... | 983 | 478 |
gh_patches_debug_14200 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-898 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Client Address is not displayed for flows from dumpfiles
I have two clients connecting to mitmproxy now, and I'd like to see the client IP for each request in the "Detail" tab.
Maybe show the server's IP too... | diff --git a/libmproxy/console/flowdetailview.py b/libmproxy/console/flowdetailview.py
--- a/libmproxy/console/flowdetailview.py
+++ b/libmproxy/console/flowdetailview.py
@@ -20,7 +20,7 @@
req = flow.request
resp = flow.response
- if sc:
+ if sc is not None:
text.append(urwid.Text([("head", "... | {"golden_diff": "diff --git a/libmproxy/console/flowdetailview.py b/libmproxy/console/flowdetailview.py\n--- a/libmproxy/console/flowdetailview.py\n+++ b/libmproxy/console/flowdetailview.py\n@@ -20,7 +20,7 @@\n req = flow.request\n resp = flow.response\n \n- if sc:\n+ if sc is not None:\n text.app... | 1,522 | 184 |
gh_patches_debug_16006 | rasdani/github-patches | git_diff | openvinotoolkit__datumaro-275 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CLI help usage is misleading
Recommendation of usage in cli help message is misleading.
**Steps:**
```
datum -h
```
**Expected result:**
Correct form for usage recommendation
**Current result:**
`... | diff --git a/datumaro/cli/__main__.py b/datumaro/cli/__main__.py
--- a/datumaro/cli/__main__.py
+++ b/datumaro/cli/__main__.py
@@ -5,6 +5,7 @@
import argparse
import logging as log
+import os.path as osp
import sys
from . import contexts, commands
@@ -50,9 +51,11 @@
return desc
def make_parser():
- p... | {"golden_diff": "diff --git a/datumaro/cli/__main__.py b/datumaro/cli/__main__.py\n--- a/datumaro/cli/__main__.py\n+++ b/datumaro/cli/__main__.py\n@@ -5,6 +5,7 @@\n \n import argparse\n import logging as log\n+import os.path as osp\n import sys\n \n from . import contexts, commands\n@@ -50,9 +51,11 @@\n return desc... | 1,699 | 193 |
gh_patches_debug_15173 | rasdani/github-patches | git_diff | searxng__searxng-131 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
searx_extra/update/update_languages.py : crash on peertube engine
The URL https://peer.tube/api/v1/videos/languages doesn't exist anymore:
https://github.com/searxng/searxng/blob/ee83c99d2b40efaaf4f3e6635e7a... | diff --git a/searx/engines/peertube.py b/searx/engines/peertube.py
--- a/searx/engines/peertube.py
+++ b/searx/engines/peertube.py
@@ -22,7 +22,9 @@
categories = ["videos"]
paging = True
base_url = "https://peer.tube"
-supported_languages_url = base_url + "/api/v1/videos/languages"
+supported_languages_url = (
+ ... | {"golden_diff": "diff --git a/searx/engines/peertube.py b/searx/engines/peertube.py\n--- a/searx/engines/peertube.py\n+++ b/searx/engines/peertube.py\n@@ -22,7 +22,9 @@\n categories = [\"videos\"]\n paging = True\n base_url = \"https://peer.tube\"\n-supported_languages_url = base_url + \"/api/v1/videos/languages\"\n+su... | 1,297 | 283 |
gh_patches_debug_12234 | rasdani/github-patches | git_diff | ivy-llc__ivy-15998 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
multiply
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/tensor/math.py`
C... | diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -66,6 +66,24 @@
return ivy.divide(x, y)
+@with_unsupported_dtypes({"2.4.2 and below": ("float... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py\n--- a/ivy/functional/frontends/paddle/tensor/math.py\n+++ b/ivy/functional/frontends/paddle/tensor/math.py\n@@ -66,6 +66,24 @@\n return ivy.divide(x, y)\n \n \n+@with_unsupported_dtypes({\"... | 1,333 | 316 |
gh_patches_debug_5001 | rasdani/github-patches | git_diff | liqd__a4-product-1113 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
poll-comment export seems to be broken
```
Environment:
Request Method: GET
Request URL: http://localhost:8004/liqd-orga/dashboard/modules/umfrage/poll/export/
Django Version: 2.2.6
Python Version:... | diff --git a/apps/polls/views.py b/apps/polls/views.py
--- a/apps/polls/views.py
+++ b/apps/polls/views.py
@@ -81,5 +81,8 @@
context = super().get_context_data(**kwargs)
context['comment_export'] = reverse(
'a4dashboard:poll-comment-export',
- kwargs={'module_slug': self.module... | {"golden_diff": "diff --git a/apps/polls/views.py b/apps/polls/views.py\n--- a/apps/polls/views.py\n+++ b/apps/polls/views.py\n@@ -81,5 +81,8 @@\n context = super().get_context_data(**kwargs)\n context['comment_export'] = reverse(\n 'a4dashboard:poll-comment-export',\n- kwargs={'m... | 2,284 | 119 |
gh_patches_debug_59756 | rasdani/github-patches | git_diff | pyca__cryptography-3819 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Signer/Verifier deprecation warning has wrong stacklevel
Seeing this with Cryptography 2.0:
```
.../python3.5/site-packages/cryptography/hazmat/backends/openssl/rsa.py:477: DeprecationWarning: signer and ... | diff --git a/src/cryptography/hazmat/backends/openssl/utils.py b/src/cryptography/hazmat/backends/openssl/utils.py
--- a/src/cryptography/hazmat/backends/openssl/utils.py
+++ b/src/cryptography/hazmat/backends/openssl/utils.py
@@ -41,5 +41,5 @@
"signer and verifier have been deprecated. Please use sign "
... | {"golden_diff": "diff --git a/src/cryptography/hazmat/backends/openssl/utils.py b/src/cryptography/hazmat/backends/openssl/utils.py\n--- a/src/cryptography/hazmat/backends/openssl/utils.py\n+++ b/src/cryptography/hazmat/backends/openssl/utils.py\n@@ -41,5 +41,5 @@\n \"signer and verifier have been deprecated. P... | 812 | 115 |
gh_patches_debug_40797 | rasdani/github-patches | git_diff | PaddlePaddle__models-5121 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
work around hung
The fix will follow closely.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `PaddleNLP/be... | diff --git a/PaddleNLP/benchmark/transformer/reader.py b/PaddleNLP/benchmark/transformer/reader.py
--- a/PaddleNLP/benchmark/transformer/reader.py
+++ b/PaddleNLP/benchmark/transformer/reader.py
@@ -43,6 +43,12 @@
mode=m, transform_func=transform_func) for m in ["train", "dev"]
]
+ if args.shuffl... | {"golden_diff": "diff --git a/PaddleNLP/benchmark/transformer/reader.py b/PaddleNLP/benchmark/transformer/reader.py\n--- a/PaddleNLP/benchmark/transformer/reader.py\n+++ b/PaddleNLP/benchmark/transformer/reader.py\n@@ -43,6 +43,12 @@\n mode=m, transform_func=transform_func) for m in [\"train\", \"dev\"]\n ... | 3,572 | 686 |
gh_patches_debug_23200 | rasdani/github-patches | git_diff | RedHatInsights__insights-core-3248 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update pydoc for Messages (/var/log/messages)
Correct the examples: https://github.com/RedHatInsights/insights-core/blob/master/insights/parsers/messages.py#L32
--- END ISSUE ---
Below are some code segment... | diff --git a/insights/parsers/messages.py b/insights/parsers/messages.py
--- a/insights/parsers/messages.py
+++ b/insights/parsers/messages.py
@@ -30,17 +30,14 @@
This will also work around December/January crossovers.
Examples:
- >>> Messages.filters.append('wrapper')
>>> Messages.token... | {"golden_diff": "diff --git a/insights/parsers/messages.py b/insights/parsers/messages.py\n--- a/insights/parsers/messages.py\n+++ b/insights/parsers/messages.py\n@@ -30,17 +30,14 @@\n This will also work around December/January crossovers.\n \n Examples:\n- >>> Messages.filters.append('wrapper')\n ... | 958 | 408 |
gh_patches_debug_23518 | rasdani/github-patches | git_diff | internetarchive__openlibrary-6082 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
"`Nothing` type not JSON serializable" errors occurring when fetching list data from `/seeds.json`
<!-- What problem are we solving? What does the experience look like today? What are the symptoms? -->
When ... | diff --git a/openlibrary/core/formats.py b/openlibrary/core/formats.py
--- a/openlibrary/core/formats.py
+++ b/openlibrary/core/formats.py
@@ -3,6 +3,8 @@
import json
import yaml
+from openlibrary.core.helpers import NothingEncoder
+
__all__ = ["load_yaml", "dump_yaml"]
@@ -25,7 +27,7 @@
def dump(data, form... | {"golden_diff": "diff --git a/openlibrary/core/formats.py b/openlibrary/core/formats.py\n--- a/openlibrary/core/formats.py\n+++ b/openlibrary/core/formats.py\n@@ -3,6 +3,8 @@\n import json\n import yaml\n \n+from openlibrary.core.helpers import NothingEncoder\n+\n __all__ = [\"load_yaml\", \"dump_yaml\"]\n \n \n@@ -25,... | 3,863 | 343 |
gh_patches_debug_11114 | rasdani/github-patches | git_diff | freedomofpress__securedrop-1890 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tails 3.0 does not restore the original filename when uncompressing a file
# Bug
Tails 3.0 does not preserve the filename when extracting an archive.
## Description
When extracting an archive, Tails ... | diff --git a/install_files/ansible-base/roles/tails-config/files/securedrop_init.py b/install_files/ansible-base/roles/tails-config/files/securedrop_init.py
--- a/install_files/ansible-base/roles/tails-config/files/securedrop_init.py
+++ b/install_files/ansible-base/roles/tails-config/files/securedrop_init.py
@@ -41,6 ... | {"golden_diff": "diff --git a/install_files/ansible-base/roles/tails-config/files/securedrop_init.py b/install_files/ansible-base/roles/tails-config/files/securedrop_init.py\n--- a/install_files/ansible-base/roles/tails-config/files/securedrop_init.py\n+++ b/install_files/ansible-base/roles/tails-config/files/securedro... | 890 | 218 |
gh_patches_debug_9358 | rasdani/github-patches | git_diff | mkdocs__mkdocs-1565 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
"Files not present in docs directory" message shown for external links
Hi!
### STR
1. `mkvirtualenv mkdocs -p python 3.6`
2. `pip install mkdocs==1.0b1`
3. Update [an existing project's mkdocs.yml](http... | diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -126,8 +126,7 @@
links = _get_by_type(items, Link)
if links:
# Assume all links are external.
- # TODO: warn or error on internal links?
- log.info(
+ log... | {"golden_diff": "diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py\n--- a/mkdocs/structure/nav.py\n+++ b/mkdocs/structure/nav.py\n@@ -126,8 +126,7 @@\n links = _get_by_type(items, Link)\n if links:\n # Assume all links are external.\n- # TODO: warn or error on internal links?\n- ... | 2,605 | 146 |
gh_patches_debug_21778 | rasdani/github-patches | git_diff | saleor__saleor-2814 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Return a variant price instead of the priceOverride
### What I'm trying to achieve
In my impression, `priceOverride` is an internal functionality which shouldn't be available in the API.
In addition, when I... | diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.py
--- a/saleor/graphql/product/types.py
+++ b/saleor/graphql/product/types.py
@@ -90,6 +90,7 @@
Money,
description="""Override the base price of a product if necessary.
A value of `null` indicates that the default pr... | {"golden_diff": "diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.py\n--- a/saleor/graphql/product/types.py\n+++ b/saleor/graphql/product/types.py\n@@ -90,6 +90,7 @@\n Money,\n description=\"\"\"Override the base price of a product if necessary.\n A value of `null` ind... | 3,445 | 232 |
gh_patches_debug_13980 | rasdani/github-patches | git_diff | ocf__ocfweb-185 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
libsass>0.10.0 breaks dh-virtuaenv
https://jenkins.ocf.berkeley.edu/view/ocfweb-deploy/job/ocfweb-build-deb/232/console
```
# build sass, output static files
debian/ocfweb/usr/share/python/ocfweb/bin/python ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@
'django-redis',
'django>=1.10,<1.10.999',
'gunicorn',
- 'libsass<=0.10.0', # https://github.com/ocf/ocfweb/issues/128
+ 'libsass',
'matplotlib',
'mistune',
'numpy',
@@ -3... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -24,7 +24,7 @@\n 'django-redis',\n 'django>=1.10,<1.10.999',\n 'gunicorn',\n- 'libsass<=0.10.0', # https://github.com/ocf/ocfweb/issues/128\n+ 'libsass',\n 'matplotlib',\n 'mistun... | 1,444 | 199 |
gh_patches_debug_26182 | rasdani/github-patches | git_diff | scalableminds__webknossos-libs-641 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Persist log file
When running the cuber, there usually is a lot of output (overflowing terminal buffers). It would be great if all of that output would be persisted in a log file as well to allow to easily sc... | diff --git a/webknossos/webknossos/utils.py b/webknossos/webknossos/utils.py
--- a/webknossos/webknossos/utils.py
+++ b/webknossos/webknossos/utils.py
@@ -4,6 +4,7 @@
import json
import logging
import os
+import sys
import time
from concurrent.futures import as_completed
from concurrent.futures._base import Futur... | {"golden_diff": "diff --git a/webknossos/webknossos/utils.py b/webknossos/webknossos/utils.py\n--- a/webknossos/webknossos/utils.py\n+++ b/webknossos/webknossos/utils.py\n@@ -4,6 +4,7 @@\n import json\n import logging\n import os\n+import sys\n import time\n from concurrent.futures import as_completed\n from concurrent... | 1,988 | 400 |
gh_patches_debug_41281 | rasdani/github-patches | git_diff | mozilla__bugbug-310 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make NLP dependencies optional
Some dependencies are only needed in some images, we should make some dependencies optional so that they are only installed when necessary.
For example, Spacy is the biggest ... | diff --git a/bugbug/nlp.py b/bugbug/nlp.py
--- a/bugbug/nlp.py
+++ b/bugbug/nlp.py
@@ -3,17 +3,41 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
+import sys
from collections import defaultdict
from functools import lru_cache
i... | {"golden_diff": "diff --git a/bugbug/nlp.py b/bugbug/nlp.py\n--- a/bugbug/nlp.py\n+++ b/bugbug/nlp.py\n@@ -3,17 +3,41 @@\n # License, v. 2.0. If a copy of the MPL was not distributed with this file,\n # You can obtain one at http://mozilla.org/MPL/2.0/.\n \n+import sys\n from collections import defaultdict\n from funct... | 1,765 | 865 |
gh_patches_debug_11621 | rasdani/github-patches | git_diff | apache__airflow-12057 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Exception logging success function instead of failure
https://github.com/apache/airflow/blob/fdd9b6f65b608c516b8a062b058972d9a45ec9e3/airflow/sensors/sql_sensor.py#L97
--- END ISSUE ---
Below are some c... | diff --git a/airflow/sensors/sql_sensor.py b/airflow/sensors/sql_sensor.py
--- a/airflow/sensors/sql_sensor.py
+++ b/airflow/sensors/sql_sensor.py
@@ -109,7 +109,7 @@
if self.failure(first_cell):
raise AirflowException(f"Failure criteria met. self.failure({first_cell}) returned Tru... | {"golden_diff": "diff --git a/airflow/sensors/sql_sensor.py b/airflow/sensors/sql_sensor.py\n--- a/airflow/sensors/sql_sensor.py\n+++ b/airflow/sensors/sql_sensor.py\n@@ -109,7 +109,7 @@\n if self.failure(first_cell):\n raise AirflowException(f\"Failure criteria met. self.failure({fi... | 1,626 | 151 |
gh_patches_debug_8494 | rasdani/github-patches | git_diff | cloudtools__troposphere-1040 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Appsync ApiKey Expires needs to be an int
The expires prop on the appsync ApiKey class needs to be an int otherwise the decimal place causes cloudformation to throw a `Can not deserialize value of type java.l... | diff --git a/troposphere/appsync.py b/troposphere/appsync.py
--- a/troposphere/appsync.py
+++ b/troposphere/appsync.py
@@ -4,7 +4,7 @@
# See LICENSE file for full license.
from . import AWSObject, AWSProperty
-from .validators import boolean
+from .validators import boolean, integer
class ApiKey(AWSObject):
@@... | {"golden_diff": "diff --git a/troposphere/appsync.py b/troposphere/appsync.py\n--- a/troposphere/appsync.py\n+++ b/troposphere/appsync.py\n@@ -4,7 +4,7 @@\n # See LICENSE file for full license.\n \n from . import AWSObject, AWSProperty\n-from .validators import boolean\n+from .validators import boolean, integer\n \n \n... | 1,332 | 146 |
gh_patches_debug_38012 | rasdani/github-patches | git_diff | mabel-dev__opteryx-1423 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
✨ improve CROSS JOIN UNNEST performance
Usage logs show queries which use CROSS JOIN UNNEST are often amongst the slowest running queries.
Whilst CROSS JOIN and UNNEST are relatively slow operations, opport... | diff --git a/opteryx/__version__.py b/opteryx/__version__.py
--- a/opteryx/__version__.py
+++ b/opteryx/__version__.py
@@ -1,4 +1,4 @@
-__build__ = 271
+__build__ = 276
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -27,9 +27,9... | {"golden_diff": "diff --git a/opteryx/__version__.py b/opteryx/__version__.py\n--- a/opteryx/__version__.py\n+++ b/opteryx/__version__.py\n@@ -1,4 +1,4 @@\n-__build__ = 271\n+__build__ = 276\n \n # Licensed under the Apache License, Version 2.0 (the \"License\");\n # you may not use this file except in compliance with ... | 3,093 | 641 |
gh_patches_debug_4543 | rasdani/github-patches | git_diff | Zeroto521__my-data-toolkit-433 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: feature_union can't concat different dataframe well
https://github.com/Zeroto521/my-data-toolkit/blob/8b6ec3ce2658626f265bf5e1bab5a7c0897a0787/dtoolkit/transformer.py#L55-L56
When we use transformers ... | diff --git a/dtoolkit/transformer/sklearn.py b/dtoolkit/transformer/sklearn.py
--- a/dtoolkit/transformer/sklearn.py
+++ b/dtoolkit/transformer/sklearn.py
@@ -52,8 +52,8 @@
def _hstack(self, Xs):
if all(isinstance(i, (pd.Series, pd.DataFrame)) for i in Xs):
- Xs = (i.reset_index(drop=True) fo... | {"golden_diff": "diff --git a/dtoolkit/transformer/sklearn.py b/dtoolkit/transformer/sklearn.py\n--- a/dtoolkit/transformer/sklearn.py\n+++ b/dtoolkit/transformer/sklearn.py\n@@ -52,8 +52,8 @@\n \n def _hstack(self, Xs):\n if all(isinstance(i, (pd.Series, pd.DataFrame)) for i in Xs):\n- Xs = (i.r... | 3,832 | 167 |
gh_patches_debug_7151 | rasdani/github-patches | git_diff | Lightning-AI__pytorch-lightning-1996 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set precision=16 (using apex) would cause early stopping break
## 🐛 Bug
The current early stopping monitor initilize by comparing if the function monitor_op is equal to torch.lt.
`self.best = torch_inf... | diff --git a/pytorch_lightning/callbacks/early_stopping.py b/pytorch_lightning/callbacks/early_stopping.py
--- a/pytorch_lightning/callbacks/early_stopping.py
+++ b/pytorch_lightning/callbacks/early_stopping.py
@@ -107,7 +107,7 @@
# Allow instances to be re-used
self.wait = 0
self.stopped_epo... | {"golden_diff": "diff --git a/pytorch_lightning/callbacks/early_stopping.py b/pytorch_lightning/callbacks/early_stopping.py\n--- a/pytorch_lightning/callbacks/early_stopping.py\n+++ b/pytorch_lightning/callbacks/early_stopping.py\n@@ -107,7 +107,7 @@\n # Allow instances to be re-used\n self.wait = 0\n ... | 2,267 | 171 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.