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_555
rasdani/github-patches
git_diff
pex-tool__pex-753
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Release 1.6.9 On the docket: + [x] Fix pkg resource early import #750 + [x] Fix `sys.path` scrubbing of pex extras modules. #752 Maybe on the docket: + [ ] Problem running PEX files with restricted perm...
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__ = '1.6.8' +__version__ = '1.6.9'
{"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__ = '1.6.8'\n+__version__ = '1.6.9'\n", "issue"...
377
94
gh_patches_debug_785
rasdani/github-patches
git_diff
translate__pootle-5666
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Silence dev checks in the admin UI as well There's the following section in the Pootle dev config: ``` Python # Silence the DEBUG check on dev servers SILENCED_SYSTEM_CHECKS = [ 'pootle.W004', # python-...
diff --git a/pootle/apps/pootle_app/views/admin/dashboard.py b/pootle/apps/pootle_app/views/admin/dashboard.py --- a/pootle/apps/pootle_app/views/admin/dashboard.py +++ b/pootle/apps/pootle_app/views/admin/dashboard.py @@ -82,7 +82,7 @@ def checks(): from django.core.checks.registry import registry - return ...
{"golden_diff": "diff --git a/pootle/apps/pootle_app/views/admin/dashboard.py b/pootle/apps/pootle_app/views/admin/dashboard.py\n--- a/pootle/apps/pootle_app/views/admin/dashboard.py\n+++ b/pootle/apps/pootle_app/views/admin/dashboard.py\n@@ -82,7 +82,7 @@\n def checks():\n from django.core.checks.registry import r...
1,387
117
gh_patches_debug_3666
rasdani/github-patches
git_diff
carpentries__amy-245
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use Bower for JS, CSS dependencies We need something to manage our JavaScript (and perhaps CSS) dependencies and this tool is called [Bower](http://bower.io). @wking [wrote](https://github.com/swcarpentry/am...
diff --git a/amy/settings.py b/amy/settings.py --- a/amy/settings.py +++ b/amy/settings.py @@ -119,6 +119,10 @@ # https://docs.djangoproject.com/en/1.7/howto/static-files/ STATIC_URL = '/static/' +STATIC_ROOT = os.path.join(BASE_DIR, 'static') +STATICFILES_DIRS = ( + os.path.join(BASE_DIR, 'bower_components'), +...
{"golden_diff": "diff --git a/amy/settings.py b/amy/settings.py\n--- a/amy/settings.py\n+++ b/amy/settings.py\n@@ -119,6 +119,10 @@\n # https://docs.djangoproject.com/en/1.7/howto/static-files/\n \n STATIC_URL = '/static/'\n+STATIC_ROOT = os.path.join(BASE_DIR, 'static')\n+STATICFILES_DIRS = (\n+ os.path.join(BASE_D...
1,485
121
gh_patches_debug_36040
rasdani/github-patches
git_diff
geopandas__geopandas-1088
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- DOC: update the contextily example in the gallery The example about adding a background map to your plot using contextily at https://geopandas.readthedocs.io/en/latest/gallery/plotting_basemap_background.html...
diff --git a/examples/plotting_basemap_background.py b/examples/plotting_basemap_background.py --- a/examples/plotting_basemap_background.py +++ b/examples/plotting_basemap_background.py @@ -1,5 +1,5 @@ """ -Adding a background map to plots +Adding a background map to plots -------------------------------- This e...
{"golden_diff": "diff --git a/examples/plotting_basemap_background.py b/examples/plotting_basemap_background.py\n--- a/examples/plotting_basemap_background.py\n+++ b/examples/plotting_basemap_background.py\n@@ -1,5 +1,5 @@\n \"\"\"\n-Adding a background map to plots \n+Adding a background map to plots\n ---------------...
1,144
646
gh_patches_debug_36226
rasdani/github-patches
git_diff
kubeflow__pipelines-2205
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- SDK feature request: support soft constraint for scheduling a component to a preemptible node pool From a pipeline, it would be useful to have an option to schedule onto a pre-emptible node if such a node poo...
diff --git a/sdk/python/kfp/gcp.py b/sdk/python/kfp/gcp.py --- a/sdk/python/kfp/gcp.py +++ b/sdk/python/kfp/gcp.py @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from kubernetes.client import V1Toleration +from kubernetes.client import V1Tol...
{"golden_diff": "diff --git a/sdk/python/kfp/gcp.py b/sdk/python/kfp/gcp.py\n--- a/sdk/python/kfp/gcp.py\n+++ b/sdk/python/kfp/gcp.py\n@@ -12,7 +12,8 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-from kubernetes.client import V1Toleration\n+from kuber...
1,778
552
gh_patches_debug_14806
rasdani/github-patches
git_diff
koxudaxi__datamodel-code-generator-1826
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Importing code generator changes behavior of pyyaml When importing ``datamodel_code_generator``, the behaviour of ``pyyaml`` is changed after the import, datetime objects suddenly are deserialized from yaml a...
diff --git a/datamodel_code_generator/util.py b/datamodel_code_generator/util.py --- a/datamodel_code_generator/util.py +++ b/datamodel_code_generator/util.py @@ -1,5 +1,6 @@ from __future__ import annotations +import copy from pathlib import Path from typing import TYPE_CHECKING, Any, Callable, Dict, TypeVar @@...
{"golden_diff": "diff --git a/datamodel_code_generator/util.py b/datamodel_code_generator/util.py\n--- a/datamodel_code_generator/util.py\n+++ b/datamodel_code_generator/util.py\n@@ -1,5 +1,6 @@\n from __future__ import annotations\n \n+import copy\n from pathlib import Path\n from typing import TYPE_CHECKING, Any, Cal...
1,910
233
gh_patches_debug_17208
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-2704
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs....
diff --git a/applications/ChatGPT/setup.py b/applications/ChatGPT/setup.py --- a/applications/ChatGPT/setup.py +++ b/applications/ChatGPT/setup.py @@ -22,7 +22,6 @@ packages=find_packages(exclude=( 'tests', 'benchmarks', - 'requirements', '*.egg-info', )), description='A...
{"golden_diff": "diff --git a/applications/ChatGPT/setup.py b/applications/ChatGPT/setup.py\n--- a/applications/ChatGPT/setup.py\n+++ b/applications/ChatGPT/setup.py\n@@ -22,7 +22,6 @@\n packages=find_packages(exclude=(\n 'tests',\n 'benchmarks',\n- 'requirements',\n '*.egg-info',\n ...
639
198
gh_patches_debug_49256
rasdani/github-patches
git_diff
pyro-ppl__pyro-388
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Test batch_size parameter is correctly applied for all distributions With #323, we are now supporting `batch_size` parameter for both the class and functional forms of both the distributions. Let us add a sim...
diff --git a/pyro/distributions/log_normal.py b/pyro/distributions/log_normal.py --- a/pyro/distributions/log_normal.py +++ b/pyro/distributions/log_normal.py @@ -49,7 +49,7 @@ """ Reparameterized log-normal sampler. """ - eps = Variable(torch.randn(1).type_as(self.mu.data)) + e...
{"golden_diff": "diff --git a/pyro/distributions/log_normal.py b/pyro/distributions/log_normal.py\n--- a/pyro/distributions/log_normal.py\n+++ b/pyro/distributions/log_normal.py\n@@ -49,7 +49,7 @@\n \"\"\"\n Reparameterized log-normal sampler.\n \"\"\"\n- eps = Variable(torch.randn(1).typ...
1,107
115
gh_patches_debug_32700
rasdani/github-patches
git_diff
mne-tools__mne-python-6252
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cannot pickle mne.preprocessing.ica.ICA anymore With the current master (installed via `pip install git+https://github.com/mne-tools/mne-python.git#egg=mne`), I get an error when pickling an `mne.preprocessin...
diff --git a/mne/utils/_bunch.py b/mne/utils/_bunch.py --- a/mne/utils/_bunch.py +++ b/mne/utils/_bunch.py @@ -9,10 +9,10 @@ ############################################################################### -# Create a Bunch class that acts like a struct (mybunch.key = val ) +# Create a Bunch class that acts like a ...
{"golden_diff": "diff --git a/mne/utils/_bunch.py b/mne/utils/_bunch.py\n--- a/mne/utils/_bunch.py\n+++ b/mne/utils/_bunch.py\n@@ -9,10 +9,10 @@\n \n \n ###############################################################################\n-# Create a Bunch class that acts like a struct (mybunch.key = val )\n+# Create a Bunc...
1,514
583
gh_patches_debug_21333
rasdani/github-patches
git_diff
netket__netket-846
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Docs for sigma operators The documentation of the ladder operator `netket.operator.spin.sigmap` says `σ^+ = σ^x + i σ^y`, but in fact it is defined as `σ^+ = 1/2(σ^x + i σ^y)` in the code. The same error i...
diff --git a/netket/operator/spin.py b/netket/operator/spin.py --- a/netket/operator/spin.py +++ b/netket/operator/spin.py @@ -88,7 +88,7 @@ def sigmam(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator: """ - Builds the :math:`\\sigma^{-} = \\sigma^x - i \\sigma^y` operator acting ...
{"golden_diff": "diff --git a/netket/operator/spin.py b/netket/operator/spin.py\n--- a/netket/operator/spin.py\n+++ b/netket/operator/spin.py\n@@ -88,7 +88,7 @@\n \n def sigmam(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n \"\"\"\n- Builds the :math:`\\\\sigma^{-} = \\\\sigma^x ...
2,047
327
gh_patches_debug_14974
rasdani/github-patches
git_diff
enthought__chaco-423
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Demo world_map.py does not work on python 2 **Problem Description** urllib.request deprecated in Python 2 **Reproduction Steps:** Run world_map.py **Expected behavior:** Traceback (most recent call l...
diff --git a/examples/demo/world_map.py b/examples/demo/world_map.py --- a/examples/demo/world_map.py +++ b/examples/demo/world_map.py @@ -12,7 +12,7 @@ # Standard library imports import os.path -import urllib.request, urllib.parse, urllib.error +from six.moves.urllib import request # Major library imports impo...
{"golden_diff": "diff --git a/examples/demo/world_map.py b/examples/demo/world_map.py\n--- a/examples/demo/world_map.py\n+++ b/examples/demo/world_map.py\n@@ -12,7 +12,7 @@\n \n # Standard library imports\n import os.path\n-import urllib.request, urllib.parse, urllib.error\n+from six.moves.urllib import request\n \n # ...
1,631
156
gh_patches_debug_37650
rasdani/github-patches
git_diff
mirumee__ariadne-30
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- make_executable_schema resolvers arg should accept dict of dicts or list of dicts of dicts The `make_executable_schema` utility should optionally take list of dicts of dicts (AKA "resolvers map"), this would ...
diff --git a/ariadne/build_schema.py b/ariadne/build_schema.py --- a/ariadne/build_schema.py +++ b/ariadne/build_schema.py @@ -1,5 +1,3 @@ -from typing import List, Union - from graphql import GraphQLSchema, parse from graphql.language.ast import ( Document, @@ -12,12 +10,7 @@ from graphql.utils.build_ast_schem...
{"golden_diff": "diff --git a/ariadne/build_schema.py b/ariadne/build_schema.py\n--- a/ariadne/build_schema.py\n+++ b/ariadne/build_schema.py\n@@ -1,5 +1,3 @@\n-from typing import List, Union\n-\n from graphql import GraphQLSchema, parse\n from graphql.language.ast import (\n Document,\n@@ -12,12 +10,7 @@\n from gr...
1,041
709
gh_patches_debug_18394
rasdani/github-patches
git_diff
vega__altair-1888
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- HTML renderer should use uuid in chart divs Currently, divs are generated via chart counts. This means that if a kernel is restarted in the notebook, new charts may not display correctly. --- END ISSUE --- ...
diff --git a/altair/utils/display.py b/altair/utils/display.py --- a/altair/utils/display.py +++ b/altair/utils/display.py @@ -2,6 +2,7 @@ import pkgutil import textwrap from typing import Callable, Dict +import uuid from jsonschema import validate @@ -150,13 +151,11 @@ """Object to render charts as HTML, ...
{"golden_diff": "diff --git a/altair/utils/display.py b/altair/utils/display.py\n--- a/altair/utils/display.py\n+++ b/altair/utils/display.py\n@@ -2,6 +2,7 @@\n import pkgutil\n import textwrap\n from typing import Callable, Dict\n+import uuid\n \n from jsonschema import validate\n \n@@ -150,13 +151,11 @@\n \"\"\"O...
2,001
216
gh_patches_debug_36406
rasdani/github-patches
git_diff
cornellius-gp__gpytorch-1565
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Docs] Deep Sigma Point Processes Hi, The DSPPs documentaiton makes it seem like theyare coded up very similarly to the standard Deep GPs, and this does seem true for[ two layers](https://docs.gpytorch.ai/...
diff --git a/gpytorch/models/deep_gps/dspp.py b/gpytorch/models/deep_gps/dspp.py --- a/gpytorch/models/deep_gps/dspp.py +++ b/gpytorch/models/deep_gps/dspp.py @@ -43,24 +43,18 @@ else: self.quad_sites = torch.nn.Parameter(torch.randn(num_quad_sites, input_dims)) - def __call__(self, inputs, a...
{"golden_diff": "diff --git a/gpytorch/models/deep_gps/dspp.py b/gpytorch/models/deep_gps/dspp.py\n--- a/gpytorch/models/deep_gps/dspp.py\n+++ b/gpytorch/models/deep_gps/dspp.py\n@@ -43,24 +43,18 @@\n else:\n self.quad_sites = torch.nn.Parameter(torch.randn(num_quad_sites, input_dims))\n \n- def ...
1,877
671
gh_patches_debug_10331
rasdani/github-patches
git_diff
pytorch__vision-2086
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pretrain models for FCN and DeepLabV3 Is it possible to provide the pretrain weight for deeplabv3 and FCN? right now when i do: `model = torchvision.models.segmentation.fcn_resnet50(pretrained=True)` I rec...
diff --git a/torchvision/models/segmentation/segmentation.py b/torchvision/models/segmentation/segmentation.py --- a/torchvision/models/segmentation/segmentation.py +++ b/torchvision/models/segmentation/segmentation.py @@ -9,9 +9,9 @@ model_urls = { - 'fcn_resnet50_coco': None, + 'fcn_resnet50_coco': 'https:...
{"golden_diff": "diff --git a/torchvision/models/segmentation/segmentation.py b/torchvision/models/segmentation/segmentation.py\n--- a/torchvision/models/segmentation/segmentation.py\n+++ b/torchvision/models/segmentation/segmentation.py\n@@ -9,9 +9,9 @@\n \n \n model_urls = {\n- 'fcn_resnet50_coco': None,\n+ 'fc...
1,687
268
gh_patches_debug_7787
rasdani/github-patches
git_diff
qtile__qtile-1682
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Firefox cpu usage escalates and then stops responding only when run in qtile Hi, When starting firefox (firefox 69.0-1, qtile 0.14.2-2) its cpu usage starts rising to the point were the interface becomes ...
diff --git a/libqtile/widget/keyboardlayout.py b/libqtile/widget/keyboardlayout.py --- a/libqtile/widget/keyboardlayout.py +++ b/libqtile/widget/keyboardlayout.py @@ -97,7 +97,7 @@ Examples: "us", "us dvorak". In case of error returns "unknown". """ try: - command = 'setxkbmap -ve...
{"golden_diff": "diff --git a/libqtile/widget/keyboardlayout.py b/libqtile/widget/keyboardlayout.py\n--- a/libqtile/widget/keyboardlayout.py\n+++ b/libqtile/widget/keyboardlayout.py\n@@ -97,7 +97,7 @@\n Examples: \"us\", \"us dvorak\". In case of error returns \"unknown\".\n \"\"\"\n try:\n- ...
1,844
147
gh_patches_debug_28995
rasdani/github-patches
git_diff
vacanza__python-holidays-1020
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update MANIFEST.in Clean up and make sure `sdist` contains all needed files. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN...
diff --git a/scripts/l10n/generate_mo_files.py b/scripts/l10n/generate_mo_files.py --- a/scripts/l10n/generate_mo_files.py +++ b/scripts/l10n/generate_mo_files.py @@ -22,14 +22,12 @@ def run(self): """Runs the .mo files generation process.""" - # Delete old files. - for mo_file in Path(os....
{"golden_diff": "diff --git a/scripts/l10n/generate_mo_files.py b/scripts/l10n/generate_mo_files.py\n--- a/scripts/l10n/generate_mo_files.py\n+++ b/scripts/l10n/generate_mo_files.py\n@@ -22,14 +22,12 @@\n \n def run(self):\n \"\"\"Runs the .mo files generation process.\"\"\"\n- # Delete old files.\n-...
1,128
445
gh_patches_debug_35484
rasdani/github-patches
git_diff
DDMAL__CantusDB-271
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- "My sources" panel should appear on homepage In OldCantus on the homepage when a user is logged in, a list of sources appears in a "My sources" box in the left sidebar. This box replaces the "jump to source" ...
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 @@ -5,6 +5,7 @@ from main_app.models import Sour...
{"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@@ -5,6 +5,7 @@\n from main_a...
1,268
751
gh_patches_debug_24026
rasdani/github-patches
git_diff
mesonbuild__meson-4627
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- run_target improperly handles command if 'python' is in meson's installation path My build environment is RHEL 7.6 with the python 3.6 Red Hat software collection enabled in my .bashrc. Meson was installed b...
diff --git a/mesonbuild/scripts/commandrunner.py b/mesonbuild/scripts/commandrunner.py --- a/mesonbuild/scripts/commandrunner.py +++ b/mesonbuild/scripts/commandrunner.py @@ -16,6 +16,7 @@ what to run, sets up the environment and executes the command.""" import sys, os, subprocess, shutil, shlex +import re def r...
{"golden_diff": "diff --git a/mesonbuild/scripts/commandrunner.py b/mesonbuild/scripts/commandrunner.py\n--- a/mesonbuild/scripts/commandrunner.py\n+++ b/mesonbuild/scripts/commandrunner.py\n@@ -16,6 +16,7 @@\n what to run, sets up the environment and executes the command.\"\"\"\n \n import sys, os, subprocess, shutil,...
1,512
295
gh_patches_debug_61898
rasdani/github-patches
git_diff
opendatacube__datacube-core-534
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pin rasterio >= 1.0.2 There are some issues with rasterio that are fixed with 1.0.2 (See: https://github.com/opendatacube/datacube-core/pull/531#pullrequestreview-143845097). Files to change: - setup.py ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -104,7 +104,7 @@ 'pypeg2', 'python-dateutil', 'pyyaml', - 'rasterio~=1.0', + 'rasterio>=1.0.2', # Multi-band re-project fixed in that version 'singledispatch', 'sqlalchemy', 'toolz',
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -104,7 +104,7 @@\n 'pypeg2',\n 'python-dateutil',\n 'pyyaml',\n- 'rasterio~=1.0',\n+ 'rasterio>=1.0.2', # Multi-band re-project fixed in that version\n 'singledispatch',\n 'sqlalc...
1,825
104
gh_patches_debug_7604
rasdani/github-patches
git_diff
robocorp__rpaframework-617
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `RPA.Windows.Get Elements` not copying the `robocorp_click_offset` attribute Should make available this attribute in all siblings found elements, otherwise the `Click` keyword will fail when using offsets: ...
diff --git a/packages/windows/src/RPA/Windows/keywords/locators.py b/packages/windows/src/RPA/Windows/keywords/locators.py --- a/packages/windows/src/RPA/Windows/keywords/locators.py +++ b/packages/windows/src/RPA/Windows/keywords/locators.py @@ -97,6 +97,9 @@ if next_control: element = Wi...
{"golden_diff": "diff --git a/packages/windows/src/RPA/Windows/keywords/locators.py b/packages/windows/src/RPA/Windows/keywords/locators.py\n--- a/packages/windows/src/RPA/Windows/keywords/locators.py\n+++ b/packages/windows/src/RPA/Windows/keywords/locators.py\n@@ -97,6 +97,9 @@\n if next_control:\n ...
1,453
137
gh_patches_debug_29378
rasdani/github-patches
git_diff
bridgecrewio__checkov-5018
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- CKV_AWS_338 does not account for 0 (keep forever) & has insufficient error message **Describe the issue** CKV_AWS_338 is a check for the number of retention days for a Cloudwatch log group. However, the actu...
diff --git a/checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py b/checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py --- a/checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py +++ b/checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py @...
{"golden_diff": "diff --git a/checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py b/checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py\n--- a/checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py\n+++ b/checkov/terraform/checks/resource/aws/CloudWatchLogGrou...
897
379
gh_patches_debug_35330
rasdani/github-patches
git_diff
iterative__dvc-1531
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- daemon: address dvc directly Our daemon is using `sys.executable -m dvc` to launch a new dvc process, but a more proper way would be to address dvc directly, by dynamically computing its location ourselves fr...
diff --git a/dvc/daemon.py b/dvc/daemon.py --- a/dvc/daemon.py +++ b/dvc/daemon.py @@ -2,6 +2,7 @@ import os import sys +import inspect from subprocess import Popen import dvc.logger as logger @@ -12,7 +13,7 @@ DETACHED_PROCESS = 0x00000008 -def _spawn_windows(cmd): +def _spawn_windows(cmd, env): from...
{"golden_diff": "diff --git a/dvc/daemon.py b/dvc/daemon.py\n--- a/dvc/daemon.py\n+++ b/dvc/daemon.py\n@@ -2,6 +2,7 @@\n \n import os\n import sys\n+import inspect\n from subprocess import Popen\n \n import dvc.logger as logger\n@@ -12,7 +13,7 @@\n DETACHED_PROCESS = 0x00000008\n \n \n-def _spawn_windows(cmd):\n+def _s...
1,062
525
gh_patches_debug_27533
rasdani/github-patches
git_diff
akvo__akvo-rsr-5271
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Feature Request: Document the task management ### What are you trying to do? Understand how the task management functions ### Describe the solution you'd like A technical documentation of how it works. ##...
diff --git a/akvo/cache/heartbeat.py b/akvo/cache/heartbeat.py --- a/akvo/cache/heartbeat.py +++ b/akvo/cache/heartbeat.py @@ -8,7 +8,7 @@ class CacheHeartbeat(Thread): """ - Thread to update set a cache key with a max life and refresh it as long as the thread is alive + Thread to set a cache key with a m...
{"golden_diff": "diff --git a/akvo/cache/heartbeat.py b/akvo/cache/heartbeat.py\n--- a/akvo/cache/heartbeat.py\n+++ b/akvo/cache/heartbeat.py\n@@ -8,7 +8,7 @@\n \n class CacheHeartbeat(Thread):\n \"\"\"\n- Thread to update set a cache key with a max life and refresh it as long as the thread is alive\n+ Thread...
1,265
442
gh_patches_debug_11081
rasdani/github-patches
git_diff
deeppavlov__DeepPavlov-635
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add an environment variable to skip nltk.download() Add an environment variable to skip nltk.download() --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these file...
diff --git a/deeppavlov/models/__init__.py b/deeppavlov/models/__init__.py --- a/deeppavlov/models/__init__.py +++ b/deeppavlov/models/__init__.py @@ -12,13 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os import nltk from deeppavlov.cor...
{"golden_diff": "diff --git a/deeppavlov/models/__init__.py b/deeppavlov/models/__init__.py\n--- a/deeppavlov/models/__init__.py\n+++ b/deeppavlov/models/__init__.py\n@@ -12,13 +12,14 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+import os\n import nl...
518
206
gh_patches_debug_2610
rasdani/github-patches
git_diff
openai__openai-python-1007
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Missing default value to logprobs in openai.types.chat.chat_completion.Choice ### Confirm this is an issue with the Python library and not an underlying OpenAI API - [X] This is an issue with the Python li...
diff --git a/src/openai/types/chat/chat_completion.py b/src/openai/types/chat/chat_completion.py --- a/src/openai/types/chat/chat_completion.py +++ b/src/openai/types/chat/chat_completion.py @@ -30,7 +30,7 @@ index: int """The index of the choice in the list of choices.""" - logprobs: Optional[ChoiceLogp...
{"golden_diff": "diff --git a/src/openai/types/chat/chat_completion.py b/src/openai/types/chat/chat_completion.py\n--- a/src/openai/types/chat/chat_completion.py\n+++ b/src/openai/types/chat/chat_completion.py\n@@ -30,7 +30,7 @@\n index: int\n \"\"\"The index of the choice in the list of choices.\"\"\"\n \n- ...
1,557
121
gh_patches_debug_13241
rasdani/github-patches
git_diff
pypa__pip-12173
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- 23.2: Unable to add zsh completion as documented ### Description Attempting to follow the steps in the [documentation for adding zsh shell completion](https://pip.pypa.io/en/stable/user_guide/#command-comp...
diff --git a/src/pip/_internal/commands/completion.py b/src/pip/_internal/commands/completion.py --- a/src/pip/_internal/commands/completion.py +++ b/src/pip/_internal/commands/completion.py @@ -23,9 +23,18 @@ """, "zsh": """ #compdef -P pip[0-9.]# - compadd $( COMP_WORDS="$words[*]" \\ - ...
{"golden_diff": "diff --git a/src/pip/_internal/commands/completion.py b/src/pip/_internal/commands/completion.py\n--- a/src/pip/_internal/commands/completion.py\n+++ b/src/pip/_internal/commands/completion.py\n@@ -23,9 +23,18 @@\n \"\"\",\n \"zsh\": \"\"\"\n #compdef -P pip[0-9.]#\n- compadd $( ...
1,696
273
gh_patches_debug_27686
rasdani/github-patches
git_diff
xonsh__xonsh-861
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- COMPLETIONS_MENU_ROWS not working Hello My value for `COMPLETIONS_MENU_ROWS` is 5 (default). But it does not seem to work. My terminal grow until the bottom of the window and when it has reached the last lin...
diff --git a/xonsh/ptk/completer.py b/xonsh/ptk/completer.py --- a/xonsh/ptk/completer.py +++ b/xonsh/ptk/completer.py @@ -2,6 +2,7 @@ """Completer implementation to use with prompt_toolkit.""" import os import builtins +import xonsh.shell from prompt_toolkit.layout.dimension import LayoutDimension from prompt_t...
{"golden_diff": "diff --git a/xonsh/ptk/completer.py b/xonsh/ptk/completer.py\n--- a/xonsh/ptk/completer.py\n+++ b/xonsh/ptk/completer.py\n@@ -2,6 +2,7 @@\n \"\"\"Completer implementation to use with prompt_toolkit.\"\"\"\n import os\n import builtins\n+import xonsh.shell\n \n from prompt_toolkit.layout.dimension impor...
1,020
383
gh_patches_debug_37069
rasdani/github-patches
git_diff
TheAlgorithms__Python-8674
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- There is a missing check for the "associativity" of the operators in the stacks/infix_to_postfix_conversion.py file. ### Repository commit 11582943a555ae3b6a22938df6d3645b0327562e ### Python version (py...
diff --git a/data_structures/stacks/infix_to_postfix_conversion.py b/data_structures/stacks/infix_to_postfix_conversion.py --- a/data_structures/stacks/infix_to_postfix_conversion.py +++ b/data_structures/stacks/infix_to_postfix_conversion.py @@ -4,9 +4,26 @@ https://en.wikipedia.org/wiki/Shunting-yard_algorithm """ ...
{"golden_diff": "diff --git a/data_structures/stacks/infix_to_postfix_conversion.py b/data_structures/stacks/infix_to_postfix_conversion.py\n--- a/data_structures/stacks/infix_to_postfix_conversion.py\n+++ b/data_structures/stacks/infix_to_postfix_conversion.py\n@@ -4,9 +4,26 @@\n https://en.wikipedia.org/wiki/Shunting...
1,677
687
gh_patches_debug_24866
rasdani/github-patches
git_diff
facebookresearch__hydra-914
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update Example Launcher Plugin mention restoring the singletons The singletons should be restored when performing multi-process launching. something ```python # In the launcher's launch: state = Single...
diff --git a/plugins/examples/example_launcher_plugin/hydra_plugins/example_launcher_plugin/example_launcher.py b/plugins/examples/example_launcher_plugin/hydra_plugins/example_launcher_plugin/example_launcher.py --- a/plugins/examples/example_launcher_plugin/hydra_plugins/example_launcher_plugin/example_launcher.py ++...
{"golden_diff": "diff --git a/plugins/examples/example_launcher_plugin/hydra_plugins/example_launcher_plugin/example_launcher.py b/plugins/examples/example_launcher_plugin/hydra_plugins/example_launcher_plugin/example_launcher.py\n--- a/plugins/examples/example_launcher_plugin/hydra_plugins/example_launcher_plugin/exam...
1,553
292
gh_patches_debug_30573
rasdani/github-patches
git_diff
wagtail__wagtail-1357
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- StreamField EmbedBlock renders the url only Given the following setup: ``` class EmbedOnImage(StructBlock): embed = EmbedBlock() background_image = ImageChooserBlock(required=False) class Meta: ...
diff --git a/wagtail/wagtailembeds/blocks.py b/wagtail/wagtailembeds/blocks.py --- a/wagtail/wagtailembeds/blocks.py +++ b/wagtail/wagtailembeds/blocks.py @@ -1,8 +1,62 @@ +from django.utils.encoding import python_2_unicode_compatible + from wagtail.wagtailcore import blocks from wagtail.wagtailembeds.format import...
{"golden_diff": "diff --git a/wagtail/wagtailembeds/blocks.py b/wagtail/wagtailembeds/blocks.py\n--- a/wagtail/wagtailembeds/blocks.py\n+++ b/wagtail/wagtailembeds/blocks.py\n@@ -1,8 +1,62 @@\n+from django.utils.encoding import python_2_unicode_compatible\n+\n from wagtail.wagtailcore import blocks\n \n from wagtail.wa...
536
600
gh_patches_debug_30740
rasdani/github-patches
git_diff
translate__translate-3520
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add traits and variants support in l20nfile L20n traits allow storing value variants and additional information for a unit. We need to add such support when parsing `.ftl` and convert resources. ``` file-...
diff --git a/translate/storage/l20n.py b/translate/storage/l20n.py --- a/translate/storage/l20n.py +++ b/translate/storage/l20n.py @@ -27,6 +27,17 @@ from translate.storage import base +def dump_l20n_entity_value(entity): + serializer = L20nSerializer() + value = serializer.dumpPattern(entity['value']) + + ...
{"golden_diff": "diff --git a/translate/storage/l20n.py b/translate/storage/l20n.py\n--- a/translate/storage/l20n.py\n+++ b/translate/storage/l20n.py\n@@ -27,6 +27,17 @@\n from translate.storage import base\n \n \n+def dump_l20n_entity_value(entity):\n+ serializer = L20nSerializer()\n+ value = serializer.dumpPatt...
1,346
465
gh_patches_debug_7268
rasdani/github-patches
git_diff
facebookresearch__hydra-165
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- output/hydra.yaml is wrong hydra.yaml in output directory is malformed (not rooted at hydra.) --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contai...
diff --git a/hydra/plugins/common/utils.py b/hydra/plugins/common/utils.py --- a/hydra/plugins/common/utils.py +++ b/hydra/plugins/common/utils.py @@ -68,7 +68,8 @@ ret = JobReturn() ret.working_dir = working_dir task_cfg = copy.deepcopy(config) - hydra_cfg = task_cfg["hydra"] + ...
{"golden_diff": "diff --git a/hydra/plugins/common/utils.py b/hydra/plugins/common/utils.py\n--- a/hydra/plugins/common/utils.py\n+++ b/hydra/plugins/common/utils.py\n@@ -68,7 +68,8 @@\n ret = JobReturn()\n ret.working_dir = working_dir\n task_cfg = copy.deepcopy(config)\n- hydra_cfg = ta...
1,844
160
gh_patches_debug_19703
rasdani/github-patches
git_diff
certbot__certbot-5349
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Can't install new certificates with certbot-apache under Gentoo since version 0.20.0 It seems that version 0.20.0 has a major architecture revision from 0.19.0, in particular regarding OS specific overrides. ...
diff --git a/certbot-apache/certbot_apache/override_gentoo.py b/certbot-apache/certbot_apache/override_gentoo.py --- a/certbot-apache/certbot_apache/override_gentoo.py +++ b/certbot-apache/certbot_apache/override_gentoo.py @@ -49,6 +49,7 @@ def update_runtime_variables(self): """ Override for update_runti...
{"golden_diff": "diff --git a/certbot-apache/certbot_apache/override_gentoo.py b/certbot-apache/certbot_apache/override_gentoo.py\n--- a/certbot-apache/certbot_apache/override_gentoo.py\n+++ b/certbot-apache/certbot_apache/override_gentoo.py\n@@ -49,6 +49,7 @@\n def update_runtime_variables(self):\n \"\"\" ...
1,185
251
gh_patches_debug_2097
rasdani/github-patches
git_diff
sosreport__sos-1100
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [rabbitmq] does not elide password in /etc/rabbitmq.config Hi, Sosreport as in sos-3.2-36.eo7ost.1.noarch includes in `/etc/rabbitmq/rabbitmq.conf` `default_user` and `default_pass` without being hidden. Reg...
diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py --- a/sos/plugins/rabbitmq.py +++ b/sos/plugins/rabbitmq.py @@ -60,5 +60,8 @@ "/var/log/containers/rabbitmq/*" ], sizelimit=self.get_option('log_size')) + def postproc(self): + self.do_file_sub("/etc/rabbitmq/rabbitmq.conf"...
{"golden_diff": "diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py\n--- a/sos/plugins/rabbitmq.py\n+++ b/sos/plugins/rabbitmq.py\n@@ -60,5 +60,8 @@\n \"/var/log/containers/rabbitmq/*\"\n ], sizelimit=self.get_option('log_size'))\n \n+ def postproc(self):\n+ self.do_file_sub(\"...
996
137
gh_patches_debug_62860
rasdani/github-patches
git_diff
conan-io__conan-center-index-7774
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [request] sigslot/1.2.1 ### Package Details * Package Name/Version: **sigslot/1.2.1** * Changelog: **https://github.com/palacaze/sigslot/releases/tag/v1.2.1** The above mentioned version is newly r...
diff --git a/recipes/sigslot/all/conanfile.py b/recipes/sigslot/all/conanfile.py --- a/recipes/sigslot/all/conanfile.py +++ b/recipes/sigslot/all/conanfile.py @@ -65,4 +65,4 @@ self.cpp_info.components["_sigslot"].system_libs.append("pthread") if self.settings.os == "Windows": if self...
{"golden_diff": "diff --git a/recipes/sigslot/all/conanfile.py b/recipes/sigslot/all/conanfile.py\n--- a/recipes/sigslot/all/conanfile.py\n+++ b/recipes/sigslot/all/conanfile.py\n@@ -65,4 +65,4 @@\n self.cpp_info.components[\"_sigslot\"].system_libs.append(\"pthread\")\n if self.settings.os == \"Win...
1,162
144
gh_patches_debug_11690
rasdani/github-patches
git_diff
searxng__searxng-3369
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- remove ask engine Reasons: 1. User Tracking via query parameters. Example Query: [!ask best museums in Köln](https://searx.be/search?q=%21ask+best+museums+in+K%C3%B6ln&category_none=&language=auto&t...
diff --git a/searx/engines/ask.py b/searx/engines/ask.py --- a/searx/engines/ask.py +++ b/searx/engines/ask.py @@ -19,6 +19,7 @@ # Engine Configuration categories = ['general'] paging = True +max_page = 5 # Base URL base_url = "https://www.ask.com/web" @@ -61,7 +62,7 @@ results.append( { ...
{"golden_diff": "diff --git a/searx/engines/ask.py b/searx/engines/ask.py\n--- a/searx/engines/ask.py\n+++ b/searx/engines/ask.py\n@@ -19,6 +19,7 @@\n # Engine Configuration\n categories = ['general']\n paging = True\n+max_page = 5\n \n # Base URL\n base_url = \"https://www.ask.com/web\"\n@@ -61,7 +62,7 @@\n \n ...
1,032
164
gh_patches_debug_11039
rasdani/github-patches
git_diff
frappe__frappe-23799
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- PostgreSQL - permission denied for schema public <!-- Welcome to the Frappe Framework issue tracker! Before creating an issue, please heed the following: 1. This tracker should only be used to report bugs...
diff --git a/frappe/database/postgres/setup_db.py b/frappe/database/postgres/setup_db.py --- a/frappe/database/postgres/setup_db.py +++ b/frappe/database/postgres/setup_db.py @@ -13,6 +13,9 @@ root_conn.sql(f"CREATE DATABASE `{frappe.conf.db_name}`") root_conn.sql(f"CREATE user {frappe.conf.db_name} password '{frap...
{"golden_diff": "diff --git a/frappe/database/postgres/setup_db.py b/frappe/database/postgres/setup_db.py\n--- a/frappe/database/postgres/setup_db.py\n+++ b/frappe/database/postgres/setup_db.py\n@@ -13,6 +13,9 @@\n \troot_conn.sql(f\"CREATE DATABASE `{frappe.conf.db_name}`\")\n \troot_conn.sql(f\"CREATE user {frappe.co...
1,827
202
gh_patches_debug_3277
rasdani/github-patches
git_diff
spack__spack-11755
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Installing rclone leaves a go folder outside spack root Spack version: commit a45c4ef33de (if no change on relevant part, it is basically the head). OS distribution: Ubuntu server 18.04. After `spack inst...
diff --git a/var/spack/repos/builtin/packages/rclone/package.py b/var/spack/repos/builtin/packages/rclone/package.py --- a/var/spack/repos/builtin/packages/rclone/package.py +++ b/var/spack/repos/builtin/packages/rclone/package.py @@ -17,6 +17,10 @@ depends_on("go", type='build') + def setup_environment(sel...
{"golden_diff": "diff --git a/var/spack/repos/builtin/packages/rclone/package.py b/var/spack/repos/builtin/packages/rclone/package.py\n--- a/var/spack/repos/builtin/packages/rclone/package.py\n+++ b/var/spack/repos/builtin/packages/rclone/package.py\n@@ -17,6 +17,10 @@\n \n depends_on(\"go\", type='build')\n \n+ ...
1,118
149
gh_patches_debug_30001
rasdani/github-patches
git_diff
getsentry__sentry-5722
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [plugin] Regression: Webhook Test Button Somehow during transfer to the new plugin architecture, the webhook plugin's Test button has disappeared. --- END ISSUE --- Below are some code segments, each from a...
diff --git a/src/sentry/api/endpoints/project_plugin_details.py b/src/sentry/api/endpoints/project_plugin_details.py --- a/src/sentry/api/endpoints/project_plugin_details.py +++ b/src/sentry/api/endpoints/project_plugin_details.py @@ -1,11 +1,13 @@ from __future__ import absolute_import +import logging import six ...
{"golden_diff": "diff --git a/src/sentry/api/endpoints/project_plugin_details.py b/src/sentry/api/endpoints/project_plugin_details.py\n--- a/src/sentry/api/endpoints/project_plugin_details.py\n+++ b/src/sentry/api/endpoints/project_plugin_details.py\n@@ -1,11 +1,13 @@\n from __future__ import absolute_import\n \n+impor...
1,392
387
gh_patches_debug_15019
rasdani/github-patches
git_diff
Mailu__Mailu-1305
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Certwatcher does not work with symlinks (on Kubernetes) I need to recheck this, but I just had this issue... Will report in 3 Months --- END ISSUE --- Below are some code segments, each from a relevant file...
diff --git a/core/nginx/certwatcher.py b/core/nginx/certwatcher.py --- a/core/nginx/certwatcher.py +++ b/core/nginx/certwatcher.py @@ -8,7 +8,7 @@ from os.path import exists, split as path_split from os import system import time -from watchdog.observers import Observer +from watchdog.observers.polling import Polling...
{"golden_diff": "diff --git a/core/nginx/certwatcher.py b/core/nginx/certwatcher.py\n--- a/core/nginx/certwatcher.py\n+++ b/core/nginx/certwatcher.py\n@@ -8,7 +8,7 @@\n from os.path import exists, split as path_split\n from os import system\n import time\n-from watchdog.observers import Observer\n+from watchdog.observe...
891
170
gh_patches_debug_4511
rasdani/github-patches
git_diff
zigpy__zha-device-handlers-704
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Xiaomi Mijia Light Sensor (GZCGQ01LM) in ZHA not detecting battery level anymore (it did in previous versions lower than 2020.12.7) Hai The original call is from ( lustreking aka Steve Small) , I (yfands) can...
diff --git a/zhaquirks/xiaomi/aqara/illumination.py b/zhaquirks/xiaomi/aqara/illumination.py --- a/zhaquirks/xiaomi/aqara/illumination.py +++ b/zhaquirks/xiaomi/aqara/illumination.py @@ -29,7 +29,7 @@ # device_version=1 # input_clusters=[0, 1024, 3, 1] # output_clusters=[3]> - MODELS_I...
{"golden_diff": "diff --git a/zhaquirks/xiaomi/aqara/illumination.py b/zhaquirks/xiaomi/aqara/illumination.py\n--- a/zhaquirks/xiaomi/aqara/illumination.py\n+++ b/zhaquirks/xiaomi/aqara/illumination.py\n@@ -29,7 +29,7 @@\n # device_version=1\n # input_clusters=[0, 1024, 3, 1]\n # output_clusters...
1,678
199
gh_patches_debug_661
rasdani/github-patches
git_diff
pex-tool__pex-2055
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Release 2.1.122 On the docket: + [x] Support the latest Pip releases: 22.3.1 & 23.0 #2056 + [x] Lock sdists with prepare-metadata-for-build-wheel. #2053 + [x] Fix `execute_parallel` "leaking" a thread. #20...
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.121" +__version__ = "2.1.122"
{"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.121\"\n+__version__ = \"2.1.122\"\n",...
395
98
gh_patches_debug_16138
rasdani/github-patches
git_diff
uccser__cs-unplugged-718
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Workaround Crowdin bug where integer yaml keys are not preserved When downloading in-context localisation files, integer keys in YAML files are not preserved. This is only an issue in the file `topics/content...
diff --git a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py b/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py --- a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py +++ b/csunplugged/topics/management/commands/_ProgrammingCh...
{"golden_diff": "diff --git a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py b/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py\n--- a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py\n+++ b/csunplugged/topics/management/comm...
1,343
205
gh_patches_debug_1183
rasdani/github-patches
git_diff
bokeh__bokeh-2235
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- VBoxForm broken Added a `float:left` to fix `sliders.py` which broke stock app example worse. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may cont...
diff --git a/examples/plotting/file/slider.py b/examples/plotting/file/slider.py --- a/examples/plotting/file/slider.py +++ b/examples/plotting/file/slider.py @@ -42,8 +42,8 @@ callback.args["offset"] = offset_slider layout = hplot( + plot, vform(amp_slider, freq_slider, phase_slider, offset_slider), - p...
{"golden_diff": "diff --git a/examples/plotting/file/slider.py b/examples/plotting/file/slider.py\n--- a/examples/plotting/file/slider.py\n+++ b/examples/plotting/file/slider.py\n@@ -42,8 +42,8 @@\n callback.args[\"offset\"] = offset_slider\n \n layout = hplot(\n+ plot,\n vform(amp_slider, freq_slider, phase_sli...
836
98
gh_patches_debug_2661
rasdani/github-patches
git_diff
cowrie__cowrie-920
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- output_localsyslog exceptions.KeyError: 'isError' After pulling the most recent version of cowrie to some of my honeypots, I get this error when a new connection I enabled [output_localsyslog] with configurat...
diff --git a/src/cowrie/output/localsyslog.py b/src/cowrie/output/localsyslog.py --- a/src/cowrie/output/localsyslog.py +++ b/src/cowrie/output/localsyslog.py @@ -53,6 +53,9 @@ pass def write(self, logentry): + if 'isError' not in logentry: + logentry['isError'] = False + if s...
{"golden_diff": "diff --git a/src/cowrie/output/localsyslog.py b/src/cowrie/output/localsyslog.py\n--- a/src/cowrie/output/localsyslog.py\n+++ b/src/cowrie/output/localsyslog.py\n@@ -53,6 +53,9 @@\n pass\n \n def write(self, logentry):\n+ if 'isError' not in logentry:\n+ logentry['isError'...
1,788
128
gh_patches_debug_4834
rasdani/github-patches
git_diff
opensearch-project__opensearch-build-724
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Bug]: Broken UTs on `main` branch ### Describe the bug Seeing failures in these 2 UTs on main branch ``` Run pipenv run coverage run -m pytest --cov=./src --cov-report=xml F............................
diff --git a/src/run_assemble.py b/src/run_assemble.py --- a/src/run_assemble.py +++ b/src/run_assemble.py @@ -38,7 +38,7 @@ tarball_installation_script = os.path.realpath( os.path.join( os.path.dirname(os.path.abspath(__file__)), - "../release/tar/linux/opensearch-tar-install.sh",...
{"golden_diff": "diff --git a/src/run_assemble.py b/src/run_assemble.py\n--- a/src/run_assemble.py\n+++ b/src/run_assemble.py\n@@ -38,7 +38,7 @@\n tarball_installation_script = os.path.realpath(\n os.path.join(\n os.path.dirname(os.path.abspath(__file__)),\n- \"../release/tar/linux/op...
1,960
120
gh_patches_debug_21852
rasdani/github-patches
git_diff
wagtail__wagtail-7315
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Site history report n+1s While checking Scout APM for a client project with lots of different authors and overall activity, I've noticed that the site history report has a few N+1s. ![wagtail-log-views-rep...
diff --git a/wagtail/admin/views/reports/audit_logging.py b/wagtail/admin/views/reports/audit_logging.py --- a/wagtail/admin/views/reports/audit_logging.py +++ b/wagtail/admin/views/reports/audit_logging.py @@ -74,9 +74,7 @@ ) def get_queryset(self): - q = Q( - page__in=UserPagePermiss...
{"golden_diff": "diff --git a/wagtail/admin/views/reports/audit_logging.py b/wagtail/admin/views/reports/audit_logging.py\n--- a/wagtail/admin/views/reports/audit_logging.py\n+++ b/wagtail/admin/views/reports/audit_logging.py\n@@ -74,9 +74,7 @@\n )\n \n def get_queryset(self):\n- q = Q(\n- ...
1,251
285
gh_patches_debug_25226
rasdani/github-patches
git_diff
rotki__rotki-1397
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Install roboto mono ## Abstract We should install the mono version of our main font in order to increase legibility and proper alignment of content in certain scenarios. ## Specification https://www....
diff --git a/rotkehlchen/chain/ethereum/transactions.py b/rotkehlchen/chain/ethereum/transactions.py --- a/rotkehlchen/chain/ethereum/transactions.py +++ b/rotkehlchen/chain/ethereum/transactions.py @@ -72,6 +72,15 @@ # add new transactions to the DB if new_transactions != []: self.databa...
{"golden_diff": "diff --git a/rotkehlchen/chain/ethereum/transactions.py b/rotkehlchen/chain/ethereum/transactions.py\n--- a/rotkehlchen/chain/ethereum/transactions.py\n+++ b/rotkehlchen/chain/ethereum/transactions.py\n@@ -72,6 +72,15 @@\n # add new transactions to the DB\n if new_transactions != []:\n ...
1,643
291
gh_patches_debug_17132
rasdani/github-patches
git_diff
scoutapp__scout_apm_python-299
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Don't attempt to start on Windows (until supported) As of right now, we error out when attempting to start on a Microsoft Windows system. We should detect that the OS is not supported, and not start at all...
diff --git a/src/scout_apm/core/__init__.py b/src/scout_apm/core/__init__.py --- a/src/scout_apm/core/__init__.py +++ b/src/scout_apm/core/__init__.py @@ -2,6 +2,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals import logging +import sys from os import getpid from scout_ap...
{"golden_diff": "diff --git a/src/scout_apm/core/__init__.py b/src/scout_apm/core/__init__.py\n--- a/src/scout_apm/core/__init__.py\n+++ b/src/scout_apm/core/__init__.py\n@@ -2,6 +2,7 @@\n from __future__ import absolute_import, division, print_function, unicode_literals\n \n import logging\n+import sys\n from os impor...
669
210
gh_patches_debug_18254
rasdani/github-patches
git_diff
streamlit__streamlit-2470
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Watchdog error on install (Mac) I've tried to install it in a MAC using PIP and PIP3 and I get the same error: Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/pri...
diff --git a/lib/setup.py b/lib/setup.py --- a/lib/setup.py +++ b/lib/setup.py @@ -1,7 +1,5 @@ import os -import platform import setuptools -import subprocess import sys from setuptools.command.install import install @@ -33,18 +31,6 @@ packages = pipfile["packages"].copy() requirements = convert_deps_to_pip(pac...
{"golden_diff": "diff --git a/lib/setup.py b/lib/setup.py\n--- a/lib/setup.py\n+++ b/lib/setup.py\n@@ -1,7 +1,5 @@\n import os\n-import platform\n import setuptools\n-import subprocess\n import sys\n \n from setuptools.command.install import install\n@@ -33,18 +31,6 @@\n packages = pipfile[\"packages\"].copy()\n requir...
1,302
230
gh_patches_debug_25882
rasdani/github-patches
git_diff
mdn__kuma-6927
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- T - Update robots.txt (remove sites) **Summary** There are several page types that we have in our robots.txt, which means that Google can't crawl it to see that we don't want those pages to be indexed. ...
diff --git a/kuma/landing/views.py b/kuma/landing/views.py --- a/kuma/landing/views.py +++ b/kuma/landing/views.py @@ -61,52 +61,14 @@ User-agent: * Sitemap: https://developer.mozilla.org/sitemap.xml -Disallow: /admin/ Disallow: /api/ -Disallow: /*/dashboards/* -Disallow: /*docs/feeds -Disallow: /*docs/templates -...
{"golden_diff": "diff --git a/kuma/landing/views.py b/kuma/landing/views.py\n--- a/kuma/landing/views.py\n+++ b/kuma/landing/views.py\n@@ -61,52 +61,14 @@\n User-agent: *\n Sitemap: https://developer.mozilla.org/sitemap.xml\n \n-Disallow: /admin/\n Disallow: /api/\n-Disallow: /*/dashboards/*\n-Disallow: /*docs/feeds\n-...
1,845
448
gh_patches_debug_27712
rasdani/github-patches
git_diff
pyca__cryptography-10277
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cryptography_vectors is missing from `test` extra There is missing `cryptography_vectors` in the `test` extra in `pyproject.toml` so when tests are run from sdist with the `test` extra installed then testing ...
diff --git a/release.py b/release.py --- a/release.py +++ b/release.py @@ -38,23 +38,24 @@ run("git", "push", "--tags", "git@github.com:pyca/cryptography.git") -def replace_version( - p: pathlib.Path, variable_name: str, new_version: str -) -> None: +def replace_pattern(p: pathlib.Path, pattern: str, replac...
{"golden_diff": "diff --git a/release.py b/release.py\n--- a/release.py\n+++ b/release.py\n@@ -38,23 +38,24 @@\n run(\"git\", \"push\", \"--tags\", \"git@github.com:pyca/cryptography.git\")\n \n \n-def replace_version(\n- p: pathlib.Path, variable_name: str, new_version: str\n-) -> None:\n+def replace_pattern(p:...
1,009
429
gh_patches_debug_58135
rasdani/github-patches
git_diff
liqd__a4-meinberlin-1579
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Untranslated "Plans" ![screenshot from 2018-05-16 15-53-17](https://user-images.githubusercontent.com/2066372/40121189-48c8fe68-5921-11e8-9756-04eab5a7a83b.png) Maybe we just remove it since there is alr...
diff --git a/meinberlin/apps/plans/forms.py b/meinberlin/apps/plans/forms.py --- a/meinberlin/apps/plans/forms.py +++ b/meinberlin/apps/plans/forms.py @@ -64,7 +64,8 @@ class ProjectPlansDashboardForm(ProjectDashboardForm): - plans = CustomMultipleChoiceField(queryset=None) + plans = CustomMultipleChoiceFiel...
{"golden_diff": "diff --git a/meinberlin/apps/plans/forms.py b/meinberlin/apps/plans/forms.py\n--- a/meinberlin/apps/plans/forms.py\n+++ b/meinberlin/apps/plans/forms.py\n@@ -64,7 +64,8 @@\n \n \n class ProjectPlansDashboardForm(ProjectDashboardForm):\n- plans = CustomMultipleChoiceField(queryset=None)\n+ plans =...
1,019
112
gh_patches_debug_16587
rasdani/github-patches
git_diff
freedomofpress__securedrop-5839
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Several testinfra tests failing against 1.8.0-rc1 Focal production instances: ## Description `./securedrop-admin verify` against a 1.8.0-rc1 instance results in 11 test failures (of which 2 are expected) ...
diff --git a/molecule/testinfra/conftest.py b/molecule/testinfra/conftest.py --- a/molecule/testinfra/conftest.py +++ b/molecule/testinfra/conftest.py @@ -43,9 +43,11 @@ if testing_focal: hostvars['securedrop_venv_site_packages'] = hostvars["securedrop_venv_site_packages"].format("3.8") # noqa: E501 ...
{"golden_diff": "diff --git a/molecule/testinfra/conftest.py b/molecule/testinfra/conftest.py\n--- a/molecule/testinfra/conftest.py\n+++ b/molecule/testinfra/conftest.py\n@@ -43,9 +43,11 @@\n if testing_focal:\n hostvars['securedrop_venv_site_packages'] = hostvars[\"securedrop_venv_site_packages\"].format(\...
1,813
237
gh_patches_debug_18447
rasdani/github-patches
git_diff
facebookresearch__CompilerGym-442
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Observation 'Bitcode' without going through a temporary file. ## 🚀 Feature Have an observation which just returns the bytes of the bitcode, rather than the file. Going through a temporary file is a (tiny)...
diff --git a/compiler_gym/spaces/sequence.py b/compiler_gym/spaces/sequence.py --- a/compiler_gym/spaces/sequence.py +++ b/compiler_gym/spaces/sequence.py @@ -79,9 +79,18 @@ upper_bound = float("inf") if self.size_range[1] is None else self.size_range[1] if not (lower_bound <= len(x) <= upper_bound): ...
{"golden_diff": "diff --git a/compiler_gym/spaces/sequence.py b/compiler_gym/spaces/sequence.py\n--- a/compiler_gym/spaces/sequence.py\n+++ b/compiler_gym/spaces/sequence.py\n@@ -79,9 +79,18 @@\n upper_bound = float(\"inf\") if self.size_range[1] is None else self.size_range[1]\n if not (lower_bound <= ...
1,562
260
gh_patches_debug_67277
rasdani/github-patches
git_diff
litestar-org__litestar-2244
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/cli/main.py b/litestar/cli/main.py --- a/litestar/cli/main.py +++ b/litestar/cli/main.py @@ -27,7 +27,7 @@ click.rich_click.STYLE_ERRORS_SUGGESTION = "magenta italic" click.rich_click.ERRORS_SUGGESTION = "" click.rich_click.ERRORS_EPILOGUE = "" - click.rich_click.MAX_WIDTH = 100 ...
{"golden_diff": "diff --git a/litestar/cli/main.py b/litestar/cli/main.py\n--- a/litestar/cli/main.py\n+++ b/litestar/cli/main.py\n@@ -27,7 +27,7 @@\n click.rich_click.STYLE_ERRORS_SUGGESTION = \"magenta italic\"\n click.rich_click.ERRORS_SUGGESTION = \"\"\n click.rich_click.ERRORS_EPILOGUE = \"\"\n- cli...
1,124
147
gh_patches_debug_6898
rasdani/github-patches
git_diff
mozilla__bugbug-98
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Unnecessary string formatting when saving the model https://github.com/mozilla/bugbug/blob/ab007344c5c799c08739b2d56f334afcaf242919/bugbug/model.py#L111 is not needed, we can use the variable directly. --- E...
diff --git a/bugbug/model.py b/bugbug/model.py --- a/bugbug/model.py +++ b/bugbug/model.py @@ -104,7 +104,7 @@ print(metrics.confusion_matrix(y_test_filter, y_pred_filter, labels=class_names)) print(classification_report_imbalanced(y_test_filter, y_pred_filter, labels=class_names)) - ...
{"golden_diff": "diff --git a/bugbug/model.py b/bugbug/model.py\n--- a/bugbug/model.py\n+++ b/bugbug/model.py\n@@ -104,7 +104,7 @@\n print(metrics.confusion_matrix(y_test_filter, y_pred_filter, labels=class_names))\n print(classification_report_imbalanced(y_test_filter, y_pred_filter, labels=cla...
1,982
131
gh_patches_debug_28868
rasdani/github-patches
git_diff
streamlit__streamlit-2101
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Month dropdown on DateInput is very slow (~5s to appear) # Summary Month dropdown on DateInput is very slow (~5s to appear). See https://i.imgur.com/WkmHYag.gifv # Steps to reproduce What are the ste...
diff --git a/lib/streamlit/elements/time_widgets.py b/lib/streamlit/elements/time_widgets.py --- a/lib/streamlit/elements/time_widgets.py +++ b/lib/streamlit/elements/time_widgets.py @@ -61,12 +61,7 @@ return dg._enqueue("time_input", time_input_proto, current_value) # type: ignore def date_input( - ...
{"golden_diff": "diff --git a/lib/streamlit/elements/time_widgets.py b/lib/streamlit/elements/time_widgets.py\n--- a/lib/streamlit/elements/time_widgets.py\n+++ b/lib/streamlit/elements/time_widgets.py\n@@ -61,12 +61,7 @@\n return dg._enqueue(\"time_input\", time_input_proto, current_value) # type: ignore\n \n...
1,971
343
gh_patches_debug_40235
rasdani/github-patches
git_diff
qutebrowser__qutebrowser-3385
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Completion: match terms in any order [This regex](https://github.com/The-Compiler/qutebrowser/blob/master/qutebrowser/completion/models/sortfilter.py#L75), which is used to filter items for completion, constr...
diff --git a/qutebrowser/completion/models/histcategory.py b/qutebrowser/completion/models/histcategory.py --- a/qutebrowser/completion/models/histcategory.py +++ b/qutebrowser/completion/models/histcategory.py @@ -19,8 +19,6 @@ """A completion category that queries the SQL History store.""" -import re - from PyQ...
{"golden_diff": "diff --git a/qutebrowser/completion/models/histcategory.py b/qutebrowser/completion/models/histcategory.py\n--- a/qutebrowser/completion/models/histcategory.py\n+++ b/qutebrowser/completion/models/histcategory.py\n@@ -19,8 +19,6 @@\n \n \"\"\"A completion category that queries the SQL History store.\"\...
1,521
821
gh_patches_debug_5403
rasdani/github-patches
git_diff
ivy-llc__ivy-18003
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- fft2 --- 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/scipy/fft/fft.py` Content: `...
diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py --- a/ivy/functional/frontends/scipy/fft/fft.py +++ b/ivy/functional/frontends/scipy/fft/fft.py @@ -28,3 +28,8 @@ def idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None): inverse_type ...
{"golden_diff": "diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py\n--- a/ivy/functional/frontends/scipy/fft/fft.py\n+++ b/ivy/functional/frontends/scipy/fft/fft.py\n@@ -28,3 +28,8 @@\n def idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None...
606
211
gh_patches_debug_6100
rasdani/github-patches
git_diff
conan-io__conan-center-index-2011
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [bug] Some system packages fail to install (xorg/system, opengl/system) <!-- Please don't forget to update the issue title. Include all applicable information to help us reproduce your problem. To ...
diff --git a/recipes/opengl/all/conanfile.py b/recipes/opengl/all/conanfile.py --- a/recipes/opengl/all/conanfile.py +++ b/recipes/opengl/all/conanfile.py @@ -56,7 +56,7 @@ elif tools.os_info.with_zypper: packages = ["Mesa-libGL-devel"] else: - self.warn("don't ...
{"golden_diff": "diff --git a/recipes/opengl/all/conanfile.py b/recipes/opengl/all/conanfile.py\n--- a/recipes/opengl/all/conanfile.py\n+++ b/recipes/opengl/all/conanfile.py\n@@ -56,7 +56,7 @@\n elif tools.os_info.with_zypper:\n packages = [\"Mesa-libGL-devel\"]\n else:\n- ...
1,606
136
gh_patches_debug_37236
rasdani/github-patches
git_diff
ansible__awx-11599
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- doc error with inventory plugin for latest awx.awx inventory plugin ### Please confirm the following - [X] I agree to follow this project's [code of conduct](http://docs.ansible.com/ansible/latest/community...
diff --git a/awx_collection/plugins/doc_fragments/auth_plugin.py b/awx_collection/plugins/doc_fragments/auth_plugin.py --- a/awx_collection/plugins/doc_fragments/auth_plugin.py +++ b/awx_collection/plugins/doc_fragments/auth_plugin.py @@ -18,42 +18,42 @@ env: - name: CONTROLLER_HOST - name: TOWER_HOST - ...
{"golden_diff": "diff --git a/awx_collection/plugins/doc_fragments/auth_plugin.py b/awx_collection/plugins/doc_fragments/auth_plugin.py\n--- a/awx_collection/plugins/doc_fragments/auth_plugin.py\n+++ b/awx_collection/plugins/doc_fragments/auth_plugin.py\n@@ -18,42 +18,42 @@\n env:\n - name: CONTROLLER_HOST\n ...
1,384
739
gh_patches_debug_1537
rasdani/github-patches
git_diff
mitmproxy__mitmproxy-2051
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- @concurrent annotation doesn't work in the OOP script method I.E: ``` class SomeClass: @concurrent [doesn't work, 2 args] def request(self, flow): pass ``` @concurrent annotation doe...
diff --git a/mitmproxy/script/concurrent.py b/mitmproxy/script/concurrent.py --- a/mitmproxy/script/concurrent.py +++ b/mitmproxy/script/concurrent.py @@ -29,4 +29,8 @@ "script.concurrent (%s)" % fn.__name__, target=run ).start() - return _concurrent + # Support @concurrent for ...
{"golden_diff": "diff --git a/mitmproxy/script/concurrent.py b/mitmproxy/script/concurrent.py\n--- a/mitmproxy/script/concurrent.py\n+++ b/mitmproxy/script/concurrent.py\n@@ -29,4 +29,8 @@\n \"script.concurrent (%s)\" % fn.__name__,\n target=run\n ).start()\n- return _concurrent\n+ ...
609
123
gh_patches_debug_10057
rasdani/github-patches
git_diff
OCA__social-1068
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [15.0] mail_tracking: portal tests fail <!-- Provide a general summary of the issue in the Title above. Before opening the issue, please check that there isn't another issue addressing the same problem alrea...
diff --git a/mail_tracking/models/ir_mail_server.py b/mail_tracking/models/ir_mail_server.py --- a/mail_tracking/models/ir_mail_server.py +++ b/mail_tracking/models/ir_mail_server.py @@ -45,10 +45,10 @@ if tracking_email_id: headers = self._tracking_headers_add(tracking_email_id, headers) ...
{"golden_diff": "diff --git a/mail_tracking/models/ir_mail_server.py b/mail_tracking/models/ir_mail_server.py\n--- a/mail_tracking/models/ir_mail_server.py\n+++ b/mail_tracking/models/ir_mail_server.py\n@@ -45,10 +45,10 @@\n if tracking_email_id:\n headers = self._tracking_headers_add(tracking_email...
1,607
158
gh_patches_debug_35032
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-1880
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spider quiznos is broken During the global build at 2021-05-26-14-42-23, spider **quiznos** failed with **129 features** and **1 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42...
diff --git a/locations/spiders/quiznos.py b/locations/spiders/quiznos.py --- a/locations/spiders/quiznos.py +++ b/locations/spiders/quiznos.py @@ -2,22 +2,24 @@ import scrapy import json import re -import traceback from locations.items import GeojsonPointItem -URL = "http://restaurants.quiznos.com" class Qui...
{"golden_diff": "diff --git a/locations/spiders/quiznos.py b/locations/spiders/quiznos.py\n--- a/locations/spiders/quiznos.py\n+++ b/locations/spiders/quiznos.py\n@@ -2,22 +2,24 @@\n import scrapy\n import json\n import re\n-import traceback\n \n from locations.items import GeojsonPointItem\n \n-URL = \"http://restaura...
1,278
609
gh_patches_debug_37893
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-5532
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs....
diff --git a/examples/language/grok-1/inference.py b/examples/language/grok-1/inference.py --- a/examples/language/grok-1/inference.py +++ b/examples/language/grok-1/inference.py @@ -1,7 +1,7 @@ import time import torch -from transformers import AutoModelForCausalLM, LlamaTokenizerFast +from transformers import Aut...
{"golden_diff": "diff --git a/examples/language/grok-1/inference.py b/examples/language/grok-1/inference.py\n--- a/examples/language/grok-1/inference.py\n+++ b/examples/language/grok-1/inference.py\n@@ -1,7 +1,7 @@\n import time\n \n import torch\n-from transformers import AutoModelForCausalLM, LlamaTokenizerFast\n+fro...
1,411
622
gh_patches_debug_10285
rasdani/github-patches
git_diff
certbot__certbot-6002
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Certbot crashes if EFF e-mail submission endpoint is unavailable Certbot will crash if the user's e-mail information can't be submitted to the EFF endpoint: https://community.letsencrypt.org/t/issue-when-t...
diff --git a/certbot/eff.py b/certbot/eff.py --- a/certbot/eff.py +++ b/certbot/eff.py @@ -71,11 +71,14 @@ """ logger.debug('Received response:\n%s', response.content) - if response.ok: - if not response.json()['status']: + try: + response.raise_for_status() + if response.json()['...
{"golden_diff": "diff --git a/certbot/eff.py b/certbot/eff.py\n--- a/certbot/eff.py\n+++ b/certbot/eff.py\n@@ -71,11 +71,14 @@\n \n \"\"\"\n logger.debug('Received response:\\n%s', response.content)\n- if response.ok:\n- if not response.json()['status']:\n+ try:\n+ response.raise_for_status(...
1,319
166
gh_patches_debug_34333
rasdani/github-patches
git_diff
internetarchive__openlibrary-8896
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove fixed subject line from contact form The contact form has a drop down for choosing a topic. When patrons submit this form, the submissions all go to the same inbox. The selected topics are usually inco...
diff --git a/openlibrary/plugins/openlibrary/support.py b/openlibrary/plugins/openlibrary/support.py --- a/openlibrary/plugins/openlibrary/support.py +++ b/openlibrary/plugins/openlibrary/support.py @@ -32,11 +32,12 @@ patron_name = form.get("name", "") email = form.get("email", "") topic = f...
{"golden_diff": "diff --git a/openlibrary/plugins/openlibrary/support.py b/openlibrary/plugins/openlibrary/support.py\n--- a/openlibrary/plugins/openlibrary/support.py\n+++ b/openlibrary/plugins/openlibrary/support.py\n@@ -32,11 +32,12 @@\n patron_name = form.get(\"name\", \"\")\n email = form.get(\"ema...
1,429
448
gh_patches_debug_30256
rasdani/github-patches
git_diff
TheAlgorithms__Python-3949
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- web_programming/fetch_github_info.py err <pre>message: Bad credentials. The API can&apos;t be accessed using username/password authentication. Please create a personal access token to access this endpoint: ht...
diff --git a/web_programming/fetch_github_info.py b/web_programming/fetch_github_info.py --- a/web_programming/fetch_github_info.py +++ b/web_programming/fetch_github_info.py @@ -1,26 +1,50 @@ #!/usr/bin/env python3 - """ Created by sarathkaul on 14/11/19 +Updated by lawric1 on 24/11/20 -Basic authentication using...
{"golden_diff": "diff --git a/web_programming/fetch_github_info.py b/web_programming/fetch_github_info.py\n--- a/web_programming/fetch_github_info.py\n+++ b/web_programming/fetch_github_info.py\n@@ -1,26 +1,50 @@\n #!/usr/bin/env python3\n-\n \"\"\"\n Created by sarathkaul on 14/11/19\n+Updated by lawric1 on 24/11/20\n...
574
597
gh_patches_debug_14459
rasdani/github-patches
git_diff
sql-machine-learning__elasticdl-268
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [clean up] Should check tf is running eagerly early so the program can fail early if tf is configured wrong. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these f...
diff --git a/elasticdl/worker/worker.py b/elasticdl/worker/worker.py --- a/elasticdl/worker/worker.py +++ b/elasticdl/worker/worker.py @@ -1,4 +1,6 @@ import tensorflow as tf +assert tf.executing_eagerly() + from tensorflow.python.ops import math_ops from proto import master_pb2 from proto import master_pb2_grpc @@...
{"golden_diff": "diff --git a/elasticdl/worker/worker.py b/elasticdl/worker/worker.py\n--- a/elasticdl/worker/worker.py\n+++ b/elasticdl/worker/worker.py\n@@ -1,4 +1,6 @@\n import tensorflow as tf\n+assert tf.executing_eagerly()\n+\n from tensorflow.python.ops import math_ops\n from proto import master_pb2\n from proto...
1,104
174
gh_patches_debug_22781
rasdani/github-patches
git_diff
microsoft__lisa-491
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- VERIFY-BOOT-ERROR-WARNINGS.py: fix test case Test case is not running properly on redhat. Run the script directly, not through lisav2 to observe this better. Release: 7.7 Snapshot 5 (most likely 7.6 should...
diff --git a/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py b/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py --- a/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py +++ b/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py @@ -9,9 +9,9 @@ def RunTest(): UpdateState("TestRunning") RunLog.info("Checking for ERROR ...
{"golden_diff": "diff --git a/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py b/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py\n--- a/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py\n+++ b/Testscripts/Linux/VERIFY-BOOT-ERROR-WARNINGS.py\n@@ -9,9 +9,9 @@\n def RunTest():\n UpdateState(\"TestRunning\")\n RunLog....
1,302
388
gh_patches_debug_23467
rasdani/github-patches
git_diff
saleor__saleor-809
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Calling get_price_range() on an empty item range On the product detail page backend doesn't check existence of product variants. If the product requires variants, but they don't exist, Django throws an excep...
diff --git a/saleor/product/utils.py b/saleor/product/utils.py --- a/saleor/product/utils.py +++ b/saleor/product/utils.py @@ -45,6 +45,15 @@ def get_availability(product, discounts=None, local_currency=None): + if not product.variants.exists(): + return ProductAvailability( + available=False,...
{"golden_diff": "diff --git a/saleor/product/utils.py b/saleor/product/utils.py\n--- a/saleor/product/utils.py\n+++ b/saleor/product/utils.py\n@@ -45,6 +45,15 @@\n \n \n def get_availability(product, discounts=None, local_currency=None):\n+ if not product.variants.exists():\n+ return ProductAvailability(\n+ ...
1,765
259
gh_patches_debug_54265
rasdani/github-patches
git_diff
hylang__hy-411
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- problem with comment parsing I was translating some code to Hy from a textbook on Python programming (http://inventwithpython.com/pygame/index.html) and ran into a problem with this direct translation. ``` (...
diff --git a/hy/lex/lexer.py b/hy/lex/lexer.py --- a/hy/lex/lexer.py +++ b/hy/lex/lexer.py @@ -60,7 +60,7 @@ lg.add('IDENTIFIER', r'[^()\[\]{}\'"\s;]+') -lg.ignore(r';.*[\r\n]+') +lg.ignore(r';.*(?=\r|\n|$)') lg.ignore(r'\s+')
{"golden_diff": "diff --git a/hy/lex/lexer.py b/hy/lex/lexer.py\n--- a/hy/lex/lexer.py\n+++ b/hy/lex/lexer.py\n@@ -60,7 +60,7 @@\n lg.add('IDENTIFIER', r'[^()\\[\\]{}\\'\"\\s;]+')\n \n \n-lg.ignore(r';.*[\\r\\n]+')\n+lg.ignore(r';.*(?=\\r|\\n|$)')\n lg.ignore(r'\\s+')\n", "issue": "problem with comment parsing\nI was t...
1,580
102
gh_patches_debug_91
rasdani/github-patches
git_diff
projectmesa__mesa-535
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Issue 523 add networkx to the dependency specified in setup.py for #523 to allow all the tests to run without error when installing with the `pip install -e .` command. --- END ISSUE --- Below are some code...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ requires = [ 'tornado >= 4.2, < 5.0.0', + 'networkx', 'numpy', 'pandas', 'tqdm',
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -7,6 +7,7 @@\n \n requires = [\n 'tornado >= 4.2, < 5.0.0',\n+ 'networkx',\n 'numpy',\n 'pandas',\n 'tqdm',\n", "issue": "Issue 523\nadd networkx to the dependency specified in setup.py for #523 to allow all the tes...
821
73
gh_patches_debug_24159
rasdani/github-patches
git_diff
pytorch__ignite-399
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Improve State documentation Hi, I think the documentation of states and the way they're used by engines is not detailed enough. Currently the only way to know what attributes are available in the default ...
diff --git a/ignite/__init__.py b/ignite/__init__.py --- a/ignite/__init__.py +++ b/ignite/__init__.py @@ -3,5 +3,6 @@ import ignite.metrics import ignite.exceptions import ignite.contrib +import ignite.utils __version__ = '0.1.2' diff --git a/ignite/engine/__init__.py b/ignite/engine/__init__.py --- a/ignite/eng...
{"golden_diff": "diff --git a/ignite/__init__.py b/ignite/__init__.py\n--- a/ignite/__init__.py\n+++ b/ignite/__init__.py\n@@ -3,5 +3,6 @@\n import ignite.metrics\n import ignite.exceptions\n import ignite.contrib\n+import ignite.utils\n \n __version__ = '0.1.2'\ndiff --git a/ignite/engine/__init__.py b/ignite/engine/_...
1,571
290
gh_patches_debug_21524
rasdani/github-patches
git_diff
mindsdb__mindsdb-981
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Route to check connection At this moment in GUI possible check connection only for already exists integration. Route need for checking connection before integration created. --- END ISSUE --- Below are some...
diff --git a/mindsdb/api/http/namespaces/config.py b/mindsdb/api/http/namespaces/config.py --- a/mindsdb/api/http/namespaces/config.py +++ b/mindsdb/api/http/namespaces/config.py @@ -55,6 +55,11 @@ params = request.json.get('params') if not isinstance(params, dict): abort(400, "type of 'p...
{"golden_diff": "diff --git a/mindsdb/api/http/namespaces/config.py b/mindsdb/api/http/namespaces/config.py\n--- a/mindsdb/api/http/namespaces/config.py\n+++ b/mindsdb/api/http/namespaces/config.py\n@@ -55,6 +55,11 @@\n params = request.json.get('params')\n if not isinstance(params, dict):\n ...
1,485
261
gh_patches_debug_29959
rasdani/github-patches
git_diff
joke2k__faker-1800
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Latvian ssn generator is not correct * Faker version: 17.0.0 * OS: Windows Latvian ssn generator generates ssn in format 'ddd-dd-dddd', which is not correct. ### Steps to reproduce ``` from fake...
diff --git a/faker/providers/ssn/lv_LV/__init__.py b/faker/providers/ssn/lv_LV/__init__.py --- a/faker/providers/ssn/lv_LV/__init__.py +++ b/faker/providers/ssn/lv_LV/__init__.py @@ -1,7 +1,56 @@ -from .. import Provider as BaseProvider +import datetime +from .. import Provider as SsnProvider + + +class Provider(SsnP...
{"golden_diff": "diff --git a/faker/providers/ssn/lv_LV/__init__.py b/faker/providers/ssn/lv_LV/__init__.py\n--- a/faker/providers/ssn/lv_LV/__init__.py\n+++ b/faker/providers/ssn/lv_LV/__init__.py\n@@ -1,7 +1,56 @@\n-from .. import Provider as BaseProvider\n+import datetime\n \n+from .. import Provider as SsnProvider\...
592
738
gh_patches_debug_11013
rasdani/github-patches
git_diff
holoviz__panel-6293
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pn.template attribute not found when lazy loading panel panel==1.3.8 As Panel takes ~2secs to import I would like to lazy load it in one of my packages. This package provides different utility functions. O...
diff --git a/panel/__init__.py b/panel/__init__.py --- a/panel/__init__.py +++ b/panel/__init__.py @@ -54,6 +54,7 @@ from . import param # noqa from . import pipeline # noqa from . import reactive # noqa +from . import template # noqa from . import viewable # noqa from . import widgets # noqa from .config i...
{"golden_diff": "diff --git a/panel/__init__.py b/panel/__init__.py\n--- a/panel/__init__.py\n+++ b/panel/__init__.py\n@@ -54,6 +54,7 @@\n from . import param # noqa\n from . import pipeline # noqa\n from . import reactive # noqa\n+from . import template # noqa\n from . import viewable # noqa\n from . import widge...
1,731
159
gh_patches_debug_40115
rasdani/github-patches
git_diff
Pylons__pyramid-2902
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- add_translation_dirs behaves the wrong way around This is a follow-up to #1473. See the reproducer and notes there. I would propose an API change that changes behaviour of add_translation_dirs to append spec...
diff --git a/pyramid/config/i18n.py b/pyramid/config/i18n.py --- a/pyramid/config/i18n.py +++ b/pyramid/config/i18n.py @@ -42,7 +42,7 @@ self.registry.registerUtility(locale_negotiator, ILocaleNegotiator) @action_method - def add_translation_dirs(self, *specs): + def add_translation_dirs(self, *sp...
{"golden_diff": "diff --git a/pyramid/config/i18n.py b/pyramid/config/i18n.py\n--- a/pyramid/config/i18n.py\n+++ b/pyramid/config/i18n.py\n@@ -42,7 +42,7 @@\n self.registry.registerUtility(locale_negotiator, ILocaleNegotiator)\n \n @action_method\n- def add_translation_dirs(self, *specs):\n+ def add_t...
1,427
628
gh_patches_debug_43176
rasdani/github-patches
git_diff
encode__starlette-134
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support `shutdown` as a synonym for `cleanup` * Support either `cleanup` or `shutdown` as the ASGI lifespan message name. * Update uvicorn to move to shutdown - https://github.com/encode/uvicorn/issues/233 ...
diff --git a/starlette/lifespan.py b/starlette/lifespan.py --- a/starlette/lifespan.py +++ b/starlette/lifespan.py @@ -22,7 +22,7 @@ return decorator def add_event_handler(self, event_type: str, func: typing.Callable) -> None: - assert event_type in ("startup", "cleanup") + assert event_ty...
{"golden_diff": "diff --git a/starlette/lifespan.py b/starlette/lifespan.py\n--- a/starlette/lifespan.py\n+++ b/starlette/lifespan.py\n@@ -22,7 +22,7 @@\n return decorator\n \n def add_event_handler(self, event_type: str, func: typing.Callable) -> None:\n- assert event_type in (\"startup\", \"cleanup...
1,484
888
gh_patches_debug_32409
rasdani/github-patches
git_diff
plone__Products.CMFPlone-1044
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- HTML filtering requires a "re save" on each page for the settings to take effect. Using: Plone 5.0b4.dev0 (5007) Been testing the HTML filtering settings using iFrame video. When I add an "iframe" video t...
diff --git a/Products/CMFPlone/controlpanel/browser/filter.py b/Products/CMFPlone/controlpanel/browser/filter.py --- a/Products/CMFPlone/controlpanel/browser/filter.py +++ b/Products/CMFPlone/controlpanel/browser/filter.py @@ -15,12 +15,7 @@ class FilterControlPanel(AutoExtensibleForm, form.EditForm): id = "Filte...
{"golden_diff": "diff --git a/Products/CMFPlone/controlpanel/browser/filter.py b/Products/CMFPlone/controlpanel/browser/filter.py\n--- a/Products/CMFPlone/controlpanel/browser/filter.py\n+++ b/Products/CMFPlone/controlpanel/browser/filter.py\n@@ -15,12 +15,7 @@\n class FilterControlPanel(AutoExtensibleForm, form.EditFo...
1,597
425
gh_patches_debug_9181
rasdani/github-patches
git_diff
certbot__certbot-9218
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- snap_config.prepare_env can hang forever if snapd is malfunctioning Reported at https://community.letsencrypt.org/t/sudo-certbot-renew-hangs-forever/138649 There's some evidence in that thread that `snapd`...
diff --git a/certbot/certbot/_internal/snap_config.py b/certbot/certbot/_internal/snap_config.py --- a/certbot/certbot/_internal/snap_config.py +++ b/certbot/certbot/_internal/snap_config.py @@ -54,7 +54,8 @@ session.mount('http://snapd/', _SnapdAdapter()) try: - response = session.get('h...
{"golden_diff": "diff --git a/certbot/certbot/_internal/snap_config.py b/certbot/certbot/_internal/snap_config.py\n--- a/certbot/certbot/_internal/snap_config.py\n+++ b/certbot/certbot/_internal/snap_config.py\n@@ -54,7 +54,8 @@\n session.mount('http://snapd/', _SnapdAdapter())\n \n try:\n- r...
1,615
181
gh_patches_debug_2671
rasdani/github-patches
git_diff
saleor__saleor-1389
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add robots meta tag and "nofollow" link attribute 1. Fragile pages should be not indexed by search engines. ``` <meta name=”robots” content=”nofollow, noindex”> ``` - [x] Add above meta tag to order's con...
diff --git a/saleor/core/views.py b/saleor/core/views.py --- a/saleor/core/views.py +++ b/saleor/core/views.py @@ -2,7 +2,6 @@ from django.template.response import TemplateResponse from django.contrib import messages -from django.conf import settings from django.utils.translation import pgettext_lazy from imperso...
{"golden_diff": "diff --git a/saleor/core/views.py b/saleor/core/views.py\n--- a/saleor/core/views.py\n+++ b/saleor/core/views.py\n@@ -2,7 +2,6 @@\n \n from django.template.response import TemplateResponse\n from django.contrib import messages\n-from django.conf import settings\n from django.utils.translation import pg...
683
89
gh_patches_debug_9597
rasdani/github-patches
git_diff
google__turbinia-1017
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cron.py unicode decode error It looks like input evidence caused a unicode error for cron. I think this would only be raised when receiving unreadable input but filing this if we want to catch this exception ...
diff --git a/turbinia/workers/cron.py b/turbinia/workers/cron.py --- a/turbinia/workers/cron.py +++ b/turbinia/workers/cron.py @@ -51,7 +51,14 @@ # Read the input file with open(evidence.local_path, 'r') as input_file: - crontab = input_file.read() + try: + crontab = input_file.read() + ...
{"golden_diff": "diff --git a/turbinia/workers/cron.py b/turbinia/workers/cron.py\n--- a/turbinia/workers/cron.py\n+++ b/turbinia/workers/cron.py\n@@ -51,7 +51,14 @@\n \n # Read the input file\n with open(evidence.local_path, 'r') as input_file:\n- crontab = input_file.read()\n+ try:\n+ crontab...
1,592
197
gh_patches_debug_933
rasdani/github-patches
git_diff
python-pillow__Pillow-399
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Image opened twice if imagemagick and xv are installed If ImageMagick and xv are both installed and you call Image.show() it will open the image twice, once with display and once with xv. This is probably rel...
diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py --- a/PIL/ImageShow.py +++ b/PIL/ImageShow.py @@ -65,7 +65,7 @@ if base != image.mode and image.mode != "1": image = image.convert(base) - self.show_image(image, **options) + return self.show_image(image, **options) # hook met...
{"golden_diff": "diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py\n--- a/PIL/ImageShow.py\n+++ b/PIL/ImageShow.py\n@@ -65,7 +65,7 @@\n if base != image.mode and image.mode != \"1\":\n image = image.convert(base)\n \n- self.show_image(image, **options)\n+ return self.show_image(image, *...
1,844
92
gh_patches_debug_20118
rasdani/github-patches
git_diff
google__turbinia-321
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- turbinia_job_graph.py doesn't support new job manager turbinia_job_graph.py needs to be updated to support the new job manager (from #257). --- END ISSUE --- Below are some code segments, each from a releva...
diff --git a/tools/turbinia_job_graph.py b/tools/turbinia_job_graph.py --- a/tools/turbinia_job_graph.py +++ b/tools/turbinia_job_graph.py @@ -19,7 +19,7 @@ import argparse import graphviz -from turbinia.jobs import get_jobs as turbinia_jobs +from turbinia.jobs import manager as jobs_manager def create_graph()...
{"golden_diff": "diff --git a/tools/turbinia_job_graph.py b/tools/turbinia_job_graph.py\n--- a/tools/turbinia_job_graph.py\n+++ b/tools/turbinia_job_graph.py\n@@ -19,7 +19,7 @@\n import argparse\n import graphviz\n \n-from turbinia.jobs import get_jobs as turbinia_jobs\n+from turbinia.jobs import manager as jobs_manage...
851
269
gh_patches_debug_11740
rasdani/github-patches
git_diff
locustio__locust-2715
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Locust insists on using IPv6 despite being in an IPv4 stack. ### Prerequisites - [X] I am using [the latest version of Locust](https://github.com/locustio/locust/releases/) - [X] I am reporting a bug, not...
diff --git a/locust/rpc/zmqrpc.py b/locust/rpc/zmqrpc.py --- a/locust/rpc/zmqrpc.py +++ b/locust/rpc/zmqrpc.py @@ -4,6 +4,7 @@ import msgpack.exceptions as msgerr import zmq.error as zmqerr import zmq.green as zmq +from urllib3.util.connection import HAS_IPV6 from .protocol import Message @@ -15,7 +16,8 @@ ...
{"golden_diff": "diff --git a/locust/rpc/zmqrpc.py b/locust/rpc/zmqrpc.py\n--- a/locust/rpc/zmqrpc.py\n+++ b/locust/rpc/zmqrpc.py\n@@ -4,6 +4,7 @@\n import msgpack.exceptions as msgerr\n import zmq.error as zmqerr\n import zmq.green as zmq\n+from urllib3.util.connection import HAS_IPV6\n \n from .protocol import Messag...
1,494
196
gh_patches_debug_1391
rasdani/github-patches
git_diff
opsdroid__opsdroid-1683
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- skill-seen broken with redis database? I've been testing opsdroid with a redis database and the seen skill appears to be having problems serializing python datetime objects. user: when did you last see use...
diff --git a/opsdroid/database/redis/__init__.py b/opsdroid/database/redis/__init__.py --- a/opsdroid/database/redis/__init__.py +++ b/opsdroid/database/redis/__init__.py @@ -94,7 +94,7 @@ data = await self.client.execute("GET", key) if data: - return json.loads(data, encoding...
{"golden_diff": "diff --git a/opsdroid/database/redis/__init__.py b/opsdroid/database/redis/__init__.py\n--- a/opsdroid/database/redis/__init__.py\n+++ b/opsdroid/database/redis/__init__.py\n@@ -94,7 +94,7 @@\n data = await self.client.execute(\"GET\", key)\n \n if data:\n- return...
1,717
115
gh_patches_debug_13451
rasdani/github-patches
git_diff
CTPUG__wafer-312
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Schedule Editor does not clear extra fields on existing items When replacing an existing item in the schedule editor, the notes, css_class and details fields are not replaced or cleared. While this can be us...
diff --git a/wafer/schedule/serializers.py b/wafer/schedule/serializers.py --- a/wafer/schedule/serializers.py +++ b/wafer/schedule/serializers.py @@ -34,6 +34,12 @@ existing_schedule_item.talk = talk existing_schedule_item.page = page existing_schedule_item.slots = slots + ...
{"golden_diff": "diff --git a/wafer/schedule/serializers.py b/wafer/schedule/serializers.py\n--- a/wafer/schedule/serializers.py\n+++ b/wafer/schedule/serializers.py\n@@ -34,6 +34,12 @@\n existing_schedule_item.talk = talk\n existing_schedule_item.page = page\n existing_schedule_item...
730
169
gh_patches_debug_827
rasdani/github-patches
git_diff
elastic__apm-agent-python-1558
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 369: invalid start byte **Describe the bug**: Sending PUT request to FastAPI with binary file encoded, its returns a error. **To Repro...
diff --git a/elasticapm/contrib/starlette/utils.py b/elasticapm/contrib/starlette/utils.py --- a/elasticapm/contrib/starlette/utils.py +++ b/elasticapm/contrib/starlette/utils.py @@ -129,7 +129,7 @@ request._stream_consumed = False - return body.decode("utf-8") + return body.decode("utf-8", errors="repla...
{"golden_diff": "diff --git a/elasticapm/contrib/starlette/utils.py b/elasticapm/contrib/starlette/utils.py\n--- a/elasticapm/contrib/starlette/utils.py\n+++ b/elasticapm/contrib/starlette/utils.py\n@@ -129,7 +129,7 @@\n \n request._stream_consumed = False\n \n- return body.decode(\"utf-8\")\n+ return body.de...
1,938
115
gh_patches_debug_24514
rasdani/github-patches
git_diff
bridgecrewio__checkov-2025
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Check CKV_AZURE_50 fails incorrectly for resource 'azurerm_virtual_machine' CKV_AZURE_50 always fails for the resource "azurerm_virtual_machine" due to an incorrect check of the existence of the attribute "al...
diff --git a/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py b/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py --- a/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py +++ b/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py @@ -1,20 +1,21 @@ -from c...
{"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py b/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py\n--- a/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py\n+++ b/checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py\n@@ -1...
656
353
gh_patches_debug_9846
rasdani/github-patches
git_diff
microsoft__playwright-python-472
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Interactive mode (REPL) (v 1.8.0a1) Error **from playwright.sync_api import sync_playwright playwright = sync_playwright().start()** Traceback (most recent call last): File "C:\Python37\lib\site-packa...
diff --git a/playwright/_impl/_transport.py b/playwright/_impl/_transport.py --- a/playwright/_impl/_transport.py +++ b/playwright/_impl/_transport.py @@ -29,7 +29,7 @@ # pytest-xdist monkeypatches sys.stderr with an object that is not an actual file. # https://docs.python.org/3/library/faulthandler.h...
{"golden_diff": "diff --git a/playwright/_impl/_transport.py b/playwright/_impl/_transport.py\n--- a/playwright/_impl/_transport.py\n+++ b/playwright/_impl/_transport.py\n@@ -29,7 +29,7 @@\n # pytest-xdist monkeypatches sys.stderr with an object that is not an actual file.\n # https://docs.python.org/3/...
1,754
149
gh_patches_debug_829
rasdani/github-patches
git_diff
ivy-llc__ivy-15926
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- log --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `ivy/functional/frontends/paddle/tensor/math.py` Conten...
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py --- a/ivy/functional/frontends/paddle/tensor/math.py +++ b/ivy/functional/frontends/paddle/tensor/math.py @@ -46,3 +46,9 @@ @to_ivy_arrays_and_back def asin(x, name=None): return ivy.asin(x) + + +@with_un...
{"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py\n--- a/ivy/functional/frontends/paddle/tensor/math.py\n+++ b/ivy/functional/frontends/paddle/tensor/math.py\n@@ -46,3 +46,9 @@\n @to_ivy_arrays_and_back\n def asin(x, name=None):\n return iv...
793
155
gh_patches_debug_36271
rasdani/github-patches
git_diff
opsdroid__opsdroid-1835
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Upgrade redis database backend to use aioredis v2 Looks like v2 of `aioredis` is out and has breaking changes which affect us. In #1809 I've pinned us to v1 for now but we should upgrade things to work with v...
diff --git a/opsdroid/database/redis/__init__.py b/opsdroid/database/redis/__init__.py --- a/opsdroid/database/redis/__init__.py +++ b/opsdroid/database/redis/__init__.py @@ -2,8 +2,7 @@ import json import logging -import aioredis -from aioredis import parser +from aioredis import Redis from voluptuous import Any ...
{"golden_diff": "diff --git a/opsdroid/database/redis/__init__.py b/opsdroid/database/redis/__init__.py\n--- a/opsdroid/database/redis/__init__.py\n+++ b/opsdroid/database/redis/__init__.py\n@@ -2,8 +2,7 @@\n import json\n import logging\n \n-import aioredis\n-from aioredis import parser\n+from aioredis import Redis\n ...
1,633
490
gh_patches_debug_28142
rasdani/github-patches
git_diff
pypa__pip-8617
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fail legacy install if .egg-info directory was not created **What's the problem this feature will solve?** Currently on the legacy install code path ([here](https://github.com/pypa/pip/blob/e0239735a3d8a50...
diff --git a/src/pip/_internal/operations/install/legacy.py b/src/pip/_internal/operations/install/legacy.py --- a/src/pip/_internal/operations/install/legacy.py +++ b/src/pip/_internal/operations/install/legacy.py @@ -6,7 +6,7 @@ import sys from distutils.util import change_root -from pip._internal.utils.deprecati...
{"golden_diff": "diff --git a/src/pip/_internal/operations/install/legacy.py b/src/pip/_internal/operations/install/legacy.py\n--- a/src/pip/_internal/operations/install/legacy.py\n+++ b/src/pip/_internal/operations/install/legacy.py\n@@ -6,7 +6,7 @@\n import sys\n from distutils.util import change_root\n \n-from pip._...
1,957
378
gh_patches_debug_73
rasdani/github-patches
git_diff
pypa__setuptools-1043
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- No module named 'six' Flask's Tox/Travis builds all started failing. Looks like a new version of setuptools was just released that has a problem with six. ~~~pytb Obtaining file:///home/david/Projects/fla...
diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -4,7 +4,7 @@ import platform -import six +from setuptools.extern import six def get_all_headers(message, key):
{"golden_diff": "diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py\n--- a/setuptools/py27compat.py\n+++ b/setuptools/py27compat.py\n@@ -4,7 +4,7 @@\n \n import platform\n \n-import six\n+from setuptools.extern import six\n \n \n def get_all_headers(message, key):\n", "issue": "No module named 'six'\nFlas...
1,254
73
gh_patches_debug_40886
rasdani/github-patches
git_diff
pwndbg__pwndbg-900
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- telescope should not fold single values, should probably be configurable In this screenshot, we should simply display the 0x28 and 0x90 and 0x108 offset in the stack trace. The ellipsis isn't particularly us...
diff --git a/pwndbg/commands/telescope.py b/pwndbg/commands/telescope.py --- a/pwndbg/commands/telescope.py +++ b/pwndbg/commands/telescope.py @@ -23,6 +23,8 @@ telescope_lines = pwndbg.config.Parameter('telescope-lines', 8, 'number of lines to printed by the telescope command') skip_repeating_values = pwndbg.config....
{"golden_diff": "diff --git a/pwndbg/commands/telescope.py b/pwndbg/commands/telescope.py\n--- a/pwndbg/commands/telescope.py\n+++ b/pwndbg/commands/telescope.py\n@@ -23,6 +23,8 @@\n telescope_lines = pwndbg.config.Parameter('telescope-lines', 8, 'number of lines to printed by the telescope command')\n skip_repeating_v...
2,019
735
gh_patches_debug_40595
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-3159
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests [booster] implement accelerator # Overview `Accelerator` is an abstraction for the hardware devices used for training. ...
diff --git a/colossalai/booster/accelerator.py b/colossalai/booster/accelerator.py --- a/colossalai/booster/accelerator.py +++ b/colossalai/booster/accelerator.py @@ -3,12 +3,52 @@ __all__ = ['Accelerator'] +_supported_devices = [ + 'cpu', + 'cuda', + + # To be supported + # 'xpu', + # 'npu', + #...
{"golden_diff": "diff --git a/colossalai/booster/accelerator.py b/colossalai/booster/accelerator.py\n--- a/colossalai/booster/accelerator.py\n+++ b/colossalai/booster/accelerator.py\n@@ -3,12 +3,52 @@\n \n __all__ = ['Accelerator']\n \n+_supported_devices = [\n+ 'cpu',\n+ 'cuda',\n+\n+ # To be supported\n+ ...
1,945
892
gh_patches_debug_6810
rasdani/github-patches
git_diff
Pylons__pyramid-2671
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- reify docstring doesn't render properly The testsetup section is omitted from the rendered docs at http://pyramid.readthedocs.io/en/latest/api/decorator.html#pyramid.decorator.reify Unfortunately this sectio...
diff --git a/pyramid/decorator.py b/pyramid/decorator.py --- a/pyramid/decorator.py +++ b/pyramid/decorator.py @@ -8,6 +8,16 @@ replacing the function it decorates with an instance variable. It is, in Python parlance, a non-data descriptor. An example: + .. code-block:: python + + from pyramid.d...
{"golden_diff": "diff --git a/pyramid/decorator.py b/pyramid/decorator.py\n--- a/pyramid/decorator.py\n+++ b/pyramid/decorator.py\n@@ -8,6 +8,16 @@\n replacing the function it decorates with an instance variable. It is, in\n Python parlance, a non-data descriptor. An example:\n \n+ .. code-block:: python\n...
719
149