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_57793 | rasdani/github-patches | git_diff | catalyst-team__catalyst-855 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
EarlyStoppingCallback considers first epoch as bad
## 🐛 Bug Report
EarlyStoppingCallback considers first epoch as bad. This can lead for example to always stopping after first epoch if patience=1.
### ... | diff --git a/catalyst/core/callbacks/early_stop.py b/catalyst/core/callbacks/early_stop.py
--- a/catalyst/core/callbacks/early_stop.py
+++ b/catalyst/core/callbacks/early_stop.py
@@ -51,9 +51,7 @@
return
score = runner.valid_metrics[self.metric]
- if self.best_score is None:
- ... | {"golden_diff": "diff --git a/catalyst/core/callbacks/early_stop.py b/catalyst/core/callbacks/early_stop.py\n--- a/catalyst/core/callbacks/early_stop.py\n+++ b/catalyst/core/callbacks/early_stop.py\n@@ -51,9 +51,7 @@\n return\n \n score = runner.valid_metrics[self.metric]\n- if self.best_scor... | 1,605 | 144 |
gh_patches_debug_840 | rasdani/github-patches | git_diff | nilearn__nilearn-507 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add test for compatibility of old version of six
For the moment, we are compatible with the latest version of six. Recently, somebody pointed out that we did not support six 1.5.2. We should investigate, deci... | diff --git a/continuous_integration/show-python-packages-versions.py b/continuous_integration/show-python-packages-versions.py
--- a/continuous_integration/show-python-packages-versions.py
+++ b/continuous_integration/show-python-packages-versions.py
@@ -1,6 +1,6 @@
import sys
-DEPENDENCIES = ['numpy', 'scipy', 'skl... | {"golden_diff": "diff --git a/continuous_integration/show-python-packages-versions.py b/continuous_integration/show-python-packages-versions.py\n--- a/continuous_integration/show-python-packages-versions.py\n+++ b/continuous_integration/show-python-packages-versions.py\n@@ -1,6 +1,6 @@\n import sys\n \n-DEPENDENCIES = ... | 569 | 123 |
gh_patches_debug_11637 | rasdani/github-patches | git_diff | getsentry__sentry-59857 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Jira deprecation of glance panels
Notice from Atlassian Support team about glance panel deprecation.
AC:
- Review the deprecation plan
- Build a recommendation based on how we're impacted. If minor deve... | diff --git a/src/sentry/integrations/jira/endpoints/descriptor.py b/src/sentry/integrations/jira/endpoints/descriptor.py
--- a/src/sentry/integrations/jira/endpoints/descriptor.py
+++ b/src/sentry/integrations/jira/endpoints/descriptor.py
@@ -60,7 +60,7 @@
"name": {"value": "Configure Sentry Ad... | {"golden_diff": "diff --git a/src/sentry/integrations/jira/endpoints/descriptor.py b/src/sentry/integrations/jira/endpoints/descriptor.py\n--- a/src/sentry/integrations/jira/endpoints/descriptor.py\n+++ b/src/sentry/integrations/jira/endpoints/descriptor.py\n@@ -60,7 +60,7 @@\n \"name\": {\"valu... | 1,499 | 171 |
gh_patches_debug_21950 | rasdani/github-patches | git_diff | cornellius-gp__gpytorch-1670 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] The Added Loss term for InducingKernel seems flipped in sign?
# 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
```
def loss(self, *params):
prior_covar = self.prio... | diff --git a/gpytorch/mlls/inducing_point_kernel_added_loss_term.py b/gpytorch/mlls/inducing_point_kernel_added_loss_term.py
--- a/gpytorch/mlls/inducing_point_kernel_added_loss_term.py
+++ b/gpytorch/mlls/inducing_point_kernel_added_loss_term.py
@@ -4,7 +4,7 @@
class InducingPointKernelAddedLossTerm(AddedLossTerm... | {"golden_diff": "diff --git a/gpytorch/mlls/inducing_point_kernel_added_loss_term.py b/gpytorch/mlls/inducing_point_kernel_added_loss_term.py\n--- a/gpytorch/mlls/inducing_point_kernel_added_loss_term.py\n+++ b/gpytorch/mlls/inducing_point_kernel_added_loss_term.py\n@@ -4,7 +4,7 @@\n \n \n class InducingPointKernelAdde... | 824 | 284 |
gh_patches_debug_29548 | rasdani/github-patches | git_diff | translate__pootle-3719 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Running migrate twice gives an error about changed models
If you run `migrate` a second time directly after an initial migration you will get the following error.
```
Running migrations:
No migrations to a... | diff --git a/pootle/apps/virtualfolder/migrations/0001_initial.py b/pootle/apps/virtualfolder/migrations/0001_initial.py
--- a/pootle/apps/virtualfolder/migrations/0001_initial.py
+++ b/pootle/apps/virtualfolder/migrations/0001_initial.py
@@ -21,7 +21,7 @@
('filter_rules', models.TextField(help_text='F... | {"golden_diff": "diff --git a/pootle/apps/virtualfolder/migrations/0001_initial.py b/pootle/apps/virtualfolder/migrations/0001_initial.py\n--- a/pootle/apps/virtualfolder/migrations/0001_initial.py\n+++ b/pootle/apps/virtualfolder/migrations/0001_initial.py\n@@ -21,7 +21,7 @@\n ('filter_rules', models.T... | 2,022 | 410 |
gh_patches_debug_4294 | rasdani/github-patches | git_diff | open-mmlab__mmpretrain-286 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Feature Request] CPU Testing
Since CPU training is already supported in PR #219, what about also adding the feature of CPU testing.
Besides, it seems there are still some problems with the CPU training f... | diff --git a/mmcls/apis/train.py b/mmcls/apis/train.py
--- a/mmcls/apis/train.py
+++ b/mmcls/apis/train.py
@@ -87,7 +87,7 @@
model = MMDataParallel(
model.cuda(cfg.gpu_ids[0]), device_ids=cfg.gpu_ids)
elif device == 'cpu':
- model = MMDataParallel(model.cpu())
+ ... | {"golden_diff": "diff --git a/mmcls/apis/train.py b/mmcls/apis/train.py\n--- a/mmcls/apis/train.py\n+++ b/mmcls/apis/train.py\n@@ -87,7 +87,7 @@\n model = MMDataParallel(\n model.cuda(cfg.gpu_ids[0]), device_ids=cfg.gpu_ids)\n elif device == 'cpu':\n- model = MMDataParalle... | 1,869 | 106 |
gh_patches_debug_5537 | rasdani/github-patches | git_diff | nextcloud__appstore-619 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Verify email addresses after E-Mail change
When a user changes their email address, it should be verified. allauth provides some views for that which may or may not be useful. Unsure whether email addresses c... | diff --git a/nextcloudappstore/user/views.py b/nextcloudappstore/user/views.py
--- a/nextcloudappstore/user/views.py
+++ b/nextcloudappstore/user/views.py
@@ -70,8 +70,7 @@
def form_valid(self, form):
email = EmailAddress.objects.get_primary(user=self.request.user)
- email.email = form.cleaned_da... | {"golden_diff": "diff --git a/nextcloudappstore/user/views.py b/nextcloudappstore/user/views.py\n--- a/nextcloudappstore/user/views.py\n+++ b/nextcloudappstore/user/views.py\n@@ -70,8 +70,7 @@\n \n def form_valid(self, form):\n email = EmailAddress.objects.get_primary(user=self.request.user)\n- email... | 1,277 | 125 |
gh_patches_debug_31147 | rasdani/github-patches | git_diff | onnx__onnx-5757 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
check_function requires contexts as arguments which breaks backward compatibility
https://github.com/onnx/onnx/pull/5693 added required parameters to the `check_function` function in checker which breaks back... | diff --git a/onnx/checker.py b/onnx/checker.py
--- a/onnx/checker.py
+++ b/onnx/checker.py
@@ -84,37 +84,37 @@
def check_attribute(
attr: AttributeProto,
ctx: C.CheckerContext = DEFAULT_CONTEXT,
- lex_ctx: C.LexicalScopeContext = LEXICAL_SCOPE_CONTEXT,
+ lexical_scope_ctx: C.LexicalScopeContext = LEXIC... | {"golden_diff": "diff --git a/onnx/checker.py b/onnx/checker.py\n--- a/onnx/checker.py\n+++ b/onnx/checker.py\n@@ -84,37 +84,37 @@\n def check_attribute(\n attr: AttributeProto,\n ctx: C.CheckerContext = DEFAULT_CONTEXT,\n- lex_ctx: C.LexicalScopeContext = LEXICAL_SCOPE_CONTEXT,\n+ lexical_scope_ctx: C.Le... | 1,933 | 469 |
gh_patches_debug_11270 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-2886 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
E2520 raised for mutually exclusive properties when using Conditions
### CloudFormation Lint Version
cfn-lint 0.80.2
### What operating system are you using?
Windows
### Describe the bug
[E2520](https://... | diff --git a/src/cfnlint/rules/resources/properties/Exclusive.py b/src/cfnlint/rules/resources/properties/Exclusive.py
--- a/src/cfnlint/rules/resources/properties/Exclusive.py
+++ b/src/cfnlint/rules/resources/properties/Exclusive.py
@@ -38,7 +38,7 @@
for property_set in property_sets:
... | {"golden_diff": "diff --git a/src/cfnlint/rules/resources/properties/Exclusive.py b/src/cfnlint/rules/resources/properties/Exclusive.py\n--- a/src/cfnlint/rules/resources/properties/Exclusive.py\n+++ b/src/cfnlint/rules/resources/properties/Exclusive.py\n@@ -38,7 +38,7 @@\n for property_set in property_... | 1,566 | 133 |
gh_patches_debug_7736 | rasdani/github-patches | git_diff | google__flax-2492 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve documentation for `Dropout` and `rngs` argument in `linen.Module.apply()`
Here is an example of `Dropout` in a model definition:
https://github.com/google/flax/blob/d068512a932da3e05b822790a591bac3... | diff --git a/flax/linen/stochastic.py b/flax/linen/stochastic.py
--- a/flax/linen/stochastic.py
+++ b/flax/linen/stochastic.py
@@ -27,6 +27,11 @@
class Dropout(Module):
"""Create a dropout layer.
+ Note: When using :meth:`Module.apply() <flax.linen.Module.apply>`, make sure
+ to include an RNG seed named `'... | {"golden_diff": "diff --git a/flax/linen/stochastic.py b/flax/linen/stochastic.py\n--- a/flax/linen/stochastic.py\n+++ b/flax/linen/stochastic.py\n@@ -27,6 +27,11 @@\n class Dropout(Module):\n \"\"\"Create a dropout layer.\n \n+ Note: When using :meth:`Module.apply() <flax.linen.Module.apply>`, make sure\n+ to ... | 1,471 | 167 |
gh_patches_debug_18985 | rasdani/github-patches | git_diff | oppia__oppia-6309 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
InteractiveMap interaction: in the rule editor, clicks on the map are not displayed correctly
Create an exploration with a map interaction. Add a rule and click on the map to choose the point the rule applies... | diff --git a/extensions/dependencies/dependencies_config.py b/extensions/dependencies/dependencies_config.py
--- a/extensions/dependencies/dependencies_config.py
+++ b/extensions/dependencies/dependencies_config.py
@@ -21,7 +21,7 @@
# should insert when the Angular app is first initialized.
DEPENDENCIES_TO_ANGULAR_MO... | {"golden_diff": "diff --git a/extensions/dependencies/dependencies_config.py b/extensions/dependencies/dependencies_config.py\n--- a/extensions/dependencies/dependencies_config.py\n+++ b/extensions/dependencies/dependencies_config.py\n@@ -21,7 +21,7 @@\n # should insert when the Angular app is first initialized.\n DEPE... | 1,527 | 276 |
gh_patches_debug_34246 | rasdani/github-patches | git_diff | uccser__cs-unplugged-318 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support multiple page resources
Currently the create image function for a resource return a single image. Instead it should return a list of images, which would allow multiple page resources.
For example, ... | diff --git a/csunplugged/resources/views/generate_resource_pdf.py b/csunplugged/resources/views/generate_resource_pdf.py
--- a/csunplugged/resources/views/generate_resource_pdf.py
+++ b/csunplugged/resources/views/generate_resource_pdf.py
@@ -63,7 +63,9 @@
def generate_resource_image(get_request, resource, module_... | {"golden_diff": "diff --git a/csunplugged/resources/views/generate_resource_pdf.py b/csunplugged/resources/views/generate_resource_pdf.py\n--- a/csunplugged/resources/views/generate_resource_pdf.py\n+++ b/csunplugged/resources/views/generate_resource_pdf.py\n@@ -63,7 +63,9 @@\n \n \n def generate_resource_image(get_req... | 1,366 | 599 |
gh_patches_debug_32375 | rasdani/github-patches | git_diff | getsentry__sentry-python-897 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Crash in pure_eval
This happened while we were experiencing a DB outage:
```
File "/usr/local/lib/python3.8/dist-packages/asyncpg/connection.py", line 443, in fetch
return await self._execute(query, ... | diff --git a/sentry_sdk/integrations/pure_eval.py b/sentry_sdk/integrations/pure_eval.py
--- a/sentry_sdk/integrations/pure_eval.py
+++ b/sentry_sdk/integrations/pure_eval.py
@@ -104,23 +104,29 @@
expressions = evaluator.interesting_expressions_grouped(scope)
def closeness(expression):
- # type: (Tup... | {"golden_diff": "diff --git a/sentry_sdk/integrations/pure_eval.py b/sentry_sdk/integrations/pure_eval.py\n--- a/sentry_sdk/integrations/pure_eval.py\n+++ b/sentry_sdk/integrations/pure_eval.py\n@@ -104,23 +104,29 @@\n expressions = evaluator.interesting_expressions_grouped(scope)\n \n def closeness(expression)... | 2,023 | 418 |
gh_patches_debug_34688 | rasdani/github-patches | git_diff | tensorflow__addons-271 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Automate Build Process
Currently we have no automated process for building Addons across python version and operating systems. Going forward we'll want this process to be automated.. but it may be challenging... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -17,10 +17,10 @@
TensorFlow Addons is a repository of contributions that conform to
well-established API patterns,but implement new functionality not available in
core TensorFlow.TensorFlow natively supports a large number of operators,
-layers, metri... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -17,10 +17,10 @@\n TensorFlow Addons is a repository of contributions that conform to\n well-established API patterns,but implement new functionality not available in\n core TensorFlow.TensorFlow natively supports a large number of op... | 1,169 | 431 |
gh_patches_debug_35290 | rasdani/github-patches | git_diff | docarray__docarray-979 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bug(v2): relative file paths in url types
Passing relative file paths gives a validation error:
```python
from docarray import Image
url = 'Test/05978.jpg'
img = Image(url=url)
```
```text
Test/05978.jpg
T... | diff --git a/docarray/typing/url/any_url.py b/docarray/typing/url/any_url.py
--- a/docarray/typing/url/any_url.py
+++ b/docarray/typing/url/any_url.py
@@ -1,4 +1,4 @@
-from typing import TYPE_CHECKING, Type, TypeVar
+from typing import TYPE_CHECKING, Optional, Type, TypeVar
from pydantic import AnyUrl as BaseAnyUrl
... | {"golden_diff": "diff --git a/docarray/typing/url/any_url.py b/docarray/typing/url/any_url.py\n--- a/docarray/typing/url/any_url.py\n+++ b/docarray/typing/url/any_url.py\n@@ -1,4 +1,4 @@\n-from typing import TYPE_CHECKING, Type, TypeVar\n+from typing import TYPE_CHECKING, Optional, Type, TypeVar\n \n from pydantic impo... | 1,010 | 609 |
gh_patches_debug_34183 | rasdani/github-patches | git_diff | sonic-net__sonic-mgmt-4352 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Investigate RDMA nightly run failures on 202012
<!--
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
re... | diff --git a/ansible/library/testbed_vm_info.py b/ansible/library/testbed_vm_info.py
--- a/ansible/library/testbed_vm_info.py
+++ b/ansible/library/testbed_vm_info.py
@@ -39,6 +39,7 @@
### Here are the assumption/expectation of files to gather VM informations, if the file location or name changes, please modify it her... | {"golden_diff": "diff --git a/ansible/library/testbed_vm_info.py b/ansible/library/testbed_vm_info.py\n--- a/ansible/library/testbed_vm_info.py\n+++ b/ansible/library/testbed_vm_info.py\n@@ -39,6 +39,7 @@\n ### Here are the assumption/expectation of files to gather VM informations, if the file location or name changes,... | 1,748 | 523 |
gh_patches_debug_32068 | rasdani/github-patches | git_diff | conan-io__conan-center-index-16242 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[package] libudev/system: Fails build for conan 2.0
### Description
libudev/system fails to download or build with conan 2.0 installed. it needs an update to use conan 2.0 code for conan tools as it current... | diff --git a/recipes/libudev/all/conanfile.py b/recipes/libudev/all/conanfile.py
--- a/recipes/libudev/all/conanfile.py
+++ b/recipes/libudev/all/conanfile.py
@@ -1,7 +1,7 @@
from conan import ConanFile
-from conan.errors import ConanException, ConanInvalidConfiguration
+from conan.errors import ConanInvalidConfigurat... | {"golden_diff": "diff --git a/recipes/libudev/all/conanfile.py b/recipes/libudev/all/conanfile.py\n--- a/recipes/libudev/all/conanfile.py\n+++ b/recipes/libudev/all/conanfile.py\n@@ -1,7 +1,7 @@\n from conan import ConanFile\n-from conan.errors import ConanException, ConanInvalidConfiguration\n+from conan.errors import... | 1,396 | 529 |
gh_patches_debug_36567 | rasdani/github-patches | git_diff | Slicer__ExtensionsIndex-1759 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bad dependencies kill entire extension build
[SlicerVideoCamera name change](https://github.com/Slicer/ExtensionsIndex/commit/93d1942ed51a5c576f477dab77df9529ce788754) introduced this [bug](https://github.com... | diff --git a/scripts/check_description_files.py b/scripts/check_description_files.py
--- a/scripts/check_description_files.py
+++ b/scripts/check_description_files.py
@@ -95,6 +95,38 @@
""" % (
repo_name, repo_name, variations)))
+def check_dependencies(directory):
+ import os
+ re... | {"golden_diff": "diff --git a/scripts/check_description_files.py b/scripts/check_description_files.py\n--- a/scripts/check_description_files.py\n+++ b/scripts/check_description_files.py\n@@ -95,6 +95,38 @@\n \"\"\" % (\n repo_name, repo_name, variations)))\n \n+def check_dependencies(directo... | 1,774 | 591 |
gh_patches_debug_32378 | rasdani/github-patches | git_diff | optuna__optuna-4684 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove experimental label from `_ProgressBar`
### Motivation
Several issues related to `_ProgressBar` have been already addressed (ref: https://github.com/optuna/optuna/issues/2892, https://github.com/optuna... | diff --git a/optuna/progress_bar.py b/optuna/progress_bar.py
--- a/optuna/progress_bar.py
+++ b/optuna/progress_bar.py
@@ -6,7 +6,6 @@
from tqdm.auto import tqdm
from optuna import logging as optuna_logging
-from optuna._experimental import experimental_func
if TYPE_CHECKING:
@@ -52,29 +51,22 @@
self.... | {"golden_diff": "diff --git a/optuna/progress_bar.py b/optuna/progress_bar.py\n--- a/optuna/progress_bar.py\n+++ b/optuna/progress_bar.py\n@@ -6,7 +6,6 @@\n from tqdm.auto import tqdm\n \n from optuna import logging as optuna_logging\n-from optuna._experimental import experimental_func\n \n \n if TYPE_CHECKING:\n@@ -52... | 1,676 | 570 |
gh_patches_debug_20648 | rasdani/github-patches | git_diff | microsoft__ptvsd-1253 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PTVSD_LOG_DIR doesn't work with VS
No logs are generated even with the environment variable set. It looks like logging initialization is missing on the VS entry point (`debugger.py`).
--- END ISSUE ---
Belo... | diff --git a/src/ptvsd/debugger.py b/src/ptvsd/debugger.py
--- a/src/ptvsd/debugger.py
+++ b/src/ptvsd/debugger.py
@@ -4,6 +4,7 @@
import sys
+import ptvsd.log
from ptvsd._local import run_module, run_file, run_main
@@ -22,7 +23,10 @@
def debug(filename, port_num, debug_id, debug_options, run_as,
... | {"golden_diff": "diff --git a/src/ptvsd/debugger.py b/src/ptvsd/debugger.py\n--- a/src/ptvsd/debugger.py\n+++ b/src/ptvsd/debugger.py\n@@ -4,6 +4,7 @@\n \n import sys\n \n+import ptvsd.log\n from ptvsd._local import run_module, run_file, run_main\n \n \n@@ -22,7 +23,10 @@\n \n def debug(filename, port_num, debug_id, de... | 699 | 295 |
gh_patches_debug_36977 | rasdani/github-patches | git_diff | bridgecrewio__checkov-4942 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Failed to run check CKV_AWS_224: TemplateAttributeError: get is invalid
**Describe the issue**
Error occurs when checked ECS Cluster using terraform_plan framework.
**Examples**
```
module "cluster" {
... | diff --git a/checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py b/checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py
--- a/checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py
+++ b/checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWith... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py b/checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py\n--- a/checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py\n+++ b/checkov/terraform/checks/resource/aws/ECSClusterL... | 1,234 | 671 |
gh_patches_debug_16904 | rasdani/github-patches | git_diff | saleor__saleor-5443 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Creating a new sale raises error in Celery task
### Steps to reproduce the problem
1. Run the following mutation as an admin user (with `MANAGE_DISCOUNTS` permission):
```
mutation {
saleCreate(input: {... | diff --git a/saleor/product/utils/variant_prices.py b/saleor/product/utils/variant_prices.py
--- a/saleor/product/utils/variant_prices.py
+++ b/saleor/product/utils/variant_prices.py
@@ -58,18 +58,12 @@
if collection_ids:
q_list.append(Q(collectionproduct__collection_id__in=collection_ids))
# Asserti... | {"golden_diff": "diff --git a/saleor/product/utils/variant_prices.py b/saleor/product/utils/variant_prices.py\n--- a/saleor/product/utils/variant_prices.py\n+++ b/saleor/product/utils/variant_prices.py\n@@ -58,18 +58,12 @@\n if collection_ids:\n q_list.append(Q(collectionproduct__collection_id__in=collectio... | 1,523 | 254 |
gh_patches_debug_24558 | rasdani/github-patches | git_diff | marshmallow-code__webargs-43 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pyramid parser use_kwargs throws exception when used
The following code using the pyramid parser throws an exception:
``` python
@parser.use_kwargs({'myvalue': Arg(int)})
def baz(request, myvalue):
retur... | diff --git a/webargs/pyramidparser.py b/webargs/pyramidparser.py
--- a/webargs/pyramidparser.py
+++ b/webargs/pyramidparser.py
@@ -79,7 +79,7 @@
raise exception_response(status_code, detail=text_type(error), **data)
def use_args(self, argmap, req=None, locations=core.Parser.DEFAULT_LOCATIONS,
- ... | {"golden_diff": "diff --git a/webargs/pyramidparser.py b/webargs/pyramidparser.py\n--- a/webargs/pyramidparser.py\n+++ b/webargs/pyramidparser.py\n@@ -79,7 +79,7 @@\n raise exception_response(status_code, detail=text_type(error), **data)\n \n def use_args(self, argmap, req=None, locations=core.Parser.DEFAUL... | 1,565 | 244 |
gh_patches_debug_10387 | rasdani/github-patches | git_diff | WordPress__openverse-api-727 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Possibly make `thumbnail` null for audio files without artwork
## Description
<!-- Concisely describe the bug. -->
Currently the frontend tries to fetch thumbnails for all audio files regardless of whethe... | diff --git a/api/catalog/api/serializers/audio_serializers.py b/api/catalog/api/serializers/audio_serializers.py
--- a/api/catalog/api/serializers/audio_serializers.py
+++ b/api/catalog/api/serializers/audio_serializers.py
@@ -135,6 +135,18 @@
obj = Audio.objects.get(identifier=obj.identifier)
ret... | {"golden_diff": "diff --git a/api/catalog/api/serializers/audio_serializers.py b/api/catalog/api/serializers/audio_serializers.py\n--- a/api/catalog/api/serializers/audio_serializers.py\n+++ b/api/catalog/api/serializers/audio_serializers.py\n@@ -135,6 +135,18 @@\n obj = Audio.objects.get(identifier=obj.ide... | 1,687 | 178 |
gh_patches_debug_25250 | rasdani/github-patches | git_diff | pre-commit__pre-commit-193 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
^C^C during installation may leave pre-commit in a bad state
There's code which handles the first ^C, however I think the second one (during execution of the finally block) may not be handled well. I probabl... | diff --git a/pre_commit/repository.py b/pre_commit/repository.py
--- a/pre_commit/repository.py
+++ b/pre_commit/repository.py
@@ -1,5 +1,7 @@
from __future__ import unicode_literals
+import shutil
+
from cached_property import cached_property
from pre_commit.languages.all import languages
@@ -64,11 +66,21 @@
... | {"golden_diff": "diff --git a/pre_commit/repository.py b/pre_commit/repository.py\n--- a/pre_commit/repository.py\n+++ b/pre_commit/repository.py\n@@ -1,5 +1,7 @@\n from __future__ import unicode_literals\n \n+import shutil\n+\n from cached_property import cached_property\n \n from pre_commit.languages.all import langu... | 974 | 263 |
gh_patches_debug_27672 | rasdani/github-patches | git_diff | bids-standard__pybids-589 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
model: JSON to dict modified key values for transformation
In ` Replace` transformation, you specify as a dict which variables to transform.
e.g.:
```
{'LIKELY': "5"}
```
However, the parser from J... | diff --git a/bids/utils.py b/bids/utils.py
--- a/bids/utils.py
+++ b/bids/utils.py
@@ -44,9 +44,10 @@
def convert_JSON(j):
""" Recursively convert CamelCase keys to snake_case.
- From: https://stackoverflow.com/questions/17156078/converting-identifier-naming-between-camelcase-and-underscores-during-json-seri... | {"golden_diff": "diff --git a/bids/utils.py b/bids/utils.py\n--- a/bids/utils.py\n+++ b/bids/utils.py\n@@ -44,9 +44,10 @@\n \n def convert_JSON(j):\n \"\"\" Recursively convert CamelCase keys to snake_case.\n- From: https://stackoverflow.com/questions/17156078/converting-identifier-naming-between-camelcase-and-u... | 1,410 | 353 |
gh_patches_debug_24872 | rasdani/github-patches | git_diff | rotki__rotki-174 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
USD Value for IOTA is incorrect
## Problem Definition
The usd value reported on my exchange is inconsistent with the usd value that rotkehlchen shows.
I tried to find where the USD value is calculated f... | diff --git a/rotkehlchen/constants.py b/rotkehlchen/constants.py
--- a/rotkehlchen/constants.py
+++ b/rotkehlchen/constants.py
@@ -15,6 +15,7 @@
S_BTC = cast(typing.NonEthTokenBlockchainAsset, 'BTC')
S_ETH = cast(typing.NonEthTokenBlockchainAsset, 'ETH')
S_DATACOIN = cast(typing.NonEthTokenBlockchainAsset, 'DATAcoin... | {"golden_diff": "diff --git a/rotkehlchen/constants.py b/rotkehlchen/constants.py\n--- a/rotkehlchen/constants.py\n+++ b/rotkehlchen/constants.py\n@@ -15,6 +15,7 @@\n S_BTC = cast(typing.NonEthTokenBlockchainAsset, 'BTC')\n S_ETH = cast(typing.NonEthTokenBlockchainAsset, 'ETH')\n S_DATACOIN = cast(typing.NonEthTokenBlo... | 1,973 | 386 |
gh_patches_debug_20588 | rasdani/github-patches | git_diff | dotkom__onlineweb4-812 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hide attendanceevent from django admin
https://online.ntnu.no/admin/events/attendanceevent/
This view should not be used by anyone and attendance info should be edited through the event directly.
Should be... | diff --git a/apps/events/admin.py b/apps/events/admin.py
--- a/apps/events/admin.py
+++ b/apps/events/admin.py
@@ -40,11 +40,6 @@
inline_classes = ('grp-collapse grp-open',) # style
-class AttendanceEventAdmin(admin.ModelAdmin):
- model = AttendanceEvent
- inlines = (AttendeeInline, RuleBundleInline)
-
... | {"golden_diff": "diff --git a/apps/events/admin.py b/apps/events/admin.py\n--- a/apps/events/admin.py\n+++ b/apps/events/admin.py\n@@ -40,11 +40,6 @@\n inline_classes = ('grp-collapse grp-open',) # style\n \n \n-class AttendanceEventAdmin(admin.ModelAdmin):\n- model = AttendanceEvent\n- inlines = (AttendeeIn... | 1,567 | 214 |
gh_patches_debug_13193 | rasdani/github-patches | git_diff | opensearch-project__opensearch-build-499 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make plugin integtest.sh run against non-snapshot build
The plugin integtest.sh picks up the opensearch version provided in build.gradle, which is 1.1.0-SNAPSHOT. Since the release candidates are non snapshot... | diff --git a/bundle-workflow/src/paths/script_finder.py b/bundle-workflow/src/paths/script_finder.py
--- a/bundle-workflow/src/paths/script_finder.py
+++ b/bundle-workflow/src/paths/script_finder.py
@@ -64,8 +64,9 @@
@classmethod
def find_integ_test_script(cls, component_name, git_dir):
paths = [
- ... | {"golden_diff": "diff --git a/bundle-workflow/src/paths/script_finder.py b/bundle-workflow/src/paths/script_finder.py\n--- a/bundle-workflow/src/paths/script_finder.py\n+++ b/bundle-workflow/src/paths/script_finder.py\n@@ -64,8 +64,9 @@\n @classmethod\n def find_integ_test_script(cls, component_name, git_dir):\... | 1,165 | 214 |
gh_patches_debug_15180 | rasdani/github-patches | git_diff | pre-commit__pre-commit-38 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Consider using --no-checkout for cloning
I'd assume it is faster...
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES -... | diff --git a/pre_commit/repository.py b/pre_commit/repository.py
--- a/pre_commit/repository.py
+++ b/pre_commit/repository.py
@@ -56,7 +56,7 @@
# Project already exists, no reason to re-create it
return
- local['git']['clone', self.repo_url, self.sha]()
+ local... | {"golden_diff": "diff --git a/pre_commit/repository.py b/pre_commit/repository.py\n--- a/pre_commit/repository.py\n+++ b/pre_commit/repository.py\n@@ -56,7 +56,7 @@\n # Project already exists, no reason to re-create it\n return\n \n- local['git']['clone', self.repo_url, self.s... | 844 | 190 |
gh_patches_debug_12470 | rasdani/github-patches | git_diff | joke2k__faker-759 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Generating invalid cpf (brazillian ssn)
Faker is generating invalid checksum digits for cpf (brazillian ssn).
### Steps to reproduce
1. Create fake instance using localization "pt_BR"
1. Call fake.cpf(... | diff --git a/faker/providers/ssn/pt_BR/__init__.py b/faker/providers/ssn/pt_BR/__init__.py
--- a/faker/providers/ssn/pt_BR/__init__.py
+++ b/faker/providers/ssn/pt_BR/__init__.py
@@ -5,6 +5,12 @@
def checksum(digits):
+ """
+ Returns the checksum of CPF digits.
+ References to the algorithm:
+ https://... | {"golden_diff": "diff --git a/faker/providers/ssn/pt_BR/__init__.py b/faker/providers/ssn/pt_BR/__init__.py\n--- a/faker/providers/ssn/pt_BR/__init__.py\n+++ b/faker/providers/ssn/pt_BR/__init__.py\n@@ -5,6 +5,12 @@\n \n \n def checksum(digits):\n+ \"\"\"\n+ Returns the checksum of CPF digits.\n+ References to... | 701 | 246 |
gh_patches_debug_4256 | rasdani/github-patches | git_diff | ivy-llc__ivy-17092 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
solve
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/tensor/linalg.py`
Co... | diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -115,6 +115,13 @@
return ivy.pinv(x, rtol=rcond)
+# solve
+@with_unsupported_dtypes({... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py\n--- a/ivy/functional/frontends/paddle/tensor/linalg.py\n+++ b/ivy/functional/frontends/paddle/tensor/linalg.py\n@@ -115,6 +115,13 @@\n return ivy.pinv(x, rtol=rcond)\n \n \n+# solve\n+@... | 1,818 | 205 |
gh_patches_debug_63106 | rasdani/github-patches | git_diff | kornia__kornia-1263 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] save pointcloud not updates num_points when inf
## 🐛 Bug
The function `K.utils.save_pointcloud_ply` doesn't update the final number of points to be serialized when one of the values contain an infin... | diff --git a/kornia/utils/pointcloud_io.py b/kornia/utils/pointcloud_io.py
--- a/kornia/utils/pointcloud_io.py
+++ b/kornia/utils/pointcloud_io.py
@@ -31,6 +31,7 @@
for idx in range(num_points):
xyz = xyz_vec[idx]
if not bool(torch.isfinite(xyz).any()):
+ num_points -= ... | {"golden_diff": "diff --git a/kornia/utils/pointcloud_io.py b/kornia/utils/pointcloud_io.py\n--- a/kornia/utils/pointcloud_io.py\n+++ b/kornia/utils/pointcloud_io.py\n@@ -31,6 +31,7 @@\n for idx in range(num_points):\n xyz = xyz_vec[idx]\n if not bool(torch.isfinite(xyz).any()):\n+ ... | 1,354 | 120 |
gh_patches_debug_42864 | rasdani/github-patches | git_diff | sunpy__sunpy-4129 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Maintain coherence between keycomments and the metadict
See #2748
This is probably best implemented by adding the functionality to our `MetaDict` object or something, so that we don't have to do it manual... | diff --git a/sunpy/util/metadata.py b/sunpy/util/metadata.py
--- a/sunpy/util/metadata.py
+++ b/sunpy/util/metadata.py
@@ -1,6 +1,6 @@
"""
This module provides a generalized dictionary class that deals with header
-parsing and normalization.
+parsing, normalization, and maintaining coherence between keys and keycomme... | {"golden_diff": "diff --git a/sunpy/util/metadata.py b/sunpy/util/metadata.py\n--- a/sunpy/util/metadata.py\n+++ b/sunpy/util/metadata.py\n@@ -1,6 +1,6 @@\n \"\"\"\n This module provides a generalized dictionary class that deals with header\n-parsing and normalization.\n+parsing, normalization, and maintaining coherenc... | 1,048 | 951 |
gh_patches_debug_16288 | rasdani/github-patches | git_diff | pytorch__vision-7702 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
to_grayscale gives non-actionable deprecation warning
_Originally reported in the [user forum](https://discuss.pytorch.org/t/cannot-find-convert-color-space/182591) by `@function2`._
> When I use to_graysc... | diff --git a/torchvision/transforms/v2/functional/_deprecated.py b/torchvision/transforms/v2/functional/_deprecated.py
--- a/torchvision/transforms/v2/functional/_deprecated.py
+++ b/torchvision/transforms/v2/functional/_deprecated.py
@@ -10,15 +10,10 @@
@torch.jit.unused
def to_grayscale(inpt: PIL.Image.Image, num... | {"golden_diff": "diff --git a/torchvision/transforms/v2/functional/_deprecated.py b/torchvision/transforms/v2/functional/_deprecated.py\n--- a/torchvision/transforms/v2/functional/_deprecated.py\n+++ b/torchvision/transforms/v2/functional/_deprecated.py\n@@ -10,15 +10,10 @@\n \n @torch.jit.unused\n def to_grayscale(inp... | 1,025 | 276 |
gh_patches_debug_28038 | rasdani/github-patches | git_diff | TheAlgorithms__Python-796 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
math CheckPrime is wrong
The current implementation doesn't support:
* Negative values, -1 is not a prime number. Current implementation raise a TypeError due to `math.sqrt` on negative values.
The curr... | diff --git a/maths/PrimeCheck.py b/maths/PrimeCheck.py
--- a/maths/PrimeCheck.py
+++ b/maths/PrimeCheck.py
@@ -1,13 +1,54 @@
import math
+import unittest
+
+
def primeCheck(number):
- if number % 2 == 0 and number > 2:
+ """
+ A number is prime if it has exactly two dividers: 1 and itself.
+ """
+ if ... | {"golden_diff": "diff --git a/maths/PrimeCheck.py b/maths/PrimeCheck.py\n--- a/maths/PrimeCheck.py\n+++ b/maths/PrimeCheck.py\n@@ -1,13 +1,54 @@\n import math\n+import unittest\n+\n+\n def primeCheck(number):\n- if number % 2 == 0 and number > 2: \n+ \"\"\"\n+ A number is prime if it has exactly two dividers: ... | 458 | 599 |
gh_patches_debug_655 | rasdani/github-patches | git_diff | pex-tool__pex-2104 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.130
On the docket:
+ [x] Pex fails to lock - missing artifact #2098
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- ... | 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.129"
+__version__ = "2.1.130"
| {"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.129\"\n+__version__ = \"2.1.130\"\n",... | 341 | 98 |
gh_patches_debug_22746 | rasdani/github-patches | git_diff | pre-commit__pre-commit-346 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Windows: Terminal width support
We detect terminal width in unixlikes by running `tput cols`. This works fine for those platforms but doesn't work well for windows. Maybe find a package which does this logi... | diff --git a/pre_commit/output.py b/pre_commit/output.py
--- a/pre_commit/output.py
+++ b/pre_commit/output.py
@@ -1,27 +1,15 @@
from __future__ import unicode_literals
-import os
-import subprocess
import sys
+from backports.shutil_get_terminal_size import get_terminal_size
+
from pre_commit import color
from ... | {"golden_diff": "diff --git a/pre_commit/output.py b/pre_commit/output.py\n--- a/pre_commit/output.py\n+++ b/pre_commit/output.py\n@@ -1,27 +1,15 @@\n from __future__ import unicode_literals\n \n-import os\n-import subprocess\n import sys\n \n+from backports.shutil_get_terminal_size import get_terminal_size\n+\n from p... | 1,602 | 339 |
gh_patches_debug_60612 | rasdani/github-patches | git_diff | cloudtools__troposphere-2037 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add support for additional Flink runtimes in Kinesis Data Analytics.
Kinesis supports additional Flink runtimes (FLINK-1_13, ZEPPELIN-FLINK-1_0, ZEPPELIN-FLINK-2_0), see https://docs.aws.amazon.com/AWSCloudF... | diff --git a/troposphere/validators/kinesisanalyticsv2.py b/troposphere/validators/kinesisanalyticsv2.py
--- a/troposphere/validators/kinesisanalyticsv2.py
+++ b/troposphere/validators/kinesisanalyticsv2.py
@@ -10,7 +10,15 @@
Property: Application.RuntimeEnvironment
"""
- VALID_RUNTIME_ENVIRONMENTS = ("S... | {"golden_diff": "diff --git a/troposphere/validators/kinesisanalyticsv2.py b/troposphere/validators/kinesisanalyticsv2.py\n--- a/troposphere/validators/kinesisanalyticsv2.py\n+++ b/troposphere/validators/kinesisanalyticsv2.py\n@@ -10,7 +10,15 @@\n Property: Application.RuntimeEnvironment\n \"\"\"\n \n- VALID... | 534 | 233 |
gh_patches_debug_6154 | rasdani/github-patches | git_diff | litestar-org__litestar-1659 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/usin... | diff --git a/litestar/contrib/repository/filters.py b/litestar/contrib/repository/filters.py
--- a/litestar/contrib/repository/filters.py
+++ b/litestar/contrib/repository/filters.py
@@ -1,13 +1,10 @@
"""Collection filter datastructures."""
from __future__ import annotations
+from collections import abc # noqa: TC... | {"golden_diff": "diff --git a/litestar/contrib/repository/filters.py b/litestar/contrib/repository/filters.py\n--- a/litestar/contrib/repository/filters.py\n+++ b/litestar/contrib/repository/filters.py\n@@ -1,13 +1,10 @@\n \"\"\"Collection filter datastructures.\"\"\"\n from __future__ import annotations\n \n+from coll... | 994 | 155 |
gh_patches_debug_26852 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-1999 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
tiles on plans and container: blue corner missing for external projects
for external projects the little blue corner is missing
mac on chrome and firefox
<img width="400" alt="bildschirmfoto 2019-02-11 ... | diff --git a/meinberlin/apps/dashboard/__init__.py b/meinberlin/apps/dashboard/__init__.py
--- a/meinberlin/apps/dashboard/__init__.py
+++ b/meinberlin/apps/dashboard/__init__.py
@@ -20,15 +20,20 @@
def get_project_components(self):
if self.project_type == 'bplan':
return [components.projects... | {"golden_diff": "diff --git a/meinberlin/apps/dashboard/__init__.py b/meinberlin/apps/dashboard/__init__.py\n--- a/meinberlin/apps/dashboard/__init__.py\n+++ b/meinberlin/apps/dashboard/__init__.py\n@@ -20,15 +20,20 @@\n def get_project_components(self):\n if self.project_type == 'bplan':\n retu... | 793 | 230 |
gh_patches_debug_4607 | rasdani/github-patches | git_diff | CTFd__CTFd-1726 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incorrect update alert in Admin panel
<!--
If this is a bug report please fill out the template below.
If this is a feature request please describe the behavior that you'd like to see.
-->
**Environme... | diff --git a/CTFd/utils/updates/__init__.py b/CTFd/utils/updates/__init__.py
--- a/CTFd/utils/updates/__init__.py
+++ b/CTFd/utils/updates/__init__.py
@@ -53,7 +53,7 @@
"channel": app.CHANNEL,
}
check = requests.get(
- "https://versioning.ctfd.io/check", params=... | {"golden_diff": "diff --git a/CTFd/utils/updates/__init__.py b/CTFd/utils/updates/__init__.py\n--- a/CTFd/utils/updates/__init__.py\n+++ b/CTFd/utils/updates/__init__.py\n@@ -53,7 +53,7 @@\n \"channel\": app.CHANNEL,\n }\n check = requests.get(\n- \"https://version... | 1,224 | 134 |
gh_patches_debug_44031 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-26 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support forward references
See: https://www.python.org/dev/peps/pep-0563/#forward-references
Right now the following code would break:
```python
from __future__ import annotations
import strawberry
... | diff --git a/strawberry/type.py b/strawberry/type.py
--- a/strawberry/type.py
+++ b/strawberry/type.py
@@ -5,7 +5,7 @@
from graphql.utilities.schema_printer import print_type
from .constants import IS_STRAWBERRY_FIELD
-from .type_converter import get_graphql_type_for_annotation
+from .type_converter import REGISTRY... | {"golden_diff": "diff --git a/strawberry/type.py b/strawberry/type.py\n--- a/strawberry/type.py\n+++ b/strawberry/type.py\n@@ -5,7 +5,7 @@\n from graphql.utilities.schema_printer import print_type\n \n from .constants import IS_STRAWBERRY_FIELD\n-from .type_converter import get_graphql_type_for_annotation\n+from .type_... | 1,924 | 982 |
gh_patches_debug_1657 | rasdani/github-patches | git_diff | kubeflow__pipelines-5054 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TypeErro occurs in gcp/automl/create_dataset_for_tables component
### What steps did you take:
[A clear and concise description of what the bug is.]
[gcp/automl/create_dataset_for_tables component](https:... | diff --git a/components/gcp/automl/create_dataset_for_tables/component.py b/components/gcp/automl/create_dataset_for_tables/component.py
--- a/components/gcp/automl/create_dataset_for_tables/component.py
+++ b/components/gcp/automl/create_dataset_for_tables/component.py
@@ -51,7 +51,7 @@
region=gcp_region,
... | {"golden_diff": "diff --git a/components/gcp/automl/create_dataset_for_tables/component.py b/components/gcp/automl/create_dataset_for_tables/component.py\n--- a/components/gcp/automl/create_dataset_for_tables/component.py\n+++ b/components/gcp/automl/create_dataset_for_tables/component.py\n@@ -51,7 +51,7 @@\n r... | 1,543 | 131 |
gh_patches_debug_7432 | rasdani/github-patches | git_diff | pulp__pulpcore-3412 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
0077_move_remote_url_credentials.py fails on Remotes that have @ in path, not netloc
**Version**
3.18.10
**Describe the bug**
Migration 0077 fails when you have a remote that has an @ somewhere in the pa... | diff --git a/pulpcore/app/migrations/0077_move_remote_url_credentials.py b/pulpcore/app/migrations/0077_move_remote_url_credentials.py
--- a/pulpcore/app/migrations/0077_move_remote_url_credentials.py
+++ b/pulpcore/app/migrations/0077_move_remote_url_credentials.py
@@ -11,6 +11,11 @@
for remote in Remote.objects.... | {"golden_diff": "diff --git a/pulpcore/app/migrations/0077_move_remote_url_credentials.py b/pulpcore/app/migrations/0077_move_remote_url_credentials.py\n--- a/pulpcore/app/migrations/0077_move_remote_url_credentials.py\n+++ b/pulpcore/app/migrations/0077_move_remote_url_credentials.py\n@@ -11,6 +11,11 @@\n for remo... | 1,388 | 172 |
gh_patches_debug_112 | rasdani/github-patches | git_diff | InstaPy__InstaPy-4046 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Instapy-chromedriver not supporting latest Chrome browser version
The Instapy-chrome driver only supports Chrome upto versions 71 and since the update, the whole program quits with the error of ensure chrome... | diff --git a/instapy/__init__.py b/instapy/__init__.py
--- a/instapy/__init__.py
+++ b/instapy/__init__.py
@@ -8,5 +8,5 @@
# __variables__ with double-quoted values will be available in setup.py
-__version__ = "0.2.1"
+__version__ = "0.2.2"
| {"golden_diff": "diff --git a/instapy/__init__.py b/instapy/__init__.py\n--- a/instapy/__init__.py\n+++ b/instapy/__init__.py\n@@ -8,5 +8,5 @@\n \n \n # __variables__ with double-quoted values will be available in setup.py\n-__version__ = \"0.2.1\"\n+__version__ = \"0.2.2\"\n", "issue": "Instapy-chromedriver not suppor... | 412 | 91 |
gh_patches_debug_25769 | rasdani/github-patches | git_diff | encode__starlette-1401 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
templateing: jinja2: pass kwargs for environment
I think it would be good to pass something like `env_kwargs` via https://github.com/blueyed/starlette/blob/24c135de71ac56a73f7f797258115941579155bf/starlette/t... | diff --git a/starlette/templating.py b/starlette/templating.py
--- a/starlette/templating.py
+++ b/starlette/templating.py
@@ -55,12 +55,14 @@
return templates.TemplateResponse("index.html", {"request": request})
"""
- def __init__(self, directory: typing.Union[str, PathLike]) -> None:
+ def __init__(... | {"golden_diff": "diff --git a/starlette/templating.py b/starlette/templating.py\n--- a/starlette/templating.py\n+++ b/starlette/templating.py\n@@ -55,12 +55,14 @@\n return templates.TemplateResponse(\"index.html\", {\"request\": request})\n \"\"\"\n \n- def __init__(self, directory: typing.Union[str, PathLik... | 1,268 | 349 |
gh_patches_debug_18185 | rasdani/github-patches | git_diff | mozilla__bugbug-214 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use the bug snapshot transform in the "uplift" model
Depends on #5.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES --... | diff --git a/bugbug/models/uplift.py b/bugbug/models/uplift.py
--- a/bugbug/models/uplift.py
+++ b/bugbug/models/uplift.py
@@ -43,7 +43,7 @@
]
self.extraction_pipeline = Pipeline([
- ('bug_extractor', bug_features.BugExtractor(feature_extractors, cleanup_functions)),
+ ('bug_ex... | {"golden_diff": "diff --git a/bugbug/models/uplift.py b/bugbug/models/uplift.py\n--- a/bugbug/models/uplift.py\n+++ b/bugbug/models/uplift.py\n@@ -43,7 +43,7 @@\n ]\n \n self.extraction_pipeline = Pipeline([\n- ('bug_extractor', bug_features.BugExtractor(feature_extractors, cleanup_functions)... | 972 | 231 |
gh_patches_debug_349 | rasdani/github-patches | git_diff | google__turbinia-1070 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing sys module import in logger.py
Logger module is missing an import statement for 'sys'
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contai... | diff --git a/turbinia/config/logger.py b/turbinia/config/logger.py
--- a/turbinia/config/logger.py
+++ b/turbinia/config/logger.py
@@ -20,6 +20,7 @@
import warnings
import logging.handlers
import os
+import sys
from turbinia import config
from turbinia import TurbiniaException
| {"golden_diff": "diff --git a/turbinia/config/logger.py b/turbinia/config/logger.py\n--- a/turbinia/config/logger.py\n+++ b/turbinia/config/logger.py\n@@ -20,6 +20,7 @@\n import warnings\n import logging.handlers\n import os\n+import sys\n \n from turbinia import config\n from turbinia import TurbiniaException\n", "iss... | 1,341 | 83 |
gh_patches_debug_23568 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-2921 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Clean up dependencies
Spring cleaning! We currently declare some dependencies which are either unused or can easily be substituted:
- h11 - not used at all?
- requests - tests + examples only.
We sho... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -66,7 +66,6 @@
"certifi>=2015.11.20.1", # no semver here - this should always be on the last release!
"click>=6.2, <7",
"cryptography>=2.1.4,<2.2",
- 'h11>=0.7.0,<0.8',
"h2>=3.0.1,<4",
"hyperframe>=5.1... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -66,7 +66,6 @@\n \"certifi>=2015.11.20.1\", # no semver here - this should always be on the last release!\n \"click>=6.2, <7\",\n \"cryptography>=2.1.4,<2.2\",\n- 'h11>=0.7.0,<0.8',\n \"h2>=3.0.... | 1,718 | 367 |
gh_patches_debug_33273 | rasdani/github-patches | git_diff | GeotrekCE__Geotrek-admin-1377 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Should not disable edit button if having bypass structure permission
Workaround: write url by hand (eg. "/trek/edit/1/").
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or m... | diff --git a/geotrek/authent/decorators.py b/geotrek/authent/decorators.py
--- a/geotrek/authent/decorators.py
+++ b/geotrek/authent/decorators.py
@@ -18,16 +18,11 @@
def _wrapped_view(self, request, *args, **kwargs):
result = view_func(self, request, *args, **kwargs)
- # Superuser is... | {"golden_diff": "diff --git a/geotrek/authent/decorators.py b/geotrek/authent/decorators.py\n--- a/geotrek/authent/decorators.py\n+++ b/geotrek/authent/decorators.py\n@@ -18,16 +18,11 @@\n def _wrapped_view(self, request, *args, **kwargs):\n result = view_func(self, request, *args, **kwargs)\n \n- ... | 1,548 | 465 |
gh_patches_debug_19323 | rasdani/github-patches | git_diff | PokemonGoF__PokemonGo-Bot-5036 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Crash on Level Up
I'm gonna guess an issue with:
https://github.com/PokemonGoF/PokemonGo-Bot/pull/5016
which is also the version im on
```
Traceback (most recent call last):
File "pokecli.py", line 781, i... | diff --git a/pokemongo_bot/cell_workers/collect_level_up_reward.py b/pokemongo_bot/cell_workers/collect_level_up_reward.py
--- a/pokemongo_bot/cell_workers/collect_level_up_reward.py
+++ b/pokemongo_bot/cell_workers/collect_level_up_reward.py
@@ -62,13 +62,11 @@
item['name'] = got_item
... | {"golden_diff": "diff --git a/pokemongo_bot/cell_workers/collect_level_up_reward.py b/pokemongo_bot/cell_workers/collect_level_up_reward.py\n--- a/pokemongo_bot/cell_workers/collect_level_up_reward.py\n+++ b/pokemongo_bot/cell_workers/collect_level_up_reward.py\n@@ -62,13 +62,11 @@\n item['name'] = ... | 1,224 | 309 |
gh_patches_debug_664 | rasdani/github-patches | git_diff | fedora-infra__bodhi-507 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
setup.py test doesn't include extra_requires from fedmsg deps
```
======================================================================
ERROR: Failure: ImportError (No module named psutil)
------------------... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,9 @@
# External resources
'python-bugzilla',
'simplemediawiki',
- 'fedmsg',
+
+ # "python setup.py test" needs one of fedmsg's setup.py extra_requires
+ 'fedmsg[consumers]',
'Sphinx',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -57,7 +57,9 @@\n # External resources\n 'python-bugzilla',\n 'simplemediawiki',\n- 'fedmsg',\n+\n+ # \"python setup.py test\" needs one of fedmsg's setup.py extra_requires\n+ 'fedmsg[consumers]',\n \n 'Sphinx'... | 1,613 | 93 |
gh_patches_debug_25493 | rasdani/github-patches | git_diff | liqd__adhocracy4-211 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Subject with new line crashes email sending
Subject with new line crashes email sending
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bu... | diff --git a/adhocracy4/emails/base.py b/adhocracy4/emails/base.py
--- a/adhocracy4/emails/base.py
+++ b/adhocracy4/emails/base.py
@@ -1,3 +1,5 @@
+import re
+
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites import models as site_models
@@ -102,8 ... | {"golden_diff": "diff --git a/adhocracy4/emails/base.py b/adhocracy4/emails/base.py\n--- a/adhocracy4/emails/base.py\n+++ b/adhocracy4/emails/base.py\n@@ -1,3 +1,5 @@\n+import re\n+\n from django.conf import settings\n from django.contrib.contenttypes.models import ContentType\n from django.contrib.sites import models ... | 1,586 | 303 |
gh_patches_debug_28410 | rasdani/github-patches | git_diff | mne-tools__mne-python-9092 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
split code block in examples/preprocessing/plot_virtual_evoked
right now, because all plots come from a single code block, they are plotted at the top of the example in a group of 4 (and consequently the plot... | diff --git a/examples/preprocessing/plot_virtual_evoked.py b/examples/preprocessing/plot_virtual_evoked.py
--- a/examples/preprocessing/plot_virtual_evoked.py
+++ b/examples/preprocessing/plot_virtual_evoked.py
@@ -26,14 +26,30 @@
fname = data_path + '/MEG/sample/sample_audvis-ave.fif'
evoked = mne.read_evokeds(fname... | {"golden_diff": "diff --git a/examples/preprocessing/plot_virtual_evoked.py b/examples/preprocessing/plot_virtual_evoked.py\n--- a/examples/preprocessing/plot_virtual_evoked.py\n+++ b/examples/preprocessing/plot_virtual_evoked.py\n@@ -26,14 +26,30 @@\n fname = data_path + '/MEG/sample/sample_audvis-ave.fif'\n evoked = ... | 773 | 365 |
gh_patches_debug_157 | rasdani/github-patches | git_diff | doccano__doccano-1907 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot access Django admin panel in a Heroku deployment
How to reproduce the behaviour
---------
The FAQ describes how to [create a user via the Django admin panel](https://github.com/doccano/doccano/blob/m... | diff --git a/backend/config/settings/heroku.py b/backend/config/settings/heroku.py
--- a/backend/config/settings/heroku.py
+++ b/backend/config/settings/heroku.py
@@ -2,4 +2,4 @@
from .base import * # noqa: F401,F403
-django_heroku.settings(locals(), test_runner=False)
+django_heroku.settings(locals(), test_runne... | {"golden_diff": "diff --git a/backend/config/settings/heroku.py b/backend/config/settings/heroku.py\n--- a/backend/config/settings/heroku.py\n+++ b/backend/config/settings/heroku.py\n@@ -2,4 +2,4 @@\n \n from .base import * # noqa: F401,F403\n \n-django_heroku.settings(locals(), test_runner=False)\n+django_heroku.sett... | 545 | 95 |
gh_patches_debug_30592 | rasdani/github-patches | git_diff | mne-tools__mne-python-4380 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove deprecated imp module
Currently, `mne/commands/utils.py` still uses the deprecated `imp` module, which has long been replaced with `importlib`. According to [this answer on SO](https://stackoverflow.co... | diff --git a/mne/commands/utils.py b/mne/commands/utils.py
--- a/mne/commands/utils.py
+++ b/mne/commands/utils.py
@@ -4,7 +4,7 @@
#
# License: BSD (3-clause)
-import imp
+import sys
import os
import re
from optparse import OptionParser
@@ -12,6 +12,42 @@
import mne
+def load_module(name, path):
+ """Loa... | {"golden_diff": "diff --git a/mne/commands/utils.py b/mne/commands/utils.py\n--- a/mne/commands/utils.py\n+++ b/mne/commands/utils.py\n@@ -4,7 +4,7 @@\n #\n # License: BSD (3-clause)\n \n-import imp\n+import sys\n import os\n import re\n from optparse import OptionParser\n@@ -12,6 +12,42 @@\n import mne\n \n \n+def loa... | 788 | 512 |
gh_patches_debug_48679 | rasdani/github-patches | git_diff | ethereum__web3.py-2659 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
protobuf dependency compatibility
* Python: 3.5
* OS: osx
* `import web3` output
```
ContextualVersionConflict
```
### What was wrong?
[protobuf](https://github.com/ethereum/web3.py/pull/1493) co... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -88,7 +88,7 @@
"ipfshttpclient==0.8.0a2",
"jsonschema>=3.2.0,<5",
"lru-dict>=1.1.6,<2.0.0",
- "protobuf>=3.10.0,<4",
+ "protobuf==3.19.4",
"pywin32>=223;platform_system=='Windows'",
"requests>=2.... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -88,7 +88,7 @@\n \"ipfshttpclient==0.8.0a2\",\n \"jsonschema>=3.2.0,<5\",\n \"lru-dict>=1.1.6,<2.0.0\",\n- \"protobuf>=3.10.0,<4\",\n+ \"protobuf==3.19.4\",\n \"pywin32>=223;platform_syste... | 1,857 | 158 |
gh_patches_debug_37097 | rasdani/github-patches | git_diff | AUTOMATIC1111__stable-diffusion-webui-12975 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Feature Request]: Where is the save style button?
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What would your feature do ?
... | diff --git a/modules/ui_prompt_styles.py b/modules/ui_prompt_styles.py
--- a/modules/ui_prompt_styles.py
+++ b/modules/ui_prompt_styles.py
@@ -4,6 +4,7 @@
styles_edit_symbol = '\U0001f58c\uFE0F' # 🖌️
styles_materialize_symbol = '\U0001f4cb' # 📋
+styles_copy_symbol = '\U0001f4dd' # 📝
def select_styl... | {"golden_diff": "diff --git a/modules/ui_prompt_styles.py b/modules/ui_prompt_styles.py\n--- a/modules/ui_prompt_styles.py\n+++ b/modules/ui_prompt_styles.py\n@@ -4,6 +4,7 @@\n \r\n styles_edit_symbol = '\\U0001f58c\\uFE0F' # \ud83d\udd8c\ufe0f\r\n styles_materialize_symbol = '\\U0001f4cb' # \ud83d\udccb\r\n+styles_c... | 1,710 | 490 |
gh_patches_debug_11197 | rasdani/github-patches | git_diff | ESMCI__cime-2860 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
floating point mpiprocs when running ./case.setup with python3
I noticed that when running with python3, mpiprocs is set to be a float, i.e.,
$ python3 ./case.setup # will create the following in .case.run... | diff --git a/scripts/lib/CIME/XML/env_mach_pes.py b/scripts/lib/CIME/XML/env_mach_pes.py
--- a/scripts/lib/CIME/XML/env_mach_pes.py
+++ b/scripts/lib/CIME/XML/env_mach_pes.py
@@ -94,7 +94,7 @@
def get_tasks_per_node(self, total_tasks, max_thread_count):
expect(total_tasks > 0,"totaltasks > 0 expected, t... | {"golden_diff": "diff --git a/scripts/lib/CIME/XML/env_mach_pes.py b/scripts/lib/CIME/XML/env_mach_pes.py\n--- a/scripts/lib/CIME/XML/env_mach_pes.py\n+++ b/scripts/lib/CIME/XML/env_mach_pes.py\n@@ -94,7 +94,7 @@\n \n def get_tasks_per_node(self, total_tasks, max_thread_count):\n expect(total_tasks > 0,\"to... | 1,955 | 179 |
gh_patches_debug_379 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-3650 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Non-executable files with shebangs in the repository
**Describe your environment**
(Nothing relevant to describe)
**Steps to reproduce**
```
$ rg -l '^#!' | xargs ls -l
-rwxr-xr-x. 1 ben ben 1420 ... | diff --git a/docs/examples/opencensus-exporter-tracer/collector.py b/docs/examples/opencensus-exporter-tracer/collector.py
--- a/docs/examples/opencensus-exporter-tracer/collector.py
+++ b/docs/examples/opencensus-exporter-tracer/collector.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-#
# Copyright The OpenTelemetry Aut... | {"golden_diff": "diff --git a/docs/examples/opencensus-exporter-tracer/collector.py b/docs/examples/opencensus-exporter-tracer/collector.py\n--- a/docs/examples/opencensus-exporter-tracer/collector.py\n+++ b/docs/examples/opencensus-exporter-tracer/collector.py\n@@ -1,5 +1,3 @@\n-#!/usr/bin/env python3\n-#\n # Copyrigh... | 1,229 | 106 |
gh_patches_debug_9537 | rasdani/github-patches | git_diff | Lightning-AI__torchmetrics-1452 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SMAPE formula typo
## 📚 Documentation
There's a typo in the [SMAPE formula](https://torchmetrics.readthedocs.io/en/stable/regression/symmetric_mean_absolute_percentage_error.html). It should be `{SMAPE}... | diff --git a/src/torchmetrics/regression/symmetric_mape.py b/src/torchmetrics/regression/symmetric_mape.py
--- a/src/torchmetrics/regression/symmetric_mape.py
+++ b/src/torchmetrics/regression/symmetric_mape.py
@@ -25,7 +25,7 @@
class SymmetricMeanAbsolutePercentageError(Metric):
r"""Computes symmetric mean absol... | {"golden_diff": "diff --git a/src/torchmetrics/regression/symmetric_mape.py b/src/torchmetrics/regression/symmetric_mape.py\n--- a/src/torchmetrics/regression/symmetric_mape.py\n+++ b/src/torchmetrics/regression/symmetric_mape.py\n@@ -25,7 +25,7 @@\n class SymmetricMeanAbsolutePercentageError(Metric):\n r\"\"\"Comp... | 1,379 | 241 |
gh_patches_debug_11153 | rasdani/github-patches | git_diff | open-mmlab__mmsegmentation-19 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
FileNotFoundError: [Errno 2] No such file or directory: 'VOCdevkit/VOCaug/dataset/trainval.txt'
https://github.com/open-mmlab/mmsegmentation/blob/1c3f54765981ba352d4cf6582edb1c8915e51d71/tools/convert_dataset... | diff --git a/tools/convert_datasets/voc_aug.py b/tools/convert_datasets/voc_aug.py
--- a/tools/convert_datasets/voc_aug.py
+++ b/tools/convert_datasets/voc_aug.py
@@ -50,8 +50,12 @@
list(mmcv.scandir(in_dir, suffix='.mat')),
nproc=nproc)
- with open(osp.join(aug_path, 'dataset', 'trainval.txt')) ... | {"golden_diff": "diff --git a/tools/convert_datasets/voc_aug.py b/tools/convert_datasets/voc_aug.py\n--- a/tools/convert_datasets/voc_aug.py\n+++ b/tools/convert_datasets/voc_aug.py\n@@ -50,8 +50,12 @@\n list(mmcv.scandir(in_dir, suffix='.mat')),\n nproc=nproc)\n \n- with open(osp.join(aug_path, 'dat... | 1,328 | 228 |
gh_patches_debug_2582 | rasdani/github-patches | git_diff | azavea__raster-vision-1586 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Same explanation for SlidingWindowGeoDataset and RandomWindowGeoDataset
## 📚 Documentation
<!-- A clear and concise description of what content in https://docs.rastervision.io/ is an issue.-->
> The Sl... | diff --git a/rastervision_core/rastervision/core/data/class_config.py b/rastervision_core/rastervision/core/data/class_config.py
--- a/rastervision_core/rastervision/core/data/class_config.py
+++ b/rastervision_core/rastervision/core/data/class_config.py
@@ -120,5 +120,6 @@
@property
def color_triples(self)... | {"golden_diff": "diff --git a/rastervision_core/rastervision/core/data/class_config.py b/rastervision_core/rastervision/core/data/class_config.py\n--- a/rastervision_core/rastervision/core/data/class_config.py\n+++ b/rastervision_core/rastervision/core/data/class_config.py\n@@ -120,5 +120,6 @@\n \n @property\n ... | 1,792 | 136 |
gh_patches_debug_10054 | rasdani/github-patches | git_diff | acl-org__acl-anthology-990 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Recaser bug: adding fixed-case inside tex-math markup
`<tex-math><fixed-case>O</fixed-case>(<fixed-case>M</fixed-case>(n^2))</tex-math>` caused the build to fail in #892
--- END ISSUE ---
Below are some cod... | diff --git a/bin/fixedcase/protect.py b/bin/fixedcase/protect.py
--- a/bin/fixedcase/protect.py
+++ b/bin/fixedcase/protect.py
@@ -24,7 +24,7 @@
# recursive helper called by protect
# protect text of "node", including children, and tails of children
def protect_recurse(node, recased):
- if node.tag == "fixed-case... | {"golden_diff": "diff --git a/bin/fixedcase/protect.py b/bin/fixedcase/protect.py\n--- a/bin/fixedcase/protect.py\n+++ b/bin/fixedcase/protect.py\n@@ -24,7 +24,7 @@\n # recursive helper called by protect\n # protect text of \"node\", including children, and tails of children\n def protect_recurse(node, recased):\n- ... | 1,767 | 161 |
gh_patches_debug_13 | rasdani/github-patches | git_diff | OCHA-DAP__hdx-ckan-1779 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ebola Page>Map: disable scroll wheel zoom
CJ - The specific property is here: https://github.com/OCHA-DAP/hdx-design/blob/gh-pages/js/country.js
line 111: map.scrollWheelZoom.disable();
--- END ISSUE ---
... | diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
@@ -1 +1 @@
-hdx_version = 'v0.5.1'
+hdx_version = 'v0.5.2'
| {"golden_diff": "diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py\n--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py\n+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py\n@@ -1 +1 @@\n-hdx_version = 'v0.5.1'\n+hdx_version = 'v0.5.2'\n", "issue": "Ebola Pag... | 335 | 106 |
gh_patches_debug_40775 | rasdani/github-patches | git_diff | streamlink__streamlink-3662 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plugins.bfmtv: No playable streams found
Hello. for few days, the plugin isn't working anymore
/usr/local/bin/streamlink --loglevel debug https://rmcdecouverte.bfmtv.com/mediaplayer-direct/ best
[cli]... | diff --git a/src/streamlink/plugins/bfmtv.py b/src/streamlink/plugins/bfmtv.py
--- a/src/streamlink/plugins/bfmtv.py
+++ b/src/streamlink/plugins/bfmtv.py
@@ -1,8 +1,11 @@
import logging
import re
+from urllib.parse import urljoin, urlparse
from streamlink.plugin import Plugin
+from streamlink.plugin.api.utils imp... | {"golden_diff": "diff --git a/src/streamlink/plugins/bfmtv.py b/src/streamlink/plugins/bfmtv.py\n--- a/src/streamlink/plugins/bfmtv.py\n+++ b/src/streamlink/plugins/bfmtv.py\n@@ -1,8 +1,11 @@\n import logging\n import re\n+from urllib.parse import urljoin, urlparse\n \n from streamlink.plugin import Plugin\n+from strea... | 1,111 | 955 |
gh_patches_debug_486 | rasdani/github-patches | git_diff | DDMAL__CantusDB-228 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove the "Users Online" section in footer.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `django/cantus... | diff --git a/django/cantusdb_project/main_app/templatetags/helper_tags.py b/django/cantusdb_project/main_app/templatetags/helper_tags.py
--- a/django/cantusdb_project/main_app/templatetags/helper_tags.py
+++ b/django/cantusdb_project/main_app/templatetags/helper_tags.py
@@ -44,3 +44,7 @@
options += option_str
... | {"golden_diff": "diff --git a/django/cantusdb_project/main_app/templatetags/helper_tags.py b/django/cantusdb_project/main_app/templatetags/helper_tags.py\n--- a/django/cantusdb_project/main_app/templatetags/helper_tags.py\n+++ b/django/cantusdb_project/main_app/templatetags/helper_tags.py\n@@ -44,3 +44,7 @@\n o... | 712 | 137 |
gh_patches_debug_13979 | rasdani/github-patches | git_diff | facebookresearch__fairscale-975 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
the main branch is not compatible with python 3.6, but setup.py only requires ">=3.6"
python 3.6 can pip install latest fairscale
https://github.com/facebookresearch/fairscale/blob/1bc96fa8c69def6d990e42bfbd... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,7 @@
packages=setuptools.find_packages(exclude=("tests", "tests.*")),
ext_modules=extensions,
cmdclass=cmdclass,
- python_requires=">=3.6",
+ python_requires=">=3.7",
author="Facebook AI Researc... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -64,7 +64,7 @@\n packages=setuptools.find_packages(exclude=(\"tests\", \"tests.*\")),\n ext_modules=extensions,\n cmdclass=cmdclass,\n- python_requires=\">=3.6\",\n+ python_requires=\">=3.7\",\n ... | 1,297 | 138 |
gh_patches_debug_16300 | rasdani/github-patches | git_diff | pre-commit__pre-commit-399 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Drop python2.6?
Is it worth attempting to continue to support python2.6?
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FI... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,6 @@
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -18,7 +18,6 @@\n classifiers=[\n 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Python :: 2',\n- 'Programming Language :: Python :: 2.6',\n 'Programming Language :: Python :: 2.... | 796 | 174 |
gh_patches_debug_21753 | rasdani/github-patches | git_diff | Flexget__Flexget-1600 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
nyaa changed TLD
hi peeps. it seems they switched TLD from .eu to .se
i changed my local flexget/plugins/sites/nyaa.py, removed the pyc & reloaded the daemon. its pulling stuff. but i aint got the skills t... | diff --git a/flexget/plugins/sites/nyaa.py b/flexget/plugins/sites/nyaa.py
--- a/flexget/plugins/sites/nyaa.py
+++ b/flexget/plugins/sites/nyaa.py
@@ -47,7 +47,7 @@
entries = set()
for search_string in entry.get('search_strings', [entry['title']]):
name = normalize_unicode(search_string)
... | {"golden_diff": "diff --git a/flexget/plugins/sites/nyaa.py b/flexget/plugins/sites/nyaa.py\n--- a/flexget/plugins/sites/nyaa.py\n+++ b/flexget/plugins/sites/nyaa.py\n@@ -47,7 +47,7 @@\n entries = set()\n for search_string in entry.get('search_strings', [entry['title']]):\n name = normalize_... | 1,294 | 292 |
gh_patches_debug_10022 | rasdani/github-patches | git_diff | bokeh__bokeh-6724 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set initial date in date picker in models/file/widgets
This is needed to make image diff not fail when example is run on different days.
--- END ISSUE ---
Below are some code segments, each from a relevan... | diff --git a/examples/models/file/widgets.py b/examples/models/file/widgets.py
--- a/examples/models/file/widgets.py
+++ b/examples/models/file/widgets.py
@@ -1,6 +1,6 @@
from __future__ import print_function
-#from datetime import date
+from datetime import date
from bokeh.document import Document
from bokeh.em... | {"golden_diff": "diff --git a/examples/models/file/widgets.py b/examples/models/file/widgets.py\n--- a/examples/models/file/widgets.py\n+++ b/examples/models/file/widgets.py\n@@ -1,6 +1,6 @@\n from __future__ import print_function\n \n-#from datetime import date\n+from datetime import date\n \n from bokeh.document impo... | 1,837 | 163 |
gh_patches_debug_5302 | rasdani/github-patches | git_diff | searx__searx-2991 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Only a lower case "ip" displays the IP address
When the feature is enabled to show a user's IP address when "ip" is entered into the search bar, it only does so when it is all lowercase. Querying "IP" does no... | diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py
--- a/searx/plugins/self_info.py
+++ b/searx/plugins/self_info.py
@@ -31,7 +31,7 @@
def post_search(request, search):
if search.search_query.pageno > 1:
return True
- if search.search_query.query == 'ip':
+ if search.search_query.... | {"golden_diff": "diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py\n--- a/searx/plugins/self_info.py\n+++ b/searx/plugins/self_info.py\n@@ -31,7 +31,7 @@\n def post_search(request, search):\n if search.search_query.pageno > 1:\n return True\n- if search.search_query.query == 'ip':\n+ ... | 808 | 134 |
gh_patches_debug_24158 | rasdani/github-patches | git_diff | pystiche__pystiche-9 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
propagate_guide() of Encoder raises a TypeError
When running the replication of [Gatys et al. 2017](https://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/replication/gatys_et_al_201... | diff --git a/pystiche/typing.py b/pystiche/typing.py
--- a/pystiche/typing.py
+++ b/pystiche/typing.py
@@ -1,4 +1,4 @@
-from typing import Union, Sequence
+from typing import Union, Any, Sequence
import torch
from torch import nn
@@ -6,8 +6,10 @@
"Numeric",
"TensorMeta",
"ConvModule",
+ "is_conv_m... | {"golden_diff": "diff --git a/pystiche/typing.py b/pystiche/typing.py\n--- a/pystiche/typing.py\n+++ b/pystiche/typing.py\n@@ -1,4 +1,4 @@\n-from typing import Union, Sequence\n+from typing import Union, Any, Sequence\n import torch\n from torch import nn\n \n@@ -6,8 +6,10 @@\n \"Numeric\",\n \"TensorMeta\",\n ... | 801 | 388 |
gh_patches_debug_12132 | rasdani/github-patches | git_diff | angr__angr-1862 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Strange successors of the return block of a function
I'm analysing a MIPS binary when facing the problem.
The problem exists in the funcition `do_ssc`.
In the following block which has a return statemen... | diff --git a/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py b/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py
--- a/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py
+++ b/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py
@@ -97,7 +97,13 @@
simgr.run()
if sim... | {"golden_diff": "diff --git a/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py b/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py\n--- a/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py\n+++ b/angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py\n@@ -97,7 +97,13 @@\n simgr.ru... | 1,794 | 246 |
gh_patches_debug_1220 | rasdani/github-patches | git_diff | DataBiosphere__toil-239 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Jenkins should only deploy to PyPI when building off the master branch
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILE... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
setup(
name='toil',
- version='3.0.4',
+ version='3.0.5.dev1',
description='Pipeline management software for clusters.',
author='Benedict Paten',
author_email='benedict@soe.usc.edu',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -2,7 +2,7 @@\n \n setup(\n name='toil',\n- version='3.0.4',\n+ version='3.0.5.dev1',\n description='Pipeline management software for clusters.',\n author='Benedict Paten',\n author_email='benedict@soe.usc.edu',\n... | 600 | 93 |
gh_patches_debug_59245 | rasdani/github-patches | git_diff | facebookresearch__hydra-287 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] example of override fail in multirun
This fails
`python examples/tutorial/5_composition/my_app.py -m db=mysql,postgresql db.user=omry`
--- END ISSUE ---
Below are some code segments, each from a re... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -104,7 +104,7 @@
"Operating System :: Microsoft :: Windows",
],
install_requires=[
- "omegaconf>=1.4.0rc2",
+ "omegaconf>=1.4.0rc3",
'pathlib2>=2.2.0;python_version<"3.0"',
],
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -104,7 +104,7 @@\n \"Operating System :: Microsoft :: Windows\",\n ],\n install_requires=[\n- \"omegaconf>=1.4.0rc2\",\n+ \"omegaconf>=1.4.0rc3\",\n 'pathlib2>=2.2.0;python... | 1,366 | 105 |
gh_patches_debug_5110 | rasdani/github-patches | git_diff | mindsdb__mindsdb-177 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'PredictTransactionOutputData' object has no attribute 'predicted_values'
**Describe the bug**
After running predict.py in the example mindsdb/docs/examples/time_series/ I got the following A... | diff --git a/docs/examples/nlp/predict.py b/docs/examples/nlp/predict.py
--- a/docs/examples/nlp/predict.py
+++ b/docs/examples/nlp/predict.py
@@ -18,4 +18,4 @@
# you can now print the results
print('The predicted number of rooms')
-print(result.predicted_values)
+print(result)
diff --git a/docs/examples/time_serie... | {"golden_diff": "diff --git a/docs/examples/nlp/predict.py b/docs/examples/nlp/predict.py\n--- a/docs/examples/nlp/predict.py\n+++ b/docs/examples/nlp/predict.py\n@@ -18,4 +18,4 @@\n \n # you can now print the results\n print('The predicted number of rooms')\n-print(result.predicted_values)\n+print(result)\ndiff --git ... | 864 | 172 |
gh_patches_debug_58021 | rasdani/github-patches | git_diff | sopel-irc__sopel-949 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Problem in (at least) Wikipedia module: possibly Unicode related
Hi,
observe the following use case:
https://en.wikipedia.org/wiki/Hir%C5%8D_Onoda
@willie_5.4.1 KeyError: u'extract' (file "/usr/local/... | diff --git a/sopel/modules/wikipedia.py b/sopel/modules/wikipedia.py
--- a/sopel/modules/wikipedia.py
+++ b/sopel/modules/wikipedia.py
@@ -15,7 +15,8 @@
import sys
if sys.version_info.major < 3:
- from urlparse import unquote
+ from urlparse import unquote as _unquote
+ unquote = lambda s: _unquote(s.encod... | {"golden_diff": "diff --git a/sopel/modules/wikipedia.py b/sopel/modules/wikipedia.py\n--- a/sopel/modules/wikipedia.py\n+++ b/sopel/modules/wikipedia.py\n@@ -15,7 +15,8 @@\n \n import sys\n if sys.version_info.major < 3:\n- from urlparse import unquote\n+ from urlparse import unquote as _unquote\n+ unquote = ... | 1,752 | 119 |
gh_patches_debug_585 | rasdani/github-patches | git_diff | pex-tool__pex-1679 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.73
On the docket:
+ [x] Unexpected distribution hash #1683
+ [x] Pex fails to parse wheel tags correctly when resolving from a lock. #1676
+ [x] `pex3 lock create --style universal` does not ... | 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.72"
+__version__ = "2.1.73"
| {"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.72\"\n+__version__ = \"2.1.73\"\n", "... | 386 | 96 |
gh_patches_debug_40938 | rasdani/github-patches | git_diff | Cog-Creators__Red-DiscordBot-3911 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Mod cog sends owner notifications on fresh install.
# Other bugs
I got reminded about it when I saw a fix for #3587. Mod cog sends owner notifications about `[p]moveignoredchannels` and `[p]movedeletedelay... | diff --git a/redbot/cogs/mod/mod.py b/redbot/cogs/mod/mod.py
--- a/redbot/cogs/mod/mod.py
+++ b/redbot/cogs/mod/mod.py
@@ -6,6 +6,8 @@
from typing import List, Tuple
import discord
+from redbot.core.utils import AsyncIter
+
from redbot.core import Config, modlog, commands
from redbot.core.bot import Red
from red... | {"golden_diff": "diff --git a/redbot/cogs/mod/mod.py b/redbot/cogs/mod/mod.py\n--- a/redbot/cogs/mod/mod.py\n+++ b/redbot/cogs/mod/mod.py\n@@ -6,6 +6,8 @@\n from typing import List, Tuple\n \n import discord\n+from redbot.core.utils import AsyncIter\n+\n from redbot.core import Config, modlog, commands\n from redbot.co... | 1,965 | 800 |
gh_patches_debug_577 | rasdani/github-patches | git_diff | numba__numba-1356 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use CPython allocator in NRT
NRT should optionally use the CPython memory allocation functions (when imported from CPython). This would allow Numba-allocated memory to be seen by other utilities such as `sys.... | diff --git a/numba/runtime/nrt.py b/numba/runtime/nrt.py
--- a/numba/runtime/nrt.py
+++ b/numba/runtime/nrt.py
@@ -98,7 +98,8 @@
# Alias to _nrt_python._MemInfo
MemInfo = _nrt._MemInfo
-# Create uninitialized runtime
+# Create runtime
+_nrt.memsys_use_cpython_allocator()
rtsys = _Runtime()
# Install finalizer
| {"golden_diff": "diff --git a/numba/runtime/nrt.py b/numba/runtime/nrt.py\n--- a/numba/runtime/nrt.py\n+++ b/numba/runtime/nrt.py\n@@ -98,7 +98,8 @@\n # Alias to _nrt_python._MemInfo\n MemInfo = _nrt._MemInfo\n \n-# Create uninitialized runtime\n+# Create runtime\n+_nrt.memsys_use_cpython_allocator()\n rtsys = _Runtime... | 1,355 | 106 |
gh_patches_debug_36848 | rasdani/github-patches | git_diff | pwndbg__pwndbg-1920 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The `ctx threads` (or `threads`) should display all threads no matter of context threads limit
cc: @CptGibbon we should probably add this option for convenience :)
--- END ISSUE ---
Below are some code segm... | diff --git a/pwndbg/commands/tls.py b/pwndbg/commands/tls.py
--- a/pwndbg/commands/tls.py
+++ b/pwndbg/commands/tls.py
@@ -5,6 +5,10 @@
import argparse
+import gdb
+from tabulate import tabulate
+
+import pwndbg.color.memory as M
import pwndbg.commands
import pwndbg.gdblib.tls
from pwndbg.color import message
@... | {"golden_diff": "diff --git a/pwndbg/commands/tls.py b/pwndbg/commands/tls.py\n--- a/pwndbg/commands/tls.py\n+++ b/pwndbg/commands/tls.py\n@@ -5,6 +5,10 @@\n \n import argparse\n \n+import gdb\n+from tabulate import tabulate\n+\n+import pwndbg.color.memory as M\n import pwndbg.commands\n import pwndbg.gdblib.tls\n from... | 766 | 781 |
gh_patches_debug_8221 | rasdani/github-patches | git_diff | cisagov__manage.get.gov-1094 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Check Domain availability via epp-Testing
### Issue Description
When adding the /availability endpoint we will need to send a CheckDomain request to epp to see if the domain is available. This epp function... | diff --git a/src/epplibwrapper/__init__.py b/src/epplibwrapper/__init__.py
--- a/src/epplibwrapper/__init__.py
+++ b/src/epplibwrapper/__init__.py
@@ -45,6 +45,7 @@
from .client import CLIENT, commands
from .errors import RegistryError, ErrorCode
from epplib.models import common
+ from epplib import r... | {"golden_diff": "diff --git a/src/epplibwrapper/__init__.py b/src/epplibwrapper/__init__.py\n--- a/src/epplibwrapper/__init__.py\n+++ b/src/epplibwrapper/__init__.py\n@@ -45,6 +45,7 @@\n from .client import CLIENT, commands\n from .errors import RegistryError, ErrorCode\n from epplib.models import common\n+... | 1,067 | 140 |
gh_patches_debug_13162 | rasdani/github-patches | git_diff | chainer__chainer-2143 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Stop using ABC in Serializer
AbstractSerializer is currently written as an abstract base class. I don't think it is needed to support ABC.
--- END ISSUE ---
Below are some code segments, each from a relevan... | diff --git a/chainer/serializer.py b/chainer/serializer.py
--- a/chainer/serializer.py
+++ b/chainer/serializer.py
@@ -1,14 +1,7 @@
-import abc
-
-import six
-
-
-@six.add_metaclass(abc.ABCMeta)
class AbstractSerializer(object):
"""Abstract base class of all serializers and deserializers."""
- @abc.abstrac... | {"golden_diff": "diff --git a/chainer/serializer.py b/chainer/serializer.py\n--- a/chainer/serializer.py\n+++ b/chainer/serializer.py\n@@ -1,14 +1,7 @@\n-import abc\n-\n-import six\n-\n-\n-@six.add_metaclass(abc.ABCMeta)\n class AbstractSerializer(object):\n \n \"\"\"Abstract base class of all serializers and deser... | 969 | 158 |
gh_patches_debug_9091 | rasdani/github-patches | git_diff | pytorch__ignite-320 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ParamScheduler docs missing
No docs on `ParamScheduler` and related classes on the [site](https://pytorch.org/ignite/contrib/handlers.html).
--- END ISSUE ---
Below are some code segments, each from a relev... | diff --git a/ignite/contrib/engines/__init__.py b/ignite/contrib/engines/__init__.py
--- a/ignite/contrib/engines/__init__.py
+++ b/ignite/contrib/engines/__init__.py
@@ -2,6 +2,3 @@
from ignite.contrib.engines.tbptt import create_supervised_tbptt_trainer
from ignite.contrib.engines.tbptt import Tbptt_Events
-
-
-_... | {"golden_diff": "diff --git a/ignite/contrib/engines/__init__.py b/ignite/contrib/engines/__init__.py\n--- a/ignite/contrib/engines/__init__.py\n+++ b/ignite/contrib/engines/__init__.py\n@@ -2,6 +2,3 @@\n \n from ignite.contrib.engines.tbptt import create_supervised_tbptt_trainer\n from ignite.contrib.engines.tbptt imp... | 449 | 224 |
gh_patches_debug_5758 | rasdani/github-patches | git_diff | fossasia__open-event-server-2489 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Propose attendees/ticketing API
With the orga app and the implementation of API endpoints in this PR https://github.com/fossasia/open-event-orga-server/pull/2379 we have the first steps to an attendee API. In... | diff --git a/app/api/tickets.py b/app/api/tickets.py
--- a/app/api/tickets.py
+++ b/app/api/tickets.py
@@ -52,5 +52,13 @@
"""Get information about a ticket"""
return TicketingManager.get_ticket(ticket_id=ticket_id)
+@api.route('/events/<int:event_id>/orders/<string:identifier>')
+class Order(Resourc... | {"golden_diff": "diff --git a/app/api/tickets.py b/app/api/tickets.py\n--- a/app/api/tickets.py\n+++ b/app/api/tickets.py\n@@ -52,5 +52,13 @@\n \"\"\"Get information about a ticket\"\"\"\n return TicketingManager.get_ticket(ticket_id=ticket_id)\n \n+@api.route('/events/<int:event_id>/orders/<string:iden... | 852 | 153 |
gh_patches_debug_17306 | rasdani/github-patches | git_diff | cal-itp__benefits-2116 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Refactor claims handling for integer claims
During the OAuth `authorize` flow, we look for [boolean claim values](https://github.com/cal-itp/benefits/blob/dev/benefits/oauth/views.py#L75) to determine if the ... | diff --git a/benefits/oauth/views.py b/benefits/oauth/views.py
--- a/benefits/oauth/views.py
+++ b/benefits/oauth/views.py
@@ -69,11 +69,12 @@
if userinfo:
claim_value = userinfo.get(verifier_claim)
- # the claim comes back in userinfo like { "claim": "True" | "False" }
+ #... | {"golden_diff": "diff --git a/benefits/oauth/views.py b/benefits/oauth/views.py\n--- a/benefits/oauth/views.py\n+++ b/benefits/oauth/views.py\n@@ -69,11 +69,12 @@\n \n if userinfo:\n claim_value = userinfo.get(verifier_claim)\n- # the claim comes back in userinfo like { \"claim\": \"True\... | 1,824 | 231 |
gh_patches_debug_43093 | rasdani/github-patches | git_diff | python-telegram-bot__python-telegram-bot-3261 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Suggestion] Add chat(s) parameter to ChatJoinRequestHandler
This param should allow to filter out chats which will be handled by the ChatJoinRequestHandler, much like the pattern argument of the CallbackQuer... | diff --git a/telegram/ext/_chatjoinrequesthandler.py b/telegram/ext/_chatjoinrequesthandler.py
--- a/telegram/ext/_chatjoinrequesthandler.py
+++ b/telegram/ext/_chatjoinrequesthandler.py
@@ -18,16 +18,27 @@
# along with this program. If not, see [http://www.gnu.org/licenses/].
"""This module contains the ChatJoinReq... | {"golden_diff": "diff --git a/telegram/ext/_chatjoinrequesthandler.py b/telegram/ext/_chatjoinrequesthandler.py\n--- a/telegram/ext/_chatjoinrequesthandler.py\n+++ b/telegram/ext/_chatjoinrequesthandler.py\n@@ -18,16 +18,27 @@\n # along with this program. If not, see [http://www.gnu.org/licenses/].\n \"\"\"This module... | 1,103 | 987 |
gh_patches_debug_8876 | rasdani/github-patches | git_diff | microsoft__MLOS-211 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sphinx Python API docs generation broken in recent nightly CI runs
For example: <https://github.com/microsoft/MLOS/runs/1635132574?check_suite_focus=true>
--- END ISSUE ---
Below are some code segments, eac... | diff --git a/source/Mlos.Python/mlos/Spaces/Point.py b/source/Mlos.Python/mlos/Spaces/Point.py
--- a/source/Mlos.Python/mlos/Spaces/Point.py
+++ b/source/Mlos.Python/mlos/Spaces/Point.py
@@ -55,7 +55,10 @@
if dimension_name == "__isabstractmethod__":
# A sad but necessary way to deal with ABC.
... | {"golden_diff": "diff --git a/source/Mlos.Python/mlos/Spaces/Point.py b/source/Mlos.Python/mlos/Spaces/Point.py\n--- a/source/Mlos.Python/mlos/Spaces/Point.py\n+++ b/source/Mlos.Python/mlos/Spaces/Point.py\n@@ -55,7 +55,10 @@\n if dimension_name == \"__isabstractmethod__\":\r\n # A sad but necessary... | 1,758 | 162 |
gh_patches_debug_37529 | rasdani/github-patches | git_diff | dmlc__dgl-5377 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Sparse] Support column-wise softmax.
## 🔨Work Item
**IMPORTANT:**
* This template is only for dev team to track project progress. For feature request or bug report, please use the corresponding issue te... | diff --git a/python/dgl/sparse/softmax.py b/python/dgl/sparse/softmax.py
--- a/python/dgl/sparse/softmax.py
+++ b/python/dgl/sparse/softmax.py
@@ -8,11 +8,10 @@
__all__ = ["softmax"]
-def softmax(input: SparseMatrix) -> SparseMatrix:
- """Applies row-wise softmax to the non-zero elements of the sparse matrix.
-... | {"golden_diff": "diff --git a/python/dgl/sparse/softmax.py b/python/dgl/sparse/softmax.py\n--- a/python/dgl/sparse/softmax.py\n+++ b/python/dgl/sparse/softmax.py\n@@ -8,11 +8,10 @@\n __all__ = [\"softmax\"]\n \n \n-def softmax(input: SparseMatrix) -> SparseMatrix:\n- \"\"\"Applies row-wise softmax to the non-zero el... | 1,143 | 863 |
gh_patches_debug_20857 | rasdani/github-patches | git_diff | bridgecrewio__checkov-3127 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
baseline output can change resource order for each run
If I generate a baseline file and I have then made some improvements to my Terraform code and I run the baseline again. What I am finding is that the ord... | diff --git a/checkov/common/output/baseline.py b/checkov/common/output/baseline.py
--- a/checkov/common/output/baseline.py
+++ b/checkov/common/output/baseline.py
@@ -2,6 +2,8 @@
import json
from collections import defaultdict
+from operator import itemgetter
+
from checkov.common.models.enums import CheckResult
... | {"golden_diff": "diff --git a/checkov/common/output/baseline.py b/checkov/common/output/baseline.py\n--- a/checkov/common/output/baseline.py\n+++ b/checkov/common/output/baseline.py\n@@ -2,6 +2,8 @@\n \n import json\n from collections import defaultdict\n+from operator import itemgetter\n+\n from checkov.common.models.... | 1,745 | 235 |
gh_patches_debug_10241 | rasdani/github-patches | git_diff | rootpy__rootpy-748 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error when using root_open: 'TDirectory' object has no attribute 'func'
As above:
`AttributeError: 'TDirectory' object has no attribute 'func'`
--- END ISSUE ---
Below are some code segments, each from a... | diff --git a/rootpy/ROOT.py b/rootpy/ROOT.py
--- a/rootpy/ROOT.py
+++ b/rootpy/ROOT.py
@@ -130,8 +130,7 @@
gPad = proxy_global("gPad")
gVirtualX = proxy_global("gVirtualX")
- if ROOT_VERSION < (5, 32, 0): # pragma: no cover
- # handle versions of ROOT older than 5.32.00
+ if ROOT_VERSION < (5,... | {"golden_diff": "diff --git a/rootpy/ROOT.py b/rootpy/ROOT.py\n--- a/rootpy/ROOT.py\n+++ b/rootpy/ROOT.py\n@@ -130,8 +130,7 @@\n gPad = proxy_global(\"gPad\")\n gVirtualX = proxy_global(\"gVirtualX\")\n \n- if ROOT_VERSION < (5, 32, 0): # pragma: no cover\n- # handle versions of ROOT older than 5.32.... | 1,662 | 191 |
gh_patches_debug_22709 | rasdani/github-patches | git_diff | sopel-irc__sopel-2494 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Root module description is a mini-rant about LC_ALL rather than a description of the library
### Description
Looking at the `sopel` module with `pydoc` in an interactive prompt) exposes the user to [a short ... | diff --git a/sopel/__init__.py b/sopel/__init__.py
--- a/sopel/__init__.py
+++ b/sopel/__init__.py
@@ -1,8 +1,9 @@
-# ASCII ONLY IN THIS FILE THOUGH!!!!!!!
-# Python does some stupid bullshit of respecting LC_ALL over the encoding on the
-# file, so in order to undo Python's ridiculous fucking idiocy, we have to have
-... | {"golden_diff": "diff --git a/sopel/__init__.py b/sopel/__init__.py\n--- a/sopel/__init__.py\n+++ b/sopel/__init__.py\n@@ -1,8 +1,9 @@\n-# ASCII ONLY IN THIS FILE THOUGH!!!!!!!\n-# Python does some stupid bullshit of respecting LC_ALL over the encoding on the\n-# file, so in order to undo Python's ridiculous fucking id... | 1,299 | 370 |
gh_patches_debug_30963 | rasdani/github-patches | git_diff | bridgecrewio__checkov-5638 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CKV_AZURE_226: error in check and testcase
**Describe the issue**
CKV_AZURE_226 checks for ephemeral disks within the "main resource" azurerm_kubernetes_cluster but the cluster itself doesn't have any argume... | diff --git a/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabled.py b/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabled.py
--- a/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabled.py
+++ b/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabled.py
@@ -1,4 +1,3 ... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabled.py b/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabled.py\n--- a/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabled.py\n+++ b/checkov/terraform/checks/resource/azure/AKSEncryptionAtHostEnabl... | 1,981 | 511 |
gh_patches_debug_20164 | rasdani/github-patches | git_diff | pytorch__vision-2258 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Raise error if target boxes are degenerate in Faster R-CNN
We have had a number of reports with users saying that their training loss is nan after a few iterations.
Most of the time, this is due to degener... | diff --git a/torchvision/models/detection/generalized_rcnn.py b/torchvision/models/detection/generalized_rcnn.py
--- a/torchvision/models/detection/generalized_rcnn.py
+++ b/torchvision/models/detection/generalized_rcnn.py
@@ -77,6 +77,21 @@
original_image_sizes.append((val[0], val[1]))
images, ... | {"golden_diff": "diff --git a/torchvision/models/detection/generalized_rcnn.py b/torchvision/models/detection/generalized_rcnn.py\n--- a/torchvision/models/detection/generalized_rcnn.py\n+++ b/torchvision/models/detection/generalized_rcnn.py\n@@ -77,6 +77,21 @@\n original_image_sizes.append((val[0], val[1])... | 1,445 | 286 |
gh_patches_debug_1514 | rasdani/github-patches | git_diff | ocadotechnology__aimmo-543 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Latest minikube not starting on Travis CI
Same issue and hopefully fix as this https://github.com/kubernetes/minikube/issues/2704
--- END ISSUE ---
Below are some code segments, each from a relevant file. O... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@
'httmock',
'mock == 2.0.0',
'docker == 2.7.0',
- 'kubernetes == 4.0.0',
+ 'kubernetes == 5.0.0',
'PyYAML == 3.12',
],
test_suite='setuptest.setuptest.SetupTestSuite',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -28,7 +28,7 @@\n 'httmock',\n 'mock == 2.0.0',\n 'docker == 2.7.0',\n- 'kubernetes == 4.0.0',\n+ 'kubernetes == 5.0.0',\n 'PyYAML == 3.12',\n ],\n test_suite='setuptest.setuptest.S... | 630 | 114 |
gh_patches_debug_1492 | rasdani/github-patches | git_diff | wright-group__WrightTools-590 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Change __version__ to match pep 440
Specifically, when a branch is specified, it should use a plus sign instead of minus
https://www.python.org/dev/peps/pep-0440/#local-version-identifiers
https://githu... | diff --git a/WrightTools/__version__.py b/WrightTools/__version__.py
--- a/WrightTools/__version__.py
+++ b/WrightTools/__version__.py
@@ -30,6 +30,6 @@
with open(p) as f:
__branch__ = f.readline().rstrip().split(r'/')[-1]
if __branch__ != 'master':
- __version__ += '-' + __branch__
+ _... | {"golden_diff": "diff --git a/WrightTools/__version__.py b/WrightTools/__version__.py\n--- a/WrightTools/__version__.py\n+++ b/WrightTools/__version__.py\n@@ -30,6 +30,6 @@\n with open(p) as f:\n __branch__ = f.readline().rstrip().split(r'/')[-1]\n if __branch__ != 'master':\n- __version__ += '-'... | 621 | 117 |
gh_patches_debug_30334 | rasdani/github-patches | git_diff | Lightning-AI__pytorch-lightning-1360 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
WandbLogger cannot be used with 'ddp'
<!--
### Common bugs:
1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79).
2. PyTorch 1... | diff --git a/pytorch_lightning/loggers/wandb.py b/pytorch_lightning/loggers/wandb.py
--- a/pytorch_lightning/loggers/wandb.py
+++ b/pytorch_lightning/loggers/wandb.py
@@ -65,10 +65,11 @@
def __getstate__(self):
state = self.__dict__.copy()
+ # args needed to reload correct experiment
+ sta... | {"golden_diff": "diff --git a/pytorch_lightning/loggers/wandb.py b/pytorch_lightning/loggers/wandb.py\n--- a/pytorch_lightning/loggers/wandb.py\n+++ b/pytorch_lightning/loggers/wandb.py\n@@ -65,10 +65,11 @@\n \n def __getstate__(self):\n state = self.__dict__.copy()\n+ # args needed to reload correct... | 1,917 | 419 |
gh_patches_debug_3450 | rasdani/github-patches | git_diff | astronomer__astro-sdk-176 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use standard AWS environment variables
**Context**
At the moment, Astro 0.6.x uses a custom environment variable `AIRFLOW__ASTRO__CONN_AWS_DEFAULT` to define AWS credentials. However, there are standard [AWS... | diff --git a/src/astro/utils/cloud_storage_creds.py b/src/astro/utils/cloud_storage_creds.py
--- a/src/astro/utils/cloud_storage_creds.py
+++ b/src/astro/utils/cloud_storage_creds.py
@@ -14,14 +14,7 @@
def parse_s3_env_var():
- raw_data = (
- os.environ["AIRFLOW__ASTRO__CONN_AWS_DEFAULT"]
- .repla... | {"golden_diff": "diff --git a/src/astro/utils/cloud_storage_creds.py b/src/astro/utils/cloud_storage_creds.py\n--- a/src/astro/utils/cloud_storage_creds.py\n+++ b/src/astro/utils/cloud_storage_creds.py\n@@ -14,14 +14,7 @@\n \n \n def parse_s3_env_var():\n- raw_data = (\n- os.environ[\"AIRFLOW__ASTRO__CONN_AWS... | 806 | 171 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.