in_source_id
stringlengths
13
58
issue
stringlengths
3
241k
before_files
listlengths
0
3
after_files
listlengths
0
3
pr_diff
stringlengths
109
107M
⌀
celery__celery-5752
DatabaseBackend._update_result() have an error property. python 3.7 celery 4.4.0rc3 The result has an error value NULL for the name in my backend(mysql), but it's work well when I use redis as my backend. After I change this error in `backends/database/__init__.py` [135], alter 'task_name' to 'task', I get the...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"SQLAlchemy result store backend.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport logging\nfrom contextlib import contextmanager\n\nfrom kombu.utils.encoding import ensure_bytes\nfrom vine.utils import wraps\n\nfrom celery import states\nfrom...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"SQLAlchemy result store backend.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport logging\nfrom contextlib import contextmanager\n\nfrom kombu.utils.encoding import ensure_bytes\nfrom vine.utils import wraps\n\nfrom celery import states\nfrom...
diff --git a/celery/backends/database/__init__.py b/celery/backends/database/__init__.py index 17bffd0e988..a332a8137b5 100644 --- a/celery/backends/database/__init__.py +++ b/celery/backends/database/__init__.py @@ -132,7 +132,7 @@ def _update_result(self, task, result, state, traceback=None, task.status = st...
psf__black-3247
Suggestion: Mention contextlib.ExitStack in "Use backslashes for with statements"? **Is this related to a problem? Please describe.** On [Black's future style doc](https://black.readthedocs.io/en/stable/the_black_code_style/future_style.html#using-backslashes-for-with-statements) it talks about `black` handling a `w...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------...
diff --git a/docs/conf.py b/docs/conf.py index 8da9c39ac41..7fc4f8f589e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,7 +55,7 @@ def make_pypi_svg(version: str) -> None: # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state...
frappe__frappe-6179
"StartTLS is not supported"-Bug in LDAP integrations `self` is used in the method `authenticate_ldap_user` which results in the Python exception: ``` NameError: global name 'self' is not defined ``` https://github.com/frappe/frappe/blob/6811f0345e35ea521942db4b29425dd71e403ab8/frappe/integrations/doctype/ldap_setti...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Frappe Technologies and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom frappe import _\nfrom frappe.utils import cstr\nfrom frappe.model.document import Document\n\nclass...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Frappe Technologies and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom frappe import _\nfrom frappe.utils import cstr\nfrom frappe.model.document import Document\n\nclass...
diff --git a/frappe/integrations/doctype/ldap_settings/ldap_settings.py b/frappe/integrations/doctype/ldap_settings/ldap_settings.py index dba20afae5a1..348e3378a812 100644 --- a/frappe/integrations/doctype/ldap_settings/ldap_settings.py +++ b/frappe/integrations/doctype/ldap_settings/ldap_settings.py @@ -86,7 +86,7 @@...
numba__numba-1631
xrange does not work on Python 2.7 From mailing list: "I recently encountered a problem when upgrading from numba0.22.1 to numba0.23.0 : the function xrange is not recognize. This error arises for instance in the simple code below:" ``` python import numba @numba.jit(nopython=True) def test(): s = 0 for i i...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport itertools\n\nfrom numba import types, intrinsics\nfrom numba.utils import PYVERSION, RANGE_ITER_OBJECTS, operator_map\nfrom numba.typing.templates import (AttributeTemplate, ConcreteTemplate,\n ...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport itertools\n\nfrom numba import types, intrinsics\nfrom numba.utils import PYVERSION, RANGE_ITER_OBJECTS, operator_map\nfrom numba.typing.templates import (AttributeTemplate, ConcreteTemplate,\n ...
diff --git a/numba/tests/test_range.py b/numba/tests/test_range.py index 72627a064d2..d854e593973 100644 --- a/numba/tests/test_range.py +++ b/numba/tests/test_range.py @@ -1,6 +1,11 @@ from __future__ import print_function + import numba.unittest_support as unittest + +import sys + import numpy + from numba.compil...
python-telegram-bot__python-telegram-bot-1707
Problems with run_repeating Hi! After update to version 12.3, this code start to work wrong. The first command that sends is get_links_state, than, after one second, sends get_alarms_state. After rollback to version 12.2.0 all started to work normally. Code remains unchanged. Sorry for mistakes, English isn`t my mo...
[ { "content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2018\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub...
[ { "content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2018\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub...
diff --git a/telegram/ext/jobqueue.py b/telegram/ext/jobqueue.py index 5a04d4ea5d2..28c9a1a8700 100644 --- a/telegram/ext/jobqueue.py +++ b/telegram/ext/jobqueue.py @@ -95,7 +95,8 @@ def _put(self, job, time_spec=None, previous_t=None): """ # get time at which to run: - time_spec = time_spec ...
Lightning-AI__torchmetrics-1210
MAE can't handle MPS backend ## 🐛 Bug The currently, the mean absolute error can't handle the MPS backend. This is a simple fix and just requires casting to .float() ### To Reproduce This works: ```python import torchmetrics import torch a = torch.tensor([1, 2, 3]).to(torch.device("mps")) acc = tor...
[ { "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 6662ec8fa14..d10f4d8a926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,7 +61,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug in `ssim` when `return_full_image=True` where the score was still reduced ([#1204](https:...
typeddjango__django-stubs-685
Error constructing plugin instance of NewSemanalDRFPlugin # Bug report When I run mypy with both `django-stubs` and `djangorestframework-stubs` plugins endabled, I have got following error: ```console Error constructing plugin instance of NewSemanalDRFPlugin Traceback (most recent call last): File "/usr/lo...
[ { "content": "import builtins\nimport os\nimport sys\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Dict, Iterable, Iterator, Optional, Set, Tuple, Type, Union\n\nfrom django.core.exceptions import FieldError\nfrom django.db import models\nfrom dja...
[ { "content": "import builtins\nimport os\nimport sys\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Dict, Iterable, Iterator, Optional, Set, Tuple, Type, Union\n\nfrom django.core.exceptions import FieldError\nfrom django.db import models\nfrom dja...
diff --git a/mypy_django_plugin/django/context.py b/mypy_django_plugin/django/context.py index fcdab28c9..dea037d8a 100644 --- a/mypy_django_plugin/django/context.py +++ b/mypy_django_plugin/django/context.py @@ -64,9 +64,7 @@ def noop_class_getitem(cls, key): # Define mypy builtins, to not cause NameError d...
rasterio__rasterio-750
-f does not work as expected in rio-warp Running on a preexisting file ``` » rio warp tests/data/RGB.byte.tif /tmp/hi.tif Error: Could not open file : file exists and won't be overwritten without use of the `-f` or `-o` options. ``` Then ``` » rio warp tests/data/RGB.byte.tif /tmp/hi.tif -f Error: -f option requires...
[ { "content": "\"\"\"\nHelper objects used by multiple CLI commands.\n\"\"\"\n\nimport json\nimport os\n\nfrom rasterio.errors import FileOverwriteError\n\n\ndef coords(obj):\n \"\"\"Yield all coordinate coordinate tuples from a geometry or feature.\n From python-geojson package.\"\"\"\n if isinstance(o...
[ { "content": "\"\"\"\nHelper objects used by multiple CLI commands.\n\"\"\"\n\nimport json\nimport os\n\nfrom rasterio.errors import FileOverwriteError\n\n\ndef coords(obj):\n \"\"\"Yield all coordinate coordinate tuples from a geometry or feature.\n From python-geojson package.\"\"\"\n if isinstance(o...
diff --git a/rasterio/rio/helpers.py b/rasterio/rio/helpers.py index 6d0700c62..196e812d6 100644 --- a/rasterio/rio/helpers.py +++ b/rasterio/rio/helpers.py @@ -88,7 +88,7 @@ def resolve_inout(input=None, output=None, files=None, force_overwrite=False): resolved_output): raise FileOverwriteError( ...
napari__napari-4264
'napari._vispy.layers.image' is not a package ## Activating experimental rendering features causes persistent ModuleNotFoundError Recently, I discovered the two "experimental" features designed to enhance viewer performance with asynchronous rendering. After checking both options in Preferences (under Experimental),...
[ { "content": "from typing import Tuple\n\nimport numpy as np\nfrom vispy.scene.widgets.viewbox import ViewBox\n\nfrom ...layers import (\n Image,\n Labels,\n Layer,\n Points,\n Shapes,\n Surface,\n Tracks,\n Vectors,\n)\nfrom ...utils.config import async_octree\nfrom ...utils.translation...
[ { "content": "from typing import Tuple\n\nimport numpy as np\nfrom vispy.scene.widgets.viewbox import ViewBox\n\nfrom ...layers import (\n Image,\n Labels,\n Layer,\n Points,\n Shapes,\n Surface,\n Tracks,\n Vectors,\n)\nfrom ...utils.config import async_octree\nfrom ...utils.translation...
diff --git a/napari/_vispy/utils/visual.py b/napari/_vispy/utils/visual.py index c1e23421b6c..fbdd0039eb4 100644 --- a/napari/_vispy/utils/visual.py +++ b/napari/_vispy/utils/visual.py @@ -36,8 +36,8 @@ if async_octree: - from ..layers.image.experimental.octree_image import _OctreeImageBase - from .experimen...
vyperlang__vyper-2533
Cannot access `.balance` of address constants ### What's your issue about? If I try to cal the `balance` attribute of an address constant ```python ADDR: constant(address) = 0x000000000000000000000000000000000000dEaD @external def foo() -> uint256: return ADDR.balance ``` I get an unhandled typing excep...
[ { "content": "from decimal import Decimal\nfrom typing import Union\n\nfrom vyper.ast import nodes as vy_ast\nfrom vyper.builtin_functions import DISPATCH_TABLE\nfrom vyper.exceptions import UnfoldableNode\n\nBUILTIN_CONSTANTS = {\n \"EMPTY_BYTES32\": (\n vy_ast.Hex,\n \"0x000000000000000000000...
[ { "content": "from decimal import Decimal\nfrom typing import Union\n\nfrom vyper.ast import nodes as vy_ast\nfrom vyper.builtin_functions import DISPATCH_TABLE\nfrom vyper.exceptions import UnfoldableNode\n\nBUILTIN_CONSTANTS = {\n \"EMPTY_BYTES32\": (\n vy_ast.Hex,\n \"0x000000000000000000000...
diff --git a/tests/ast/test_folding.py b/tests/ast/test_folding.py index d487d0b2d4..8c81c30716 100644 --- a/tests/ast/test_folding.py +++ b/tests/ast/test_folding.py @@ -218,6 +218,24 @@ def test_replace_userdefined_constant_no(source): assert vy_ast.compare_nodes(unmodified_ast, folded_ast) +dummy_address = ...
statsmodels__statsmodels-6939
BUG: remove k_extra from effects_idx currently just parking a commit with possible solution, needs unit tests. I ran several cases for NB and GP and they worked after this commit. I don't see why this extension of effect_idx is needed anymore. Maybe something else fixed the initial problem with margins in NegBin ...
[ { "content": "#Splitting out maringal effects to see if they can be generalized\n\nfrom statsmodels.compat.python import lzip\nimport numpy as np\nfrom scipy.stats import norm\nfrom statsmodels.tools.decorators import cache_readonly\n\n#### margeff helper functions ####\n#NOTE: todo marginal effects for group 2...
[ { "content": "#Splitting out maringal effects to see if they can be generalized\n\nfrom statsmodels.compat.python import lzip\nimport numpy as np\nfrom scipy.stats import norm\nfrom statsmodels.tools.decorators import cache_readonly\n\n#### margeff helper functions ####\n#NOTE: todo marginal effects for group 2...
diff --git a/statsmodels/discrete/discrete_margins.py b/statsmodels/discrete/discrete_margins.py index 7090350a87c..d2a6890e63c 100644 --- a/statsmodels/discrete/discrete_margins.py +++ b/statsmodels/discrete/discrete_margins.py @@ -671,8 +671,6 @@ def get_margeff(self, at='overall', method='dydx', atexog=None, ...
optuna__optuna-1884
Complete list of logging level for `optuna.logging.set_verbosity` <!-- Please write a clear and concise description of what content in https://optuna.readthedocs.io/ is an issue. --> When I read the page of [`optuna.logging.set_verbosity`](https://optuna.readthedocs.io/en/latest/reference/generated/optuna.logging.set_...
[ { "content": "import logging\nfrom logging import CRITICAL # NOQA\nfrom logging import DEBUG # NOQA\nfrom logging import ERROR # NOQA\nfrom logging import FATAL # NOQA\nfrom logging import INFO # NOQA\nfrom logging import WARN # NOQA\nfrom logging import WARNING # NOQA\nimport threading\n\nimport colorlo...
[ { "content": "import logging\nfrom logging import CRITICAL # NOQA\nfrom logging import DEBUG # NOQA\nfrom logging import ERROR # NOQA\nfrom logging import FATAL # NOQA\nfrom logging import INFO # NOQA\nfrom logging import WARN # NOQA\nfrom logging import WARNING # NOQA\nimport threading\n\nimport colorlo...
diff --git a/optuna/logging.py b/optuna/logging.py index cfbe54cffb..07cd07afa1 100644 --- a/optuna/logging.py +++ b/optuna/logging.py @@ -109,6 +109,15 @@ def set_verbosity(verbosity: int) -> None: Args: verbosity: Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``. + ...
ansible__awx-13627
Unable to use CCP lookup plugin with empty webservice_id ### Please confirm the following - [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html). - [X] I have checked the [current issues](https://github.com/ansible/awx/issues) for duplicates....
[ { "content": "from .plugin import CredentialPlugin, CertFiles, raise_for_status\n\nfrom urllib.parse import quote, urlencode, urljoin\n\nfrom django.utils.translation import gettext_lazy as _\nimport requests\n\naim_inputs = {\n 'fields': [\n {\n 'id': 'url',\n 'label': _('CyberA...
[ { "content": "from .plugin import CredentialPlugin, CertFiles, raise_for_status\n\nfrom urllib.parse import quote, urlencode, urljoin\n\nfrom django.utils.translation import gettext_lazy as _\nimport requests\n\naim_inputs = {\n 'fields': [\n {\n 'id': 'url',\n 'label': _('CyberA...
diff --git a/awx/main/credential_plugins/aim.py b/awx/main/credential_plugins/aim.py index 96487dccedfe..e72fe285f49b 100644 --- a/awx/main/credential_plugins/aim.py +++ b/awx/main/credential_plugins/aim.py @@ -70,7 +70,7 @@ def aim_backend(**kwargs): client_cert = kwargs.get('client_cert', None) client_key =...
modin-project__modin-3542
`fsspec` should be explicitly stated in setup.py and env files `fsspec` package became required dependency after https://github.com/modin-project/modin/pull/3529
[ { "content": "from setuptools import setup, find_packages\nimport versioneer\nimport os\nfrom setuptools.dist import Distribution\n\ntry:\n from wheel.bdist_wheel import bdist_wheel\n\n HAS_WHEEL = True\nexcept ImportError:\n HAS_WHEEL = False\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as f...
[ { "content": "from setuptools import setup, find_packages\nimport versioneer\nimport os\nfrom setuptools.dist import Distribution\n\ntry:\n from wheel.bdist_wheel import bdist_wheel\n\n HAS_WHEEL = True\nexcept ImportError:\n HAS_WHEEL = False\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as f...
diff --git a/environment-dev.yml b/environment-dev.yml index a0485f2c6a3..bec7e863b09 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -8,6 +8,7 @@ dependencies: - libthrift<0.14.1 # ref: modin gh-2840 - dask[complete]>=2.22.0 - distributed>=2.22.0 + - fsspec - xarray - Jinja2 - pathlib...
comic__grand-challenge.org-2146
Count of results displayed on the challenge card does not match leaderboard count **Describe the bug** The card for the node21 challenge currently notes there are 21 results. Clicking on this brings you to the leaderboard where only 2 results are present. It seems that the count is including submissions which faile...
[ { "content": "from celery import shared_task\nfrom django.contrib.auth import get_user_model\nfrom django.core.mail import mail_managers\nfrom django.db.models import Count, Max\nfrom requests import exceptions, get\n\nfrom grandchallenge.challenges.models import Challenge, ExternalChallenge\nfrom grandchalleng...
[ { "content": "from celery import shared_task\nfrom django.contrib.auth import get_user_model\nfrom django.core.mail import mail_managers\nfrom django.db.models import Count, Max\nfrom requests import exceptions, get\n\nfrom grandchallenge.challenges.models import Challenge, ExternalChallenge\nfrom grandchalleng...
diff --git a/app/grandchallenge/challenges/tasks.py b/app/grandchallenge/challenges/tasks.py index a75ed7d2e6..1e4f81984f 100644 --- a/app/grandchallenge/challenges/tasks.py +++ b/app/grandchallenge/challenges/tasks.py @@ -13,7 +13,7 @@ def update_challenge_results_cache(): challenges = Challenge.objects.all() ...
celery__celery-7873
completed_count reports only successfully completed tasks Not sure if that's on purpose but it looks like `completed_count` only takes into account the tasks that have completed successfully: https://github.com/celery/celery/blob/3db7c9dde9a4d5aa9c0eda8c43a219de1baa9f02/celery/result.py#L633 Would it make more se...
[ { "content": "\"\"\"Task results/state and results for groups of tasks.\"\"\"\n\nimport datetime\nimport time\nfrom collections import deque\nfrom contextlib import contextmanager\nfrom weakref import proxy\n\nfrom kombu.utils.objects import cached_property\nfrom vine import Thenable, barrier, promise\n\nfrom ....
[ { "content": "\"\"\"Task results/state and results for groups of tasks.\"\"\"\n\nimport datetime\nimport time\nfrom collections import deque\nfrom contextlib import contextmanager\nfrom weakref import proxy\n\nfrom kombu.utils.objects import cached_property\nfrom vine import Thenable, barrier, promise\n\nfrom ....
diff --git a/celery/result.py b/celery/result.py index 3dcd02523ee..eb3e154933b 100644 --- a/celery/result.py +++ b/celery/result.py @@ -651,8 +651,11 @@ def ready(self): def completed_count(self): """Task completion count. + Note that `complete` means `successful` in this context. In other words...
facebookresearch__hydra-1791
[Bug] key collision when using option@_global_ in defaults list When a defaults list contains entries for both `option` and `option@_global_`, there is a key collision resulting in `ConfigCompositionException`. Consider the following setup: ``` $ tree . ├── conf │   ├── config.yaml │   └── db │   ├── mysq...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport re\nfrom dataclasses import dataclass, field\nfrom textwrap import dedent\nfrom typing import List, Optional, Pattern, Union\n\nfrom omegaconf import AnyNode, DictConfig, OmegaConf\nfrom omegaconf.errors import Interpol...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport re\nfrom dataclasses import dataclass, field\nfrom textwrap import dedent\nfrom typing import List, Optional, Pattern, Union\n\nfrom omegaconf import AnyNode, DictConfig, OmegaConf\nfrom omegaconf.errors import Interpol...
diff --git a/hydra/core/default_element.py b/hydra/core/default_element.py index 7b636f1fd9a..bdc9783c9ae 100644 --- a/hydra/core/default_element.py +++ b/hydra/core/default_element.py @@ -250,7 +250,9 @@ def get_override_key(self) -> str: default_pkg = self.get_default_package() final_pkg = self.get_...
mkdocs__mkdocs-1878
Theme files override docs_dir files on Windows As investigated and discussed in https://github.com/squidfunk/mkdocs-material/issues/1282, custom files in docs_dir are overriden by theme files. For example, if you use the default MkDocs theme and create a custom `favicon.ico` in `docs/img`, the custom icon does not ...
[ { "content": "# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport fnmatch\nimport os\nimport logging\nfrom functools import cmp_to_key\n\nfrom mkdocs import utils\n\n\nlog = logging.getLogger(__name__)\nlog.addFilter(utils.warning_filter)\n\n\nclass Files(object):\n \"\"\" A collection of File...
[ { "content": "# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport fnmatch\nimport os\nimport logging\nfrom functools import cmp_to_key\n\nfrom mkdocs import utils\n\n\nlog = logging.getLogger(__name__)\nlog.addFilter(utils.warning_filter)\n\n\nclass Files(object):\n \"\"\" A collection of File...
diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 1d36f4fe58..04dadef346 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -62,6 +62,7 @@ your global navigation uses more than one level, things will likely be broken. * Bugfix: Ensure theme files do not override `d...
microsoft__hi-ml-80
Handle the "v" in version numbering Our code in `setup.py` will trigger with new tags. `setuptools.setup` will reject tags that are not release versions but we could do more to make that explicit by checking for the leading "v". Also when we tag releases as, say, "v0.1.1" the leading "v" is carried through `setupto...
[ { "content": "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# ------------------------------------------...
[ { "content": "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# ------------------------------------------...
diff --git a/.github/workflows/build-test-pr.yml b/.github/workflows/build-test-pr.yml index c22967c87..d529af884 100644 --- a/.github/workflows/build-test-pr.yml +++ b/.github/workflows/build-test-pr.yml @@ -175,7 +175,7 @@ jobs: publish-testpypi-pkg: runs-on: ubuntu-latest needs: [test-artifact-pkg] - ...
qutebrowser__qutebrowser-7793
prompt_queue is None at shutdown Seeing this in various crash reports: ```pytb Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/qutebrowser/misc/quitter.py", line 225, in shutdown if prompt.prompt_queue.shutdown(): AttributeError: 'NoneType' object has no attribute 'shutdown' ``` ...
[ { "content": "# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser 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, eith...
[ { "content": "# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser 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, eith...
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index b8bce1545e6..7eece031731 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -159,7 +159,7 @@ Changed the correct PID (rather than always showing the latest process, which might not be the failing one) - When a process got killed ...
networkx__networkx-1792
Minor inefficiency in dijkstra algorithms The dijkstra algorithms seem to all have `c=count()` in them. The variable `c` is used a few times, but never for anything that actually affects the calculation. I suspect it was put in during some testing. In my (limited) testing, it can be removed without altering any resu...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nShortest path algorithms for weighed graphs.\n\"\"\"\n__author__ = \"\"\"\\n\"\"\".join(['Aric Hagberg <hagberg@lanl.gov>',\n 'Loïc Séguin-C. <loicseguin@gmail.com>',\n 'Dan Schult <dschult@colgate.edu>'])\n# ...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nShortest path algorithms for weighed graphs.\n\"\"\"\n__author__ = \"\"\"\\n\"\"\".join(['Aric Hagberg <hagberg@lanl.gov>',\n 'Loïc Séguin-C. <loicseguin@gmail.com>',\n 'Dan Schult <dschult@colgate.edu>'])\n# ...
diff --git a/networkx/algorithms/shortest_paths/weighted.py b/networkx/algorithms/shortest_paths/weighted.py index bdae796e808..dceb816f9a2 100644 --- a/networkx/algorithms/shortest_paths/weighted.py +++ b/networkx/algorithms/shortest_paths/weighted.py @@ -346,8 +346,10 @@ def _dijkstra(G, source, get_weight, pred=None...
psychopy__psychopy-1670
Small iohub.datastore weirdness So there is this [weird code block](https://github.com/psychopy/psychopy/blob/88a359df45ce453d4fd95986cf902e66cf2fe480/psychopy/iohub/datastore/__init__.py#L581) in `iohub.datastore.__init__.py`: ``` python try: global registered_close_open_data_files if registered_close_open_da...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Part of the psychopy.iohub library.\n# Copyright (C) 2012-2016 iSolver Software Solutions\n# Distributed under the terms of the GNU General Public License (GPL).\nfrom __future__ import division, absolute_import, print_function\n\nimport os\nimp...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Part of the psychopy.iohub library.\n# Copyright (C) 2012-2016 iSolver Software Solutions\n# Distributed under the terms of the GNU General Public License (GPL).\nfrom __future__ import division, absolute_import, print_function\n\nimport os\nimp...
diff --git a/psychopy/iohub/datastore/__init__.py b/psychopy/iohub/datastore/__init__.py index 9abe0d6cb3..8c7c38808c 100644 --- a/psychopy/iohub/datastore/__init__.py +++ b/psychopy/iohub/datastore/__init__.py @@ -477,13 +477,8 @@ def close_open_data_files(verbose): if verbose: print2err(...
streamlit__streamlit-7050
Remove number_input -/+ step toggles option Is there an option to remove the -/+ number_input step toggles? If not, I would suggest that for a future release. Thank you! Also, is it possible to increase the precision? Right now I am just using a text_input and type casting to float to get around this. --- ...
[ { "content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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...
[ { "content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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...
diff --git a/e2e/scripts/st_number_input.py b/e2e/scripts/st_number_input.py index c135fe48ed32..0aebaeb7dcfe 100644 --- a/e2e/scripts/st_number_input.py +++ b/e2e/scripts/st_number_input.py @@ -47,3 +47,9 @@ def on_change(): st.number_input("number input 9", key="number_input9", on_change=on_change) st.write...
dask__distributed-3035
Stop Queue from printing it's name on __init__ There's a print statement here: https://github.com/dask/distributed/blob/8d07bf162b1f6434fc982f36360c5cedbac369a6/distributed/queues.py#L50 Would be nice to replace it with logging.debug()
[ { "content": "from collections import defaultdict\nimport datetime\nimport logging\nimport uuid\n\nimport tornado.queues\nfrom tornado.locks import Event\n\nfrom .client import Future, _get_global_client, Client\nfrom .utils import tokey, sync, thread_state\nfrom .worker import get_client\n\nlogger = logging.ge...
[ { "content": "from collections import defaultdict\nimport datetime\nimport logging\nimport uuid\n\nimport tornado.queues\nfrom tornado.locks import Event\n\nfrom .client import Future, _get_global_client, Client\nfrom .utils import tokey, sync, thread_state\nfrom .worker import get_client\n\nlogger = logging.ge...
diff --git a/distributed/queues.py b/distributed/queues.py index 7174c48a63c..1d0c2c0bdd3 100644 --- a/distributed/queues.py +++ b/distributed/queues.py @@ -47,7 +47,7 @@ def __init__(self, scheduler): self.scheduler.extensions["queues"] = self def create(self, stream=None, name=None, client=None, maxsi...
encode__django-rest-framework-6850
OpenAPI: 'description' is a mandatory field on Response.StatusCode As per [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject), the `response` object must have a `description` property. ## Steps to reproduce Generate a schema with `manage.py generateschema` and...
[ { "content": "import warnings\nfrom urllib.parse import urljoin\n\nfrom django.core.validators import (\n DecimalValidator, EmailValidator, MaxLengthValidator, MaxValueValidator,\n MinLengthValidator, MinValueValidator, RegexValidator, URLValidator\n)\nfrom django.db import models\nfrom django.utils.encod...
[ { "content": "import warnings\nfrom urllib.parse import urljoin\n\nfrom django.core.validators import (\n DecimalValidator, EmailValidator, MaxLengthValidator, MaxValueValidator,\n MinLengthValidator, MinValueValidator, RegexValidator, URLValidator\n)\nfrom django.db import models\nfrom django.utils.encod...
diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index 1ad685271e..d37148ea2d 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -490,6 +490,10 @@ def _get_responses(self, path, method): 'content': { ct: {'sch...
OpenNMT__OpenNMT-tf-881
Output of inference with score formatted as a "byte string" Running `onmt-main --auto_config infer` with scores enabled in the config, outputs the prediction formatted as a byte string. Example: `-18.279692 ||| b'Mira mit Orien- und B\xc3\xa4hrschienen .'` When parsing the output afterwards, this leads to proble...
[ { "content": "\"\"\"Standard sequence-to-sequence model.\"\"\"\n\nimport tensorflow as tf\nimport tensorflow_addons as tfa\n\nfrom opennmt import constants, inputters\nfrom opennmt.data import noise, text, vocab\nfrom opennmt.decoders import decoder as decoder_util\nfrom opennmt.layers import reducer\nfrom open...
[ { "content": "\"\"\"Standard sequence-to-sequence model.\"\"\"\n\nimport tensorflow as tf\nimport tensorflow_addons as tfa\n\nfrom opennmt import constants, inputters\nfrom opennmt.data import noise, text, vocab\nfrom opennmt.decoders import decoder as decoder_util\nfrom opennmt.layers import reducer\nfrom open...
diff --git a/opennmt/models/sequence_to_sequence.py b/opennmt/models/sequence_to_sequence.py index 4ad34b1c8..180e27cfc 100644 --- a/opennmt/models/sequence_to_sequence.py +++ b/opennmt/models/sequence_to_sequence.py @@ -474,7 +474,7 @@ def print_prediction(self, prediction, params=None, stream=None): ...
OpenNMT__OpenNMT-tf-667
GPT2 Model export error When I want to use onmt-main command or runner.export to export a GPT2Small model. ```python print(tf.__version__) print(onmt.__version__) 2.1.1 2.9.3 ``` I got: ``` runner.export(export_dir='/gdrive/My Drive/nmt/chat50w/models') INFO:tensorflow:Using parameters: data: tr...
[ { "content": "\"\"\"Base class for models.\"\"\"\n\nimport abc\n\nimport tensorflow as tf\n\nfrom opennmt import optimizers\nfrom opennmt import schedules\nfrom opennmt.utils import exporters\nfrom opennmt.utils import losses\nfrom opennmt.utils import misc\n\n\nclass Model(tf.keras.layers.Layer):\n \"\"\"Base...
[ { "content": "\"\"\"Base class for models.\"\"\"\n\nimport abc\n\nimport tensorflow as tf\n\nfrom opennmt import optimizers\nfrom opennmt import schedules\nfrom opennmt.utils import exporters\nfrom opennmt.utils import losses\nfrom opennmt.utils import misc\n\n\nclass Model(tf.keras.layers.Layer):\n \"\"\"Base...
diff --git a/opennmt/models/model.py b/opennmt/models/model.py index 466b83848..3f15744d1 100644 --- a/opennmt/models/model.py +++ b/opennmt/models/model.py @@ -235,6 +235,9 @@ def serve_function(self): @tf.function(input_signature=(input_signature,)) def _run(features): features = self.features_inputt...
aws__aws-cli-1577
aws cloudformation - Error Message if IAM::Group Policy given string is Unclear ### Description of Issue In CloudFormation, if passing a string to the policy property of a IAM::Group resource the following error is given: `list index out of range`. ### Steps to Reproduce Using `aws cloudformation` provide a template ...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2c5d543b567c..10bdda2a4429 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,9 @@ Next Release (TBD) * feature:Assume Role: Add ``role_session_name`` config variable to control the ``RoleSessionName`` when assuming roles (`issue 1389 <https://github.com/aw...
Project-MONAI__MONAI-3072
Tests failing on A100 due to tolerance **Describe the bug** 14 tests are failing on A100 due to issue with tolerance. The details of all tests and relative error are given below **To Reproduce** On a A100 GPU: - Setup and install MONAI - Run tests ** Details ** Failing tests and relative error on A100 are: ...
[ { "content": "# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli...
[ { "content": "# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli...
diff --git a/monai/__init__.py b/monai/__init__.py index 7ab30bcae7..5043208b9c 100644 --- a/monai/__init__.py +++ b/monai/__init__.py @@ -26,7 +26,7 @@ __basedir__ = os.path.dirname(__file__) -if not (sys.version_info.major == PY_REQUIRED_MAJOR and sys.version_info.minor >= PY_REQUIRED_MINOR): +if sys.version_inf...
sunpy__sunpy-1779
Deprecation warnings in rescale.py ``` python In [13]: dimensions = u.Quantity(np.array(aia.data.shape) / 2048*u.pixel) In [14]: sp = aia.superpixel(dimensions) d:\sunpy-master\sunpy\image\rescale.py:226: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future offse...
[ { "content": "\"\"\"Image resampling methods\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nimport numpy as np\nimport scipy.interpolate\nimport scipy.ndimage\nfrom sunpy.extern.six.moves import range\n\n__all__ = ['resample', 'reshape_image_to_4d_superpixel']\n\ndef resample(orig, d...
[ { "content": "\"\"\"Image resampling methods\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nimport numpy as np\nimport scipy.interpolate\nimport scipy.ndimage\nfrom sunpy.extern.six.moves import range\n\n__all__ = ['resample', 'reshape_image_to_4d_superpixel']\n\ndef resample(orig, d...
diff --git a/sunpy/image/rescale.py b/sunpy/image/rescale.py index 906712751a3..72f70970ce6 100644 --- a/sunpy/image/rescale.py +++ b/sunpy/image/rescale.py @@ -216,6 +216,9 @@ def reshape_image_to_4d_superpixel(img, dimensions, offset): http://mail.scipy.org/pipermail/numpy-discussion/2010-July/051760.html ...
lutris__lutris-4028
Lutris shell script generation leaves out overrides based on DLL selection for the runner ### Bug description Executing `lutris -b /some/path.sh lutris:write-script/<some game>` generates environment variables and templates them into a shell script that is supposed to be suitable for starting the game. Because of the ...
[ { "content": "\"\"\"Transform runner parameters to data usable for runtime execution\"\"\"\nimport os\nimport shlex\nimport stat\n\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.util.log import logger\n\n\ndef get_mangohud_conf(system_config):\n \"\"\"Return correct ...
[ { "content": "\"\"\"Transform runner parameters to data usable for runtime execution\"\"\"\nimport os\nimport shlex\nimport stat\n\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.util.log import logger\n\n\ndef get_mangohud_conf(system_config):\n \"\"\"Return correct ...
diff --git a/lutris/runner_interpreter.py b/lutris/runner_interpreter.py index 4f2ff3ffa9..9d59d10b29 100644 --- a/lutris/runner_interpreter.py +++ b/lutris/runner_interpreter.py @@ -127,6 +127,8 @@ def get_gamescope_args(launch_arguments, system_config): def export_bash_script(runner, gameplay_info, script_path): ...
feast-dev__feast-3630
SQL-Registry data_source_name `String(50)` is too short. **Is your feature request related to a problem? Please describe.** Our data sources have paths longer than 50 characters. This seems like an unnecessarily short limit for this field. **Describe the solution you'd like** A string limit of 255 characters feels...
[ { "content": "import logging\nimport uuid\nfrom datetime import datetime, timedelta\nfrom enum import Enum\nfrom pathlib import Path\nfrom threading import Lock\nfrom typing import Any, Callable, List, Optional, Set, Union\n\nfrom pydantic import StrictStr\nfrom sqlalchemy import ( # type: ignore\n BigInteg...
[ { "content": "import logging\nimport uuid\nfrom datetime import datetime, timedelta\nfrom enum import Enum\nfrom pathlib import Path\nfrom threading import Lock\nfrom typing import Any, Callable, List, Optional, Set, Union\n\nfrom pydantic import StrictStr\nfrom sqlalchemy import ( # type: ignore\n BigInteg...
diff --git a/sdk/python/feast/infra/registry/sql.py b/sdk/python/feast/infra/registry/sql.py index 54ff7c9dc85..d57bcc7c0a3 100644 --- a/sdk/python/feast/infra/registry/sql.py +++ b/sdk/python/feast/infra/registry/sql.py @@ -81,7 +81,7 @@ data_sources = Table( "data_sources", metadata, - Column("data_sour...
dask__distributed-288
Occasional "KeyError: 'cpu'" error message in dscheduler logs I am not sure how to reproduce this error but it seems that when I start a new cluster I sometimes get the following error in the logs of the scheduler: ``` [...] distributed.scheduler - INFO - Register 10.112.2.4:53995 distributed.utils - ERROR - 'cpu' Tra...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nfrom collections import defaultdict\nfrom itertools import chain\n\nfrom toolz import pluck\n\nfrom ..utils import ignoring\n\nwith ignoring(ImportError):\n from bokeh.models import (ColumnDataSource, DataRange1d, Range1d,\n ...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nfrom collections import defaultdict\nfrom itertools import chain\n\nfrom toolz import pluck\n\nfrom ..utils import ignoring\n\nwith ignoring(ImportError):\n from bokeh.models import (ColumnDataSource, DataRange1d, Range1d,\n ...
diff --git a/distributed/bokeh/worker_monitor.py b/distributed/bokeh/worker_monitor.py index 0b61d501e17..c7fde7108c8 100644 --- a/distributed/bokeh/worker_monitor.py +++ b/distributed/bokeh/worker_monitor.py @@ -68,8 +68,11 @@ def resource_append(lists, msg): L = list(msg.values()) if not L: return ...
privacyidea__privacyidea-1045
Authentication attempt of user without tokens is missing in audit log if SQL Truncate is enabled Steps to reproduce: * privacyIDEA 2.22.1 * Set ``PI_AUDIT_SQL_TRUNCATE = True`` in the config * Have a user in the default realm which has no tokens assigned, e.g. ``fred``. * Then, authentication via ``/validate/check`...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2016-04-08 Cornelius Kölbel <cornelius@privacyidea.org>\n# Avoid consecutive if statements\n#\n# privacyIDEA\n# May 11, 2014 Cornelius Kölbel, info@privacyidea.org\n# http://www.privacyidea.org\n#\n# This code is free software; you can redistribute it ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2016-04-08 Cornelius Kölbel <cornelius@privacyidea.org>\n# Avoid consecutive if statements\n#\n# privacyIDEA\n# May 11, 2014 Cornelius Kölbel, info@privacyidea.org\n# http://www.privacyidea.org\n#\n# This code is free software; you can redistribute it ...
diff --git a/privacyidea/lib/auditmodules/sqlaudit.py b/privacyidea/lib/auditmodules/sqlaudit.py index e1cd711d05..e32bf5958c 100755 --- a/privacyidea/lib/auditmodules/sqlaudit.py +++ b/privacyidea/lib/auditmodules/sqlaudit.py @@ -116,7 +116,10 @@ def _truncate_data(self): """ for column, l in column_...
avocado-framework__avocado-4632
assets download raises FileExistsError when running in parallel When running vmimage.get() multiple times in parallell, directory creation raises exception because any thread could have created the directory before: ``` 15:10:37 INFO | INIT 1-TransientDomain.test_lifecycle 15:10:37 DEBUG| PARAMS (key=timeout, path...
[ { "content": "# 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 option) any later version.\n#\n# This program is distributed in the hope t...
[ { "content": "# 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 option) any later version.\n#\n# This program is distributed in the hope t...
diff --git a/avocado/utils/asset.py b/avocado/utils/asset.py index 534d458dd8..91a1acf9e3 100644 --- a/avocado/utils/asset.py +++ b/avocado/utils/asset.py @@ -367,7 +367,7 @@ def fetch(self): self.relative_dir) dirname = os.path.dirname(asset_file) if not...
keras-team__keras-13307
is_tensor_or_variable in losses#get_config not defined **System information** - Have I written custom code (as opposed to using example directory): yes - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS - TensorFlow backend (yes / no): yes - TensorFlow version: v1.14.0-rc1-22-gaf24dc91b5 1.14.0 ...
[ { "content": "\"\"\"Built-in loss functions.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport abc\nimport six\n\nfrom . import backend as K\nfrom .utils import losses_utils\nfrom .utils.generic_utils import deserialize_keras_object...
[ { "content": "\"\"\"Built-in loss functions.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport abc\nimport six\n\nfrom . import backend as K\nfrom .utils import losses_utils\nfrom .utils.generic_utils import deserialize_keras_object...
diff --git a/keras/losses.py b/keras/losses.py index 892ab76d6834..11eeb0458c21 100644 --- a/keras/losses.py +++ b/keras/losses.py @@ -134,7 +134,7 @@ def call(self, y_true, y_pred): def get_config(self): config = {} for k, v in six.iteritems(self._fn_kwargs): - config[k] = K.eval(v) i...
ibis-project__ibis-798
ImpalaTable.describe_formatted may throw an exception excerpt. Will investigate soon ``` python --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-115-87d40e40503e> in <module>() ----> 1 repr(db.csv_as_p...
[ { "content": "# Copyright 2014 Cloudera 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# Unless required by applicable...
[ { "content": "# Copyright 2014 Cloudera 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# Unless required by applicable...
diff --git a/ibis/impala/metadata.py b/ibis/impala/metadata.py index b6c4ca065ad5..a864f0e44123 100644 --- a/ibis/impala/metadata.py +++ b/ibis/impala/metadata.py @@ -43,14 +43,16 @@ def _converter(tup): def _try_timestamp(x): try: - return pd.Timestamp(x) + ts = pd.Timestamp(x) + return ts...
mdn__kuma-6126
Redirect additional MDN pages to Extension Workshop Hi there! We need the following pages to be redirected from MDN to Extension Workshop: - https://developer.mozilla.org/docs/Mozilla/Add-ons/AMO/Blocking_Process should redirect to https://extensionworkshop.com/documentation/publish/add-ons-blocking-process/ - ht...
[ { "content": "\n\nfrom functools import partial\n\nfrom redirect_urls import redirect as lib_redirect\n\nfrom kuma.core.decorators import shared_cache_control\n\n\nshared_cache_control_for_zones = shared_cache_control(\n s_maxage=60 * 60 * 24 * 7)\n\n\ndef redirect(pattern, to, **kwargs):\n \"\"\"\n Re...
[ { "content": "\n\nfrom functools import partial\n\nfrom redirect_urls import redirect as lib_redirect\n\nfrom kuma.core.decorators import shared_cache_control\n\n\nshared_cache_control_for_zones = shared_cache_control(\n s_maxage=60 * 60 * 24 * 7)\n\n\ndef redirect(pattern, to, **kwargs):\n \"\"\"\n Re...
diff --git a/kuma/redirects/redirects.py b/kuma/redirects/redirects.py index 8bc82913d2e..ff6baa0b790 100644 --- a/kuma/redirects/redirects.py +++ b/kuma/redirects/redirects.py @@ -946,6 +946,12 @@ def locale_redirect(pattern, to, prepend_locale=True, **kwargs): 'publish/distribute-for-desktop-apps/'), ...
streamlit__streamlit-1844
SVG support ## Is your feature request related to a problem? Please describe the problem. I want a way to output svg graphics in Python. [I'm not the only one](https://discuss.streamlit.io/t/display-svg/172)! ## Describe the solution you'd like I would love for `st.write(...)` to support an existing svg python...
[ { "content": "# Copyright 2018-2020 Streamlit 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# Unless required by a...
[ { "content": "# Copyright 2018-2020 Streamlit 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# Unless required by a...
diff --git a/lib/streamlit/elements/image_proto.py b/lib/streamlit/elements/image_proto.py index cf328ec7e51a..44bbd94fa33e 100644 --- a/lib/streamlit/elements/image_proto.py +++ b/lib/streamlit/elements/image_proto.py @@ -306,7 +306,7 @@ def image_to_url( with open(image) as textfile: ima...
bookwyrm-social__bookwyrm-592
Wrong baseurl in remote @-mention notification When someone on a remote server @-mentions me on Bookwyrm, the "status" link in notifications has the wrong baseUrl. Example: ![image](https://user-images.githubusercontent.com/266454/106845345-999c0f80-665f-11eb-8825-7415fb412497.png) The url that the username `F...
[ { "content": "''' base model with default fields '''\nfrom base64 import b64encode\nfrom functools import reduce\nimport operator\nfrom uuid import uuid4\n\nfrom Crypto.PublicKey import RSA\nfrom Crypto.Signature import pkcs1_15\nfrom Crypto.Hash import SHA256\nfrom django.core.paginator import Paginator\nfrom ...
[ { "content": "''' base model with default fields '''\nfrom base64 import b64encode\nfrom functools import reduce\nimport operator\nfrom uuid import uuid4\n\nfrom Crypto.PublicKey import RSA\nfrom Crypto.Signature import pkcs1_15\nfrom Crypto.Hash import SHA256\nfrom django.core.paginator import Paginator\nfrom ...
diff --git a/bookwyrm/models/base_model.py b/bookwyrm/models/base_model.py index ba0a54be27..585f6dcc75 100644 --- a/bookwyrm/models/base_model.py +++ b/bookwyrm/models/base_model.py @@ -27,7 +27,7 @@ def get_remote_id(self): ''' generate a url that resolves to the local object ''' base_path = 'https:...
python__peps-2541
Change "Contents" to "Table of Contents" ? (Or delete it?) Currently PEPs have a "mysterious" triangle pointing to the word "Contents". I don't know why, but somehow every time I see this I do a double take before I realize "oh, that's the ToC". Maybe spell "Table of Contents" in full? There should be plenty of horizon...
[ { "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom docutils import nodes\nimport sphinx.writers.html5 as html5\n\nif TYPE_CHECKING:\n from sphinx.builders import html\n\n\nclass PEPTranslator(html5.HTML5Translator):\n \"\"\"Custom RST -> HTML translation rules for...
[ { "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom docutils import nodes\nimport sphinx.writers.html5 as html5\n\nif TYPE_CHECKING:\n from sphinx.builders import html\n\n\nclass PEPTranslator(html5.HTML5Translator):\n \"\"\"Custom RST -> HTML translation rules for...
diff --git a/pep_sphinx_extensions/pep_processor/html/pep_html_translator.py b/pep_sphinx_extensions/pep_processor/html/pep_html_translator.py index ae1e1e028a0..8530ea77151 100644 --- a/pep_sphinx_extensions/pep_processor/html/pep_html_translator.py +++ b/pep_sphinx_extensions/pep_processor/html/pep_html_translator.py...
napari__napari-512
label layer can have its label id reduced below 0 ## 🐛 Bug not via the UI but via the property/keybindings side-effect: the color preview thingy on the left disappears when this happens
[ { "content": "from typing import Union\nimport warnings\nimport numpy as np\nfrom copy import copy\nfrom scipy import ndimage as ndi\nfrom xml.etree.ElementTree import Element\nfrom base64 import b64encode\nfrom imageio import imwrite\n\nfrom ..base import Layer\nfrom ...util.colormaps import colormaps\nfrom .....
[ { "content": "from typing import Union\nimport warnings\nimport numpy as np\nfrom copy import copy\nfrom scipy import ndimage as ndi\nfrom xml.etree.ElementTree import Element\nfrom base64 import b64encode\nfrom imageio import imwrite\n\nfrom ..base import Layer\nfrom ...util.colormaps import colormaps\nfrom .....
diff --git a/napari/layers/labels/labels.py b/napari/layers/labels/labels.py index 58c1c67e176..1c09fb2fe22 100644 --- a/napari/layers/labels/labels.py +++ b/napari/layers/labels/labels.py @@ -252,6 +252,11 @@ def selected_label(self): @selected_label.setter def selected_label(self, selected_label): + ...
zulip__zulip-26839
Update documentation on previews permissions The help center should be updated following #27783.
[ { "content": "from dataclasses import dataclass\nfrom typing import List\n\n\n@dataclass\nclass URLRedirect:\n old_url: str\n new_url: str\n\n\nAPI_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [\n # Add URL redirects for REST API documentation here:\n URLRedirect(\"/api/delete-stream\", \"/api/archi...
[ { "content": "from dataclasses import dataclass\nfrom typing import List\n\n\n@dataclass\nclass URLRedirect:\n old_url: str\n new_url: str\n\n\nAPI_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [\n # Add URL redirects for REST API documentation here:\n URLRedirect(\"/api/delete-stream\", \"/api/archi...
diff --git a/help/allow-image-link-previews.md b/help/allow-image-link-previews.md index 2f0ae45284fa7..631b1dfbd10b0 100644 --- a/help/allow-image-link-previews.md +++ b/help/allow-image-link-previews.md @@ -22,3 +22,9 @@ prevent images from being used to track Zulip users. {!save-changes.md!} {end_tabs} + +## Rel...
pyinstaller__pyinstaller-6484
Support pyinstaller for arm64 for termux I use a python3.10 in my daily life when updating the compiler gcc to version 13 I can not install pyinstaller
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/depend/bindepend.py b/PyInstaller/depend/bindepend.py index 7e3bd9be49..81580e1c84 100644 --- a/PyInstaller/depend/bindepend.py +++ b/PyInstaller/depend/bindepend.py @@ -760,6 +760,10 @@ def findLibrary(name): except ImportError: logger.debug('Multiarch directory not detec...
biolab__orange3-4177
Self-Organizing Map crashes when clicking main area without any data connected to the widget **Describe the bug** When clicking on the main area in SOM widget, the following error is shown: ``` -------------------------- AttributeError Exception --------------------------- Traceback (most recent call last): File...
[ { "content": "from collections import defaultdict, namedtuple\nfrom xml.sax.saxutils import escape\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom AnyQt.QtCore import Qt, QRectF, pyqtSignal as Signal, QObject, QThread\nfrom AnyQt.QtGui import QTransform, QPen, QBrush, QColor, QPainter, \\\n QPainter...
[ { "content": "from collections import defaultdict, namedtuple\nfrom xml.sax.saxutils import escape\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom AnyQt.QtCore import Qt, QRectF, pyqtSignal as Signal, QObject, QThread\nfrom AnyQt.QtGui import QTransform, QPen, QBrush, QColor, QPainter, \\\n QPainter...
diff --git a/Orange/widgets/unsupervised/owsom.py b/Orange/widgets/unsupervised/owsom.py index c32bb2da4cc..cbc57823d7e 100644 --- a/Orange/widgets/unsupervised/owsom.py +++ b/Orange/widgets/unsupervised/owsom.py @@ -423,6 +423,8 @@ def clear_selection(self): self.redraw_selection() def on_selection_cha...
bridgecrewio__checkov-4171
Azure Devops Pipeline - Container Crash - "Context for Kubernetes runner was not set" Sorry if this is not the correct issue type, but it didn't really fit in to any of the boxes. **Describe the issue** At some point between 11:34 and 14:39 on Monday December 12th our Terraform pipelines started failing with the er...
[ { "content": "from __future__ import annotations\n\nimport logging\nimport os\nfrom typing import Type, Any, TYPE_CHECKING\n\nfrom checkov.common.checks_infra.registry import get_graph_checks_registry\nfrom checkov.common.graph.checks_infra.registry import BaseRegistry\nfrom checkov.common.graph.db_connectors.n...
[ { "content": "from __future__ import annotations\n\nimport logging\nimport os\nfrom typing import Type, Any, TYPE_CHECKING\n\nfrom checkov.common.checks_infra.registry import get_graph_checks_registry\nfrom checkov.common.graph.checks_infra.registry import BaseRegistry\nfrom checkov.common.graph.db_connectors.n...
diff --git a/checkov/kubernetes/runner.py b/checkov/kubernetes/runner.py index f2493828e5..113753dd7d 100644 --- a/checkov/kubernetes/runner.py +++ b/checkov/kubernetes/runner.py @@ -242,11 +242,6 @@ def mutate_kubernetes_graph_results( if not checks_results: return report - if not self.c...
Pyomo__pyomo-751
BARON writer sqrt(x) issue I believe that the BARON writer needs to produce `x^0.5` rather than the current `sqrt(x)` in order to avoid a syntax error. Found by @johnnybatesjr
[ { "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/repn/plugins/baron_writer.py b/pyomo/repn/plugins/baron_writer.py index 6755eab5cc8..27578925c29 100644 --- a/pyomo/repn/plugins/baron_writer.py +++ b/pyomo/repn/plugins/baron_writer.py @@ -84,6 +84,8 @@ def visit(self, node, values): return "{0} * {1}".format(tmp[0], tmp[1]) ...
encode__uvicorn-512
[BUG] Using --log-config disables uvicorn loggers ### Summary Uvicorn logs are disabled when starting a uvicorn server process with a custom `--log-config` file. ### Steps to Reproduce **`logging_config.ini`** ``` [loggers] keys=root [handlers] keys=h [formatters] keys=f [logger_root] level=INFO...
[ { "content": "import asyncio\nimport inspect\nimport logging\nimport logging.config\nimport os\nimport socket\nimport ssl\nimport sys\nfrom typing import List, Tuple\n\nimport click\n\nfrom uvicorn.importer import ImportFromStringError, import_from_string\nfrom uvicorn.middleware.asgi2 import ASGI2Middleware\nf...
[ { "content": "import asyncio\nimport inspect\nimport logging\nimport logging.config\nimport os\nimport socket\nimport ssl\nimport sys\nfrom typing import List, Tuple\n\nimport click\n\nfrom uvicorn.importer import ImportFromStringError, import_from_string\nfrom uvicorn.middleware.asgi2 import ASGI2Middleware\nf...
diff --git a/uvicorn/config.py b/uvicorn/config.py index 316d0b964..353fa21ce 100644 --- a/uvicorn/config.py +++ b/uvicorn/config.py @@ -218,7 +218,9 @@ def __reduce__(self): if isinstance(self.log_config, dict): logging.config.dictConfig(self.log_config) else: - ...
conda__conda-10261
`conda env remove --dry-run` actually deletes the env ## Current Behavior Using the `--dry-run` flag doesn't do a dry-run at all. ### Steps to Reproduce ``` $ conda env list # conda environments: # base * /usr $ conda create -n foo Collecting package metadata (current_repodata.json): do...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nfrom os.path import isfile, join\nimport sys\n\nfrom .common import check_non_admin, specs_fro...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nfrom os.path import isfile, join\nimport sys\n\nfrom .common import check_non_admin, specs_fro...
diff --git a/conda/cli/main_remove.py b/conda/cli/main_remove.py index cd7ad28fead..085cee74e36 100644 --- a/conda/cli/main_remove.py +++ b/conda/cli/main_remove.py @@ -73,8 +73,9 @@ def execute(args, parser): handle_txn(txn, prefix, args, False, True) except PackagesNotFoundError: ...
ranaroussi__yfinance-891
Timezone value passed on to the option_chain throws TypeError ticker.option_chain(date='2021-11-26', tz="UTC") TypeError : index is not a valid DatetimeIndex or PeriodIndex
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ...
diff --git a/yfinance/ticker.py b/yfinance/ticker.py index 824078496..081090e43 100644 --- a/yfinance/ticker.py +++ b/yfinance/ticker.py @@ -84,9 +84,9 @@ def _options2df(self, opt, tz=None): 'currency']) data['lastTradeDate'] = _pd.to_datetime( - data['lastTradeDate'], unit='s') + ...
vyperlang__vyper-1982
Error strings are zero-padded to 32 bytes ### What's your issue about? Vyper zero-pads error strings to 32 bytes within the bytecode. This in turn causes the string to occupy an additional memory slot, and can lead to [decoding weirdness](https://etherscan.io/tx/0xa0f0aa5fc4f56771a0b49ff66c752bcad2a32844ec4b173337086d...
[ { "content": "from vyper import ast as vy_ast\nfrom vyper.codegen.return_ import gen_tuple_return, make_return_stmt\nfrom vyper.exceptions import (\n CompilerPanic,\n ConstancyViolation,\n EventDeclarationException,\n InvalidLiteral,\n StructureException,\n TypeMismatch,\n VariableDeclarati...
[ { "content": "from vyper import ast as vy_ast\nfrom vyper.codegen.return_ import gen_tuple_return, make_return_stmt\nfrom vyper.exceptions import (\n CompilerPanic,\n ConstancyViolation,\n EventDeclarationException,\n InvalidLiteral,\n StructureException,\n TypeMismatch,\n VariableDeclarati...
diff --git a/tests/parser/features/test_assert.py b/tests/parser/features/test_assert.py index b37a97cdc2..99c2b77767 100644 --- a/tests/parser/features/test_assert.py +++ b/tests/parser/features/test_assert.py @@ -1,4 +1,5 @@ import pytest +from eth_abi import decode_single from eth_tester.exceptions import Transact...
getsentry__sentry-python-1366
Setting transaction name doesn't work from child span. ### Environment How do you use Sentry? Sentry SaaS (sentry.io) Which SDK and version? Python/Django: django-sentry-1.13.5, sentry-sdk-1.3.0 (also tried sentry-sdk-1.1.0) ### Steps to Reproduce We're using Sentry in Django and Graphene (for GraphQL sup...
[ { "content": "from copy import copy\nfrom collections import deque\nfrom itertools import chain\n\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.utils import logger, capture_internal_exceptions\nfrom sentry_sdk.tracing import Transaction\nfrom sentry_sdk.attachment...
[ { "content": "from copy import copy\nfrom collections import deque\nfrom itertools import chain\n\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.utils import logger, capture_internal_exceptions\nfrom sentry_sdk.tracing import Transaction\nfrom sentry_sdk.attachment...
diff --git a/sentry_sdk/scope.py b/sentry_sdk/scope.py index fb3bee42f1..bcfbf5c166 100644 --- a/sentry_sdk/scope.py +++ b/sentry_sdk/scope.py @@ -173,9 +173,8 @@ def transaction(self, value): # transaction name or transaction (self._span) depending on the type of # the value argument. self._...
facebookresearch__hydra-1961
[CI] hydra_nevergrad_sweeper tests are failing on main branch. example failure https://app.circleci.com/pipelines/github/facebookresearch/hydra/11235/workflows/273a5296-bebf-4808-8e68-14b9889b63a5/jobs/102829
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n# type: ignore\nfrom pathlib import Path\n\nfrom read_version import read_version\nfrom setuptools import find_namespace_packages, setup\n\nsetup(\n name=\"hydra-nevergrad-sweeper\",\n version=read_version(\"hydra_plugin...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n# type: ignore\nfrom pathlib import Path\n\nfrom read_version import read_version\nfrom setuptools import find_namespace_packages, setup\n\nsetup(\n name=\"hydra-nevergrad-sweeper\",\n version=read_version(\"hydra_plugin...
diff --git a/plugins/hydra_nevergrad_sweeper/setup.py b/plugins/hydra_nevergrad_sweeper/setup.py index 1e629c3b4fb..d0303350e35 100644 --- a/plugins/hydra_nevergrad_sweeper/setup.py +++ b/plugins/hydra_nevergrad_sweeper/setup.py @@ -26,7 +26,7 @@ ], install_requires=[ "hydra-core>=1.1.0.dev7", - ...
awslabs__gluonts-433
Investigate build process on Windows The package build seems to be failing on Windows, apparently once again due to some hard-coded path. Context is in #75
[ { "content": "# Standard library imports\nimport distutils.cmd\nimport distutils.log\nimport itertools\nimport logging\nimport subprocess\nimport sys\nfrom pathlib import Path\nfrom textwrap import dedent\n\n# Third-party imports\nfrom setuptools import find_namespace_packages, setup\n\nROOT = Path(__file__).pa...
[ { "content": "# Standard library imports\nimport distutils.cmd\nimport distutils.log\nimport itertools\nimport logging\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\nfrom textwrap import dedent\n\n# Third-party imports\nfrom setuptools import find_namespace_packages, setup\n\nROOT = Path(_...
diff --git a/setup.py b/setup.py index 5b59f00f6c..f0b6474121 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import distutils.log import itertools import logging +import os import subprocess import sys from pathlib import Path @@ -19,8 +20,8 @@ subprocess.call( "nvidia-smi", shell=Tru...
akvo__akvo-rsr-1942
Organisations list gives timeout ## Test plan The organisations list should not give a timeout. Since this only happened on Live, it is hard to debug. ## Sentry See http://sentry.support.akvo-ops.org/rsr/live/group/742/
[ { "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\nAkvo RSR module. For additional details on the GNU license please\nsee < http://www.gnu.org/licenses/agpl.html >.\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\nAkvo RSR module. For additional details on the GNU license please\nsee < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\...
diff --git a/akvo/rsr/views/organisation.py b/akvo/rsr/views/organisation.py index 892f894c2c..26b2ba1e77 100644 --- a/akvo/rsr/views/organisation.py +++ b/akvo/rsr/views/organisation.py @@ -77,10 +77,6 @@ def directory(request): # Get related objects of page at once page.object_list = page.object_list.select...
aws__aws-cli-5019
Add support for PyYAML 5.3 Closes: https://github.com/aws/aws-cli/issues/4828 Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com> *Issue #, if available:* *Description of changes:* By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the ter...
[ { "content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths...
[ { "content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths...
diff --git a/.changes/next-release/enhancement-PyYAML-42538.json b/.changes/next-release/enhancement-PyYAML-42538.json new file mode 100644 index 000000000000..a2fe418f130d --- /dev/null +++ b/.changes/next-release/enhancement-PyYAML-42538.json @@ -0,0 +1,5 @@ +{ + "category": "PyYAML", + "type": "enhancement", + ...
carltongibson__django-filter-620
HiddenWidget for OrderingField result in empty result with bizarre default value I defined an OrderingFilter with HiddenInput and when displaying this field once the form has been submitted, the field render as `<input id="id_o" name="o" type="hidden" value="[]">` Which is problematic because when submitted once aga...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom collections import Iterable\nfrom itertools import chain\ntry:\n from urllib.parse import urlencode\nexcept:\n from urllib import urlencode # noqa\n\nimport django\nfrom django import forms\nfrom django....
[ { "content": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom collections import Iterable\nfrom itertools import chain\ntry:\n from urllib.parse import urlencode\nexcept:\n from urllib import urlencode # noqa\n\nimport django\nfrom django import forms\nfrom django....
diff --git a/django_filters/widgets.py b/django_filters/widgets.py index 8ad00dda0..1ebdbe2e2 100644 --- a/django_filters/widgets.py +++ b/django_filters/widgets.py @@ -167,7 +167,7 @@ def render(self, name, value, attrs=None): if len(value) <= 1: # delegate to main widget (Select, etc...) if no...
nltk__nltk-2589
Bug introduced in nltk 3.5 leads to nondeterministic behavior in nltk.sentiment.vader Test script test.py ```python #!/usr/bin/env python3 import json from nltk.sentiment.vader import SentimentIntensityAnalyzer line="BUT fuck but thats it" si = SentimentIntensityAnalyzer() print(json.dumps(si.polarity_scor...
[ { "content": "# coding: utf-8\n# Natural Language Toolkit: vader\n#\n# Copyright (C) 2001-2020 NLTK Project\n# Author: C.J. Hutto <Clayton.Hutto@gtri.gatech.edu>\n# Ewan Klein <ewan@inf.ed.ac.uk> (modifications)\n# Pierpaolo Pantone <24alsecondo@gmail.com> (modifications)\n# George Berry...
[ { "content": "# coding: utf-8\n# Natural Language Toolkit: vader\n#\n# Copyright (C) 2001-2020 NLTK Project\n# Author: C.J. Hutto <Clayton.Hutto@gtri.gatech.edu>\n# Ewan Klein <ewan@inf.ed.ac.uk> (modifications)\n# Pierpaolo Pantone <24alsecondo@gmail.com> (modifications)\n# George Berry...
diff --git a/nltk/sentiment/vader.py b/nltk/sentiment/vader.py index 7ba42511d7..f9815363f5 100644 --- a/nltk/sentiment/vader.py +++ b/nltk/sentiment/vader.py @@ -449,7 +449,8 @@ def _least_check(self, valence, words_and_emoticons, i): return valence def _but_check(self, words_and_emoticons, sentiments)...
openstates__openstates-scrapers-2253
ME failing since at least 2018-04-04 ME has been failing since 2018-04-04 Based on automated runs it appears that ME has not run successfully in 2 days (2018-04-04). ``` 02:50:41 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "GUERIN"} 02:50:41 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "...
[ { "content": "import re\nimport html\nimport socket\nimport datetime\n\nimport requests\nimport lxml.html\nimport scrapelib\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom .actions import Categorizer\n\nBLACKLISTED_BILL_IDS = {\n '128': ('SP 601', 'SP 602'),\n}\n\n\nclass MEBillScraper(Scraper):\...
[ { "content": "import re\nimport html\nimport socket\nimport datetime\n\nimport requests\nimport lxml.html\nimport scrapelib\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom .actions import Categorizer\n\nBLACKLISTED_BILL_IDS = {\n '128': ('SP 601', 'SP 602'),\n}\n\n\nclass MEBillScraper(Scraper):\...
diff --git a/openstates/me/bills.py b/openstates/me/bills.py index 45bccb17ce..c205e50014 100644 --- a/openstates/me/bills.py +++ b/openstates/me/bills.py @@ -72,6 +72,8 @@ def _recursively_process_bills( if bills: for bill in bills: bill_id_slug = bill.xpath('./@href')[0] + ...
DataDog__dd-trace-py-1080
Exception raised with sizeof of some spans With `master`: ``` Exception in thread AgentWriter: Traceback (most recent call last): File "/opt/dogweb/pyenv/versions/2.7.12/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/opt/dogweb/pyenv/versions/2.7.12/lib/python2.7/threading...
[ { "content": "import collections\nimport sys\nfrom itertools import chain\n\n\ndef iter_object(o):\n if hasattr(o, '__slots__'):\n return (getattr(o, slot) for slot in o.__slots__)\n elif hasattr(o, '__dict__'):\n return list(o.__dict__.items())\n elif isinstance(o, dict):\n # Make...
[ { "content": "import collections\nimport sys\nfrom itertools import chain\n\n_UNSET = object()\n\n\ndef iter_object(o):\n if hasattr(o, '__slots__'):\n return (\n s\n for s in (getattr(o, slot, _UNSET) for slot in o.__slots__)\n if s != _UNSET\n )\n elif hasa...
diff --git a/ddtrace/utils/sizeof.py b/ddtrace/utils/sizeof.py index 1b4e56132a7..4fcb0e67577 100644 --- a/ddtrace/utils/sizeof.py +++ b/ddtrace/utils/sizeof.py @@ -2,10 +2,16 @@ import sys from itertools import chain +_UNSET = object() + def iter_object(o): if hasattr(o, '__slots__'): - return (geta...
Textualize__textual-1600
Populating a `ListView` via constructor vs via inherit and `compose` There seems to be a subtle difference in the working of a `ListView` if you create one by passing the `ListItem`s to it, vs if you create a custom `ListView` by inheriting from it and using `compose` to populate it. Take the following example code, wh...
[ { "content": "from __future__ import annotations\n\nfrom textual import events\nfrom textual.await_remove import AwaitRemove\nfrom textual.binding import Binding\nfrom textual.containers import Vertical\nfrom textual.geometry import clamp\nfrom textual.message import Message\nfrom textual.reactive import reacti...
[ { "content": "from __future__ import annotations\n\nfrom textual import events\nfrom textual.await_remove import AwaitRemove\nfrom textual.binding import Binding\nfrom textual.containers import Vertical\nfrom textual.geometry import clamp\nfrom textual.message import Message\nfrom textual.reactive import reacti...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2284b4a918..768ba4eb8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Behavior of widget `Input` when rendering after programmatic value change and related scenarios https://github.co...
encode__httpx-545
Instances of `tempfile.TemporaryFile` fail when used as an upload file. When using `tempfile.TemporaryFile` the `file.name` attribute returns an integer, rather than the usual path string, which causes a breakage for us further down the line... ```shell venv/lib/python3.7/site-packages/httpx/client.py:484: in post ...
[ { "content": "import binascii\nimport mimetypes\nimport os\nimport re\nimport typing\nfrom io import BytesIO\nfrom pathlib import Path\n\n_HTML5_FORM_ENCODING_REPLACEMENTS = {'\"': \"%22\", \"\\\\\": \"\\\\\\\\\"}\n_HTML5_FORM_ENCODING_REPLACEMENTS.update(\n {chr(c): \"%{:02X}\".format(c) for c in range(0x00...
[ { "content": "import binascii\nimport mimetypes\nimport os\nimport re\nimport typing\nfrom io import BytesIO\nfrom pathlib import Path\n\n_HTML5_FORM_ENCODING_REPLACEMENTS = {'\"': \"%22\", \"\\\\\": \"\\\\\\\\\"}\n_HTML5_FORM_ENCODING_REPLACEMENTS.update(\n {chr(c): \"%{:02X}\".format(c) for c in range(0x00...
diff --git a/httpx/multipart.py b/httpx/multipart.py index d850f79dcf..fcfd25692a 100644 --- a/httpx/multipart.py +++ b/httpx/multipart.py @@ -48,7 +48,7 @@ def __init__( ) -> None: self.name = name if not isinstance(value, tuple): - self.filename = Path(getattr(value, "name", "upload"...
saleor__saleor-1208
Superuser can change his status In `StaffForm`: https://github.com/mirumee/saleor/blob/master/saleor/dashboard/staff/forms.py#L12-L13 Widget is disabled `self.fields['is_staff'].widget.attrs['disabled'] = True` But it won't prevent you from changing values on POST. We should disable field instead, like `self.field...
[ { "content": "from django import forms\n\nfrom ...userprofile.models import User\n\n\nclass StaffForm(forms.ModelForm):\n def __init__(self, *args, **kwargs):\n self.user = kwargs.pop('user', None)\n kwargs.update(initial={'is_staff': True})\n super(StaffForm, self).__init__(*args, **kwa...
[ { "content": "from django import forms\n\nfrom ...userprofile.models import User\n\n\nclass StaffForm(forms.ModelForm):\n def __init__(self, *args, **kwargs):\n self.user = kwargs.pop('user', None)\n kwargs.update(initial={'is_staff': True})\n super(StaffForm, self).__init__(*args, **kwa...
diff --git a/saleor/dashboard/staff/forms.py b/saleor/dashboard/staff/forms.py index 29720e436be..1cedcce935e 100644 --- a/saleor/dashboard/staff/forms.py +++ b/saleor/dashboard/staff/forms.py @@ -9,8 +9,8 @@ def __init__(self, *args, **kwargs): kwargs.update(initial={'is_staff': True}) super(StaffFor...
mozilla__bugbug-2806
Change needsdiagnosis model to consider moved milestone as `needsdiagnosis = True` We have observed that needsdiagnosis model classifies certain issues that potentially need diagnosis as `needsdiagnosis = False`. While this is expected, I think it might be getting worse, as the issues data is unbalanced and has much mo...
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\n\nimport xgboost\nfrom sklearn.compose import ColumnT...
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\n\nimport xgboost\nfrom sklearn.compose import ColumnT...
diff --git a/bugbug/models/needsdiagnosis.py b/bugbug/models/needsdiagnosis.py index 71fe8b00bf..a60da9bba0 100644 --- a/bugbug/models/needsdiagnosis.py +++ b/bugbug/models/needsdiagnosis.py @@ -71,9 +71,9 @@ def get_labels(self): continue for event in issue["events"]: - i...
pytorch__vision-7449
Dataset MovingMNIST: `split=None` returns test dataset ### 🐛 Describe the bug I've found a bug in the code for torchvision's MovingMNIST dataset, which causes only the test dataset to be returned when split=None. According to the documentation, when split is set to None, the entire dataset should be returned. However...
[ { "content": "import os.path\nfrom typing import Callable, Optional\n\nimport numpy as np\nimport torch\nfrom torchvision.datasets.utils import download_url, verify_str_arg\nfrom torchvision.datasets.vision import VisionDataset\n\n\nclass MovingMNIST(VisionDataset):\n \"\"\"`MovingMNIST <http://www.cs.toront...
[ { "content": "import os.path\nfrom typing import Callable, Optional\n\nimport numpy as np\nimport torch\nfrom torchvision.datasets.utils import download_url, verify_str_arg\nfrom torchvision.datasets.vision import VisionDataset\n\n\nclass MovingMNIST(VisionDataset):\n \"\"\"`MovingMNIST <http://www.cs.toront...
diff --git a/test/test_datasets.py b/test/test_datasets.py index 74d03e7ea15..48d08b846de 100644 --- a/test/test_datasets.py +++ b/test/test_datasets.py @@ -1504,14 +1504,16 @@ class MovingMNISTTestCase(datasets_utils.DatasetTestCase): ADDITIONAL_CONFIGS = combinations_grid(split=(None, "train", "test"), split_r...
TabbycatDebate__tabbycat-1620
Summernote boxes don't show I've had this happen a few times today, not sure if reliably reproducible yet. Only affects develop branch. Master branch works fine. Probably a dependency issue. Making a note so we remember to do something about it before Nebelung. ![image](https://user-images.githubusercontent.com/1725...
[ { "content": "import os\n\nfrom django.contrib.messages import constants as messages\nfrom django.utils.translation import gettext_lazy as _\n\n\nBASE_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, os.pardir)))\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\n\n# ====================================...
[ { "content": "import os\n\nfrom django.contrib.messages import constants as messages\nfrom django.utils.translation import gettext_lazy as _\n\n\nBASE_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, os.pardir)))\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\n\n# ====================================...
diff --git a/tabbycat/settings/core.py b/tabbycat/settings/core.py index ccc635dafd6..6cb1fbc1362 100644 --- a/tabbycat/settings/core.py +++ b/tabbycat/settings/core.py @@ -276,6 +276,8 @@ 'iframe': True, # Necessary; if just to compartmentalise jQuery dependency, } +X_FRAME_OPTIONS = 'SAMEORIGIN' # Necessary t...
lmfit__lmfit-py-190
scalar_minimize does not reset stderr and correl when a Minimizer instance is reused. `scalar_minimize` does not calculate parameter uncertainties (Related to #169). As such, I would expect the `stderr` and `correl` attributes to be `None` if I do a fit using that method. Indeed, a `Parameter` is initialised with `Non...
[ { "content": "\"\"\"\nSimple minimizer is a wrapper around scipy.leastsq, allowing a\nuser to build a fitting model as a function of general purpose\nFit Parameters that can be fixed or floated, bounded, and written\nas a simple expression of other Fit Parameters.\n\nThe user sets up a model in terms of instanc...
[ { "content": "\"\"\"\nSimple minimizer is a wrapper around scipy.leastsq, allowing a\nuser to build a fitting model as a function of general purpose\nFit Parameters that can be fixed or floated, bounded, and written\nas a simple expression of other Fit Parameters.\n\nThe user sets up a model in terms of instanc...
diff --git a/lmfit/minimizer.py b/lmfit/minimizer.py index 9385e6b32..a5191a726 100644 --- a/lmfit/minimizer.py +++ b/lmfit/minimizer.py @@ -355,7 +355,11 @@ def prepare_fit(self, params=None): self.nfev = 0 self.var_map = [] self.vars = [] + self.errorbars = False for name, p...
holoviz__holoviews-998
renderer.save with matplotlib puts legend outside figure's bbox Seems like holoviews is not accouting for the legend when calculating a figure's bounding box with the matplotlib backend. I'm using holoviews version 1.6.2, matplotlib 1.5.3 and python 2.7.12+. Here's a minimal failing example: <pre> #!/usr/bin/env...
[ { "content": "import math, copy\n\nimport param\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as mpl_colors\nfrom matplotlib import ticker\nfrom matplotlib.dates import date2num\n\nfrom ...core import util\nfrom ...core import (OrderedDict, NdOverlay, D...
[ { "content": "import math, copy\n\nimport param\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as mpl_colors\nfrom matplotlib import ticker\nfrom matplotlib.dates import date2num\n\nfrom ...core import util\nfrom ...core import (OrderedDict, NdOverlay, D...
diff --git a/holoviews/plotting/mpl/element.py b/holoviews/plotting/mpl/element.py index ae10a163f7..84a78d7b63 100644 --- a/holoviews/plotting/mpl/element.py +++ b/holoviews/plotting/mpl/element.py @@ -176,7 +176,9 @@ def _finalize_axis(self, key, title=None, dimensions=None, ranges=None, xticks=N i...
django-json-api__django-rest-framework-json-api-979
document classes and overrides used in the example app [Usage documentation](https://django-rest-framework-json-api.readthedocs.io/en/stable/usage.html) and the example app are not consistent with each other. There are several classes used in the example that lack proper usage documentation and docstrings. Document...
[ { "content": "import rest_framework.exceptions as exceptions\nimport rest_framework.parsers\nimport rest_framework.renderers\nfrom django_filters import rest_framework as filters\nfrom rest_framework.filters import SearchFilter\n\nimport rest_framework_json_api.metadata\nimport rest_framework_json_api.parsers\n...
[ { "content": "import rest_framework.exceptions as exceptions\nimport rest_framework.parsers\nimport rest_framework.renderers\nfrom django_filters import rest_framework as filters\nfrom rest_framework.filters import SearchFilter\n\nimport rest_framework_json_api.metadata\nimport rest_framework_json_api.parsers\n...
diff --git a/docs/usage.md b/docs/usage.md index bf77f3dd..02d9fbd2 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -620,14 +620,14 @@ class LineItemViewSet(viewsets.ModelViewSet): serializer_class = LineItemSerializer def get_queryset(self): - queryset = super(LineItemViewSet, self).get_queryset()...
Kinto__kinto-689
503 when using an integer ID ``` echo '{"data": {"id": 2} }' | http POST localhost:8888/v1/buckets/default/collections/foo/records -a test:test ``` produces ``` 2016-06-21 13:41:49,701 DEBUG [kinto.core.storage.postgresql.pool.QueuePoolWithMaxBacklog][waitress] Connection <connection object at 0x7f1f396ad6e0; dsn: 'd...
[ { "content": "import re\nimport functools\n\nimport colander\nimport venusian\nimport six\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,\n ...
[ { "content": "import re\nimport functools\n\nimport colander\nimport venusian\nimport six\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,\n ...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e37a802e4..4fe1a628b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,10 @@ This document describes changes between each past release. 3.3.0 (unreleased) ================== -- Nothing changed yet. +**Bug fixes** + +- Fix crash with PostgreSQL storage backend...
internetarchive__openlibrary-4041
Search Facets broken <!-- What problem are we solving? What does the experience look like today? What are the symptoms? --> ### Relevant url? e.g. https://openlibrary.org/search?q=title%3A+%22test%22&mode=everything ### Steps to Reproduce 1. Go to https://openlibrary.org/search?q=title%3A+%22test%22&mode=everyt...
[ { "content": "\"\"\"\nOpen Library Plugin.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport requests\nimport sentry_sdk\nimport web\nimport simplejson\nimport json\nimport os\nimport socket\nimport random\nimport datetime\nimport logging\nfrom time import time\n\n...
[ { "content": "\"\"\"\nOpen Library Plugin.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport requests\nimport sentry_sdk\nimport web\nimport simplejson\nimport json\nimport os\nimport socket\nimport random\nimport datetime\nimport logging\nfrom time import time\n\n...
diff --git a/openlibrary/plugins/openlibrary/code.py b/openlibrary/plugins/openlibrary/code.py index 1fbac834584..57f8662aba2 100644 --- a/openlibrary/plugins/openlibrary/code.py +++ b/openlibrary/plugins/openlibrary/code.py @@ -703,7 +703,10 @@ def changequery(query=None, **kw): else: query[k] = ...
airctic__icevision-821
Adding Non Unique Names To ClassMap Must Be Illegal Currently, `add_name` doesn't check if the added `name` is a duplicate or not. This should be illegal, as classes must be unique https://github.com/airctic/icevision/blob/82f3c7322d5adbc41d6a1b7b9e4327eb32ad23c4/icevision/core/class_map.py#L47-L51
[ { "content": "__all__ = [\"ClassMap\", \"BACKGROUND\"]\n\nfrom icevision.imports import *\n\nBACKGROUND = \"background\"\n\n\nclass ClassMap:\n \"\"\"Utility class for mapping between class name and id.\"\"\"\n\n def __init__(\n self,\n classes: Optional[Sequence[str]] = None,\n backg...
[ { "content": "__all__ = [\"ClassMap\", \"BACKGROUND\"]\n\nfrom icevision.imports import *\n\nBACKGROUND = \"background\"\n\n\nclass ClassMap:\n \"\"\"Utility class for mapping between class name and id.\"\"\"\n\n def __init__(\n self,\n classes: Optional[Sequence[str]] = None,\n backg...
diff --git a/icevision/core/class_map.py b/icevision/core/class_map.py index 8c99a30f4..dc880890f 100644 --- a/icevision/core/class_map.py +++ b/icevision/core/class_map.py @@ -44,7 +44,13 @@ def get_by_name(self, name: str) -> int: else: raise e - def add_name(self, name) -> int: + ...
Chia-Network__chia-blockchain-14300
Confusing docstring line _Originally posted by @arvidn in https://github.com/Chia-Network/chia-blockchain/pull/13976#discussion_r1029192732_ I can't parse this sentence. is it supposed to say "inside one *of* the mempools"? But we only have one mempool, so I still wouldn't know what that means reall...
[ { "content": "from __future__ import annotations\n\nimport asyncio\nimport logging\nimport time\nfrom concurrent.futures import Executor\nfrom concurrent.futures.process import ProcessPoolExecutor\nfrom multiprocessing.context import BaseContext\nfrom typing import Awaitable, Callable, Dict, List, Optional, Set...
[ { "content": "from __future__ import annotations\n\nimport asyncio\nimport logging\nimport time\nfrom concurrent.futures import Executor\nfrom concurrent.futures.process import ProcessPoolExecutor\nfrom multiprocessing.context import BaseContext\nfrom typing import Awaitable, Callable, Dict, List, Optional, Set...
diff --git a/chia/full_node/mempool_manager.py b/chia/full_node/mempool_manager.py index 6ce13dae97f9..41bd3681dc1d 100644 --- a/chia/full_node/mempool_manager.py +++ b/chia/full_node/mempool_manager.py @@ -544,7 +544,8 @@ def get_spendbundle(self, bundle_hash: bytes32) -> Optional[SpendBundle]: def get_mempool_...
Rapptz__discord.py-6436
Voice Client average latency issue **Summary** Voice Client average latency zero division error **Reproduction Steps** For the first 5~ seconds after joining a voice channel (until the first heartbeat ack), the `average_latency` property results in a `ZeroDivisionError`. ```py async def join(ctx): voi...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, inclu...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, inclu...
diff --git a/discord/gateway.py b/discord/gateway.py index 9b85b8664ccc..f13276a16de4 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -876,7 +876,7 @@ def latency(self): def average_latency(self): """:class:`list`: Average of last 20 HEARTBEAT latencies.""" heartbeat = self._keep_aliv...
django-extensions__django-extensions-470
print_user_for_session doesn't look for USERNAME_FIELD attr on custom User models Throws following error when using custom user model. ``` AttributeError: 'ProfileUser' object has no attribute 'username' ``` (django>=1.5 issue)
[ { "content": "from importlib import import_module\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\n\ntry:\n from django.contrib.auth import get_user_model # Django 1.5\nexcept ImportError:\n from django_extensions.future_1_5 import get_user_model\n\ntr...
[ { "content": "from importlib import import_module\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\n\ntry:\n from django.contrib.auth import get_user_model # Django 1.5\nexcept ImportError:\n from django_extensions.future_1_5 import get_user_model\n\ntr...
diff --git a/django_extensions/management/commands/print_user_for_session.py b/django_extensions/management/commands/print_user_for_session.py index d61059fcc..6189d2ae8 100644 --- a/django_extensions/management/commands/print_user_for_session.py +++ b/django_extensions/management/commands/print_user_for_session.py @@ ...
conda__conda-3684
--mkdir no longer works After upgrading to `conda=4.2`: ``` C:\> conda install --mkdir -n name python=3.5 CondaEnvironmentNotFoundError: Could not find environment: name . You can list all discoverable environments with `conda info --envs`. ``` --mkdir no longer works After upgrading to `conda=4.2`: ``` C:\> conda i...
[ { "content": "# (c) Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport ...
[ { "content": "# (c) Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport ...
diff --git a/conda/cli/install.py b/conda/cli/install.py index c9bdd7fc140..922f0288563 100644 --- a/conda/cli/install.py +++ b/conda/cli/install.py @@ -142,7 +142,7 @@ def install(args, parser, command='install'): isinstall = bool(command == 'install') if newenv: common.ensure_name_or_prefix(args, c...
hpcaitech__ColossalAI-2712
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport torch.distributed as dist\n\nfrom colossalai.registry import DIST_GROUP_INITIALIZER\nfrom .initializer_tensor import Initializer_Tensor\nfrom .process_group_initializer import ProcessGroupInitializer\nfrom ..parallel_mode import ParallelMode...
[ { "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport torch.distributed as dist\n\nfrom colossalai.registry import DIST_GROUP_INITIALIZER\n\nfrom ..parallel_mode import ParallelMode\nfrom .initializer_tensor import Initializer_Tensor\nfrom .process_group_initializer import ProcessGroupInitializ...
diff --git a/colossalai/context/process_group_initializer/initializer_sequence.py b/colossalai/context/process_group_initializer/initializer_sequence.py index 682fe4bb7633..eaacb14d2282 100644 --- a/colossalai/context/process_group_initializer/initializer_sequence.py +++ b/colossalai/context/process_group_initializer/i...
zulip__zulip-21237
docs: make links equally browsable on both GitHub and ReadTheDocs Once upstream bug https://github.com/readthedocs/recommonmark/issues/179 is fixed, we can replace the `.html` part in links of the form `file_name.html#anchor` with `.md`. This is a followup to https://github.com/zulip/zulip/pull/13232.
[ { "content": "import os\n\nZULIP_VERSION = \"5.0-dev+git\"\n\n# Add information on number of commits and commit hash to version, if available\nzulip_git_version_file = os.path.join(\n os.path.dirname(os.path.abspath(__file__)), \"zulip-git-version\"\n)\nlines = [ZULIP_VERSION, \"\"]\nif os.path.exists(zulip_...
[ { "content": "import os\n\nZULIP_VERSION = \"5.0-dev+git\"\n\n# Add information on number of commits and commit hash to version, if available\nzulip_git_version_file = os.path.join(\n os.path.dirname(os.path.abspath(__file__)), \"zulip-git-version\"\n)\nlines = [ZULIP_VERSION, \"\"]\nif os.path.exists(zulip_...
diff --git a/docs/conf.py b/docs/conf.py index d2ef139c8ef8f..44c6a0853a039 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,6 +36,7 @@ "colon_fence", "substitution", ] +myst_heading_anchors = 6 myst_substitutions = { "LATEST_RELEASE_VERSION": LATEST_RELEASE_VERSION, } diff --git a/docs/contributin...
google__mobly-269
When failure occurs in setup class "begin_time" for skipped tests is null End time is not null. Can we either make them equal to each other (i.e. skipped test takes 0 time) or both null?
[ { "content": "# Copyright 2016 Google 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# Unless required by applicab...
[ { "content": "# Copyright 2016 Google 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# Unless required by applicab...
diff --git a/mobly/records.py b/mobly/records.py index 0b67c9d1..6b8c983e 100644 --- a/mobly/records.py +++ b/mobly/records.py @@ -89,7 +89,8 @@ def _test_end(self, result, e): be any exception instance or of any subclass of mobly.signals.TestSignal. """ - self.end_time...
mne-tools__mne-bids-1171
read_raw_bids() messes up the channel order and therefore loading raw fails ### Description of the problem I can load my data using `mne.read_raw()` but not using `mne_bids.read_raw_bids()`. I get the following error: ```Python ValueError: New channel names are not unique, renaming failed ``` My `electrodes.ts...
[ { "content": "\"\"\"Check whether a file format is supported by BIDS and then load it.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@ber...
[ { "content": "\"\"\"Check whether a file format is supported by BIDS and then load it.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@ber...
diff --git a/doc/whats_new.rst b/doc/whats_new.rst index ae01b4e66..1daa65260 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -21,6 +21,7 @@ The following authors contributed for the first time. Thank you so much! 🤩 The following authors had contributed before. Thank you for sticking around! 🤘 +* `Rich...
vyperlang__vyper-3264
Better error message for missing enum item ### Version Information * vyper Version (output of `vyper --version`): 0.3.8 * OS: osx * Python Version (output of `python --version`): Python 3.8.6 ### What's your issue about? Would it be possible to have more descriptive message for following error – missing item...
[ { "content": "from functools import cached_property\nfrom typing import Dict, List, Optional, Tuple, Union\n\nfrom vyper import ast as vy_ast\nfrom vyper.abi_types import ABI_Address, ABI_GIntM, ABI_Tuple, ABIType\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n EnumDecl...
[ { "content": "from functools import cached_property\nfrom typing import Dict, List, Optional, Tuple, Union\n\nfrom vyper import ast as vy_ast\nfrom vyper.abi_types import ABI_Address, ABI_GIntM, ABI_Tuple, ABIType\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n EnumDecl...
diff --git a/tests/parser/syntax/test_enum.py b/tests/parser/syntax/test_enum.py index fe7b9fc83d..c13f27f497 100644 --- a/tests/parser/syntax/test_enum.py +++ b/tests/parser/syntax/test_enum.py @@ -7,6 +7,7 @@ NamespaceCollision, StructureException, TypeMismatch, + UnknownAttribute, ) fail_list =...
Kinto__kinto-855
request.matched_route.pattern has no attribute pattern when matched_route is None This error occurred when deploying Kinto 4.3 in stage. ``` AttributeError: 'NoneType' object has no attribute 'pattern' (2 additional frame(s) were not displayed) ... File "pyramid/registry.py", line 91, in notify [ _ for _ in self...
[ { "content": "import re\nimport warnings\nfrom datetime import datetime\nfrom dateutil import parser as dateparser\n\nimport structlog\nfrom pyramid.events import NewRequest, NewResponse\nfrom pyramid.exceptions import ConfigurationError\nfrom pyramid.httpexceptions import (HTTPTemporaryRedirect, HTTPGone,\n ...
[ { "content": "import re\nimport warnings\nfrom datetime import datetime\nfrom dateutil import parser as dateparser\n\nimport structlog\nfrom pyramid.events import NewRequest, NewResponse\nfrom pyramid.exceptions import ConfigurationError\nfrom pyramid.httpexceptions import (HTTPTemporaryRedirect, HTTPGone,\n ...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 584cefbcc..bb071b15d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,7 +11,7 @@ This document describes changes between each past release. - Make sure we redirect endpoints with trailing slashes with the default bucket plugin. (#848) - Fix group association when ...
Kinto__kinto-1139
Consistency on PUT with mandatory schema fields While working on #790 I realize that there is something not clear in our specifications. Currently, if a resource has a mandatory field (eg. groups `members`), then we cannot do a `PUT` with just the `permissions` values. This is because a PUT can lead to a creation, and...
[ { "content": "import colander\n\nfrom kinto.core import resource, utils\nfrom kinto.core.events import ResourceChanged, ACTIONS\nfrom pyramid.events import subscriber\n\n\ndef validate_member(node, member):\n if member.startswith('/buckets/') or member == 'system.Everyone':\n raise colander.Invalid(no...
[ { "content": "import colander\n\nfrom kinto.core import resource, utils\nfrom kinto.core.events import ResourceChanged, ACTIONS\nfrom pyramid.events import subscriber\n\n\ndef validate_member(node, member):\n if member.startswith('/buckets/') or member == 'system.Everyone':\n raise colander.Invalid(no...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b60c6d01c..40fb91d74 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,7 @@ This document describes changes between each past release. - The history entries for deletions now provide the deleted object instead of just the tombstone (fixes #1135) +- Groups...
modin-project__modin-6283
Refactor ci.yml to reduce the amount of copy-pasting
[ { "content": "from setuptools import setup, find_packages\nimport versioneer\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n long_description = fh.read()\n\ndask_deps = [\"dask>=2.22.0\", \"distributed>=2.22.0\"]\nray_deps = [\"ray[default]>=1.13.0\", \"pyarrow\"]\nunidist_deps = [\"unidist[m...
[ { "content": "from setuptools import setup, find_packages\nimport versioneer\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n long_description = fh.read()\n\ndask_deps = [\"dask>=2.22.0\", \"distributed>=2.22.0\"]\n# ray==2.5.0 broken: https://github.com/conda-forge/ray-packages-feedstock/issu...
diff --git a/.github/actions/mamba-env/action.yml b/.github/actions/mamba-env/action.yml new file mode 100644 index 00000000000..6badcf68e15 --- /dev/null +++ b/.github/actions/mamba-env/action.yml @@ -0,0 +1,44 @@ +name: "Install environment using Mamba" +description: "Prepare the environment to run Modin" +inputs: + ...
Rapptz__discord.py-8446
Python 3.10 Union syntax breaks when used with commands.Range ### Summary title ### Reproduction Steps annotate a commmand parameter as optional using the 3.10 `|` syntax and it fails with a TypeError on being initialized. ### Minimal Reproducible Code ```python from __future__ import annotations import discord...
[ { "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nth...
[ { "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nth...
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 18df5669a47e..fff3d12ac82e 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -1109,6 +1109,9 @@ def __call__(self) -> None: # Trick to allow it inside typing.Union p...
mindsdb__lightwood-1051
Lightwood pip packages creates tests module Installing lightwood creates 'tests' module in python site-packages Steps to reproduce: - `pip install lightwood` - in python - `import tests` - `print(tests.__file__) ` It will show that 'tests' is in site-packages
[ { "content": "import sys\nimport setuptools\nimport os\n\n\ndef remove_requirements(requirements, name, replace=''):\n new_requirements = []\n for requirement in requirements:\n if requirement.split(' ')[0] != name:\n new_requirements.append(requirement)\n elif replace is not None...
[ { "content": "import sys\nimport setuptools\nimport os\n\n\ndef remove_requirements(requirements, name, replace=''):\n new_requirements = []\n for requirement in requirements:\n if requirement.split(' ')[0] != name:\n new_requirements.append(requirement)\n elif replace is not None...
diff --git a/.github/workflows/ligthtwood.yml b/.github/workflows/ligthtwood.yml index 338319167..0e2d6d487 100644 --- a/.github/workflows/ligthtwood.yml +++ b/.github/workflows/ligthtwood.yml @@ -27,7 +27,6 @@ jobs: pip install --no-cache-dir -e . pip install -r requirements_image.txt pip in...
jschneier__django-storages-551
Cannot pickle S3Boto3
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport threading\nimport warnings\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.conf import settings as django_settings\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.c...
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport threading\nimport warnings\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.conf import settings as django_settings\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.c...
diff --git a/storages/backends/s3boto3.py b/storages/backends/s3boto3.py index c3adada5e..19901a72b 100644 --- a/storages/backends/s3boto3.py +++ b/storages/backends/s3boto3.py @@ -276,6 +276,17 @@ def __init__(self, acl=None, bucket=None, **settings): "set AWS_DEFAULT_ACL." ) + def _...
pyqtgraph__pyqtgraph-108
Memory Leak when adding GLScatterPlotItem I have found that adding and removing the same `GLScatterPlotItem` in a `GLViewWidget` causes a memory leak. Here is a script to demonstrate the behavior: ``` python import numpy as np from PySide import QtCore, QtGui import sys import pyqtgraph.opengl as gl num_points = 10 ...
[ { "content": "from OpenGL.GL import *\nfrom OpenGL.arrays import vbo\nfrom .. GLGraphicsItem import GLGraphicsItem\nfrom .. import shaders\nfrom ... import QtGui\nimport numpy as np\n\n__all__ = ['GLScatterPlotItem']\n\nclass GLScatterPlotItem(GLGraphicsItem):\n \"\"\"Draws points at a list of 3D positions.\...
[ { "content": "from OpenGL.GL import *\nfrom OpenGL.arrays import vbo\nfrom .. GLGraphicsItem import GLGraphicsItem\nfrom .. import shaders\nfrom ... import QtGui\nimport numpy as np\n\n__all__ = ['GLScatterPlotItem']\n\nclass GLScatterPlotItem(GLGraphicsItem):\n \"\"\"Draws points at a list of 3D positions.\...
diff --git a/pyqtgraph/opengl/items/GLScatterPlotItem.py b/pyqtgraph/opengl/items/GLScatterPlotItem.py index 6cfcc6aa87..dc4b298ae1 100644 --- a/pyqtgraph/opengl/items/GLScatterPlotItem.py +++ b/pyqtgraph/opengl/items/GLScatterPlotItem.py @@ -66,7 +66,8 @@ def fn(x,y): #print pData.shape, pData.min(), pData.ma...
django-oscar__django-oscar-2498
ConditionalOffer.priority should be dashboard editable There is no way to view or edit the `priority` field for `ConditionalOffer` the the dashboard. It should be displayed in the list view, and editable from the edit view.
[ { "content": "import datetime\n\nfrom django import forms\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom oscar.core.loading import get_model\nfrom oscar.forms import widgets\n\nConditionalOffer = get_model('offer', 'ConditionalOffer')\nCondition = get_model('offer...
[ { "content": "import datetime\n\nfrom django import forms\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom oscar.core.loading import get_model\nfrom oscar.forms import widgets\n\nConditionalOffer = get_model('offer', 'ConditionalOffer')\nCondition = get_model('offer...
diff --git a/src/oscar/apps/dashboard/offers/forms.py b/src/oscar/apps/dashboard/offers/forms.py index b465c823843..71216b6b828 100644 --- a/src/oscar/apps/dashboard/offers/forms.py +++ b/src/oscar/apps/dashboard/offers/forms.py @@ -37,7 +37,7 @@ class Meta: fields = ('start_datetime', 'end_datetime', ...
StackStorm__st2-5347
should check both 'http_proxy' and 'HTTP_PROXY' when get proxy info from environment variables ## SUMMARY I just faced an embarrassed problem that command `st2 action list` keeps return 503. I tried `st2 --debug action list` and the result in line `HTTP_PROXY`(**uppercase**) was empty. This mislead me that the ...
[ { "content": "# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, 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/l...
[ { "content": "# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, 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/l...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4a6ae0d5b6..4c9693a425 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,10 @@ Fixed Contributed by @cognifloyd. +* Fixed ``st2client/st2client/base.py`` file to check for http_proxy and https_proxy environment variables for both lower and upper cases. +...
optuna__optuna-3410
The values of best_index_ and trial number do not match ### Expected behavior I thought I could use best_index_ to find out which Trial reached the optimal solution. However, in reality, the value of best_index_ and the Trial number do not match. I think it's because I got the idxmin of trials_dataframe, but is ...
[ { "content": "from logging import DEBUG\nfrom logging import INFO\nfrom logging import WARNING\nfrom numbers import Integral\nfrom numbers import Number\nfrom time import time\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import List\nfro...
[ { "content": "from logging import DEBUG\nfrom logging import INFO\nfrom logging import WARNING\nfrom numbers import Integral\nfrom numbers import Number\nfrom time import time\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import List\nfro...
diff --git a/optuna/integration/sklearn.py b/optuna/integration/sklearn.py index b16825c2ce..6e85ac46a3 100644 --- a/optuna/integration/sklearn.py +++ b/optuna/integration/sklearn.py @@ -513,11 +513,12 @@ def _estimator_type(self) -> str: @property def best_index_(self) -> int: - """Index which corre...
beetbox__beets-696
%if{} template function should work with Python booleans Currently, if the first argument to an %if{} is the string "False", it treats the condition as true. It should special-case this string to facilitate use with inline functions that return booleans.
[ { "content": "# This file is part of beets.\n# Copyright 2013, 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, including\n# without limita...
[ { "content": "# This file is part of beets.\n# Copyright 2013, 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, including\n# without limita...
diff --git a/beets/library.py b/beets/library.py index 95dffee70c..bb10f73923 100644 --- a/beets/library.py +++ b/beets/library.py @@ -1121,9 +1121,13 @@ def tmpl_if(condition, trueval, falseval=u''): otherwise, emit ``falseval`` (if provided). """ try: - condition = _int_arg(condi...
keras-team__keras-nlp-1211
AutoGraph error upon model.fit() in GPT **Describe the bug** <details><summary>StackTrace</summary> <p> OperatorNotAllowedInGraphError Traceback (most recent call last) [<ipython-input-10-6ef525f3a2b6>](https://localhost:8080/#) in <cell line: 1>() ----> 1 model.fit(train_ds, validation_data=val_ds...
[ { "content": "# Copyright 2023 The KerasNLP 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 b...
[ { "content": "# Copyright 2023 The KerasNLP 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 b...
diff --git a/keras_nlp/metrics/perplexity.py b/keras_nlp/metrics/perplexity.py index 7ff78ebc0d..481ef30a42 100644 --- a/keras_nlp/metrics/perplexity.py +++ b/keras_nlp/metrics/perplexity.py @@ -160,10 +160,10 @@ def update_state(self, y_true, y_pred, sample_weight=None): self._number_of_samples.assign_add(bat...
ansible-collections__community.vmware-1634
Missing Quotation mark in vmware_object_rename error message <!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY A que...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2019, Ansible Project\n# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3....
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2019, Ansible Project\n# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3....
diff --git a/changelogs/fragments/1633-missing_quotation_mark.yml b/changelogs/fragments/1633-missing_quotation_mark.yml new file mode 100644 index 0000000000..a7fa641542 --- /dev/null +++ b/changelogs/fragments/1633-missing_quotation_mark.yml @@ -0,0 +1,2 @@ +bugfixes: + - vmware_object_rename - Add missing quotation...
chainer__chainer-6489
ChainerMN's ImageNet example is broken because of update in pickle module * Conditions <!-- If you're using Chainer 4.0+, you can also get this information by typing `python -c 'import chainer; chainer.print_runtime_info()'. --> - Chainer >= 5.0.0 * Code to reproduce The ImageNet example on Python >= 3.6 ```...
[ { "content": "#!/usr/bin/env python\n\nfrom __future__ import print_function\nimport argparse\nimport multiprocessing\nimport random\nimport sys\n\nimport numpy as np\n\nimport chainer\nimport chainer.cuda\nfrom chainer import training\nfrom chainer.training import extensions\n\nimport chainermn\n\n\nimport mod...
[ { "content": "#!/usr/bin/env python\n\nfrom __future__ import print_function\nimport argparse\nimport multiprocessing\nimport random\nimport sys\n\nimport numpy as np\n\nimport chainer\nimport chainer.cuda\nfrom chainer import training\nfrom chainer.training import extensions\n\nimport chainermn\n\n\nimport mod...
diff --git a/docs/source/chainermn/tutorial/tips_faqs.rst b/docs/source/chainermn/tutorial/tips_faqs.rst index 536e20b52c6c..b614c7ca114c 100644 --- a/docs/source/chainermn/tutorial/tips_faqs.rst +++ b/docs/source/chainermn/tutorial/tips_faqs.rst @@ -15,7 +15,7 @@ start child processes, with a process explicitly forked...
encode__django-rest-framework-6758
DRF doesn't set allow_empty=False for ArrayField with blank=False Recently I came across an issue where invalid data was being created through our API, it turns out there's a subtle difference between the validation on an `ArrayField` and the resulting `ListField` in a `ModelSerializer`. Given the following `models....
[ { "content": "\"\"\"\nHelper functions for mapping model fields to a dictionary of default\nkeyword arguments that should be used for their equivalent serializer fields.\n\"\"\"\nimport inspect\n\nfrom django.core import validators\nfrom django.db import models\nfrom django.utils.text import capfirst\n\nfrom re...
[ { "content": "\"\"\"\nHelper functions for mapping model fields to a dictionary of default\nkeyword arguments that should be used for their equivalent serializer fields.\n\"\"\"\nimport inspect\n\nfrom django.core import validators\nfrom django.db import models\nfrom django.utils.text import capfirst\n\nfrom re...
diff --git a/rest_framework/utils/field_mapping.py b/rest_framework/utils/field_mapping.py index 1281ee1672..b90c3eeadb 100644 --- a/rest_framework/utils/field_mapping.py +++ b/rest_framework/utils/field_mapping.py @@ -109,6 +109,9 @@ def get_field_kwargs(field_name, model_field): if model_field.blank and (isinsta...
pytorch__pytorch-928
Importing scipy.misc after torch causes segfault As shown in below. Is this something expected? This seems most closely related to https://github.com/pytorch/pytorch/issues/595, but it is closed without any specific solutions. ``` (venv) $ pip freeze appdirs==1.4.0 numpy==1.12.0 packaging==16.8 pyparsing==2.1.10...
[ { "content": "\"\"\"\nThe torch package contains data structures for multi-dimensional\ntensors and mathematical operations over these are defined.\nAdditionally, it provides many utilities for efficient serializing of\nTensors and arbitrary types, and other useful utilities.\n\nIt has a CUDA counterpart, that ...
[ { "content": "\"\"\"\nThe torch package contains data structures for multi-dimensional\ntensors and mathematical operations over these are defined.\nAdditionally, it provides many utilities for efficient serializing of\nTensors and arbitrary types, and other useful utilities.\n\nIt has a CUDA counterpart, that ...
diff --git a/torch/__init__.py b/torch/__init__.py index 8d15034bf0296e..069ea09beb40c7 100644 --- a/torch/__init__.py +++ b/torch/__init__.py @@ -31,6 +31,13 @@ # automatically filled by the dynamic loader. import os as _dl_flags +# if we have numpy, it *must* be imported before the call to setdlopenflags() +# or ...
gwastro__pycbc-2623
Remove upper requirement on the astropy version Is there any reason for having the upper version bound on astropy (`astropy>=2.0.3,<3.0.0`) in the requirements file? Is this just that PyCBC is not yet completely Python 3 compatible yet? From looking at the locations where astropy is used in the code, and testing them w...
[ { "content": "#!/usr/bin/env python\n# Copyright (C) 2012 Alex Nitz, Duncan Brown, Andrew Miller, Josh Willis\n#\n# This program is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by the\n# Free Software Foundation; either version 2 of th...
[ { "content": "#!/usr/bin/env python\n# Copyright (C) 2012 Alex Nitz, Duncan Brown, Andrew Miller, Josh Willis\n#\n# This program is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by the\n# Free Software Foundation; either version 2 of th...
diff --git a/requirements.txt b/requirements.txt index 244aedbad75..9827468ab64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ # requirements for most basic library use -astropy>=2.0.3,<3.0.0 +astropy>=2.0.3,<3.0.0; python_version <= '2.7' +astropy>=2.0.3; python_version > '3.4' Mako>=1.0.1 dec...
urllib3__urllib3-614
Uncaught exception from pyOpenSSL's shutdown call See https://github.com/pypa/pip/issues/2753 for more details
[ { "content": "'''SSL with SNI_-support for Python 2. Follow these instructions if you would\nlike to verify SSL certificates in Python 2. Note, the default libraries do\n*not* do certificate checking; you need to do additional work to validate\ncertificates yourself.\n\nThis needs the following packages install...
[ { "content": "'''SSL with SNI_-support for Python 2. Follow these instructions if you would\nlike to verify SSL certificates in Python 2. Note, the default libraries do\n*not* do certificate checking; you need to do additional work to validate\ncertificates yourself.\n\nThis needs the following packages install...
diff --git a/urllib3/contrib/pyopenssl.py b/urllib3/contrib/pyopenssl.py index b2c34a8921..c4de33592b 100644 --- a/urllib3/contrib/pyopenssl.py +++ b/urllib3/contrib/pyopenssl.py @@ -208,9 +208,13 @@ def sendall(self, data): sent = self._send_until_done(data) data = data[sent:] + def shut...
StackStorm__st2-4407
CLI ERROR: 'unicodeescape' codec can't decode bytes in position 238-239: truncated \UXXXXXXXX escape ##### SUMMARY Running a command from the vSphere pack that executes a command on a windows guest and returns a string is successful, and I can see it in the st2 GUI, but the command line response indicates a problem ...
[ { "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li...
[ { "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ff2ab26477..333ba956ab 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -58,6 +58,11 @@ Fixed * Fixed warning in ``st2-run-pack-tests`` about invalid format for ``pip list``. (bug fix) Contributed by Nick Maludy (Encore Technologies). #4380 +* Fix a bug with ``st2...