in_source_id
string
before_files
list
after_files
list
pr_diff
string
issue
string
golden_diff
string
verification_info
string
prompt
string
Cog-Creators__Red-DiscordBot-2889
[ { "content": "import asyncio\nimport inspect\nimport os\nimport logging\nfrom collections import Counter\nfrom enum import Enum\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Optional, Union, List\n\nimport discord\nimport sys\nfrom discord.ext.commands import when_men...
[ { "content": "import asyncio\nimport inspect\nimport os\nimport logging\nfrom collections import Counter\nfrom enum import Enum\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Optional, Union, List\n\nimport discord\nimport sys\nfrom discord.ext.commands import when_men...
diff --git a/changelog.d/2888.bugfix.rst b/changelog.d/2888.bugfix.rst new file mode 100644 index 00000000000..19f76701d8c --- /dev/null +++ b/changelog.d/2888.bugfix.rst @@ -0,0 +1 @@ +Fixed remove_command error when trying to remove a non-existent command \ No newline at end of file diff --git a/redbot/core/bot.py b/...
Removing commands on bot load # Other bugs Loading a cog with bot.remove_command statements in init causes it to error out and not load. #### What were you trying to do? I have a cog that has statements in __init__ like this ```py bot.remove_command("invite") bot.remove_command("ping") ...
diff --git a/redbot/core/bot.py b/redbot/core/bot.py --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -461,6 +461,8 @@ def remove_command(self, name: str) -> None: command = super().remove_command(name) + if not command: + return command.requires.reset() if isinst...
{"golden_diff": "diff --git a/redbot/core/bot.py b/redbot/core/bot.py\n--- a/redbot/core/bot.py\n+++ b/redbot/core/bot.py\n@@ -461,6 +461,8 @@\n \n def remove_command(self, name: str) -> None:\n command = super().remove_command(name)\n+ if not command:\n+ return\n command.requires....
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Removing commands on bot load # Other bugs Loading a cog with bot.remove_command statements in init causes it to error out and not load. #### What were you trying to do? I have a cog that has sta...
openedx__ecommerce-348
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef create_shipping_event(apps, schema_editor):\n \"\"\"\n\n Create a single new shipping event type that can be applied to an order. This will allow us to initiate order\n sh...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef create_shipping_event(apps, schema_editor):\n \"\"\"\n\n Create a single new shipping event type that can be applied to an order. This will allow us to initiate order\n sh...
diff --git a/Makefile b/Makefile index 15be88d0c1d..cc16c6d8e2e 100644 --- a/Makefile +++ b/Makefile @@ -50,14 +50,14 @@ validate_js: validate_python: clean python manage.py compress --settings=ecommerce.settings.test -v0 - DISABLE_MIGRATIONS=True coverage run --branch --source=ecommerce ./manage.py test ecommerce...
Running migrations for Travis builds We run migrations to ensure no migrations are missing, and they work on fresh installs.
diff --git a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py --- a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py +++ b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py @@ -13,8 +13,7 @@ """ #...
{"golden_diff": "diff --git a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py\n--- a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py\n+++ b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py\n@@ -13,8 +13,...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Running migrations for Travis builds We run migrations to ensure no migrations are missing, and they work on fresh installs. --- END ISSUE --- Below are some code segments, each from a relevant file. One o...
apluslms__a-plus-964
[ { "content": "import logging\nimport posixpath\nimport re\nimport time\nfrom typing import Optional\nfrom urllib.parse import urlparse, urljoin\n\nfrom bs4 import BeautifulSoup\nimport requests\nfrom requests.models import Response\n\nfrom aplus_auth.payload import Permission, Permissions\nfrom django.conf impo...
[ { "content": "import logging\nimport posixpath\nimport re\nimport time\nfrom typing import Optional\nfrom urllib.parse import urlparse, urljoin\n\nfrom bs4 import BeautifulSoup\nimport requests\nfrom requests.models import Response\n\nfrom aplus_auth.payload import Permission, Permissions\nfrom django.conf impo...
diff --git a/lib/remote_page.py b/lib/remote_page.py index f2eb2cf97..c36ea21d2 100644 --- a/lib/remote_page.py +++ b/lib/remote_page.py @@ -175,6 +175,8 @@ def select_element_or_body(self, search_attributes): def element_or_body(self, search_attributes): element = self.select_element_or_body(search_att...
Remove the HTML attribute id="exercise" when chapters and exercises are rendered in the A+ frontend HTML id attributes must be unique. However, currently, the `id="exercise"` is used multiple times. It seems that the chapter content itself has one `<div id="exercise">` and each embedded exercise also has one `<div id="...
diff --git a/lib/remote_page.py b/lib/remote_page.py --- a/lib/remote_page.py +++ b/lib/remote_page.py @@ -175,6 +175,8 @@ def element_or_body(self, search_attributes): element = self.select_element_or_body(search_attributes) + if element.get('id') == 'exercise': + del element['id'] ...
{"golden_diff": "diff --git a/lib/remote_page.py b/lib/remote_page.py\n--- a/lib/remote_page.py\n+++ b/lib/remote_page.py\n@@ -175,6 +175,8 @@\n \n def element_or_body(self, search_attributes):\n element = self.select_element_or_body(search_attributes)\n+ if element.get('id') == 'exercise':\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove the HTML attribute id="exercise" when chapters and exercises are rendered in the A+ frontend HTML id attributes must be unique. However, currently, the `id="exercise"` is used multiple times. It seems ...
qutip__qutip-2183
[ { "content": "from warnings import warn\nimport operator\n\nimport numpy as np\nfrom scipy.sparse import (\n csr_matrix, dia_matrix, isspmatrix, SparseEfficiencyWarning,\n)\n\n# fast_csr_matrix extends the internals of csr_matrix, and we need to\n# import parts of the internals of scipy.sparse to do that:\ni...
[ { "content": "from warnings import warn\nimport operator\n\nimport numpy as np\nfrom scipy.sparse import (\n csr_matrix, dia_matrix, isspmatrix, SparseEfficiencyWarning,\n)\n\n# fast_csr_matrix extends the internals of csr_matrix, and we need to\n# import parts of the internals of scipy.sparse to do that:\ni...
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8d0291b1d2..f0fd592398 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -90,6 +90,7 @@ jobs: os: ubuntu-latest python-version: "3.10" condaforge: 1 + nocvxopt: 1 ...
Cannot import qutip after latest scipy release ### Bug Description I've encountered this bug when creating a clean environment, and installing `qutip` (and IPython as console) through mamba. Next, I've opened an IPython console and ran `import qutip`, which resulted in the exception printed below - stating that the `...
diff --git a/qutip/fastsparse.py b/qutip/fastsparse.py --- a/qutip/fastsparse.py +++ b/qutip/fastsparse.py @@ -52,7 +52,11 @@ self._shape = tuple(int(s) for s in shape) self.dtype = complex self.maxprint = 50 - self.format = 'csr' + if hasattr(self, "_format"): + ...
{"golden_diff": "diff --git a/qutip/fastsparse.py b/qutip/fastsparse.py\n--- a/qutip/fastsparse.py\n+++ b/qutip/fastsparse.py\n@@ -52,7 +52,11 @@\n self._shape = tuple(int(s) for s in shape)\n self.dtype = complex\n self.maxprint = 50\n- self.format = 'csr'\n+ if hasattr(se...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cannot import qutip after latest scipy release ### Bug Description I've encountered this bug when creating a clean environment, and installing `qutip` (and IPython as console) through mamba. Next, I've open...
qtile__qtile-2641
[ { "content": "# Copyright (c) 2008, Aldo Cortesi. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the ri...
[ { "content": "# Copyright (c) 2008, Aldo Cortesi. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the ri...
diff --git a/libqtile/bar.py b/libqtile/bar.py index 06aa3f9f45..b4467c0b2a 100644 --- a/libqtile/bar.py +++ b/libqtile/bar.py @@ -65,6 +65,7 @@ def __init__(self, size): def _configure(self, qtile, screen): self.qtile = qtile self.screen = screen + self.size = self.initial_size #...
Bar moves when screen wakes up <!-- Please do not ask general questions here! There are [community contact](https://github.com/qtile/qtile#community) options for that. --> # Issue description <!-- A brief discussion of what failed and how it failed. A description of what you tried is helpful, i.e. "When I us...
diff --git a/libqtile/bar.py b/libqtile/bar.py --- a/libqtile/bar.py +++ b/libqtile/bar.py @@ -65,6 +65,7 @@ def _configure(self, qtile, screen): self.qtile = qtile self.screen = screen + self.size = self.initial_size # If both horizontal and vertical gaps are present, screen corn...
{"golden_diff": "diff --git a/libqtile/bar.py b/libqtile/bar.py\n--- a/libqtile/bar.py\n+++ b/libqtile/bar.py\n@@ -65,6 +65,7 @@\n def _configure(self, qtile, screen):\n self.qtile = qtile\n self.screen = screen\n+ self.size = self.initial_size\n # If both horizontal and vertical gaps...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bar moves when screen wakes up <!-- Please do not ask general questions here! There are [community contact](https://github.com/qtile/qtile#community) options for that. --> # Issue description <!-- A...
sublimelsp__LSP-555
[ { "content": "import sublime\nimport sublime_plugin\n\ntry:\n from typing import Any, List, Dict, Tuple, Callable, Optional\n assert Any and List and Dict and Tuple and Callable and Optional\nexcept ImportError:\n pass\n\nfrom .core.protocol import Request\nfrom .core.events import global_events\nfrom ...
[ { "content": "import sublime\nimport sublime_plugin\n\ntry:\n from typing import Any, List, Dict, Tuple, Callable, Optional\n assert Any and List and Dict and Tuple and Callable and Optional\nexcept ImportError:\n pass\n\nfrom .core.protocol import Request\nfrom .core.events import global_events\nfrom ...
diff --git a/plugin/completion.py b/plugin/completion.py index 9fe7546c9..397173a22 100644 --- a/plugin/completion.py +++ b/plugin/completion.py @@ -51,10 +51,7 @@ def __init__(self, view): @classmethod def is_applicable(cls, settings): syntax = settings.get('syntax') - if syntax is not None: ...
TypeError: expected string or buffer https://github.com/tomv564/LSP/blob/e37c4e6d7d959890c465cada35dff7fef22feb6e/plugin/core/types.py#L50-L54 It happened only once so far, when `plugin_loaded` was called on start up. After restarting Sublime Text right away, it did not happened again. ``` Traceback (most recent...
diff --git a/plugin/completion.py b/plugin/completion.py --- a/plugin/completion.py +++ b/plugin/completion.py @@ -51,10 +51,7 @@ @classmethod def is_applicable(cls, settings): syntax = settings.get('syntax') - if syntax is not None: - return is_supported_syntax(syntax, client_confi...
{"golden_diff": "diff --git a/plugin/completion.py b/plugin/completion.py\n--- a/plugin/completion.py\n+++ b/plugin/completion.py\n@@ -51,10 +51,7 @@\n @classmethod\n def is_applicable(cls, settings):\n syntax = settings.get('syntax')\n- if syntax is not None:\n- return is_supported_sy...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- TypeError: expected string or buffer https://github.com/tomv564/LSP/blob/e37c4e6d7d959890c465cada35dff7fef22feb6e/plugin/core/types.py#L50-L54 It happened only once so far, when `plugin_loaded` was called ...
facebookresearch__ParlAI-1428
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\n (NOTE: To use this class, please follow the tutorial here:\n http://parl.ai/sta...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\n (NOTE: To use this class, please follow the tutorial here:\n http://parl.ai/sta...
diff --git a/parlai/core/pytorch_data_teacher.py b/parlai/core/pytorch_data_teacher.py index ba778a51c3d..65c5d6cd405 100644 --- a/parlai/core/pytorch_data_teacher.py +++ b/parlai/core/pytorch_data_teacher.py @@ -29,6 +29,13 @@ from threading import Thread, Condition, RLock +if torch.version.__version__.startswith...
Pytorch Data Teacher seems to hang I observe a weird hang when using the pytorch data teacher: ``` doesn't hang PYTHONPATH=. python examples/display_data.py -t wizard_of_wikipedia:WizardDialogKnowledgeTeacher seems to hang indefinitely PYTHONPATH=. python examples/display_data.py -pyt wizard_of_wikipedia:Wizar...
diff --git a/parlai/core/pytorch_data_teacher.py b/parlai/core/pytorch_data_teacher.py --- a/parlai/core/pytorch_data_teacher.py +++ b/parlai/core/pytorch_data_teacher.py @@ -29,6 +29,13 @@ from threading import Thread, Condition, RLock +if torch.version.__version__.startswith('0.'): + raise ImportError( + ...
{"golden_diff": "diff --git a/parlai/core/pytorch_data_teacher.py b/parlai/core/pytorch_data_teacher.py\n--- a/parlai/core/pytorch_data_teacher.py\n+++ b/parlai/core/pytorch_data_teacher.py\n@@ -29,6 +29,13 @@\n from threading import Thread, Condition, RLock\n \n \n+if torch.version.__version__.startswith('0.'):\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pytorch Data Teacher seems to hang I observe a weird hang when using the pytorch data teacher: ``` doesn't hang PYTHONPATH=. python examples/display_data.py -t wizard_of_wikipedia:WizardDialogKnowledgeTe...
litestar-org__litestar-1327
[ { "content": "from __future__ import annotations\n\nfrom dataclasses import asdict, dataclass, field\nfrom typing import TYPE_CHECKING, Any, Callable, Literal, cast\n\nfrom starlite.exceptions import ImproperlyConfiguredException, MissingDependencyException\nfrom starlite.logging.config import BaseLoggingConfig...
[ { "content": "from __future__ import annotations\n\nfrom dataclasses import asdict, dataclass, field\nfrom typing import TYPE_CHECKING, Any, Callable, Literal, cast\n\nfrom starlite.exceptions import ImproperlyConfiguredException, MissingDependencyException\nfrom starlite.logging.config import BaseLoggingConfig...
diff --git a/starlite/contrib/sqlalchemy_1/config.py b/starlite/contrib/sqlalchemy_1/config.py index b4854367f8..3b7101d907 100644 --- a/starlite/contrib/sqlalchemy_1/config.py +++ b/starlite/contrib/sqlalchemy_1/config.py @@ -265,7 +265,7 @@ def session_maker(self) -> sessionmaker: ) return cast(...
Rule exceptions using noqa should be very specific I think this would ignore all linting here instead of maybe the one we want. May be best to be specific? https://beta.ruff.rs/docs/configuration/#error-suppression _Originally posted by @JacobCoffee in https://github.com/starlite-api/starlite/pull/1323#discussio...
diff --git a/starlite/contrib/sqlalchemy_1/config.py b/starlite/contrib/sqlalchemy_1/config.py --- a/starlite/contrib/sqlalchemy_1/config.py +++ b/starlite/contrib/sqlalchemy_1/config.py @@ -265,7 +265,7 @@ ) return cast("sessionmaker", self.session_maker_instance) - def create_db_session_dep...
{"golden_diff": "diff --git a/starlite/contrib/sqlalchemy_1/config.py b/starlite/contrib/sqlalchemy_1/config.py\n--- a/starlite/contrib/sqlalchemy_1/config.py\n+++ b/starlite/contrib/sqlalchemy_1/config.py\n@@ -265,7 +265,7 @@\n )\n return cast(\"sessionmaker\", self.session_maker_instance)\n \n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Rule exceptions using noqa should be very specific I think this would ignore all linting here instead of maybe the one we want. May be best to be specific? https://beta.ruff.rs/docs/configuration/#error-s...
docker__docker-py-2213
[ { "content": "from docker.api import APIClient\nfrom docker.errors import APIError\nfrom .resource import Model\n\n\nclass Swarm(Model):\n \"\"\"\n The server's Swarm state. This a singleton that must be reloaded to get\n the current state of the Swarm.\n \"\"\"\n id_attribute = 'ID'\n\n def _...
[ { "content": "from docker.api import APIClient\nfrom docker.errors import APIError\nfrom .resource import Model\n\n\nclass Swarm(Model):\n \"\"\"\n The server's Swarm state. This a singleton that must be reloaded to get\n the current state of the Swarm.\n \"\"\"\n id_attribute = 'ID'\n\n def _...
diff --git a/docker/models/swarm.py b/docker/models/swarm.py index 7396e730d..3a02ae370 100644 --- a/docker/models/swarm.py +++ b/docker/models/swarm.py @@ -112,6 +112,7 @@ def init(self, advertise_addr=None, listen_addr='0.0.0.0:2377', init_kwargs['swarm_spec'] = self.client.api.create_swarm_spec(**kwargs) ...
swarm.init() does not return a value No return value unlike as specified in documentation.
diff --git a/docker/models/swarm.py b/docker/models/swarm.py --- a/docker/models/swarm.py +++ b/docker/models/swarm.py @@ -112,6 +112,7 @@ init_kwargs['swarm_spec'] = self.client.api.create_swarm_spec(**kwargs) self.client.api.init_swarm(**init_kwargs) self.reload() + return True ...
{"golden_diff": "diff --git a/docker/models/swarm.py b/docker/models/swarm.py\n--- a/docker/models/swarm.py\n+++ b/docker/models/swarm.py\n@@ -112,6 +112,7 @@\n init_kwargs['swarm_spec'] = self.client.api.create_swarm_spec(**kwargs)\n self.client.api.init_swarm(**init_kwargs)\n self.reload()\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- swarm.init() does not return a value No return value unlike as specified in documentation. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain ...
open-mmlab__mmcv-474
[ { "content": "# Copyright (c) Open-MMLab. All rights reserved.\nimport os.path as osp\nimport time\n\nimport torch\nfrom torch.optim import Optimizer\n\nimport mmcv\nfrom .base_runner import BaseRunner\nfrom .checkpoint import save_checkpoint\nfrom .hooks import IterTimerHook\nfrom .utils import get_host_info\n...
[ { "content": "# Copyright (c) Open-MMLab. All rights reserved.\nimport os.path as osp\nimport time\n\nimport torch\nfrom torch.optim import Optimizer\n\nimport mmcv\nfrom .base_runner import BaseRunner\nfrom .checkpoint import save_checkpoint\nfrom .hooks import IterTimerHook\nfrom .utils import get_host_info\n...
diff --git a/mmcv/runner/iter_based_runner.py b/mmcv/runner/iter_based_runner.py index 3a3d22f2fc..f41a86a9d4 100644 --- a/mmcv/runner/iter_based_runner.py +++ b/mmcv/runner/iter_based_runner.py @@ -222,5 +222,6 @@ def register_training_hooks(self, self.register_checkpoint_hook(checkpoint_config) self...
Bug feedback. Thanks for your codes. In [mmcv/runner/base_runner](https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/base_runner.py#L385), ` def register_logger_hooks(self, log_config): log_interval = log_config['interval'] for info in log_config['hooks']: logger_hook = mmc...
diff --git a/mmcv/runner/iter_based_runner.py b/mmcv/runner/iter_based_runner.py --- a/mmcv/runner/iter_based_runner.py +++ b/mmcv/runner/iter_based_runner.py @@ -222,5 +222,6 @@ self.register_checkpoint_hook(checkpoint_config) self.register_hook(IterTimerHook()) if log_config is not None: - ...
{"golden_diff": "diff --git a/mmcv/runner/iter_based_runner.py b/mmcv/runner/iter_based_runner.py\n--- a/mmcv/runner/iter_based_runner.py\n+++ b/mmcv/runner/iter_based_runner.py\n@@ -222,5 +222,6 @@\n self.register_checkpoint_hook(checkpoint_config)\n self.register_hook(IterTimerHook())\n if log...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug feedback. Thanks for your codes. In [mmcv/runner/base_runner](https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/base_runner.py#L385), ` def register_logger_hooks(self, log_config): ...
kserve__kserve-3005
[ { "content": "# Copyright 2021 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ { "content": "# Copyright 2021 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
diff --git a/python/kserve/kserve/api/kserve_client.py b/python/kserve/kserve/api/kserve_client.py index 4a6210a862d..88676b54241 100644 --- a/python/kserve/kserve/api/kserve_client.py +++ b/python/kserve/kserve/api/kserve_client.py @@ -43,7 +43,7 @@ def __init__(self, config_file=None, config_dict=None, context=None, ...
Load kubeconfig from dict /kind feature **Allow loading of kubeconfig from dictionary in KServe python client** The Kubernetes python client has a function to load kubeconfigs from dict which is quite handy in somecases compared to the kubecfg file. Currently the `KServeClient` supports only loading from kubeconfig...
diff --git a/python/kserve/kserve/api/kserve_client.py b/python/kserve/kserve/api/kserve_client.py --- a/python/kserve/kserve/api/kserve_client.py +++ b/python/kserve/kserve/api/kserve_client.py @@ -43,7 +43,7 @@ config_dict=config_dict, context=context, cl...
{"golden_diff": "diff --git a/python/kserve/kserve/api/kserve_client.py b/python/kserve/kserve/api/kserve_client.py\n--- a/python/kserve/kserve/api/kserve_client.py\n+++ b/python/kserve/kserve/api/kserve_client.py\n@@ -43,7 +43,7 @@\n config_dict=config_dict,\n context=context,\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Load kubeconfig from dict /kind feature **Allow loading of kubeconfig from dictionary in KServe python client** The Kubernetes python client has a function to load kubeconfigs from dict which is quite han...
openmc-dev__openmc-678
[ { "content": "from collections import Iterable, OrderedDict\nimport copy\nfrom numbers import Real, Integral\nimport sys\n\nimport numpy as np\n\nfrom openmc import Mesh\nimport openmc.checkvalue as cv\n\n\nif sys.version_info[0] >= 3:\n basestring = str\n\n\n_FILTER_TYPES = ['universe', 'material', 'cell', ...
[ { "content": "from collections import Iterable, OrderedDict\nimport copy\nfrom numbers import Real, Integral\nimport sys\n\nimport numpy as np\n\nfrom openmc import Mesh\nimport openmc.checkvalue as cv\n\n\nif sys.version_info[0] >= 3:\n basestring = str\n\n\n_FILTER_TYPES = ['universe', 'material', 'cell', ...
diff --git a/openmc/filter.py b/openmc/filter.py index d6ee70f148d..8a54e05cee5 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -162,6 +162,11 @@ def bins(self, bins): if not isinstance(bins, Iterable): bins = [bins] + # If the bin is 0D numpy array, promote to 1D + elif is...
Tally with cell filter assumes the cells tallied to are mutually exclusive If a tally is created with a cell filter, the bins (i.e. cells) are assumed to be mutually exclusive. For instance, we can modify the `examples/xml/lattice/simple/tallies.xml` file for a 4x4 lattice of pin cells to only have the following tally:...
diff --git a/openmc/filter.py b/openmc/filter.py --- a/openmc/filter.py +++ b/openmc/filter.py @@ -162,6 +162,11 @@ if not isinstance(bins, Iterable): bins = [bins] + # If the bin is 0D numpy array, promote to 1D + elif isinstance(bins, np.ndarray): + if bins.shape == ()...
{"golden_diff": "diff --git a/openmc/filter.py b/openmc/filter.py\n--- a/openmc/filter.py\n+++ b/openmc/filter.py\n@@ -162,6 +162,11 @@\n if not isinstance(bins, Iterable):\n bins = [bins]\n \n+ # If the bin is 0D numpy array, promote to 1D\n+ elif isinstance(bins, np.ndarray):\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Tally with cell filter assumes the cells tallied to are mutually exclusive If a tally is created with a cell filter, the bins (i.e. cells) are assumed to be mutually exclusive. For instance, we can modify the...
google__jax-19166
[ { "content": "# Copyright 2023 The JAX Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
[ { "content": "# Copyright 2023 The JAX Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
diff --git a/jax/_src/scipy/stats/binom.py b/jax/_src/scipy/stats/binom.py index 852d39edc8e8..869eab91c5b5 100644 --- a/jax/_src/scipy/stats/binom.py +++ b/jax/_src/scipy/stats/binom.py @@ -33,7 +33,7 @@ def logpmf(k: ArrayLike, n: ArrayLike, p: ArrayLike, loc: ArrayLike = 0) -> Arra ) log_linear_term = lax....
Unexpected behavior of `jax.scipy.stats.binom.pmf` ### Description pmf of a random variable should be zero outside of its range. While plotting the graph for `jax.scipy.stats.binom.pmf`, I notice that for $n>5$ and $p>0.5$, there are some oscillations in the values of the pmf, which should not be there. For evidence...
diff --git a/jax/_src/scipy/stats/binom.py b/jax/_src/scipy/stats/binom.py --- a/jax/_src/scipy/stats/binom.py +++ b/jax/_src/scipy/stats/binom.py @@ -33,7 +33,7 @@ ) log_linear_term = lax.add(xlogy(y, p), xlog1py(lax.sub(n, y), lax.neg(p))) log_probs = lax.add(comb_term, log_linear_term) - return jnp...
{"golden_diff": "diff --git a/jax/_src/scipy/stats/binom.py b/jax/_src/scipy/stats/binom.py\n--- a/jax/_src/scipy/stats/binom.py\n+++ b/jax/_src/scipy/stats/binom.py\n@@ -33,7 +33,7 @@\n )\n log_linear_term = lax.add(xlogy(y, p), xlog1py(lax.sub(n, y), lax.neg(p)))\n log_probs = lax.add(comb_term, log_linea...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Unexpected behavior of `jax.scipy.stats.binom.pmf` ### Description pmf of a random variable should be zero outside of its range. While plotting the graph for `jax.scipy.stats.binom.pmf`, I notice that for ...
xonsh__xonsh-4622
[ { "content": "\"\"\"The xonsh abstract syntax tree node.\"\"\"\n# These are imported into our module namespace for the benefit of parser.py.\n# pylint: disable=unused-import\nimport sys\nfrom ast import (\n Module,\n Num,\n Expr,\n Str,\n Bytes,\n UnaryOp,\n UAdd,\n USub,\n Invert,\n ...
[ { "content": "\"\"\"The xonsh abstract syntax tree node.\"\"\"\n# These are imported into our module namespace for the benefit of parser.py.\n# pylint: disable=unused-import\nimport sys\nfrom ast import (\n Module,\n Num,\n Expr,\n Str,\n Bytes,\n UnaryOp,\n UAdd,\n USub,\n Invert,\n ...
diff --git a/news/fix-list-comp-boolop.rst b/news/fix-list-comp-boolop.rst new file mode 100644 index 0000000000..8aafa48cd2 --- /dev/null +++ b/news/fix-list-comp-boolop.rst @@ -0,0 +1,23 @@ +**Added:** + +* <news item> + +**Changed:** + +* <news item> + +**Deprecated:** + +* <news item> + +**Removed:** + +* <news ite...
Valid Python fails when invoked inside a function This simple code should return the same list as it is provided with: ```python3 def _fail(x): return [i for i in x if i is not None and i < 10] ``` However, it fails when invoked: ``` $ _fail([1,2,3]) xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = ...
diff --git a/xonsh/ast.py b/xonsh/ast.py --- a/xonsh/ast.py +++ b/xonsh/ast.py @@ -521,6 +521,11 @@ node.values[i] = self.try_subproc_toks(val, strip_expr=True) return node + def visit_comprehension(self, node): + """Handles visiting list comprehensions, set comprehensions, + ...
{"golden_diff": "diff --git a/xonsh/ast.py b/xonsh/ast.py\n--- a/xonsh/ast.py\n+++ b/xonsh/ast.py\n@@ -521,6 +521,11 @@\n node.values[i] = self.try_subproc_toks(val, strip_expr=True)\n return node\n \n+ def visit_comprehension(self, node):\n+ \"\"\"Handles visiting list comprehensions,...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Valid Python fails when invoked inside a function This simple code should return the same list as it is provided with: ```python3 def _fail(x): return [i for i in x if i is not None and i < 10] ``` H...
scikit-hep__pyhf-1261
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow~=2.2.0', # TensorFlow minor releases are as volatile as major\n 'tensorflow-probability~=0.10.0',\n ],\n 'torch': ['torch~=1.2'],\n 'jax': ['jax...
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow~=2.2.0', # TensorFlow minor releases are as volatile as major\n 'tensorflow-probability~=0.10.0',\n ],\n 'torch': ['torch~=1.2'],\n 'jax': ['jax...
diff --git a/setup.py b/setup.py index 735722f91b..d2f6a27400 100644 --- a/setup.py +++ b/setup.py @@ -39,12 +39,10 @@ 'pytest-console-scripts', 'pytest-mpl', 'pydocstyle', - 'coverage>=4.0', # coveralls 'papermill~=2.0', 'nteract-scrapbook~=0...
Remove duplicated libraries in setup.py # Description In `setup.py` and `setup.cfg` there are some duplicated libraries that should be removed from `setup.py`. https://github.com/scikit-hep/pyhf/blob/75f3cd350ed3986d16d680fbb83f312791aafd68/setup.py#L47 already exists as a core requirement in `setup.cfg` ht...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -39,12 +39,10 @@ 'pytest-console-scripts', 'pytest-mpl', 'pydocstyle', - 'coverage>=4.0', # coveralls 'papermill~=2.0', 'nteract-scrapbook~=0.2', 'jupyter', ...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -39,12 +39,10 @@\n 'pytest-console-scripts',\n 'pytest-mpl',\n 'pydocstyle',\n- 'coverage>=4.0', # coveralls\n 'papermill~=2.0',\n 'nteract-scrapbook~=0.2',\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove duplicated libraries in setup.py # Description In `setup.py` and `setup.cfg` there are some duplicated libraries that should be removed from `setup.py`. https://github.com/scikit-hep/pyhf/blob/75...
googleapis__google-cloud-python-10076
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
diff --git a/recommender/synth.py b/recommender/synth.py index 93d445f42f11..fe3a6a690dd0 100644 --- a/recommender/synth.py +++ b/recommender/synth.py @@ -29,7 +29,8 @@ for version in versions: library = gapic.py_library( "recommender", version, - include_protos=True + include_protos=True, ...
Synthesis failed for recommender Hello! Autosynth couldn't regenerate recommender. :broken_heart: Here's the output from running `synth.py`: ``` Cloning into 'working_repo'... Switched to branch 'autosynth-recommender' Running synthtool ['/tmpfs/src/git/autosynth/env/bin/python3', '-m', 'synthtool', 'synth.py', '--']...
diff --git a/recommender/synth.py b/recommender/synth.py --- a/recommender/synth.py +++ b/recommender/synth.py @@ -29,7 +29,8 @@ for version in versions: library = gapic.py_library( "recommender", version, - include_protos=True + include_protos=True, + config_path="/google/cloud/reco...
{"golden_diff": "diff --git a/recommender/synth.py b/recommender/synth.py\n--- a/recommender/synth.py\n+++ b/recommender/synth.py\n@@ -29,7 +29,8 @@\n for version in versions:\n library = gapic.py_library(\n \"recommender\", version,\n- include_protos=True\n+ include_protos=True,\n+ con...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Synthesis failed for recommender Hello! Autosynth couldn't regenerate recommender. :broken_heart: Here's the output from running `synth.py`: ``` Cloning into 'working_repo'... Switched to branch 'autosynth-...
python-telegram-bot__python-telegram-bot-1216
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Simple Bot to reply to Telegram messages\n# This program is dedicated to the public domain under the CC0 license.\n\"\"\"\nThis Bot uses the Updater class to handle the bot.\n\nFirst, a few callback functions are defined. Then, those functions a...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Simple Bot to reply to Telegram messages\n# This program is dedicated to the public domain under the CC0 license.\n\"\"\"\nThis Bot uses the Updater class to handle the bot.\n\nFirst, a few callback functions are defined. Then, those functions a...
diff --git a/examples/conversationbot2.py b/examples/conversationbot2.py index 34002792a07..c80af9292c9 100644 --- a/examples/conversationbot2.py +++ b/examples/conversationbot2.py @@ -109,7 +109,7 @@ def main(): # Get the dispatcher to register handlers dp = updater.dispatcher - # Add conversation handl...
Typo in comment in conversationbot2.py <!-- Thanks for reporting issues of python-telegram-bot! Use this template to notify us if you found a bug, or if you want to request a new feature. If you're looking for help with programming your bot using our library, feel free to ask your questions in out telegram group ...
diff --git a/examples/conversationbot2.py b/examples/conversationbot2.py --- a/examples/conversationbot2.py +++ b/examples/conversationbot2.py @@ -109,7 +109,7 @@ # Get the dispatcher to register handlers dp = updater.dispatcher - # Add conversation handler with the states GENDER, PHOTO, LOCATION and BIO...
{"golden_diff": "diff --git a/examples/conversationbot2.py b/examples/conversationbot2.py\n--- a/examples/conversationbot2.py\n+++ b/examples/conversationbot2.py\n@@ -109,7 +109,7 @@\n # Get the dispatcher to register handlers\n dp = updater.dispatcher\n \n- # Add conversation handler with the states GENDER,...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Typo in comment in conversationbot2.py <!-- Thanks for reporting issues of python-telegram-bot! Use this template to notify us if you found a bug, or if you want to request a new feature. If you're looki...
StackStorm__st2-3843
[ { "content": "#!/usr/bin/env python\n\nimport re\nimport sys\nimport os\nimport platform\nimport subprocess\n\ndistro = platform.linux_distribution()[0]\n\nargs = {'act': sys.argv[1], 'service': sys.argv[2]}\n\nif re.search(distro, 'Ubuntu'):\n if os.path.isfile(\"/etc/init/%s.conf\" % args['service']):\n ...
[ { "content": "#!/usr/bin/env python\n\nimport re\nimport sys\nimport os\nimport platform\nimport subprocess\n\ndistro = platform.linux_distribution()[0]\n\nargs = {'act': sys.argv[1], 'service': sys.argv[2]}\n\nif re.search(distro, 'Ubuntu'):\n if os.path.isfile(\"/etc/init/%s.conf\" % args['service']):\n ...
diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py index 3bef0b50bc..50716b7799 100644 --- a/contrib/linux/actions/service.py +++ b/contrib/linux/actions/service.py @@ -18,7 +18,8 @@ else: print("Unknown service") sys.exit(2) -elif re.search(distro, 'Redhat') or re.s...
Action 'linux.service' fails on Centos7 When I tried to execute restart some service on the Centos7 server got the following error: ``` Traceback (most recent call last): File "/tmp/5a0459bc07ac686fb813a920/service.py", line 24, in <module> subprocess.call(cmd, shell=True) NameError: name 'cmd' is not define...
diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py --- a/contrib/linux/actions/service.py +++ b/contrib/linux/actions/service.py @@ -18,7 +18,8 @@ else: print("Unknown service") sys.exit(2) -elif re.search(distro, 'Redhat') or re.search(distro, 'Fedora'): +elif re.se...
{"golden_diff": "diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py\n--- a/contrib/linux/actions/service.py\n+++ b/contrib/linux/actions/service.py\n@@ -18,7 +18,8 @@\n else:\n print(\"Unknown service\")\n sys.exit(2)\n-elif re.search(distro, 'Redhat') or re.search(dist...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Action 'linux.service' fails on Centos7 When I tried to execute restart some service on the Centos7 server got the following error: ``` Traceback (most recent call last): File "/tmp/5a0459bc07ac686fb813a...
pytorch__vision-4283
[ { "content": "from .._utils import IntermediateLayerGetter\nfrom ..._internally_replaced_utils import load_state_dict_from_url\nfrom .. import mobilenetv3\nfrom .. import resnet\nfrom .deeplabv3 import DeepLabHead, DeepLabV3\nfrom .fcn import FCN, FCNHead\nfrom .lraspp import LRASPP\n\n\n__all__ = ['fcn_resnet5...
[ { "content": "from .._utils import IntermediateLayerGetter\nfrom ..._internally_replaced_utils import load_state_dict_from_url\nfrom .. import mobilenetv3\nfrom .. import resnet\nfrom .deeplabv3 import DeepLabHead, DeepLabV3\nfrom .fcn import FCN, FCNHead\nfrom .lraspp import LRASPP\n\n\n__all__ = ['fcn_resnet5...
diff --git a/torchvision/models/segmentation/segmentation.py b/torchvision/models/segmentation/segmentation.py index 7b3a0258ddb..0f2f14c97ba 100644 --- a/torchvision/models/segmentation/segmentation.py +++ b/torchvision/models/segmentation/segmentation.py @@ -186,6 +186,8 @@ def lraspp_mobilenet_v3_large(pretrained=Fa...
a little problem when using some pretrained models ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> A little problem. I used some pretrained models to do object detection. However, when i used models whose name include others models' name, such as 'fasterrcnn_mobilenet_v3_large_320_fpn'...
diff --git a/torchvision/models/segmentation/segmentation.py b/torchvision/models/segmentation/segmentation.py --- a/torchvision/models/segmentation/segmentation.py +++ b/torchvision/models/segmentation/segmentation.py @@ -186,6 +186,8 @@ raise NotImplementedError('This model does not use auxiliary loss') ...
{"golden_diff": "diff --git a/torchvision/models/segmentation/segmentation.py b/torchvision/models/segmentation/segmentation.py\n--- a/torchvision/models/segmentation/segmentation.py\n+++ b/torchvision/models/segmentation/segmentation.py\n@@ -186,6 +186,8 @@\n raise NotImplementedError('This model does not use ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- a little problem when using some pretrained models ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> A little problem. I used some pretrained models to do object detection. How...
kornia__kornia-1761
[ { "content": "import warnings\nfrom abc import ABCMeta, abstractmethod\nfrom functools import partial\nfrom typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union, cast\n\nimport torch\nimport torch.nn as nn\nfrom torch import Tensor\n\nimport kornia # lazy loading for circular depende...
[ { "content": "import warnings\nfrom abc import ABCMeta, abstractmethod\nfrom functools import partial\nfrom typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union, cast\n\nimport torch\nimport torch.nn as nn\nfrom torch import Tensor\n\nimport kornia # lazy loading for circular depende...
diff --git a/kornia/augmentation/container/utils.py b/kornia/augmentation/container/utils.py index 7d4c1214cd..469f40a818 100644 --- a/kornia/augmentation/container/utils.py +++ b/kornia/augmentation/container/utils.py @@ -100,7 +100,7 @@ def apply_trans( # If any inputs need to be transformed. if m...
ValueError when applying flip augmentations to boxes ### Describe the bug Came across a strange bug while applying flip augmentations with bboxes. Running the below code snippet produces the following error some of the time. For reference my image is of shape `(B, C, H, W)` and my boxes are a list of length `B` ...
diff --git a/kornia/augmentation/container/utils.py b/kornia/augmentation/container/utils.py --- a/kornia/augmentation/container/utils.py +++ b/kornia/augmentation/container/utils.py @@ -100,7 +100,7 @@ # If any inputs need to be transformed. if mat is not None and to_apply is not None and to_apply....
{"golden_diff": "diff --git a/kornia/augmentation/container/utils.py b/kornia/augmentation/container/utils.py\n--- a/kornia/augmentation/container/utils.py\n+++ b/kornia/augmentation/container/utils.py\n@@ -100,7 +100,7 @@\n \n # If any inputs need to be transformed.\n if mat is not None and to_apply is...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ValueError when applying flip augmentations to boxes ### Describe the bug Came across a strange bug while applying flip augmentations with bboxes. Running the below code snippet produces the following erro...
sunpy__sunpy-2572
[ { "content": "from __future__ import absolute_import, division, print_function\nimport re\nfrom datetime import datetime, date, time, timedelta\n\nimport numpy as np\nimport pandas\nfrom sunpy.extern import six\n\nimport astropy.time\n\n__all__ = ['find_time', 'parse_time', 'is_time',\n 'day_of_year',...
[ { "content": "from __future__ import absolute_import, division, print_function\nimport re\nfrom datetime import datetime, date, time, timedelta\n\nimport numpy as np\nimport pandas\nfrom sunpy.extern import six\n\nimport astropy.time\n\n__all__ = ['find_time', 'parse_time', 'is_time',\n 'day_of_year',...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0b1b669208f..79b231f3e85 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -49,6 +49,7 @@ Bug Fixes - The documentation build now uses the Sphinx configuration from sphinx-astropy rather than from astropy-helpers.[#2494] - Migrate to hypothesis.strategies.datetimes [#2...
Pandas dataframe values return as numpy.datetime64 objects in local time zone. parse_time does not understand these objects. Came across this issue today when using a pandas DataFrame. When you explicitly ask for the values of the indices in a DataFrame, they can be returned as numpy.datetime64 objects. These time obj...
diff --git a/sunpy/time/time.py b/sunpy/time/time.py --- a/sunpy/time/time.py +++ b/sunpy/time/time.py @@ -129,8 +129,8 @@ """ Parse a single numpy datetime64 object """ - # Validate (in an agnostic way) that we are getting a datetime rather than a date - return datetime(*(dt.astype(datetime).timet...
{"golden_diff": "diff --git a/sunpy/time/time.py b/sunpy/time/time.py\n--- a/sunpy/time/time.py\n+++ b/sunpy/time/time.py\n@@ -129,8 +129,8 @@\n \"\"\"\n Parse a single numpy datetime64 object\n \"\"\"\n- # Validate (in an agnostic way) that we are getting a datetime rather than a date\n- return datet...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pandas dataframe values return as numpy.datetime64 objects in local time zone. parse_time does not understand these objects. Came across this issue today when using a pandas DataFrame. When you explicitly as...
django-cms__django-filer-1378
[ { "content": "from django.conf import settings\nfrom django.contrib.auth import models as auth_models\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models import Q\nfrom django.urls import reverse\nfrom django.utils.functional import cached_property\nfrom djan...
[ { "content": "from django.conf import settings\nfrom django.contrib.auth import models as auth_models\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models import Q\nfrom django.urls import reverse\nfrom django.utils.functional import cached_property\nfrom djan...
diff --git a/filer/models/foldermodels.py b/filer/models/foldermodels.py index a9c1e851e..54fa9c5a4 100644 --- a/filer/models/foldermodels.py +++ b/filer/models/foldermodels.py @@ -6,7 +6,7 @@ from django.urls import reverse from django.utils.functional import cached_property from django.utils.html import format_htm...
Field verbose_name should use gettext_lazy Hi, model field verbose_names should use gettext_lazy, because it creates migrations based on user language settings. https://github.com/django-cms/django-filer/blob/master/filer/models/foldermodels.py#L9 This is migration generated after upgrade to django-filer 3.0 ...
diff --git a/filer/models/foldermodels.py b/filer/models/foldermodels.py --- a/filer/models/foldermodels.py +++ b/filer/models/foldermodels.py @@ -6,7 +6,7 @@ from django.urls import reverse from django.utils.functional import cached_property from django.utils.html import format_html, format_html_join -from django.u...
{"golden_diff": "diff --git a/filer/models/foldermodels.py b/filer/models/foldermodels.py\n--- a/filer/models/foldermodels.py\n+++ b/filer/models/foldermodels.py\n@@ -6,7 +6,7 @@\n from django.urls import reverse\n from django.utils.functional import cached_property\n from django.utils.html import format_html, format_h...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Field verbose_name should use gettext_lazy Hi, model field verbose_names should use gettext_lazy, because it creates migrations based on user language settings. https://github.com/django-cms/django-file...
nonebot__nonebot2-561
[ { "content": "\"\"\"\nFastAPI 驱动适配\n================\n\n本驱动同时支持服务端以及客户端连接\n\n后端使用方法请参考: `FastAPI 文档`_\n\n.. _FastAPI 文档:\n https://fastapi.tiangolo.com/\n\"\"\"\n\nimport asyncio\nimport logging\nfrom dataclasses import dataclass\nfrom typing import List, Union, Callable, Optional, Awaitable, cast\n\nimport ...
[ { "content": "\"\"\"\nFastAPI 驱动适配\n================\n\n本驱动同时支持服务端以及客户端连接\n\n后端使用方法请参考: `FastAPI 文档`_\n\n.. _FastAPI 文档:\n https://fastapi.tiangolo.com/\n\"\"\"\n\nimport asyncio\nimport logging\nfrom dataclasses import dataclass\nfrom typing import List, Union, Callable, Optional, Awaitable, cast\n\nimport ...
diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py index 024df15ca367..00091f0f25fb 100644 --- a/nonebot/drivers/fastapi.py +++ b/nonebot/drivers/fastapi.py @@ -480,7 +480,7 @@ async def _ws_loop(self, setup: WEBSOCKET_SETUP): ) return - heade...
Bug: Nonebot2通过正向Websocket连接go-cqhttp报错400 **描述问题:** 在目前最新的Nonebot2的release中使用websocket与go-cqhttp进行连接会报错400。 这个问题仅出现在了Linux端上,在Win环境下并不会出现400错误(无论是go-cqhttp运行在linux还是win下)。 此问题已经在私下测试完成复现了很多次。 **如何复现?** 前提条件: - go-cqhttp已完成配置,连接协议为ws,host为127.0.0.1,port为6700,不启用access_token - 已完成安装nb-cli并安装nonebot-adapter-...
diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py --- a/nonebot/drivers/fastapi.py +++ b/nonebot/drivers/fastapi.py @@ -480,7 +480,7 @@ ) return - headers = {**setup_.headers, "host": url.netloc.decode("ascii")} + headers = set...
{"golden_diff": "diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py\n--- a/nonebot/drivers/fastapi.py\n+++ b/nonebot/drivers/fastapi.py\n@@ -480,7 +480,7 @@\n )\n return\n \n- headers = {**setup_.headers, \"host\": url.netloc.decode(\"ascii\")}\n+...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug: Nonebot2通过正向Websocket连接go-cqhttp报错400 **描述问题:** 在目前最新的Nonebot2的release中使用websocket与go-cqhttp进行连接会报错400。 这个问题仅出现在了Linux端上,在Win环境下并不会出现400错误(无论是go-cqhttp运行在linux还是win下)。 此问题已经在私下测试完成复现了很多次。 **如何复现?...
translate__pootle-6098
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\n\"\"\"Form fie...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\n\"\"\"Form fie...
diff --git a/pootle/apps/pootle_store/forms.py b/pootle/apps/pootle_store/forms.py index 3e0cbc62854..66de8219337 100644 --- a/pootle/apps/pootle_store/forms.py +++ b/pootle/apps/pootle_store/forms.py @@ -540,7 +540,7 @@ def clean_action(self): self.add_error( "action", fo...
String needs to use plural form Reported by @milupo in https://github.com/translate/pootle/issues/6061#issuecomment-284076850 There is one string more: templates/includes/formtable.html:27 Showing %(count)s results per page I know, percents are not used here.
diff --git a/pootle/apps/pootle_store/forms.py b/pootle/apps/pootle_store/forms.py --- a/pootle/apps/pootle_store/forms.py +++ b/pootle/apps/pootle_store/forms.py @@ -540,7 +540,7 @@ self.add_error( "action", forms.ValidationError( - _("Suggestion '%s' c...
{"golden_diff": "diff --git a/pootle/apps/pootle_store/forms.py b/pootle/apps/pootle_store/forms.py\n--- a/pootle/apps/pootle_store/forms.py\n+++ b/pootle/apps/pootle_store/forms.py\n@@ -540,7 +540,7 @@\n self.add_error(\n \"action\",\n forms.ValidationError(\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- String needs to use plural form Reported by @milupo in https://github.com/translate/pootle/issues/6061#issuecomment-284076850 There is one string more: templates/includes/formtable.html:27 Showing %(co...
celery__celery-3997
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Configuration introspection and defaults.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\nimport sys\nfrom collections import deque, namedtuple\nfrom datetime import timedelta\nfrom celery.five import items, keys, python_2_unicode_compatible\nfrom ce...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Configuration introspection and defaults.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\nimport sys\nfrom collections import deque, namedtuple\nfrom datetime import timedelta\nfrom celery.five import items, keys, python_2_unicode_compatible\nfrom ce...
diff --git a/celery/app/defaults.py b/celery/app/defaults.py index 393f33ce4a6..c517dee66ad 100644 --- a/celery/app/defaults.py +++ b/celery/app/defaults.py @@ -285,7 +285,7 @@ def __repr__(self): 'WARNING', old={'celery_redirect_stdouts_level'}, ), send_task_events=Option( - F...
Request on_timeout should ignore soft time limit exception When Request.on_timeout receive a soft timeout from billiard, it does the same as if it was receiving a hard time limit exception. This is ran by the controller. But the task may catch this exception and eg. return (this is what soft timeout are for). Thi...
diff --git a/celery/app/defaults.py b/celery/app/defaults.py --- a/celery/app/defaults.py +++ b/celery/app/defaults.py @@ -285,7 +285,7 @@ 'WARNING', old={'celery_redirect_stdouts_level'}, ), send_task_events=Option( - False, type='bool', old={'celeryd_send_events'}, + ...
{"golden_diff": "diff --git a/celery/app/defaults.py b/celery/app/defaults.py\n--- a/celery/app/defaults.py\n+++ b/celery/app/defaults.py\n@@ -285,7 +285,7 @@\n 'WARNING', old={'celery_redirect_stdouts_level'},\n ),\n send_task_events=Option(\n- False, type='bool', old={'celeryd_s...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Request on_timeout should ignore soft time limit exception When Request.on_timeout receive a soft timeout from billiard, it does the same as if it was receiving a hard time limit exception. This is ran by the...
ivy-llc__ivy-19405
[ { "content": "# global\nimport ivy\nimport ivy.functional.frontends.tensorflow as tf_frontend\nfrom ivy.functional.frontends.tensorflow import check_tensorflow_casting\nfrom ivy.functional.frontends.tensorflow.func_wrapper import (\n to_ivy_arrays_and_back,\n map_raw_ops_alias,\n to_ivy_dtype,\n)\n\nfr...
[ { "content": "# global\nimport ivy\nimport ivy.functional.frontends.tensorflow as tf_frontend\nfrom ivy.functional.frontends.tensorflow import check_tensorflow_casting\nfrom ivy.functional.frontends.tensorflow.func_wrapper import (\n to_ivy_arrays_and_back,\n map_raw_ops_alias,\n to_ivy_dtype,\n)\n\nfr...
diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py index 6fe128efe0437..1bbf9d82ab839 100644 --- a/ivy/functional/frontends/tensorflow/raw_ops.py +++ b/ivy/functional/frontends/tensorflow/raw_ops.py @@ -920,3 +920,22 @@ def Svd(*, input, full_matrices=False, com...
Einsum
diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py --- a/ivy/functional/frontends/tensorflow/raw_ops.py +++ b/ivy/functional/frontends/tensorflow/raw_ops.py @@ -920,3 +920,22 @@ "complex128", ), } + + +Einsum = to_ivy_arrays_and_back( + with_su...
{"golden_diff": "diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py\n--- a/ivy/functional/frontends/tensorflow/raw_ops.py\n+++ b/ivy/functional/frontends/tensorflow/raw_ops.py\n@@ -920,3 +920,22 @@\n \"complex128\",\n ),\n }\n+\n+\n+Einsum = to_ivy_a...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Einsum --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `ivy/functional/frontends/tensorflow/raw_ops.py` Con...
jazzband__django-oauth-toolkit-948
[ { "content": "import base64\nimport binascii\nimport http.client\nimport json\nimport logging\nimport uuid\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom urllib.parse import unquote_plus\n\nimport requests\nfrom django.conf import settings\nfrom django.contrib.auth import a...
[ { "content": "import base64\nimport binascii\nimport http.client\nimport json\nimport logging\nimport uuid\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom urllib.parse import unquote_plus\n\nimport requests\nfrom django.conf import settings\nfrom django.contrib.auth import a...
diff --git a/AUTHORS b/AUTHORS index da2570ef7..a81fed695 100644 --- a/AUTHORS +++ b/AUTHORS @@ -46,5 +46,7 @@ Spencer Carroll Stéphane Raimbault Tom Evans Will Beaufoy +Rustem Saiargaliev +Jadiel Teófilo pySilver Łukasz Skarżyński diff --git a/CHANGELOG.md b/CHANGELOG.md index 534ba1c86..660ebefb7 100644 --- a/CH...
Token introspection always uses time-zone-aware datetimes Hi, I'm attempting to use the new token introspection and ran into a bit of a snag. Our app is using USE_TZ=False, which results in the following: ``` File "lib/python3.6/site-packages/rest_framework/views.py", line 489, in dispatch response = sel...
diff --git a/oauth2_provider/oauth2_validators.py b/oauth2_provider/oauth2_validators.py --- a/oauth2_provider/oauth2_validators.py +++ b/oauth2_provider/oauth2_validators.py @@ -357,7 +357,7 @@ expires = max_caching_time scope = content.get("scope", "") - expires = make_aware...
{"golden_diff": "diff --git a/oauth2_provider/oauth2_validators.py b/oauth2_provider/oauth2_validators.py\n--- a/oauth2_provider/oauth2_validators.py\n+++ b/oauth2_provider/oauth2_validators.py\n@@ -357,7 +357,7 @@\n expires = max_caching_time\n \n scope = content.get(\"scope\", \"\")\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Token introspection always uses time-zone-aware datetimes Hi, I'm attempting to use the new token introspection and ran into a bit of a snag. Our app is using USE_TZ=False, which results in the following:...
mitmproxy__mitmproxy-1463
[ { "content": "from __future__ import absolute_import, print_function, division\n\nimport base64\nimport collections\nimport os\nimport re\nfrom netlib import strutils\n\nimport six\nfrom OpenSSL import SSL, crypto\n\nfrom mitmproxy import exceptions\nfrom netlib import certutils\nfrom netlib import tcp\nfrom ne...
[ { "content": "from __future__ import absolute_import, print_function, division\n\nimport base64\nimport collections\nimport os\nimport re\nfrom netlib import strutils\n\nimport six\nfrom OpenSSL import SSL, crypto\n\nfrom mitmproxy import exceptions\nfrom netlib import certutils\nfrom netlib import tcp\nfrom ne...
diff --git a/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py index cf75830a5e..604045a4f3 100644 --- a/mitmproxy/proxy/config.py +++ b/mitmproxy/proxy/config.py @@ -78,6 +78,7 @@ def __init__(self, options): self.check_tcp = None self.certstore = None self.clientcerts = None + se...
Can't view options ##### Steps to reproduce the problem: 1. `mitmproxy` 2. Press `o` ##### What is the expected behavior? No Crash! ##### What went wrong? mitmproxy crashed! ``` ~/dev/mitmproxy (master) > env/bin/mitmproxy ...
diff --git a/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py --- a/mitmproxy/proxy/config.py +++ b/mitmproxy/proxy/config.py @@ -78,6 +78,7 @@ self.check_tcp = None self.certstore = None self.clientcerts = None + self.ssl_insecure = False self.openssl_verification_mode_s...
{"golden_diff": "diff --git a/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py\n--- a/mitmproxy/proxy/config.py\n+++ b/mitmproxy/proxy/config.py\n@@ -78,6 +78,7 @@\n self.check_tcp = None\n self.certstore = None\n self.clientcerts = None\n+ self.ssl_insecure = False\n self.op...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Can't view options ##### Steps to reproduce the problem: 1. `mitmproxy` 2. Press `o` ##### What is the expected behavior? No Crash! ##### What went wrong? mitmproxy crashed! ``` ~/dev/mitmproxy (master) > ...
cisagov__manage.get.gov-963
[ { "content": "import logging\n\nfrom datetime import date\nfrom string import digits\nfrom django_fsm import FSMField # type: ignore\n\nfrom django.db import models\n\nfrom epplibwrapper import (\n CLIENT as registry,\n commands,\n common as epp,\n RegistryError,\n ErrorCode,\n)\n\nfrom .utility...
[ { "content": "import logging\n\nfrom datetime import date\nfrom string import digits\nfrom django_fsm import FSMField # type: ignore\n\nfrom django.db import models\n\nfrom epplibwrapper import (\n CLIENT as registry,\n commands,\n common as epp,\n RegistryError,\n ErrorCode,\n)\n\nfrom .utility...
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py index a7e46f888..59563d3d8 100644 --- a/src/registrar/models/domain.py +++ b/src/registrar/models/domain.py @@ -338,6 +338,9 @@ def __str__(self) -> str: help_text="Very basic info about the lifecycle of this domain object", ) ...
Implement (isActive) ### Issue Description Requires #851 isActive will return true if the domain has a state of CREATED Note: check the domain status ### Additional Context (optional) separate function b/c we might check if this is live on the internet. This will be used when check if an approved domai...
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py --- a/src/registrar/models/domain.py +++ b/src/registrar/models/domain.py @@ -338,6 +338,9 @@ help_text="Very basic info about the lifecycle of this domain object", ) + def isActive(self): + return self.state == Domai...
{"golden_diff": "diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py\n--- a/src/registrar/models/domain.py\n+++ b/src/registrar/models/domain.py\n@@ -338,6 +338,9 @@\n help_text=\"Very basic info about the lifecycle of this domain object\",\n )\n \n+ def isActive(self):\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Implement (isActive) ### Issue Description Requires #851 isActive will return true if the domain has a state of CREATED Note: check the domain status ### Additional Context (optional) separate fun...
deepset-ai__haystack-7086
[ { "content": "# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>\n#\n# SPDX-License-Identifier: Apache-2.0\nimport base64\nimport logging\n\nimport networkx # type:ignore\nimport requests\n\nfrom haystack.core.errors import PipelineDrawingError\nfrom haystack.core.pipeline.descriptions impor...
[ { "content": "# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>\n#\n# SPDX-License-Identifier: Apache-2.0\nimport base64\nimport logging\n\nimport networkx # type:ignore\nimport requests\n\nfrom haystack.core.errors import PipelineDrawingError\nfrom haystack.core.pipeline.descriptions impor...
diff --git a/haystack/core/pipeline/draw.py b/haystack/core/pipeline/draw.py index d96e6ecc25..e7d22e441d 100644 --- a/haystack/core/pipeline/draw.py +++ b/haystack/core/pipeline/draw.py @@ -70,7 +70,7 @@ def _to_mermaid_image(graph: networkx.MultiDiGraph): graphbytes = graph_styled.encode("ascii") base64_byt...
Pipeline drawings in Colab have black background **Describe the bug** Since Haystack 2.0-beta8, Pipeline drawings in Colab and other environments (VS Code/Pycharm) randomly have a black background. ![image](https://github.com/deepset-ai/haystack/assets/44616784/0869599a-14b5-4aed-9e96-a8b09d83658a) These images...
diff --git a/haystack/core/pipeline/draw.py b/haystack/core/pipeline/draw.py --- a/haystack/core/pipeline/draw.py +++ b/haystack/core/pipeline/draw.py @@ -70,7 +70,7 @@ graphbytes = graph_styled.encode("ascii") base64_bytes = base64.b64encode(graphbytes) base64_string = base64_bytes.decode("ascii") - ...
{"golden_diff": "diff --git a/haystack/core/pipeline/draw.py b/haystack/core/pipeline/draw.py\n--- a/haystack/core/pipeline/draw.py\n+++ b/haystack/core/pipeline/draw.py\n@@ -70,7 +70,7 @@\n graphbytes = graph_styled.encode(\"ascii\")\n base64_bytes = base64.b64encode(graphbytes)\n base64_string = base64_by...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pipeline drawings in Colab have black background **Describe the bug** Since Haystack 2.0-beta8, Pipeline drawings in Colab and other environments (VS Code/Pycharm) randomly have a black background. ![ima...
facebookresearch__ParlAI-1447
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nimport torch\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport numpy as np...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nimport torch\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport numpy as np...
diff --git a/parlai/agents/drqa/model.py b/parlai/agents/drqa/model.py index e5dc335d727..fc986c0fcd8 100644 --- a/parlai/agents/drqa/model.py +++ b/parlai/agents/drqa/model.py @@ -99,7 +99,7 @@ def update(self, ex): # Compute loss and accuracies loss = F.nll_loss(score_s, target_s) + F.nll_loss(sco...
Error when running DrQA PyTorch 1.0.0 When running the basic example on SQUAD ```python examples/train_model.py -m drqa -t squad -bs 32``` Throwing this. ```[ training... ] /content/DuReader/data/ParlAI/parlai/agents/drqa/layers.py:177: UserWarning: Implicit dimension choice for softmax has been deprecated. Chang...
diff --git a/parlai/agents/drqa/model.py b/parlai/agents/drqa/model.py --- a/parlai/agents/drqa/model.py +++ b/parlai/agents/drqa/model.py @@ -99,7 +99,7 @@ # Compute loss and accuracies loss = F.nll_loss(score_s, target_s) + F.nll_loss(score_e, target_e) - self.train_loss.update(loss.data[0]...
{"golden_diff": "diff --git a/parlai/agents/drqa/model.py b/parlai/agents/drqa/model.py\n--- a/parlai/agents/drqa/model.py\n+++ b/parlai/agents/drqa/model.py\n@@ -99,7 +99,7 @@\n \n # Compute loss and accuracies\n loss = F.nll_loss(score_s, target_s) + F.nll_loss(score_e, target_e)\n- self.train_...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error when running DrQA PyTorch 1.0.0 When running the basic example on SQUAD ```python examples/train_model.py -m drqa -t squad -bs 32``` Throwing this. ```[ training... ] /content/DuReader/data/ParlAI...
svthalia__concrexit-1036
[ { "content": "from django.conf import settings\nfrom django.templatetags.static import static\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.html import strip_tags, strip_spaces_between_tags\nfrom html import unescape\nfrom rest_framework import serializers\nfrom rest_fra...
[ { "content": "from django.conf import settings\nfrom django.templatetags.static import static\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.html import strip_tags, strip_spaces_between_tags\nfrom html import unescape\nfrom rest_framework import serializers\nfrom rest_fra...
diff --git a/website/events/api/serializers.py b/website/events/api/serializers.py index e6e363598..9221a2bc1 100644 --- a/website/events/api/serializers.py +++ b/website/events/api/serializers.py @@ -83,7 +83,9 @@ def _url(self, instance): def _class_names(self, instance): class_names = ["regular-event...
AttributeError: 'NoneType' object has no attribute 'is_authenticated' In GitLab by _thaliatechnicie on Mar 11, 2020, 23:02 Sentry Issue: [CONCREXIT-2A](https://sentry.io/organizations/thalia/issues/1560438241/?referrer=gitlab_integration) ``` AttributeError: 'NoneType' object has no attribute 'is_authenticated' (14 a...
diff --git a/website/events/api/serializers.py b/website/events/api/serializers.py --- a/website/events/api/serializers.py +++ b/website/events/api/serializers.py @@ -83,7 +83,9 @@ def _class_names(self, instance): class_names = ["regular-event"] - if services.is_user_registered(self.context["mem...
{"golden_diff": "diff --git a/website/events/api/serializers.py b/website/events/api/serializers.py\n--- a/website/events/api/serializers.py\n+++ b/website/events/api/serializers.py\n@@ -83,7 +83,9 @@\n \n def _class_names(self, instance):\n class_names = [\"regular-event\"]\n- if services.is_user_re...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- AttributeError: 'NoneType' object has no attribute 'is_authenticated' In GitLab by _thaliatechnicie on Mar 11, 2020, 23:02 Sentry Issue: [CONCREXIT-2A](https://sentry.io/organizations/thalia/issues/156043824...
kivy__kivy-2714
[ { "content": "'''Scroll View\n===========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n\nScrolling Behavior\n------------------\n\nThe ScrollView accepts only one child and applies a viewport/window to\...
[ { "content": "'''Scroll View\n===========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n\nScrolling Behavior\n------------------\n\nThe ScrollView accepts only one child and applies a viewport/window to\...
diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py index 05a694b0fc..4012bddab0 100644 --- a/kivy/uix/scrollview.py +++ b/kivy/uix/scrollview.py @@ -669,6 +669,9 @@ def on_touch_move(self, touch): if touch.grab_current is not self: return True + if not (self.do_scroll_y or self....
Scatter crash on windows I just tested BETA-1 with showcase, and when i tried to move the cat: ``` running "python.exe C:\Users\tito\Desktop\Kivy-1.9.0-dev-py3.3-win32\kivy\exampl es\demo\showcase\main.py" \n [INFO ] [Logger ] Record log in C:\Users\tito\.kivy\logs\kivy_ 14-09-21_2.txt [INFO ...
diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py --- a/kivy/uix/scrollview.py +++ b/kivy/uix/scrollview.py @@ -669,6 +669,9 @@ if touch.grab_current is not self: return True + if not (self.do_scroll_y or self.do_scroll_x): + return super(ScrollView, self).on_touch_m...
{"golden_diff": "diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py\n--- a/kivy/uix/scrollview.py\n+++ b/kivy/uix/scrollview.py\n@@ -669,6 +669,9 @@\n if touch.grab_current is not self:\n return True\n \n+ if not (self.do_scroll_y or self.do_scroll_x):\n+ return super(Scr...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Scatter crash on windows I just tested BETA-1 with showcase, and when i tried to move the cat: ``` running "python.exe C:\Users\tito\Desktop\Kivy-1.9.0-dev-py3.3-win32\kivy\exampl es\demo\showcase\main.py" \...
kivy__kivy-7383
[ { "content": "'''\nDrop-Down List\n==============\n\n.. image:: images/dropdown.gif\n :align: right\n\n.. versionadded:: 1.4.0\n\nA versatile drop-down list that can be used with custom widgets. It allows you\nto display a list of widgets under a displayed widget. Unlike other toolkits,\nthe list of widgets ...
[ { "content": "'''\nDrop-Down List\n==============\n\n.. image:: images/dropdown.gif\n :align: right\n\n.. versionadded:: 1.4.0\n\nA versatile drop-down list that can be used with custom widgets. It allows you\nto display a list of widgets under a displayed widget. Unlike other toolkits,\nthe list of widgets ...
diff --git a/kivy/uix/dropdown.py b/kivy/uix/dropdown.py index 229780a8d7..42d58b3bdd 100644 --- a/kivy/uix/dropdown.py +++ b/kivy/uix/dropdown.py @@ -321,7 +321,7 @@ def _reposition(self, *largs): # coordinate system win = self._win widget = self.attach_to - if not widget or not win: ...
Dropdown opening from data item in RecycleView is jumping down at refresh of RV-data/-layout **Software Versions** * Python: 3.6.9 * OS: Ubuntu 18.04 * Kivy: 2.0.0 * Kivy installation method: pip A `Dropdown` attached to a `data` item of a `RecycleView` (RV) is jumping down and up if `data` of the `RecycleView` ...
diff --git a/kivy/uix/dropdown.py b/kivy/uix/dropdown.py --- a/kivy/uix/dropdown.py +++ b/kivy/uix/dropdown.py @@ -321,7 +321,7 @@ # coordinate system win = self._win widget = self.attach_to - if not widget or not win: + if not widget or not widget.parent or not win: ...
{"golden_diff": "diff --git a/kivy/uix/dropdown.py b/kivy/uix/dropdown.py\n--- a/kivy/uix/dropdown.py\n+++ b/kivy/uix/dropdown.py\n@@ -321,7 +321,7 @@\n # coordinate system\n win = self._win\n widget = self.attach_to\n- if not widget or not win:\n+ if not widget or not widget.paren...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dropdown opening from data item in RecycleView is jumping down at refresh of RV-data/-layout **Software Versions** * Python: 3.6.9 * OS: Ubuntu 18.04 * Kivy: 2.0.0 * Kivy installation method: pip A `Dr...
ipython__ipython-3901
[ { "content": "\"\"\"\nContains writer for writing nbconvert output to filesystem.\n\"\"\"\n#-----------------------------------------------------------------------------\n#Copyright (c) 2013, the IPython Development Team.\n#\n#Distributed under the terms of the Modified BSD License.\n#\n#The full license is in ...
[ { "content": "\"\"\"\nContains writer for writing nbconvert output to filesystem.\n\"\"\"\n#-----------------------------------------------------------------------------\n#Copyright (c) 2013, the IPython Development Team.\n#\n#Distributed under the terms of the Modified BSD License.\n#\n#The full license is in ...
diff --git a/IPython/nbconvert/writers/files.py b/IPython/nbconvert/writers/files.py index 440ccfe7760..c3d2656288a 100644 --- a/IPython/nbconvert/writers/files.py +++ b/IPython/nbconvert/writers/files.py @@ -30,7 +30,7 @@ class FilesWriter(WriterBase): """Consumes nbconvert output and produces files.""" - ...
under Windows, "ipython3 nbconvert "C:/blabla/first_try.ipynb" --to latex --post PDF" POST processing action fails because of a bad parameter Hello, The "one single step" option to create a ".pdf" from a .ipynb" fails on my windows python3 pc Nbconvert apparently tries compile ".TEX" result with "pdflatex .\fir...
diff --git a/IPython/nbconvert/writers/files.py b/IPython/nbconvert/writers/files.py --- a/IPython/nbconvert/writers/files.py +++ b/IPython/nbconvert/writers/files.py @@ -30,7 +30,7 @@ """Consumes nbconvert output and produces files.""" - build_directory = Unicode(".", config=True, + build_directory = U...
{"golden_diff": "diff --git a/IPython/nbconvert/writers/files.py b/IPython/nbconvert/writers/files.py\n--- a/IPython/nbconvert/writers/files.py\n+++ b/IPython/nbconvert/writers/files.py\n@@ -30,7 +30,7 @@\n \"\"\"Consumes nbconvert output and produces files.\"\"\"\n \n \n- build_directory = Unicode(\".\", config...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- under Windows, "ipython3 nbconvert "C:/blabla/first_try.ipynb" --to latex --post PDF" POST processing action fails because of a bad parameter Hello, The "one single step" option to create a ".pdf" from a .ip...
pymedusa__Medusa-3813
[ { "content": "# coding=utf-8\n\n\"\"\"Base class for indexer api's.\"\"\"\n\nfrom __future__ import division\n\nimport getpass\nimport logging\nimport os\nimport tempfile\nimport time\nimport warnings\nfrom operator import itemgetter\n\nfrom medusa import statistics as stats\nfrom medusa.helpers.utils import ge...
[ { "content": "# coding=utf-8\n\n\"\"\"Base class for indexer api's.\"\"\"\n\nfrom __future__ import division\n\nimport getpass\nimport logging\nimport os\nimport tempfile\nimport time\nimport warnings\nfrom operator import itemgetter\n\nfrom medusa import statistics as stats\nfrom medusa.helpers.utils import ge...
diff --git a/medusa/indexers/indexer_base.py b/medusa/indexers/indexer_base.py index 7d36e6de05..acd6db5045 100644 --- a/medusa/indexers/indexer_base.py +++ b/medusa/indexers/indexer_base.py @@ -327,7 +327,7 @@ def format_result(item): if item[0] >= best_result[0] ] if len(best_results) >...
Unnecessary warning for "Multiple posters at highest weighted score" I get these "Multiple posters at highest weighted score" warnings too often, and they are a nuisance since they are not important enough to worry about. Should be demoted to a level where it does not show up in the GUI as a warning. 2018-02-26 1...
diff --git a/medusa/indexers/indexer_base.py b/medusa/indexers/indexer_base.py --- a/medusa/indexers/indexer_base.py +++ b/medusa/indexers/indexer_base.py @@ -327,7 +327,7 @@ if item[0] >= best_result[0] ] if len(best_results) > 1: - log.warning( + log.debug( ...
{"golden_diff": "diff --git a/medusa/indexers/indexer_base.py b/medusa/indexers/indexer_base.py\n--- a/medusa/indexers/indexer_base.py\n+++ b/medusa/indexers/indexer_base.py\n@@ -327,7 +327,7 @@\n if item[0] >= best_result[0]\n ]\n if len(best_results) > 1:\n- log.warning(\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Unnecessary warning for "Multiple posters at highest weighted score" I get these "Multiple posters at highest weighted score" warnings too often, and they are a nuisance since they are not important enough to...
PennyLaneAI__pennylane-3856
[ { "content": "# Copyright 2018-2022 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle...
[ { "content": "# Copyright 2018-2022 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 120969760d6..77a198d5dd7 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -36,6 +36,9 @@ <h3>Bug fixes</h3> +* Ensure that `qml.data.load` returns datasets in a stable and expected order. + [(#3856)](...
[Bug] Inconsistent ordering in datasets for lists of parameters The ordering of lists of datasets when passed lists of parameters is of no canonical ordering, but appears to be random: ```python bondlengths = ['0.5', '0.54', '0.58', '0.62'] data = qml.data.load("qchem", molname="H2", basis="STO-3G", bondlength=bon...
diff --git a/pennylane/data/data_manager.py b/pennylane/data/data_manager.py --- a/pennylane/data/data_manager.py +++ b/pennylane/data/data_manager.py @@ -197,7 +197,11 @@ """ next_folders = folders[1:] - folders = set(node) if folders[0] == ["full"] else set(folders[0]).intersection(set(node)) + if f...
{"golden_diff": "diff --git a/pennylane/data/data_manager.py b/pennylane/data/data_manager.py\n--- a/pennylane/data/data_manager.py\n+++ b/pennylane/data/data_manager.py\n@@ -197,7 +197,11 @@\n \"\"\"\n \n next_folders = folders[1:]\n- folders = set(node) if folders[0] == [\"full\"] else set(folders[0]).inte...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Bug] Inconsistent ordering in datasets for lists of parameters The ordering of lists of datasets when passed lists of parameters is of no canonical ordering, but appears to be random: ```python bondlengt...
ivy-llc__ivy-18274
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\...
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\...
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py index 287c24fab9740..02ab5a09bc555 100644 --- a/ivy/functional/frontends/paddle/tensor/math.py +++ b/ivy/functional/frontends/paddle/tensor/math.py @@ -398,3 +398,11 @@ def prod(x, axis=None, keepdim=False, dtyp...
diff
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py --- a/ivy/functional/frontends/paddle/tensor/math.py +++ b/ivy/functional/frontends/paddle/tensor/math.py @@ -398,3 +398,11 @@ @to_ivy_arrays_and_back def any(x, axis=None, keepdim=False, name=None): retu...
{"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py\n--- a/ivy/functional/frontends/paddle/tensor/math.py\n+++ b/ivy/functional/frontends/paddle/tensor/math.py\n@@ -398,3 +398,11 @@\n @to_ivy_arrays_and_back\n def any(x, axis=None, keepdim=False,...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- diff --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `ivy/functional/frontends/paddle/tensor/math.py` Conte...
bokeh__bokeh-1923
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nIn this example, we want to show you how you can take isolated blocks of code\n(featuring different kinds of Bokeh visualizations) and rearrange them in a\nbigger (encompassing) flask-based application without losing the independence\nof each example. This is the r...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nIn this example, we want to show you how you can take isolated blocks of code\n(featuring different kinds of Bokeh visualizations) and rearrange them in a\nbigger (encompassing) flask-based application without losing the independence\nof each example. This is the r...
diff --git a/examples/embed/slideshow/app_reveal.py b/examples/embed/slideshow/app_reveal.py index b53826488f7..c7182fa5945 100644 --- a/examples/embed/slideshow/app_reveal.py +++ b/examples/embed/slideshow/app_reveal.py @@ -16,8 +16,7 @@ from bokeh.embed import autoload_server from bokeh.models import GlyphRendere...
app_reveal fails importing old plotting stuff ``` (py34devel)[damian@damian-S400CA][slideshow](master)$ python app_reveal.py Traceback (most recent call last): File "app_reveal.py", line 19, in <module> from bokeh.plotting import (annular_wedge, cursession, figure, hold, legend, ImportError: cannot import name '...
diff --git a/examples/embed/slideshow/app_reveal.py b/examples/embed/slideshow/app_reveal.py --- a/examples/embed/slideshow/app_reveal.py +++ b/examples/embed/slideshow/app_reveal.py @@ -16,8 +16,7 @@ from bokeh.embed import autoload_server from bokeh.models import GlyphRenderer -from bokeh.plotting import (annular...
{"golden_diff": "diff --git a/examples/embed/slideshow/app_reveal.py b/examples/embed/slideshow/app_reveal.py\n--- a/examples/embed/slideshow/app_reveal.py\n+++ b/examples/embed/slideshow/app_reveal.py\n@@ -16,8 +16,7 @@\n \n from bokeh.embed import autoload_server\n from bokeh.models import GlyphRenderer\n-from bokeh....
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- app_reveal fails importing old plotting stuff ``` (py34devel)[damian@damian-S400CA][slideshow](master)$ python app_reveal.py Traceback (most recent call last): File "app_reveal.py", line 19, in <module> ...
liqd__a4-product-66
[ { "content": "\"\"\"Django settings for _LIQD_PRODUCT_.\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nCONFIG_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nPROJECT_DIR = os.path.dirname(CONFIG_DIR)\nBASE_DIR = os.path.dirname(PROJECT_DIR)\n\n#...
[ { "content": "\"\"\"Django settings for _LIQD_PRODUCT_.\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nCONFIG_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nPROJECT_DIR = os.path.dirname(CONFIG_DIR)\nBASE_DIR = os.path.dirname(PROJECT_DIR)\n\n#...
diff --git a/liqd_product/assets/js/app.js b/liqd_product/assets/js/app.js index e75a13087..b9a355732 100644 --- a/liqd_product/assets/js/app.js +++ b/liqd_product/assets/js/app.js @@ -5,16 +5,8 @@ var $ = window.jQuery = window.$ = require('jquery') window.Tether = require('tether/dist/js/tether.js') -// social sh...
Internal server error when editing poll question Internal server error when editing poll question in creating poll in dashboard
diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py --- a/liqd_product/config/settings/base.py +++ b/liqd_product/config/settings/base.py @@ -49,6 +49,7 @@ 'adhocracy4.projects.apps.ProjectsConfig', 'adhocracy4.ratings.apps.RatingsConfig', 'adhocracy4.reports.apps.Rep...
{"golden_diff": "diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py\n--- a/liqd_product/config/settings/base.py\n+++ b/liqd_product/config/settings/base.py\n@@ -49,6 +49,7 @@\n 'adhocracy4.projects.apps.ProjectsConfig',\n 'adhocracy4.ratings.apps.RatingsConfig',\n 'adho...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Internal server error when editing poll question Internal server error when editing poll question in creating poll in dashboard --- END ISSUE --- Below are some code segments, each from a relevant file. One...
ckan__ckan-4657
[ { "content": "# encoding: utf-8\n\nimport os\nimport re\n\nfrom pylons.wsgiapp import PylonsApp\n\nfrom beaker.middleware import CacheMiddleware, SessionMiddleware\nfrom paste.cascade import Cascade\nfrom paste.registry import RegistryManager\nfrom paste.urlparser import StaticURLParser\nfrom paste.deploy.conve...
[ { "content": "# encoding: utf-8\n\nimport os\nimport re\n\nfrom pylons.wsgiapp import PylonsApp\n\nfrom beaker.middleware import CacheMiddleware, SessionMiddleware\nfrom paste.cascade import Cascade\nfrom paste.registry import RegistryManager\nfrom paste.urlparser import StaticURLParser\nfrom paste.deploy.conve...
diff --git a/ckan/config/middleware/pylons_app.py b/ckan/config/middleware/pylons_app.py index 73b714509a7..c9fb2ed8f9a 100644 --- a/ckan/config/middleware/pylons_app.py +++ b/ckan/config/middleware/pylons_app.py @@ -138,10 +138,7 @@ def make_pylons_stack(conf, full_stack=True, static_files=True, ) # Establ...
exception after upgrade to 2.8.1 - Popped wrong app context After upgrade from 2.7 to 2.8.1 - I'm seeing some exceptions in a production server log, couldn't reproduce the error locally ### CKAN Version if known (or site URL) 2.8.1 ### Please describe the expected behaviour no exception (or less cryptic excepti...
diff --git a/ckan/config/middleware/pylons_app.py b/ckan/config/middleware/pylons_app.py --- a/ckan/config/middleware/pylons_app.py +++ b/ckan/config/middleware/pylons_app.py @@ -138,10 +138,7 @@ ) # Establish the Registry for this application - # The RegistryManager includes code to pop - # registry ...
{"golden_diff": "diff --git a/ckan/config/middleware/pylons_app.py b/ckan/config/middleware/pylons_app.py\n--- a/ckan/config/middleware/pylons_app.py\n+++ b/ckan/config/middleware/pylons_app.py\n@@ -138,10 +138,7 @@\n )\n \n # Establish the Registry for this application\n- # The RegistryManager includes code...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- exception after upgrade to 2.8.1 - Popped wrong app context After upgrade from 2.7 to 2.8.1 - I'm seeing some exceptions in a production server log, couldn't reproduce the error locally ### CKAN Version if...
googleapis__google-cloud-python-2094
[ { "content": "# Copyright 2016 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
[ { "content": "# Copyright 2016 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
diff --git a/gcloud/logging/_gax.py b/gcloud/logging/_gax.py index 5b70e2abf61a..b4be46e68879 100644 --- a/gcloud/logging/_gax.py +++ b/gcloud/logging/_gax.py @@ -120,7 +120,12 @@ def logger_delete(self, project, logger_name): """ options = None path = 'projects/%s/logs/%s' % (project, logger...
Logging system tests: gRPC/GaxError for 'NotFound' in tearDown / logger.delete From: https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/151551907#L647-L675 ``` python ====================================================================== ERROR: test_log_struct_w_metadata (logging_.TestLogging) -----------...
diff --git a/gcloud/logging/_gax.py b/gcloud/logging/_gax.py --- a/gcloud/logging/_gax.py +++ b/gcloud/logging/_gax.py @@ -120,7 +120,12 @@ """ options = None path = 'projects/%s/logs/%s' % (project, logger_name) - self._gax_api.delete_log(path, options) + try: + self...
{"golden_diff": "diff --git a/gcloud/logging/_gax.py b/gcloud/logging/_gax.py\n--- a/gcloud/logging/_gax.py\n+++ b/gcloud/logging/_gax.py\n@@ -120,7 +120,12 @@\n \"\"\"\n options = None\n path = 'projects/%s/logs/%s' % (project, logger_name)\n- self._gax_api.delete_log(path, options)\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Logging system tests: gRPC/GaxError for 'NotFound' in tearDown / logger.delete From: https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/151551907#L647-L675 ``` python ===========================...
joke2k__faker-1743
[ { "content": "from collections import OrderedDict\nfrom typing import Optional\n\nfrom ..en import Provider as AddressProvider\n\n\nclass Provider(AddressProvider):\n city_prefixes = (\"North\", \"East\", \"West\", \"South\", \"New\", \"Lake\", \"Port\")\n\n city_suffixes = (\n \"town\",\n \...
[ { "content": "from collections import OrderedDict\nfrom typing import Optional\n\nfrom ..en import Provider as AddressProvider\n\n\nclass Provider(AddressProvider):\n city_prefixes = (\"North\", \"East\", \"West\", \"South\", \"New\", \"Lake\", \"Port\")\n\n city_suffixes = (\n \"town\",\n \...
diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py index 82c1cac011..4242e781be 100644 --- a/faker/providers/address/en_US/__init__.py +++ b/faker/providers/address/en_US/__init__.py @@ -493,7 +493,7 @@ def state_abbr(self, include_territories: bool = True) -> str: ...
Missing return in faker-master\faker\providers\address\en_US\__init__.py * Faker version: current * OS: Windows 10 x64 Brief summary of the issue goes here. Missing return on row 496 (def state_abbr(self, include_territories: bool = True) -> str:) ### Steps to reproduce 1. invoke state_abbr() 2. check the o...
diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py --- a/faker/providers/address/en_US/__init__.py +++ b/faker/providers/address/en_US/__init__.py @@ -493,7 +493,7 @@ If False, only states will be returned. """ if include_territories: - ...
{"golden_diff": "diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py\n--- a/faker/providers/address/en_US/__init__.py\n+++ b/faker/providers/address/en_US/__init__.py\n@@ -493,7 +493,7 @@\n If False, only states will be returned.\n \"\"\"\n if i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Missing return in faker-master\faker\providers\address\en_US\__init__.py * Faker version: current * OS: Windows 10 x64 Brief summary of the issue goes here. Missing return on row 496 (def state_abbr(self...
alltheplaces__alltheplaces-5886
[ { "content": "import chompjs\nfrom scrapy import Spider\n\nfrom locations.categories import Categories, apply_category, apply_yes_no\nfrom locations.dict_parser import DictParser\nfrom locations.hours import DAYS, OpeningHours\nfrom locations.items import Feature\n\n\nclass SantanderPLSpider(Spider):\n name ...
[ { "content": "import chompjs\nfrom scrapy import Spider\n\nfrom locations.categories import Categories, apply_category, apply_yes_no\nfrom locations.dict_parser import DictParser\nfrom locations.hours import DAYS, OpeningHours\nfrom locations.items import Feature\n\n\nclass SantanderPLSpider(Spider):\n name ...
diff --git a/locations/spiders/santander_pl.py b/locations/spiders/santander_pl.py index 421d3a7f188..9a03ef393b8 100644 --- a/locations/spiders/santander_pl.py +++ b/locations/spiders/santander_pl.py @@ -39,6 +39,9 @@ def parse_item(ref: str, data: dict, category) -> Feature: start_time, end_time = ho...
name=Bankomat should not be added for amenity=atm It is like `name=ATM` The same goes for `name=Wpłatomat` (for ATM accepting cash) https://www.alltheplaces.xyz/map/#16.82/50.072257/20.036549 ![screen](https://github.com/alltheplaces/alltheplaces/assets/899988/404afa65-095e-42d7-8c58-0c8d77335426)
diff --git a/locations/spiders/santander_pl.py b/locations/spiders/santander_pl.py --- a/locations/spiders/santander_pl.py +++ b/locations/spiders/santander_pl.py @@ -39,6 +39,9 @@ start_time, end_time = hours.split("-") item["opening_hours"].add_range(DAYS[int(day) - 2], start_time.st...
{"golden_diff": "diff --git a/locations/spiders/santander_pl.py b/locations/spiders/santander_pl.py\n--- a/locations/spiders/santander_pl.py\n+++ b/locations/spiders/santander_pl.py\n@@ -39,6 +39,9 @@\n start_time, end_time = hours.split(\"-\")\n item[\"opening_hours\"].add_range(DAYS[in...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- name=Bankomat should not be added for amenity=atm It is like `name=ATM` The same goes for `name=Wpłatomat` (for ATM accepting cash) https://www.alltheplaces.xyz/map/#16.82/50.072257/20.036549 ![scree...
pantsbuild__pants-16113
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom textwrap import dedent\nfrom typing import Any, ...
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom textwrap import dedent\nfrom typing import Any, ...
diff --git a/src/python/pants/backend/python/subsystems/poetry.py b/src/python/pants/backend/python/subsystems/poetry.py index 0698f2b2817..900770ddbfa 100644 --- a/src/python/pants/backend/python/subsystems/poetry.py +++ b/src/python/pants/backend/python/subsystems/poetry.py @@ -24,7 +24,7 @@ class PoetrySubsystem(Pyt...
Pants poetry-based lockfiles fail to include hashes. This was detected in a unit test in the Pants repo, but is a wider problem for all versions of Pants that support generating lockfiles using Poetry. The proximal cause is this announcement from PyPI: https://discuss.python.org/t/backwards-incompatible-change-to...
diff --git a/src/python/pants/backend/python/subsystems/poetry.py b/src/python/pants/backend/python/subsystems/poetry.py --- a/src/python/pants/backend/python/subsystems/poetry.py +++ b/src/python/pants/backend/python/subsystems/poetry.py @@ -24,7 +24,7 @@ options_scope = "poetry" help = "Used to generate loc...
{"golden_diff": "diff --git a/src/python/pants/backend/python/subsystems/poetry.py b/src/python/pants/backend/python/subsystems/poetry.py\n--- a/src/python/pants/backend/python/subsystems/poetry.py\n+++ b/src/python/pants/backend/python/subsystems/poetry.py\n@@ -24,7 +24,7 @@\n options_scope = \"poetry\"\n help...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pants poetry-based lockfiles fail to include hashes. This was detected in a unit test in the Pants repo, but is a wider problem for all versions of Pants that support generating lockfiles using Poetry. The...
saleor__saleor-4008
[ { "content": "from captcha.fields import ReCaptchaField\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import forms as django_forms, update_session_auth_hash\nfrom django.utils.translation import pgettext, pgettext_lazy\nfrom phonenumbers.phonenumberutil import country_cod...
[ { "content": "from captcha.fields import ReCaptchaField\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import forms as django_forms, update_session_auth_hash\nfrom django.utils.translation import pgettext, pgettext_lazy\nfrom phonenumbers.phonenumberutil import country_cod...
diff --git a/CHANGELOG.md b/CHANGELOG.md index d17f7f965e6..512d51f3500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ All notable, unreleased changes to this project will be documented in this file. - Add mutation for bulk cancel orders - #3967 by @akjanik - Hide errors in TokenVerify mutation - #398...
Duplicate choices in shipping address ### What I'm trying to achieve I'm trying to set shipping user for Russian user and there are duplicate values in "Oblast" selector. ### Steps to reproduce the problem 1. Create new shipping address 2. Country --> Russia 3. There are duplicated values in "Oblast" selector ...
diff --git a/saleor/account/forms.py b/saleor/account/forms.py --- a/saleor/account/forms.py +++ b/saleor/account/forms.py @@ -46,6 +46,11 @@ not preview and data or None, initial=initial_address, **kwargs) + + if hasattr(address_form.fields['country_area'], 'choices'): + ...
{"golden_diff": "diff --git a/saleor/account/forms.py b/saleor/account/forms.py\n--- a/saleor/account/forms.py\n+++ b/saleor/account/forms.py\n@@ -46,6 +46,11 @@\n not preview and data or None,\n initial=initial_address,\n **kwargs)\n+\n+ if hasattr(address_form.fields['country_ar...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Duplicate choices in shipping address ### What I'm trying to achieve I'm trying to set shipping user for Russian user and there are duplicate values in "Oblast" selector. ### Steps to reproduce the proble...
strawberry-graphql__strawberry-2411
[ { "content": "import dataclasses\nfrom enum import EnumMeta\nfrom typing import (\n Any,\n Callable,\n Iterable,\n List,\n Mapping,\n Optional,\n TypeVar,\n Union,\n overload,\n)\n\nfrom strawberry.type import StrawberryType\n\nfrom .exceptions import ObjectIsNotAnEnumError\n\n\n@data...
[ { "content": "import dataclasses\nfrom enum import EnumMeta\nfrom typing import (\n Any,\n Callable,\n Iterable,\n List,\n Mapping,\n Optional,\n TypeVar,\n Union,\n overload,\n)\n\nfrom strawberry.type import StrawberryType\n\nfrom .exceptions import ObjectIsNotAnEnumError\n\n\n@data...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..c130119e4f --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,24 @@ +Release type: patch + +This release fixes an issue that prevented using generic +that had a field of type enum. The following works now: + +```python +@strawberry.enum +class Estimated...
App breaking when using Enum as field for Generic <!-- Provide a general summary of the bug in the title above. --> When using an Enum as a field on a Generic, the app breaks, throwing a `NotImplementedError`. <!--- This template is entirely optional and can be removed, but is here to help both you and us. --> <!-...
diff --git a/strawberry/enum.py b/strawberry/enum.py --- a/strawberry/enum.py +++ b/strawberry/enum.py @@ -41,7 +41,8 @@ def copy_with( self, type_var_map: Mapping[TypeVar, Union[StrawberryType, type]] ) -> Union[StrawberryType, type]: - return super().copy_with(type_var_map) # type: ignore[s...
{"golden_diff": "diff --git a/strawberry/enum.py b/strawberry/enum.py\n--- a/strawberry/enum.py\n+++ b/strawberry/enum.py\n@@ -41,7 +41,8 @@\n def copy_with(\n self, type_var_map: Mapping[TypeVar, Union[StrawberryType, type]]\n ) -> Union[StrawberryType, type]:\n- return super().copy_with(type_va...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- App breaking when using Enum as field for Generic <!-- Provide a general summary of the bug in the title above. --> When using an Enum as a field on a Generic, the app breaks, throwing a `NotImplementedError...
PennyLaneAI__pennylane-3182
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle...
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index e2beb942cdb..fcc47fcc3ae 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -206,6 +206,9 @@ keyword argument when using `GellMann`, which determines which of the 8 Gell-Man * Fixed a bug where `qml.math.fid...
[BUG] Inline transforms vs. Decorator transforms ### Expected behavior This script: ``` def circuit(circuit_param): qml.RY(circuit_param, wires=0) qml.Hadamard(wires=0) qml.T(wires=0) def noise(noise_param, wires): qml.CRX(noise_param, wires=[0,1]) qml.CNOT(wires=[1,0]) dev = qm...
diff --git a/pennylane/queuing.py b/pennylane/queuing.py --- a/pennylane/queuing.py +++ b/pennylane/queuing.py @@ -145,7 +145,11 @@ """ previously_active_contexts = cls._active_contexts cls._active_contexts = [] - yield + try: + yield + except Exception as e: +...
{"golden_diff": "diff --git a/pennylane/queuing.py b/pennylane/queuing.py\n--- a/pennylane/queuing.py\n+++ b/pennylane/queuing.py\n@@ -145,7 +145,11 @@\n \"\"\"\n previously_active_contexts = cls._active_contexts\n cls._active_contexts = []\n- yield\n+ try:\n+ yield\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Inline transforms vs. Decorator transforms ### Expected behavior This script: ``` def circuit(circuit_param): qml.RY(circuit_param, wires=0) qml.Hadamard(wires=0) qml.T(wires=0) ...
pyqtgraph__pyqtgraph-696
[ { "content": "import numpy as np\nfrom .. import metaarray as metaarray\nfrom ..Qt import QtCore\nfrom .GraphicsObject import GraphicsObject\nfrom .PlotCurveItem import PlotCurveItem\nfrom .ScatterPlotItem import ScatterPlotItem\nfrom .. import functions as fn\nfrom .. import debug as debug\nfrom .. import getC...
[ { "content": "import numpy as np\nfrom .. import metaarray as metaarray\nfrom ..Qt import QtCore\nfrom .GraphicsObject import GraphicsObject\nfrom .PlotCurveItem import PlotCurveItem\nfrom .ScatterPlotItem import ScatterPlotItem\nfrom .. import functions as fn\nfrom .. import debug as debug\nfrom .. import getC...
diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py index c85c3e5b0a..2faa9ac15d 100644 --- a/pyqtgraph/graphicsItems/PlotDataItem.py +++ b/pyqtgraph/graphicsItems/PlotDataItem.py @@ -490,6 +490,9 @@ def updateItems(self): self.curve.hide() if s...
update version for new development and PlotDataItem stepMode fix ### Version PyPI version is 0.10.0 and uses the release code from november 2016, however the documentation (http://www.pyqtgraph.org/documentation/index.html) has the same version but is based on the development branch. This is very confusing (take for ...
diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py --- a/pyqtgraph/graphicsItems/PlotDataItem.py +++ b/pyqtgraph/graphicsItems/PlotDataItem.py @@ -490,6 +490,9 @@ self.curve.hide() if scatterArgs['symbol'] is not None: + + ...
{"golden_diff": "diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py\n--- a/pyqtgraph/graphicsItems/PlotDataItem.py\n+++ b/pyqtgraph/graphicsItems/PlotDataItem.py\n@@ -490,6 +490,9 @@\n self.curve.hide()\n \n if scatterArgs['symbol'] is not None:\n+...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- update version for new development and PlotDataItem stepMode fix ### Version PyPI version is 0.10.0 and uses the release code from november 2016, however the documentation (http://www.pyqtgraph.org/document...
edgedb__edgedb-6797
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy...
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy...
diff --git a/edb/schema/indexes.py b/edb/schema/indexes.py index f7f7e0ecb13..91ad61176d0 100644 --- a/edb/schema/indexes.py +++ b/edb/schema/indexes.py @@ -163,6 +163,15 @@ class Index( qlkind=qltypes.SchemaObjectClass.INDEX, data_safe=True, ): + # redefine, so we can change compcoef + bases = so.Sche...
Attempting to switch index type fails with `InternalServerError` ``` edgedb error: InternalServerError: AssertionError: Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md Server traceback: Traceback (most...
diff --git a/edb/schema/indexes.py b/edb/schema/indexes.py --- a/edb/schema/indexes.py +++ b/edb/schema/indexes.py @@ -163,6 +163,15 @@ qlkind=qltypes.SchemaObjectClass.INDEX, data_safe=True, ): + # redefine, so we can change compcoef + bases = so.SchemaField( + so.ObjectList['Index'], # type: ...
{"golden_diff": "diff --git a/edb/schema/indexes.py b/edb/schema/indexes.py\n--- a/edb/schema/indexes.py\n+++ b/edb/schema/indexes.py\n@@ -163,6 +163,15 @@\n qlkind=qltypes.SchemaObjectClass.INDEX,\n data_safe=True,\n ):\n+ # redefine, so we can change compcoef\n+ bases = so.SchemaField(\n+ so.Obje...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Attempting to switch index type fails with `InternalServerError` ``` edgedb error: InternalServerError: AssertionError: Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket a...
zestedesavoir__zds-site-6181
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.urls import reverse\nfrom django.http import Http404, HttpResponse, HttpResponsePermanentRedirect, StreamingHttpResponse\nfrom django.template.loader import render_to_string\nfrom django.shortcuts...
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.urls import reverse\nfrom django.http import Http404, HttpResponse, HttpResponsePermanentRedirect, StreamingHttpResponse\nfrom django.template.loader import render_to_string\nfrom django.shortcuts...
diff --git a/templates/tutorialv2/view/content.html b/templates/tutorialv2/view/content.html index 707b006f6c..5c981f7e28 100644 --- a/templates/tutorialv2/view/content.html +++ b/templates/tutorialv2/view/content.html @@ -498,27 +498,54 @@ <h2> {# END ONLINE VERSION #} {% if content.sha_public %} -...
Bouton "Comparer avec la version en ligne" quand les versions sont identiques **Description du bug** Dans un tutoriel publié j'ai le bouton "Comparer avec la version en ligne" dans la sidebar "Actions" (à gauche) alors que **les deux versions sont identiques** **Comment reproduire ?** La liste des étapes qui p...
diff --git a/zds/tutorialv2/mixins.py b/zds/tutorialv2/mixins.py --- a/zds/tutorialv2/mixins.py +++ b/zds/tutorialv2/mixins.py @@ -221,7 +221,7 @@ class SingleContentDetailViewMixin(SingleContentViewMixin, DetailView): """ - This enhanced DetailView ensure, + This enhanced DetailView ensures, - by ...
{"golden_diff": "diff --git a/zds/tutorialv2/mixins.py b/zds/tutorialv2/mixins.py\n--- a/zds/tutorialv2/mixins.py\n+++ b/zds/tutorialv2/mixins.py\n@@ -221,7 +221,7 @@\n \n class SingleContentDetailViewMixin(SingleContentViewMixin, DetailView):\n \"\"\"\n- This enhanced DetailView ensure,\n+ This enhanced Deta...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bouton "Comparer avec la version en ligne" quand les versions sont identiques **Description du bug** Dans un tutoriel publié j'ai le bouton "Comparer avec la version en ligne" dans la sidebar "Actions" (à ...
tensorflow__tensor2tensor-360
[ { "content": "# coding=utf-8\n# Copyright 2017 The Tensor2Tensor Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# coding=utf-8\n# Copyright 2017 The Tensor2Tensor Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/tensor2tensor/data_generators/cnn_dailymail.py b/tensor2tensor/data_generators/cnn_dailymail.py index 2f8e9cf30..8fa1e52d0 100644 --- a/tensor2tensor/data_generators/cnn_dailymail.py +++ b/tensor2tensor/data_generators/cnn_dailymail.py @@ -74,7 +74,7 @@ def story_generator(tmp_dir): for path in paths: ...
Error with `.decode` on `str` object when generating `summarize_cnn_dailymail32k` data ## CMD ``` t2t-trainer \ --generate_data \ --data_dir="$data" \ --problems=summarize_cnn_dailymail32k \ --model=transformer \ --hparams_set=transformer_base_single_gpu \ --output_dir="$root" ``` ## OUTPUT ``...
diff --git a/tensor2tensor/data_generators/cnn_dailymail.py b/tensor2tensor/data_generators/cnn_dailymail.py --- a/tensor2tensor/data_generators/cnn_dailymail.py +++ b/tensor2tensor/data_generators/cnn_dailymail.py @@ -74,7 +74,7 @@ for path in paths: for story_file in tf.gfile.Glob(path + "*"): story = ...
{"golden_diff": "diff --git a/tensor2tensor/data_generators/cnn_dailymail.py b/tensor2tensor/data_generators/cnn_dailymail.py\n--- a/tensor2tensor/data_generators/cnn_dailymail.py\n+++ b/tensor2tensor/data_generators/cnn_dailymail.py\n@@ -74,7 +74,7 @@\n for path in paths:\n for story_file in tf.gfile.Glob(path +...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error with `.decode` on `str` object when generating `summarize_cnn_dailymail32k` data ## CMD ``` t2t-trainer \ --generate_data \ --data_dir="$data" \ --problems=summarize_cnn_dailymail32k \ --...
akvo__akvo-rsr-1858
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\n...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\n...
diff --git a/akvo/rsr/models/partner_site.py b/akvo/rsr/models/partner_site.py index 89dbcfe305..ab9d5b537e 100644 --- a/akvo/rsr/models/partner_site.py +++ b/akvo/rsr/models/partner_site.py @@ -161,6 +161,12 @@ def __unicode__(self): """Unicode representation.""" return _(u'Akvo page for {}').format(...
Akvo Pages with hostnames in uppercase does not work properly ## Test plan 1. Go to 'old' RSR admin: `/en/admin/rsr/partnersite/add/` 2. Add an Akvo Page with capitals in the hostname 3. Save 4. The hostname should be all lowercase ## Issue description If changed to lower case it does. Since hostnames are case insensi...
diff --git a/akvo/rsr/models/partner_site.py b/akvo/rsr/models/partner_site.py --- a/akvo/rsr/models/partner_site.py +++ b/akvo/rsr/models/partner_site.py @@ -161,6 +161,12 @@ """Unicode representation.""" return _(u'Akvo page for {}').format(self.organisation.name) + def save(self, *args, **kwar...
{"golden_diff": "diff --git a/akvo/rsr/models/partner_site.py b/akvo/rsr/models/partner_site.py\n--- a/akvo/rsr/models/partner_site.py\n+++ b/akvo/rsr/models/partner_site.py\n@@ -161,6 +161,12 @@\n \"\"\"Unicode representation.\"\"\"\n return _(u'Akvo page for {}').format(self.organisation.name)\n \n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Akvo Pages with hostnames in uppercase does not work properly ## Test plan 1. Go to 'old' RSR admin: `/en/admin/rsr/partnersite/add/` 2. Add an Akvo Page with capitals in the hostname 3. Save 4. The hostname ...
uccser__cs-unplugged-717
[ { "content": "\"\"\"Custom loader for loading structure of programming challenges.\"\"\"\n\nimport os\nfrom django.db import transaction\nfrom utils.errors.MissingRequiredFieldError import MissingRequiredFieldError\nfrom utils.TranslatableModelLoader import TranslatableModelLoader\nfrom topics.models import Pro...
[ { "content": "\"\"\"Custom loader for loading structure of programming challenges.\"\"\"\n\nimport os\nfrom django.db import transaction\nfrom utils.errors.MissingRequiredFieldError import MissingRequiredFieldError\nfrom utils.TranslatableModelLoader import TranslatableModelLoader\nfrom topics.models import Pro...
diff --git a/csunplugged/topics/content/en/programming-challenges-structure-difficulties.yaml b/csunplugged/topics/content/en/programming-challenges-structure-difficulties.yaml index 5cf9b30dc..2e0eb18a5 100644 --- a/csunplugged/topics/content/en/programming-challenges-structure-difficulties.yaml +++ b/csunplugged/topi...
Workaround Crowdin bug where integer yaml keys are not preserved When downloading in-context localisation files, integer keys in YAML files are not preserved. This is only an issue in the file `topics/content/en/programming-challenges-structure-difficulties.yaml`, which uses the difficulty number as the key. As a wo...
diff --git a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py b/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py --- a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py +++ b/csunplugged/topics/management/commands/_ProgrammingCh...
{"golden_diff": "diff --git a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py b/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py\n--- a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py\n+++ b/csunplugged/topics/management/comm...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Workaround Crowdin bug where integer yaml keys are not preserved When downloading in-context localisation files, integer keys in YAML files are not preserved. This is only an issue in the file `topics/content...
pre-commit__pre-commit-1467
[ { "content": "import argparse\nimport contextlib\nimport functools\nimport logging\nimport os\nimport re\nimport subprocess\nimport time\nimport unicodedata\nfrom typing import Any\nfrom typing import Collection\nfrom typing import Dict\nfrom typing import List\nfrom typing import Sequence\nfrom typing import S...
[ { "content": "import argparse\nimport contextlib\nimport functools\nimport logging\nimport os\nimport re\nimport subprocess\nimport time\nimport unicodedata\nfrom typing import Any\nfrom typing import Collection\nfrom typing import Dict\nfrom typing import List\nfrom typing import Sequence\nfrom typing import S...
diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py index c2dab6f75..f6916c268 100644 --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -347,6 +347,9 @@ def run( if args.checkout_type: environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type + # Set pre_commit flag...
Expose an env variable that indicates if pre-commit is running In some circumstances, it could be helpful to know inside an executable / function / script if it was invoked from pre-commit or from some other process. I wrote a hook that just printed all env variables set but I could not find an env variable like `PRECO...
diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -347,6 +347,9 @@ if args.checkout_type: environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type + # Set pre_commit flag + environ['PRE_COMMIT'] = '1' + wi...
{"golden_diff": "diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py\n--- a/pre_commit/commands/run.py\n+++ b/pre_commit/commands/run.py\n@@ -347,6 +347,9 @@\n if args.checkout_type:\n environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type\n \n+ # Set pre_commit flag\n+ environ['PRE...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Expose an env variable that indicates if pre-commit is running In some circumstances, it could be helpful to know inside an executable / function / script if it was invoked from pre-commit or from some other ...
conda__conda-build-2451
[ { "content": "from __future__ import absolute_import, division, print_function\n\nfrom collections import defaultdict\nimport fnmatch\nfrom functools import partial\nfrom glob import glob\nimport io\nimport locale\nimport re\nimport os\nimport stat\nfrom subprocess import call, check_output\nimport sys\ntry:\n ...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nfrom collections import defaultdict\nimport fnmatch\nfrom functools import partial\nfrom glob import glob\nimport io\nimport locale\nimport re\nimport os\nimport stat\nfrom subprocess import call, check_output\nimport sys\ntry:\n ...
diff --git a/conda_build/post.py b/conda_build/post.py index d22eafd5a7..a049590a68 100644 --- a/conda_build/post.py +++ b/conda_build/post.py @@ -514,7 +514,9 @@ def make_hardlink_copy(path, prefix): # remove old file utils.rm_rf(path) # rename copy to original filename - ...
Invalid cross-device-link Example output: ```bash INFO:conda_build.build:Packaging <...> number of files: 63 Fixing permissions Traceback (most recent call last): File "./build.py", line 599, in build_single built = cb.api.build(RECIPE, **bargs) File "$CONDA_ROOT/lib/python3.6/site-packages/conda_build/...
diff --git a/conda_build/post.py b/conda_build/post.py --- a/conda_build/post.py +++ b/conda_build/post.py @@ -514,7 +514,9 @@ # remove old file utils.rm_rf(path) # rename copy to original filename - os.rename(os.path.join(dest, fn), path) + # It is essenti...
{"golden_diff": "diff --git a/conda_build/post.py b/conda_build/post.py\n--- a/conda_build/post.py\n+++ b/conda_build/post.py\n@@ -514,7 +514,9 @@\n # remove old file\n utils.rm_rf(path)\n # rename copy to original filename\n- os.rename(os.path.join(dest, fn), path)\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Invalid cross-device-link Example output: ```bash INFO:conda_build.build:Packaging <...> number of files: 63 Fixing permissions Traceback (most recent call last): File "./build.py", line 599, in build...
kserve__kserve-3034
[ { "content": "# Copyright 2023 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ { "content": "# Copyright 2023 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
diff --git a/charts/kserve-resources/templates/configmap.yaml b/charts/kserve-resources/templates/configmap.yaml index 8b4dd0e6c31..346d3e2895d 100644 --- a/charts/kserve-resources/templates/configmap.yaml +++ b/charts/kserve-resources/templates/configmap.yaml @@ -64,7 +64,6 @@ data: "memoryLimit": "1Gi", ...
option to load credentials directly from a secret for s3 Currently to download from a private S3 bucket [you create both a secret and a service account that you link it to](https://github.com/kubeflow/kfserving/blob/master/docs/samples/s3/s3_secret.yaml). You then set the [serviceAccountName on the KFService ](https://...
diff --git a/python/kserve/kserve/api_client.py b/python/kserve/kserve/api_client.py --- a/python/kserve/kserve/api_client.py +++ b/python/kserve/kserve/api_client.py @@ -304,7 +304,7 @@ if data is None: return None - if type(klass) == str: + if type(klass) is str: if ...
{"golden_diff": "diff --git a/python/kserve/kserve/api_client.py b/python/kserve/kserve/api_client.py\n--- a/python/kserve/kserve/api_client.py\n+++ b/python/kserve/kserve/api_client.py\n@@ -304,7 +304,7 @@\n if data is None:\n return None\n \n- if type(klass) == str:\n+ if type(klass)...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- option to load credentials directly from a secret for s3 Currently to download from a private S3 bucket [you create both a secret and a service account that you link it to](https://github.com/kubeflow/kfservi...
canonical__microk8s-3535
[ { "content": "import argparse\nimport logging\nimport traceback\nfrom typing import List\nfrom sys import exit, platform\nfrom os import getcwd\n\nimport click\n\nfrom cli.echo import Echo\nfrom common import definitions\nfrom common.auxiliary import Windows, MacOS, Linux\nfrom common.errors import BaseError\nf...
[ { "content": "import argparse\nimport logging\nimport traceback\nfrom typing import List\nfrom sys import exit, platform\nfrom os import getcwd\n\nimport click\n\nfrom cli.echo import Echo\nfrom common import definitions\nfrom common.auxiliary import Windows, MacOS, Linux\nfrom common.errors import BaseError\nf...
diff --git a/installer/cli/microk8s.py b/installer/cli/microk8s.py index f2db9b27e2..1f0b412f27 100755 --- a/installer/cli/microk8s.py +++ b/installer/cli/microk8s.py @@ -309,7 +309,7 @@ def dashboard_proxy() -> None: output = instance.run(command, hide_output=True) secret_name = None for lin...
TypeError: sequence item 10: expected str instance, NoneType found (microk8s dashboard-proxy) #### Summary I installed MicroK8s on Windows 10 [Version 10.0.19043.2130]. I can run `microk8s dashboard-proxy` inside `microk8s-vm` VM, but I can't run `microk8s dashboard-proxy` on the Host. #### What Should Happen Ins...
diff --git a/installer/cli/microk8s.py b/installer/cli/microk8s.py --- a/installer/cli/microk8s.py +++ b/installer/cli/microk8s.py @@ -309,7 +309,7 @@ output = instance.run(command, hide_output=True) secret_name = None for line in output.split(b"\n"): - if line.startswith(b"default...
{"golden_diff": "diff --git a/installer/cli/microk8s.py b/installer/cli/microk8s.py\n--- a/installer/cli/microk8s.py\n+++ b/installer/cli/microk8s.py\n@@ -309,7 +309,7 @@\n output = instance.run(command, hide_output=True)\n secret_name = None\n for line in output.split(b\"\\n\"):\n- i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- TypeError: sequence item 10: expected str instance, NoneType found (microk8s dashboard-proxy) #### Summary I installed MicroK8s on Windows 10 [Version 10.0.19043.2130]. I can run `microk8s dashboard-proxy`...
facebookresearch__ParlAI-1956
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"Build the candidate responses for a retrieval model.\n\nExamples\n--------\n\n.. code-bl...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"Build the candidate responses for a retrieval model.\n\nExamples\n--------\n\n.. code-bl...
diff --git a/parlai/scripts/build_candidates.py b/parlai/scripts/build_candidates.py index db5d55ce615..b95959be4d4 100644 --- a/parlai/scripts/build_candidates.py +++ b/parlai/scripts/build_candidates.py @@ -23,6 +23,9 @@ def build_cands(opt): # create repeat label agent and assign it to the specified task + ...
Quickstart AttributeError: 'HogwildWorld' object has no attribute 'acts' **Bug description** When going through the ParlAI [quickstart](https://parl.ai/docs/tutorial_quick.html#install), I got the following error: ``` python Traceback (most recent call last): File "examples/interactive.py", line 18, in <module>...
diff --git a/parlai/scripts/build_candidates.py b/parlai/scripts/build_candidates.py --- a/parlai/scripts/build_candidates.py +++ b/parlai/scripts/build_candidates.py @@ -23,6 +23,9 @@ def build_cands(opt): # create repeat label agent and assign it to the specified task + if opt['numthreads'] > 1: + #...
{"golden_diff": "diff --git a/parlai/scripts/build_candidates.py b/parlai/scripts/build_candidates.py\n--- a/parlai/scripts/build_candidates.py\n+++ b/parlai/scripts/build_candidates.py\n@@ -23,6 +23,9 @@\n \n def build_cands(opt):\n # create repeat label agent and assign it to the specified task\n+ if opt['numt...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Quickstart AttributeError: 'HogwildWorld' object has no attribute 'acts' **Bug description** When going through the ParlAI [quickstart](https://parl.ai/docs/tutorial_quick.html#install), I got the following ...
adamchainz__django-cors-headers-232
[ { "content": "import codecs\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `__init__.py`.\n \"\"\"\n with codecs.open(os.path.join(package, '__init__.py'), 'r', 'utf-8') as fp:\n init_py = fp...
[ { "content": "import codecs\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `__init__.py`.\n \"\"\"\n with codecs.open(os.path.join(package, '__init__.py'), 'r', 'utf-8') as fp:\n init_py = fp...
diff --git a/HISTORY.rst b/HISTORY.rst index 69bd6fb6..276096d8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,9 @@ Pending ------- * New release notes go here. +* Django 1.11 compatibility. There were no changes to the actual library code, + so previous versions probably work, though they weren't properly ...
test_get_replaces_referer_when_secure() failing under Django 1.11 Running the django-cors-headers test suite under Django 1.11a1 results in one test failure: ``` ________________ RefererReplacementCorsMiddlewareTests.test_get_replaces_referer_when_secure _________________ self = <tests.test_middleware.RefererRep...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -44,6 +44,7 @@ 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.9', 'Framework :: Django :: 1.10', + 'Framework :: Django :: 1.11', 'Intended Audience :: Developers', 'License :: OSI Approved :: ...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -44,6 +44,7 @@\n 'Framework :: Django :: 1.8',\n 'Framework :: Django :: 1.9',\n 'Framework :: Django :: 1.10',\n+ 'Framework :: Django :: 1.11',\n 'Intended Audience :: Developers',\n 'L...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- test_get_replaces_referer_when_secure() failing under Django 1.11 Running the django-cors-headers test suite under Django 1.11a1 results in one test failure: ``` ________________ RefererReplacementCorsMiddl...
tobymao__sqlglot-2739
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import expressions as exp\nfrom sqlglot.helper import find_new_name, name_sequence\n\nif t.TYPE_CHECKING:\n from sqlglot.generator import Generator\n\n\ndef unalias_group(expression: exp.Expression) -> exp.Expression:\n ...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import expressions as exp\nfrom sqlglot.helper import find_new_name, name_sequence\n\nif t.TYPE_CHECKING:\n from sqlglot.generator import Generator\n\n\ndef unalias_group(expression: exp.Expression) -> exp.Expression:\n ...
diff --git a/sqlglot/transforms.py b/sqlglot/transforms.py index 03acc2b2b1..0da65b5156 100644 --- a/sqlglot/transforms.py +++ b/sqlglot/transforms.py @@ -255,7 +255,7 @@ def new_name(names: t.Set[str], name: str) -> str: if not arrays: if expression.args.get("from"): - ...
`explode_to_unnest` transformation generates query that cannot be executed with trino sqlglot code: ``` In [8]: import sqlglot as sg In [9]: print( ...: sg.parse_one( ...: "select unnest(t.x) from (values [1, 2, 3] as t (x))", read="duckdb" ...: ).sql("trino", pretty=True) ...: ) ...
diff --git a/sqlglot/transforms.py b/sqlglot/transforms.py --- a/sqlglot/transforms.py +++ b/sqlglot/transforms.py @@ -255,7 +255,7 @@ if not arrays: if expression.args.get("from"): - expression.join(series, copy=False) + ...
{"golden_diff": "diff --git a/sqlglot/transforms.py b/sqlglot/transforms.py\n--- a/sqlglot/transforms.py\n+++ b/sqlglot/transforms.py\n@@ -255,7 +255,7 @@\n \n if not arrays:\n if expression.args.get(\"from\"):\n- expression.join(series, copy=False)...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `explode_to_unnest` transformation generates query that cannot be executed with trino sqlglot code: ``` In [8]: import sqlglot as sg In [9]: print( ...: sg.parse_one( ...: "select u...
zestedesavoir__zds-site-2285
[ { "content": "# coding: utf-8\n\nfrom datetime import datetime\nfrom django.conf import settings\nfrom django.db import models\nfrom hashlib import md5\nfrom django.http import HttpRequest\nfrom django.contrib.sessions.models import Session\nfrom django.contrib.auth import logout\nimport os\n\nfrom django.contr...
[ { "content": "# coding: utf-8\n\nfrom datetime import datetime\nfrom django.conf import settings\nfrom django.db import models\nfrom hashlib import md5\nfrom django.http import HttpRequest\nfrom django.contrib.sessions.models import Session\nfrom django.contrib.auth import logout\nimport os\n\nfrom django.contr...
diff --git a/templates/member/profile.html b/templates/member/profile.html index 40b91f7db9..7ff39ff165 100644 --- a/templates/member/profile.html +++ b/templates/member/profile.html @@ -1,4 +1,5 @@ {% extends "member/base.html" %} + {% load emarkdown %} {% load email_obfuscator %} {% load date %} @@ -397,7 +398,7 ...
Incohérence sur le nombre de messages d'un membre Les 2 pages en questions : https://zestedesavoir.com/membres/voir/Iris13/ https://zestedesavoir.com/forums/messages/1927/. On a 3 messages alors que aucun n'est affiché.
diff --git a/zds/member/models.py b/zds/member/models.py --- a/zds/member/models.py +++ b/zds/member/models.py @@ -133,6 +133,10 @@ def get_post_count(self): """Number of messages posted.""" + return Post.objects.filter(author__pk=self.user.pk, is_visible=True).count() + + def get_post_count_a...
{"golden_diff": "diff --git a/zds/member/models.py b/zds/member/models.py\n--- a/zds/member/models.py\n+++ b/zds/member/models.py\n@@ -133,6 +133,10 @@\n \n def get_post_count(self):\n \"\"\"Number of messages posted.\"\"\"\n+ return Post.objects.filter(author__pk=self.user.pk, is_visible=True).count...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Incohérence sur le nombre de messages d'un membre Les 2 pages en questions : https://zestedesavoir.com/membres/voir/Iris13/ https://zestedesavoir.com/forums/messages/1927/. On a 3 messages alors que aucun n'...
Pyomo__pyomo-526
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and \n# Engineeri...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and \n# Engineeri...
diff --git a/pyomo/dae/misc.py b/pyomo/dae/misc.py index 1be9a7630b0..6d6cf96a762 100644 --- a/pyomo/dae/misc.py +++ b/pyomo/dae/misc.py @@ -202,6 +202,12 @@ def update_contset_indexed_component(comp, expansion_map): if comp.type() is Param: return + # Skip components that do not have a 'dim' attribu...
ExternalFunction and DAE Transformation I think there is a problem applying DAE transformations to Pyomo models with ExternalFunction objects. I can come up with a simpler demonstration, but hopefully the trace below is good enough. jeslick@pds04:~/git/eslickj/models/idaes_models/process/solvent/MEA_simple> python ...
diff --git a/pyomo/dae/misc.py b/pyomo/dae/misc.py --- a/pyomo/dae/misc.py +++ b/pyomo/dae/misc.py @@ -202,6 +202,12 @@ if comp.type() is Param: return + # Skip components that do not have a 'dim' attribute. This assumes that + # all components that could be indexed by a ContinuousSet have the 'di...
{"golden_diff": "diff --git a/pyomo/dae/misc.py b/pyomo/dae/misc.py\n--- a/pyomo/dae/misc.py\n+++ b/pyomo/dae/misc.py\n@@ -202,6 +202,12 @@\n if comp.type() is Param:\n return\n \n+ # Skip components that do not have a 'dim' attribute. This assumes that\n+ # all components that could be indexed by a C...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ExternalFunction and DAE Transformation I think there is a problem applying DAE transformations to Pyomo models with ExternalFunction objects. I can come up with a simpler demonstration, but hopefully the tr...
urllib3__urllib3-2656
[ { "content": "import errno\nimport logging\nimport queue\nimport sys\nimport warnings\nfrom http.client import HTTPResponse as _HttplibHTTPResponse\nfrom socket import timeout as SocketTimeout\nfrom types import TracebackType\nfrom typing import TYPE_CHECKING, Any, Mapping, Optional, Type, TypeVar, Union, overl...
[ { "content": "import errno\nimport logging\nimport queue\nimport sys\nimport warnings\nfrom http.client import HTTPResponse as _HttplibHTTPResponse\nfrom socket import timeout as SocketTimeout\nfrom types import TracebackType\nfrom typing import TYPE_CHECKING, Any, Mapping, Optional, Type, TypeVar, Union, overl...
diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py index ae61481e17..798e285e03 100644 --- a/src/urllib3/connectionpool.py +++ b/src/urllib3/connectionpool.py @@ -1020,7 +1020,7 @@ def _new_conn(self) -> HTTPConnection: ) if not self.ConnectionCls or self.ConnectionCls is Dum...
Retry retries on fruitless ssl ImportError ### Subject Describe the issue here. ### Environment Describe your environment. At least, paste here the output of: ```python import platform import urllib3 print("OS", platform.platform()) print("Python", platform.python_version()) print("urllib3", urllib3...
diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py --- a/src/urllib3/connectionpool.py +++ b/src/urllib3/connectionpool.py @@ -1020,7 +1020,7 @@ ) if not self.ConnectionCls or self.ConnectionCls is DummyConnection: # type: ignore[comparison-overlap] - raise SSLErr...
{"golden_diff": "diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py\n--- a/src/urllib3/connectionpool.py\n+++ b/src/urllib3/connectionpool.py\n@@ -1020,7 +1020,7 @@\n )\n \n if not self.ConnectionCls or self.ConnectionCls is DummyConnection: # type: ignore[comparison-overlap]\n-...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Retry retries on fruitless ssl ImportError ### Subject Describe the issue here. ### Environment Describe your environment. At least, paste here the output of: ```python import platform import u...
sopel-irc__sopel-611
[ { "content": "# coding=utf8\n\"\"\"\nsearch.py - Willie Web Search Module\nCopyright 2008-9, Sean B. Palmer, inamidst.com\nCopyright 2012, Edward Powell, embolalia.net\nLicensed under the Eiffel Forum License 2.\n\nhttp://willie.dftba.net\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport re\nfrom willi...
[ { "content": "# coding=utf8\n\"\"\"\nsearch.py - Willie Web Search Module\nCopyright 2008-9, Sean B. Palmer, inamidst.com\nCopyright 2012, Edward Powell, embolalia.net\nLicensed under the Eiffel Forum License 2.\n\nhttp://willie.dftba.net\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport re\nfrom willi...
diff --git a/willie/modules/search.py b/willie/modules/search.py index 6c4615c027..f3ab03972e 100644 --- a/willie/modules/search.py +++ b/willie/modules/search.py @@ -127,6 +127,8 @@ def duck_search(query): query = query.replace('!', '') uri = 'http://duckduckgo.com/html/?q=%s&kl=uk-en' % query bytes = w...
[search].duck is horribly broken. It appears we're scraping the page wrong, since ".duck wikipedia" returns an ad page.
diff --git a/willie/modules/search.py b/willie/modules/search.py --- a/willie/modules/search.py +++ b/willie/modules/search.py @@ -127,6 +127,8 @@ query = query.replace('!', '') uri = 'http://duckduckgo.com/html/?q=%s&kl=uk-en' % query bytes = web.get(uri) + if 'web-result"' in bytes: #filter out the ...
{"golden_diff": "diff --git a/willie/modules/search.py b/willie/modules/search.py\n--- a/willie/modules/search.py\n+++ b/willie/modules/search.py\n@@ -127,6 +127,8 @@\n query = query.replace('!', '')\n uri = 'http://duckduckgo.com/html/?q=%s&kl=uk-en' % query\n bytes = web.get(uri)\n+ if 'web-result\"' i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [search].duck is horribly broken. It appears we're scraping the page wrong, since ".duck wikipedia" returns an ad page. --- END ISSUE --- Below are some code segments, each from a relevant file. One or mor...
cocotb__cocotb-1145
[ { "content": "#!/usr/bin/env python\n###############################################################################\n# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n...
[ { "content": "#!/usr/bin/env python\n###############################################################################\n# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n...
diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index e2041dc717..2f86bce266 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ def package_files(directory): author='Chris Higgs, Stuart Hodgson', author_email='cocotb@potentialventures.com', install_requires=[], + python_requires='>=2.7, ...
Packaging: Add python_requires to manifest Define our Python version requirements in our package manifest, as described here: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ author='Chris Higgs, Stuart Hodgson', author_email='cocotb@potentialventures.com', install_requires=[], + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', packages...
{"golden_diff": "diff --git a/setup.py b/setup.py\nold mode 100644\nnew mode 100755\n--- a/setup.py\n+++ b/setup.py\n@@ -55,6 +55,7 @@\n author='Chris Higgs, Stuart Hodgson',\n author_email='cocotb@potentialventures.com',\n install_requires=[],\n+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3....
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Packaging: Add python_requires to manifest Define our Python version requirements in our package manifest, as described here: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python...
scikit-hep__pyhf-915
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'tensorflow': ['tensorflow~=2.0', 'tensorflow-probability~=0.8'],\n 'torch': ['torch~=1.2'],\n 'jax': ['jax~=0.1,>0.1.51', 'jaxlib~=0.1,>0.1.33'],\n 'xmlio': ['uproot'],\n 'minuit': ['iminuit'],\n}\nextras_require['backends'] = so...
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'tensorflow': [\n 'tensorflow~=2.0',\n 'tensorflow-probability~=0.8',\n 'cloudpickle!=1.5.0', # TODO: Temp patch until tfp v0.11\n ],\n 'torch': ['torch~=1.2'],\n 'jax': ['jax~=0.1,>0.1.51', 'jaxlib~=0.1,>0.1.33...
diff --git a/setup.py b/setup.py index 24c2cf1025..4bef9bb45b 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,11 @@ from setuptools import setup extras_require = { - 'tensorflow': ['tensorflow~=2.0', 'tensorflow-probability~=0.8'], + 'tensorflow': [ + 'tensorflow~=2.0', + 'tensorflow-probability...
cloudpickle v1.5.0 breaks testing # Description With the release of [`cloudpickle` `v1.5.0`](https://pypi.org/project/cloudpickle/1.5.0/) on 2020-07-01 the CI is broken in testing as the following error is raised ```pytb ImportError while loading conftest '/home/runner/work/pyhf/pyhf/tests/conftest.py'. tests/c...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1,7 +1,11 @@ from setuptools import setup extras_require = { - 'tensorflow': ['tensorflow~=2.0', 'tensorflow-probability~=0.8'], + 'tensorflow': [ + 'tensorflow~=2.0', + 'tensorflow-probability~=0.8', + 'cloudpickle!=1.5.0...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,7 +1,11 @@\n from setuptools import setup\n \n extras_require = {\n- 'tensorflow': ['tensorflow~=2.0', 'tensorflow-probability~=0.8'],\n+ 'tensorflow': [\n+ 'tensorflow~=2.0',\n+ 'tensorflow-probability~=0.8',\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cloudpickle v1.5.0 breaks testing # Description With the release of [`cloudpickle` `v1.5.0`](https://pypi.org/project/cloudpickle/1.5.0/) on 2020-07-01 the CI is broken in testing as the following error is...
ansible__molecule-4038
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right...
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right...
diff --git a/src/molecule/command/create.py b/src/molecule/command/create.py index a10bca06ee..a4a96f7c7d 100644 --- a/src/molecule/command/create.py +++ b/src/molecule/command/create.py @@ -41,6 +41,11 @@ def execute(self, action_args=None): """ self._config.state.change_state("driver", self._config....
created: true is ignored in state.yml # Issue Type - Bug report # Molecule and Ansible details ``` ansible --version && molecule --version ansible [core 2.15.3] config file = None configured module search path = ['/home/manu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible py...
diff --git a/src/molecule/command/create.py b/src/molecule/command/create.py --- a/src/molecule/command/create.py +++ b/src/molecule/command/create.py @@ -41,6 +41,11 @@ """ self._config.state.change_state("driver", self._config.driver.name) + if self._config.state.created: + msg =...
{"golden_diff": "diff --git a/src/molecule/command/create.py b/src/molecule/command/create.py\n--- a/src/molecule/command/create.py\n+++ b/src/molecule/command/create.py\n@@ -41,6 +41,11 @@\n \"\"\"\n self._config.state.change_state(\"driver\", self._config.driver.name)\n \n+ if self._config.stat...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- created: true is ignored in state.yml # Issue Type - Bug report # Molecule and Ansible details ``` ansible --version && molecule --version ansible [core 2.15.3] config file = None configured ...
canonical__microk8s-2478
[ { "content": "#!/usr/bin/python3\nimport os\nimport argparse\n\nfrom common.utils import (\n exit_if_no_permission,\n exit_if_stopped,\n is_cluster_locked,\n is_ha_enabled,\n get_dqlite_info,\n wait_for_ready,\n is_cluster_ready,\n get_available_addons,\n get_current_arch,\n get_ad...
[ { "content": "#!/usr/bin/python3\nimport os\nimport argparse\n\nfrom common.utils import (\n exit_if_no_permission,\n exit_if_stopped,\n is_cluster_locked,\n is_ha_enabled,\n get_dqlite_info,\n wait_for_ready,\n is_cluster_ready,\n get_available_addons,\n get_current_arch,\n get_ad...
diff --git a/microk8s-resources/actions/disable.dashboard-ingress.sh b/microk8s-resources/actions/disable.dashboard-ingress.sh new file mode 100755 index 0000000000..67b9fec61f --- /dev/null +++ b/microk8s-resources/actions/disable.dashboard-ingress.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +import os +import subpr...
[dashboard] should be exposed via ingress When running microk8s on the server, rather than doing port forwarding it should be possible to access the dashboard via ingress (similar to kubeflow dashboard)
diff --git a/scripts/wrappers/status.py b/scripts/wrappers/status.py --- a/scripts/wrappers/status.py +++ b/scripts/wrappers/status.py @@ -154,7 +154,8 @@ enabled = [] disabled = [] if isReady: - kube_output = kubectl_get("all") + # 'all' does not include ingress + kube_output = kube...
{"golden_diff": "diff --git a/scripts/wrappers/status.py b/scripts/wrappers/status.py\n--- a/scripts/wrappers/status.py\n+++ b/scripts/wrappers/status.py\n@@ -154,7 +154,8 @@\n enabled = []\n disabled = []\n if isReady:\n- kube_output = kubectl_get(\"all\")\n+ # 'all' does not include ingress\...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [dashboard] should be exposed via ingress When running microk8s on the server, rather than doing port forwarding it should be possible to access the dashboard via ingress (similar to kubeflow dashboard) --- ...
napari__napari-6226
[ { "content": "from __future__ import annotations\n\nimport functools\nimport inspect\nimport warnings\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n List,\n NamedTuple,\n Optional,\n Sequence,\n Tuple,\n Union,\n)\n\nimport dask\nimport numpy as np\nimport pandas as pd\n\nfro...
[ { "content": "from __future__ import annotations\n\nimport functools\nimport inspect\nimport warnings\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n List,\n NamedTuple,\n Optional,\n Sequence,\n Tuple,\n Union,\n)\n\nimport dask\nimport numpy as np\nimport pandas as pd\n\nfro...
diff --git a/napari/layers/utils/_tests/test_layer_utils.py b/napari/layers/utils/_tests/test_layer_utils.py index a118bbf93c3..3485852c05b 100644 --- a/napari/layers/utils/_tests/test_layer_utils.py +++ b/napari/layers/utils/_tests/test_layer_utils.py @@ -223,20 +223,31 @@ def test_feature_table_from_layer_with_proper...
property in labels layer does not understand objects of different lengths ## 🐛 Bug I am trying to use the properties attribute of `add_labels` to add a dictionary of properties that contains a self defined property that happens to be in the form of list but of unequal lengths. So every region has an extra property ...
diff --git a/napari/layers/utils/layer_utils.py b/napari/layers/utils/layer_utils.py --- a/napari/layers/utils/layer_utils.py +++ b/napari/layers/utils/layer_utils.py @@ -948,7 +948,7 @@ # store missing values, so passing None creates an np.float64 series # containing NaN. Therefore, use a default of ...
{"golden_diff": "diff --git a/napari/layers/utils/layer_utils.py b/napari/layers/utils/layer_utils.py\n--- a/napari/layers/utils/layer_utils.py\n+++ b/napari/layers/utils/layer_utils.py\n@@ -948,7 +948,7 @@\n # store missing values, so passing None creates an np.float64 series\n # containing NaN. Theref...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- property in labels layer does not understand objects of different lengths ## 🐛 Bug I am trying to use the properties attribute of `add_labels` to add a dictionary of properties that contains a self define...
vyperlang__vyper-3936
[ { "content": "# -*- coding: utf-8 -*-\n\nimport os\nimport re\nimport subprocess\n\nfrom setuptools import setup\n\nextras_require = {\n \"test\": [\n \"pytest>=8.0,<9.0\",\n \"pytest-cov>=4.1,<5.0\",\n \"pytest-instafail>=0.4,<1.0\",\n \"pytest-xdist>=3.0,<3.4\",\n \"pytes...
[ { "content": "# -*- coding: utf-8 -*-\n\nimport os\nimport re\nimport subprocess\n\nfrom setuptools import setup\n\nextras_require = {\n \"test\": [\n \"pytest>=8.0,<9.0\",\n \"pytest-cov>=4.1,<5.0\",\n \"pytest-instafail>=0.4,<1.0\",\n \"pytest-xdist>=3.0,<3.4\",\n \"pytes...
diff --git a/setup.py b/setup.py index e87a9d409c..da5654603d 100644 --- a/setup.py +++ b/setup.py @@ -103,7 +103,6 @@ def _global_version(version): entry_points={ "console_scripts": [ "vyper=vyper.cli.vyper_compile:_parse_cli_args", - "vyper-serve=vyper.cli.vyper_serve:_parse_cli_...
`vyper-serve` is still lingering in `setup.py` ### Version Information * vyper Version (output of `vyper --version`): doesn't matter * OS: doesn't matter * Python Version (output of `python --version`): doesn't matter ### What's your issue about? You removed `vyper-serve` with this commit: https://github.com...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -103,7 +103,6 @@ entry_points={ "console_scripts": [ "vyper=vyper.cli.vyper_compile:_parse_cli_args", - "vyper-serve=vyper.cli.vyper_serve:_parse_cli_args", "fang=vyper.cli.vyper_ir:_parse_cli_args", ...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -103,7 +103,6 @@\n entry_points={\n \"console_scripts\": [\n \"vyper=vyper.cli.vyper_compile:_parse_cli_args\",\n- \"vyper-serve=vyper.cli.vyper_serve:_parse_cli_args\",\n \"fang=vyper.cl...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `vyper-serve` is still lingering in `setup.py` ### Version Information * vyper Version (output of `vyper --version`): doesn't matter * OS: doesn't matter * Python Version (output of `python --version`): ...
scverse__scanpy-783
[ { "content": "\"\"\"This module contains helper functions for accessing data.\"\"\"\nfrom typing import Optional, Iterable, Tuple\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.sparse import spmatrix\n\nfrom anndata import AnnData\n# ----------------------------------------------------------------------...
[ { "content": "\"\"\"This module contains helper functions for accessing data.\"\"\"\nfrom typing import Optional, Iterable, Tuple\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.sparse import spmatrix\n\nfrom anndata import AnnData\n# ----------------------------------------------------------------------...
diff --git a/scanpy/get.py b/scanpy/get.py index 57c6d9cbca..b94bd4e542 100644 --- a/scanpy/get.py +++ b/scanpy/get.py @@ -52,7 +52,7 @@ def rank_genes_groups_df( """ d = pd.DataFrame() for k in ['scores', 'names', 'logfoldchanges', 'pvals', 'pvals_adj']: - d[k] = adata.uns["rank_genes_groups"][k]...
get.rank_genes_groups() key argument not used `rank_genes_groups_df` takes `key` as an argument and the docs says it is the key differential expression groups were stored under. However, the function does not use that key and fetches DE results from the default 'rank_genes_groups' key. line 55 under `rank_genes_...
diff --git a/scanpy/get.py b/scanpy/get.py --- a/scanpy/get.py +++ b/scanpy/get.py @@ -52,7 +52,7 @@ """ d = pd.DataFrame() for k in ['scores', 'names', 'logfoldchanges', 'pvals', 'pvals_adj']: - d[k] = adata.uns["rank_genes_groups"][k][group] + d[k] = adata.uns[key][k][group] if pval_...
{"golden_diff": "diff --git a/scanpy/get.py b/scanpy/get.py\n--- a/scanpy/get.py\n+++ b/scanpy/get.py\n@@ -52,7 +52,7 @@\n \"\"\"\n d = pd.DataFrame()\n for k in ['scores', 'names', 'logfoldchanges', 'pvals', 'pvals_adj']:\n- d[k] = adata.uns[\"rank_genes_groups\"][k][group]\n+ d[k] = adata.un...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- get.rank_genes_groups() key argument not used `rank_genes_groups_df` takes `key` as an argument and the docs says it is the key differential expression groups were stored under. However, the function does...
doccano__doccano-841
[ { "content": "\"\"\"\nDjango settings for app project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\nAny setting that is configured via an environmen...
[ { "content": "\"\"\"\nDjango settings for app project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\nAny setting that is configured via an environmen...
diff --git a/app/app/settings.py b/app/app/settings.py index 36233b8d63..cb7303d7b5 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -314,6 +314,7 @@ EMAIL_HOST_USER = env('EMAIL_HOST_USER', None) EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', None) EMAIL_PORT = env.int('EMAIL_PORT', 587) +DEFAULT_FRO...
Signup verification email not received How to reproduce the behaviour --------- I setup the project using AWS one-click deployment button. Everything works fine, but when a new user sign ups, email verification is not received. I believe I have to set up a email host configurations in `settings.py`. How do I set it u...
diff --git a/app/app/settings.py b/app/app/settings.py --- a/app/app/settings.py +++ b/app/app/settings.py @@ -314,6 +314,7 @@ EMAIL_HOST_USER = env('EMAIL_HOST_USER', None) EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', None) EMAIL_PORT = env.int('EMAIL_PORT', 587) +DEFAULT_FROM_EMAIL = env('DEFAULT_FROM_EMAIL', ...
{"golden_diff": "diff --git a/app/app/settings.py b/app/app/settings.py\n--- a/app/app/settings.py\n+++ b/app/app/settings.py\n@@ -314,6 +314,7 @@\n EMAIL_HOST_USER = env('EMAIL_HOST_USER', None)\n EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', None)\n EMAIL_PORT = env.int('EMAIL_PORT', 587)\n+DEFAULT_FROM_EMAIL = en...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Signup verification email not received How to reproduce the behaviour --------- I setup the project using AWS one-click deployment button. Everything works fine, but when a new user sign ups, email verifica...
streamlink__streamlink-2229
[ { "content": "from __future__ import print_function\nimport re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream\n\n\nclass PowerApp(Plugin):\n url_re = re.compile(r\"https?://(?:www.)?powerapp.com.tr/tv/(\\w+)\")\n api_url = \"htt...
[ { "content": "from __future__ import print_function\nimport re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream\n\n\nclass PowerApp(Plugin):\n url_re = re.compile(r\"https?://(?:www.)?powerapp.com.tr/tvs?/(\\w+)\")\n api_url = \"h...
diff --git a/src/streamlink/plugins/powerapp.py b/src/streamlink/plugins/powerapp.py index 0ad0dda1899..702505e5f6c 100644 --- a/src/streamlink/plugins/powerapp.py +++ b/src/streamlink/plugins/powerapp.py @@ -7,7 +7,7 @@ class PowerApp(Plugin): - url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tv/(\w+)"...
powerapp.py No plugin can handle URL ## Error Report - [X] This is a bug report and I have read the Posting Guidelines. ### Description powerapp.com.tr should be able to play the stations ### Expected / actual behavior Inserting the page in the streamlink does not play the stream. About my web browser...
diff --git a/src/streamlink/plugins/powerapp.py b/src/streamlink/plugins/powerapp.py --- a/src/streamlink/plugins/powerapp.py +++ b/src/streamlink/plugins/powerapp.py @@ -7,7 +7,7 @@ class PowerApp(Plugin): - url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tv/(\w+)") + url_re = re.compile(r"https?://...
{"golden_diff": "diff --git a/src/streamlink/plugins/powerapp.py b/src/streamlink/plugins/powerapp.py\n--- a/src/streamlink/plugins/powerapp.py\n+++ b/src/streamlink/plugins/powerapp.py\n@@ -7,7 +7,7 @@\n \n \n class PowerApp(Plugin):\n- url_re = re.compile(r\"https?://(?:www.)?powerapp.com.tr/tv/(\\w+)\")\n+ url...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- powerapp.py No plugin can handle URL ## Error Report - [X] This is a bug report and I have read the Posting Guidelines. ### Description powerapp.com.tr should be able to play the stations ### E...
getredash__redash-784
[ { "content": "import cStringIO\nimport csv\nimport codecs\nimport decimal\nimport datetime\nimport json\nimport random\nimport re\nimport hashlib\nimport pytz\n\nCOMMENTS_REGEX = re.compile(\"/\\*.*?\\*/\")\n\n\ndef utcnow():\n \"\"\"Return datetime.now value with timezone specified.\n\n Without the timez...
[ { "content": "import cStringIO\nimport csv\nimport codecs\nimport decimal\nimport datetime\nimport json\nimport random\nimport re\nimport hashlib\nimport pytz\n\nCOMMENTS_REGEX = re.compile(\"/\\*.*?\\*/\")\n\n\ndef utcnow():\n \"\"\"Return datetime.now value with timezone specified.\n\n Without the timez...
diff --git a/redash/utils.py b/redash/utils.py index 25e517aaf8..77bec4211c 100644 --- a/redash/utils.py +++ b/redash/utils.py @@ -53,9 +53,12 @@ def default(self, o): if isinstance(o, decimal.Decimal): return float(o) - if isinstance(o, (datetime.date, datetime.time, datetime.timedelta))...
AttributeError: 'datetime.timedelta' object has no attribute 'isoformat' On the latest 0.9.2-rc: ``` [2016-01-21 14:30:36,838: ERROR/MainProcess] Task redash.tasks.execute_query[766d3f9f-68a6-4a64-8cd9-b7e4e18bf2af] raised unexpected: AttributeError("'datetime.timedelta' object has no attribute 'isoformat'",) Tracebac...
diff --git a/redash/utils.py b/redash/utils.py --- a/redash/utils.py +++ b/redash/utils.py @@ -53,9 +53,12 @@ if isinstance(o, decimal.Decimal): return float(o) - if isinstance(o, (datetime.date, datetime.time, datetime.timedelta)): + if isinstance(o, (datetime.date, datetime.time)...
{"golden_diff": "diff --git a/redash/utils.py b/redash/utils.py\n--- a/redash/utils.py\n+++ b/redash/utils.py\n@@ -53,9 +53,12 @@\n if isinstance(o, decimal.Decimal):\n return float(o)\n \n- if isinstance(o, (datetime.date, datetime.time, datetime.timedelta)):\n+ if isinstance(o, (date...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- AttributeError: 'datetime.timedelta' object has no attribute 'isoformat' On the latest 0.9.2-rc: ``` [2016-01-21 14:30:36,838: ERROR/MainProcess] Task redash.tasks.execute_query[766d3f9f-68a6-4a64-8cd9-b7e4e...
pypa__setuptools-2538
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nfrom distutils.util import strtobool\nfrom distutils.debug import DEBUG\nfr...
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nfrom distutils.util import strtobool\nfrom distutils.debug import DEBUG\nfr...
diff --git a/changelog.d/1390.misc.rst b/changelog.d/1390.misc.rst new file mode 100644 index 0000000000..5e4fb11488 --- /dev/null +++ b/changelog.d/1390.misc.rst @@ -0,0 +1 @@ +Validation of Description field now is more lenient, emitting a warning and mangling the value to be valid (replacing newlines with spaces). d...
Newlines in the `description` field produce a malformed PKG-INFO We discovered this accidentally by way of https://github.com/zopefoundation/zc.relation/issues/4#issuecomment-397532224: if you pass a string containing newlines to the `description` argument of `setup()`, setuptools will generate a malformed PKG-INFO. ...
diff --git a/setuptools/dist.py b/setuptools/dist.py --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -121,7 +121,9 @@ def single_line(val): # quick and dirty validation for description pypa/setuptools#1390 if '\n' in val: - raise ValueError("newlines not allowed") + # TODO after 2021-07-31...
{"golden_diff": "diff --git a/setuptools/dist.py b/setuptools/dist.py\n--- a/setuptools/dist.py\n+++ b/setuptools/dist.py\n@@ -121,7 +121,9 @@\n def single_line(val):\n # quick and dirty validation for description pypa/setuptools#1390\n if '\\n' in val:\n- raise ValueError(\"newlines not allowed\")\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Newlines in the `description` field produce a malformed PKG-INFO We discovered this accidentally by way of https://github.com/zopefoundation/zc.relation/issues/4#issuecomment-397532224: if you pass a string c...
encode__django-rest-framework-2948
[ { "content": "from __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.exceptions import ValidationError as DjangoValidationError\nfrom django.core.validators import RegexValidator\nfrom django.forms import ImageField as D...
[ { "content": "from __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.exceptions import ValidationError as DjangoValidationError\nfrom django.core.validators import RegexValidator\nfrom django.forms import ImageField as D...
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 96fcc257a2..d8bb0a0179 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -782,7 +782,8 @@ def to_internal_value(self, data): self.fail('invalid') sign, digittuple, exponent = value.as_tuple() - de...
`max_decimal_places` in Decimal field are wrong calculated We got an issue when number is formatted as `decimal.Decimal('2E+9')`. How `DecimalField` counts decimals: ``` sign, digittuple, exponent = value.as_tuple() decimals = abs(exponent) ``` However result of `decimal.Decimal('2E+9').as_tuple()[2]` is **9...
diff --git a/rest_framework/fields.py b/rest_framework/fields.py --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -782,7 +782,8 @@ self.fail('invalid') sign, digittuple, exponent = value.as_tuple() - decimals = abs(exponent) + decimals = exponent * decimal.Decimal(-...
{"golden_diff": "diff --git a/rest_framework/fields.py b/rest_framework/fields.py\n--- a/rest_framework/fields.py\n+++ b/rest_framework/fields.py\n@@ -782,7 +782,8 @@\n self.fail('invalid')\n \n sign, digittuple, exponent = value.as_tuple()\n- decimals = abs(exponent)\n+ decimals = exp...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `max_decimal_places` in Decimal field are wrong calculated We got an issue when number is formatted as `decimal.Decimal('2E+9')`. How `DecimalField` counts decimals: ``` sign, digittuple, exponent = val...
bokeh__bokeh-6380
[ { "content": "''' Bokeh comes with a number of interactive tools.\n\nThere are five types of tool interactions:\n\n.. hlist::\n :columns: 5\n\n * Pan/Drag\n * Click/Tap\n * Scroll/Pinch\n * Actions\n * Inspectors\n\nFor the first three comprise the category of gesture tools, and only\none tool...
[ { "content": "''' Bokeh comes with a number of interactive tools.\n\nThere are five types of tool interactions:\n\n.. hlist::\n :columns: 5\n\n * Pan/Drag\n * Click/Tap\n * Scroll/Pinch\n * Actions\n * Inspectors\n\nFor the first three comprise the category of gesture tools, and only\none tool...
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py index cfd1559b038..5f30bd5d6be 100644 --- a/bokeh/models/tools.py +++ b/bokeh/models/tools.py @@ -90,7 +90,11 @@ class Inspection(Tool): ''' A base class for tools that perform "inspections", e.g. ``HoverTool``. ''' - pass + toggleable = Bool(...
remove the hover menu item, and keep the hover function working Feature request. I would like to remove the hover menu item, and keep the hover function working
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py --- a/bokeh/models/tools.py +++ b/bokeh/models/tools.py @@ -90,7 +90,11 @@ ''' A base class for tools that perform "inspections", e.g. ``HoverTool``. ''' - pass + toggleable = Bool(True, help=""" + Whether an on/off toggle button should app...
{"golden_diff": "diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py\n--- a/bokeh/models/tools.py\n+++ b/bokeh/models/tools.py\n@@ -90,7 +90,11 @@\n ''' A base class for tools that perform \"inspections\", e.g. ``HoverTool``.\n \n '''\n- pass\n+ toggleable = Bool(True, help=\"\"\"\n+ Whether an ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- remove the hover menu item, and keep the hover function working Feature request. I would like to remove the hover menu item, and keep the hover function working --- END ISSUE --- Below are some cod...
alltheplaces__alltheplaces-3328
[ { "content": "# -*- coding: utf-8 -*-\nimport json\nimport re\n\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass LongHornSteakhouseSpider(scrapy.Spider):\n name = \"longhorn_steakhouse\"\n item_attributes = {'brand': 'LongHorn Steakhouse',...
[ { "content": "# -*- coding: utf-8 -*-\nimport json\nimport re\n\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass LongHornSteakhouseSpider(scrapy.Spider):\n name = \"longhorn_steakhouse\"\n item_attributes = {'brand': 'LongHorn Steakhouse',...
diff --git a/locations/spiders/longhorn_steakhouse.py b/locations/spiders/longhorn_steakhouse.py index 57eec8e79ec..db9448e01e7 100644 --- a/locations/spiders/longhorn_steakhouse.py +++ b/locations/spiders/longhorn_steakhouse.py @@ -18,7 +18,7 @@ class LongHornSteakhouseSpider(scrapy.Spider): custom_settings = { ...
Spider longhorn_steakhouse is broken During the global build at 2021-10-20-14-42-48, spider **longhorn_steakhouse** failed with **0 features** and **0 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-10-20-14-42-48/logs/longhorn_steakhouse.txt) and [the output](https://data.alltheplaces.xyz/runs/2021...
diff --git a/locations/spiders/longhorn_steakhouse.py b/locations/spiders/longhorn_steakhouse.py --- a/locations/spiders/longhorn_steakhouse.py +++ b/locations/spiders/longhorn_steakhouse.py @@ -18,7 +18,7 @@ custom_settings = { 'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, lik...
{"golden_diff": "diff --git a/locations/spiders/longhorn_steakhouse.py b/locations/spiders/longhorn_steakhouse.py\n--- a/locations/spiders/longhorn_steakhouse.py\n+++ b/locations/spiders/longhorn_steakhouse.py\n@@ -18,7 +18,7 @@\n custom_settings = {\n 'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWeb...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spider longhorn_steakhouse is broken During the global build at 2021-10-20-14-42-48, spider **longhorn_steakhouse** failed with **0 features** and **0 errors**. Here's [the log](https://data.alltheplaces.xyz...
carltongibson__django-filter-199
[ { "content": "# flake8: noqa\nfrom __future__ import absolute_import\nfrom .filterset import FilterSet\nfrom .filters import *\n\n__version__ = '0.9.0'\n\n\ndef get_version(version):\n '''\n '0.1.2-dev' -> (0, 1, 2, 'dev')\n '0.1.2' -> (0, 1, 2)\n '''\n v = version.split('.')\n v = v[:-1] + v[...
[ { "content": "# flake8: noqa\nfrom __future__ import absolute_import\nfrom .filterset import FilterSet\nfrom .filters import *\n\n__version__ = '0.9.0'\n\n\ndef parse_version(version):\n '''\n '0.1.2-dev' -> (0, 1, 2, 'dev')\n '0.1.2' -> (0, 1, 2)\n '''\n v = version.split('.')\n v = v[:-1] + ...
diff --git a/django_filters/__init__.py b/django_filters/__init__.py index a44698b1e..596e8844c 100644 --- a/django_filters/__init__.py +++ b/django_filters/__init__.py @@ -6,7 +6,7 @@ __version__ = '0.9.0' -def get_version(version): +def parse_version(version): ''' '0.1.2-dev' -> (0, 1, 2, 'dev') '...
Incompatible with django-debug-toolbar versions panel django-debug-toolbar versions panel expects a parameterless get_version() method. https://github.com/django-debug-toolbar/django-debug-toolbar/blob/master/debug_toolbar/panels/versions.py#L67 Your get_version method requires a parameter (version) https://github.c...
diff --git a/django_filters/__init__.py b/django_filters/__init__.py --- a/django_filters/__init__.py +++ b/django_filters/__init__.py @@ -6,7 +6,7 @@ __version__ = '0.9.0' -def get_version(version): +def parse_version(version): ''' '0.1.2-dev' -> (0, 1, 2, 'dev') '0.1.2' -> (0, 1, 2) @@ -21,4 +21,4...
{"golden_diff": "diff --git a/django_filters/__init__.py b/django_filters/__init__.py\n--- a/django_filters/__init__.py\n+++ b/django_filters/__init__.py\n@@ -6,7 +6,7 @@\n __version__ = '0.9.0'\n \n \n-def get_version(version):\n+def parse_version(version):\n '''\n '0.1.2-dev' -> (0, 1, 2, 'dev')\n '0.1.2'...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Incompatible with django-debug-toolbar versions panel django-debug-toolbar versions panel expects a parameterless get_version() method. https://github.com/django-debug-toolbar/django-debug-toolbar/blob/maste...
Lightning-Universe__lightning-flash-1243
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/docs/extensions/stability.py b/docs/extensions/stability.py index d22408c9f0..057afa9c97 100644 --- a/docs/extensions/stability.py +++ b/docs/extensions/stability.py @@ -20,8 +20,14 @@ <div class="admonition warning {type}"> <p class="admonition-title">{title}</p> - <p>This {scope} is curren...
Docs page describing Beta meaning ## 📚 Documentation Add a page in our docs describing that beta means that one or all of the following are true: - the feature has unstable dependencies - the feature may change without notice in future versions - the feature is not compatible with other flash / pl features - th...
diff --git a/docs/extensions/stability.py b/docs/extensions/stability.py --- a/docs/extensions/stability.py +++ b/docs/extensions/stability.py @@ -20,8 +20,14 @@ <div class="admonition warning {type}"> <p class="admonition-title">{title}</p> - <p>This {scope} is currently in Beta. The interfaces and func...
{"golden_diff": "diff --git a/docs/extensions/stability.py b/docs/extensions/stability.py\n--- a/docs/extensions/stability.py\n+++ b/docs/extensions/stability.py\n@@ -20,8 +20,14 @@\n \n <div class=\"admonition warning {type}\">\n <p class=\"admonition-title\">{title}</p>\n- <p>This {scope} is currently in B...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Docs page describing Beta meaning ## 📚 Documentation Add a page in our docs describing that beta means that one or all of the following are true: - the feature has unstable dependencies - the feature ma...
iterative__dvc-1325
[ { "content": "import os\n\nfrom dvc.exceptions import DvcException\nfrom dvc.logger import Logger\nfrom dvc.utils import fix_env\n\n\nclass SCMError(DvcException):\n pass\n\n\nclass FileNotInRepoError(DvcException):\n pass\n\n\nclass Base(object):\n def __init__(self, root_dir=os.curdir, project=None):...
[ { "content": "import os\n\nfrom dvc.exceptions import DvcException\nfrom dvc.logger import Logger\nfrom dvc.utils import fix_env\n\n\nclass SCMError(DvcException):\n pass\n\n\nclass FileNotInRepoError(DvcException):\n pass\n\n\nclass Base(object):\n def __init__(self, root_dir=os.curdir, project=None):...
diff --git a/dvc/scm.py b/dvc/scm.py index e490397211..e32ed2913c 100644 --- a/dvc/scm.py +++ b/dvc/scm.py @@ -151,7 +151,8 @@ def ignore_file(self): def _get_gitignore(self, path): assert os.path.isabs(path) - entry = os.path.basename(path) + # NOTE: using '/' prefix to make path unambigu...
gitignore: use unambiguous paths E.g. `/dir` instead of `dir`.
diff --git a/dvc/scm.py b/dvc/scm.py --- a/dvc/scm.py +++ b/dvc/scm.py @@ -151,7 +151,8 @@ def _get_gitignore(self, path): assert os.path.isabs(path) - entry = os.path.basename(path) + # NOTE: using '/' prefix to make path unambiguous + entry = '/' + os.path.basename(path) ...
{"golden_diff": "diff --git a/dvc/scm.py b/dvc/scm.py\n--- a/dvc/scm.py\n+++ b/dvc/scm.py\n@@ -151,7 +151,8 @@\n \n def _get_gitignore(self, path):\n assert os.path.isabs(path)\n- entry = os.path.basename(path)\n+ # NOTE: using '/' prefix to make path unambiguous\n+ entry = '/' + os.pat...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- gitignore: use unambiguous paths E.g. `/dir` instead of `dir`. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Pat...
fidals__shopelectro-415
[ { "content": "import datetime\nimport math\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.humanize.templatetags.humanize import intcomma\nfrom django.template.defaultfilters import floatformat\nfrom django.urls import reverse\n\nfrom images.models import ImageMixin\nfrom p...
[ { "content": "import datetime\nimport math\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.humanize.templatetags.humanize import intcomma\nfrom django.template.defaultfilters import floatformat\nfrom django.urls import reverse\n\nfrom images.models import ImageMixin\nfrom p...
diff --git a/shopelectro/templatetags/se_extras.py b/shopelectro/templatetags/se_extras.py index 0788551d..94325d79 100644 --- a/shopelectro/templatetags/se_extras.py +++ b/shopelectro/templatetags/se_extras.py @@ -20,10 +20,13 @@ @register.simple_tag def roots(): return sorted( - Category.objects - ...
Убери пункт меню Убери mp3 колонки из меню. Их больше не будет. Я зашел в админку и выключил категорию. Надеюсь правильно ) http://prntscr.com/k553lt
diff --git a/shopelectro/templatetags/se_extras.py b/shopelectro/templatetags/se_extras.py --- a/shopelectro/templatetags/se_extras.py +++ b/shopelectro/templatetags/se_extras.py @@ -20,10 +20,13 @@ @register.simple_tag def roots(): return sorted( - Category.objects - .select_related('page') - ...
{"golden_diff": "diff --git a/shopelectro/templatetags/se_extras.py b/shopelectro/templatetags/se_extras.py\n--- a/shopelectro/templatetags/se_extras.py\n+++ b/shopelectro/templatetags/se_extras.py\n@@ -20,10 +20,13 @@\n @register.simple_tag\n def roots():\n return sorted(\n- Category.objects\n- .sele...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Убери пункт меню Убери mp3 колонки из меню. Их больше не будет. Я зашел в админку и выключил категорию. Надеюсь правильно ) http://prntscr.com/k553lt --- END ISSUE --- Below are some code segments, each ...
Lightning-AI__torchmetrics-1288
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f1ba96656..353486370ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changed minimum Pytorch version to be 1.8 ([#1263](https://github.com/Lightning-AI/metrics/pull/1263)...
inplace operation in pairwise_cosine_similarity ## 🐛 Bug Hello ! The x, y values are modified inplace in the `pairwise_cosine_similarity` function. This is not documented and may cause bugs that are difficult to find. Thank you. ### To Reproduce ```python import torch from torchmetrics.functional import ...
diff --git a/src/torchmetrics/functional/pairwise/cosine.py b/src/torchmetrics/functional/pairwise/cosine.py --- a/src/torchmetrics/functional/pairwise/cosine.py +++ b/src/torchmetrics/functional/pairwise/cosine.py @@ -34,9 +34,9 @@ x, y, zero_diagonal = _check_input(x, y, zero_diagonal) norm = torch.norm(x...
{"golden_diff": "diff --git a/src/torchmetrics/functional/pairwise/cosine.py b/src/torchmetrics/functional/pairwise/cosine.py\n--- a/src/torchmetrics/functional/pairwise/cosine.py\n+++ b/src/torchmetrics/functional/pairwise/cosine.py\n@@ -34,9 +34,9 @@\n x, y, zero_diagonal = _check_input(x, y, zero_diagonal)\n \n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- inplace operation in pairwise_cosine_similarity ## 🐛 Bug Hello ! The x, y values are modified inplace in the `pairwise_cosine_similarity` function. This is not documented and may cause bugs that are diff...
Pycord-Development__pycord-576
[ { "content": "import discord\r\n\r\nbot = discord.Bot()\r\n\r\n# If you use commands.Bot, @bot.slash_command should be used for\r\n# slash commands. You can use @bot.slash_command with discord.Bot as well\r\n\r\nmath = bot.command_group(\r\n \"math\", \"Commands related to mathematics.\"\r\n) # create a sla...
[ { "content": "import discord\r\n\r\nbot = discord.Bot()\r\n\r\n# If you use commands.Bot, @bot.slash_command should be used for\r\n# slash commands. You can use @bot.slash_command with discord.Bot as well\r\n\r\nmath = bot.create_group(\r\n \"math\", \"Commands related to mathematics.\"\r\n) # create a slas...
diff --git a/examples/app_commands/slash_groups.py b/examples/app_commands/slash_groups.py index ae59b0d35a..ad3a70ba50 100644 --- a/examples/app_commands/slash_groups.py +++ b/examples/app_commands/slash_groups.py @@ -5,7 +5,7 @@ # If you use commands.Bot, @bot.slash_command should be used for # slash commands. You...
SlashCommand Groups Issues This issue is to keep track of the issues since we reworked groups.
diff --git a/examples/app_commands/slash_groups.py b/examples/app_commands/slash_groups.py --- a/examples/app_commands/slash_groups.py +++ b/examples/app_commands/slash_groups.py @@ -5,7 +5,7 @@ # If you use commands.Bot, @bot.slash_command should be used for # slash commands. You can use @bot.slash_command with dis...
{"golden_diff": "diff --git a/examples/app_commands/slash_groups.py b/examples/app_commands/slash_groups.py\n--- a/examples/app_commands/slash_groups.py\n+++ b/examples/app_commands/slash_groups.py\n@@ -5,7 +5,7 @@\n # If you use commands.Bot, @bot.slash_command should be used for\r\n # slash commands. You can use @bot...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- SlashCommand Groups Issues This issue is to keep track of the issues since we reworked groups. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may conta...
deis__deis-3403
[ { "content": "import cStringIO\nimport base64\nimport copy\nimport httplib\nimport json\nimport paramiko\nimport socket\nimport re\nimport time\n\nfrom django.conf import settings\n\nfrom .states import JobState\n\n\nMATCH = re.compile(\n '(?P<app>[a-z0-9-]+)_?(?P<version>v[0-9]+)?\\.?(?P<c_type>[a-z-_]+)?.(...
[ { "content": "import cStringIO\nimport base64\nimport copy\nimport httplib\nimport json\nimport paramiko\nimport socket\nimport re\nimport time\n\nfrom django.conf import settings\n\nfrom .states import JobState\n\n\nMATCH = re.compile(\n '(?P<app>[a-z0-9-]+)_?(?P<version>v[0-9]+)?\\.?(?P<c_type>[a-z-_]+)?.(...
diff --git a/controller/scheduler/fleet.py b/controller/scheduler/fleet.py index 5574a44afd..342391f430 100644 --- a/controller/scheduler/fleet.py +++ b/controller/scheduler/fleet.py @@ -268,7 +268,8 @@ def _do_ssh(cmd): chan.get_pty() out = chan.makefile() chan.exec_c...
deis run cannot handle large output I need to get a large generated text file from deis. I do the following `deis run -- cat foo` If foo is large enough, in my case is (7468 lines 26438 words 186989 bytes) , then `deis run` hangs and no output gets displayed. Running `deis logs` afterwards shows the full output o...
diff --git a/controller/scheduler/fleet.py b/controller/scheduler/fleet.py --- a/controller/scheduler/fleet.py +++ b/controller/scheduler/fleet.py @@ -268,7 +268,8 @@ chan.get_pty() out = chan.makefile() chan.exec_command(cmd) - rc, output = chan.recv_ex...
{"golden_diff": "diff --git a/controller/scheduler/fleet.py b/controller/scheduler/fleet.py\n--- a/controller/scheduler/fleet.py\n+++ b/controller/scheduler/fleet.py\n@@ -268,7 +268,8 @@\n chan.get_pty()\n out = chan.makefile()\n chan.exec_command(cmd)\n- r...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- deis run cannot handle large output I need to get a large generated text file from deis. I do the following `deis run -- cat foo` If foo is large enough, in my case is (7468 lines 26438 words 186989 byte...
interlegis__sapl-3164
[ { "content": "from sapl.utils import register_all_models_in_admin\n\nregister_all_models_in_admin(__name__)\n", "path": "sapl/compilacao/admin.py" } ]
[ { "content": "from django.contrib import admin\nfrom sapl.compilacao.models import TipoDispositivo\nfrom sapl.utils import register_all_models_in_admin\n\nregister_all_models_in_admin(__name__)\nadmin.site.unregister(TipoDispositivo)\n\n\n@admin.register(TipoDispositivo)\nclass TipoDispositivoAdmin(admin.ModelA...
diff --git a/sapl/compilacao/admin.py b/sapl/compilacao/admin.py index 5c02ebd40..6f1ffbd5a 100644 --- a/sapl/compilacao/admin.py +++ b/sapl/compilacao/admin.py @@ -1,3 +1,12 @@ +from django.contrib import admin +from sapl.compilacao.models import TipoDispositivo from sapl.utils import register_all_models_in_admin ...
Não permitir que se altere campos rotulo_prefixo_texto e rotulo_sufixo_texto via interface admin <!--- Forneça um resumo geral da _issue_ no título acima --> ## Comportamento Esperado <!--- Se você está descrevendo um _bug_, conte-nos o que deveria acontecer. --> <!--- Se você está sugerindo uma mudança/melhoria, ...
diff --git a/sapl/compilacao/admin.py b/sapl/compilacao/admin.py --- a/sapl/compilacao/admin.py +++ b/sapl/compilacao/admin.py @@ -1,3 +1,12 @@ +from django.contrib import admin +from sapl.compilacao.models import TipoDispositivo from sapl.utils import register_all_models_in_admin register_all_models_in_admin(__nam...
{"golden_diff": "diff --git a/sapl/compilacao/admin.py b/sapl/compilacao/admin.py\n--- a/sapl/compilacao/admin.py\n+++ b/sapl/compilacao/admin.py\n@@ -1,3 +1,12 @@\n+from django.contrib import admin\n+from sapl.compilacao.models import TipoDispositivo\n from sapl.utils import register_all_models_in_admin\n \n register_...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Não permitir que se altere campos rotulo_prefixo_texto e rotulo_sufixo_texto via interface admin <!--- Forneça um resumo geral da _issue_ no título acima --> ## Comportamento Esperado <!--- Se você está d...
tobymao__sqlglot-3482
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n NormalizationStrategy,\n arrow_json_extract_sql,\n date_add_interval_sql,\n datestrtodate_sql,\n build_f...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n NormalizationStrategy,\n arrow_json_extract_sql,\n date_add_interval_sql,\n datestrtodate_sql,\n build_f...
diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py index 66daba1521..f18f8de9ae 100644 --- a/sqlglot/dialects/mysql.py +++ b/sqlglot/dialects/mysql.py @@ -805,6 +805,9 @@ class Generator(generator.Generator): exp.DataType.Type.TIMESTAMPLTZ, } + def dpipe_sql(self, expressi...
[bug] pgsql to mysql special character || Semantic mismatch **Before you file an issue** - Make sure you specify the "read" dialect eg. `parse_one(sql, read="spark")` - Make sure you specify the "write" dialect eg. `ast.sql(dialect="duckdb")` - Check if the issue still exists on main **Fully reproducible code sni...
diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py --- a/sqlglot/dialects/mysql.py +++ b/sqlglot/dialects/mysql.py @@ -805,6 +805,9 @@ exp.DataType.Type.TIMESTAMPLTZ, } + def dpipe_sql(self, expression: exp.DPipe) -> str: + return self.func("CONCAT", *expression...
{"golden_diff": "diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py\n--- a/sqlglot/dialects/mysql.py\n+++ b/sqlglot/dialects/mysql.py\n@@ -805,6 +805,9 @@\n exp.DataType.Type.TIMESTAMPLTZ,\n }\n \n+ def dpipe_sql(self, expression: exp.DPipe) -> str:\n+ return self.f...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [bug] pgsql to mysql special character || Semantic mismatch **Before you file an issue** - Make sure you specify the "read" dialect eg. `parse_one(sql, read="spark")` - Make sure you specify the "write" dia...
open-mmlab__mmpose-267
[ { "content": "import logging\n\nimport torch\nimport torch.nn as nn\nimport torch.utils.checkpoint as cp\nfrom mmcv.cnn import (ConvModule, build_activation_layer, constant_init,\n normal_init)\nfrom torch.nn.modules.batchnorm import _BatchNorm\n\nfrom ..registry import BACKBONES\nfrom .bas...
[ { "content": "import logging\n\nimport torch\nimport torch.nn as nn\nimport torch.utils.checkpoint as cp\nfrom mmcv.cnn import (ConvModule, build_activation_layer, constant_init,\n normal_init)\nfrom torch.nn.modules.batchnorm import _BatchNorm\n\nfrom ..registry import BACKBONES\nfrom .bas...
diff --git a/mmpose/models/backbones/shufflenet_v1.py b/mmpose/models/backbones/shufflenet_v1.py index b79805925a..228769fd50 100644 --- a/mmpose/models/backbones/shufflenet_v1.py +++ b/mmpose/models/backbones/shufflenet_v1.py @@ -235,7 +235,7 @@ def __init__(self, self.layers = nn.ModuleList() for ...
Pylint: R1719 ```bash mmpose/models/backbones/shufflenet_v1.py:238:26: R1719: The if expression can be replaced with 'test' (simplifiable-if-expression) ```
diff --git a/mmpose/models/backbones/shufflenet_v1.py b/mmpose/models/backbones/shufflenet_v1.py --- a/mmpose/models/backbones/shufflenet_v1.py +++ b/mmpose/models/backbones/shufflenet_v1.py @@ -235,7 +235,7 @@ self.layers = nn.ModuleList() for i, num_blocks in enumerate(self.stage_blocks): - ...
{"golden_diff": "diff --git a/mmpose/models/backbones/shufflenet_v1.py b/mmpose/models/backbones/shufflenet_v1.py\n--- a/mmpose/models/backbones/shufflenet_v1.py\n+++ b/mmpose/models/backbones/shufflenet_v1.py\n@@ -235,7 +235,7 @@\n \n self.layers = nn.ModuleList()\n for i, num_blocks in enumerate(self....
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pylint: R1719 ```bash mmpose/models/backbones/shufflenet_v1.py:238:26: R1719: The if expression can be replaced with 'test' (simplifiable-if-expression) ``` --- END ISSUE --- Below are some code segments,...
lutris__lutris-998
[ { "content": "import os\nfrom gi.repository import Gtk, Pango\n\nfrom lutris import runners, settings\nfrom lutris.config import LutrisConfig, TEMP_CONFIG, make_game_config_id\nfrom lutris.game import Game\nfrom lutris import gui\nfrom lutris.gui.config_boxes import GameBox, RunnerBox, SystemBox\nfrom lutris.gu...
[ { "content": "import os\nfrom gi.repository import Gtk, Pango\n\nfrom lutris import runners, settings\nfrom lutris.config import LutrisConfig, TEMP_CONFIG, make_game_config_id\nfrom lutris.game import Game\nfrom lutris import gui\nfrom lutris.gui.config_boxes import GameBox, RunnerBox, SystemBox\nfrom lutris.gu...
diff --git a/lutris/gui/config_dialogs.py b/lutris/gui/config_dialogs.py index 916af1afd0..a43ffb7260 100644 --- a/lutris/gui/config_dialogs.py +++ b/lutris/gui/config_dialogs.py @@ -335,6 +335,9 @@ def is_valid(self): if not name: ErrorDialog("Please fill in the name") return False +...
Prevent crash when saving wine game without appid Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/lutris/gui/config_dialogs.py", line 369, in on_save self.game.steamid = self.lutris_config.game_config['appid'] KeyError: 'appid'
diff --git a/lutris/gui/config_dialogs.py b/lutris/gui/config_dialogs.py --- a/lutris/gui/config_dialogs.py +++ b/lutris/gui/config_dialogs.py @@ -335,6 +335,9 @@ if not name: ErrorDialog("Please fill in the name") return False + if self.runner_name in ('steam', 'winesteam') an...
{"golden_diff": "diff --git a/lutris/gui/config_dialogs.py b/lutris/gui/config_dialogs.py\n--- a/lutris/gui/config_dialogs.py\n+++ b/lutris/gui/config_dialogs.py\n@@ -335,6 +335,9 @@\n if not name:\n ErrorDialog(\"Please fill in the name\")\n return False\n+ if self.runner_name in...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Prevent crash when saving wine game without appid Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/lutris/gui/config_dialogs.py", line 369, in on_save self.game.steamid = self...
beetbox__beets-3868
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py index a982809c45..e80c8c29ea 100644 --- a/beetsplug/web/__init__.py +++ b/beetsplug/web/__init__.py @@ -59,7 +59,10 @@ def _rep(obj, expand=False): return out elif isinstance(obj, beets.library.Album): - del out['artpath'] + ...
web: GET /album/<n> hides artpath even when INCLUDE_PATHS is set ### Problem `beet web` provides GET operations to fetch track items and albums. By default this removes paths from the returned data, but the config setting INCLUDE_PATHS should allow the paths to be returned. This works correctly for GET /item/......
diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py --- a/beetsplug/web/__init__.py +++ b/beetsplug/web/__init__.py @@ -59,7 +59,10 @@ return out elif isinstance(obj, beets.library.Album): - del out['artpath'] + if app.config.get('INCLUDE_PATHS', False): + out['ar...
{"golden_diff": "diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py\n--- a/beetsplug/web/__init__.py\n+++ b/beetsplug/web/__init__.py\n@@ -59,7 +59,10 @@\n return out\n \n elif isinstance(obj, beets.library.Album):\n- del out['artpath']\n+ if app.config.get('INCLUDE_PATHS', Fal...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- web: GET /album/<n> hides artpath even when INCLUDE_PATHS is set ### Problem `beet web` provides GET operations to fetch track items and albums. By default this removes paths from the returned data, but t...
dj-stripe__dj-stripe-701
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. module:: djstripe.fields.\n\n :synopsis: dj-stripe Custom Field Definitions\n\n.. moduleauthor:: Bill Huneke (@wahuneke)\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport decimal\n\nfrom django.core.exception...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. module:: djstripe.fields.\n\n :synopsis: dj-stripe Custom Field Definitions\n\n.. moduleauthor:: Bill Huneke (@wahuneke)\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport decimal\n\nfrom django.core.exception...
diff --git a/djstripe/fields.py b/djstripe/fields.py index 316b236623..615301efc7 100644 --- a/djstripe/fields.py +++ b/djstripe/fields.py @@ -174,7 +174,7 @@ def __init__(self, enum, *args, **kwargs): super(StripeEnumField, self).__init__(*args, **defaults) def deconstruct(self): - name, path, a...
1.1.0 not compatible with python 2 First of all, thanks a lot for your hard work! We've been using dj-stripe for a long time and it has served us well. Now we're ready to upgrade! Let the fun begin ;). We're using python 2 and Django 1.11. I'm correct that 1.2 should support that right? Anyway we have to move to 1.1...
diff --git a/djstripe/fields.py b/djstripe/fields.py --- a/djstripe/fields.py +++ b/djstripe/fields.py @@ -174,7 +174,7 @@ super(StripeEnumField, self).__init__(*args, **defaults) def deconstruct(self): - name, path, args, kwargs = super().deconstruct() + name, path, args, kwargs = super(S...
{"golden_diff": "diff --git a/djstripe/fields.py b/djstripe/fields.py\n--- a/djstripe/fields.py\n+++ b/djstripe/fields.py\n@@ -174,7 +174,7 @@\n super(StripeEnumField, self).__init__(*args, **defaults)\n \n def deconstruct(self):\n- name, path, args, kwargs = super().deconstruct()\n+ name, pat...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- 1.1.0 not compatible with python 2 First of all, thanks a lot for your hard work! We've been using dj-stripe for a long time and it has served us well. Now we're ready to upgrade! Let the fun begin ;). We'...
pwr-Solaar__Solaar-1504
[ { "content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your...
[ { "content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your...
diff --git a/lib/solaar/ui/tray.py b/lib/solaar/ui/tray.py index e488f8c3f6..876ae3a406 100644 --- a/lib/solaar/ui/tray.py +++ b/lib/solaar/ui/tray.py @@ -84,9 +84,7 @@ def _scroll(tray_icon, event, direction=None): # ignore all other directions return - if len(_devices_info) < 4: - # don'...
Allow scrolling over tray icon to switch between icons when there are fewer than 4 devices **Information** <!-- Please update to Solaar from this repository before asking for a new feature. --> - Solaar version (`solaar --version` and `git describe --tags`): solaar 1.1.1, 1.1.1-135-gd115ade **Is your feature r...
diff --git a/lib/solaar/ui/tray.py b/lib/solaar/ui/tray.py --- a/lib/solaar/ui/tray.py +++ b/lib/solaar/ui/tray.py @@ -84,9 +84,7 @@ # ignore all other directions return - if len(_devices_info) < 4: - # don't bother with scrolling when there's only one receiver - # with only one or ...
{"golden_diff": "diff --git a/lib/solaar/ui/tray.py b/lib/solaar/ui/tray.py\n--- a/lib/solaar/ui/tray.py\n+++ b/lib/solaar/ui/tray.py\n@@ -84,9 +84,7 @@\n # ignore all other directions\n return\n \n- if len(_devices_info) < 4:\n- # don't bother with scrolling when there's only one receiver\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Allow scrolling over tray icon to switch between icons when there are fewer than 4 devices **Information** <!-- Please update to Solaar from this repository before asking for a new feature. --> - Solaar ver...
aio-libs__aiohttp-1752
[ { "content": "import io\nfrom urllib.parse import urlencode\n\nfrom multidict import MultiDict, MultiDictProxy\n\nfrom . import hdrs, multipart, payload\nfrom .helpers import guess_filename\n\n__all__ = ('FormData',)\n\n\nclass FormData:\n \"\"\"Helper class for multipart/form-data and\n application/x-www...
[ { "content": "import io\nfrom urllib.parse import urlencode\n\nfrom multidict import MultiDict, MultiDictProxy\n\nfrom . import hdrs, multipart, payload\nfrom .helpers import guess_filename\n\n__all__ = ('FormData',)\n\n\nclass FormData:\n \"\"\"Helper class for multipart/form-data and\n application/x-www...
diff --git a/aiohttp/formdata.py b/aiohttp/formdata.py index e6fb1f9b7bc..2a141dc6bf5 100644 --- a/aiohttp/formdata.py +++ b/aiohttp/formdata.py @@ -96,7 +96,7 @@ def _gen_form_urlencoded(self): charset = self._charset if self._charset is not None else 'utf-8' return payload.BytesPayload( - ...
Encoding is always UTF-8 in POST data ## Long story short I'm doing a `POST` request via `client.post`: ``` data = aiohttp.FormData({ 'FindText': name, }, charset='windows-1251') client.post(base_url, params={'RowFrom': offset}, data=data) ``` where `name` contains some none-latin te...
diff --git a/aiohttp/formdata.py b/aiohttp/formdata.py --- a/aiohttp/formdata.py +++ b/aiohttp/formdata.py @@ -96,7 +96,7 @@ charset = self._charset if self._charset is not None else 'utf-8' return payload.BytesPayload( - urlencode(data, doseq=True).encode(charset), + urlencode...
{"golden_diff": "diff --git a/aiohttp/formdata.py b/aiohttp/formdata.py\n--- a/aiohttp/formdata.py\n+++ b/aiohttp/formdata.py\n@@ -96,7 +96,7 @@\n \n charset = self._charset if self._charset is not None else 'utf-8'\n return payload.BytesPayload(\n- urlencode(data, doseq=True).encode(charset)...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Encoding is always UTF-8 in POST data ## Long story short I'm doing a `POST` request via `client.post`: ``` data = aiohttp.FormData({ 'FindText': name, }, charset='windows-1251') ...
psf__black-4028
[ { "content": "import itertools\nimport math\nimport sys\nfrom dataclasses import dataclass, field\nfrom typing import (\n Callable,\n Dict,\n Iterator,\n List,\n Optional,\n Sequence,\n Tuple,\n TypeVar,\n Union,\n cast,\n)\n\nfrom black.brackets import COMMA_PRIORITY, DOT_PRIORITY...
[ { "content": "import itertools\nimport math\nimport sys\nfrom dataclasses import dataclass, field\nfrom typing import (\n Callable,\n Dict,\n Iterator,\n List,\n Optional,\n Sequence,\n Tuple,\n TypeVar,\n Union,\n cast,\n)\n\nfrom black.brackets import COMMA_PRIORITY, DOT_PRIORITY...
diff --git a/CHANGES.md b/CHANGES.md index 97084a2bfc1..a68f87bfc12 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,8 @@ indented less (#3964) - Multiline list and dict unpacking as the sole argument to a function is now also indented less (#3992) +- Keep requiring two empty lines between module-level docs...
Conflict in blank lines after module docstring and before function Using macOS: ```sh $ black --version black, 23.10.1 (compiled: yes) Python (CPython) 3.10.12 ``` Take this code: ```python """This is a test case, note blank lines next.""" def go(): print("Do stuff!") go() ``` And run this: ...
diff --git a/src/black/lines.py b/src/black/lines.py --- a/src/black/lines.py +++ b/src/black/lines.py @@ -578,6 +578,7 @@ and self.previous_block.previous_block is None and len(self.previous_block.original_line.leaves) == 1 and self.previous_block.original_line.is_triple_quoted_s...
{"golden_diff": "diff --git a/src/black/lines.py b/src/black/lines.py\n--- a/src/black/lines.py\n+++ b/src/black/lines.py\n@@ -578,6 +578,7 @@\n and self.previous_block.previous_block is None\n and len(self.previous_block.original_line.leaves) == 1\n and self.previous_block.original_...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Conflict in blank lines after module docstring and before function Using macOS: ```sh $ black --version black, 23.10.1 (compiled: yes) Python (CPython) 3.10.12 ``` Take this code: ```python """T...
TheAlgorithms__Python-295
[ { "content": "'''\nProblem Statement:\nIf we list all the natural numbers below 10 that are multiples of 3 or 5,\nwe get 3,5,6 and 9. The sum of these multiples is 23.\nFind the sum of all the multiples of 3 or 5 below N.\n'''\nfrom __future__ import print_function\ntry:\n raw_input # Python 2\nexce...
[ { "content": "'''\nProblem Statement:\nIf we list all the natural numbers below 10 that are multiples of 3 or 5,\nwe get 3,5,6 and 9. The sum of these multiples is 23.\nFind the sum of all the multiples of 3 or 5 below N.\n'''\nfrom __future__ import print_function\ntry:\n raw_input # Python 2\nexce...
diff --git a/Project Euler/Problem 01/sol2.py b/Project Euler/Problem 01/sol2.py index d330387e98ab..2b7760e0bfff 100644 --- a/Project Euler/Problem 01/sol2.py +++ b/Project Euler/Problem 01/sol2.py @@ -11,10 +11,10 @@ raw_input = input # Python 3 n = int(raw_input().strip()) sum = 0 -terms = (n-1)/3 -sum+= (...
ProjectEuler -- Problem 1 -- solv2.py -- Error For the Input ```1000``` I get ```233366.4```. The correct answer should be ```233168``` See [file](https://github.com/TheAlgorithms/Python/blob/master/Project%20Euler/Problem%2001/sol2.py)
diff --git a/Project Euler/Problem 01/sol2.py b/Project Euler/Problem 01/sol2.py --- a/Project Euler/Problem 01/sol2.py +++ b/Project Euler/Problem 01/sol2.py @@ -11,10 +11,10 @@ raw_input = input # Python 3 n = int(raw_input().strip()) sum = 0 -terms = (n-1)/3 -sum+= ((terms)*(6+(terms-1)*3))/2 #sum of an A....
{"golden_diff": "diff --git a/Project Euler/Problem 01/sol2.py b/Project Euler/Problem 01/sol2.py\n--- a/Project Euler/Problem 01/sol2.py\t\n+++ b/Project Euler/Problem 01/sol2.py\t\n@@ -11,10 +11,10 @@\n raw_input = input # Python 3\n n = int(raw_input().strip())\n sum = 0\n-terms = (n-1)/3\n-sum+= ((terms)*(6+(t...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ProjectEuler -- Problem 1 -- solv2.py -- Error For the Input ```1000``` I get ```233366.4```. The correct answer should be ```233168``` See [file](https://github.com/TheAlgorithms/Python/blob/master/Project...
mars-project__mars-284
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
diff --git a/mars/fuse.pyx b/mars/fuse.pyx index c12f2d6796..203191060e 100644 --- a/mars/fuse.pyx +++ b/mars/fuse.pyx @@ -41,7 +41,7 @@ class Fusion(object): for c in composes: head_node = c[0] tail_node = c[-1] - fuse_op = TensorFuseChunk(dtype=tail_node.dtype, _key=tail_...
[BUG] Fuse operand's sparse value is wrong <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue. --> **Describe the bug** A fuse operand's sparseness should be the same as tail node's, it is not set correctly now. **To ...
diff --git a/mars/tensor/expressions/fuse/core.py b/mars/tensor/expressions/fuse/core.py --- a/mars/tensor/expressions/fuse/core.py +++ b/mars/tensor/expressions/fuse/core.py @@ -20,8 +20,8 @@ class TensorFuseChunk(operands.Fuse, TensorOperandMixin): - def __init__(self, dtype=None, **kw): - super(Tensor...
{"golden_diff": "diff --git a/mars/tensor/expressions/fuse/core.py b/mars/tensor/expressions/fuse/core.py\n--- a/mars/tensor/expressions/fuse/core.py\n+++ b/mars/tensor/expressions/fuse/core.py\n@@ -20,8 +20,8 @@\n \n \n class TensorFuseChunk(operands.Fuse, TensorOperandMixin):\n- def __init__(self, dtype=None, **kw...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Fuse operand's sparse value is wrong <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue. --> **Describe...
bookwyrm-social__bookwyrm-505
[ { "content": "''' handles all the activity coming out of the server '''\nimport re\n\nfrom django.db import IntegrityError, transaction\nfrom django.http import JsonResponse\nfrom django.shortcuts import get_object_or_404\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.views.decorators.http i...
[ { "content": "''' handles all the activity coming out of the server '''\nimport re\n\nfrom django.db import IntegrityError, transaction\nfrom django.http import JsonResponse\nfrom django.shortcuts import get_object_or_404\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.views.decorators.http i...
diff --git a/bookwyrm/outgoing.py b/bookwyrm/outgoing.py index bc170748a5..9421ca3915 100644 --- a/bookwyrm/outgoing.py +++ b/bookwyrm/outgoing.py @@ -296,7 +296,7 @@ def find_mentions(content): def format_links(content): ''' detect and format links ''' return re.sub( - r'([^(href=")]|^)(https?:\/\/(%...
urls in parens don't parse as links
diff --git a/bookwyrm/outgoing.py b/bookwyrm/outgoing.py --- a/bookwyrm/outgoing.py +++ b/bookwyrm/outgoing.py @@ -296,7 +296,7 @@ def format_links(content): ''' detect and format links ''' return re.sub( - r'([^(href=")]|^)(https?:\/\/(%s([\w\.\-_\/+&\?=:;,])*))' % \ + r'([^(href=")]|^|\()(htt...
{"golden_diff": "diff --git a/bookwyrm/outgoing.py b/bookwyrm/outgoing.py\n--- a/bookwyrm/outgoing.py\n+++ b/bookwyrm/outgoing.py\n@@ -296,7 +296,7 @@\n def format_links(content):\n ''' detect and format links '''\n return re.sub(\n- r'([^(href=\")]|^)(https?:\\/\\/(%s([\\w\\.\\-_\\/+&\\?=:;,])*))' % \\\...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- urls in parens don't parse as links --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `bookwyrm/outgoing.py` ...
modin-project__modin-2171
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ...
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ...
diff --git a/modin/experimental/engines/omnisci_on_ray/frame/data.py b/modin/experimental/engines/omnisci_on_ray/frame/data.py index 03b2ea85394..3cb4ddbcb7d 100644 --- a/modin/experimental/engines/omnisci_on_ray/frame/data.py +++ b/modin/experimental/engines/omnisci_on_ray/frame/data.py @@ -562,6 +562,9 @@ def _union_...
[REFACTOR] Concat for a single frame shouldn't cause additional operations Currently, in OmniSci engine concat execution for a single frame adds an additional projection (which ais basically NOP). In some corner cases it may cause inefficiency (especially when API layer triggers frame execution). The esiest solution he...
diff --git a/modin/experimental/engines/omnisci_on_ray/frame/data.py b/modin/experimental/engines/omnisci_on_ray/frame/data.py --- a/modin/experimental/engines/omnisci_on_ray/frame/data.py +++ b/modin/experimental/engines/omnisci_on_ray/frame/data.py @@ -562,6 +562,9 @@ def _concat( self, axis, other_modi...
{"golden_diff": "diff --git a/modin/experimental/engines/omnisci_on_ray/frame/data.py b/modin/experimental/engines/omnisci_on_ray/frame/data.py\n--- a/modin/experimental/engines/omnisci_on_ray/frame/data.py\n+++ b/modin/experimental/engines/omnisci_on_ray/frame/data.py\n@@ -562,6 +562,9 @@\n def _concat(\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [REFACTOR] Concat for a single frame shouldn't cause additional operations Currently, in OmniSci engine concat execution for a single frame adds an additional projection (which ais basically NOP). In some cor...
ckan__ckan-7353
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport os\nimport sys\nimport time\nimport inspect\nimport itertools\nimport pkgutil\nimport logging\n\nfrom logging.handlers import SMTPHandler\nfrom typing import Any, Iterable, Optional, Union, cast\n\nfrom flask import Blueprint, send_fr...
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport os\nimport sys\nimport time\nimport inspect\nimport itertools\nimport pkgutil\nimport logging\n\nfrom logging.handlers import SMTPHandler\nfrom typing import Any, Iterable, Optional, Union, cast\n\nfrom flask import Blueprint, send_fr...
diff --git a/ckan/config/middleware/flask_app.py b/ckan/config/middleware/flask_app.py index cd8af95459b..a0a4ab8a9ac 100644 --- a/ckan/config/middleware/flask_app.py +++ b/ckan/config/middleware/flask_app.py @@ -262,7 +262,10 @@ def make_flask_stack(conf: Union[Config, CKANConfig]) -> CKANApp: _register_error_han...
No default for WTF_CSRF_SECRET_KEY config option ## CKAN version 2.10 ## Describe the bug The `WTF_CSRF_SECRET_KEY` config option, used to generate the CSRF tokens is defined as such in the declaration: https://github.com/ckan/ckan/blob/9e60350f27c9266b5afbd741484265c5e06a2d38/ckan/config/config_declaration....
diff --git a/ckan/config/middleware/flask_app.py b/ckan/config/middleware/flask_app.py --- a/ckan/config/middleware/flask_app.py +++ b/ckan/config/middleware/flask_app.py @@ -262,7 +262,10 @@ _register_error_handler(app) # CSRF - app.config['WTF_CSRF_FIELD_NAME'] = "_csrf_token" + wtf_key = "WTF_CSRF_...
{"golden_diff": "diff --git a/ckan/config/middleware/flask_app.py b/ckan/config/middleware/flask_app.py\n--- a/ckan/config/middleware/flask_app.py\n+++ b/ckan/config/middleware/flask_app.py\n@@ -262,7 +262,10 @@\n _register_error_handler(app)\n \n # CSRF\n- app.config['WTF_CSRF_FIELD_NAME'] = \"_csrf_token\"...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- No default for WTF_CSRF_SECRET_KEY config option ## CKAN version 2.10 ## Describe the bug The `WTF_CSRF_SECRET_KEY` config option, used to generate the CSRF tokens is defined as such in the declaratio...