problem_id stringlengths 18 22 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 58 | prompt stringlengths 1.1k 10.2k | golden_diff stringlengths 151 4.94k | verification_info stringlengths 582 21k | num_tokens int64 271 2.05k | num_tokens_diff int64 47 1.02k |
|---|---|---|---|---|---|---|---|---|
gh_patches_debug_16039 | rasdani/github-patches | git_diff | kserve__kserve-2342 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Kserve defaulting causing duplicates of environment variable
/kind bug
**What steps did you take and what happened:**
Create example xgboost isvc and enable gRPC
```
apiVersion: "serving.kserve.io/v1be... | diff --git a/python/custom_transformer/model_grpc.py b/python/custom_transformer/model_grpc.py
--- a/python/custom_transformer/model_grpc.py
+++ b/python/custom_transformer/model_grpc.py
@@ -18,7 +18,6 @@
from kserve import Model, ModelServer, model_server
from kserve.grpc.grpc_predict_v2_pb2 import ModelInferReque... | {"golden_diff": "diff --git a/python/custom_transformer/model_grpc.py b/python/custom_transformer/model_grpc.py\n--- a/python/custom_transformer/model_grpc.py\n+++ b/python/custom_transformer/model_grpc.py\n@@ -18,7 +18,6 @@\n \n from kserve import Model, ModelServer, model_server\n from kserve.grpc.grpc_predict_v2_pb2... | 1,401 | 203 |
gh_patches_debug_20425 | rasdani/github-patches | git_diff | wenet-e2e__wenet-1221 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DLL load failed while importing _wenet: 找不到指定的模块。
我安装了wenet, pip install wenet.
安装提示成功了。
我用例子程序做识别。
程序如下:
import sys
import wenet
def get_text_from_wav(dir, wav):
model_dir = dir
wav_file = ... | diff --git a/runtime/binding/python/setup.py b/runtime/binding/python/setup.py
--- a/runtime/binding/python/setup.py
+++ b/runtime/binding/python/setup.py
@@ -60,12 +60,12 @@
fst_lib = 'fc_base/openfst-build/src/lib/.libs'
for ext in ['so', 'dylib']:
libs.extend(glob.glob(f'{s... | {"golden_diff": "diff --git a/runtime/binding/python/setup.py b/runtime/binding/python/setup.py\n--- a/runtime/binding/python/setup.py\n+++ b/runtime/binding/python/setup.py\n@@ -60,12 +60,12 @@\n fst_lib = 'fc_base/openfst-build/src/lib/.libs'\n for ext in ['so', 'dylib']:\n lib... | 1,671 | 274 |
gh_patches_debug_42539 | rasdani/github-patches | git_diff | translate__pootle-6705 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecate update/sync stores
Wondering what is best with these commands.
on the one hand they are quite useful for grouping common operations
on the other, it would be better for users to learn the more... | diff --git a/pootle/apps/pootle_app/management/commands/sync_stores.py b/pootle/apps/pootle_app/management/commands/sync_stores.py
--- a/pootle/apps/pootle_app/management/commands/sync_stores.py
+++ b/pootle/apps/pootle_app/management/commands/sync_stores.py
@@ -28,9 +28,7 @@
action='store_true',
... | {"golden_diff": "diff --git a/pootle/apps/pootle_app/management/commands/sync_stores.py b/pootle/apps/pootle_app/management/commands/sync_stores.py\n--- a/pootle/apps/pootle_app/management/commands/sync_stores.py\n+++ b/pootle/apps/pootle_app/management/commands/sync_stores.py\n@@ -28,9 +28,7 @@\n action='s... | 1,836 | 843 |
gh_patches_debug_63270 | rasdani/github-patches | git_diff | google__turbinia-1086 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
sphinx docs build broken
Getting an error when trying to build the docs:
```
$ sphinx-build -b html -d build/doctrees docs dist/docs
Running Sphinx v4.5.0
WARNING: html_static_path entry '_static' does no... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -34,8 +34,7 @@
# ones.
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage',
- 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx_markdown_tables',
- 'recommonmark'
+ 'sphinx.ext.viewcode', '... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -34,8 +34,7 @@\n # ones.\n extensions = [\n 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage',\n- 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx_markdown_tables',\n- 'recommonmark'\n+ ... | 1,761 | 134 |
gh_patches_debug_3111 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-128 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lists being marked as Optional
When defining a list the resulting schema marks the list as optional (or nullable in GraphQL terms) even if it wasn't wrapped in `typing.Optional`, we should fix that :)
--- EN... | diff --git a/strawberry/type_converter.py b/strawberry/type_converter.py
--- a/strawberry/type_converter.py
+++ b/strawberry/type_converter.py
@@ -44,7 +44,9 @@
annotation.__args__[0], field_name
)
- return GraphQLList(list_of_type)
+ list_type = GraphQLList(list_of... | {"golden_diff": "diff --git a/strawberry/type_converter.py b/strawberry/type_converter.py\n--- a/strawberry/type_converter.py\n+++ b/strawberry/type_converter.py\n@@ -44,7 +44,9 @@\n annotation.__args__[0], field_name\n )\n \n- return GraphQLList(list_of_type)\n+ list_t... | 1,162 | 115 |
gh_patches_debug_29154 | rasdani/github-patches | git_diff | Kinto__kinto-1036 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Setting value in cache should never fail
The cache is a key value store. The transaction isolation and integrity constraints are details of implementation. Setting a value in the cache should just never fail.... | diff --git a/kinto/core/cache/postgresql/__init__.py b/kinto/core/cache/postgresql/__init__.py
--- a/kinto/core/cache/postgresql/__init__.py
+++ b/kinto/core/cache/postgresql/__init__.py
@@ -1,13 +1,41 @@
from __future__ import absolute_import
+from functools import wraps
import os
+import time
from kinto.core i... | {"golden_diff": "diff --git a/kinto/core/cache/postgresql/__init__.py b/kinto/core/cache/postgresql/__init__.py\n--- a/kinto/core/cache/postgresql/__init__.py\n+++ b/kinto/core/cache/postgresql/__init__.py\n@@ -1,13 +1,41 @@\n from __future__ import absolute_import\n+from functools import wraps\n \n import os\n+import ... | 1,974 | 448 |
gh_patches_debug_1075 | rasdani/github-patches | git_diff | e2nIEE__pandapower-563 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
from_mpc failed to load the case generated by to_mpc
After checking the source code, I found the to_mpc function saves the fields in a loose format. According to the from_mpc function, all the fields should b... | diff --git a/pandapower/converter/matpower/to_mpc.py b/pandapower/converter/matpower/to_mpc.py
--- a/pandapower/converter/matpower/to_mpc.py
+++ b/pandapower/converter/matpower/to_mpc.py
@@ -42,7 +42,8 @@
"""
ppc = to_ppc(net, **kwargs)
- mpc = _ppc2mpc(ppc)
+ mpc = dict()
+ mpc["mpc"] = _ppc2mpc(p... | {"golden_diff": "diff --git a/pandapower/converter/matpower/to_mpc.py b/pandapower/converter/matpower/to_mpc.py\n--- a/pandapower/converter/matpower/to_mpc.py\n+++ b/pandapower/converter/matpower/to_mpc.py\n@@ -42,7 +42,8 @@\n \"\"\"\n ppc = to_ppc(net, **kwargs)\n \n- mpc = _ppc2mpc(ppc)\n+ mpc = dict()\... | 1,187 | 146 |
gh_patches_debug_43407 | rasdani/github-patches | git_diff | deepset-ai__haystack-5083 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add FileClassifier media support
**Is your feature request related to a problem? Please describe.**
As a user I want to add WhisperTranscriber in my pipeline. I would like to use FileClassifier to classify m... | diff --git a/haystack/nodes/file_classifier/file_type.py b/haystack/nodes/file_classifier/file_type.py
--- a/haystack/nodes/file_classifier/file_type.py
+++ b/haystack/nodes/file_classifier/file_type.py
@@ -14,7 +14,9 @@
import magic
-DEFAULT_TYPES = ["txt", "pdf", "md", "docx", "html"]
+DEFAULT_TYPES = ["txt"... | {"golden_diff": "diff --git a/haystack/nodes/file_classifier/file_type.py b/haystack/nodes/file_classifier/file_type.py\n--- a/haystack/nodes/file_classifier/file_type.py\n+++ b/haystack/nodes/file_classifier/file_type.py\n@@ -14,7 +14,9 @@\n import magic\n \n \n-DEFAULT_TYPES = [\"txt\", \"pdf\", \"md\", \"docx\",... | 1,590 | 948 |
gh_patches_debug_39047 | rasdani/github-patches | git_diff | optuna__optuna-2343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tensorboard integration with integers for parameter boundaries
When using the `optuna.integration.tensorboard.TensorBoardCallback` with integer parameters for `suggest_uniform`, a `TypeError` is raised.
##... | diff --git a/optuna/integration/tensorboard.py b/optuna/integration/tensorboard.py
--- a/optuna/integration/tensorboard.py
+++ b/optuna/integration/tensorboard.py
@@ -56,34 +56,36 @@
def _add_distributions(
self, distributions: Dict[str, optuna.distributions.BaseDistribution]
) -> None:
+ real... | {"golden_diff": "diff --git a/optuna/integration/tensorboard.py b/optuna/integration/tensorboard.py\n--- a/optuna/integration/tensorboard.py\n+++ b/optuna/integration/tensorboard.py\n@@ -56,34 +56,36 @@\n def _add_distributions(\n self, distributions: Dict[str, optuna.distributions.BaseDistribution]\n )... | 2,042 | 606 |
gh_patches_debug_6477 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-2483 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`clean_stale_db --force` kills demo databases newer than 3 days
## Description
`clean_stale_db --force` is meant to only kill demo databases older than 3 days (by default), but that doesn't seem to be the ca... | diff --git a/demo/management/commands/clean_stale_db.py b/demo/management/commands/clean_stale_db.py
--- a/demo/management/commands/clean_stale_db.py
+++ b/demo/management/commands/clean_stale_db.py
@@ -43,7 +43,7 @@
'template0',
'template1'
]
- stale_databases = Database.objects.filter(create... | {"golden_diff": "diff --git a/demo/management/commands/clean_stale_db.py b/demo/management/commands/clean_stale_db.py\n--- a/demo/management/commands/clean_stale_db.py\n+++ b/demo/management/commands/clean_stale_db.py\n@@ -43,7 +43,7 @@\n 'template0',\n 'template1'\n ]\n- stale_databases = Databa... | 1,201 | 153 |
gh_patches_debug_7289 | rasdani/github-patches | git_diff | beetbox__beets-1492 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
importfeeds: name of m3u_multi playlist get messed up when both m3u* options are on
activate both m3u output formats
```
importfeeds:
formats: m3u m3u_multi
```
Result : m3u_multi filename is no... | diff --git a/beetsplug/importfeeds.py b/beetsplug/importfeeds.py
--- a/beetsplug/importfeeds.py
+++ b/beetsplug/importfeeds.py
@@ -118,10 +118,9 @@
paths.append(relpath)
if 'm3u' in formats:
- basename = bytestring_path(
- self.config['m3u_name'].get(unicode)
- ... | {"golden_diff": "diff --git a/beetsplug/importfeeds.py b/beetsplug/importfeeds.py\n--- a/beetsplug/importfeeds.py\n+++ b/beetsplug/importfeeds.py\n@@ -118,10 +118,9 @@\n paths.append(relpath)\n \n if 'm3u' in formats:\n- basename = bytestring_path(\n- self.config['m3u_n... | 1,901 | 180 |
gh_patches_debug_66681 | rasdani/github-patches | git_diff | pantsbuild__pants-16793 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Please add Brand24 to the public list of Pants Users
### Company name
Brand24
### Company website
https://brand24.com
### Company logo
`) when the message is received there is no data field in the message and ... | diff --git a/gcloud/pubsub/message.py b/gcloud/pubsub/message.py
--- a/gcloud/pubsub/message.py
+++ b/gcloud/pubsub/message.py
@@ -71,6 +71,6 @@
:type api_repr: dict or None
:param api_repr: The API representation of the message
"""
- data = base64.b64decode(api_repr['data'])
+ ... | {"golden_diff": "diff --git a/gcloud/pubsub/message.py b/gcloud/pubsub/message.py\n--- a/gcloud/pubsub/message.py\n+++ b/gcloud/pubsub/message.py\n@@ -71,6 +71,6 @@\n :type api_repr: dict or None\n :param api_repr: The API representation of the message\n \"\"\"\n- data = base64.b64decode(... | 1,204 | 133 |
gh_patches_debug_23315 | rasdani/github-patches | git_diff | fossasia__open-event-server-5328 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Internal Server Error thrown for patching a nonexistent session
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
HTTP 500 error is thrown when a patch request is sent for a ... | diff --git a/app/api/schema/sessions.py b/app/api/schema/sessions.py
--- a/app/api/schema/sessions.py
+++ b/app/api/schema/sessions.py
@@ -1,6 +1,8 @@
+from flask_rest_jsonapi.exceptions import ObjectNotFound
from marshmallow import validates_schema, validate
from marshmallow_jsonapi import fields
from marshmallow_j... | {"golden_diff": "diff --git a/app/api/schema/sessions.py b/app/api/schema/sessions.py\n--- a/app/api/schema/sessions.py\n+++ b/app/api/schema/sessions.py\n@@ -1,6 +1,8 @@\n+from flask_rest_jsonapi.exceptions import ObjectNotFound\n from marshmallow import validates_schema, validate\n from marshmallow_jsonapi import fie... | 1,852 | 251 |
gh_patches_debug_14589 | rasdani/github-patches | git_diff | scrapy__scrapy-3379 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot use contracts with inherited callbacks
### Description
If you want to `scrapy check` a spider that has inherited methods, these methods' contracts will be ignored.
### Reproduce
```python
cla... | diff --git a/scrapy/contracts/__init__.py b/scrapy/contracts/__init__.py
--- a/scrapy/contracts/__init__.py
+++ b/scrapy/contracts/__init__.py
@@ -1,6 +1,7 @@
import sys
import re
from functools import wraps
+from inspect import getmembers
from unittest import TestCase
from scrapy.http import Request
@@ -17,7 +1... | {"golden_diff": "diff --git a/scrapy/contracts/__init__.py b/scrapy/contracts/__init__.py\n--- a/scrapy/contracts/__init__.py\n+++ b/scrapy/contracts/__init__.py\n@@ -1,6 +1,7 @@\n import sys\n import re\n from functools import wraps\n+from inspect import getmembers\n from unittest import TestCase\n \n from scrapy.http... | 1,916 | 175 |
gh_patches_debug_10522 | rasdani/github-patches | git_diff | bokeh__bokeh-4437 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't serialize timedelta column
If you have a data frame with a column of timedeltas, then make a ColumnDataSource out of it, the ColumnDataSource will be created:
``` python
In [9]: source.data['delta']
Ou... | diff --git a/bokeh/core/json_encoder.py b/bokeh/core/json_encoder.py
--- a/bokeh/core/json_encoder.py
+++ b/bokeh/core/json_encoder.py
@@ -42,6 +42,10 @@
# datetime is a subclass of date.
elif isinstance(obj, dt.datetime):
return time.mktime(obj.timetuple()) * 1000. + obj.microsecond / 10... | {"golden_diff": "diff --git a/bokeh/core/json_encoder.py b/bokeh/core/json_encoder.py\n--- a/bokeh/core/json_encoder.py\n+++ b/bokeh/core/json_encoder.py\n@@ -42,6 +42,10 @@\n # datetime is a subclass of date.\n elif isinstance(obj, dt.datetime):\n return time.mktime(obj.timetuple()) * 1000.... | 1,416 | 170 |
gh_patches_debug_629 | rasdani/github-patches | git_diff | zulip__zulip-8684 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
lint rules: Prevent `return undefined;`
We should sweep the code to replace `return undefined;` with `return;`, and then make a lint rule for it, either via eslint (if they support that) or by making a custom... | diff --git a/version.py b/version.py
--- a/version.py
+++ b/version.py
@@ -8,4 +8,4 @@
# Typically, adding a dependency only requires a minor version bump, and
# removing a dependency requires a major version bump.
-PROVISION_VERSION = '15.9'
+PROVISION_VERSION = '15.10'
| {"golden_diff": "diff --git a/version.py b/version.py\n--- a/version.py\n+++ b/version.py\n@@ -8,4 +8,4 @@\n # Typically, adding a dependency only requires a minor version bump, and\n # removing a dependency requires a major version bump.\n \n-PROVISION_VERSION = '15.9'\n+PROVISION_VERSION = '15.10'\n", "issue": "lint ... | 424 | 79 |
gh_patches_debug_3601 | rasdani/github-patches | git_diff | cornellius-gp__gpytorch-1647 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Slow convergence of MultiTask regressor and unreliable results.
Hello everyone,
Currently I am trying to learn a model to predict multiple real-valued properties of a cellular image. I have a baseline that... | diff --git a/gpytorch/mlls/exact_marginal_log_likelihood.py b/gpytorch/mlls/exact_marginal_log_likelihood.py
--- a/gpytorch/mlls/exact_marginal_log_likelihood.py
+++ b/gpytorch/mlls/exact_marginal_log_likelihood.py
@@ -63,7 +63,7 @@
res = self._add_other_terms(res, params)
# Scale by the amount of d... | {"golden_diff": "diff --git a/gpytorch/mlls/exact_marginal_log_likelihood.py b/gpytorch/mlls/exact_marginal_log_likelihood.py\n--- a/gpytorch/mlls/exact_marginal_log_likelihood.py\n+++ b/gpytorch/mlls/exact_marginal_log_likelihood.py\n@@ -63,7 +63,7 @@\n res = self._add_other_terms(res, params)\n \n # S... | 1,895 | 149 |
gh_patches_debug_21806 | rasdani/github-patches | git_diff | psychopy__psychopy-4624 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
404 errors on some of the page in the HELP menus
Version used
- psychopy: 2021.2.3
https://www.psychopy.org/builder/builder.html
https://www.psychopy.org/api/api.html
--- END ISSUE ---
Below are some c... | diff --git a/psychopy/app/urls.py b/psychopy/app/urls.py
--- a/psychopy/app/urls.py
+++ b/psychopy/app/urls.py
@@ -6,7 +6,7 @@
urls = dict()
# links based on string names
-urls['builder'] = "https://www.psychopy.org/builder/builder.html"
+urls['builder'] = "https://www.psychopy.org/builder"
urls['builder.loops'] =... | {"golden_diff": "diff --git a/psychopy/app/urls.py b/psychopy/app/urls.py\n--- a/psychopy/app/urls.py\n+++ b/psychopy/app/urls.py\n@@ -6,7 +6,7 @@\n urls = dict()\n \n # links based on string names\n-urls['builder'] = \"https://www.psychopy.org/builder/builder.html\"\n+urls['builder'] = \"https://www.psychopy.org/build... | 739 | 285 |
gh_patches_debug_43307 | rasdani/github-patches | git_diff | crytic__slither-447 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add "now" to the timestamp detector
https://github.com/crytic/slither/blob/7cb6cf4870036f780088fa7dfec83ae3220322e2/slither/detectors/operations/block_timestamp.py#L39-L44
This could also warns about the u... | diff --git a/slither/detectors/operations/block_timestamp.py b/slither/detectors/operations/block_timestamp.py
--- a/slither/detectors/operations/block_timestamp.py
+++ b/slither/detectors/operations/block_timestamp.py
@@ -2,15 +2,51 @@
Module detecting dangerous use of block.timestamp
"""
-from slither.core.de... | {"golden_diff": "diff --git a/slither/detectors/operations/block_timestamp.py b/slither/detectors/operations/block_timestamp.py\n--- a/slither/detectors/operations/block_timestamp.py\n+++ b/slither/detectors/operations/block_timestamp.py\n@@ -2,15 +2,51 @@\n Module detecting dangerous use of block.timestamp\n \n \"... | 1,093 | 979 |
gh_patches_debug_38581 | rasdani/github-patches | git_diff | kartoza__prj.app-217 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Crash on listing current sponsors
When opening the sponsors view (with some sponsors and sponsor periods created) we get a crash.
http://changelog.inasafe.org/en/qgis/sponsor/list/
Sentry info:
http://sent... | diff --git a/django_project/changes/models/sponsorship_period.py b/django_project/changes/models/sponsorship_period.py
--- a/django_project/changes/models/sponsorship_period.py
+++ b/django_project/changes/models/sponsorship_period.py
@@ -1,15 +1,19 @@
-__author__ = 'rischan'
+# coding=utf-8
import string
import ra... | {"golden_diff": "diff --git a/django_project/changes/models/sponsorship_period.py b/django_project/changes/models/sponsorship_period.py\n--- a/django_project/changes/models/sponsorship_period.py\n+++ b/django_project/changes/models/sponsorship_period.py\n@@ -1,15 +1,19 @@\n-__author__ = 'rischan'\n+# coding=utf-8\n \n ... | 1,332 | 574 |
gh_patches_debug_29501 | rasdani/github-patches | git_diff | adap__flower-1347 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
sklearn-logreg-mnist example is outdated
### Describe the bug
The sklearn-logreg-mnist example is outdated and does not work with flower 1.0.0. I will make a pull request to fix this.
### Steps/Code to Repr... | diff --git a/examples/sklearn-logreg-mnist/client.py b/examples/sklearn-logreg-mnist/client.py
--- a/examples/sklearn-logreg-mnist/client.py
+++ b/examples/sklearn-logreg-mnist/client.py
@@ -27,7 +27,7 @@
# Define Flower client
class MnistClient(fl.client.NumPyClient):
- def get_parameters(self): # ... | {"golden_diff": "diff --git a/examples/sklearn-logreg-mnist/client.py b/examples/sklearn-logreg-mnist/client.py\n--- a/examples/sklearn-logreg-mnist/client.py\n+++ b/examples/sklearn-logreg-mnist/client.py\n@@ -27,7 +27,7 @@\n \n # Define Flower client\n class MnistClient(fl.client.NumPyClient):\n- def g... | 1,283 | 441 |
gh_patches_debug_13768 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-4915 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Export-Button Problem in Modul "Brainstorming (with map)" on Prod, Stage and Dev
**URL:** https://meinberlin-dev.liqd.net/dashboard/projects/multimodul-test-merkmalkategorie/basic/
**user:** initiator, admin... | diff --git a/meinberlin/apps/ideas/dashboard.py b/meinberlin/apps/ideas/dashboard.py
--- a/meinberlin/apps/ideas/dashboard.py
+++ b/meinberlin/apps/ideas/dashboard.py
@@ -15,7 +15,7 @@
def is_effective(self, module):
return (
- module.blueprint_type == "IC"
+ module.blueprint_type ... | {"golden_diff": "diff --git a/meinberlin/apps/ideas/dashboard.py b/meinberlin/apps/ideas/dashboard.py\n--- a/meinberlin/apps/ideas/dashboard.py\n+++ b/meinberlin/apps/ideas/dashboard.py\n@@ -15,7 +15,7 @@\n \n def is_effective(self, module):\n return (\n- module.blueprint_type == \"IC\"\n+ ... | 1,446 | 227 |
gh_patches_debug_52881 | rasdani/github-patches | git_diff | getsentry__sentry-55707 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to edit WHEN conditions from issue alert
### Environment
SaaS (https://sentry.io/)
### Steps to Reproduce
1. Create an issue alert with a few WHEN conditions
2. Save it
3. Go to the Alert details ... | diff --git a/src/sentry/mediators/project_rules/updater.py b/src/sentry/mediators/project_rules/updater.py
--- a/src/sentry/mediators/project_rules/updater.py
+++ b/src/sentry/mediators/project_rules/updater.py
@@ -60,8 +60,7 @@
self.rule.data["filter_match"] = self.filter_match
def _update_conditio... | {"golden_diff": "diff --git a/src/sentry/mediators/project_rules/updater.py b/src/sentry/mediators/project_rules/updater.py\n--- a/src/sentry/mediators/project_rules/updater.py\n+++ b/src/sentry/mediators/project_rules/updater.py\n@@ -60,8 +60,7 @@\n self.rule.data[\"filter_match\"] = self.filter_match\n \n... | 1,000 | 132 |
gh_patches_debug_4967 | rasdani/github-patches | git_diff | aws__aws-cli-1894 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
aws cloudformation create-change-set with 'template-url' broken
```
$ aws --region eu-west-1 cloudformation create-change-set --change-set-name test --stack-name autobuild --template-url https://s3-eu-west-1.... | diff --git a/awscli/paramfile.py b/awscli/paramfile.py
--- a/awscli/paramfile.py
+++ b/awscli/paramfile.py
@@ -29,6 +29,7 @@
'apigateway.put-integration.uri',
'cloudformation.create-stack.template-url',
'cloudformation.update-stack.template-url',
+ 'cloudformation.create-change-set.template-url',
... | {"golden_diff": "diff --git a/awscli/paramfile.py b/awscli/paramfile.py\n--- a/awscli/paramfile.py\n+++ b/awscli/paramfile.py\n@@ -29,6 +29,7 @@\n 'apigateway.put-integration.uri',\n 'cloudformation.create-stack.template-url',\n 'cloudformation.update-stack.template-url',\n+ 'cloudformation.create-change... | 1,881 | 107 |
gh_patches_debug_13410 | rasdani/github-patches | git_diff | plotly__plotly.py-958 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Not all dependecies are listed
Would it be possible to add pandas (and numpy) to the list of dependencies? They're both imported in various places but not listed. This occasionally causes problems for package... | diff --git a/plotly/figure_factory/__init__.py b/plotly/figure_factory/__init__.py
--- a/plotly/figure_factory/__init__.py
+++ b/plotly/figure_factory/__init__.py
@@ -1,5 +1,7 @@
from __future__ import absolute_import
+from plotly import optional_imports
+
# Require that numpy exists for figure_factory
import nump... | {"golden_diff": "diff --git a/plotly/figure_factory/__init__.py b/plotly/figure_factory/__init__.py\n--- a/plotly/figure_factory/__init__.py\n+++ b/plotly/figure_factory/__init__.py\n@@ -1,5 +1,7 @@\n from __future__ import absolute_import\n \n+from plotly import optional_imports\n+\n # Require that numpy exists for fi... | 697 | 205 |
gh_patches_debug_5509 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-788 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Install.py script assumes database to exist
## Description
The install.py script has a hard check on the hostname to check if we're using the docker created postgres container and only creates the databases ... | diff --git a/install.py b/install.py
--- a/install.py
+++ b/install.py
@@ -18,7 +18,7 @@
def install_on_db_with_key(database_key, skip_confirm):
- if DATABASES[database_key]["HOST"] == "db":
+ if DATABASES[database_key]["HOST"] == "mathesar_db":
# if we're going to install on the docker-created Post... | {"golden_diff": "diff --git a/install.py b/install.py\n--- a/install.py\n+++ b/install.py\n@@ -18,7 +18,7 @@\n \n \n def install_on_db_with_key(database_key, skip_confirm):\n- if DATABASES[database_key][\"HOST\"] == \"db\":\n+ if DATABASES[database_key][\"HOST\"] == \"mathesar_db\":\n # if we're going to ... | 1,054 | 114 |
gh_patches_debug_1109 | rasdani/github-patches | git_diff | flairNLP__flair-435 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot install allennlp due to matplotlib dependency conflict
Hello, thanks for the great package. I want to play with ELMoEmbeddings, which requires package allennlp, not installed by default with Flair. How... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
'gensim>=3.4.0',
'tqdm>=4.26.0',
'segtok>=1.5.7',
- 'matplotlib>=3.0.0',
+ 'matplotlib>=2.2.3',
'mpld3>=0.3',
'sklearn',
'sqlitedict>=1.6.0',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -16,7 +16,7 @@\n 'gensim>=3.4.0',\n 'tqdm>=4.26.0',\n 'segtok>=1.5.7',\n- 'matplotlib>=3.0.0',\n+ 'matplotlib>=2.2.3',\n 'mpld3>=0.3',\n 'sklearn',\n 'sqlitedict>=1.6.0',\n... | 689 | 117 |
gh_patches_debug_4937 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-621 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in b3 propagation
When configuring b3 propagation, if the parent of a Span is an instance of a SpanContext, the following error occurs:
`'SpanContext' object has no attribute 'context'`
--- END ISSU... | diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py
--- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py
@@ -137,7... | {"golden_diff": "diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py\n--- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_format.py\n+++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/propagation/b3_... | 1,908 | 162 |
gh_patches_debug_17371 | rasdani/github-patches | git_diff | translate__pootle-4635 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Put `Review suggestions` action button before others
Let's change order of action buttons and put `Review suggestions` before `Needs translation` to encourage going through suggestion backlog.
--- END ISSUE... | diff --git a/pootle/core/browser.py b/pootle/core/browser.py
--- a/pootle/core/browser.py
+++ b/pootle/core/browser.py
@@ -50,9 +50,9 @@
'display_name': _("Last updated"),
},
{
- 'id': 'need-translation',
+ 'id': 'critical',
'class': 'stats-number sorttable_numeric when-loaded'... | {"golden_diff": "diff --git a/pootle/core/browser.py b/pootle/core/browser.py\n--- a/pootle/core/browser.py\n+++ b/pootle/core/browser.py\n@@ -50,9 +50,9 @@\n 'display_name': _(\"Last updated\"),\n },\n {\n- 'id': 'need-translation',\n+ 'id': 'critical',\n 'class': 'stats-number so... | 1,717 | 208 |
gh_patches_debug_23732 | rasdani/github-patches | git_diff | scrapy__scrapy-4814 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Test the upcoming pip dependency resolver in CI
From pypi-announce@python.org, about pip 20.2:
> NOTICE: This release includes the beta of the next-generation dependency resolver. It is significantly stric... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,6 @@
'cssselect>=0.9.1',
'itemloaders>=1.0.1',
'parsel>=1.5.0',
- 'PyDispatcher>=2.0.5',
'pyOpenSSL>=16.2.0',
'queuelib>=1.4.2',
'service_identity>=16.0.0',
@@ -34,11 +33,12 @@
'itemadapter>=0.1.0',
]
ext... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -24,7 +24,6 @@\n 'cssselect>=0.9.1',\n 'itemloaders>=1.0.1',\n 'parsel>=1.5.0',\n- 'PyDispatcher>=2.0.5',\n 'pyOpenSSL>=16.2.0',\n 'queuelib>=1.4.2',\n 'service_identity>=16.0.0',\n@@ -34,11 +33,12 @@\n ... | 1,504 | 345 |
gh_patches_debug_5803 | rasdani/github-patches | git_diff | pre-commit__pre-commit-986 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error when building RPM
When building RPM for Fedora i got this:
`*** ERROR: ambiguous python shebang in /usr/lib/python3.7/site-packages/pre_commit/resources/hook-tmpl: #!/usr/bin/env python. Change it to... | diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py
--- a/pre_commit/commands/install_uninstall.py
+++ b/pre_commit/commands/install_uninstall.py
@@ -107,7 +107,7 @@
before, rest = contents.split(TEMPLATE_START)
to_template, after = rest.split(TEMPLATE_END)... | {"golden_diff": "diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py\n--- a/pre_commit/commands/install_uninstall.py\n+++ b/pre_commit/commands/install_uninstall.py\n@@ -107,7 +107,7 @@\n before, rest = contents.split(TEMPLATE_START)\n to_template, after = re... | 1,921 | 134 |
gh_patches_debug_42533 | rasdani/github-patches | git_diff | dmlc__dgl-5914 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
On Disk Node & Edge feature & file loader
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `python/dgl/graph... | diff --git a/python/dgl/graphbolt/feature_store.py b/python/dgl/graphbolt/feature_store.py
--- a/python/dgl/graphbolt/feature_store.py
+++ b/python/dgl/graphbolt/feature_store.py
@@ -49,18 +49,20 @@
raise NotImplementedError
-class InMemoryFeatureStore(FeatureStore):
- r"""In-memory key-value feature st... | {"golden_diff": "diff --git a/python/dgl/graphbolt/feature_store.py b/python/dgl/graphbolt/feature_store.py\n--- a/python/dgl/graphbolt/feature_store.py\n+++ b/python/dgl/graphbolt/feature_store.py\n@@ -49,18 +49,20 @@\n raise NotImplementedError\n \n \n-class InMemoryFeatureStore(FeatureStore):\n- r\"\"\"In... | 1,922 | 922 |
gh_patches_debug_40293 | rasdani/github-patches | git_diff | beetbox__beets-1295 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
info: Select specific fields
Right now beet info spews all tags, but it should have an option for pulling a single key/value, like so:
> $ beet info -k acoustid_id "05 Le Freak.aiff"
> 616e1881-cb7e-4d9f-998... | diff --git a/beetsplug/info.py b/beetsplug/info.py
--- a/beetsplug/info.py
+++ b/beetsplug/info.py
@@ -19,6 +19,7 @@
unicode_literals)
import os
+import re
from beets.plugins import BeetsPlugin
from beets import ui
@@ -77,7 +78,7 @@
def print_data(data):
- path = data.pop('path')... | {"golden_diff": "diff --git a/beetsplug/info.py b/beetsplug/info.py\n--- a/beetsplug/info.py\n+++ b/beetsplug/info.py\n@@ -19,6 +19,7 @@\n unicode_literals)\n \n import os\n+import re\n \n from beets.plugins import BeetsPlugin\n from beets import ui\n@@ -77,7 +78,7 @@\n \n \n def print_data(data... | 1,831 | 702 |
gh_patches_debug_32468 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-1102 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pizza Ranch
Spider #29 is not collecting all locations, it's only capturing the 1st page on each state list.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of thes... | diff --git a/locations/spiders/pizzaranch.py b/locations/spiders/pizzaranch.py
--- a/locations/spiders/pizzaranch.py
+++ b/locations/spiders/pizzaranch.py
@@ -51,6 +51,7 @@
map_data = response.xpath('normalize-space(//script[@id="js-map-config-dir-map-nap-map"]/text())').extract_first()
map_json = jso... | {"golden_diff": "diff --git a/locations/spiders/pizzaranch.py b/locations/spiders/pizzaranch.py\n--- a/locations/spiders/pizzaranch.py\n+++ b/locations/spiders/pizzaranch.py\n@@ -51,6 +51,7 @@\n map_data = response.xpath('normalize-space(//script[@id=\"js-map-config-dir-map-nap-map\"]/text())').extract_first()\... | 1,283 | 386 |
gh_patches_debug_34766 | rasdani/github-patches | git_diff | bokeh__bokeh-9461 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bokeh.palettes refguide page header mis-renders
Add lots of space, changes font size, for some reason (just this page)
https://docs.bokeh.org/en/latest/docs/reference/palettes.html
--- END ISSUE ---
Be... | diff --git a/bokeh/sphinxext/bokeh_palette_group.py b/bokeh/sphinxext/bokeh_palette_group.py
--- a/bokeh/sphinxext/bokeh_palette_group.py
+++ b/bokeh/sphinxext/bokeh_palette_group.py
@@ -21,6 +21,11 @@
.. bokeh-palette-group:: mpl
+.. note::
+ This extension assumes both Bootstrap and JQuery are present (whi... | {"golden_diff": "diff --git a/bokeh/sphinxext/bokeh_palette_group.py b/bokeh/sphinxext/bokeh_palette_group.py\n--- a/bokeh/sphinxext/bokeh_palette_group.py\n+++ b/bokeh/sphinxext/bokeh_palette_group.py\n@@ -21,6 +21,11 @@\n \n .. bokeh-palette-group:: mpl\n \n+.. note::\n+ This extension assumes both Bootstrap an... | 1,319 | 459 |
gh_patches_debug_5768 | rasdani/github-patches | git_diff | LMFDB__lmfdb-5112 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Problem with zeta zeroes download script
The python script at https://github.com/LMFDB/lmfdb/blob/master/lmfdb/zeros/zeta/platt_zeros.py created by David Platt to parse downloaded zeta zeros files seems to no... | diff --git a/lmfdb/zeros/zeta/zetazeros.py b/lmfdb/zeros/zeta/zetazeros.py
--- a/lmfdb/zeros/zeta/zetazeros.py
+++ b/lmfdb/zeros/zeta/zetazeros.py
@@ -21,7 +21,7 @@
return [('L-function', url_for("l_functions.l_function_riemann_page"))]
def downloads():
- return [('Bulk download', "https://beta.lmfdb.org/dat... | {"golden_diff": "diff --git a/lmfdb/zeros/zeta/zetazeros.py b/lmfdb/zeros/zeta/zetazeros.py\n--- a/lmfdb/zeros/zeta/zetazeros.py\n+++ b/lmfdb/zeros/zeta/zetazeros.py\n@@ -21,7 +21,7 @@\n return [('L-function', url_for(\"l_functions.l_function_riemann_page\"))]\n \n def downloads():\n- return [('Bulk download', \... | 1,900 | 166 |
gh_patches_debug_10670 | rasdani/github-patches | git_diff | freedomofpress__securedrop-4346 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update SQLAlchemy to 1.3.0
## Description
Multiple vulnerabilities were reported in SQLAlchemy <1.3.0:
- CVE-2019-7164 (moderate) : SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection... | diff --git a/install_files/ansible-base/callback_plugins/ansible_version_check.py b/install_files/ansible-base/callback_plugins/ansible_version_check.py
--- a/install_files/ansible-base/callback_plugins/ansible_version_check.py
+++ b/install_files/ansible-base/callback_plugins/ansible_version_check.py
@@ -21,7 +21,7 @@... | {"golden_diff": "diff --git a/install_files/ansible-base/callback_plugins/ansible_version_check.py b/install_files/ansible-base/callback_plugins/ansible_version_check.py\n--- a/install_files/ansible-base/callback_plugins/ansible_version_check.py\n+++ b/install_files/ansible-base/callback_plugins/ansible_version_check.p... | 654 | 176 |
gh_patches_debug_29546 | rasdani/github-patches | git_diff | Mailu__Mailu-1014 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Should `antispam` be hardcoded?
I'm in a middle of setting up my own mailu instances, however I'm using namespaced container names (i.e. `mailu-admin`, `mailu-front` etc.). Everything works pretty well so far... | diff --git a/core/dovecot/start.py b/core/dovecot/start.py
--- a/core/dovecot/start.py
+++ b/core/dovecot/start.py
@@ -24,6 +24,7 @@
os.environ["FRONT_ADDRESS"] = system.resolve_address(os.environ.get("HOST_FRONT", "front"))
os.environ["REDIS_ADDRESS"] = system.resolve_address(os.environ.get("HOST_REDIS", "redis"))
... | {"golden_diff": "diff --git a/core/dovecot/start.py b/core/dovecot/start.py\n--- a/core/dovecot/start.py\n+++ b/core/dovecot/start.py\n@@ -24,6 +24,7 @@\n os.environ[\"FRONT_ADDRESS\"] = system.resolve_address(os.environ.get(\"HOST_FRONT\", \"front\"))\n os.environ[\"REDIS_ADDRESS\"] = system.resolve_address(os.environ... | 1,208 | 401 |
gh_patches_debug_15349 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-4248 | 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/applications/Chat/coati/models/base/actor.py b/applications/Chat/coati/models/base/actor.py
--- a/applications/Chat/coati/models/base/actor.py
+++ b/applications/Chat/coati/models/base/actor.py
@@ -21,16 +21,13 @@
self.model = model
self.convert_to_lora()
- def forward(self,
- ... | {"golden_diff": "diff --git a/applications/Chat/coati/models/base/actor.py b/applications/Chat/coati/models/base/actor.py\n--- a/applications/Chat/coati/models/base/actor.py\n+++ b/applications/Chat/coati/models/base/actor.py\n@@ -21,16 +21,13 @@\n self.model = model\n self.convert_to_lora()\n \n- de... | 590 | 255 |
gh_patches_debug_31496 | rasdani/github-patches | git_diff | cisagov__manage.get.gov-247 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Save a new domain application on form submission
_Outcome_: On "save" press, save any form changes to the Application model.
Relies on #221
--- END ISSUE ---
Below are some code segments, each from a rel... | diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -3,11 +3,14 @@
import logging
from django import forms
+from django.shortcuts import redirect
from django.contrib.a... | {"golden_diff": "diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py\n--- a/src/registrar/forms/application_wizard.py\n+++ b/src/registrar/forms/application_wizard.py\n@@ -3,11 +3,14 @@\n import logging\n \n from django import forms\n+from django.shortcuts import redirect\... | 1,298 | 482 |
gh_patches_debug_5444 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-1726 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`dacite` library doesn't compatible after 0.69.0 strawberry-graphql. (unhasable type 'StrawberryOptional' problem)
I have a regression issue with StrawberryOptional (breaking changes in 0.69.0)
When I use d... | diff --git a/strawberry/type.py b/strawberry/type.py
--- a/strawberry/type.py
+++ b/strawberry/type.py
@@ -51,6 +51,9 @@
def __init__(self, of_type: Union[StrawberryType, type]):
self.of_type = of_type
+ def __hash__(self) -> int:
+ return hash((self.__class__, self.of_type))
+
def __eq__... | {"golden_diff": "diff --git a/strawberry/type.py b/strawberry/type.py\n--- a/strawberry/type.py\n+++ b/strawberry/type.py\n@@ -51,6 +51,9 @@\n def __init__(self, of_type: Union[StrawberryType, type]):\n self.of_type = of_type\n \n+ def __hash__(self) -> int:\n+ return hash((self.__class__, self.of... | 1,791 | 130 |
gh_patches_debug_20332 | rasdani/github-patches | git_diff | TheAlgorithms__Python-2467 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Python type hints and doctests to other/two_sum.py
@tonydelanuez Would you be willing to add Python type hints and doctests to [`other/two_sum.py`](../blob/master/other/two_sum.py)? The function comments... | diff --git a/other/two_sum.py b/other/two_sum.py
--- a/other/two_sum.py
+++ b/other/two_sum.py
@@ -11,21 +11,37 @@
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].
"""
+from __future__ import annotations
-def twoSum(nums, target):
+def two_sum(nums: list[int], target: int) -> list[int]:
"""
- :type ... | {"golden_diff": "diff --git a/other/two_sum.py b/other/two_sum.py\n--- a/other/two_sum.py\n+++ b/other/two_sum.py\n@@ -11,21 +11,37 @@\n Because nums[0] + nums[1] = 2 + 7 = 9,\n return [0, 1].\n \"\"\"\n+from __future__ import annotations\n \n \n-def twoSum(nums, target):\n+def two_sum(nums: list[int], target: int) -> ... | 598 | 490 |
gh_patches_debug_34623 | rasdani/github-patches | git_diff | chainer__chainer-505 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add a function for summation along axes
`sum` function reduces all elements, while there are many cases that I want to take a summation over some axes. This is analogous to `numpy.sum` with the `axis` argumen... | diff --git a/chainer/functions/math/sum.py b/chainer/functions/math/sum.py
--- a/chainer/functions/math/sum.py
+++ b/chainer/functions/math/sum.py
@@ -9,7 +9,17 @@
"""Sum of array elements over a given axis."""
def __init__(self, axis=None):
- self.axis = axis
+ if axis is None:
+ s... | {"golden_diff": "diff --git a/chainer/functions/math/sum.py b/chainer/functions/math/sum.py\n--- a/chainer/functions/math/sum.py\n+++ b/chainer/functions/math/sum.py\n@@ -9,7 +9,17 @@\n \"\"\"Sum of array elements over a given axis.\"\"\"\n \n def __init__(self, axis=None):\n- self.axis = axis\n+ ... | 751 | 555 |
gh_patches_debug_3104 | rasdani/github-patches | git_diff | certbot__certbot-2004 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
don't add includeSubDomains for Strict-Transport-Security header
Hi,
I think the letsencrypt client shouldn’t add `includeSubDomains` to the Strict-Transport-Security header by default.
If you let the letse... | diff --git a/letsencrypt-apache/letsencrypt_apache/constants.py b/letsencrypt-apache/letsencrypt_apache/constants.py
--- a/letsencrypt-apache/letsencrypt_apache/constants.py
+++ b/letsencrypt-apache/letsencrypt_apache/constants.py
@@ -33,7 +33,7 @@
https vhost"""
HSTS_ARGS = ["always", "set", "Strict-Transport-... | {"golden_diff": "diff --git a/letsencrypt-apache/letsencrypt_apache/constants.py b/letsencrypt-apache/letsencrypt_apache/constants.py\n--- a/letsencrypt-apache/letsencrypt_apache/constants.py\n+++ b/letsencrypt-apache/letsencrypt_apache/constants.py\n@@ -33,7 +33,7 @@\n https vhost\"\"\"\n \n HSTS_ARGS = [\"always\... | 964 | 157 |
gh_patches_debug_41488 | rasdani/github-patches | git_diff | chainer__chainer-5029 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add requirements check for ideep4py
Add requirements check for iDeep4py as we do in cupy.
Refs #4933
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files ma... | diff --git a/chainer/_runtime_info.py b/chainer/_runtime_info.py
--- a/chainer/_runtime_info.py
+++ b/chainer/_runtime_info.py
@@ -6,6 +6,7 @@
import chainer
from chainer.backends import cuda
+from chainer.backends import intel64
class _RuntimeInfo(object):
@@ -13,6 +14,7 @@
chainer_version = None
nu... | {"golden_diff": "diff --git a/chainer/_runtime_info.py b/chainer/_runtime_info.py\n--- a/chainer/_runtime_info.py\n+++ b/chainer/_runtime_info.py\n@@ -6,6 +6,7 @@\n \n import chainer\n from chainer.backends import cuda\n+from chainer.backends import intel64\n \n \n class _RuntimeInfo(object):\n@@ -13,6 +14,7 @@\n c... | 1,988 | 812 |
gh_patches_debug_21326 | rasdani/github-patches | git_diff | hylang__hy-1266 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Single quote crashes hy2py
## x.hy
```
'
```
## `hy2py x.hy`
```
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "hy/cmdline.py", line 406, in hy2py_main
if... | diff --git a/hy/lex/__init__.py b/hy/lex/__init__.py
--- a/hy/lex/__init__.py
+++ b/hy/lex/__init__.py
@@ -34,7 +34,7 @@
except LexingError as e:
pos = e.getsourcepos()
raise LexException("Could not identify the next token.",
- pos.lineno, pos.colno)
+ ... | {"golden_diff": "diff --git a/hy/lex/__init__.py b/hy/lex/__init__.py\n--- a/hy/lex/__init__.py\n+++ b/hy/lex/__init__.py\n@@ -34,7 +34,7 @@\n except LexingError as e:\n pos = e.getsourcepos()\n raise LexException(\"Could not identify the next token.\",\n- pos.lineno, pos.c... | 1,593 | 296 |
gh_patches_debug_25452 | rasdani/github-patches | git_diff | encode__httpx-566 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
scripts as a single top-level point of project automation.
Generally across the `encode` projects I've been using [GitHub's "Scripts to Rule Them All" pattern](https://github.blog/2015-06-30-scripts-to-rule-t... | diff --git a/noxfile.py b/noxfile.py
deleted file mode 100644
--- a/noxfile.py
+++ /dev/null
@@ -1,55 +0,0 @@
-import nox
-
-nox.options.stop_on_first_error = True
-nox.options.reuse_existing_virtualenvs = True
-nox.options.keywords = "not serve"
-
-source_files = ("httpx", "tools", "tests", "setup.py", "noxfile.py")
-... | {"golden_diff": "diff --git a/noxfile.py b/noxfile.py\ndeleted file mode 100644\n--- a/noxfile.py\n+++ /dev/null\n@@ -1,55 +0,0 @@\n-import nox\n-\n-nox.options.stop_on_first_error = True\n-nox.options.reuse_existing_virtualenvs = True\n-nox.options.keywords = \"not serve\"\n-\n-source_files = (\"httpx\", \"tools\", \"... | 1,074 | 538 |
gh_patches_debug_1770 | rasdani/github-patches | git_diff | weecology__retriever-677 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Download only fails for `gwdd`
```
ethan@gandalf:~$ retriever download gwdd
=> Installing Zanne et al. Global wood density database.
Creating database GWDD...
Couldn't create database ('NoneType' object has n... | diff --git a/scripts/gwdd.py b/scripts/gwdd.py
--- a/scripts/gwdd.py
+++ b/scripts/gwdd.py
@@ -117,7 +117,8 @@
self.engine.table = table
self.engine.create_table()
self.engine.add_to_table(data)
-
+ self.engine.find_file("GlobalWoodDensityDatabase.xls")
+
return self.e... | {"golden_diff": "diff --git a/scripts/gwdd.py b/scripts/gwdd.py\n--- a/scripts/gwdd.py\n+++ b/scripts/gwdd.py\n@@ -117,7 +117,8 @@\n self.engine.table = table\n self.engine.create_table()\n self.engine.add_to_table(data)\n- \n+ self.engine.find_file(\"GlobalWoodDensityDatabase.xls\... | 2,001 | 92 |
gh_patches_debug_2584 | rasdani/github-patches | git_diff | kivy__python-for-android-2180 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issues introduced by PR #2113 (SDL2)
As said on Discord #dev channel yesterday, PR #2113 introduces a lot of blocking issues.
These are the results of the tests done by me, @AndreMiras and @opacam :
- ... | diff --git a/pythonforandroid/recipes/sdl2/__init__.py b/pythonforandroid/recipes/sdl2/__init__.py
--- a/pythonforandroid/recipes/sdl2/__init__.py
+++ b/pythonforandroid/recipes/sdl2/__init__.py
@@ -4,9 +4,9 @@
class LibSDL2Recipe(BootstrapNDKRecipe):
- version = "2.0.10"
- url = "https://www.libsdl.org/rele... | {"golden_diff": "diff --git a/pythonforandroid/recipes/sdl2/__init__.py b/pythonforandroid/recipes/sdl2/__init__.py\n--- a/pythonforandroid/recipes/sdl2/__init__.py\n+++ b/pythonforandroid/recipes/sdl2/__init__.py\n@@ -4,9 +4,9 @@\n \n \n class LibSDL2Recipe(BootstrapNDKRecipe):\n- version = \"2.0.10\"\n- url = \... | 873 | 227 |
gh_patches_debug_1952 | rasdani/github-patches | git_diff | docker__docker-py-1709 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
.dockerignore does not work with patterns begin with slash
docker version:
```
docker -v
Docker version 17.03.1-ce, build c6d412e
```
reproduce:
```
mkdir app
cd app
mkdir foo
touch foo/bar
ech... | diff --git a/docker/utils/build.py b/docker/utils/build.py
--- a/docker/utils/build.py
+++ b/docker/utils/build.py
@@ -26,6 +26,7 @@
if dockerfile is None:
dockerfile = 'Dockerfile'
+ patterns = [p.lstrip('/') for p in patterns]
exceptions = [p for p in patterns if p.startswith('!')]
incl... | {"golden_diff": "diff --git a/docker/utils/build.py b/docker/utils/build.py\n--- a/docker/utils/build.py\n+++ b/docker/utils/build.py\n@@ -26,6 +26,7 @@\n if dockerfile is None:\n dockerfile = 'Dockerfile'\n \n+ patterns = [p.lstrip('/') for p in patterns]\n exceptions = [p for p in patterns if p.sta... | 1,933 | 101 |
gh_patches_debug_16086 | rasdani/github-patches | git_diff | nvaccess__nvda-13382 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Recent alpha versions crash Notepad++ versions 8.2.x and below
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, i... | diff --git a/source/appModules/notepadPlusPlus.py b/source/appModules/notepadPlusPlus.py
--- a/source/appModules/notepadPlusPlus.py
+++ b/source/appModules/notepadPlusPlus.py
@@ -46,7 +46,12 @@
def _get_TextInfo(self):
if self.appModule.is64BitProcess:
appVerMajor, appVerMinor, *__ = self.appModule.productVe... | {"golden_diff": "diff --git a/source/appModules/notepadPlusPlus.py b/source/appModules/notepadPlusPlus.py\n--- a/source/appModules/notepadPlusPlus.py\n+++ b/source/appModules/notepadPlusPlus.py\n@@ -46,7 +46,12 @@\n \tdef _get_TextInfo(self):\r\n \t\tif self.appModule.is64BitProcess:\r\n \t\t\tappVerMajor, appVerMinor,... | 1,561 | 306 |
gh_patches_debug_31171 | rasdani/github-patches | git_diff | spack__spack-36657 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Invalid flag with apple m2 cpu and apple-clang (clang-1400.0.29.202)
On a system as described in the title, the following flag in not recognized and causes compilation failures:
https://github.com/spack/sp... | diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py
--- a/lib/spack/external/__init__.py
+++ b/lib/spack/external/__init__.py
@@ -18,7 +18,7 @@
* Homepage: https://pypi.python.org/pypi/archspec
* Usage: Labeling, comparison and detection of microarchitectures
-* Version: 0.2.0 (commit e44ba... | {"golden_diff": "diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py\n--- a/lib/spack/external/__init__.py\n+++ b/lib/spack/external/__init__.py\n@@ -18,7 +18,7 @@\n \n * Homepage: https://pypi.python.org/pypi/archspec\n * Usage: Labeling, comparison and detection of microarchitectures\n-* Vers... | 1,835 | 687 |
gh_patches_debug_38047 | rasdani/github-patches | git_diff | getsentry__sentry-3216 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Better avatar uploads caching
Right now, we cache resizes on the server, but these responses are unable to be cached by any browser or proxy.
To fix this we need to:
- [ ] Send a proper `Cache-Control` heade... | diff --git a/src/sentry/api/endpoints/useravatar.py b/src/sentry/api/endpoints/useravatar.py
--- a/src/sentry/api/endpoints/useravatar.py
+++ b/src/sentry/api/endpoints/useravatar.py
@@ -1,5 +1,7 @@
from __future__ import absolute_import
+from uuid import uuid4
+
from PIL import Image
from django.conf import set... | {"golden_diff": "diff --git a/src/sentry/api/endpoints/useravatar.py b/src/sentry/api/endpoints/useravatar.py\n--- a/src/sentry/api/endpoints/useravatar.py\n+++ b/src/sentry/api/endpoints/useravatar.py\n@@ -1,5 +1,7 @@\n from __future__ import absolute_import\n \n+from uuid import uuid4\n+\n from PIL import Image\n \n ... | 1,970 | 599 |
gh_patches_debug_3407 | rasdani/github-patches | git_diff | vllm-project__vllm-1855 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
benchmark_latency.py will hang when --batchsize=1 and --n=2
benchmark_latency.py will hang if setting --batchsize=1 and --n=2or4or8.
should max_num_seqs been set as args.batch_size * args.n ?
https://githu... | diff --git a/benchmarks/benchmark_latency.py b/benchmarks/benchmark_latency.py
--- a/benchmarks/benchmark_latency.py
+++ b/benchmarks/benchmark_latency.py
@@ -19,7 +19,6 @@
tokenizer=args.tokenizer,
quantization=args.quantization,
tensor_parallel_size=args.tensor_parallel_size,
- max_n... | {"golden_diff": "diff --git a/benchmarks/benchmark_latency.py b/benchmarks/benchmark_latency.py\n--- a/benchmarks/benchmark_latency.py\n+++ b/benchmarks/benchmark_latency.py\n@@ -19,7 +19,6 @@\n tokenizer=args.tokenizer,\n quantization=args.quantization,\n tensor_parallel_size=args.tensor_parall... | 1,439 | 100 |
gh_patches_debug_2566 | rasdani/github-patches | git_diff | getpelican__pelican-2632 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Markdown as an (optional) dependency
Since its inception, this project has taken the collective position that since not everyone uses Markdown, the `markdown` package should not be a dependency of the pro... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -61,6 +61,9 @@
for name in names],
},
install_requires=requires,
+ extras_require={
+ 'Markdown': ['markdown~=3.1.1']
+ },
entry_points=entry_points,
classifiers=[
'Development Status :... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -61,6 +61,9 @@\n for name in names],\n },\n install_requires=requires,\n+ extras_require={\n+ 'Markdown': ['markdown~=3.1.1']\n+ },\n entry_points=entry_points,\n classifiers=[\n ... | 1,393 | 90 |
gh_patches_debug_26678 | rasdani/github-patches | git_diff | archlinux__archinstall-2071 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Localizations revert to defaults on entry of "Locales" menu
If localizations are changed from the defaults they will revert back to the defaults upon entry of the _Locales_ menu.
--- END ISSUE ---
Below are... | diff --git a/archinstall/lib/locale/locale_menu.py b/archinstall/lib/locale/locale_menu.py
--- a/archinstall/lib/locale/locale_menu.py
+++ b/archinstall/lib/locale/locale_menu.py
@@ -52,9 +52,9 @@
def __init__(
self,
data_store: Dict[str, Any],
- locele_conf: LocaleConfiguration
+ locale_conf: LocaleConfigura... | {"golden_diff": "diff --git a/archinstall/lib/locale/locale_menu.py b/archinstall/lib/locale/locale_menu.py\n--- a/archinstall/lib/locale/locale_menu.py\n+++ b/archinstall/lib/locale/locale_menu.py\n@@ -52,9 +52,9 @@\n \tdef __init__(\n \t\tself,\n \t\tdata_store: Dict[str, Any],\n-\t\tlocele_conf: LocaleConfiguration\... | 1,720 | 312 |
gh_patches_debug_93 | rasdani/github-patches | git_diff | statsmodels__statsmodels-1374 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
move graphics.tsa to tsa.graphics
Makes more sense to me to keep the tsa stuff under the tsa namespace. Might need to deprecate functions that aren't new.
--- END ISSUE ---
Below are some code segments, e... | diff --git a/statsmodels/tsa/api.py b/statsmodels/tsa/api.py
--- a/statsmodels/tsa/api.py
+++ b/statsmodels/tsa/api.py
@@ -11,3 +11,4 @@
import stattools
from .stattools import *
from .base import datetools
+from ..graphics import tsaplots as graphics
| {"golden_diff": "diff --git a/statsmodels/tsa/api.py b/statsmodels/tsa/api.py\n--- a/statsmodels/tsa/api.py\n+++ b/statsmodels/tsa/api.py\n@@ -11,3 +11,4 @@\n import stattools\n from .stattools import *\n from .base import datetools\n+from ..graphics import tsaplots as graphics\n", "issue": "move graphics.tsa to tsa.gr... | 427 | 77 |
gh_patches_debug_12989 | rasdani/github-patches | git_diff | bridgecrewio__checkov-1818 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CKV_AZURE_23 - Reports incorrect fail when using azurerm_mssql_server_extended_auditing_policy
Check: CKV_AZURE_23: "Ensure that 'Auditing' is set to 'On' for SQL servers"
FAILED for resource: azurer... | diff --git a/checkov/terraform/checks/resource/azure/SQLServerAuditingEnabled.py b/checkov/terraform/checks/resource/azure/SQLServerAuditingEnabled.py
deleted file mode 100644
--- a/checkov/terraform/checks/resource/azure/SQLServerAuditingEnabled.py
+++ /dev/null
@@ -1,21 +0,0 @@
-from checkov.common.models.enums impor... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/SQLServerAuditingEnabled.py b/checkov/terraform/checks/resource/azure/SQLServerAuditingEnabled.py\ndeleted file mode 100644\n--- a/checkov/terraform/checks/resource/azure/SQLServerAuditingEnabled.py\n+++ /dev/null\n@@ -1,21 +0,0 @@\n-from checkov.com... | 1,012 | 276 |
gh_patches_debug_33997 | rasdani/github-patches | git_diff | pytorch__ignite-1318 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve R2Score metric for DDP
## 🚀 Feature
Current implementation of `R2Score` metric is not compatible with ddp. The idea is to improve this metric to work in parallel.
Related to #1284
--- END ISSU... | diff --git a/ignite/contrib/metrics/regression/r2_score.py b/ignite/contrib/metrics/regression/r2_score.py
--- a/ignite/contrib/metrics/regression/r2_score.py
+++ b/ignite/contrib/metrics/regression/r2_score.py
@@ -1,7 +1,10 @@
+from typing import Callable, Union
+
import torch
from ignite.contrib.metrics.regressio... | {"golden_diff": "diff --git a/ignite/contrib/metrics/regression/r2_score.py b/ignite/contrib/metrics/regression/r2_score.py\n--- a/ignite/contrib/metrics/regression/r2_score.py\n+++ b/ignite/contrib/metrics/regression/r2_score.py\n@@ -1,7 +1,10 @@\n+from typing import Callable, Union\n+\n import torch\n \n from ignite.... | 816 | 672 |
gh_patches_debug_27900 | rasdani/github-patches | git_diff | conan-io__conan-center-index-1707 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[request] zstd/1.4.5
### Package Details
* Package Name/Version: **zstd/1.4.5**
* Changelog: **https://github.com/facebook/zstd/releases/tag/v1.4.5**
The above mentioned version is newly released b... | diff --git a/recipes/zstd/all/conanfile.py b/recipes/zstd/all/conanfile.py
--- a/recipes/zstd/all/conanfile.py
+++ b/recipes/zstd/all/conanfile.py
@@ -9,7 +9,7 @@
description = "Zstandard - Fast real-time compression algorithm"
topics = ("conan", "zstd", "compression", "algorithm", "decoder")
license = "... | {"golden_diff": "diff --git a/recipes/zstd/all/conanfile.py b/recipes/zstd/all/conanfile.py\n--- a/recipes/zstd/all/conanfile.py\n+++ b/recipes/zstd/all/conanfile.py\n@@ -9,7 +9,7 @@\n description = \"Zstandard - Fast real-time compression algorithm\"\n topics = (\"conan\", \"zstd\", \"compression\", \"algorith... | 913 | 339 |
gh_patches_debug_2664 | rasdani/github-patches | git_diff | opsdroid__opsdroid-1408 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Duplicated shell prompt
# Description
When I run the hello skill from the shell, I found duplicated shell prompt output. I think there's some issue with the shell connector.
## Steps to Reproduce
```... | diff --git a/opsdroid/connector/shell/__init__.py b/opsdroid/connector/shell/__init__.py
--- a/opsdroid/connector/shell/__init__.py
+++ b/opsdroid/connector/shell/__init__.py
@@ -125,7 +125,6 @@
_LOGGER.debug(_("Responding with: %s."), message.text)
self.clear_prompt()
print(message.text)
- ... | {"golden_diff": "diff --git a/opsdroid/connector/shell/__init__.py b/opsdroid/connector/shell/__init__.py\n--- a/opsdroid/connector/shell/__init__.py\n+++ b/opsdroid/connector/shell/__init__.py\n@@ -125,7 +125,6 @@\n _LOGGER.debug(_(\"Responding with: %s.\"), message.text)\n self.clear_prompt()\n ... | 1,604 | 119 |
gh_patches_debug_10776 | rasdani/github-patches | git_diff | marshmallow-code__webargs-123 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ValidationError causes HTTP/500 in Flask instead of HTTP/422 in Python 2
Here are the symptoms: http://stackoverflow.com/questions/37321835/flask-error-handler-not-able-to-handle-assertion-error/39624893#3962... | diff --git a/webargs/flaskparser.py b/webargs/flaskparser.py
--- a/webargs/flaskparser.py
+++ b/webargs/flaskparser.py
@@ -25,7 +25,7 @@
from webargs import core
-def abort(http_status_code, **kwargs):
+def abort(http_status_code, exc=None, **kwargs):
"""Raise a HTTPException for the given http_status_code. A... | {"golden_diff": "diff --git a/webargs/flaskparser.py b/webargs/flaskparser.py\n--- a/webargs/flaskparser.py\n+++ b/webargs/flaskparser.py\n@@ -25,7 +25,7 @@\n from webargs import core\n \n \n-def abort(http_status_code, **kwargs):\n+def abort(http_status_code, exc=None, **kwargs):\n \"\"\"Raise a HTTPException for ... | 1,694 | 145 |
gh_patches_debug_37547 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-3679 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Replace 'backoff' dependency with a local implementation
The 'backoff' dependency can be replaced with a few lines of code so I propose we remove it.
**Is your feature request related to a problem?**
Ther... | diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
--- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemet... | {"golden_diff": "diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py\n--- a/exporter/opentelemetry-exporter-otlp-proto-comm... | 1,858 | 800 |
gh_patches_debug_24134 | rasdani/github-patches | git_diff | meltano__meltano-6320 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`meltano select tap-gitlab tags "*"` fails on Windows
Example: https://gitlab.com/meltano/legacy-ci/meltano/-/jobs/2653845782
This occurs with Meltano built from `main`, i.e. `fb6ed89799eb341bea295350ea809... | diff --git a/src/meltano/cli/cli.py b/src/meltano/cli/cli.py
--- a/src/meltano/cli/cli.py
+++ b/src/meltano/cli/cli.py
@@ -1,6 +1,6 @@
import logging # noqa: D100
import sys
-import warnings # noqa: F401
+from typing import NoReturn
import click
@@ -13,7 +13,28 @@
logger = logging.getLogger(__name__)
-@cl... | {"golden_diff": "diff --git a/src/meltano/cli/cli.py b/src/meltano/cli/cli.py\n--- a/src/meltano/cli/cli.py\n+++ b/src/meltano/cli/cli.py\n@@ -1,6 +1,6 @@\n import logging # noqa: D100\n import sys\n-import warnings # noqa: F401\n+from typing import NoReturn\n \n import click\n \n@@ -13,7 +13,28 @@\n logger = logging... | 1,192 | 384 |
gh_patches_debug_30452 | rasdani/github-patches | git_diff | mozilla__kitsune-4541 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Importing ABC directly from collections has been deprecated and will be removed in Python 3.10
Use `collections` for Python 2 and `collections.abc` for Python 3.4+
https://github.com/mozilla/kitsune/blob/d... | diff --git a/kitsune/wiki/widgets.py b/kitsune/wiki/widgets.py
--- a/kitsune/wiki/widgets.py
+++ b/kitsune/wiki/widgets.py
@@ -1,4 +1,3 @@
-import collections
from django import forms
from django.template.loader import render_to_string
@@ -6,6 +5,11 @@
from kitsune.products.models import Topic
from kitsune.wiki.m... | {"golden_diff": "diff --git a/kitsune/wiki/widgets.py b/kitsune/wiki/widgets.py\n--- a/kitsune/wiki/widgets.py\n+++ b/kitsune/wiki/widgets.py\n@@ -1,4 +1,3 @@\n-import collections\n \n from django import forms\n from django.template.loader import render_to_string\n@@ -6,6 +5,11 @@\n from kitsune.products.models import ... | 880 | 306 |
gh_patches_debug_59577 | rasdani/github-patches | git_diff | sotetsuk__pgx-186 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pgx v 0.0.9 でimages フォルダがダウンロードされない.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
``... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -10,6 +10,8 @@
author_email="sotetsu.koyamada@gmail.com",
keywords="",
packages=find_packages(),
+ package_data={'': ['LICENSE', '*.svg']},
+ include_package_data=True,
install_requires=["jax", "flax", "svgwrite"],
classifi... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -10,6 +10,8 @@\n author_email=\"sotetsu.koyamada@gmail.com\",\n keywords=\"\",\n packages=find_packages(),\n+ package_data={'': ['LICENSE', '*.svg']},\n+ include_package_data=True,\n install_requires=[\"jax\", \"... | 419 | 104 |
gh_patches_debug_1857 | rasdani/github-patches | git_diff | readthedocs__readthedocs.org-4676 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve Intro and Getting Started documentation
I think the [introduction](https://docs.readthedocs.io/en/latest/) and [getting started guide](https://docs.readthedocs.io/en/latest/getting_started.html) could... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -71,7 +71,7 @@
gettext_compact = False
html_theme = 'sphinx_rtd_theme'
-# html_static_path = ['_static']
+html_static_path = ['_static']
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_logo = 'img/logo.svg'
html_the... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -71,7 +71,7 @@\n gettext_compact = False\n \n html_theme = 'sphinx_rtd_theme'\n-# html_static_path = ['_static']\n+html_static_path = ['_static']\n html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n html_logo... | 1,214 | 99 |
gh_patches_debug_21685 | rasdani/github-patches | git_diff | getsentry__sentry-1683 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing 'org_results' data in production but has some in staging
In file 'web/frontend/help_platform_base.py', method 'group_project_list' the org_results appears to be blank in our production environment.
T... | diff --git a/src/sentry/web/frontend/help_platform_base.py b/src/sentry/web/frontend/help_platform_base.py
--- a/src/sentry/web/frontend/help_platform_base.py
+++ b/src/sentry/web/frontend/help_platform_base.py
@@ -3,7 +3,7 @@
from django.db.models import Q
from itertools import groupby
-from sentry.models import P... | {"golden_diff": "diff --git a/src/sentry/web/frontend/help_platform_base.py b/src/sentry/web/frontend/help_platform_base.py\n--- a/src/sentry/web/frontend/help_platform_base.py\n+++ b/src/sentry/web/frontend/help_platform_base.py\n@@ -3,7 +3,7 @@\n from django.db.models import Q\n from itertools import groupby\n \n-fro... | 1,329 | 271 |
gh_patches_debug_30138 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-1988 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Most Beloved Book on Instance has zero local reviews
**Describe the bug**
On the About this Instance page there's a cool section that shows various books, like Most Beloved, Most Contentious, Most Wanted to R... | diff --git a/bookwyrm/templatetags/landing_page_tags.py b/bookwyrm/templatetags/landing_page_tags.py
--- a/bookwyrm/templatetags/landing_page_tags.py
+++ b/bookwyrm/templatetags/landing_page_tags.py
@@ -16,11 +16,15 @@
models.Work.objects.annotate(
rating=Avg(
"editions__review__r... | {"golden_diff": "diff --git a/bookwyrm/templatetags/landing_page_tags.py b/bookwyrm/templatetags/landing_page_tags.py\n--- a/bookwyrm/templatetags/landing_page_tags.py\n+++ b/bookwyrm/templatetags/landing_page_tags.py\n@@ -16,11 +16,15 @@\n models.Work.objects.annotate(\n rating=Avg(\n ... | 1,220 | 398 |
gh_patches_debug_11215 | rasdani/github-patches | git_diff | bentoml__BentoML-992 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add console log to prediction
**Is your feature request related to a problem? Please describe.**
When running bentoml in a docker container, request logs are not printed to standard out.
**Describe the so... | diff --git a/bentoml/utils/log.py b/bentoml/utils/log.py
--- a/bentoml/utils/log.py
+++ b/bentoml/utils/log.py
@@ -87,12 +87,12 @@
"propagate": False,
},
"bentoml.prediction": {
- "handlers": ["prediction"],
+ "handlers": ["prediction", "console"]... | {"golden_diff": "diff --git a/bentoml/utils/log.py b/bentoml/utils/log.py\n--- a/bentoml/utils/log.py\n+++ b/bentoml/utils/log.py\n@@ -87,12 +87,12 @@\n \"propagate\": False,\n },\n \"bentoml.prediction\": {\n- \"handlers\": [\"prediction\"],\n+ \"ha... | 1,684 | 152 |
gh_patches_debug_7399 | rasdani/github-patches | git_diff | paperless-ngx__paperless-ngx-849 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Regression in docker build
### Description
I cannot locally build the docker image.
The error message is
```
FROM ghcr.io/${REPO}/builder/jbig2enc:${JBIG2ENC_VERSION} as jbig2enc-builder
invalid r... | diff --git a/.github/scripts/get-build-json.py b/.github/scripts/get-build-json.py
--- a/.github/scripts/get-build-json.py
+++ b/.github/scripts/get-build-json.py
@@ -53,10 +53,7 @@
git_tag = None
extra_config = {}
- if args.package == "frontend":
- # Version is just the branch or tag name
- ... | {"golden_diff": "diff --git a/.github/scripts/get-build-json.py b/.github/scripts/get-build-json.py\n--- a/.github/scripts/get-build-json.py\n+++ b/.github/scripts/get-build-json.py\n@@ -53,10 +53,7 @@\n git_tag = None\n extra_config = {}\n \n- if args.package == \"frontend\":\n- # Version is just the... | 2,010 | 156 |
gh_patches_debug_14556 | rasdani/github-patches | git_diff | hedyorg__hedy-173 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Include button to go back to previous level
Thanks for the great project! While trying the website I wished I could go back one level, but there is only a button to go to the next level.
--- END ISSUE ---
B... | diff --git a/hedyweb.py b/hedyweb.py
--- a/hedyweb.py
+++ b/hedyweb.py
@@ -37,6 +37,7 @@
arguments_dict['assignment_nr'] = assignment.step # Give this a chance to be 'None'
arguments_dict['lang'] = course.language
arguments_dict['level'] = assignment.level
+ arguments_dict['prev_level'] = int(level_number) -... | {"golden_diff": "diff --git a/hedyweb.py b/hedyweb.py\n--- a/hedyweb.py\n+++ b/hedyweb.py\n@@ -37,6 +37,7 @@\n arguments_dict['assignment_nr'] = assignment.step # Give this a chance to be 'None'\n arguments_dict['lang'] = course.language\n arguments_dict['level'] = assignment.level\n+ arguments_dict['prev_level... | 1,318 | 177 |
gh_patches_debug_3499 | rasdani/github-patches | git_diff | speechbrain__speechbrain-1052 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation into user site directory with editable source fails
Currently, the installation of speechbrain fails for a user site directory with an editable source if the user does not have write access to th... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,15 @@
#!/usr/bin/env python3
import os
+import sys
+import site
import setuptools
from distutils.core import setup
+
+# Editable install in user site directory can be allowed with this hack:
+# https://github.com/pypa/pip/issues/7953.
+site... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,8 +1,15 @@\n #!/usr/bin/env python3\n import os\n+import sys\n+import site\n import setuptools\n from distutils.core import setup\n \n+\n+# Editable install in user site directory can be allowed with this hack:\n+# https://github.c... | 623 | 126 |
gh_patches_debug_8602 | rasdani/github-patches | git_diff | Nitrate__Nitrate-613 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't change case run status from the Status dropdown menu
Steps:
* Open a test run page
* Select a few of case runs
* Choose one status to change from Status dropdown menu
* Server side responses 500, ... | diff --git a/src/tcms/logs/views.py b/src/tcms/logs/views.py
--- a/src/tcms/logs/views.py
+++ b/src/tcms/logs/views.py
@@ -44,11 +44,11 @@
'new_value': self.new_value,
}
- def make(self, who, new_value, field='', original_value=''):
+ def make(self, who, new_value, field=None, original_val... | {"golden_diff": "diff --git a/src/tcms/logs/views.py b/src/tcms/logs/views.py\n--- a/src/tcms/logs/views.py\n+++ b/src/tcms/logs/views.py\n@@ -44,11 +44,11 @@\n 'new_value': self.new_value,\n }\n \n- def make(self, who, new_value, field='', original_value=''):\n+ def make(self, who, new_value,... | 879 | 160 |
gh_patches_debug_8434 | rasdani/github-patches | git_diff | google__mobly-323 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`signals.TestAbortClass` does not work in `setup_test` and `on_xxxx` methods
It is valid to abort the class at any stage of a test.
E.g. If we find out in `on_fail` that a test failed due to a fatal error ... | diff --git a/mobly/signals.py b/mobly/signals.py
--- a/mobly/signals.py
+++ b/mobly/signals.py
@@ -62,13 +62,18 @@
"""Raised when a test has been skipped."""
-class TestAbortClass(TestSignal):
+class TestAbortSignal(TestSignal):
+ """Base class for abort signals.
+ """
+
+
+class TestAbortClass(TestAbort... | {"golden_diff": "diff --git a/mobly/signals.py b/mobly/signals.py\n--- a/mobly/signals.py\n+++ b/mobly/signals.py\n@@ -62,13 +62,18 @@\n \"\"\"Raised when a test has been skipped.\"\"\"\n \n \n-class TestAbortClass(TestSignal):\n+class TestAbortSignal(TestSignal):\n+ \"\"\"Base class for abort signals.\n+ \"\... | 983 | 147 |
gh_patches_debug_9763 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-3146 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add OpenAPI Specification for /tables/ endpoint
## Problem
In order to ensure the accuracy of the specs generated by drf-spectacular for /tables/ endpoint , we will generate an OpenAPI Specification specific... | diff --git a/config/settings/openapi.py b/config/settings/openapi.py
--- a/config/settings/openapi.py
+++ b/config/settings/openapi.py
@@ -2,7 +2,7 @@
filtered = []
for (path, path_regex, method, callback) in endpoints:
# Remove all but DRF API endpoints
- if path.startswith("/api/db/v0/databa... | {"golden_diff": "diff --git a/config/settings/openapi.py b/config/settings/openapi.py\n--- a/config/settings/openapi.py\n+++ b/config/settings/openapi.py\n@@ -2,7 +2,7 @@\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n- if path.start... | 645 | 171 |
gh_patches_debug_13035 | rasdani/github-patches | git_diff | bokeh__bokeh-1495 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Method to update data source contents in the notebook
There is a reference implementation by @akloster in https://github.com/akloster/nb-bokeh-animations
```
def update_data_source(ds):
id = ds.ref['id']... | diff --git a/bokeh/models/sources.py b/bokeh/models/sources.py
--- a/bokeh/models/sources.py
+++ b/bokeh/models/sources.py
@@ -96,6 +96,19 @@
import warnings
warnings.warn("Unable to find column '%s' in datasource" % name)
+ def push_notebook(self):
+ from IPython.core import displ... | {"golden_diff": "diff --git a/bokeh/models/sources.py b/bokeh/models/sources.py\n--- a/bokeh/models/sources.py\n+++ b/bokeh/models/sources.py\n@@ -96,6 +96,19 @@\n import warnings\n warnings.warn(\"Unable to find column '%s' in datasource\" % name)\n \n+ def push_notebook(self):\n+ fro... | 1,602 | 204 |
gh_patches_debug_40784 | rasdani/github-patches | git_diff | Project-MONAI__MONAI-5093 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ContrastiveLoss with dynamic batchsize
**Is your feature request related to a problem? Please describe.**
When we instantiate an instance of type class `ContrastiveLoss` we need to pass in the parameter for ... | diff --git a/monai/losses/contrastive.py b/monai/losses/contrastive.py
--- a/monai/losses/contrastive.py
+++ b/monai/losses/contrastive.py
@@ -9,6 +9,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from distutils.log import warn
+
import torch
from torc... | {"golden_diff": "diff --git a/monai/losses/contrastive.py b/monai/losses/contrastive.py\n--- a/monai/losses/contrastive.py\n+++ b/monai/losses/contrastive.py\n@@ -9,6 +9,8 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+from distutils.log import warn\n+... | 1,439 | 722 |
gh_patches_debug_21009 | rasdani/github-patches | git_diff | conan-io__conan-10408 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[bug][2.0] patches cannot be applied when using cmake_layout
Hello,
It seems that `files.patch` and `cmake_layout` do not get along very well. The former does not find the patch files, even when specifying... | diff --git a/conan/tools/files/patches.py b/conan/tools/files/patches.py
--- a/conan/tools/files/patches.py
+++ b/conan/tools/files/patches.py
@@ -50,13 +50,17 @@
patchlog.addHandler(PatchLogHandler(conanfile, patch_file))
if patch_file:
- patchset = patch_ng.fromfile(patch_file)
+ # trick *1:... | {"golden_diff": "diff --git a/conan/tools/files/patches.py b/conan/tools/files/patches.py\n--- a/conan/tools/files/patches.py\n+++ b/conan/tools/files/patches.py\n@@ -50,13 +50,17 @@\n patchlog.addHandler(PatchLogHandler(conanfile, patch_file))\n \n if patch_file:\n- patchset = patch_ng.fromfile(patch_fi... | 1,896 | 266 |
gh_patches_debug_639 | rasdani/github-patches | git_diff | pex-tool__pex-2226 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.144
On the docket:
+ [x] Traverse directories in stable order when building a PEX #2220
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = "2.1.143"
+__version__ = "2.1.144"
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.143\"\n+__version__ = \"2.1.144\"\n",... | 343 | 98 |
gh_patches_debug_6979 | rasdani/github-patches | git_diff | sopel-irc__sopel-1875 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
add ping/pong response to ping.py
### The problem
The default ping module doesn't include ping/pong despite it's name and I'd rather not replace it just for that (I could move it out of core hacks but why no... | diff --git a/sopel/modules/ping.py b/sopel/modules/ping.py
--- a/sopel/modules/ping.py
+++ b/sopel/modules/ping.py
@@ -9,7 +9,7 @@
import random
-from sopel.module import priority, rule, thread
+from sopel.module import commands, priority, rule, thread
@rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$')
@@ -29,3 ... | {"golden_diff": "diff --git a/sopel/modules/ping.py b/sopel/modules/ping.py\n--- a/sopel/modules/ping.py\n+++ b/sopel/modules/ping.py\n@@ -9,7 +9,7 @@\n \n import random\n \n-from sopel.module import priority, rule, thread\n+from sopel.module import commands, priority, rule, thread\n \n \n @rule(r'(?i)(hi|hello|hey),? ... | 654 | 164 |
gh_patches_debug_27278 | rasdani/github-patches | git_diff | Pylons__pyramid-2621 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pcreate -s shows wrong link to tutorials
after a
```
pcreate -s alchemy scaffold-alchemy
```
I see a link to tutorials, but this link is a 404:
```
Tutorials: http://docs.pylonsproject.org/projects/pyram... | diff --git a/pyramid/scaffolds/__init__.py b/pyramid/scaffolds/__init__.py
--- a/pyramid/scaffolds/__init__.py
+++ b/pyramid/scaffolds/__init__.py
@@ -35,11 +35,10 @@
msg = dedent(
"""
%(separator)s
- Tutorials: http://docs.pylonsproject.org/projects/pyramid_tutorials
- ... | {"golden_diff": "diff --git a/pyramid/scaffolds/__init__.py b/pyramid/scaffolds/__init__.py\n--- a/pyramid/scaffolds/__init__.py\n+++ b/pyramid/scaffolds/__init__.py\n@@ -35,11 +35,10 @@\n msg = dedent(\n \"\"\"\n %(separator)s\n- Tutorials: http://docs.pylonsproject.org/proje... | 979 | 398 |
gh_patches_debug_57899 | rasdani/github-patches | git_diff | chanzuckerberg__single-cell-curation-428 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Feat(curation notebooks): display the x-request-id in the error response
When an error occurs especially 500 errors, the only piece of debug information the user has is the x-request-id. Making this value vis... | diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py
--- a/notebooks/curation_api/python/src/utils/logger.py
+++ b/notebooks/curation_api/python/src/utils/logger.py
@@ -40,6 +40,8 @@
logger.error("\n\033[1m\033[38;5;9mFAILED\033[0m\n") # 'FAILED' in bo... | {"golden_diff": "diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py\n--- a/notebooks/curation_api/python/src/utils/logger.py\n+++ b/notebooks/curation_api/python/src/utils/logger.py\n@@ -40,6 +40,8 @@\n logger.error(\"\\n\\033[1m\\033[38;5;9mFAILED\\03... | 865 | 167 |
gh_patches_debug_21200 | rasdani/github-patches | git_diff | pyca__cryptography-2174 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update Windows linking code
We should remove the environment variable based linking and document that if you want to build it dynamic vs static then you should build the OpenSSL libs in your preferred fashion... | diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py
--- a/src/_cffi_src/build_openssl.py
+++ b/src/_cffi_src/build_openssl.py
@@ -4,7 +4,6 @@
from __future__ import absolute_import, division, print_function
-import os
import sys
from _cffi_src.utils import build_ffi_for_binding, extra_... | {"golden_diff": "diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py\n--- a/src/_cffi_src/build_openssl.py\n+++ b/src/_cffi_src/build_openssl.py\n@@ -4,7 +4,6 @@\n \n from __future__ import absolute_import, division, print_function\n \n-import os\n import sys\n \n from _cffi_src.utils import bu... | 1,249 | 355 |
gh_patches_debug_9414 | rasdani/github-patches | git_diff | pypa__setuptools-3042 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] INFO log level is no longer default for some commands
### setuptools version
60.0.0 and newer
### Python version
Python 3.8
### OS
OpenSUSE Tumbleweed
### Additional environment information
_No r... | diff --git a/setuptools/logging.py b/setuptools/logging.py
--- a/setuptools/logging.py
+++ b/setuptools/logging.py
@@ -24,6 +24,12 @@
format="{message}", style='{', handlers=handlers, level=logging.DEBUG)
monkey.patch_func(set_threshold, distutils.log, 'set_threshold')
+ # For some reason `distutils.... | {"golden_diff": "diff --git a/setuptools/logging.py b/setuptools/logging.py\n--- a/setuptools/logging.py\n+++ b/setuptools/logging.py\n@@ -24,6 +24,12 @@\n format=\"{message}\", style='{', handlers=handlers, level=logging.DEBUG)\n monkey.patch_func(set_threshold, distutils.log, 'set_threshold')\n \n+ # F... | 1,283 | 161 |
gh_patches_debug_35446 | rasdani/github-patches | git_diff | gratipay__gratipay.com-1902 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
repair paydays table
This isn't really used much yet but it should be (nice historical data). Two repairs needed:
- ~~recalculate nparticipants for paydays <= #3~~
- recalculate exchange_volume and exchange_f... | diff --git a/gittip/models/__init__.py b/gittip/models/__init__.py
--- a/gittip/models/__init__.py
+++ b/gittip/models/__init__.py
@@ -18,6 +18,7 @@
self._check_tips()
self._check_orphans()
self._check_orphans_no_tips()
+ self._check_paydays_volumes()
def _check_tips(self):
... | {"golden_diff": "diff --git a/gittip/models/__init__.py b/gittip/models/__init__.py\n--- a/gittip/models/__init__.py\n+++ b/gittip/models/__init__.py\n@@ -18,6 +18,7 @@\n self._check_tips()\n self._check_orphans()\n self._check_orphans_no_tips()\n+ self._check_paydays_volumes()\n \n d... | 1,640 | 669 |
gh_patches_debug_14903 | rasdani/github-patches | git_diff | facebookresearch__xformers-258 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
fourier_mix attention does not support mixed precision training
Fourier mix attention does not support half precision.
```Traceback (most recent call last):
...
File "/usr/local/lib/python3.7/dist-pac... | diff --git a/xformers/components/attention/fourier_mix.py b/xformers/components/attention/fourier_mix.py
--- a/xformers/components/attention/fourier_mix.py
+++ b/xformers/components/attention/fourier_mix.py
@@ -4,6 +4,7 @@
# LICENSE file in the root directory of this source tree.
import torch
+from torch.cuda.amp i... | {"golden_diff": "diff --git a/xformers/components/attention/fourier_mix.py b/xformers/components/attention/fourier_mix.py\n--- a/xformers/components/attention/fourier_mix.py\n+++ b/xformers/components/attention/fourier_mix.py\n@@ -4,6 +4,7 @@\n # LICENSE file in the root directory of this source tree.\n \n import torch... | 844 | 204 |
gh_patches_debug_13317 | rasdani/github-patches | git_diff | CTFd__CTFd-1830 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Potentially expose user standings in admin scoreboard
This could let people give out awards for users who earn the most points or something like that.
The issue with this is that user standings don't real... | diff --git a/CTFd/admin/scoreboard.py b/CTFd/admin/scoreboard.py
--- a/CTFd/admin/scoreboard.py
+++ b/CTFd/admin/scoreboard.py
@@ -1,12 +1,16 @@
from flask import render_template
from CTFd.admin import admin
-from CTFd.scoreboard import get_standings
+from CTFd.utils.config import is_teams_mode
from CTFd.utils.dec... | {"golden_diff": "diff --git a/CTFd/admin/scoreboard.py b/CTFd/admin/scoreboard.py\n--- a/CTFd/admin/scoreboard.py\n+++ b/CTFd/admin/scoreboard.py\n@@ -1,12 +1,16 @@\n from flask import render_template\n \n from CTFd.admin import admin\n-from CTFd.scoreboard import get_standings\n+from CTFd.utils.config import is_teams_... | 461 | 216 |
gh_patches_debug_581 | rasdani/github-patches | git_diff | pex-tool__pex-1139 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.22
On the docket:
+ [x] Fix `--help-variables` docs. #1113
+ [x] pex binary hangs on startup at atomic_directory #1119
+ [x] pex vendoring does not (always) isolate itself from a colliding setu... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = "2.1.21"
+__version__ = "2.1.22"
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.21\"\n+__version__ = \"2.1.22\"\n", "... | 410 | 96 |
gh_patches_debug_28458 | rasdani/github-patches | git_diff | sunpy__sunpy-3112 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sample AIA images in the gallery do not show SunPy plotting very well
The colors selected AIA images in the gallery are badly scaled. This is probably because the data contain one or two very bright pixels w... | diff --git a/examples/acquiring_data/2011_06_07_sampledata_overview.py b/examples/acquiring_data/2011_06_07_sampledata_overview.py
--- a/examples/acquiring_data/2011_06_07_sampledata_overview.py
+++ b/examples/acquiring_data/2011_06_07_sampledata_overview.py
@@ -6,6 +6,7 @@
An overview of the coordinated sample data s... | {"golden_diff": "diff --git a/examples/acquiring_data/2011_06_07_sampledata_overview.py b/examples/acquiring_data/2011_06_07_sampledata_overview.py\n--- a/examples/acquiring_data/2011_06_07_sampledata_overview.py\n+++ b/examples/acquiring_data/2011_06_07_sampledata_overview.py\n@@ -6,6 +6,7 @@\n An overview of the coor... | 2,011 | 574 |
gh_patches_debug_11486 | rasdani/github-patches | git_diff | pyqtgraph__pyqtgraph-655 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
"Koch Fractal" example is missing an import [develop branch]
The "Koch Fractal" example is missing the import for the `reduce()` function.
```
Traceback (most recent call last):
File "C:\Anaconda3\lib\... | diff --git a/examples/fractal.py b/examples/fractal.py
--- a/examples/fractal.py
+++ b/examples/fractal.py
@@ -4,6 +4,7 @@
"""
import initExample ## Add path to library (just for examples; you do not need this)
+from functools import reduce
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
import num... | {"golden_diff": "diff --git a/examples/fractal.py b/examples/fractal.py\n--- a/examples/fractal.py\n+++ b/examples/fractal.py\n@@ -4,6 +4,7 @@\n \"\"\"\n import initExample ## Add path to library (just for examples; you do not need this)\n \n+from functools import reduce\n import pyqtgraph as pg\n from pyqtgraph.Qt imp... | 1,723 | 152 |
gh_patches_debug_28696 | rasdani/github-patches | git_diff | ocadotechnology__aimmo-268 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Minimum Product: Irrelevant MapFeature enum elements and their uses
Remove the irrelevant `MapFeature` elements in `world_state.py` and their uses throughout the codebase.
--- END ISSUE ---
Below are some c... | diff --git a/aimmo-game/simulation/state/world_state.py b/aimmo-game/simulation/state/world_state.py
--- a/aimmo-game/simulation/state/world_state.py
+++ b/aimmo-game/simulation/state/world_state.py
@@ -1,12 +1,12 @@
from enum import Enum
from collections import defaultdict
+
class MapFeature(Enum):
- HEALTH_PO... | {"golden_diff": "diff --git a/aimmo-game/simulation/state/world_state.py b/aimmo-game/simulation/state/world_state.py\n--- a/aimmo-game/simulation/state/world_state.py\n+++ b/aimmo-game/simulation/state/world_state.py\n@@ -1,12 +1,12 @@\n from enum import Enum\n from collections import defaultdict\n \n+\n class MapFeat... | 1,640 | 313 |
gh_patches_debug_38900 | rasdani/github-patches | git_diff | qtile__qtile-2896 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
setting foreground in extension_defaults result with non working CommandSet
# Issue description
setting `foreground` in `extension_defaults` result that `CommandSet` don't appear at all
probably other ext... | diff --git a/libqtile/extension/base.py b/libqtile/extension/base.py
--- a/libqtile/extension/base.py
+++ b/libqtile/extension/base.py
@@ -1,4 +1,5 @@
# Copyright (c) 2017 Dario Giovannetti
+# Copyright (c) 2021 elParaguayo
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this s... | {"golden_diff": "diff --git a/libqtile/extension/base.py b/libqtile/extension/base.py\n--- a/libqtile/extension/base.py\n+++ b/libqtile/extension/base.py\n@@ -1,4 +1,5 @@\n # Copyright (c) 2017 Dario Giovannetti\n+# Copyright (c) 2021 elParaguayo\n #\n # Permission is hereby granted, free of charge, to any person obtai... | 1,568 | 716 |
gh_patches_debug_26177 | rasdani/github-patches | git_diff | Mailu__Mailu-1393 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Postconf overrides should ignore comments
Comment lines in overrides/postfix.cf are sent to postconf in core/postfix/start.py:37. This results in error messages.
Comment lines should be ignored by core/pos... | diff --git a/core/postfix/start.py b/core/postfix/start.py
--- a/core/postfix/start.py
+++ b/core/postfix/start.py
@@ -27,6 +27,10 @@
("senderlogin", "url", url + "sender/login/§")
])
+def is_valid_postconf_line(line):
+ return not line.startswith("#") \
+ and not line == ''
+
# Actual st... | {"golden_diff": "diff --git a/core/postfix/start.py b/core/postfix/start.py\n--- a/core/postfix/start.py\n+++ b/core/postfix/start.py\n@@ -27,6 +27,10 @@\n (\"senderlogin\", \"url\", url + \"sender/login/\u00a7\")\n ])\n \n+def is_valid_postconf_line(line):\n+ return not line.startswith(\"#\") \\\n+ ... | 1,053 | 318 |
gh_patches_debug_587 | rasdani/github-patches | git_diff | pex-tool__pex-1450 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.50
On the docket:
+ [x] Fix zipapp layout identification. #1448
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEG... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = "2.1.49"
+__version__ = "2.1.50"
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.49\"\n+__version__ = \"2.1.50\"\n", "... | 338 | 96 |
gh_patches_debug_36479 | rasdani/github-patches | git_diff | mozilla__bugbug-739 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
In the trainer script, use db.download instead of implementing download manually
script/trainer.py is currently implementing DB download manually, it should instead use db.download (similarly to scripts/commi... | diff --git a/scripts/trainer.py b/scripts/trainer.py
--- a/scripts/trainer.py
+++ b/scripts/trainer.py
@@ -4,44 +4,24 @@
import json
import os
from logging import INFO, basicConfig, getLogger
-from urllib.request import urlretrieve
import zstandard
-from bugbug import get_bugbug_version, model
+from bugbug impo... | {"golden_diff": "diff --git a/scripts/trainer.py b/scripts/trainer.py\n--- a/scripts/trainer.py\n+++ b/scripts/trainer.py\n@@ -4,44 +4,24 @@\n import json\n import os\n from logging import INFO, basicConfig, getLogger\n-from urllib.request import urlretrieve\n \n import zstandard\n \n-from bugbug import get_bugbug_vers... | 1,158 | 596 |
gh_patches_debug_2134 | rasdani/github-patches | git_diff | qtile__qtile-1645 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
lazy.when
# Issue description
I found this quite oldy [`config.py`](https://gist.github.com/cjbarnes18/4151805) that uses a `when` operation to limit the keybinding to a layout but it throws an exception. ... | diff --git a/libqtile/lazy.py b/libqtile/lazy.py
--- a/libqtile/lazy.py
+++ b/libqtile/lazy.py
@@ -72,6 +72,7 @@
def when(self, layout=None, when_floating=True):
self._layout = layout
self._when_floating = when_floating
+ return self
def check(self, q) -> bool:
if self._lay... | {"golden_diff": "diff --git a/libqtile/lazy.py b/libqtile/lazy.py\n--- a/libqtile/lazy.py\n+++ b/libqtile/lazy.py\n@@ -72,6 +72,7 @@\n def when(self, layout=None, when_floating=True):\n self._layout = layout\n self._when_floating = when_floating\n+ return self\n \n def check(self, q) -> b... | 1,640 | 103 |
gh_patches_debug_26387 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-8359 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Problems with Spiders built on YextSpider
I've noticed a few of the spiders whose results I was using in my OSM tool have recently stopped returning any results, including five_guys_de_es_fr_gb.py , matalan_g... | diff --git a/locations/spiders/fazolis_us.py b/locations/spiders/fazolis_us.py
--- a/locations/spiders/fazolis_us.py
+++ b/locations/spiders/fazolis_us.py
@@ -1,20 +1,17 @@
-from locations.categories import Extras, apply_yes_no
-from locations.storefinders.yext import YextSpider
+from locations.categories import Catego... | {"golden_diff": "diff --git a/locations/spiders/fazolis_us.py b/locations/spiders/fazolis_us.py\n--- a/locations/spiders/fazolis_us.py\n+++ b/locations/spiders/fazolis_us.py\n@@ -1,20 +1,17 @@\n-from locations.categories import Extras, apply_yes_no\n-from locations.storefinders.yext import YextSpider\n+from locations.c... | 705 | 548 |
gh_patches_debug_8122 | rasdani/github-patches | git_diff | getnikola__nikola-2632 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
new install - new_page fails
steps to reproduce:
1. install nikola.
2. init a new project and cd to it's dir
3. run "nikola new_page" throws an exception.
4. however, run "nikola new_post -p" and it wor... | diff --git a/nikola/plugins/command/new_page.py b/nikola/plugins/command/new_page.py
--- a/nikola/plugins/command/new_page.py
+++ b/nikola/plugins/command/new_page.py
@@ -107,6 +107,7 @@
options['tags'] = ''
options['schedule'] = False
options['is_page'] = True
+ options['date-path'] =... | {"golden_diff": "diff --git a/nikola/plugins/command/new_page.py b/nikola/plugins/command/new_page.py\n--- a/nikola/plugins/command/new_page.py\n+++ b/nikola/plugins/command/new_page.py\n@@ -107,6 +107,7 @@\n options['tags'] = ''\n options['schedule'] = False\n options['is_page'] = True\n+ ... | 1,749 | 140 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.