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_33725
rasdani/github-patches
git_diff
modoboa__modoboa-1859
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dashboard - server behind proxy # Impacted versions * Modoboa: 1.14.0 * Webserver: Nginx # Steps to reproduce Modoboa server is behind proxy, so no internet direct access Acces dashboard via admin ac...
diff --git a/modoboa/core/views/dashboard.py b/modoboa/core/views/dashboard.py --- a/modoboa/core/views/dashboard.py +++ b/modoboa/core/views/dashboard.py @@ -8,6 +8,8 @@ from django.contrib.auth import mixins as auth_mixins from django.views import generic +from django.conf import settings + from .. import signal...
{"golden_diff": "diff --git a/modoboa/core/views/dashboard.py b/modoboa/core/views/dashboard.py\n--- a/modoboa/core/views/dashboard.py\n+++ b/modoboa/core/views/dashboard.py\n@@ -8,6 +8,8 @@\n from django.contrib.auth import mixins as auth_mixins\n from django.views import generic\n \n+from django.conf import settings\...
1,085
432
gh_patches_debug_15542
rasdani/github-patches
git_diff
replicate__cog-553
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dear friend,please tell me why I can't run it from cog example. I am a newbie. I run the code from cog examples. I can run "cog run python",but I can't run following command. input: sudo cog predict -i ...
diff --git a/python/cog/json.py b/python/cog/json.py --- a/python/cog/json.py +++ b/python/cog/json.py @@ -1,5 +1,6 @@ from enum import Enum import io +from types import GeneratorType from typing import Any from pydantic import BaseModel @@ -26,7 +27,7 @@ return encode_json(obj.dict(exclude_unset=True), ...
{"golden_diff": "diff --git a/python/cog/json.py b/python/cog/json.py\n--- a/python/cog/json.py\n+++ b/python/cog/json.py\n@@ -1,5 +1,6 @@\n from enum import Enum\n import io\n+from types import GeneratorType\n from typing import Any\n \n from pydantic import BaseModel\n@@ -26,7 +27,7 @@\n return encode_json(ob...
775
177
gh_patches_debug_12833
rasdani/github-patches
git_diff
mindee__doctr-219
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Demo app error when analyzing my first document ## 🐛 Bug I tried to analyze a PNG and a PDF, got the same error. I try to change the model, didn't change anything. ## To Reproduce Steps to reproduce...
diff --git a/demo/app.py b/demo/app.py --- a/demo/app.py +++ b/demo/app.py @@ -74,7 +74,8 @@ # Forward the image to the model processed_batches = predictor.det_predictor.pre_processor(doc) - seg_map = predictor.det_predictor.model(processed_batches[0])[0] + ...
{"golden_diff": "diff --git a/demo/app.py b/demo/app.py\n--- a/demo/app.py\n+++ b/demo/app.py\n@@ -74,7 +74,8 @@\n \n # Forward the image to the model\n processed_batches = predictor.det_predictor.pre_processor(doc)\n- seg_map = predictor.det_predictor.model(processed_batc...
1,387
156
gh_patches_debug_3507
rasdani/github-patches
git_diff
jazzband__pip-tools-1039
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- setup.py install_requires should have `"click>=7"` not `"click>=6"` Thank you for all the work on this tool, it's very useful. Issue: As of 4.4.0 pip-tools now depends on version 7.0 of click, not 6.0. ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ package_data={}, python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", setup_requires=["setuptools_scm"], - install_requires=["click>=6", "six"], + install_requires=["click>=7", "six"], zip_safe=Fa...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -26,7 +26,7 @@\n package_data={},\n python_requires=\">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*\",\n setup_requires=[\"setuptools_scm\"],\n- install_requires=[\"click>=6\", \"six\"],\n+ install_requires=[\"c...
1,020
120
gh_patches_debug_5040
rasdani/github-patches
git_diff
pymodbus-dev__pymodbus-1355
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pymodbus.simulator fails with no running event loop ### Versions * Python: 3.9.2 * OS: Debian Bullseye * Pymodbus: 3.1.3 latest dev branch * Modbus Hardware (if used): ### Pymodbus Specific * Server...
diff --git a/pymodbus/server/simulator/main.py b/pymodbus/server/simulator/main.py --- a/pymodbus/server/simulator/main.py +++ b/pymodbus/server/simulator/main.py @@ -106,11 +106,16 @@ return cmd_args -def main(): - """Run server.""" +async def run_main(): + """Run server async.""" cmd_args = get_co...
{"golden_diff": "diff --git a/pymodbus/server/simulator/main.py b/pymodbus/server/simulator/main.py\n--- a/pymodbus/server/simulator/main.py\n+++ b/pymodbus/server/simulator/main.py\n@@ -106,11 +106,16 @@\n return cmd_args\n \n \n-def main():\n- \"\"\"Run server.\"\"\"\n+async def run_main():\n+ \"\"\"Run ser...
1,975
163
gh_patches_debug_11654
rasdani/github-patches
git_diff
mitmproxy__mitmproxy-2919
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update socks mode access commandline + documentation (v3.0.2) ##### Steps to reproduce the problem: 1. mitmproxy --socks "--socks is deprecated Please use '--set socks=value' instead" 2. Check online doc...
diff --git a/mitmproxy/utils/arg_check.py b/mitmproxy/utils/arg_check.py --- a/mitmproxy/utils/arg_check.py +++ b/mitmproxy/utils/arg_check.py @@ -11,7 +11,6 @@ --order --no-mouse --reverse ---socks --http2-priority --no-http2-priority --no-websocket @@ -59,6 +58,7 @@ -i -f --filter +--socks """ REPLACEMEN...
{"golden_diff": "diff --git a/mitmproxy/utils/arg_check.py b/mitmproxy/utils/arg_check.py\n--- a/mitmproxy/utils/arg_check.py\n+++ b/mitmproxy/utils/arg_check.py\n@@ -11,7 +11,6 @@\n --order\n --no-mouse\n --reverse\n---socks\n --http2-priority\n --no-http2-priority\n --no-websocket\n@@ -59,6 +58,7 @@\n -i\n -f\n --fil...
1,903
188
gh_patches_debug_5846
rasdani/github-patches
git_diff
pwr-Solaar__Solaar-1447
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Too high PyYAML and psutil version requirements for RHEL/CentOS 8 base OS **Information** <!-- Please update to Solaar from this repository before asking for a new feature. --> - Solaar version (`solaar --v...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -62,9 +62,9 @@ python_requires='>=3.6', install_requires=[ 'pyudev (>= 0.13)', - 'PyYAML (>= 5.1)', + 'PyYAML (>= 3.12)', 'python-xlib (>= 0.27)', - 'psutil (>= 5.6.0)', + 'psutil (>= 5.4.3)', ...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -62,9 +62,9 @@\n python_requires='>=3.6',\n install_requires=[\n 'pyudev (>= 0.13)',\n- 'PyYAML (>= 5.1)',\n+ 'PyYAML (>= 3.12)',\n 'python-xlib (>= 0.27)',\n- 'psutil (>= 5.6.0)',\n+ ...
1,568
163
gh_patches_debug_17312
rasdani/github-patches
git_diff
googleapis__google-auth-library-python-619
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use extra for asyncio dependencies Hello! The latest release for this library pulls in aiohttp and its dependencies unconditionally, which adds non-trivial burden to projects that don’t need it. Would you c...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -27,9 +27,9 @@ 'rsa>=3.1.4,<5; python_version >= "3.5"', "setuptools>=40.3.0", "six>=1.9.0", - 'aiohttp >= 3.6.2, < 4.0.0dev; python_version>="3.6"', ) +extras = {"aiohttp": "aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'"} w...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -27,9 +27,9 @@\n 'rsa>=3.1.4,<5; python_version >= \"3.5\"',\n \"setuptools>=40.3.0\",\n \"six>=1.9.0\",\n- 'aiohttp >= 3.6.2, < 4.0.0dev; python_version>=\"3.6\"',\n )\n \n+extras = {\"aiohttp\": \"aiohttp >= 3.6.2, < ...
1,096
261
gh_patches_debug_28730
rasdani/github-patches
git_diff
pytorch__ignite-2027
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Loss metric to use required_output_keys ## 🚀 Feature Currently, if we have custom metrics that require data other then `y_pred` and `y`, [we suggest](https://discuss.pytorch.org/t/how-access-inputs-in-cus...
diff --git a/ignite/metrics/loss.py b/ignite/metrics/loss.py --- a/ignite/metrics/loss.py +++ b/ignite/metrics/loss.py @@ -30,9 +30,52 @@ metric's device to be the same as your ``update`` arguments ensures the ``update`` method is non-blocking. By default, CPU. + Attributes: + requ...
{"golden_diff": "diff --git a/ignite/metrics/loss.py b/ignite/metrics/loss.py\n--- a/ignite/metrics/loss.py\n+++ b/ignite/metrics/loss.py\n@@ -30,9 +30,52 @@\n metric's device to be the same as your ``update`` arguments ensures the ``update`` method is\n non-blocking. By default, CPU.\n \n+ A...
1,334
481
gh_patches_debug_3055
rasdani/github-patches
git_diff
spyder-ide__spyder-3909
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Profiler error when no filename is passed to it Hello! * Spyder Version: Git version (4dev) * Python Version: 3.5 * Operating system: Arch Linux When I click on Run > Profile , It produces this error:...
diff --git a/spyder_profiler/profiler.py b/spyder_profiler/profiler.py --- a/spyder_profiler/profiler.py +++ b/spyder_profiler/profiler.py @@ -151,5 +151,5 @@ wdir = runconf.wdir if runconf.args_enabled: args = runconf.args - self.profiler.analyze(self, filename, wd...
{"golden_diff": "diff --git a/spyder_profiler/profiler.py b/spyder_profiler/profiler.py\n--- a/spyder_profiler/profiler.py\n+++ b/spyder_profiler/profiler.py\n@@ -151,5 +151,5 @@\n wdir = runconf.wdir\n if runconf.args_enabled:\n args = runconf.args\n- self.profiler.an...
1,907
124
gh_patches_debug_23931
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-4285
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- nationwide_gb spider returning closed branches The nationwide_gb spide is currently returning a number of branches that are described as "Permanently Closed" on their web pages. For example: * https://www....
diff --git a/locations/spiders/nationwide_gb.py b/locations/spiders/nationwide_gb.py --- a/locations/spiders/nationwide_gb.py +++ b/locations/spiders/nationwide_gb.py @@ -1,24 +1,20 @@ from scrapy.linkextractors import LinkExtractor from scrapy.spiders import CrawlSpider, Rule +from locations.categories import Cate...
{"golden_diff": "diff --git a/locations/spiders/nationwide_gb.py b/locations/spiders/nationwide_gb.py\n--- a/locations/spiders/nationwide_gb.py\n+++ b/locations/spiders/nationwide_gb.py\n@@ -1,24 +1,20 @@\n from scrapy.linkextractors import LinkExtractor\n from scrapy.spiders import CrawlSpider, Rule\n \n+from location...
835
380
gh_patches_debug_6365
rasdani/github-patches
git_diff
lutris__lutris-1251
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Log window: lock to the bottom gets lost Caused by https://github.com/lutris/lutris/pull/1179. From my experience, it happens when there are a lot lines outputted all at once: ![peek 2018-10-18 05-11](https:...
diff --git a/lutris/gui/logwindow.py b/lutris/gui/logwindow.py --- a/lutris/gui/logwindow.py +++ b/lutris/gui/logwindow.py @@ -19,7 +19,9 @@ adj = self.get_vadjustment() if adj.get_value() == self.scroll_max or self.scroll_max == 0: adj.set_value(adj.get_upper() - adj.get_page_size()) - ...
{"golden_diff": "diff --git a/lutris/gui/logwindow.py b/lutris/gui/logwindow.py\n--- a/lutris/gui/logwindow.py\n+++ b/lutris/gui/logwindow.py\n@@ -19,7 +19,9 @@\n adj = self.get_vadjustment()\n if adj.get_value() == self.scroll_max or self.scroll_max == 0:\n adj.set_value(adj.get_upper() - a...
765
145
gh_patches_debug_611
rasdani/github-patches
git_diff
pex-tool__pex-1251
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Release 2.1.31 On the docket: + [x] When Pex is run from a Pex PEX its isolation is broken. #1232 + [x] The `--venv` mode `pex` script does not have a `__name__ == '__main__'` guard breaking multiprocessing...
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.30" +__version__ = "2.1.31"
{"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.30\"\n+__version__ = \"2.1.31\"\n", "...
496
96
gh_patches_debug_10697
rasdani/github-patches
git_diff
freedomofpress__securedrop-4884
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Upgrade Ansble to 2.7 series ## Description SecureDrop currently uses the Ansible 2.6 series which is approaching end-of-life. Ansible major versions are supported (receive security patches) for [three maj...
diff --git a/install_files/ansible-base/callback_plugins/ansible_version_check.py b/install_files/ansible-base/callback_plugins/ansible_version_check.py --- a/install_files/ansible-base/callback_plugins/ansible_version_check.py +++ b/install_files/ansible-base/callback_plugins/ansible_version_check.py @@ -21,7 +21,7 @@...
{"golden_diff": "diff --git a/install_files/ansible-base/callback_plugins/ansible_version_check.py b/install_files/ansible-base/callback_plugins/ansible_version_check.py\n--- a/install_files/ansible-base/callback_plugins/ansible_version_check.py\n+++ b/install_files/ansible-base/callback_plugins/ansible_version_check.p...
652
177
gh_patches_debug_7275
rasdani/github-patches
git_diff
facebookresearch__xformers-136
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [CI] InProj countainer not properly covered # 🐛 Bug Not a bug per say, but many inProjCountainer options are not covered, see https://app.codecov.io/gh/facebookresearch/xformers/blob/main/xformers/component...
diff --git a/xformers/components/__init__.py b/xformers/components/__init__.py --- a/xformers/components/__init__.py +++ b/xformers/components/__init__.py @@ -12,6 +12,7 @@ from .activations import Activation, build_activation # noqa from .attention import Attention, build_attention # noqa +from .in_proj_containe...
{"golden_diff": "diff --git a/xformers/components/__init__.py b/xformers/components/__init__.py\n--- a/xformers/components/__init__.py\n+++ b/xformers/components/__init__.py\n@@ -12,6 +12,7 @@\n \n from .activations import Activation, build_activation # noqa\n from .attention import Attention, build_attention # noqa\...
984
139
gh_patches_debug_1866
rasdani/github-patches
git_diff
modin-project__modin-1782
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ClusterError class should implement its own version of __str__ method <!-- General questions should be asked on the mailing list modin-dev@googlegroups.com. Before submitting an issue, please fill out the...
diff --git a/modin/experimental/cloud/base.py b/modin/experimental/cloud/base.py --- a/modin/experimental/cloud/base.py +++ b/modin/experimental/cloud/base.py @@ -26,6 +26,11 @@ self.traceback = traceback super().__init__(*args, **kw) + def __str__(self): + if self.clause: + ret...
{"golden_diff": "diff --git a/modin/experimental/cloud/base.py b/modin/experimental/cloud/base.py\n--- a/modin/experimental/cloud/base.py\n+++ b/modin/experimental/cloud/base.py\n@@ -26,6 +26,11 @@\n self.traceback = traceback\n super().__init__(*args, **kw)\n \n+ def __str__(self):\n+ if self...
1,166
121
gh_patches_debug_2605
rasdani/github-patches
git_diff
mathesar-foundation__mathesar-940
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- DB Types in column.valid_target_types are not in sync with the types returned in database types endpoint ## Description * `valid_target_types` property of column returns "DOUBLE PRECISION" - Endpoint: /a...
diff --git a/db/types/base.py b/db/types/base.py --- a/db/types/base.py +++ b/db/types/base.py @@ -87,8 +87,8 @@ def get_db_type_name(sa_type, engine): - USER_DEFINED_STR = 'user_defined' - db_type = sa_type.__visit_name__ - if db_type == USER_DEFINED_STR: - db_type = sa_type().compile(engine.diale...
{"golden_diff": "diff --git a/db/types/base.py b/db/types/base.py\n--- a/db/types/base.py\n+++ b/db/types/base.py\n@@ -87,8 +87,8 @@\n \n \n def get_db_type_name(sa_type, engine):\n- USER_DEFINED_STR = 'user_defined'\n- db_type = sa_type.__visit_name__\n- if db_type == USER_DEFINED_STR:\n- db_type = sa_...
1,245
140
gh_patches_debug_6965
rasdani/github-patches
git_diff
qtile__qtile-3225
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- widget.box does not close Hi, I'm running qtile on arch and after the latest update the widget.box does not close. It was working fine before the update. ![qtilewidgetbox1](https://user-images.gith...
diff --git a/libqtile/widget/widgetbox.py b/libqtile/widget/widgetbox.py --- a/libqtile/widget/widgetbox.py +++ b/libqtile/widget/widgetbox.py @@ -120,7 +120,7 @@ # are separate _Window instances. # Systray unhides icons when it draws so we only need to hide them. if i...
{"golden_diff": "diff --git a/libqtile/widget/widgetbox.py b/libqtile/widget/widgetbox.py\n--- a/libqtile/widget/widgetbox.py\n+++ b/libqtile/widget/widgetbox.py\n@@ -120,7 +120,7 @@\n # are separate _Window instances.\n # Systray unhides icons when it draws so we only need to hide them....
2,016
118
gh_patches_debug_21697
rasdani/github-patches
git_diff
apache__airflow-1164
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add ssl extra arguments to postgres hook This enables one to specify items such as ssl certificate paths in the extra field of a postgres connection object. Rather than simply pass-through everything from the...
diff --git a/airflow/hooks/postgres_hook.py b/airflow/hooks/postgres_hook.py --- a/airflow/hooks/postgres_hook.py +++ b/airflow/hooks/postgres_hook.py @@ -6,6 +6,8 @@ class PostgresHook(DbApiHook): ''' Interact with Postgres. + You can specify ssl parameters in the extra field of your connection + as `...
{"golden_diff": "diff --git a/airflow/hooks/postgres_hook.py b/airflow/hooks/postgres_hook.py\n--- a/airflow/hooks/postgres_hook.py\n+++ b/airflow/hooks/postgres_hook.py\n@@ -6,6 +6,8 @@\n class PostgresHook(DbApiHook):\n '''\n Interact with Postgres.\n+ You can specify ssl parameters in the extra field of y...
495
283
gh_patches_debug_42222
rasdani/github-patches
git_diff
saleor__saleor-2976
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Allow creating attributes with values in one mutation We need to change the signature of `productAttributeCreate` mutation to allow creating attribute values in the same mutation. This is required by the new ...
diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.py --- a/saleor/graphql/product/mutations/attributes.py +++ b/saleor/graphql/product/mutations/attributes.py @@ -2,13 +2,7 @@ from ....product import models from ...core.mutations import ModelDeleteMutation, Mo...
{"golden_diff": "diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.py\n--- a/saleor/graphql/product/mutations/attributes.py\n+++ b/saleor/graphql/product/mutations/attributes.py\n@@ -2,13 +2,7 @@\n \n from ....product import models\n from ...core.mutations import ...
1,229
752
gh_patches_debug_19818
rasdani/github-patches
git_diff
python-gitlab__python-gitlab-2538
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Need support to [...]/personal_access_tokens/self Gitlab API ## Description of the problem, including code/CLI snippet So far, I'm unable to get scopes information from the 'personal access token' used to au...
diff --git a/gitlab/v4/objects/personal_access_tokens.py b/gitlab/v4/objects/personal_access_tokens.py --- a/gitlab/v4/objects/personal_access_tokens.py +++ b/gitlab/v4/objects/personal_access_tokens.py @@ -1,5 +1,7 @@ +from typing import Any, cast, Union + from gitlab.base import RESTManager, RESTObject -from gitlab....
{"golden_diff": "diff --git a/gitlab/v4/objects/personal_access_tokens.py b/gitlab/v4/objects/personal_access_tokens.py\n--- a/gitlab/v4/objects/personal_access_tokens.py\n+++ b/gitlab/v4/objects/personal_access_tokens.py\n@@ -1,5 +1,7 @@\n+from typing import Any, cast, Union\n+\n from gitlab.base import RESTManager, R...
799
286
gh_patches_debug_8747
rasdani/github-patches
git_diff
dotkom__onlineweb4-330
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Article archive should just list tags that are used IMO, tags that are not used in any articles should not be listed in the tagcloud. Feels unnecessary to have them there. --- END ISSUE --- Below are some...
diff --git a/apps/article/views.py b/apps/article/views.py --- a/apps/article/views.py +++ b/apps/article/views.py @@ -109,9 +109,8 @@ articles = filtered # Get the 30 most used tags, then randomize them - tags = list(Tag.objects.all()) - tags.sort(key=lambda x: x.frequency, reverse=True) - tag...
{"golden_diff": "diff --git a/apps/article/views.py b/apps/article/views.py\n--- a/apps/article/views.py\n+++ b/apps/article/views.py\n@@ -109,9 +109,8 @@\n articles = filtered\n \n # Get the 30 most used tags, then randomize them\n- tags = list(Tag.objects.all())\n- tags.sort(key=lambda x: x.frequenc...
1,912
165
gh_patches_debug_16678
rasdani/github-patches
git_diff
SigmaHQ__sigma-733
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- endswith Modifier broken In 2fafff3, a bug was introduced breaking the endswith modifier. The fix correctly changed the behaviour of the contains modifier but also wrongly applied the fix to endswith instead...
diff --git a/tools/sigma/parser/modifiers/transform.py b/tools/sigma/parser/modifiers/transform.py --- a/tools/sigma/parser/modifiers/transform.py +++ b/tools/sigma/parser/modifiers/transform.py @@ -41,7 +41,10 @@ def apply_str(self, val : str): if not val.endswith("*"): - val += "*" + ...
{"golden_diff": "diff --git a/tools/sigma/parser/modifiers/transform.py b/tools/sigma/parser/modifiers/transform.py\n--- a/tools/sigma/parser/modifiers/transform.py\n+++ b/tools/sigma/parser/modifiers/transform.py\n@@ -41,7 +41,10 @@\n \n def apply_str(self, val : str):\n if not val.endswith(\"*\"):\n- ...
1,696
205
gh_patches_debug_7658
rasdani/github-patches
git_diff
Kinto__kinto-2060
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove pinning and pip_pre config once jsonschema 3 is released properly Refs https://github.com/Kinto/kinto/pull/1898#pullrequestreview-180204186 --- END ISSUE --- Below are some code segments, each from a...
diff --git a/kinto/schema_validation.py b/kinto/schema_validation.py --- a/kinto/schema_validation.py +++ b/kinto/schema_validation.py @@ -1,12 +1,12 @@ import colander -from jsonschema import ValidationError, SchemaError, RefResolutionError +from jsonschema import ( + Draft7Validator as DraftValidator, + Valida...
{"golden_diff": "diff --git a/kinto/schema_validation.py b/kinto/schema_validation.py\n--- a/kinto/schema_validation.py\n+++ b/kinto/schema_validation.py\n@@ -1,12 +1,12 @@\n import colander\n-from jsonschema import ValidationError, SchemaError, RefResolutionError\n+from jsonschema import (\n+ Draft7Validator as Dra...
1,903
156
gh_patches_debug_4160
rasdani/github-patches
git_diff
jupyterhub__jupyterhub-1454
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Exception when logout with auto_login=True **How to reproduce the issue** Press logout button **What you expected to happen** Shows logout.html **What actually happens** Exception: ``` Tracebac...
diff --git a/jupyterhub/handlers/login.py b/jupyterhub/handlers/login.py --- a/jupyterhub/handlers/login.py +++ b/jupyterhub/handlers/login.py @@ -20,7 +20,7 @@ self.clear_login_cookie() self.statsd.incr('logout') if self.authenticator.auto_login: - self.render('logout.html...
{"golden_diff": "diff --git a/jupyterhub/handlers/login.py b/jupyterhub/handlers/login.py\n--- a/jupyterhub/handlers/login.py\n+++ b/jupyterhub/handlers/login.py\n@@ -20,7 +20,7 @@\n self.clear_login_cookie()\n self.statsd.incr('logout')\n if self.authenticator.auto_login:\n- ...
1,759
111
gh_patches_debug_1149
rasdani/github-patches
git_diff
iterative__dvc-7234
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- dvc.fs.Path.parts wrong results **EDIT**: This issue will just be for this first problem of handling a sep at the end of a path. I made the windows-style path problem a separate issue #7233 When a path en...
diff --git a/dvc/fs/path.py b/dvc/fs/path.py --- a/dvc/fs/path.py +++ b/dvc/fs/path.py @@ -15,7 +15,7 @@ return self.flavour.join(*parts) def parts(self, path): - drive, path = self.flavour.splitdrive(path) + drive, path = self.flavour.splitdrive(path.rstrip(self.flavour.sep)) r...
{"golden_diff": "diff --git a/dvc/fs/path.py b/dvc/fs/path.py\n--- a/dvc/fs/path.py\n+++ b/dvc/fs/path.py\n@@ -15,7 +15,7 @@\n return self.flavour.join(*parts)\n \n def parts(self, path):\n- drive, path = self.flavour.splitdrive(path)\n+ drive, path = self.flavour.splitdrive(path.rstrip(self.f...
1,783
101
gh_patches_debug_5640
rasdani/github-patches
git_diff
mlflow__mlflow-2098
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] multistep_workflow "best-effort detection of 'already run'" fails to detect run_info has FINISHED status Thank you for submitting an issue. Please refer to our [issue policy](https://www.github.com/mlfl...
diff --git a/examples/multistep_workflow/main.py b/examples/multistep_workflow/main.py --- a/examples/multistep_workflow/main.py +++ b/examples/multistep_workflow/main.py @@ -40,7 +40,7 @@ if match_failed: continue - if run_info.status != RunStatus.FINISHED: + if run_info.to_proto(...
{"golden_diff": "diff --git a/examples/multistep_workflow/main.py b/examples/multistep_workflow/main.py\n--- a/examples/multistep_workflow/main.py\n+++ b/examples/multistep_workflow/main.py\n@@ -40,7 +40,7 @@\n if match_failed:\n continue\n \n- if run_info.status != RunStatus.FINISHED:\n+ ...
2,028
134
gh_patches_debug_32553
rasdani/github-patches
git_diff
pex-tool__pex-1648
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- set user-agent to something pex-identifiable Donald did some interesting research into where downloads were coming from on PyPI. Realized that we have no custom user-agent to identify pex. --- END ISSUE --...
diff --git a/pex/fetcher.py b/pex/fetcher.py --- a/pex/fetcher.py +++ b/pex/fetcher.py @@ -7,9 +7,17 @@ import time from contextlib import closing, contextmanager -from pex.compatibility import FileHandler, HTTPError, HTTPSHandler, ProxyHandler, build_opener +from pex.compatibility import ( + FileHandler, + H...
{"golden_diff": "diff --git a/pex/fetcher.py b/pex/fetcher.py\n--- a/pex/fetcher.py\n+++ b/pex/fetcher.py\n@@ -7,9 +7,17 @@\n import time\n from contextlib import closing, contextmanager\n \n-from pex.compatibility import FileHandler, HTTPError, HTTPSHandler, ProxyHandler, build_opener\n+from pex.compatibility import (...
1,240
424
gh_patches_debug_13693
rasdani/github-patches
git_diff
gratipay__gratipay.com-1390
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- When I am logged in, everyone else's communities are the same They have the same communities. For example, cookiecutter has 3 people in it, (me, audreyr, and sloria), but if I visit kennethreitz or mitsuhiko ...
diff --git a/gittip/models/community.py b/gittip/models/community.py --- a/gittip/models/community.py +++ b/gittip/models/community.py @@ -29,20 +29,20 @@ return gittip.db.one(SQL, (slug,)) -def get_list_for(user): +def get_list_for(username): """Return a listing of communities. :database: One SELE...
{"golden_diff": "diff --git a/gittip/models/community.py b/gittip/models/community.py\n--- a/gittip/models/community.py\n+++ b/gittip/models/community.py\n@@ -29,20 +29,20 @@\n return gittip.db.one(SQL, (slug,))\n \n \n-def get_list_for(user):\n+def get_list_for(username):\n \"\"\"Return a listing of communitie...
902
182
gh_patches_debug_18312
rasdani/github-patches
git_diff
dbt-labs__dbt-core-7834
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [CT-2518] Make ProjectDependency a config that allows miscellaneous keys Update ProjectDependency to subclass AdditionalPropertiesMixin --- END ISSUE --- Below are some code segments, each from a relevant...
diff --git a/core/dbt/contracts/publication.py b/core/dbt/contracts/publication.py --- a/core/dbt/contracts/publication.py +++ b/core/dbt/contracts/publication.py @@ -1,18 +1,25 @@ -from typing import Optional, List, Dict, Any +from typing import Any, Dict, List, Optional from datetime import datetime -from dbt.datacl...
{"golden_diff": "diff --git a/core/dbt/contracts/publication.py b/core/dbt/contracts/publication.py\n--- a/core/dbt/contracts/publication.py\n+++ b/core/dbt/contracts/publication.py\n@@ -1,18 +1,25 @@\n-from typing import Optional, List, Dict, Any\n+from typing import Any, Dict, List, Optional\n from datetime import da...
1,362
280
gh_patches_debug_3092
rasdani/github-patches
git_diff
liqd__a4-meinberlin-1653
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- add "gesamtstädtisch" as null-option to projects --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `meinberli...
diff --git a/meinberlin/apps/projects/admin.py b/meinberlin/apps/projects/admin.py --- a/meinberlin/apps/projects/admin.py +++ b/meinberlin/apps/projects/admin.py @@ -40,6 +40,11 @@ }), ) + def formfield_for_foreignkey(self, db_field, request, **kwargs): + if db_field.name == 'administrative_d...
{"golden_diff": "diff --git a/meinberlin/apps/projects/admin.py b/meinberlin/apps/projects/admin.py\n--- a/meinberlin/apps/projects/admin.py\n+++ b/meinberlin/apps/projects/admin.py\n@@ -40,6 +40,11 @@\n }),\n )\n \n+ def formfield_for_foreignkey(self, db_field, request, **kwargs):\n+ if db_field....
687
140
gh_patches_debug_22340
rasdani/github-patches
git_diff
explosion__spaCy-3460
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Tokenization not working using v2.1 ## How to reproduce the behaviour I found a bug where tokenization is completely not working with version 2.1.0a10 on python 2.7. I have reproduced this on three of my mac...
diff --git a/spacy/compat.py b/spacy/compat.py --- a/spacy/compat.py +++ b/spacy/compat.py @@ -11,6 +11,7 @@ import os import sys import itertools +import ast from thinc.neural.util import copy_array @@ -150,3 +151,26 @@ module = importlib.util.module_from_spec(spec) spec.loader.exec_module(mo...
{"golden_diff": "diff --git a/spacy/compat.py b/spacy/compat.py\n--- a/spacy/compat.py\n+++ b/spacy/compat.py\n@@ -11,6 +11,7 @@\n import os\n import sys\n import itertools\n+import ast\n \n from thinc.neural.util import copy_array\n \n@@ -150,3 +151,26 @@\n module = importlib.util.module_from_spec(spec)\n ...
1,922
352
gh_patches_debug_36317
rasdani/github-patches
git_diff
airctic__icevision-904
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Make MMDetection config object accessible to users ## 🚀 Feature Make MMDetection config object accessible to users. The goal is to be able to update model attributes: e.g. changing weighted loss parameters,...
diff --git a/icevision/models/mmdet/common/bbox/single_stage/model.py b/icevision/models/mmdet/common/bbox/single_stage/model.py --- a/icevision/models/mmdet/common/bbox/single_stage/model.py +++ b/icevision/models/mmdet/common/bbox/single_stage/model.py @@ -14,6 +14,7 @@ num_classes: int, checkpoints_path: O...
{"golden_diff": "diff --git a/icevision/models/mmdet/common/bbox/single_stage/model.py b/icevision/models/mmdet/common/bbox/single_stage/model.py\n--- a/icevision/models/mmdet/common/bbox/single_stage/model.py\n+++ b/icevision/models/mmdet/common/bbox/single_stage/model.py\n@@ -14,6 +14,7 @@\n num_classes: int,\n ...
2,036
579
gh_patches_debug_25663
rasdani/github-patches
git_diff
pypa__virtualenv-1952
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cygwin and msys2 bash activator compatibility **Issue** Run the following via msys2: ``` $ /c/Users/builder/AppData/Local/Programs/Python/Python39/Scripts/virtualenv.exe --no-pip --no-setuptools --no-w...
diff --git a/src/virtualenv/activation/via_template.py b/src/virtualenv/activation/via_template.py --- a/src/virtualenv/activation/via_template.py +++ b/src/virtualenv/activation/via_template.py @@ -1,7 +1,9 @@ from __future__ import absolute_import, unicode_literals import os +import re import sys +import sysconf...
{"golden_diff": "diff --git a/src/virtualenv/activation/via_template.py b/src/virtualenv/activation/via_template.py\n--- a/src/virtualenv/activation/via_template.py\n+++ b/src/virtualenv/activation/via_template.py\n@@ -1,7 +1,9 @@\n from __future__ import absolute_import, unicode_literals\n \n import os\n+import re\n i...
1,287
321
gh_patches_debug_24445
rasdani/github-patches
git_diff
openstates__openstates-scrapers-1376
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Link Docker's `data` (and maybe `cache`) directory to local file system > @mshenfield [12:47 PM] I think we could make it easier by changing some of the configuration in `docker-compose` or the docker files s...
diff --git a/billy_settings.py b/billy_settings.py --- a/billy_settings.py +++ b/billy_settings.py @@ -1,24 +1,20 @@ import os -from os.path import abspath, dirname, join - import sys sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) # This shims around folks that have openstates/ on virtualenv's .pt...
{"golden_diff": "diff --git a/billy_settings.py b/billy_settings.py\n--- a/billy_settings.py\n+++ b/billy_settings.py\n@@ -1,24 +1,20 @@\n import os\n \n-from os.path import abspath, dirname, join\n-\n import sys\n sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))\n # This shims around folks that have open...
928
372
gh_patches_debug_2169
rasdani/github-patches
git_diff
python-gitlab__python-gitlab-1058
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Scope "bug" ## Description of the problem, including code/CLI snippet I am using the list method of project.issues to list issues with certain label. I am searching issue having "vulcheck" as label. In my pr...
diff --git a/gitlab/types.py b/gitlab/types.py --- a/gitlab/types.py +++ b/gitlab/types.py @@ -38,6 +38,10 @@ self._value = [item.strip() for item in cli_value.split(",")] def get_for_api(self): + # Do not comma-split single value passed as string + if isinstance(self._value, str): + ...
{"golden_diff": "diff --git a/gitlab/types.py b/gitlab/types.py\n--- a/gitlab/types.py\n+++ b/gitlab/types.py\n@@ -38,6 +38,10 @@\n self._value = [item.strip() for item in cli_value.split(\",\")]\n \n def get_for_api(self):\n+ # Do not comma-split single value passed as string\n+ if isinst...
958
106
gh_patches_debug_32013
rasdani/github-patches
git_diff
networkx__networkx-4906
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Getting 403 Forbidden errors when running plot_custom_node_icons example The way `plot_custom_node_icons` is currently set up, we grab resources from `materialsui.com` every time anyone runs this example whic...
diff --git a/examples/drawing/plot_custom_node_icons.py b/examples/drawing/plot_custom_node_icons.py --- a/examples/drawing/plot_custom_node_icons.py +++ b/examples/drawing/plot_custom_node_icons.py @@ -4,24 +4,23 @@ ================= Example of using custom icons to represent nodes with matplotlib. + +Images for n...
{"golden_diff": "diff --git a/examples/drawing/plot_custom_node_icons.py b/examples/drawing/plot_custom_node_icons.py\n--- a/examples/drawing/plot_custom_node_icons.py\n+++ b/examples/drawing/plot_custom_node_icons.py\n@@ -4,24 +4,23 @@\n =================\n \n Example of using custom icons to represent nodes with matp...
1,120
594
gh_patches_debug_22858
rasdani/github-patches
git_diff
nautobot__nautobot-2676
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support unix socket Redis connections in parse_redis_connection ### As ... Isabella - Infrastructure Owner ### I want ... to be able to use Redis cache via a unix socket connection that than a TCP connecti...
diff --git a/nautobot/core/settings_funcs.py b/nautobot/core/settings_funcs.py --- a/nautobot/core/settings_funcs.py +++ b/nautobot/core/settings_funcs.py @@ -72,7 +72,9 @@ """ # The following `_redis_*` variables are used to generate settings based on # environment variables. - redis_scheme = "rediss...
{"golden_diff": "diff --git a/nautobot/core/settings_funcs.py b/nautobot/core/settings_funcs.py\n--- a/nautobot/core/settings_funcs.py\n+++ b/nautobot/core/settings_funcs.py\n@@ -72,7 +72,9 @@\n \"\"\"\n # The following `_redis_*` variables are used to generate settings based on\n # environment variables.\n...
1,314
326
gh_patches_debug_4792
rasdani/github-patches
git_diff
pyro-ppl__pyro-3131
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Memory leak using TraceEnum_ELBO I noticed a major memory leak when training SVI using `TraceEnum_ELBO`. I initially noticed this in a custom model we are developing but then I found it seems a more general ...
diff --git a/pyro/ops/einsum/torch_log.py b/pyro/ops/einsum/torch_log.py --- a/pyro/ops/einsum/torch_log.py +++ b/pyro/ops/einsum/torch_log.py @@ -23,7 +23,10 @@ inputs, output = equation.split("->") if inputs == output: - return operands[0][...] # create a new object + # Originally we return...
{"golden_diff": "diff --git a/pyro/ops/einsum/torch_log.py b/pyro/ops/einsum/torch_log.py\n--- a/pyro/ops/einsum/torch_log.py\n+++ b/pyro/ops/einsum/torch_log.py\n@@ -23,7 +23,10 @@\n \n inputs, output = equation.split(\"->\")\n if inputs == output:\n- return operands[0][...] # create a new object\n+ ...
1,729
184
gh_patches_debug_5454
rasdani/github-patches
git_diff
pyro-ppl__numpyro-1687
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Specify python version for pip Can the python version be specified for pip in the setup.py? Specifically using the method here: - https://stackoverflow.com/questions/45778790/specifying-the-minimum-python-v...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -86,6 +86,7 @@ "tpu": f"jax[tpu]{_jax_version_constraints}", "cuda": f"jax[cuda]{_jax_version_constraints}", }, + python_requires=">=3.9", long_description=long_description, long_description_content_type="text/markdown...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -86,6 +86,7 @@\n \"tpu\": f\"jax[tpu]{_jax_version_constraints}\",\n \"cuda\": f\"jax[cuda]{_jax_version_constraints}\",\n },\n+ python_requires=\">=3.9\",\n long_description=long_description,\n long_des...
1,447
105
gh_patches_debug_16488
rasdani/github-patches
git_diff
pypi__warehouse-10116
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- TFA with Fido2 privacy intrution by requiring attestation **Describe the bug** Can't register TFA with a FIDO key without device attestation, making this feature unusable for privacy conscious developers. ...
diff --git a/warehouse/utils/webauthn.py b/warehouse/utils/webauthn.py --- a/warehouse/utils/webauthn.py +++ b/warehouse/utils/webauthn.py @@ -87,6 +87,7 @@ user.username, user.name or user.username, None, + attestation=None, user_verification="discouraged", ) @@ -119,7...
{"golden_diff": "diff --git a/warehouse/utils/webauthn.py b/warehouse/utils/webauthn.py\n--- a/warehouse/utils/webauthn.py\n+++ b/warehouse/utils/webauthn.py\n@@ -87,6 +87,7 @@\n user.username,\n user.name or user.username,\n None,\n+ attestation=None,\n user_verification=\"discou...
1,990
201
gh_patches_debug_48446
rasdani/github-patches
git_diff
certbot__certbot-8098
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Switch to GitHub Actions or Azure Pipelines We basically need this for https://github.com/certbot/certbot/issues/8041 to make it sane to create a Certbot snap that can be easily shared and used for testing th...
diff --git a/acme/setup.py b/acme/setup.py --- a/acme/setup.py +++ b/acme/setup.py @@ -17,8 +17,8 @@ # 1.1.0+ is required to avoid the warnings described at # https://github.com/certbot/josepy/issues/13. 'josepy>=1.1.0', - # Connection.set_tlsext_host_name (>=0.13) - 'PyOpenSSL>=0.13.1', + # Con...
{"golden_diff": "diff --git a/acme/setup.py b/acme/setup.py\n--- a/acme/setup.py\n+++ b/acme/setup.py\n@@ -17,8 +17,8 @@\n # 1.1.0+ is required to avoid the warnings described at\n # https://github.com/certbot/josepy/issues/13.\n 'josepy>=1.1.0',\n- # Connection.set_tlsext_host_name (>=0.13)\n- 'PyOpe...
1,377
203
gh_patches_debug_26581
rasdani/github-patches
git_diff
UTNkar__moore-150
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Menu Translations <!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se --> ### Description Not all menu pages are using `translated_title`...
diff --git a/website/website/templatetags/site_tags.py b/website/website/templatetags/site_tags.py --- a/website/website/templatetags/site_tags.py +++ b/website/website/templatetags/site_tags.py @@ -22,9 +22,24 @@ menuitems = parent.get_children().live().in_menu() for menuitem in menuitems: menuitem....
{"golden_diff": "diff --git a/website/website/templatetags/site_tags.py b/website/website/templatetags/site_tags.py\n--- a/website/website/templatetags/site_tags.py\n+++ b/website/website/templatetags/site_tags.py\n@@ -22,9 +22,24 @@\n menuitems = parent.get_children().live().in_menu()\n for menuitem in menuite...
884
377
gh_patches_debug_32262
rasdani/github-patches
git_diff
ytdl-org__youtube-dl-2700
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Unable to extract video_id from http://teamcoco.com/video/80187/conan-becomes-a-mary-kay-beauty-consultant python -m youtube_dl -v --skip-download http://teamcoco.com/video/80187/conan-becomes-a-mary-kay-beau...
diff --git a/youtube_dl/extractor/teamcoco.py b/youtube_dl/extractor/teamcoco.py --- a/youtube_dl/extractor/teamcoco.py +++ b/youtube_dl/extractor/teamcoco.py @@ -9,8 +9,18 @@ class TeamcocoIE(InfoExtractor): - _VALID_URL = r'http://teamcoco\.com/video/(?P<url_title>.*)' - _TEST = { + _VALID_URL = r'http:...
{"golden_diff": "diff --git a/youtube_dl/extractor/teamcoco.py b/youtube_dl/extractor/teamcoco.py\n--- a/youtube_dl/extractor/teamcoco.py\n+++ b/youtube_dl/extractor/teamcoco.py\n@@ -9,8 +9,18 @@\n \n \n class TeamcocoIE(InfoExtractor):\n- _VALID_URL = r'http://teamcoco\\.com/video/(?P<url_title>.*)'\n- _TEST = {...
1,682
614
gh_patches_debug_13556
rasdani/github-patches
git_diff
OpenMined__PySyft-2387
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- OpenMined.org Demo Broken On our homepage - we link to colabs which implement a simple SocketWorker demo - as the new version of PySyft has no SocketWorker - the demo fails to work. https://colab.research....
diff --git a/syft/workers/websocket_server.py b/syft/workers/websocket_server.py --- a/syft/workers/websocket_server.py +++ b/syft/workers/websocket_server.py @@ -8,6 +8,8 @@ import ssl import sys import tblib.pickling_support +import socket +import logging tblib.pickling_support.install() @@ -165,7 +167,11 @@ ...
{"golden_diff": "diff --git a/syft/workers/websocket_server.py b/syft/workers/websocket_server.py\n--- a/syft/workers/websocket_server.py\n+++ b/syft/workers/websocket_server.py\n@@ -8,6 +8,8 @@\n import ssl\n import sys\n import tblib.pickling_support\n+import socket\n+import logging\n \n tblib.pickling_support.instal...
1,957
188
gh_patches_debug_16196
rasdani/github-patches
git_diff
ethereum__web3.py-776
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Incorrect return value example for web3.personal.newAccount http://web3py.readthedocs.io/en/stable/web3.personal.html?highlight=newAccount#web3.personal.newAccount The documentation provides the following ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ "websockets>=4.0.1", ], setup_requires=['setuptools-markdown'], + python_requires='>=3.5, <4', extras_require={ 'tester': [ "eth-tester[py-evm]==0.1.0-beta.23", @@ -48,7 +49,7 @@ keywor...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -28,6 +28,7 @@\n \"websockets>=4.0.1\",\n ],\n setup_requires=['setuptools-markdown'],\n+ python_requires='>=3.5, <4',\n extras_require={\n 'tester': [\n \"eth-tester[py-evm]==0.1.0-beta.23\"...
1,068
178
gh_patches_debug_422
rasdani/github-patches
git_diff
pyro-ppl__pyro-2345
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Switch from pillow to pillow-simd This attempts to fix some `pillow`-`torchvision` breakage blocking #2239 by switching to the alternative torchvision-recommended library `pillow-simd`. --- END ISSUE --- Be...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -60,7 +60,6 @@ 'jupyter>=1.0.0', 'graphviz>=0.8', 'matplotlib>=1.3', - 'pillow-simd', 'torchvision>=0.5.0', 'visdom>=0.1.4', 'pandas',
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -60,7 +60,6 @@\n 'jupyter>=1.0.0',\n 'graphviz>=0.8',\n 'matplotlib>=1.3',\n- 'pillow-simd',\n 'torchvision>=0.5.0',\n 'visdom>=0.1.4',\n 'pandas',\n", "issue": "Switch from pillow to pillow-simd\nThis attem...
1,654
95
gh_patches_debug_13343
rasdani/github-patches
git_diff
watchdogpolska__feder-317
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dopisać tooltip z metadanymi na LetterDetailView ![zaznaczenie_418](https://cloud.githubusercontent.com/assets/3618479/9562630/74158af4-4e71-11e5-8c87-566c046f1840.png) http://giodo.gov.pl/1520221/id_art/8813...
diff --git a/feder/letters/logs/models.py b/feder/letters/logs/models.py --- a/feder/letters/logs/models.py +++ b/feder/letters/logs/models.py @@ -33,7 +33,7 @@ class EmailLog(TimeStampedModel): status = models.CharField(choices=STATUS, default=STATUS.unknown, max_length=20) case = models.ForeignKey(Case, ma...
{"golden_diff": "diff --git a/feder/letters/logs/models.py b/feder/letters/logs/models.py\n--- a/feder/letters/logs/models.py\n+++ b/feder/letters/logs/models.py\n@@ -33,7 +33,7 @@\n class EmailLog(TimeStampedModel):\n status = models.CharField(choices=STATUS, default=STATUS.unknown, max_length=20)\n case = mod...
1,367
178
gh_patches_debug_23753
rasdani/github-patches
git_diff
aws-cloudformation__cfn-lint-256
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Using `Fn::Split` in `ManagedPolicyArns` as part of a `AWS::IAM::Role` results in incorrect E1018 error *cfn-lint version: 0.4.2* *Description of issue.* Using `Fn::Split` in `ManagedPolicyArns` as part...
diff --git a/src/cfnlint/rules/functions/Split.py b/src/cfnlint/rules/functions/Split.py --- a/src/cfnlint/rules/functions/Split.py +++ b/src/cfnlint/rules/functions/Split.py @@ -43,6 +43,7 @@ 'Fn::If', 'Fn::Join', 'Fn::Select', + 'Fn::Sub', 'Ref' ...
{"golden_diff": "diff --git a/src/cfnlint/rules/functions/Split.py b/src/cfnlint/rules/functions/Split.py\n--- a/src/cfnlint/rules/functions/Split.py\n+++ b/src/cfnlint/rules/functions/Split.py\n@@ -43,6 +43,7 @@\n 'Fn::If',\n 'Fn::Join',\n 'Fn::Select',\n+ 'Fn::Sub',\n ...
1,627
233
gh_patches_debug_36172
rasdani/github-patches
git_diff
huggingface__dataset-viewer-2303
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cron job that cleans hf-datasets cache often fails > Description: Job datasets-server/prod-datasets-server-job-clean-hf-datasets-cache-28426140 failed to complete. Removing failed job after investigation shou...
diff --git a/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py b/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py --- a/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py +++ b/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py @@ -21,26 +21,35 @@ errors = 0 ...
{"golden_diff": "diff --git a/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py b/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py\n--- a/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py\n+++ b/jobs/cache_maintenance/src/cache_maintenance/clean_directory.py\n@@ -21,26 +21,35 ...
883
617
gh_patches_debug_22276
rasdani/github-patches
git_diff
streamlink__streamlink-163
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cybergame.tv plugin not work for livestreams `[cli][info] Found matching plugin cybergame for URL http://cybergame.tv/sharkisfinetoo/` `[cli][info] Available streams: 720p (worst, best)` `[cli][info] Openin...
diff --git a/src/streamlink/plugins/cybergame.py b/src/streamlink/plugins/cybergame.py --- a/src/streamlink/plugins/cybergame.py +++ b/src/streamlink/plugins/cybergame.py @@ -5,6 +5,7 @@ from streamlink.plugin.api import http, validate from streamlink.stream import RTMPStream +LIVE_STREAM_URL = "rtmp://stream1.cybe...
{"golden_diff": "diff --git a/src/streamlink/plugins/cybergame.py b/src/streamlink/plugins/cybergame.py\n--- a/src/streamlink/plugins/cybergame.py\n+++ b/src/streamlink/plugins/cybergame.py\n@@ -5,6 +5,7 @@\n from streamlink.plugin.api import http, validate\n from streamlink.stream import RTMPStream\n \n+LIVE_STREAM_UR...
1,053
287
gh_patches_debug_41987
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-5725
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/inference/llama/llama_generation.py b/examples/inference/llama/llama_generation.py --- a/examples/inference/llama/llama_generation.py +++ b/examples/inference/llama/llama_generation.py @@ -27,7 +27,7 @@ model = MODEL_CLS.from_pretrained(model_path_or_name) tokenizer = AutoTokenizer.from_...
{"golden_diff": "diff --git a/examples/inference/llama/llama_generation.py b/examples/inference/llama/llama_generation.py\n--- a/examples/inference/llama/llama_generation.py\n+++ b/examples/inference/llama/llama_generation.py\n@@ -27,7 +27,7 @@\n model = MODEL_CLS.from_pretrained(model_path_or_name)\n tokenizer...
1,206
836
gh_patches_debug_6374
rasdani/github-patches
git_diff
meltano__meltano-6345
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Airflow docs incorrect for adding files This was raised in slack https://meltano.slack.com/archives/C01TCRBBJD7/p1655231194958339 The docs say `meltano add files airflow` but now we prefix the file bundles...
diff --git a/src/meltano/core/plugin/dbt/base.py b/src/meltano/core/plugin/dbt/base.py --- a/src/meltano/core/plugin/dbt/base.py +++ b/src/meltano/core/plugin/dbt/base.py @@ -63,7 +63,7 @@ except FileNotFoundError as err: relative_path = Path(err.filename).relative_to(self.project.root) ...
{"golden_diff": "diff --git a/src/meltano/core/plugin/dbt/base.py b/src/meltano/core/plugin/dbt/base.py\n--- a/src/meltano/core/plugin/dbt/base.py\n+++ b/src/meltano/core/plugin/dbt/base.py\n@@ -63,7 +63,7 @@\n except FileNotFoundError as err:\n relative_path = Path(err.filename).relative_to(self.pr...
1,182
157
gh_patches_debug_28518
rasdani/github-patches
git_diff
pypa__setuptools-2952
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Legal] Include the license of all libraries in `_vendor` ### What's the problem this feature will solve? I'm not a lawyer, but my understanding is that it is not allowed to separate MIT licensed code from i...
diff --git a/pavement.py b/pavement.py --- a/pavement.py +++ b/pavement.py @@ -1,6 +1,7 @@ import re import sys import subprocess +from fnmatch import fnmatch from paver.easy import task, path as Path @@ -52,12 +53,43 @@ '-t', str(vendor), ] subprocess.check_call(install_args) + move_licen...
{"golden_diff": "diff --git a/pavement.py b/pavement.py\n--- a/pavement.py\n+++ b/pavement.py\n@@ -1,6 +1,7 @@\n import re\n import sys\n import subprocess\n+from fnmatch import fnmatch\n \n from paver.easy import task, path as Path\n \n@@ -52,12 +53,43 @@\n '-t', str(vendor),\n ]\n subprocess.check_cal...
907
433
gh_patches_debug_13561
rasdani/github-patches
git_diff
conan-io__conan-6994
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [bug] deploy generator broken with 1.25.0 ### Environment Details (include every applicable attribute) * Operating System+version: Ubuntu 20.04 * Compiler+version: any * Conan version: 1.25.0 * Py...
diff --git a/conans/client/generators/deploy.py b/conans/client/generators/deploy.py --- a/conans/client/generators/deploy.py +++ b/conans/client/generators/deploy.py @@ -43,7 +43,10 @@ dst = os.path.normpath(dst) mkdir(os.path.dirname(dst)) if os.path.isli...
{"golden_diff": "diff --git a/conans/client/generators/deploy.py b/conans/client/generators/deploy.py\n--- a/conans/client/generators/deploy.py\n+++ b/conans/client/generators/deploy.py\n@@ -43,7 +43,10 @@\n dst = os.path.normpath(dst)\n mkdir(os.path.dirname(dst))\n ...
1,229
177
gh_patches_debug_13357
rasdani/github-patches
git_diff
xorbitsai__inference-297
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BUG: UnicodeDecodeError caused by xinference/model/llm/llm_family.json ### Describe the bug Windows cmd runned xinference found Error: "**UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 89...
diff --git a/xinference/model/llm/__init__.py b/xinference/model/llm/__init__.py --- a/xinference/model/llm/__init__.py +++ b/xinference/model/llm/__init__.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import codecs import json import ...
{"golden_diff": "diff --git a/xinference/model/llm/__init__.py b/xinference/model/llm/__init__.py\n--- a/xinference/model/llm/__init__.py\n+++ b/xinference/model/llm/__init__.py\n@@ -12,6 +12,7 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+import code...
1,712
194
gh_patches_debug_19858
rasdani/github-patches
git_diff
Parsl__parsl-285
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Parsl internal bugs silently squashed then hangs @benclifford reported an alarming bug in which a error in the parsl code does not throw an exception but is silently squashed. This is followed by the code han...
diff --git a/parsl/__init__.py b/parsl/__init__.py --- a/parsl/__init__.py +++ b/parsl/__init__.py @@ -71,6 +71,12 @@ handler.setFormatter(formatter) logger.addHandler(handler) + # Concurrent.futures errors are also of interest, as exceptions + # which propagate out of the top of a callback are logged...
{"golden_diff": "diff --git a/parsl/__init__.py b/parsl/__init__.py\n--- a/parsl/__init__.py\n+++ b/parsl/__init__.py\n@@ -71,6 +71,12 @@\n handler.setFormatter(formatter)\n logger.addHandler(handler)\n \n+ # Concurrent.futures errors are also of interest, as exceptions\n+ # which propagate out of the top...
1,420
249
gh_patches_debug_8789
rasdani/github-patches
git_diff
open-telemetry__opentelemetry-python-contrib-210
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add database_index attribute for redis instrumentation when db is not 0 Prior discussion [here](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/184#discussion_r528913282). The spec says...
diff --git a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py --- a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py...
{"golden_diff": "diff --git a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py\n--- a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumenta...
898
215
gh_patches_debug_17016
rasdani/github-patches
git_diff
open-mmlab__mmpretrain-112
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- bug in recall and precision? hi: It seems the https://github.com/open-mmlab/mmclassification/blob/92438da12a9f8bf0390277be902dc96e6970b54d/mmcls/models/losses/eval_metrics.py#L55 and https://github.com/...
diff --git a/mmcls/models/losses/eval_metrics.py b/mmcls/models/losses/eval_metrics.py --- a/mmcls/models/losses/eval_metrics.py +++ b/mmcls/models/losses/eval_metrics.py @@ -34,7 +34,7 @@ confusion_matrix = calculate_confusion_matrix(pred, target) with torch.no_grad(): res = confusion_matrix.diag() ...
{"golden_diff": "diff --git a/mmcls/models/losses/eval_metrics.py b/mmcls/models/losses/eval_metrics.py\n--- a/mmcls/models/losses/eval_metrics.py\n+++ b/mmcls/models/losses/eval_metrics.py\n@@ -34,7 +34,7 @@\n confusion_matrix = calculate_confusion_matrix(pred, target)\n with torch.no_grad():\n res = c...
1,226
220
gh_patches_debug_17855
rasdani/github-patches
git_diff
searx__searx-1879
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Startpage parser breaks on Spanish date format To reproduce, follow these steps: 1. open searx.info (or another instance) 2. search for a spanish term, eg "madrid tiempo ahora" This results in an err...
diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py --- a/searx/engines/startpage.py +++ b/searx/engines/startpage.py @@ -99,11 +99,14 @@ if re.match(r"^([1-9]|[1-2][0-9]|3[0-1]) [A-Z][a-z]{2} [0-9]{4} \.\.\. ", content): date_pos = content.find('...') + 4 date_string...
{"golden_diff": "diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py\n--- a/searx/engines/startpage.py\n+++ b/searx/engines/startpage.py\n@@ -99,11 +99,14 @@\n if re.match(r\"^([1-9]|[1-2][0-9]|3[0-1]) [A-Z][a-z]{2} [0-9]{4} \\.\\.\\. \", content):\n date_pos = content.find('...') +...
1,608
244
gh_patches_debug_12612
rasdani/github-patches
git_diff
joke2k__faker-767
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Norwegian ssn returns the wrong format for the date part SSN for no_NO returns the wrong format of the date part. ### Steps to reproduce As @cloveras pointed out: Using December 31 1999 as the date of...
diff --git a/faker/providers/ssn/no_NO/__init__.py b/faker/providers/ssn/no_NO/__init__.py --- a/faker/providers/ssn/no_NO/__init__.py +++ b/faker/providers/ssn/no_NO/__init__.py @@ -71,7 +71,7 @@ gender_num = self.generator.random.choice((0, 2, 4, 6, 8)) elif gender == 'M': ...
{"golden_diff": "diff --git a/faker/providers/ssn/no_NO/__init__.py b/faker/providers/ssn/no_NO/__init__.py\n--- a/faker/providers/ssn/no_NO/__init__.py\n+++ b/faker/providers/ssn/no_NO/__init__.py\n@@ -71,7 +71,7 @@\n gender_num = self.generator.random.choice((0, 2, 4, 6, 8))\n elif gender ...
1,476
219
gh_patches_debug_24749
rasdani/github-patches
git_diff
googleapis__google-auth-library-python-90
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- secure_authorized_channel should pass **kwargs to grpc.secure_channel This will enable us to completely replace google-cloud-python's [similar function](https://github.com/GoogleCloudPlatform/google-cloud-pyt...
diff --git a/google/auth/transport/grpc.py b/google/auth/transport/grpc.py --- a/google/auth/transport/grpc.py +++ b/google/auth/transport/grpc.py @@ -62,7 +62,7 @@ def secure_authorized_channel( - credentials, request, target, ssl_credentials=None): + credentials, request, target, ssl_credentials=No...
{"golden_diff": "diff --git a/google/auth/transport/grpc.py b/google/auth/transport/grpc.py\n--- a/google/auth/transport/grpc.py\n+++ b/google/auth/transport/grpc.py\n@@ -62,7 +62,7 @@\n \n \n def secure_authorized_channel(\n- credentials, request, target, ssl_credentials=None):\n+ credentials, request, t...
1,480
250
gh_patches_debug_18557
rasdani/github-patches
git_diff
mkdocs__mkdocs-812
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- EPEL7 Currently `setup.py` specifies that click must be at least version 4.0. I'm currently working with the Fedora package maintainer to get this [added to EPEL for RHEL7](https://bugzilla.redhat.com/show_b...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ packages=get_packages("mkdocs"), include_package_data=True, install_requires=[ - 'click>=4.0', + 'click>=3.3', 'Jinja2>=2.7.1', 'livereload>=2.3.2', 'Markdown>=2.3.1,<2.5' if PY26 els...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -58,7 +58,7 @@\n packages=get_packages(\"mkdocs\"),\n include_package_data=True,\n install_requires=[\n- 'click>=4.0',\n+ 'click>=3.3',\n 'Jinja2>=2.7.1',\n 'livereload>=2.3.2',\n 'Mar...
1,579
204
gh_patches_debug_24328
rasdani/github-patches
git_diff
python-gitlab__python-gitlab-1522
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Deprecate tag.set_release_description and remove it from docs ## Description of the problem, including code/CLI snippet It seems that the code we use to create a release from a tag [here](https://github.com/...
diff --git a/gitlab/v4/objects/releases.py b/gitlab/v4/objects/releases.py --- a/gitlab/v4/objects/releases.py +++ b/gitlab/v4/objects/releases.py @@ -1,5 +1,5 @@ from gitlab.base import RequiredOptional, RESTManager, RESTObject -from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMixin, SaveMixin +from gi...
{"golden_diff": "diff --git a/gitlab/v4/objects/releases.py b/gitlab/v4/objects/releases.py\n--- a/gitlab/v4/objects/releases.py\n+++ b/gitlab/v4/objects/releases.py\n@@ -1,5 +1,5 @@\n from gitlab.base import RequiredOptional, RESTManager, RESTObject\n-from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMix...
858
304
gh_patches_debug_6212
rasdani/github-patches
git_diff
aws-cloudformation__cfn-lint-1459
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Python2.7 dependency issue *cfn-lint version: 0.29.4* Hi, When installing a project that has cfn-lint as a dependency ([moto](https://github.com/spulec/moto)) using Python2.7, I'm getting this error: `...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ 'pathlib2>=2.3.0;python_version<="3.4"', 'importlib_resources~=1.0.2;python_version<"3.7"', 'networkx~=2.4;python_version>="3.5"', - 'networkx~=2.1;python_version<"3.5"' + 'networkx<=2.2;python_vers...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -73,7 +73,7 @@\n 'pathlib2>=2.3.0;python_version<=\"3.4\"',\n 'importlib_resources~=1.0.2;python_version<\"3.7\"',\n 'networkx~=2.4;python_version>=\"3.5\"',\n- 'networkx~=2.1;python_version<\"3.5\"'\n+ ...
1,782
158
gh_patches_debug_3840
rasdani/github-patches
git_diff
dotkom__onlineweb4-2382
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Users who are retaking their third year are automatically set to first grade <!-- If this is a security issue or information leakage (having access to something you (probably) shouldn't), please send an email...
diff --git a/apps/dataporten/study/utils.py b/apps/dataporten/study/utils.py --- a/apps/dataporten/study/utils.py +++ b/apps/dataporten/study/utils.py @@ -83,7 +83,8 @@ # If we don't know the end date, only add the years for the course. years.append(get_add_years(group)) - return ...
{"golden_diff": "diff --git a/apps/dataporten/study/utils.py b/apps/dataporten/study/utils.py\n--- a/apps/dataporten/study/utils.py\n+++ b/apps/dataporten/study/utils.py\n@@ -83,7 +83,8 @@\n # If we don't know the end date, only add the years for the course.\n years.append(get_add_years(...
1,924
139
gh_patches_debug_222
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-2608
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 [BUG]: Testing failed due to triton ### 🐛 Describe the bug The build on PR workflow failed with the following errors: ...
diff --git a/colossalai/amp/apex_amp/apex_amp.py b/colossalai/amp/apex_amp/apex_amp.py --- a/colossalai/amp/apex_amp/apex_amp.py +++ b/colossalai/amp/apex_amp/apex_amp.py @@ -2,6 +2,7 @@ # -*- encoding: utf-8 -*- import torch.nn as nn + try: import apex.amp as apex_amp except ImportError:
{"golden_diff": "diff --git a/colossalai/amp/apex_amp/apex_amp.py b/colossalai/amp/apex_amp/apex_amp.py\n--- a/colossalai/amp/apex_amp/apex_amp.py\n+++ b/colossalai/amp/apex_amp/apex_amp.py\n@@ -2,6 +2,7 @@\n # -*- encoding: utf-8 -*-\n \n import torch.nn as nn\n+\n try:\n import apex.amp as apex_amp\n except Impor...
739
104
gh_patches_debug_34659
rasdani/github-patches
git_diff
carpentries__amy-2443
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update view for unevaluated contributions This view lets us see people with unevaluated contributions. This should be updated to show people with unevaluated "Get Involved" step. https://amy.carpentries.org...
diff --git a/amy/trainings/filters.py b/amy/trainings/filters.py --- a/amy/trainings/filters.py +++ b/amy/trainings/filters.py @@ -37,8 +37,8 @@ return queryset -def filter_trainees_by_unevaluated_lesson_contribution_presence(queryset, name, flag): - if flag: # return only trainees with an unevaluated ...
{"golden_diff": "diff --git a/amy/trainings/filters.py b/amy/trainings/filters.py\n--- a/amy/trainings/filters.py\n+++ b/amy/trainings/filters.py\n@@ -37,8 +37,8 @@\n return queryset\n \n \n-def filter_trainees_by_unevaluated_lesson_contribution_presence(queryset, name, flag):\n- if flag: # return only trai...
2,028
575
gh_patches_debug_5704
rasdani/github-patches
git_diff
Kinto__kinto-499
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Explain in the doc how to disable default_buckets and bucket creation from authenticated users. From a discussion with @chrismbeckett on IRC: 1) Anyone can register for my application and get an auth token t...
diff --git a/kinto/__init__.py b/kinto/__init__.py --- a/kinto/__init__.py +++ b/kinto/__init__.py @@ -45,11 +45,6 @@ settings = config.get_settings() - # In Kinto API 1.x, a default bucket is available. - # Force its inclusion if not specified in settings. - if 'kinto.plugins.default_bucket' not in s...
{"golden_diff": "diff --git a/kinto/__init__.py b/kinto/__init__.py\n--- a/kinto/__init__.py\n+++ b/kinto/__init__.py\n@@ -45,11 +45,6 @@\n \n settings = config.get_settings()\n \n- # In Kinto API 1.x, a default bucket is available.\n- # Force its inclusion if not specified in settings.\n- if 'kinto.plugin...
1,155
140
gh_patches_debug_26357
rasdani/github-patches
git_diff
pydantic__pydantic-1124
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Mypy finds errors in the first example from the documentation <details> <summary>This example</summary> ```python from datetime import datetime from typing import List from pydantic import BaseModel ...
diff --git a/pydantic/__init__.py b/pydantic/__init__.py --- a/pydantic/__init__.py +++ b/pydantic/__init__.py @@ -11,3 +11,85 @@ from .tools import * from .types import * from .version import VERSION + +# WARNING __all__ from .errors is not included here, it will be removed as an export here in v2 +# please use "fr...
{"golden_diff": "diff --git a/pydantic/__init__.py b/pydantic/__init__.py\n--- a/pydantic/__init__.py\n+++ b/pydantic/__init__.py\n@@ -11,3 +11,85 @@\n from .tools import *\n from .types import *\n from .version import VERSION\n+\n+# WARNING __all__ from .errors is not included here, it will be removed as an export her...
708
577
gh_patches_debug_17934
rasdani/github-patches
git_diff
python-poetry__poetry-757
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Poetry install takes too long and installs the package again unnecessarily <!-- Hi there! Thank you for wanting to make Poetry better. Before you submit this; let's make sure of a few things. Pleas...
diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py --- a/poetry/console/commands/install.py +++ b/poetry/console/commands/install.py @@ -9,6 +9,7 @@ install { --no-dev : Do not install dev dependencies. } + { --no-root : Do not install the root package (your proj...
{"golden_diff": "diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py\n--- a/poetry/console/commands/install.py\n+++ b/poetry/console/commands/install.py\n@@ -9,6 +9,7 @@\n \n install\n { --no-dev : Do not install dev dependencies. }\n+ { --no-root : Do not install the...
1,624
196
gh_patches_debug_18848
rasdani/github-patches
git_diff
kartoza__prj.app-151
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Menus not working on live site I have deployed everything to the live site. The menus are not working for me there. Please investigate and fix asap. --- END ISSUE --- Below are some code segments, each fro...
diff --git a/django_project/core/settings/contrib.py b/django_project/core/settings/contrib.py --- a/django_project/core/settings/contrib.py +++ b/django_project/core/settings/contrib.py @@ -77,31 +77,11 @@ # Contributed / third party js libs for pipeline compression # For hand rolled js for this app, use project.p...
{"golden_diff": "diff --git a/django_project/core/settings/contrib.py b/django_project/core/settings/contrib.py\n--- a/django_project/core/settings/contrib.py\n+++ b/django_project/core/settings/contrib.py\n@@ -77,31 +77,11 @@\n \n # Contributed / third party js libs for pipeline compression\n # For hand rolled js for ...
1,308
302
gh_patches_debug_19213
rasdani/github-patches
git_diff
OBOFoundry__OBOFoundry.github.io-2277
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add automated check for licenses Did someone carefully check the repository? It says there the data is licensed under CC BY 4.0-SA, which is not acceptable for OBO Foundry: https://github.com/Da...
diff --git a/src/obofoundry/utils.py b/src/obofoundry/utils.py --- a/src/obofoundry/utils.py +++ b/src/obofoundry/utils.py @@ -3,11 +3,12 @@ import requests import yaml -from obofoundry.constants import ONTOLOGY_DIRECTORY +from obofoundry.constants import ONTOLOGY_DIRECTORY, ROOT __all__ = [ "get_data", ...
{"golden_diff": "diff --git a/src/obofoundry/utils.py b/src/obofoundry/utils.py\n--- a/src/obofoundry/utils.py\n+++ b/src/obofoundry/utils.py\n@@ -3,11 +3,12 @@\n import requests\n import yaml\n \n-from obofoundry.constants import ONTOLOGY_DIRECTORY\n+from obofoundry.constants import ONTOLOGY_DIRECTORY, ROOT\n \n __all...
858
311
gh_patches_debug_13925
rasdani/github-patches
git_diff
microsoft__playwright-python-302
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error running build_package.py When running build_package, it fails as curl is not available: ```txt Traceback (most recent call last): File "build_package.py", line 43, in <module> subprocess.check...
diff --git a/build_package.py b/build_package.py --- a/build_package.py +++ b/build_package.py @@ -18,6 +18,7 @@ import stat import subprocess import sys +import urllib.request import zipfile from playwright.path_utils import get_file_dirname @@ -40,7 +41,7 @@ if not os.path.exists("driver/" + zip_file): ...
{"golden_diff": "diff --git a/build_package.py b/build_package.py\n--- a/build_package.py\n+++ b/build_package.py\n@@ -18,6 +18,7 @@\n import stat\n import subprocess\n import sys\n+import urllib.request\n import zipfile\n \n from playwright.path_utils import get_file_dirname\n@@ -40,7 +41,7 @@\n if not os.path.exi...
1,659
170
gh_patches_debug_29632
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-2708
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs....
diff --git a/colossalai/engine/gradient_handler/utils.py b/colossalai/engine/gradient_handler/utils.py --- a/colossalai/engine/gradient_handler/utils.py +++ b/colossalai/engine/gradient_handler/utils.py @@ -1,29 +1,30 @@ -import torch.distributed as dist -import torch.nn as nn -from torch._utils import _flatten_dense...
{"golden_diff": "diff --git a/colossalai/engine/gradient_handler/utils.py b/colossalai/engine/gradient_handler/utils.py\n--- a/colossalai/engine/gradient_handler/utils.py\n+++ b/colossalai/engine/gradient_handler/utils.py\n@@ -1,29 +1,30 @@\n-import torch.distributed as dist\r\n-import torch.nn as nn\r\n-from torch._ut...
576
586
gh_patches_debug_21628
rasdani/github-patches
git_diff
bridgecrewio__checkov-213
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Policy Document Check Bugs **Describe the bug** StarActionPolicyDocument has issues with SCPs that use not_action. Stack trace: ``` Traceback (most recent call last): File "/usr/local/bin/checkov"...
diff --git a/checkov/terraform/checks/data/aws/AdminPolicyDocument.py b/checkov/terraform/checks/data/aws/AdminPolicyDocument.py --- a/checkov/terraform/checks/data/aws/AdminPolicyDocument.py +++ b/checkov/terraform/checks/data/aws/AdminPolicyDocument.py @@ -20,7 +20,7 @@ key = 'statement' if key in c...
{"golden_diff": "diff --git a/checkov/terraform/checks/data/aws/AdminPolicyDocument.py b/checkov/terraform/checks/data/aws/AdminPolicyDocument.py\n--- a/checkov/terraform/checks/data/aws/AdminPolicyDocument.py\n+++ b/checkov/terraform/checks/data/aws/AdminPolicyDocument.py\n@@ -20,7 +20,7 @@\n key = 'statement'...
1,554
343
gh_patches_debug_10969
rasdani/github-patches
git_diff
docker__docker-py-2045
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- windwos raise OSError: [Errno 9] Bad file descriptor the file ./utils/socket.py line 31 hava code `os.read(socket.fileno(), n)` but windows not support my call container.exec_run("xxx", socket=False) raise...
diff --git a/docker/utils/socket.py b/docker/utils/socket.py --- a/docker/utils/socket.py +++ b/docker/utils/socket.py @@ -1,6 +1,7 @@ import errno import os import select +import socket as pysocket import struct import six @@ -28,6 +29,8 @@ try: if hasattr(socket, 'recv'): return sock...
{"golden_diff": "diff --git a/docker/utils/socket.py b/docker/utils/socket.py\n--- a/docker/utils/socket.py\n+++ b/docker/utils/socket.py\n@@ -1,6 +1,7 @@\n import errno\n import os\n import select\n+import socket as pysocket\n import struct\n \n import six\n@@ -28,6 +29,8 @@\n try:\n if hasattr(socket, 're...
1,441
143
gh_patches_debug_27510
rasdani/github-patches
git_diff
scoutapp__scout_apm_python-202
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support Queue timing in Python agent Checking the request headers for officially supported frameworks like Django and Flask should be straight forward. We should also have a generic API interface for recor...
diff --git a/src/scout_apm/core/cli/core_agent_manager.py b/src/scout_apm/core/cli/core_agent_manager.py --- a/src/scout_apm/core/cli/core_agent_manager.py +++ b/src/scout_apm/core/cli/core_agent_manager.py @@ -4,38 +4,31 @@ import argparse import logging +from scout_apm.core import AgentContext, CoreAgentManager ...
{"golden_diff": "diff --git a/src/scout_apm/core/cli/core_agent_manager.py b/src/scout_apm/core/cli/core_agent_manager.py\n--- a/src/scout_apm/core/cli/core_agent_manager.py\n+++ b/src/scout_apm/core/cli/core_agent_manager.py\n@@ -4,38 +4,31 @@\n import argparse\n import logging\n \n+from scout_apm.core import AgentCon...
623
414
gh_patches_debug_26293
rasdani/github-patches
git_diff
PokemonGoF__PokemonGo-Bot-4031
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Starting bot in sleep cycle ### Actual When starting the bot while it should be in a sleep cycle, it waits for start of next sleep cycle. ### Expected Bot should 'continue' sleeping and wake up on normal ti...
diff --git a/pokemongo_bot/cell_workers/sleep_schedule.py b/pokemongo_bot/cell_workers/sleep_schedule.py --- a/pokemongo_bot/cell_workers/sleep_schedule.py +++ b/pokemongo_bot/cell_workers/sleep_schedule.py @@ -36,9 +36,10 @@ # self.bot.event_manager.register_event('sleeper_scheduled', parameters=('datetime',)...
{"golden_diff": "diff --git a/pokemongo_bot/cell_workers/sleep_schedule.py b/pokemongo_bot/cell_workers/sleep_schedule.py\n--- a/pokemongo_bot/cell_workers/sleep_schedule.py\n+++ b/pokemongo_bot/cell_workers/sleep_schedule.py\n@@ -36,9 +36,10 @@\n # self.bot.event_manager.register_event('sleeper_scheduled', par...
1,453
349
gh_patches_debug_6336
rasdani/github-patches
git_diff
azavea__raster-vision-354
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Installing Nvidia drivers doesn't work When building the AMI, the `install-nvidia-drivers.sh` fails with base AMI `'ami-9109beee` (latest deep learning ami) and Nvidia drivers 384.125. I was able to get it to...
diff --git a/deployment/packer/driver.py b/deployment/packer/driver.py --- a/deployment/packer/driver.py +++ b/deployment/packer/driver.py @@ -22,7 +22,7 @@ sess = boto3.Session(profile_name=aws_profile) ec2 = sess.client("ec2") images = filter( - lambda x: re.search("Deep Learning AMI Amazon Linu...
{"golden_diff": "diff --git a/deployment/packer/driver.py b/deployment/packer/driver.py\n--- a/deployment/packer/driver.py\n+++ b/deployment/packer/driver.py\n@@ -22,7 +22,7 @@\n sess = boto3.Session(profile_name=aws_profile)\n ec2 = sess.client(\"ec2\")\n images = filter(\n- lambda x: re.search(\"De...
1,233
147
gh_patches_debug_27559
rasdani/github-patches
git_diff
rlworkgroup__garage-1846
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Backport #1791 to release-2020.06 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `src/garage/tf/policies/d...
diff --git a/src/garage/tf/policies/discrete_qf_derived_policy.py b/src/garage/tf/policies/discrete_qf_derived_policy.py --- a/src/garage/tf/policies/discrete_qf_derived_policy.py +++ b/src/garage/tf/policies/discrete_qf_derived_policy.py @@ -86,6 +86,74 @@ return opt_actions, dict() + def get_trainable...
{"golden_diff": "diff --git a/src/garage/tf/policies/discrete_qf_derived_policy.py b/src/garage/tf/policies/discrete_qf_derived_policy.py\n--- a/src/garage/tf/policies/discrete_qf_derived_policy.py\n+++ b/src/garage/tf/policies/discrete_qf_derived_policy.py\n@@ -86,6 +86,74 @@\n \n return opt_actions, dict()\n ...
1,208
509
gh_patches_debug_15459
rasdani/github-patches
git_diff
pydantic__pydantic-8316
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `to_snake` alias generator bug -- great first issue ### Initial Checks - [X] I confirm that I'm using Pydantic V2 ### Description ### Issue Summary: When using the to_snake alias generator from pydantic.a...
diff --git a/pydantic/alias_generators.py b/pydantic/alias_generators.py --- a/pydantic/alias_generators.py +++ b/pydantic/alias_generators.py @@ -39,6 +39,12 @@ Returns: The converted string in snake_case. """ - snake = re.sub(r'([a-zA-Z])([0-9])', lambda m: f'{m.group(1)}_{m.group(2)}', camel) -...
{"golden_diff": "diff --git a/pydantic/alias_generators.py b/pydantic/alias_generators.py\n--- a/pydantic/alias_generators.py\n+++ b/pydantic/alias_generators.py\n@@ -39,6 +39,12 @@\n Returns:\n The converted string in snake_case.\n \"\"\"\n- snake = re.sub(r'([a-zA-Z])([0-9])', lambda m: f'{m.group(...
1,320
360
gh_patches_debug_8016
rasdani/github-patches
git_diff
DataDog__dd-trace-py-3674
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pytest plugin starts tracer when plugin is disabled ### Which version of dd-trace-py are you using? 1.1.1 ### Which version of pip are you using? ``` # pip --version pip 22.0.4 from /usr/local/lib/...
diff --git a/ddtrace/contrib/pytest/__init__.py b/ddtrace/contrib/pytest/__init__.py --- a/ddtrace/contrib/pytest/__init__.py +++ b/ddtrace/contrib/pytest/__init__.py @@ -18,6 +18,22 @@ ddtrace = 1 ddtrace-patch-all = 1 + +.. note:: + The ddtrace plugin for pytest has the side effect of importing the ddtr...
{"golden_diff": "diff --git a/ddtrace/contrib/pytest/__init__.py b/ddtrace/contrib/pytest/__init__.py\n--- a/ddtrace/contrib/pytest/__init__.py\n+++ b/ddtrace/contrib/pytest/__init__.py\n@@ -18,6 +18,22 @@\n ddtrace = 1\n ddtrace-patch-all = 1\n \n+\n+.. note::\n+ The ddtrace plugin for pytest has the side ef...
1,072
218
gh_patches_debug_574
rasdani/github-patches
git_diff
espnet__espnet-913
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- matplotlib.use('Agg') fail It result in plot fail ``` _tkinter.TclError: no display name and no $DISPLAY environment variable ``` I fixed this by applying a patch on `espnet/nets/pytorch_backend/transfor...
diff --git a/espnet/nets/pytorch_backend/transformer/plot.py b/espnet/nets/pytorch_backend/transformer/plot.py --- a/espnet/nets/pytorch_backend/transformer/plot.py +++ b/espnet/nets/pytorch_backend/transformer/plot.py @@ -1,8 +1,7 @@ import logging -import matplotlib.pyplot as plt - from espnet.asr import asr_util...
{"golden_diff": "diff --git a/espnet/nets/pytorch_backend/transformer/plot.py b/espnet/nets/pytorch_backend/transformer/plot.py\n--- a/espnet/nets/pytorch_backend/transformer/plot.py\n+++ b/espnet/nets/pytorch_backend/transformer/plot.py\n@@ -1,8 +1,7 @@\n import logging\n \n-import matplotlib.pyplot as plt\n-\n from e...
1,323
117
gh_patches_debug_65372
rasdani/github-patches
git_diff
fossasia__open-event-server-3946
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Make all query params accept the dasherized version of the attribute names. Currently the query params, such as - [x] sort - [ ] include - [ ] filter - [ ] sparse fieldsets require the attribute names...
diff --git a/config.py b/config.py --- a/config.py +++ b/config.py @@ -56,6 +56,7 @@ DATABASE_QUERY_TIMEOUT = 0.1 SOFT_DELETE = True PROPOGATE_ERROR = False + DASHERIZE_API = True if not SQLALCHEMY_DATABASE_URI: print('`DATABASE_URL` either not exported or empty')
{"golden_diff": "diff --git a/config.py b/config.py\n--- a/config.py\n+++ b/config.py\n@@ -56,6 +56,7 @@\n DATABASE_QUERY_TIMEOUT = 0.1\n SOFT_DELETE = True\n PROPOGATE_ERROR = False\n+ DASHERIZE_API = True\n \n if not SQLALCHEMY_DATABASE_URI:\n print('`DATABASE_URL` either not exported or em...
1,370
89
gh_patches_debug_52254
rasdani/github-patches
git_diff
mitmproxy__mitmproxy-1442
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Scripts: "done" hook is not executed. ##### Steps to reproduce the problem: 1. `touch foo` 2. `mitmdump -r foo -s examples\stub.py` ##### What is the expected behavior? ``` start configure done ``` ##### Wha...
diff --git a/mitmproxy/dump.py b/mitmproxy/dump.py --- a/mitmproxy/dump.py +++ b/mitmproxy/dump.py @@ -118,5 +118,6 @@ def run(self): # pragma: no cover if self.options.rfile and not self.options.keepserving: + self.addons.done() return super(DumpMaster, self).run()
{"golden_diff": "diff --git a/mitmproxy/dump.py b/mitmproxy/dump.py\n--- a/mitmproxy/dump.py\n+++ b/mitmproxy/dump.py\n@@ -118,5 +118,6 @@\n \n def run(self): # pragma: no cover\n if self.options.rfile and not self.options.keepserving:\n+ self.addons.done()\n return\n super(D...
1,516
97
gh_patches_debug_1211
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-4514
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Domains missing from New Look websites The new_look_gb.py spider is returning websites that are missing the domain name. This is because that's how the website appears in the schema.org block on the pages bei...
diff --git a/locations/spiders/new_look_gb.py b/locations/spiders/new_look_gb.py --- a/locations/spiders/new_look_gb.py +++ b/locations/spiders/new_look_gb.py @@ -15,3 +15,7 @@ for entry in entries: if "closed" not in entry["loc"].lower(): yield entry + + def inspect_item(self,...
{"golden_diff": "diff --git a/locations/spiders/new_look_gb.py b/locations/spiders/new_look_gb.py\n--- a/locations/spiders/new_look_gb.py\n+++ b/locations/spiders/new_look_gb.py\n@@ -15,3 +15,7 @@\n for entry in entries:\n if \"closed\" not in entry[\"loc\"].lower():\n yield entry\n+...
582
110
gh_patches_debug_10370
rasdani/github-patches
git_diff
pallets__click-1937
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Completion Example Error. <!-- This issue tracker is a tool to address bugs in Click itself. Please use Pallets Discord or Stack Overflow for questions about your own code. Replace this comment with a cl...
diff --git a/examples/completion/completion.py b/examples/completion/completion.py --- a/examples/completion/completion.py +++ b/examples/completion/completion.py @@ -38,10 +38,13 @@ # of CompletionItem. You can match on whatever you want, including # the help. items = [("bob", "butcher"), ("alice", "bak...
{"golden_diff": "diff --git a/examples/completion/completion.py b/examples/completion/completion.py\n--- a/examples/completion/completion.py\n+++ b/examples/completion/completion.py\n@@ -38,10 +38,13 @@\n # of CompletionItem. You can match on whatever you want, including\n # the help.\n items = [(\"bob\", \...
1,276
162
gh_patches_debug_63435
rasdani/github-patches
git_diff
wright-group__WrightTools-168
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Contours in mpl_2D seem to have shape problem. I'm running the following script ``` import WrightTools as wt p = '000.data' d = wt.data.from_PyCMDS(p) d.signal_ratio.clip(zmin=-4, zmax=4) d.signal_ra...
diff --git a/examples/rRaman.py b/examples/rRaman.py --- a/examples/rRaman.py +++ b/examples/rRaman.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ Resonance Raman -========== +=============== A Resonance Raman plot. """
{"golden_diff": "diff --git a/examples/rRaman.py b/examples/rRaman.py\n--- a/examples/rRaman.py\n+++ b/examples/rRaman.py\n@@ -1,7 +1,7 @@\n # -*- coding: utf-8 -*-\n \"\"\"\n Resonance Raman\n-==========\n+===============\n \n A Resonance Raman plot.\n \"\"\"\n", "issue": "Contours in mpl_2D seem to have shape problem...
1,288
71
gh_patches_debug_9641
rasdani/github-patches
git_diff
shuup__shuup-212
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pages availability is confusing and missing date pickers I created a page and set it `Visible in menu`. The "from" and "to" fields don't have date pickers and I thought they would be optional anyway, seems lo...
diff --git a/shoop/admin/templatetags/shoop_admin.py b/shoop/admin/templatetags/shoop_admin.py --- a/shoop/admin/templatetags/shoop_admin.py +++ b/shoop/admin/templatetags/shoop_admin.py @@ -23,6 +23,11 @@ def form(self, form, **kwargs): return mark_safe(FormRenderer(form, **kwargs).render()) + def d...
{"golden_diff": "diff --git a/shoop/admin/templatetags/shoop_admin.py b/shoop/admin/templatetags/shoop_admin.py\n--- a/shoop/admin/templatetags/shoop_admin.py\n+++ b/shoop/admin/templatetags/shoop_admin.py\n@@ -23,6 +23,11 @@\n def form(self, form, **kwargs):\n return mark_safe(FormRenderer(form, **kwargs)....
726
181
gh_patches_debug_35629
rasdani/github-patches
git_diff
scrapy__scrapy-4111
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- LogStats Extension should log the IPM and RPM to the stats on spider_closed signal ## Summary By default, the `scrapy.extensions.logstats.LogStats` log the details below to the standard logger every 60 sec...
diff --git a/scrapy/extensions/logstats.py b/scrapy/extensions/logstats.py --- a/scrapy/extensions/logstats.py +++ b/scrapy/extensions/logstats.py @@ -9,7 +9,10 @@ class LogStats: - """Log basic scraping stats periodically""" + """Log basic scraping stats periodically like: + * RPM - Requests per Minute +...
{"golden_diff": "diff --git a/scrapy/extensions/logstats.py b/scrapy/extensions/logstats.py\n--- a/scrapy/extensions/logstats.py\n+++ b/scrapy/extensions/logstats.py\n@@ -9,7 +9,10 @@\n \n \n class LogStats:\n- \"\"\"Log basic scraping stats periodically\"\"\"\n+ \"\"\"Log basic scraping stats periodically like:\...
993
662
gh_patches_debug_32806
rasdani/github-patches
git_diff
streamlink__streamlink-4703
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- plugins.ard_mediathek: No playable streams found on this URL ### Checklist - [X] This is a plugin issue and not a different kind of issue - [X] [I have read the contribution guidelines](https://github.com...
diff --git a/src/streamlink/plugins/ard_mediathek.py b/src/streamlink/plugins/ard_mediathek.py --- a/src/streamlink/plugins/ard_mediathek.py +++ b/src/streamlink/plugins/ard_mediathek.py @@ -19,29 +19,50 @@ @pluginmatcher(re.compile( - r"https?://(?:(\w+\.)?ardmediathek\.de/|mediathek\.daserste\.de/)" + r"""...
{"golden_diff": "diff --git a/src/streamlink/plugins/ard_mediathek.py b/src/streamlink/plugins/ard_mediathek.py\n--- a/src/streamlink/plugins/ard_mediathek.py\n+++ b/src/streamlink/plugins/ard_mediathek.py\n@@ -19,29 +19,50 @@\n \n \n @pluginmatcher(re.compile(\n- r\"https?://(?:(\\w+\\.)?ardmediathek\\.de/|mediathe...
2,008
601
gh_patches_debug_33850
rasdani/github-patches
git_diff
cal-itp__benefits-345
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Enhance form rendering: Radio button list This is a follow-on to #322, to enhance how forms are rendered in the [`page` template](https://github.com/cal-itp/benefits/blob/dev/benefits/core/templates/core/page...
diff --git a/benefits/core/widgets.py b/benefits/core/widgets.py --- a/benefits/core/widgets.py +++ b/benefits/core/widgets.py @@ -1,6 +1,7 @@ """ The core application: Helper form widgets. """ +import copy from django.forms import widgets @@ -15,3 +16,25 @@ self.attrs.update({"pattern": pattern}) ...
{"golden_diff": "diff --git a/benefits/core/widgets.py b/benefits/core/widgets.py\n--- a/benefits/core/widgets.py\n+++ b/benefits/core/widgets.py\n@@ -1,6 +1,7 @@\n \"\"\"\n The core application: Helper form widgets.\n \"\"\"\n+import copy\n from django.forms import widgets\n \n \n@@ -15,3 +16,25 @@\n self....
1,713
590
gh_patches_debug_1785
rasdani/github-patches
git_diff
PlasmaPy__PlasmaPy-1122
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pickle-able Particles (and other objects, for parallelization) My draft Thomson scattering fitting function (#974) is currently restricted to using 1 CPU core because the underlying fit function (`thomson.spe...
diff --git a/plasmapy/particles/elements.py b/plasmapy/particles/elements.py --- a/plasmapy/particles/elements.py +++ b/plasmapy/particles/elements.py @@ -14,9 +14,15 @@ import json import pkgutil -_PeriodicTable = collections.namedtuple( - "periodic_table", ["group", "category", "block", "period"] -) +from data...
{"golden_diff": "diff --git a/plasmapy/particles/elements.py b/plasmapy/particles/elements.py\n--- a/plasmapy/particles/elements.py\n+++ b/plasmapy/particles/elements.py\n@@ -14,9 +14,15 @@\n import json\n import pkgutil\n \n-_PeriodicTable = collections.namedtuple(\n- \"periodic_table\", [\"group\", \"category\", \...
1,052
152
gh_patches_debug_21328
rasdani/github-patches
git_diff
scrapy__scrapy-4066
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add more extensions to IGNORED_EXTENSIONS A follow-up to https://github.com/scrapy/scrapy/pull/1835. For the record, in my last project I had to also add the following extensions to ignored: ``` { '7z', ...
diff --git a/scrapy/linkextractors/__init__.py b/scrapy/linkextractors/__init__.py --- a/scrapy/linkextractors/__init__.py +++ b/scrapy/linkextractors/__init__.py @@ -19,23 +19,26 @@ # common file extensions that are not followed if they occur in links IGNORED_EXTENSIONS = [ + # archives + '7z', '7zip', 'bz2'...
{"golden_diff": "diff --git a/scrapy/linkextractors/__init__.py b/scrapy/linkextractors/__init__.py\n--- a/scrapy/linkextractors/__init__.py\n+++ b/scrapy/linkextractors/__init__.py\n@@ -19,23 +19,26 @@\n \n # common file extensions that are not followed if they occur in links\n IGNORED_EXTENSIONS = [\n+ # archives\...
1,849
434
gh_patches_debug_11716
rasdani/github-patches
git_diff
python-discord__bot-1141
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Antimalware cog file filter triggers on bot and webhook messages Currently the antimalware cog file filter triggers on messages from the bot, and also on webhook messages. So for the example somebody tries to...
diff --git a/bot/cogs/antimalware.py b/bot/cogs/antimalware.py --- a/bot/cogs/antimalware.py +++ b/bot/cogs/antimalware.py @@ -55,6 +55,10 @@ if not message.attachments or not message.guild: return + # Ignore webhook and bot messages + if message.webhook_id or message.author.bot: +...
{"golden_diff": "diff --git a/bot/cogs/antimalware.py b/bot/cogs/antimalware.py\n--- a/bot/cogs/antimalware.py\n+++ b/bot/cogs/antimalware.py\n@@ -55,6 +55,10 @@\n if not message.attachments or not message.guild:\n return\n \n+ # Ignore webhook and bot messages\n+ if message.webhook_id...
1,638
164
gh_patches_debug_7451
rasdani/github-patches
git_diff
searxng__searxng-1934
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- SearXNG Firefox user-agent doesn't match real Firefox **Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG** 2022.10.29-fc9986de **How did you install Se...
diff --git a/searxng_extra/update/update_firefox_version.py b/searxng_extra/update/update_firefox_version.py --- a/searxng_extra/update/update_firefox_version.py +++ b/searxng_extra/update/update_firefox_version.py @@ -64,8 +64,11 @@ major_list = (major_last, major_last - 1) for version in versions: ...
{"golden_diff": "diff --git a/searxng_extra/update/update_firefox_version.py b/searxng_extra/update/update_firefox_version.py\n--- a/searxng_extra/update/update_firefox_version.py\n+++ b/searxng_extra/update/update_firefox_version.py\n@@ -64,8 +64,11 @@\n major_list = (major_last, major_last - 1)\n for version ...
1,511
161
gh_patches_debug_3085
rasdani/github-patches
git_diff
WordPress__openverse-api-599
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Some waveform peaks have negative values ## Description <!-- Concisely describe the bug. --> The frontend expects peaks to be in range of [0..1], however, some peaks returned from the API can have negative ...
diff --git a/api/catalog/api/utils/waveform.py b/api/catalog/api/utils/waveform.py --- a/api/catalog/api/utils/waveform.py +++ b/api/catalog/api/utils/waveform.py @@ -106,6 +106,8 @@ for idx, val in enumerate(data): if idx % 2 == 0: continue + if val < 0: # Any other odd values are ne...
{"golden_diff": "diff --git a/api/catalog/api/utils/waveform.py b/api/catalog/api/utils/waveform.py\n--- a/api/catalog/api/utils/waveform.py\n+++ b/api/catalog/api/utils/waveform.py\n@@ -106,6 +106,8 @@\n for idx, val in enumerate(data):\n if idx % 2 == 0:\n continue\n+ if val < 0: # Any...
1,952
127
gh_patches_debug_18023
rasdani/github-patches
git_diff
mdn__kuma-7686
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Wrong redirect on localized home page Examples: ``` ▶ curl -I https:/developer.mozilla.org/fr HTTP/2 301 location: /fr/docs/fr server: gunicorn/20.0.4 ``` The exact same is happening to `ja` But oth...
diff --git a/kuma/wiki/views/legacy.py b/kuma/wiki/views/legacy.py --- a/kuma/wiki/views/legacy.py +++ b/kuma/wiki/views/legacy.py @@ -5,7 +5,7 @@ from kuma.core.decorators import shared_cache_control from ..constants import LEGACY_MINDTOUCH_NAMESPACES -from ..models import Document, Revision +from ..models import ...
{"golden_diff": "diff --git a/kuma/wiki/views/legacy.py b/kuma/wiki/views/legacy.py\n--- a/kuma/wiki/views/legacy.py\n+++ b/kuma/wiki/views/legacy.py\n@@ -5,7 +5,7 @@\n from kuma.core.decorators import shared_cache_control\n \n from ..constants import LEGACY_MINDTOUCH_NAMESPACES\n-from ..models import Document, Revisio...
1,574
238
gh_patches_debug_6919
rasdani/github-patches
git_diff
zulip__zulip-15887
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cannot react with a custom emoji to a bot message Attempting to react to a bot message with a custom emoji appears to work but if you refresh the page it's gone. Inspecting the network requests reveals that ...
diff --git a/zerver/views/reactions.py b/zerver/views/reactions.py --- a/zerver/views/reactions.py +++ b/zerver/views/reactions.py @@ -73,7 +73,7 @@ # Otherwise, use the name provided in this request, but verify # it is valid in the user's realm (e.g. not a deactivated # realm emoji). - ...
{"golden_diff": "diff --git a/zerver/views/reactions.py b/zerver/views/reactions.py\n--- a/zerver/views/reactions.py\n+++ b/zerver/views/reactions.py\n@@ -73,7 +73,7 @@\n # Otherwise, use the name provided in this request, but verify\n # it is valid in the user's realm (e.g. not a deactivated\n ...
1,885
127