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
⌀
espnet__espnet-1865
Freeze modules bug? https://github.com/espnet/espnet/blob/25862dd93081746ac623720f31f4f0f323c9750e/espnet/tts/pytorch_backend/tts.py#L331-L334 Do you think to freeze the module of the model, the line should be change into: if any(mod.startswith(key) for key in args.freeze_mods): ?
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"E2E-TTS training / decoding functions.\"\"\"\n\nimport copy\nimport json\nimport logging\nimport math\nimport os\nimport time...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"E2E-TTS training / decoding functions.\"\"\"\n\nimport copy\nimport json\nimport logging\nimport math\nimport os\nimport time...
diff --git a/espnet/tts/pytorch_backend/tts.py b/espnet/tts/pytorch_backend/tts.py index 9d4c870d7de..01395199e7e 100644 --- a/espnet/tts/pytorch_backend/tts.py +++ b/espnet/tts/pytorch_backend/tts.py @@ -330,7 +330,8 @@ def train(args): # freeze modules, if specified if args.freeze_mods: for mod, pa...
blakeblackshear__frigate-11479
[UI/nit] Logs, "Jump to Bottom" button colors Recently and on dev-e91f3d8 I noticed this button may not have the right style? I could see how it could potentially be the right style, but something seems a little off by it, maybe just BG color, maybe just FG color, hard for me to know for sure (I also haven't checked al...
[ { "content": "\"\"\"Event apis.\"\"\"\n\nimport logging\nimport os\nfrom datetime import datetime\nfrom functools import reduce\nfrom pathlib import Path\nfrom urllib.parse import unquote\n\nimport cv2\nfrom flask import (\n Blueprint,\n current_app,\n jsonify,\n make_response,\n request,\n)\nfro...
[ { "content": "\"\"\"Event apis.\"\"\"\n\nimport logging\nimport os\nfrom datetime import datetime\nfrom functools import reduce\nfrom pathlib import Path\nfrom urllib.parse import unquote\n\nimport cv2\nfrom flask import (\n Blueprint,\n current_app,\n jsonify,\n make_response,\n request,\n)\nfro...
diff --git a/frigate/api/event.py b/frigate/api/event.py index 17fc5c776a..267d13bc91 100644 --- a/frigate/api/event.py +++ b/frigate/api/event.py @@ -227,9 +227,9 @@ def events(): elif sort == "score_desc": order_by = Event.data["score"].desc() elif sort == "date_asc": - Event...
Cog-Creators__Red-DiscordBot-6206
Update instance does not exist message to include incorrect instance name ### What component of Red (cog, command, API) would you like to see improvements on? Core CLI ### Describe the enhancement you're suggesting. When the bot cannot launch due to an invalid instance name, it can be unclear [in some cases](https:/...
[ { "content": "import inspect\nimport json\nimport logging\nimport os\nimport sys\nimport tempfile\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom typing import Any, Dict\n\nimport platformdirs\n\nfrom . import commands\nfrom ._cli import ExitCodes\n\n__all__ = (\n \"cog_data_path\",\n \"core_da...
[ { "content": "import inspect\nimport json\nimport logging\nimport os\nimport sys\nimport tempfile\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom typing import Any, Dict\n\nimport platformdirs\n\nfrom . import commands\nfrom ._cli import ExitCodes\n\n__all__ = (\n \"cog_data_path\",\n \"core_da...
diff --git a/redbot/core/data_manager.py b/redbot/core/data_manager.py index 9e980057596..c221301b151 100644 --- a/redbot/core/data_manager.py +++ b/redbot/core/data_manager.py @@ -123,7 +123,7 @@ def load_basic_configuration(instance_name_: str): basic_config = config[_instance_name] except KeyError: ...
DataDog__dd-trace-py-5558
Algoliasearch non-text argument used in set_tag_str See https://github.com/DataDog/dd-trace-py/pull/4727#issuecomment-1511668474, we changed a usage of `set_tag()` to `set_tag_str()` in our algoliasearch integration, but that patched function involves non-text arguments that `set_tag_str()` throws an error for.
[ { "content": "from ddtrace import config\nfrom ddtrace.ext import SpanKind\nfrom ddtrace.ext import SpanTypes\nfrom ddtrace.internal.constants import COMPONENT\nfrom ddtrace.internal.utils.wrappers import unwrap as _u\nfrom ddtrace.pin import Pin\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\n...
[ { "content": "from ddtrace import config\nfrom ddtrace.ext import SpanKind\nfrom ddtrace.ext import SpanTypes\nfrom ddtrace.internal.constants import COMPONENT\nfrom ddtrace.internal.utils.wrappers import unwrap as _u\nfrom ddtrace.pin import Pin\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\n...
diff --git a/ddtrace/contrib/algoliasearch/patch.py b/ddtrace/contrib/algoliasearch/patch.py index 8aca9a98c0b..6d9ac440514 100644 --- a/ddtrace/contrib/algoliasearch/patch.py +++ b/ddtrace/contrib/algoliasearch/patch.py @@ -130,7 +130,7 @@ def _patched_search(func, instance, wrapt_args, wrapt_kwargs): for...
biolab__orange3-6119
Hard to guess what is the role of Predictions and Probabilities check box in Confusion Matrix In some older implementation Predictions and Probabilities check box were enclosed with an Output box, giving these two a meaning. Without this box it is hard to guess what role these check boxes play, as changing them does no...
[ { "content": "\"\"\"Confusion matrix widget\"\"\"\n\nfrom math import isnan, isinf\nfrom itertools import chain\nimport unicodedata\n\nfrom AnyQt.QtWidgets import QTableView, QHeaderView, QStyledItemDelegate, \\\n QSizePolicy\nfrom AnyQt.QtGui import QFont, QBrush, QColor, QStandardItemModel, QStandardItem\n...
[ { "content": "\"\"\"Confusion matrix widget\"\"\"\n\nfrom math import isnan, isinf\nfrom itertools import chain\nimport unicodedata\n\nfrom AnyQt.QtWidgets import QTableView, QHeaderView, QStyledItemDelegate, \\\n QSizePolicy\nfrom AnyQt.QtGui import QFont, QBrush, QColor, QStandardItemModel, QStandardItem\n...
diff --git a/Orange/widgets/evaluate/owconfusionmatrix.py b/Orange/widgets/evaluate/owconfusionmatrix.py index 00f19454169..3f28eb3ea8d 100644 --- a/Orange/widgets/evaluate/owconfusionmatrix.py +++ b/Orange/widgets/evaluate/owconfusionmatrix.py @@ -136,7 +136,7 @@ def __init__(self): ) self.outputbo...
getpelican__pelican-2414
mtime issue on Debian stretch make files copy quasi systematic even if STATIC_CHECK_IF_MODIFIED set to True Issue on commit 9e526a825ee308c9e982bf0eca427ea4fdfc0f8d. > python copy instruction doesn't preserve mtime under Debian/stretch (up to date). This results in lot of files are copied to output even if not ch...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport calendar\nimport errno\nimport fnmatch\nimport logging\nimport os\nfrom codecs import open\nfrom collections import defaultdict\nfrom functools import partial\nfrom itertools import chain, groupby\nfrom oper...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport calendar\nimport errno\nimport fnmatch\nimport logging\nimport os\nfrom codecs import open\nfrom collections import defaultdict\nfrom functools import partial\nfrom itertools import chain, groupby\nfrom oper...
diff --git a/pelican/generators.py b/pelican/generators.py index c7fc4a9e3..2b2c02a3f 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -820,7 +820,7 @@ def _source_is_newer(self, staticfile): save_as = os.path.join(self.output_path, staticfile.save_as) s_mtime = os.path.getmtime(sourc...
conda__conda-build-1636
Better default for build/features in bdist_conda It seems that `conda-build` now expects `build/features` to be an actual list not `None`. So make the default value of `build/features` an empty list. That way it is compliant with `conda-build`, but still has a sensible default that means there are no features.
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nfrom os.path import isfile, join\nimport re\nimport sys\n\nfrom .conda_interface import iteritems, PY3, text_type\nfrom .conda_interface import memoized, md5_file\nfrom .conda_interface import non_x86_linux_machines, pl...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nfrom os.path import isfile, join\nimport re\nimport sys\n\nfrom .conda_interface import iteritems, PY3, text_type\nfrom .conda_interface import memoized, md5_file\nfrom .conda_interface import non_x86_linux_machines, pl...
diff --git a/conda_build/metadata.py b/conda_build/metadata.py index 2e392b9a72..b060927c12 100644 --- a/conda_build/metadata.py +++ b/conda_build/metadata.py @@ -868,6 +868,6 @@ def uses_vcs_in_build(self): return None def validate_features(self): - if any('-' in feature for feature in self.get_...
ietf-tools__datatracker-4708
New outgoing liaison form fails at the From contact On submission, validation of valid from contacts fail - the field is cleared, and unless you are in very special role, the field is also disabled, so there is no recourse.
[ { "content": "# Copyright The IETF Trust 2011-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport io\nimport os\nimport operator\n\nfrom typing import Union # pyflakes:ignore\n\nfrom email.utils import parseaddr\nfrom form_utils.forms import BetterModelForm\n\nfrom django import forms\nfro...
[ { "content": "# Copyright The IETF Trust 2011-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport io\nimport os\nimport operator\n\nfrom typing import Union # pyflakes:ignore\n\nfrom email.utils import parseaddr\nfrom form_utils.forms import BetterModelForm\n\nfrom django import forms\nfro...
diff --git a/ietf/liaisons/forms.py b/ietf/liaisons/forms.py index b765519530..13b74b9d4e 100644 --- a/ietf/liaisons/forms.py +++ b/ietf/liaisons/forms.py @@ -510,7 +510,7 @@ def set_from_fields(self): else: email = self.person.email_address() self.fields['from_contact'].initial = email -...
strawberry-graphql__strawberry-2968
Upgrade to latest uvicorn A cant install latest uvicorn 0.23 with latest strawberry 0.195.2 and debug-server, just uvicorn and strawberry, without debug server, or uvicorn 0.21.3 and strawberry with debug server ## Describe the Bug <!-- A clear and concise description of what the bug is. --> ## System Informat...
[ { "content": "import nox\nfrom nox_poetry import Session, session\n\nnox.options.reuse_existing_virtualenvs = True\nnox.options.error_on_external_run = True\n\nPYTHON_VERSIONS = [\"3.11\", \"3.10\", \"3.9\", \"3.8\", \"3.7\"]\n\n\nCOMMON_PYTEST_OPTIONS = [\n \"--cov=.\",\n \"--cov-append\",\n \"--cov-r...
[ { "content": "import nox\nfrom nox_poetry import Session, session\n\nnox.options.reuse_existing_virtualenvs = True\nnox.options.error_on_external_run = True\n\nPYTHON_VERSIONS = [\"3.11\", \"3.10\", \"3.9\", \"3.8\", \"3.7\"]\n\n\nCOMMON_PYTEST_OPTIONS = [\n \"--cov=.\",\n \"--cov-append\",\n \"--cov-r...
diff --git a/Makefile b/Makefile deleted file mode 100644 index e0c6d9ee76..0000000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -prepare-release: - python scripts/prepare_release.py - -create-github-release: - python scripts/create_github_release.py - -publish-changes: - python scripts/publish_changes.py - -check-...
gwastro__pycbc-3258
PyCBC inference fails if psd-inverse-length not given. Pycbc_inference relies on a pad variable that is only initialized if the PSD inverse length is given: https://github.com/gwastro/pycbc/compare/master...spxiwh:basic_lisa_detector_hack?expand=1#diff-8f038663d003b687dc646a7f8d409e3cR334
[ { "content": "# Copyright (C) 2018 Collin Capano\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 3 of the License, or (at your\n# option) any later version.\n#\n# This...
[ { "content": "# Copyright (C) 2018 Collin Capano\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 3 of the License, or (at your\n# option) any later version.\n#\n# This...
diff --git a/pycbc/inference/models/data_utils.py b/pycbc/inference/models/data_utils.py index 3d3bec30b0e..98ece045464 100644 --- a/pycbc/inference/models/data_utils.py +++ b/pycbc/inference/models/data_utils.py @@ -339,6 +339,8 @@ def data_opts_from_config(cp, section, filter_flow): "(= psd-...
pypi__warehouse-6925
Translation links in footer should display in local language For example: - "French" should be "Français" - "Spanish" should be "Español" Etc.
[ { "content": "# 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 law or agreed to in writing, softw...
[ { "content": "# 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 law or agreed to in writing, softw...
diff --git a/docs/translations.rst b/docs/translations.rst index 8c6ad8db34d5..152c52c05c62 100644 --- a/docs/translations.rst +++ b/docs/translations.rst @@ -21,8 +21,8 @@ To add a new known locale, add a key/value to the ``KNOWN_LOCALES`` mapping in `warehouse/i18n/__init__.py <https://github.com/pypa/warehouse/blo...
huggingface__diffusers-2551
Adding support for `safetensors` and LoRa. Enabling safetensors support for the LoRA files: Asked here: https://github.com/huggingface/safetensors/issues/180 Same attitude as the regular model weights. If: - safetensors is installed - repo has the safetensors lora then it is the default. Adding `safe_se...
[ { "content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/src/diffusers/loaders.py b/src/diffusers/loaders.py index cfc7c5896f97..b2e91e3f6ac3 100644 --- a/src/diffusers/loaders.py +++ b/src/diffusers/loaders.py @@ -150,7 +150,7 @@ def load_attn_procs(self, pretrained_model_name_or_path_or_dict: Union[str, Dict model_file = None if not isinsta...
open-telemetry__opentelemetry-python-contrib-472
OpenTracing propagator does not use a TraceFlags object I set up a client and server that propagated spans using the OpenTracing propagator. The server side reported this error: ``` [2021-04-26 16:41:13,377] ERROR in app: Exception on /ping [GET] Traceback (most recent call last): File "/home/ocelotl/virtual_en...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/CHANGELOG.md b/CHANGELOG.md index ebbac23718..c3f4a47b30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/open-telemetry/opentelemetry-python-contrib/compare/v0.200...HEAD) ...
pretix__pretix-1525
External authentication without second login backend enabled not possible When using multiple authentication backends, `nav-pills` are shown shown to select the authentication method. These buttons will replace the `backend` parameter for form based authentication methods. For `authentication_url`-based backends clicki...
[ { "content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth.password_validation import (\n password_validators_help_texts, validate_password,\n)\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pretix.base.models import User\n\n\nclass LoginForm(forms.Fo...
[ { "content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth.password_validation import (\n password_validators_help_texts, validate_password,\n)\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pretix.base.models import User\n\n\nclass LoginForm(forms.Fo...
diff --git a/src/pretix/base/forms/auth.py b/src/pretix/base/forms/auth.py index 942424515b1..4eda9e4eb37 100644 --- a/src/pretix/base/forms/auth.py +++ b/src/pretix/base/forms/auth.py @@ -32,7 +32,8 @@ def __init__(self, backend, request=None, *args, **kwargs): for k, f in backend.login_form_fields.items(): ...
matrix-org__synapse-9937
Failing to sync: attr._funcs.evolve() argument after ** must be a mapping, not RoomStreamToken Seeing these errors on latest develop (merged with #9379 -- so far that branch has worked consistently). ``` 2021-05-06 10:37:24,144 - synapse.http.server - 93 - ERROR - GET-282- Failed handle request via 'SyncRestServle...
[ { "content": "# Copyright 2015, 2016 OpenMarket Ltd\n# Copyright 2017 Vector Creations Ltd\n# Copyright 2018 New Vector Ltd\n# Copyright 2020 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Licens...
[ { "content": "# Copyright 2015, 2016 OpenMarket Ltd\n# Copyright 2017 Vector Creations Ltd\n# Copyright 2018 New Vector Ltd\n# Copyright 2020 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Licens...
diff --git a/changelog.d/9937.bugfix b/changelog.d/9937.bugfix new file mode 100644 index 000000000000..c1cc5ccb43ae --- /dev/null +++ b/changelog.d/9937.bugfix @@ -0,0 +1 @@ +Fix bug where `/sync` would break if using the latest version of `attrs` dependency, by pinning to a previous version. diff --git a/synapse/pyth...
sunpy__sunpy-2134
Specifying path in Fido.fetch behaves strangely For example: In [36]: aia = Fido.search(a.Time('2011-06-07 06:33','2011-06-07 06:33:08'),a.Instrument('aia')) In [37]: aia Out[37]: <sunpy.net.fido_factory.UnifiedResponse object at 0x11836d890> Results from the VSOClient: <Table lengt...
[ { "content": "# -*- coding: utf-8 -*-\n# Author: Florian Mayer <florian.mayer@bitsrc.org>\n#\n# This module was developed with funding provided by\n# the ESA Summer of Code (2011).\n#\n# pylint: disable=W0401,C0103,R0904,W0141\nfrom __future__ import absolute_import, division, print_function\n\n\"\"\"\nThis mod...
[ { "content": "# -*- coding: utf-8 -*-\n# Author: Florian Mayer <florian.mayer@bitsrc.org>\n#\n# This module was developed with funding provided by\n# the ESA Summer of Code (2011).\n#\n# pylint: disable=W0401,C0103,R0904,W0141\nfrom __future__ import absolute_import, division, print_function\n\n\"\"\"\nThis mod...
diff --git a/sunpy/net/tests/test_vso.py b/sunpy/net/tests/test_vso.py index 3ec35956d0d..28168311f15 100644 --- a/sunpy/net/tests/test_vso.py +++ b/sunpy/net/tests/test_vso.py @@ -5,7 +5,9 @@ from __future__ import absolute_import +import tempfile import datetime + import pytest from astropy import units as u ...
espnet__espnet-2317
error in training stage "Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! Hello guys! we are running the recipe of ljspeech of version 0.8.0 but on our data set, we are using google colaboratory. At the stage of training we are getting this error "Expected all tensors to b...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Tacotron 2 related modules.\"\"\"\n\nimport logging\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nf...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Tacotron 2 related modules.\"\"\"\n\nimport logging\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nf...
diff --git a/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py b/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py index 90e28eb5934..6c0c642039c 100644 --- a/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py +++ b/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py @@ -122,7 +122,7 @@ def _make_guided_attention_mask(ilen, o...
google__turbinia-259
Save_evidence should be called only when copyable=True https://github.com/google/turbinia/blob/master/turbinia/workers/__init__.py#L123
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2015 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# U...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2015 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# U...
diff --git a/turbinia/workers/__init__.py b/turbinia/workers/__init__.py index 30ae8da54..00e2926dd 100644 --- a/turbinia/workers/__init__.py +++ b/turbinia/workers/__init__.py @@ -120,7 +120,8 @@ def close(self, task, success, status=None): for evidence in self.evidence: if evidence.local_path: se...
huggingface__transformers-11405
metric is uninitialized when csv data is supplied to example/pytorch/text-classification/run_glue_no_trainer.py ## Environment info - `transformers` version: 4.5.1 - Platform: Darwin-18.7.0-x86_64-i386-64bit - Python version: 3.7.0 - PyTorch version (GPU?): 1.8.1 (False) - Tensorflow version (GPU?): not installe...
[ { "content": "# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/li...
[ { "content": "# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/li...
diff --git a/examples/pytorch/text-classification/run_glue_no_trainer.py b/examples/pytorch/text-classification/run_glue_no_trainer.py index 646d6e93f63d..f2658db9e68c 100644 --- a/examples/pytorch/text-classification/run_glue_no_trainer.py +++ b/examples/pytorch/text-classification/run_glue_no_trainer.py @@ -367,6 +36...
goauthentik__authentik-9410
Unable to open the login page **Describe the bug** Going to the subdomain's root page (`/`) redirects me to `/if/flow/default-authentication-flow/?next=%2F` with the message "Something went wrong! Please try again later." **To Reproduce** Likely the same as #9402 **Expected behavior** Login should work as ex...
[ { "content": "\"\"\"Identification stage logic\"\"\"\n\nfrom dataclasses import asdict\nfrom random import SystemRandom\nfrom time import sleep\nfrom typing import Any\n\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom django.utils....
[ { "content": "\"\"\"Identification stage logic\"\"\"\n\nfrom dataclasses import asdict\nfrom random import SystemRandom\nfrom time import sleep\nfrom typing import Any\n\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom django.utils....
diff --git a/authentik/stages/identification/stage.py b/authentik/stages/identification/stage.py index ed61e8adad5c..8be41825d547 100644 --- a/authentik/stages/identification/stage.py +++ b/authentik/stages/identification/stage.py @@ -237,8 +237,6 @@ def get_challenge(self) -> Challenge: ) for source ...
pulp__pulpcore-3678
Special characters in the directory listing regex should be escaped Steps to reproduce: ``` http://localhost:5001/pulp/content/43036ebe-5d0e-413c-881c-42c576b067b2/deltas/KK/LCzQ9nUs0sVU9+94E2ek3Dyc+ToKjMpe1pNqMthcg-CpWGufXYjIIlkgTANq_eDb9yzAgANtrjdjgp+Rw8UcU/ ``` ``` [2023-03-25 22:44:06 +0000] [5590] [ERROR]...
[ { "content": "import asyncio\nimport logging\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import (\n HTTPForbidden,\n HTTPFound,\n HTTPNotFo...
[ { "content": "import asyncio\nimport logging\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import (\n HTTPForbidden,\n HTTPFound,\n HTTPNotFo...
diff --git a/CHANGES/3673.bugfix b/CHANGES/3673.bugfix new file mode 100644 index 0000000000..ec80e4e9df --- /dev/null +++ b/CHANGES/3673.bugfix @@ -0,0 +1 @@ +Fixed a regular expression used when listing directories. diff --git a/pulpcore/content/handler.py b/pulpcore/content/handler.py index 884d1ad674..554627cdd5 10...
GPflow__GPflow-164
ValueError in multiclass likelihood Hi, when I run line 5 of the multiclass notebook: ``` python m.kern.white.variance.fixed = True m.Z.fixed = True _ = m.optimize() ``` I get the following error (stacktrace): ``` python --------------------------------------------------------------------------- ValueError ...
[ { "content": "# Copyright 2016 Valentine Svensson, James Hensman, alexggmatthews, Alexis Boukouvalas\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.or...
[ { "content": "# Copyright 2016 Valentine Svensson, James Hensman, alexggmatthews, Alexis Boukouvalas\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.or...
diff --git a/GPflow/likelihoods.py b/GPflow/likelihoods.py index 6ac29a661..45abdc453 100644 --- a/GPflow/likelihoods.py +++ b/GPflow/likelihoods.py @@ -387,7 +387,7 @@ def prob_is_largest(self, Y, mu, var, gh_x, gh_w): cdfs = cdfs * tf.expand_dims(oh_off, 2) + tf.expand_dims(oh_on, 2) # take the pr...
azavea__raster-vision-354
Installing Nvidia drivers doesn't work When building the AMI, the `install-nvidia-drivers.sh` fails with base AMI `'ami-9109beee` (latest deep learning ami) and Nvidia drivers 384.125. I was able to get it to run with the `--install-libglvnd` flag. But, when I start an instance with the resulting AMI, running `nvidia-s...
[ { "content": "\"\"\"Helper functions to handle AMI creation with packer\"\"\"\n\nimport boto3\nimport os\nfrom os.path import dirname\nimport subprocess\nimport re\nimport logging\n\nLOGGER = logging.getLogger(__file__)\nLOGGER.addHandler(logging.StreamHandler())\nLOGGER.setLevel(logging.INFO)\n\n\ndef get_rece...
[ { "content": "\"\"\"Helper functions to handle AMI creation with packer\"\"\"\n\nimport boto3\nimport os\nfrom os.path import dirname\nimport subprocess\nimport re\nimport logging\n\nLOGGER = logging.getLogger(__file__)\nLOGGER.addHandler(logging.StreamHandler())\nLOGGER.setLevel(logging.INFO)\n\n\ndef get_rece...
diff --git a/deployment/batch/compute_environment_gpu.json b/deployment/batch/compute_environment_gpu.json index 65fa6c8c1..93ae23cf1 100644 --- a/deployment/batch/compute_environment_gpu.json +++ b/deployment/batch/compute_environment_gpu.json @@ -8,7 +8,7 @@ "maxvCpus": 200, "desiredvCpus": 0, ...
biolab__orange3-3357
Scatter Plot shows wrong tooltips <!-- This is an issue template. Please fill in the relevant details in the sections below. Wrap code and verbatim terminal window output into triple backticks, see: https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code If you're raising an issue ab...
[ { "content": "from xml.sax.saxutils import escape\n\nimport numpy as np\n\nfrom AnyQt.QtCore import QSize\nfrom AnyQt.QtWidgets import QApplication\n\nfrom Orange.data import Table, ContinuousVariable, Domain, Variable\nfrom Orange.data.sql.table import SqlTable\nfrom Orange.statistics.util import bincount\n\nf...
[ { "content": "from xml.sax.saxutils import escape\n\nimport numpy as np\n\nfrom AnyQt.QtCore import QSize\nfrom AnyQt.QtWidgets import QApplication\n\nfrom Orange.data import Table, ContinuousVariable, Domain, Variable\nfrom Orange.data.sql.table import SqlTable\nfrom Orange.statistics.util import bincount\n\nf...
diff --git a/Orange/widgets/visualize/tests/test_owprojectionwidget.py b/Orange/widgets/visualize/tests/test_owprojectionwidget.py index cd4c6e0c51c..6b19b0819cc 100644 --- a/Orange/widgets/visualize/tests/test_owprojectionwidget.py +++ b/Orange/widgets/visualize/tests/test_owprojectionwidget.py @@ -102,6 +102,16 @@ de...
dbt-labs__dbt-core-1164
dbt trying to parse tags in analyses even when wrapped in `raw` tags ## Issue ### Steps to Reproduce 1. Put an unknown tag within `raw` tags in a sql file, in your _analysis_ directory (note that the bug doesn't occur in a model). ``` {% raw %} {% form %} date_part: type: select default: day opti...
[ { "content": "import itertools\nimport os\nimport json\nfrom collections import OrderedDict, defaultdict\nimport sqlparse\n\nimport dbt.utils\nimport dbt.include\nimport dbt.tracking\n\nfrom dbt.utils import get_materialization, NodeType, is_type\n\nfrom dbt.linker import Linker\n\nimport dbt.compat\nimport dbt...
[ { "content": "import itertools\nimport os\nimport json\nfrom collections import OrderedDict, defaultdict\nimport sqlparse\n\nimport dbt.utils\nimport dbt.include\nimport dbt.tracking\n\nfrom dbt.utils import get_materialization, NodeType, is_type\n\nfrom dbt.linker import Linker\n\nimport dbt.compat\nimport dbt...
diff --git a/dbt/compilation.py b/dbt/compilation.py index 76a56bffd1d..0af3539c21e 100644 --- a/dbt/compilation.py +++ b/dbt/compilation.py @@ -132,7 +132,7 @@ def compile_node(self, node, manifest, extra_context=None): injected_node, _ = prepend_ctes(compiled_node, manifest) - should_wrap = {NodeT...
ibis-project__ibis-5524
bug: re_replace() doesn't fill params right? ### What happened? Thanks for looking at this. ```python import ibis # this errors: ibis.literal("hi").re_replace("x", "y").substitute({"d": "b"}, else_="k") # This works fine: # ibis.literal("hi").re_replace("x", "y") # this works fine: # ibis.literal("hi").subst...
[ { "content": "from __future__ import annotations\n\nimport operator\nfrom typing import Any, Mapping\n\nimport numpy as np\nimport sqlalchemy as sa\nfrom sqlalchemy.ext.compiler import compiles\nfrom sqlalchemy.sql.functions import GenericFunction\n\nimport ibis.expr.operations as ops\nfrom ibis.backends.base.s...
[ { "content": "from __future__ import annotations\n\nimport operator\nfrom typing import Any, Mapping\n\nimport numpy as np\nimport sqlalchemy as sa\nfrom sqlalchemy.ext.compiler import compiles\nfrom sqlalchemy.sql.functions import GenericFunction\n\nimport ibis.expr.operations as ops\nfrom ibis.backends.base.s...
diff --git a/ibis/backends/duckdb/registry.py b/ibis/backends/duckdb/registry.py index 17ee860fcd7e..3aca29727db2 100644 --- a/ibis/backends/duckdb/registry.py +++ b/ibis/backends/duckdb/registry.py @@ -249,7 +249,7 @@ def _struct_column(t, op): ), ops.RegexExtract: fixed_arity(_regex_extract, 3), ...
litestar-org__litestar-3136
Bug: Duplicate Response Schema name when using ManyToOne relationships ### Description I am creating log file models that have a relationship to a user model. The models are similar to the following. ```py class User(UUIDBase): name: Mapped[str] class Logfile(UUIDAuditBase): name: Mapped[str] ...
[ { "content": "\"\"\"DTO backends do the heavy lifting of decoding and validating raw bytes into domain models, and\nback again, to bytes.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import replace\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n ClassVar,\n Col...
[ { "content": "\"\"\"DTO backends do the heavy lifting of decoding and validating raw bytes into domain models, and\nback again, to bytes.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import replace\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n ClassVar,\n Col...
diff --git a/litestar/dto/_backend.py b/litestar/dto/_backend.py index 1c48dc0555..03a1768217 100644 --- a/litestar/dto/_backend.py +++ b/litestar/dto/_backend.py @@ -406,6 +406,8 @@ def _create_transfer_type( if nested_depth == self.dto_factory.config.max_nested_depth: raise RecursionErro...
Kinto__kinto-2214
Straighten out commit_veto situation In https://github.com/Kinto/kinto-signer/issues/591, we discovered that failing requests do not necessarily abort the transaction. (Exceptions do, but non-exceptional responses with e.g. 503 status codes don't.) There seems to be some confusion about this throughout the codebase; fo...
[ { "content": "import logging\nimport warnings\nfrom collections import OrderedDict\n\nimport transaction\nfrom pyramid.events import NewRequest\nimport pyramid.tweens\nfrom enum import Enum\n\nfrom kinto.core.utils import strip_uri_prefix\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass ACTIONS(Enum):\n ...
[ { "content": "import logging\nimport warnings\nfrom collections import OrderedDict\n\nimport transaction\nfrom pyramid.events import NewRequest\nimport pyramid.tweens\nfrom enum import Enum\n\nfrom kinto.core.utils import strip_uri_prefix\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass ACTIONS(Enum):\n ...
diff --git a/docs/requirements.txt b/docs/requirements.txt index b7c703cd6..a56472d37 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -docutils==0.15.1 +docutils==0.15.1.post1 Sphinx==2.1.2 sphinx_rtd_theme==0.4.3 sphinxcontrib-httpdomain==1.7.0 diff --git a/kinto/core/events.py b/kint...
hydroshare__hydroshare-5266
nightly_zips_cleanup task fails with deep recursion **Description of the bug** ``` <MaybeEncodingError: Error sending result: ''(1, <ExceptionInfo: Retry(Retry(...), SessionException(SessionException(...), "Error processing IRODS request: 3. stderr follows:\\n\\nb\'remote addresses: 152.54.2.121 ERROR: rmUtil: rm err...
[ { "content": "\"\"\"Define celery tasks for hs_core app.\"\"\"\n\nimport os\nimport sys\nimport time\nimport traceback\nimport zipfile\nimport logging\nimport json\nimport asyncio\n\nfrom celery.signals import task_postrun\nfrom datetime import datetime, timedelta, date\nfrom django.utils import timezone\nfrom ...
[ { "content": "\"\"\"Define celery tasks for hs_core app.\"\"\"\n\nimport os\nimport sys\nimport time\nimport traceback\nimport zipfile\nimport logging\nimport json\nimport asyncio\n\nfrom celery.signals import task_postrun\nfrom datetime import datetime, timedelta, date\nfrom django.utils import timezone\nfrom ...
diff --git a/hs_core/tasks.py b/hs_core/tasks.py index 4f3aa3cb6f..2c72d33c04 100755 --- a/hs_core/tasks.py +++ b/hs_core/tasks.py @@ -150,8 +150,7 @@ def nightly_zips_cleanup(): istorage = IrodsStorage() if istorage.exists(zips_daily_date): istorage.delete(zips_daily_date) - federated_prefixes = ...
sonic-net__sonic-utilities-398
Unexpected keyword argument when changing port speed using config command **Description** Hi, I tried to change the speed of an interface config command. But received error stating that "TypeError: speed() got an unexpected keyword argument 'interface_speed'" **Steps to reproduce the issue** 1. config int...
[ { "content": "#!/usr/sbin/env python\n\nimport sys\nimport os\nimport click\nimport json\nimport subprocess\nimport netaddr\nimport re\nimport syslog\n\nimport sonic_platform\nfrom swsssdk import ConfigDBConnector\nfrom natsort import natsorted\nfrom minigraph import parse_device_desc_xml\n\nimport aaa\nimport ...
[ { "content": "#!/usr/sbin/env python\n\nimport sys\nimport os\nimport click\nimport json\nimport subprocess\nimport netaddr\nimport re\nimport syslog\n\nimport sonic_platform\nfrom swsssdk import ConfigDBConnector\nfrom natsort import natsorted\nfrom minigraph import parse_device_desc_xml\n\nimport aaa\nimport ...
diff --git a/config/main.py b/config/main.py index a76c22aa5e..9c1be08d53 100755 --- a/config/main.py +++ b/config/main.py @@ -825,7 +825,7 @@ def shutdown(ctx): @click.pass_context @click.argument('interface_speed', metavar='<interface_speed>', required=True) @click.option('-v', '--verbose', is_flag=True, help="Ena...
cloud-custodian__cloud-custodian-5926
aws - streaming-distribution filter and action for shield enablement **Is your feature request related to a problem? Please describe.** We would like to enable shield for aws.streaming-distribution **Describe the solution you'd like** Extend shield action/filter for the resource **Describe alternatives you've c...
[ { "content": "# Copyright 2016-2019 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
[ { "content": "# Copyright 2016-2019 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
diff --git a/c7n/resources/cloudfront.py b/c7n/resources/cloudfront.py index 7d9979bf4f6..ee7805d23a4 100644 --- a/c7n/resources/cloudfront.py +++ b/c7n/resources/cloudfront.py @@ -661,6 +661,10 @@ def process_distribution(self, client, distribution): raise e +StreamingDistribution.filter_registry.regi...
carpentries__amy-743
Escaped tags in every revision page ![screenshot from 2016-04-02 21 38 15](https://cloud.githubusercontent.com/assets/72821/14228635/3bd5c514-f91b-11e5-8953-753dbd8249ed.png) Escaped tags in every revision page ![screenshot from 2016-04-02 21 38 15](https://cloud.githubusercontent.com/assets/72821/14228635/3bd5c514-f9...
[ { "content": "from django import template\n\nfrom reversion.helpers import generate_patch_html\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef semantic_diff(left, right, field):\n return generate_patch_html(left, right, field, cleanup='semantic')\n", "path": "workshops/templatetags/diff.p...
[ { "content": "from django import template\nfrom django.utils.safestring import mark_safe\n\nfrom reversion.helpers import generate_patch_html\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef semantic_diff(left, right, field):\n return mark_safe(generate_patch_html(left, right, field, cleanup='...
diff --git a/workshops/templatetags/diff.py b/workshops/templatetags/diff.py index 441217385..9092fe5f3 100644 --- a/workshops/templatetags/diff.py +++ b/workshops/templatetags/diff.py @@ -1,4 +1,5 @@ from django import template +from django.utils.safestring import mark_safe from reversion.helpers import generate_p...
pytorch__vision-2236
DenseNet memory_efficient mode appears subtly broken since torchscript changes ## 🐛 Bug I was working with DenseNet recently, I noticed memory_efficient training was faster than with the flag disabled (unexpected), and it wasn't training very well at all, also errors from checkpoint fn about args not having require...
[ { "content": "import re\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.utils.checkpoint as cp\nfrom collections import OrderedDict\nfrom .utils import load_state_dict_from_url\nfrom torch import Tensor\nfrom torch.jit.annotations import List\n\n\n__all__ = ['DenseNet', 'dens...
[ { "content": "import re\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.utils.checkpoint as cp\nfrom collections import OrderedDict\nfrom .utils import load_state_dict_from_url\nfrom torch import Tensor\nfrom torch.jit.annotations import List\n\n\n__all__ = ['DenseNet', 'dens...
diff --git a/test/test_models.py b/test/test_models.py index 099bd355b8e..529a262a627 100644 --- a/test/test_models.py +++ b/test/test_models.py @@ -201,9 +201,11 @@ def test_memory_efficient_densenet(self): for name in ['densenet121', 'densenet169', 'densenet201', 'densenet161']: model1 = models....
Pyomo__pyomo-349
Indexed Expression display() duplicates "Key" column Input: ``` from pyomo.environ import * m = ConcreteModel() m.x = Var(initialize=1) m.s = RangeSet(5) @m.Expression(m.s) def indx_expr(m, s): return m.x m.indx_expr.display() ``` Output: ``` indx_expr : Size=5 Key : Key : Value 1 : 1...
[ { "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# Engineerin...
[ { "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# Engineerin...
diff --git a/pyomo/core/base/expression.py b/pyomo/core/base/expression.py index 442ab1e3e7a..3e2c5c471ef 100644 --- a/pyomo/core/base/expression.py +++ b/pyomo/core/base/expression.py @@ -330,9 +330,9 @@ def display(self, prefix="", ostream=None): ostream, prefix+tab, ((k,v) for ...
pymodbus-dev__pymodbus-922
mask_write_register command processes partial responses ### Versions * Python: 3.10.0 * OS: Win 10 * Pymodbus: 3.0.0.dev3 (also 2.5.3) * Modbus Hardware (if used): Custom ### Pymodbus Specific * Client: rtu - sync/async ### Description The mask_write_register command processes partial responses resulting ...
[ { "content": "\"\"\"Register Writing Request/Response Messages.\"\"\"\nimport struct\nfrom pymodbus.pdu import ModbusRequest\nfrom pymodbus.pdu import ModbusResponse\nfrom pymodbus.pdu import ModbusExceptions as merror\n\n\nclass WriteSingleRegisterRequest(ModbusRequest):\n \"\"\"This function code is used t...
[ { "content": "\"\"\"Register Writing Request/Response Messages.\"\"\"\nimport struct\nfrom pymodbus.pdu import ModbusRequest\nfrom pymodbus.pdu import ModbusResponse\nfrom pymodbus.pdu import ModbusExceptions as merror\n\n\nclass WriteSingleRegisterRequest(ModbusRequest):\n \"\"\"This function code is used t...
diff --git a/pymodbus/register_write_message.py b/pymodbus/register_write_message.py index 6135931ef..2408324f4 100644 --- a/pymodbus/register_write_message.py +++ b/pymodbus/register_write_message.py @@ -109,6 +109,14 @@ def decode(self, data): """ self.address, self.value = struct.unpack(">HH", data...
pypa__pipenv-2877
Pipenv requires existing folder `~/.local/share/virtualenvs` ##### Issue description When running the current commit 51cbc2e2f76a7c60f879a608fd96e95faca35f2e of pipenv in a Docker image (like `python:3.6`), one has to manually create the folder `/root/.local/share/virtualenvs` for pipenv to work. ##### Expected r...
[ { "content": "# -*- coding: utf-8 -*-\nimport errno\nimport logging\nimport os\nimport re\nimport shutil\nimport sys\n\nimport crayons\nimport parse\nimport six\nimport stat\nimport warnings\n\nfrom click import echo as click_echo\nfrom first import first\n\ntry:\n from weakref import finalize\nexcept Import...
[ { "content": "# -*- coding: utf-8 -*-\nimport errno\nimport logging\nimport os\nimport re\nimport shutil\nimport sys\n\nimport crayons\nimport parse\nimport six\nimport stat\nimport warnings\n\nfrom click import echo as click_echo\nfrom first import first\n\ntry:\n from weakref import finalize\nexcept Import...
diff --git a/news/2877.bugfix b/news/2877.bugfix new file mode 100644 index 0000000000..c5b23a31a3 --- /dev/null +++ b/news/2877.bugfix @@ -0,0 +1 @@ +Fixed a bug where `pipenv` crashes when the `WORKON_HOME` directory does not exist. diff --git a/pipenv/utils.py b/pipenv/utils.py index b7295c2921..0e1f851d1d 100644 --...
nvaccess__nvda-9887
UIA in Windows consoles: Say all behaves incorrectly <!-- Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files. Issues may be closed if the required information is not present. https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-a...
[ { "content": "# NVDAObjects/UIA/winConsoleUIA.py\n# A part of NonVisual Desktop Access (NVDA)\n# This file is covered by the GNU General Public License.\n# See the file COPYING for more details.\n# Copyright (C) 2019 Bill Dengler\n\nimport config\nimport ctypes\nimport NVDAHelper\nimport speech\nimport time\nim...
[ { "content": "# NVDAObjects/UIA/winConsoleUIA.py\n# A part of NonVisual Desktop Access (NVDA)\n# This file is covered by the GNU General Public License.\n# See the file COPYING for more details.\n# Copyright (C) 2019 Bill Dengler\n\nimport config\nimport ctypes\nimport NVDAHelper\nimport speech\nimport time\nim...
diff --git a/source/NVDAObjects/UIA/winConsoleUIA.py b/source/NVDAObjects/UIA/winConsoleUIA.py index 7a293af5ccc..cae4c4f8417 100644 --- a/source/NVDAObjects/UIA/winConsoleUIA.py +++ b/source/NVDAObjects/UIA/winConsoleUIA.py @@ -34,7 +34,7 @@ def collapse(self,end=False): # textRange back one character. # Correct...
flask-admin__flask-admin-2198
MenuLink's `target` parameter does nothing/is not rendered when template_mode="bootstrap4" It appears to be due to a missing jinga conditional check in the `menu_links` macro.
[ { "content": "import json\n\nfrom markupsafe import Markup\nfrom flask_admin._compat import text_type\ntry:\n from enum import Enum\nexcept ImportError:\n Enum = None\n\n\ndef null_formatter(view, value):\n \"\"\"\n Return `NULL` as the string for `None` value\n\n :param value:\n ...
[ { "content": "import json\n\nfrom markupsafe import Markup\nfrom flask_admin._compat import text_type\ntry:\n from enum import Enum\nexcept ImportError:\n Enum = None\n\n\ndef null_formatter(view, value):\n \"\"\"\n Return `NULL` as the string for `None` value\n\n :param value:\n ...
diff --git a/flask_admin/model/typefmt.py b/flask_admin/model/typefmt.py index 34035f933..bc043fdd8 100755 --- a/flask_admin/model/typefmt.py +++ b/flask_admin/model/typefmt.py @@ -36,8 +36,8 @@ def bool_formatter(view, value): Value to check """ glyph = 'ok-circle' if value else 'minus-sign' - ...
Kinto__kinto-657
[cliquet] Add timeout option for Redis client original: https://github.com/mozilla-services/cliquet/issues/582 all in the title.
[ { "content": "from __future__ import absolute_import, unicode_literals\nfrom functools import wraps\n\nimport redis\nfrom six.moves.urllib import parse as urlparse\n\nfrom kinto.core import utils, logger\nfrom kinto.core.storage import (\n exceptions, DEFAULT_ID_FIELD,\n DEFAULT_MODIFIED_FIELD, DEFAULT_DE...
[ { "content": "from __future__ import absolute_import, unicode_literals\nfrom functools import wraps\n\nimport redis\nfrom six.moves.urllib import parse as urlparse\n\nfrom kinto.core import utils, logger\nfrom kinto.core.storage import (\n exceptions, DEFAULT_ID_FIELD,\n DEFAULT_MODIFIED_FIELD, DEFAULT_DE...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 05ae190e1..126e8b3c7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,7 @@ This document describes changes between each past release. **Important**: Because of a limitation in `Pyramid tooling <http://stackoverflow.com/a/21228232/147077>`_, it won't work...
zulip__zulip-16582
Convert favicons to be <canvas>. In `./static/images/favicon` we have 100 different icons that were generated a while ago with the number of notifications that a user may have. Instead of calling a particular png every time the favicon is updated to reflect a new number of notifications, we should just generate a favic...
[ { "content": "from typing import Callable, List, Optional, Text\n\n\nclass FormattedException(Exception):\n pass\n\nclass TemplateParserException(Exception):\n def __init__(self, message: str) -> None:\n self.message = message\n\n def __str__(self) -> str:\n return self.message\n\nclass T...
[ { "content": "from typing import Callable, List, Optional, Text\n\n\nclass FormattedException(Exception):\n pass\n\nclass TemplateParserException(Exception):\n def __init__(self, message: str) -> None:\n self.message = message\n\n def __str__(self) -> str:\n return self.message\n\nclass T...
diff --git a/frontend_tests/node_tests/notifications.js b/frontend_tests/node_tests/notifications.js index 70354bebabfbf..e91f5c207d738 100644 --- a/frontend_tests/node_tests/notifications.js +++ b/frontend_tests/node_tests/notifications.js @@ -1,5 +1,7 @@ "use strict"; +const rewiremock = require("rewiremock/node")...
inventree__InvenTree-1734
Add option to hide "related parts" tab
[ { "content": "\"\"\"\nCommon database model definitions.\nThese models are 'generic' and do not fit a particular business logic object.\n\"\"\"\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport os\nimport decimal\nimport math\n\nfrom django.db import models, transaction\nfrom django....
[ { "content": "\"\"\"\nCommon database model definitions.\nThese models are 'generic' and do not fit a particular business logic object.\n\"\"\"\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport os\nimport decimal\nimport math\n\nfrom django.db import models, transaction\nfrom django....
diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index ddd27b734ec6..7e56429c51e7 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -219,6 +219,13 @@ class InvenTreeSetting(models.Model): 'validator': bool, }, + 'PART_SHOW_RELATED': { + ...
iterative__dvc-2627
Issue with dvc push to AWS s3 remote **Please provide information about your setup** DVC version(i.e. `dvc --version`), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux)) DVC: 0.62.1 Mac: Mojave 10.13 Install with pip issue with `dvc push` ![image](https://...
[ { "content": "\"\"\"Manages progress bars for dvc repo.\"\"\"\nfrom __future__ import print_function\nimport logging\nfrom tqdm import tqdm\nfrom concurrent.futures import ThreadPoolExecutor\nfrom funcy import merge\n\nlogger = logging.getLogger(__name__)\n\n\nclass TqdmThreadPoolExecutor(ThreadPoolExecutor):\n...
[ { "content": "\"\"\"Manages progress bars for dvc repo.\"\"\"\nfrom __future__ import print_function\nimport logging\nfrom tqdm import tqdm\nfrom concurrent.futures import ThreadPoolExecutor\nfrom funcy import merge\n\nlogger = logging.getLogger(__name__)\n\n\nclass TqdmThreadPoolExecutor(ThreadPoolExecutor):\n...
diff --git a/dvc/progress.py b/dvc/progress.py index df36726b82..f644596019 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -114,5 +114,11 @@ def format_dict(self): d = super(Tqdm, self).format_dict ncols = d["ncols"] or 80 ncols_desc = ncols - len(self.format_meter(ncols_desc=1, **d)) ...
rasterio__rasterio-2066
Test failures with gdal-3.2.0 + proj-7.2.0 While working on packaging gdal-3.2.0 + proj-7.2.0 for Fedora, rebuilding python-rasterio against these results in the following test failures, which don't occur with gdal-3.1.4 + proj-6.3.2: =================================== FAILURES =================================...
[ { "content": "#!/usr/bin/env python\n\n# Two environmental variables influence this script.\n#\n# GDAL_CONFIG: the path to a gdal-config program that points to GDAL headers,\n# libraries, and data files.\n#\n# PACKAGE_DATA: if defined, GDAL and PROJ4 data files will be copied into the\n# source or binary distri...
[ { "content": "#!/usr/bin/env python\n\n# Two environmental variables influence this script.\n#\n# GDAL_CONFIG: the path to a gdal-config program that points to GDAL headers,\n# libraries, and data files.\n#\n# PACKAGE_DATA: if defined, GDAL and PROJ4 data files will be copied into the\n# source or binary distri...
diff --git a/.travis.yml b/.travis.yml index d7901686c..f02efa630 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,30 +25,37 @@ jobs: env: GDALVERSION="2.4.4" PROJVERSION="4.9.3" - - python: "3.8" + - python: "3.7" env: - GDALVERSION="2.4.4" - PROJVERSION="4.9.3" - ...
sunpy__sunpy-7486
Saving with the ".jp2" extension results in a vertically flipped image ### Describe the bug Images get flipped when saving as jp2 files. This was my fault when I added this feature 🎉 ### To Reproduce ``` from sunpy.map import Map m = Map("https://helioviewer.org/jp2/AIA/2024/03/08/304/2024_03_08__00_00_05_123__S...
[ { "content": "\"\"\"\nThis module provides a JPEG 2000 file reader for internal use.\n\n.. warning::\n\n ``sunpy.io.jp2`` is deprecated, and will be removed in sunpy 4.1. This is\n because it was designed for internal use only.\n\"\"\"\nimport os\nfrom xml.etree import ElementTree as ET\n\nimport numpy as...
[ { "content": "\"\"\"\nThis module provides a JPEG 2000 file reader for internal use.\n\n.. warning::\n\n ``sunpy.io.jp2`` is deprecated, and will be removed in sunpy 4.1. This is\n because it was designed for internal use only.\n\"\"\"\nimport os\nfrom xml.etree import ElementTree as ET\n\nimport numpy as...
diff --git a/changelog/7486.bugfix.rst b/changelog/7486.bugfix.rst new file mode 100644 index 00000000000..cfbf4bd9f26 --- /dev/null +++ b/changelog/7486.bugfix.rst @@ -0,0 +1 @@ +JPEG2000 files are now saved with the correct orientation. Previously they would be vertically flipped when saved. diff --git a/sunpy/io/_jp...
dmlc__gluon-nlp-1219
Deprecation warning due to invalid escape sequences ## Description Deprecation warning due to invalid escape sequences. Using raw strings or escaping them again helps in resolving this. Check https://github.com/asottile/pyupgrade/ for automatic fix of this. ## To Reproduce ``` find . -iname '*.py' | grep -Ev ...
[ { "content": "import argparse\nimport random\nimport re\nimport sys\nimport time\nfrom datetime import datetime\n\nimport boto3\nfrom botocore.compat import total_seconds\n\nparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n\nparser.add_argument('--profile', help='profile...
[ { "content": "import argparse\nimport random\nimport re\nimport sys\nimport time\nfrom datetime import datetime\n\nimport boto3\nfrom botocore.compat import total_seconds\n\nparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n\nparser.add_argument('--profile', help='profile...
diff --git a/ci/batch/submit-job.py b/ci/batch/submit-job.py index ec99e44f47..5c48ab901c 100644 --- a/ci/batch/submit-job.py +++ b/ci/batch/submit-job.py @@ -92,7 +92,7 @@ def main(): spin = ['-', '/', '|', '\\', '-', '/', '|', '\\'] logGroupName = '/aws/batch/job' - jobName = re.sub('[^A-Za-z0-9_\-]', ...
PlasmaPy__PlasmaPy-2007
Update `Coulomb_log` example to use `n_e` instead of `n` In [the example section](https://github.com/PlasmaPy/PlasmaPy/blob/8091c31ae3d18c5adebaf15518ef56676921f9b7/plasmapy/formulary/collisions/coulomb.py#L407) of `plasmapy.formulary.collisions.coulomb.Coulomb_log`, the variable used for electron density is `n`, but i...
[ { "content": "\"\"\"\nThis module contains functionality for calculating Coulomb\nparameters for different configurations. Including a number of\nfunctions for handling Coulomb collisions spanning weakly coupled\n(low density) to strongly coupled (high density) regimes.\n\nCoulomb collisions are collisions wher...
[ { "content": "\"\"\"\nThis module contains functionality for calculating Coulomb\nparameters for different configurations. Including a number of\nfunctions for handling Coulomb collisions spanning weakly coupled\n(low density) to strongly coupled (high density) regimes.\n\nCoulomb collisions are collisions wher...
diff --git a/docs/about/credits.rst b/docs/about/credits.rst index 60e84edaeb..785a49203a 100644 --- a/docs/about/credits.rst +++ b/docs/about/credits.rst @@ -135,6 +135,7 @@ in parentheses are `ORCID author identifiers <https://orcid.org>`__. * :user:`Vishwas Rajashekar <DarkAEther>` (:orcid:`0000-0002-4914-6612`) *...
encode__django-rest-framework-4191
JSONField(binary=True) represents using binary strings, which JSONRenderer does not support. ## Checklist - [x] I have verified that that issue exists against the `master` branch of Django REST framework. - [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate. - [x] This is...
[ { "content": "\"\"\"\nHelper classes for parsers.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport datetime\nimport decimal\nimport json\nimport uuid\n\nfrom django.db.models.query import QuerySet\nfrom django.utils import six, timezone\nfrom django.utils.encoding import force_text\nfrom django.utils....
[ { "content": "\"\"\"\nHelper classes for parsers.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport datetime\nimport decimal\nimport json\nimport uuid\n\nfrom django.db.models.query import QuerySet\nfrom django.utils import six, timezone\nfrom django.utils.encoding import force_text\nfrom django.utils....
diff --git a/rest_framework/utils/encoders.py b/rest_framework/utils/encoders.py index 949c99eda6..f883b49257 100644 --- a/rest_framework/utils/encoders.py +++ b/rest_framework/utils/encoders.py @@ -51,6 +51,9 @@ def default(self, obj): return six.text_type(obj) elif isinstance(obj, QuerySet): ...
pantsbuild__pants-15405
Add `update_env` to `process_execution::local`. Replaces any `{chroot}` placeholders in the requested process env with the sandbox workdir. This reflects the behavior for interactive processes executed with the `run` goal.
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\"\"\"Goal for publishing packaged targets to any repository or registry etc.\n\nPlugins implement the publish protocol that provides this goal with the processes to...
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\"\"\"Goal for publishing packaged targets to any repository or registry etc.\n\nPlugins implement the publish protocol that provides this goal with the processes to...
diff --git a/src/python/pants/core/goals/publish.py b/src/python/pants/core/goals/publish.py index 3ee13b2dcc1..39fef2891f0 100644 --- a/src/python/pants/core/goals/publish.py +++ b/src/python/pants/core/goals/publish.py @@ -240,6 +240,7 @@ async def run_publish(console: Console, publish: PublishSubsystem) -> Publish: ...
Textualize__textual-1965
Make checkbox off style bold It looks the the checkbox off style is normal weight, while the on style is bold. We should make the off style of the X bold as well.
[ { "content": "\"\"\"Provides the base code and implementations of toggle widgets.\n\nIn particular it provides `Checkbox`, `RadioButton` and `RadioSet`.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import ClassVar\n\nfrom rich.style import Style\nfrom rich.text import Text, TextType\n\nfrom ..ap...
[ { "content": "\"\"\"Provides the base code and implementations of toggle widgets.\n\nIn particular it provides `Checkbox`, `RadioButton` and `RadioSet`.\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import ClassVar\n\nfrom rich.style import Style\nfrom rich.text import Text, TextType\n\nfrom ..ap...
diff --git a/src/textual/widgets/_toggle_button.py b/src/textual/widgets/_toggle_button.py index 0a3cfdc62c..51efa137bc 100644 --- a/src/textual/widgets/_toggle_button.py +++ b/src/textual/widgets/_toggle_button.py @@ -158,7 +158,7 @@ def _button(self) -> Text: # If the button is off, we're going to do a bit o...
tobymao__sqlglot-2541
`create constraint trigger` cannot be parsed Hi, I'm trying to parse the output of `pg_dump` with sqlglot. Some tables in our DB have constraint triggers to only execute the triggers when specific columns are updated. However, `sqlglot` fails to parse them correctly: **Fully reproducible code snippet** ```pyth...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n any_value_to_max_sql,\n arrow_json_extract_scalar_sql,\n arrow_json_extract_sql,\n bool_xor_sql,\n dates...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n any_value_to_max_sql,\n arrow_json_extract_scalar_sql,\n arrow_json_extract_sql,\n bool_xor_sql,\n dates...
diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py index b2db91aac6..b9eca90844 100644 --- a/sqlglot/dialects/postgres.py +++ b/sqlglot/dialects/postgres.py @@ -264,6 +264,7 @@ class Tokenizer(tokens.Tokenizer): "BEGIN TRANSACTION": TokenType.BEGIN, "BIGSERIAL": TokenType...
CTFd__CTFd-826
Can we condense the url_for calls for themes further? url_for for themes files currently doesn't know what theme is being used and so we pass it in. We should probably default it inside the view. But we would need to default the parameters to None and then set it in the function itself.
[ { "content": "from flask import Flask, current_app as app, request, session, redirect, url_for, abort, render_template\nfrom werkzeug.wsgi import DispatcherMiddleware\nfrom CTFd.models import db, Tracking\n\nfrom CTFd.utils import markdown, get_config\nfrom CTFd.utils.dates import unix_time_millis, unix_time, i...
[ { "content": "from flask import Flask, current_app as app, request, session, redirect, url_for, abort, render_template\nfrom werkzeug.wsgi import DispatcherMiddleware\nfrom CTFd.models import db, Tracking\n\nfrom CTFd.utils import markdown, get_config\nfrom CTFd.utils.dates import unix_time_millis, unix_time, i...
diff --git a/CTFd/themes/admin/templates/base.html b/CTFd/themes/admin/templates/base.html index 3c9e42117..add5bed17 100644 --- a/CTFd/themes/admin/templates/base.html +++ b/CTFd/themes/admin/templates/base.html @@ -14,6 +14,7 @@ <link rel="stylesheet" href="{{ url_for('views.themes', theme='admin', path='css/jumbot...
qutebrowser__qutebrowser-2856
AttributeError: 'NoneType' object has no attribute 'column_widths' Someone has reported this 5 times in a row, unfortunately without any contact information. I'm not sure how it happens, but it seems to be a fresh first-time start of qutebrowser, with `quickstart.html` being opened and all. ``` [...] 17:18:41 DEBU...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2017 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...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2017 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...
diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py index 65f1de76ce8..4674beb695c 100644 --- a/qutebrowser/completion/completionwidget.py +++ b/qutebrowser/completion/completionwidget.py @@ -148,6 +148,8 @@ def _on_config_changed(self, section, option): def _resi...
RedHatInsights__insights-core-3060
Uname cannot recognize the redhat_release correctly for non-x86 kernel For the kernel of non-x86 arch, there are the following kernel versions which didn't follow the RHEL [Release](https://access.redhat.com/articles/3078) - kernel-4.14.0-49.el7a.ppc64le - kernel-4.14.0-115.10.1.el7a.ppc64le Better resolve this ...
[ { "content": "\"\"\"\nUname - command ``uname -a``\n============================\n\nThe ``Uname`` class reads the output of the ``uname -a`` command and\ninterprets it. It also does a number of handy extra things, like deriving\nthe RHEL release from the kernel version.\n\nUname objects can also be compared by...
[ { "content": "\"\"\"\nUname - command ``uname -a``\n============================\n\nThe ``Uname`` class reads the output of the ``uname -a`` command and\ninterprets it. It also does a number of handy extra things, like deriving\nthe RHEL release from the kernel version.\n\nUname objects can also be compared by...
diff --git a/insights/parsers/tests/test_uname.py b/insights/parsers/tests/test_uname.py index 0dfe1903a7..4b38770e88 100644 --- a/insights/parsers/tests/test_uname.py +++ b/insights/parsers/tests/test_uname.py @@ -258,6 +258,18 @@ def test_from_release(): from_nvr = uname.Uname.from_kernel("2.6.32-358") asse...
lutris__lutris-1251
Log window: lock to the bottom gets lost Caused by https://github.com/lutris/lutris/pull/1179. From my experience, it happens when there are a lot lines outputted all at once: ![peek 2018-10-18 05-11](https://user-images.githubusercontent.com/10602045/47195406-60dbad80-d364-11e8-9871-8d580796076c.gif)
[ { "content": "from gi.repository import Gtk\nfrom lutris.gui.widgets.dialogs import Dialog\n\n\nclass LogTextView(Gtk.TextView):\n def __init__(self, buffer):\n super(LogTextView, self).__init__()\n\n self.set_buffer(buffer)\n self.set_editable(False)\n self.set_monospace(True)\n ...
[ { "content": "from gi.repository import Gtk\nfrom lutris.gui.widgets.dialogs import Dialog\n\n\nclass LogTextView(Gtk.TextView):\n def __init__(self, buffer):\n super(LogTextView, self).__init__()\n\n self.set_buffer(buffer)\n self.set_editable(False)\n self.set_monospace(True)\n ...
diff --git a/lutris/gui/logwindow.py b/lutris/gui/logwindow.py index e668d4af2f..24caae6a75 100644 --- a/lutris/gui/logwindow.py +++ b/lutris/gui/logwindow.py @@ -19,7 +19,9 @@ def autoscroll(self, *args): adj = self.get_vadjustment() if adj.get_value() == self.scroll_max or self.scroll_max == 0: ...
sunpy__sunpy-3140
1.0.0rc2: test_ts_to_array fails When testing version 1.0.0 rc2 during build time, I see the following failure on the `test_ts_to_array` test: ``` _____________________________________ test_ts_to_array ______________________________________ generic_ts = <sunpy.timeseries.timeseriesbase.GenericTimeSeries object at ...
[ { "content": "\"\"\"\nThis module provies `sunpy.timeseries.GenericTimeSeries` which all other\n`sunpy.timeseries.TimeSeries` classes inherit from.\n\"\"\"\nimport copy\nimport warnings\nfrom collections import OrderedDict\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\nimpo...
[ { "content": "\"\"\"\nThis module provies `sunpy.timeseries.GenericTimeSeries` which all other\n`sunpy.timeseries.TimeSeries` classes inherit from.\n\"\"\"\nimport copy\nimport warnings\nfrom collections import OrderedDict\n\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\nimport astropy\nimport astropy...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 663039c7a67..cb212ed4811 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -567,7 +567,10 @@ def to_array(self, **kwargs): `~numpy.ndarray` If the data is heterogene...
MongoEngine__mongoengine-1769
raise StopIteration in generators is deprecated ``` ... /Users/Vic/projects/brain2/brain/utils/user_progress.py:686: DeprecationWarning: generator 'QuerySet._iter_results' raised StopIteration for action in actions: /Users/Vic/projects/brain2/brain/utils/user_course_state.py:317: DeprecationWarning: generator 'Qu...
[ { "content": "import six\n\nfrom mongoengine.errors import OperationError\nfrom mongoengine.queryset.base import (BaseQuerySet, CASCADE, DENY, DO_NOTHING,\n NULLIFY, PULL)\n\n__all__ = ('QuerySet', 'QuerySetNoCache', 'DO_NOTHING', 'NULLIFY', 'CASCADE',\n 'DENY', '...
[ { "content": "import six\n\nfrom mongoengine.errors import OperationError\nfrom mongoengine.queryset.base import (BaseQuerySet, CASCADE, DENY, DO_NOTHING,\n NULLIFY, PULL)\n\n__all__ = ('QuerySet', 'QuerySetNoCache', 'DO_NOTHING', 'NULLIFY', 'CASCADE',\n 'DENY', '...
diff --git a/mongoengine/queryset/queryset.py b/mongoengine/queryset/queryset.py index cf913b01c..60de19a29 100644 --- a/mongoengine/queryset/queryset.py +++ b/mongoengine/queryset/queryset.py @@ -92,7 +92,7 @@ def _iter_results(self): # Raise StopIteration if we already established there were no more ...
learningequality__kolibri-2734
partially-complete transfers prevent a successful upgrade ### Observed behavior If Kolibri 0.6 is shut down while a transfer is in progress, running Kolibri 0.7 won't work ### Expected behavior Upgrades should occur smoothly. Preferably the transfer can pick up where it left off, but if it needs to be canceled...
[ { "content": "import logging as logger\nimport os\n\nfrom django.apps.registry import AppRegistryNotReady\nfrom django.conf import settings\nfrom django.core.management import CommandError, call_command\nfrom iceqube.common.classes import State\nfrom iceqube.exceptions import UserCancelledError\nfrom kolibri.co...
[ { "content": "import logging as logger\nimport os\n\nfrom django.apps.registry import AppRegistryNotReady\nfrom django.conf import settings\nfrom django.core.management import CommandError, call_command\nfrom iceqube.common.classes import State\nfrom iceqube.exceptions import UserCancelledError\nfrom kolibri.co...
diff --git a/kolibri/tasks/api.py b/kolibri/tasks/api.py index affaac1a570..e72f56a62d1 100644 --- a/kolibri/tasks/api.py +++ b/kolibri/tasks/api.py @@ -424,8 +424,8 @@ def _job_to_response(job): } else: return { - "type": job.extra_metadata.get("type"), - "started_by": job....
ivy-llc__ivy-18211
selu #14951
[ { "content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_d...
[ { "content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_d...
diff --git a/ivy/functional/frontends/mindspore/ops/function/nn_func.py b/ivy/functional/frontends/mindspore/ops/function/nn_func.py index 2ab7913abab77..cfe49a6800e93 100644 --- a/ivy/functional/frontends/mindspore/ops/function/nn_func.py +++ b/ivy/functional/frontends/mindspore/ops/function/nn_func.py @@ -7,6 +7,12 @...
numpy__numpy-11428
np.histogram erroneously emit warning when density=False As seen in https://travis-ci.org/ejeschke/ginga/jobs/395720074 . The actual code in Ginga calling histogram is: ```python # get image histogram hist, bins = numpy.histogram(some_array, hashsize, density=False) ``` Note that `normed` was not used. However, it...
[ { "content": "\"\"\"\nHistogram-related functions\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport operator\nimport warnings\n\nimport numpy as np\nfrom numpy.compat.py3k import basestring\n\n__all__ = ['histogram', 'histogramdd', 'histogram_bin_edges']\n\n# range is a keyword...
[ { "content": "\"\"\"\nHistogram-related functions\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport operator\nimport warnings\n\nimport numpy as np\nfrom numpy.compat.py3k import basestring\n\n__all__ = ['histogram', 'histogramdd', 'histogram_bin_edges']\n\n# range is a keyword...
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py index b7d9c4406709..8b5aa602a039 100644 --- a/numpy/lib/histograms.py +++ b/numpy/lib/histograms.py @@ -782,7 +782,7 @@ def histogram(a, bins=10, range=None, normed=None, weights=None, "The normed argument is ignored when density is pro...
Cloud-CV__EvalAI-1501
Use IsChallengeCreator decorator in Challenge Phase detail API Endpoint Currently, the check for if the requesting user is Creator of Challenge or not is missing from the `challenge_phase_detail` API View. We would like to add the `IsChallengeCreator` decorator (https://github.com/Cloud-CV/EvalAI/blob/master/apps/chall...
[ { "content": "import csv\nimport logging\nimport random\nimport requests\nimport shutil\nimport string\nimport tempfile\nimport yaml\nimport zipfile\n\nfrom os.path import basename, isfile, join\n\nfrom django.core.files.base import ContentFile\nfrom django.db import transaction\nfrom django.http import HttpRes...
[ { "content": "import csv\nimport logging\nimport random\nimport requests\nimport shutil\nimport string\nimport tempfile\nimport yaml\nimport zipfile\n\nfrom os.path import basename, isfile, join\n\nfrom django.core.files.base import ContentFile\nfrom django.db import transaction\nfrom django.http import HttpRes...
diff --git a/apps/challenges/views.py b/apps/challenges/views.py index 2c71f3c9dc..e179b3d2c6 100644 --- a/apps/challenges/views.py +++ b/apps/challenges/views.py @@ -331,7 +331,7 @@ def challenge_phase_list(request, challenge_pk): @throttle_classes([UserRateThrottle]) @api_view(['GET', 'PUT', 'PATCH', 'DELETE']) -...
zestedesavoir__zds-site-6374
Dans les messages privés, les votes sont anonymes ### Description du bug Dans les messages privés, les votes que l'on peut effectuer sur les messages sont anonymisés, contrairement au reste du site. De plus, ce qui est peut-être une conséquence, lors du chargement initial de la page, ils ne sont pas en couleur pl...
[ { "content": "from datetime import datetime\nfrom math import ceil\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.urls import reverse\nfrom django.db import models\n\nfrom zds.mp.managers import PrivateTopicManager, PrivatePostManager\nfrom zds.mp import signals\nf...
[ { "content": "from datetime import datetime\nfrom math import ceil\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.urls import reverse\nfrom django.db import models\n\nfrom zds.mp.managers import PrivateTopicManager, PrivatePostManager\nfrom zds.mp import signals\nf...
diff --git a/zds/mp/models.py b/zds/mp/models.py index bbfee85f87..2c2652a882 100644 --- a/zds/mp/models.py +++ b/zds/mp/models.py @@ -444,11 +444,7 @@ def set_user_vote(self, user, vote): def get_votes(self): """Get the non-anonymous votes""" if not hasattr(self, "votes"): - self.vote...
kedro-org__kedro-1642
KedroSession: getpass.getuser() call fails ## Description First of all, I want to thank you for this splendid work that is Kedro. I believe it makes our life easier and I am glad that we have adopted it at my company. This is the first time that I post an issue here, so I hope to frame this correctly! In my compan...
[ { "content": "\"\"\"This module implements Kedro session responsible for project lifecycle.\"\"\"\nimport getpass\nimport logging\nimport logging.config\nimport os\nimport subprocess\nimport traceback\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom typing import Any, Dict, Iterable, Union\n\nimport c...
[ { "content": "\"\"\"This module implements Kedro session responsible for project lifecycle.\"\"\"\nimport getpass\nimport logging\nimport logging.config\nimport os\nimport subprocess\nimport traceback\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom typing import Any, Dict, Iterable, Union\n\nimport c...
diff --git a/RELEASE.md b/RELEASE.md index 57ec4d926a..511baae0ce 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -29,6 +29,7 @@ * Bumped the upper bound for the Flake8 dependency to <5.0. * `kedro jupyter notebook/lab` no longer reuses a Jupyter kernel. * Required `cookiecutter>=2.1.1` to address a [known command injec...
meltano__meltano-6345
Airflow docs incorrect for adding files This was raised in slack https://meltano.slack.com/archives/C01TCRBBJD7/p1655231194958339 The docs say `meltano add files airflow` but now we prefix the file bundles with `files-` so it should be updated to `meltano add files files-airflow`. Its probably worth while to sear...
[ { "content": "\"\"\"Defines DBT-specific plugins.\"\"\"\nimport logging\nfrom pathlib import Path\n\nfrom meltano.core.error import PluginInstallError\nfrom meltano.core.plugin import BasePlugin, PluginType\nfrom meltano.core.plugin.error import PluginNotFoundError\nfrom meltano.core.plugin.project_plugin impor...
[ { "content": "\"\"\"Defines DBT-specific plugins.\"\"\"\nimport logging\nfrom pathlib import Path\n\nfrom meltano.core.error import PluginInstallError\nfrom meltano.core.plugin import BasePlugin, PluginType\nfrom meltano.core.plugin.error import PluginNotFoundError\nfrom meltano.core.plugin.project_plugin impor...
diff --git a/docs/src/_guide/containerization.md b/docs/src/_guide/containerization.md index fb0d618d84..13cf082b1e 100644 --- a/docs/src/_guide/containerization.md +++ b/docs/src/_guide/containerization.md @@ -87,7 +87,7 @@ you can add the appropriate `docker-compose.prod.yml` file to your project by ad docker-compos...
PennyLaneAI__pennylane-5857
Broadcast Expand Prevents Torchlayer from detecting Inputs Argument ### Expected behavior The torchlayer should be created successfully without any errors. This works fine if the broadcast expand function decorator "@qml.transforms.broadcast_expand" is commented out from the minimal code provided. ### Actual beha...
[ { "content": "# Copyright 2023 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless re...
[ { "content": "# Copyright 2023 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless re...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 11e431fa38d..19dcc314aa4 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -264,6 +264,9 @@ * `qml.qchem.molecular_dipole` function is added for calculating the dipole operator using "dhf" and "openfermion"...
dotkom__onlineweb4-1693
Filtering on attendance event on attendees admin doesn't work This is only relevant for the admin panel and not the dashboard. ``` DisallowedModelAdminLookup at /admin/events/attendee/ Filtering by event__event__title not allowed ``` Can be reproduced by simply going to `/admin/events/attendee/` and filtering by some...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.contrib import admin, messages\nfrom django.utils.translation import ugettext as _\nfrom reversion.admin import VersionAdmin\n\nfrom apps.events.models import (AttendanceEvent, Attendee, CompanyEvent, Event, Extras,\n FieldOfStu...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.contrib import admin, messages\nfrom django.utils.translation import ugettext as _\nfrom reversion.admin import VersionAdmin\n\nfrom apps.events.models import (AttendanceEvent, Attendee, CompanyEvent, Event, Extras,\n FieldOfStu...
diff --git a/apps/events/admin.py b/apps/events/admin.py index dcc578ea0..1ce38a647 100644 --- a/apps/events/admin.py +++ b/apps/events/admin.py @@ -73,7 +73,7 @@ def mark_not_attended(modeladmin, request, queryset): class AttendeeAdmin(VersionAdmin): model = Attendee list_display = ('user', 'event', 'paid',...
scrapy__scrapy-4361
[DOCS] Use HTTPS Reference: - https://httpsiseasy.com - https://letsencrypt.org
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Scrapy documentation build configuration file, created by\n# sphinx-quickstart on Mon Nov 24 12:02:52 2008.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# The contents of this file are pickled, so don't put values in the nam...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Scrapy documentation build configuration file, created by\n# sphinx-quickstart on Mon Nov 24 12:02:52 2008.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# The contents of this file are pickled, so don't put values in the nam...
diff --git a/docs/conf.py b/docs/conf.py index c3418cfb332..6e2399f6610 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -281,6 +281,7 @@ intersphinx_mapping = { 'coverage': ('https://coverage.readthedocs.io/en/stable', None), + 'cssselect': ('https://cssselect.readthedocs.io/en/latest', None), 'pytest':...
pantsbuild__pants-15404
Add `update_env` to `process_execution::local`. Replaces any `{chroot}` placeholders in the requested process env with the sandbox workdir. This reflects the behavior for interactive processes executed with the `run` goal.
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\"\"\"Goal for publishing packaged targets to any repository or registry etc.\n\nPlugins implement the publish protocol that provides this goal with the processes to...
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\"\"\"Goal for publishing packaged targets to any repository or registry etc.\n\nPlugins implement the publish protocol that provides this goal with the processes to...
diff --git a/src/python/pants/core/goals/publish.py b/src/python/pants/core/goals/publish.py index 3ee13b2dcc1..39fef2891f0 100644 --- a/src/python/pants/core/goals/publish.py +++ b/src/python/pants/core/goals/publish.py @@ -240,6 +240,7 @@ async def run_publish(console: Console, publish: PublishSubsystem) -> Publish: ...
cowrie__cowrie-993
pinging a domain crashes From within cowrie (docker current 7 Dec 2018), when the you ping a domain (not an IP) a stack trace errors shown below. Cowrie freezes., and since many bots use ping as info gathering/sandbox detection, cowry may miss everything subsequent to this command. Environment: Ubuntu 16.04 Pytho...
[ { "content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\nfrom __future__ import absolute_import, division\n\nimport getopt\nimport hashlib\nimport random\nimport re\nimport socket\n\nfrom twisted.internet import reactor\n\nfrom cowrie.shell.command i...
[ { "content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\nfrom __future__ import absolute_import, division\n\nimport getopt\nimport hashlib\nimport random\nimport re\nimport socket\n\nfrom twisted.internet import reactor\n\nfrom cowrie.shell.command i...
diff --git a/src/cowrie/commands/ping.py b/src/cowrie/commands/ping.py index a84bfc8217..9cd9cb8410 100644 --- a/src/cowrie/commands/ping.py +++ b/src/cowrie/commands/ping.py @@ -67,7 +67,7 @@ def start(self): self.write('ping: unknown host %s\n' % (self.host,)) self.exit() el...
obspy__obspy-2311
libgcf assumes 6 character stream IDs The GCF reader (libgcf.py) assumes the stream ID is 6 characters, and hard-codes access to element 4: ``` header['station'] = stid[:4] header['channel'] = (channel_prefix[:2] + stid[4]).upper() ``` The Stream ID is made up of three parts: first is up to 4 characters ...
[ { "content": "# -*- coding: utf-8 -*-\n# reads Guralp Compressed Format (GCF) Files\n# By Ran Novitsky Nof @ BSL, 2016\n# ran.nof@gmail.com\n# Based on Guralp's GCF reference (GCF-RFC-GCFR, Issue C, 2011-01-05)\n# more details available from: http://www.guralp.com/apps/ok?doc=GCF_Intro\n# last access: June, 201...
[ { "content": "# -*- coding: utf-8 -*-\n# reads Guralp Compressed Format (GCF) Files\n# By Ran Novitsky Nof @ BSL, 2016\n# ran.nof@gmail.com\n# Based on Guralp's GCF reference (GCF-RFC-GCFR, Issue C, 2011-01-05)\n# more details available from: http://www.guralp.com/apps/ok?doc=GCF_Intro\n# last access: June, 201...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b2a1e52ec9f..9cfccb29bad 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -45,6 +45,7 @@ - obspy.io.css: * Fix automatic filetype detection (see #2160 and #2162) - obspy.io.gcf: + * Fix reading stream ID for station/channel code in header (see #2289, #2311) ...
django-cms__django-filer-1423
Field verbose_name should use gettext_lazy Hi, model field verbose_names should use gettext_lazy, because it creates migrations based on user language settings. https://github.com/django-cms/django-filer/blob/master/filer/models/foldermodels.py#L9 This is migration generated after upgrade to django-filer 3.0 ...
[ { "content": "from django import forms\nfrom django.contrib.admin.utils import unquote\nfrom django.contrib.staticfiles.storage import staticfiles_storage\nfrom django.http import Http404, HttpResponse, HttpResponseRedirect\nfrom django.shortcuts import get_object_or_404\nfrom django.urls import path, reverse\n...
[ { "content": "from django import forms\nfrom django.contrib.admin.utils import unquote\nfrom django.contrib.staticfiles.storage import staticfiles_storage\nfrom django.http import Http404, HttpResponse, HttpResponseRedirect\nfrom django.shortcuts import get_object_or_404\nfrom django.urls import path, reverse\n...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9a2fc5327..3d6d268a0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,11 @@ CHANGELOG ========= +unreleased +========== + +* fix: ensure uniqueness of icon admin url names + 3.0.6 (2023-09-08) ================== diff --git a/filer/admin/fileadmin.py b/fi...
vllm-project__vllm-3578
The same model cannot be loaded by two different users As pointed out here, the way lockfiles are created prevents the second user from loading any models that a previous user has loaded at any point: https://github.com/vllm-project/vllm/issues/2179 This is still an issue with the only workaround being to force-dele...
[ { "content": "\"\"\"Utilities for downloading and initializing model weights.\"\"\"\nimport filelock\nimport glob\nimport fnmatch\nimport json\nimport os\nfrom collections import defaultdict\nfrom typing import Any, Iterator, List, Optional, Tuple\n\nfrom huggingface_hub import snapshot_download, HfFileSystem\n...
[ { "content": "\"\"\"Utilities for downloading and initializing model weights.\"\"\"\nimport filelock\nimport glob\nimport fnmatch\nimport json\nimport os\nfrom collections import defaultdict\nfrom typing import Any, Iterator, List, Optional, Tuple\n\nfrom huggingface_hub import snapshot_download, HfFileSystem\n...
diff --git a/vllm/model_executor/weight_utils.py b/vllm/model_executor/weight_utils.py index 24d78db8d26..0d7ee269922 100644 --- a/vllm/model_executor/weight_utils.py +++ b/vllm/model_executor/weight_utils.py @@ -34,7 +34,7 @@ def get_lock(model_name_or_path: str, cache_dir: Optional[str] = None): lock_dir = cache...
microsoft__Qcodes-6106
Alazar example (and driver) is broken Locating an Alazar board is broken due to an invalid identifier for a temporary instrument in `get_board_info()`. ### Steps to reproduce 1. Follow the [example notebook](https://microsoft.github.io/Qcodes/examples/driver_examples/Qcodes%20example%20with%20Alazar%20ATS9360.html)...
[ { "content": "from __future__ import annotations\n\nimport ctypes\nimport logging\nimport sys\nimport time\nimport warnings\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Any, Generic, TypeVar, Union, cast\n\nimport numpy as np\n\nfrom qcodes.instrument import Instrument\n\nfrom .ats_...
[ { "content": "from __future__ import annotations\n\nimport ctypes\nimport logging\nimport sys\nimport time\nimport warnings\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Any, Generic, TypeVar, Union, cast\n\nimport numpy as np\n\nfrom qcodes.instrument import Instrument\n\nfrom .ats_...
diff --git a/docs/changes/newsfragments/6106.improved_driver b/docs/changes/newsfragments/6106.improved_driver new file mode 100644 index 00000000000..62f2686cea8 --- /dev/null +++ b/docs/changes/newsfragments/6106.improved_driver @@ -0,0 +1 @@ +Fix AlazarTech ATS drivers trying to create an instrument with invalid ide...
ultrabug__py3status-1942
Handle return-type annotations The current version seems to be unable to deal with code that has type annotations for return values. ``` ↪ py3status --version py3status version 3.28 (python 3.8.3) on i3 ``` [This custome module](https://github.com/CryptoCopter/py3status-watson/blob/060184e6464ed90766330dc686ce...
[ { "content": "import os\nimport inspect\n\nfrom collections import OrderedDict\nfrom importlib.machinery import SourceFileLoader\nfrom time import time\nfrom random import randint\n\nfrom py3status.composite import Composite\nfrom py3status.constants import MARKUP_LANGUAGES, POSITIONS\nfrom py3status.py3 import...
[ { "content": "import os\nimport inspect\n\nfrom collections import OrderedDict\nfrom importlib.machinery import SourceFileLoader\nfrom time import time\nfrom random import randint\n\nfrom py3status.composite import Composite\nfrom py3status.constants import MARKUP_LANGUAGES, POSITIONS\nfrom py3status.py3 import...
diff --git a/py3status/module.py b/py3status/module.py index 393e7a5e5f..e79025411e 100644 --- a/py3status/module.py +++ b/py3status/module.py @@ -567,7 +567,7 @@ def update(self): # on_click method has extra events parameter if method_name == "on_click": arg_count = 2 - args, varg...
urllib3__urllib3-722
After read timeout, connection broken for a second timeout period Using urllib3 1.12 to access etcd with a HTTPConnectionPool. I do a long-poll read in a retry loop: ``` http = HTTPConnectionPool("localhost", 4001, maxsize=2) while True: try: resp = http.request("GET", "http://localhost:4001/v2/keys/calic...
[ { "content": "from contextlib import contextmanager\nimport zlib\nimport io\nfrom socket import timeout as SocketTimeout\n\nfrom ._collections import HTTPHeaderDict\nfrom .exceptions import (\n ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked\n)\nfrom .packages.six import string_types as base...
[ { "content": "from contextlib import contextmanager\nimport zlib\nimport io\nfrom socket import timeout as SocketTimeout\n\nfrom ._collections import HTTPHeaderDict\nfrom .exceptions import (\n ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked\n)\nfrom .packages.six import string_types as base...
diff --git a/urllib3/response.py b/urllib3/response.py index 788eb6cacd..f248a8ff70 100644 --- a/urllib3/response.py +++ b/urllib3/response.py @@ -130,8 +130,8 @@ def __init__(self, body='', headers=None, status=0, version=0, reason=None, if "chunked" in encodings: self.chunked = True - #...
goauthentik__authentik-5183
Inactive user can't pass identification stage **Describe the bug** I hope I'm not completely wrong, but inactive users should also be able to pass an identification stage. In my case it should be possible to request a password reset even with an inactive user account. Like in the default-recovery-flow which is de...
[ { "content": "\"\"\"Identification stage logic\"\"\"\nfrom dataclasses import asdict\nfrom random import SystemRandom\nfrom time import sleep\nfrom typing import Any, Optional\n\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom djang...
[ { "content": "\"\"\"Identification stage logic\"\"\"\nfrom dataclasses import asdict\nfrom random import SystemRandom\nfrom time import sleep\nfrom typing import Any, Optional\n\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom djang...
diff --git a/authentik/stages/identification/stage.py b/authentik/stages/identification/stage.py index f70226b4b7b1..a54de07d99e2 100644 --- a/authentik/stages/identification/stage.py +++ b/authentik/stages/identification/stage.py @@ -172,7 +172,7 @@ def get_user(self, uid_value: str) -> Optional[User]: if not...
huggingface__huggingface_hub-757
chore: Updated the pillow version specifier Hello there :wave: Following up on #755, I believe the core build requirements were meant to be updated as well. This aligns the version specifier of Pillow between the core build and the "tests" extra build! Any feedback is welcome! cc @osanseviero @Narsil
[ { "content": "from setuptools import setup\n\n\nsetup(\n name=\"api_inference_community\",\n version=\"0.0.21\",\n description=\"A package with helper tools to build an API Inference docker app for Hugging Face API inference using huggingface_hub\",\n url=\"http://github.com/huggingface/api-inferenc...
[ { "content": "from setuptools import setup\n\n\nsetup(\n name=\"api_inference_community\",\n version=\"0.0.23\",\n description=\"A package with helper tools to build an API Inference docker app for Hugging Face API inference using huggingface_hub\",\n url=\"http://github.com/huggingface/api-inferenc...
diff --git a/api-inference-community/requirements.txt b/api-inference-community/requirements.txt index e7194fc62c..119957ccab 100644 --- a/api-inference-community/requirements.txt +++ b/api-inference-community/requirements.txt @@ -1,7 +1,7 @@ -starlette==0.14.2 +starlette>=0.14.2 numpy>=1.18.0 -pydantic==1.8.1 -parame...
vllm-project__vllm-3037
vLLM running on a Ray Cluster Hanging on Initializing It isn't clear what is at fault here. Whether it be vLLM or Ray. There is a thread here on the ray forums that outlines the issue, it is 16 days old, there is no reply to it. https://discuss.ray.io/t/running-vllm-script-on-multi-node-cluster/13533 Taking f...
[ { "content": "import copy\nfrom collections import defaultdict\nimport os\nimport time\nimport pickle\nfrom typing import (TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple,\n Union)\n\nfrom vllm.lora.request import LoRARequest\nfrom vllm.config import (CacheConfig, DeviceConfig, Mode...
[ { "content": "import copy\nfrom collections import defaultdict\nimport os\nimport time\nimport pickle\nfrom typing import (TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple,\n Union)\n\nfrom vllm.lora.request import LoRARequest\nfrom vllm.config import (CacheConfig, DeviceConfig, Mode...
diff --git a/vllm/engine/llm_engine.py b/vllm/engine/llm_engine.py index c1a75924c6d..f5b2145c22d 100644 --- a/vllm/engine/llm_engine.py +++ b/vllm/engine/llm_engine.py @@ -284,7 +284,10 @@ def _init_workers_ray(self, placement_group: "PlacementGroup", is_driver_worker=True, ) - self._run...
ephios-dev__ephios-259
Translations for v0.2.0
[ { "content": "import functools\nimport operator\nfrom datetime import datetime\n\nimport django.dispatch\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom django.db.models import OuterRef, Q, Subquery\nfrom django.db.models.fields.json import KeyTransform\nfrom ...
[ { "content": "import functools\nimport operator\nfrom datetime import datetime\n\nimport django.dispatch\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom django.db.models import OuterRef, Q, Subquery\nfrom django.db.models.fields.json import KeyTransform\nfrom ...
diff --git a/ephios/event_management/templates/event_management/event_copy.html b/ephios/event_management/templates/event_management/event_copy.html index 5246e6aa4..fc24890e2 100644 --- a/ephios/event_management/templates/event_management/event_copy.html +++ b/ephios/event_management/templates/event_management/event_c...
Parsl__parsl-766
Two attributes never used in parsl/executors/high_throughput/interchange.py Seems the two attributes below are not used anywhere. https://github.com/Parsl/parsl/blob/6701688f6d9bfe8e5a4d1ef9183f8fec930db5de/parsl/executors/high_throughput/interchange.py#L171 and https://github.com/Parsl/parsl/blob/6701688f6d9bfe8e5a4d1...
[ { "content": "#!/usr/bin/env python\nimport argparse\nimport zmq\n# import uuid\nimport os\nimport sys\nimport platform\nimport random\nimport time\nimport pickle\nimport logging\nimport queue\nimport threading\nimport json\n\nfrom parsl.version import VERSION as PARSL_VERSION\nfrom ipyparallel.serialize import...
[ { "content": "#!/usr/bin/env python\nimport argparse\nimport zmq\n# import uuid\nimport os\nimport sys\nimport platform\nimport random\nimport time\nimport pickle\nimport logging\nimport queue\nimport threading\nimport json\n\nfrom parsl.version import VERSION as PARSL_VERSION\nfrom ipyparallel.serialize import...
diff --git a/parsl/executors/high_throughput/interchange.py b/parsl/executors/high_throughput/interchange.py index 66995f8944..012a33684b 100644 --- a/parsl/executors/high_throughput/interchange.py +++ b/parsl/executors/high_throughput/interchange.py @@ -168,9 +168,7 @@ def __init__(self, logger.info("Bound to...
ansible__ansible-modules-core-5155
iosxr_config: No message/protection against overly long commit messages ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME iosxr_config ##### ANSIBLE VERSION ``` ansible 2.3.0 (devel d09f57fb3a) last updated 2016/10/04 09:47:32 (GMT +100) lib/ansible/modules/core: (devel 0ee774ff15) last updated 2016/10/04 09:47:37...
[ { "content": "#!/usr/bin/python\n#\n# This file is part of Ansible\n#\n# Ansible 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 3 of the License, or\n# (at your option) any later vers...
[ { "content": "#!/usr/bin/python\n#\n# This file is part of Ansible\n#\n# Ansible 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 3 of the License, or\n# (at your option) any later vers...
diff --git a/network/iosxr/iosxr_config.py b/network/iosxr/iosxr_config.py index 0dc6984fc48..15978ff108b 100644 --- a/network/iosxr/iosxr_config.py +++ b/network/iosxr/iosxr_config.py @@ -194,6 +194,9 @@ def check_args(module, warnings): + if module.params['comment']: + if len(module.params['comment']) ...
avocado-framework__avocado-4801
Excessive output at the LOG_UI Hi all, I am not sure what changed while I was away but our custom CI with the most current (master branch) Avocado backend now prints excessive output like so: ``` [root@c60]# avocado run /bin/true JOB ID : 67f7de083bf3cbeed3df313d2da7f484c8c5da6a JOB LOG : /mnt/local/resul...
[ { "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/core/output.py b/avocado/core/output.py index 59280cded9..8e121b85ee 100644 --- a/avocado/core/output.py +++ b/avocado/core/output.py @@ -477,7 +477,7 @@ def save_handler(logger_name, handler, configuration): STD_OUTPUT.stdout, logging.DEBUG) save...
bokeh__bokeh-6488
bokeh.util.serialization.py convert_datetime_type breaks when passed timezone aware datetime After updating to bokeh 0.12.6 the convert_datetime_type became unable to handle datetime objecs that are timezone aware. The subtraction of DT_EPOCH which is a naive datetime from a obj which might be aware or naive fails wh...
[ { "content": "'''\nFunctions for helping with serialization and deserialization of\nBokeh objects.\n\nCertain NunPy array dtypes can be serialized to a binary format for\nperformance and efficiency. The list of supported dtypes is:\n\n{binary_array_types}\n\n'''\nfrom __future__ import absolute_import\n\nimport...
[ { "content": "'''\nFunctions for helping with serialization and deserialization of\nBokeh objects.\n\nCertain NunPy array dtypes can be serialized to a binary format for\nperformance and efficiency. The list of supported dtypes is:\n\n{binary_array_types}\n\n'''\nfrom __future__ import absolute_import\n\nimport...
diff --git a/bokeh/util/serialization.py b/bokeh/util/serialization.py index 96c406a88e0..dd6d27e78ce 100644 --- a/bokeh/util/serialization.py +++ b/bokeh/util/serialization.py @@ -101,7 +101,8 @@ def convert_datetime_type(obj): # Datetime (datetime is a subclass of date) elif isinstance(obj, dt.datetime): ...
freqtrade__freqtrade-1397
DB Migration failing ## Describe your environment * Python Version: 3.7.0 * Branch: Develop * Last Commit ID: _____ (`git log --format="%H" -n 1`) ## Step 3: Describe the problem: Running the bot with an old database (causing a migration) has the migration fail with an index exception. ``` 018-1...
[ { "content": "\"\"\"\nThis module contains the class to persist trades into SQLite\n\"\"\"\n\nimport logging\nfrom datetime import datetime\nfrom decimal import Decimal\nfrom typing import Any, Dict, Optional\n\nimport arrow\nfrom sqlalchemy import (Boolean, Column, DateTime, Float, Integer, String,\n ...
[ { "content": "\"\"\"\nThis module contains the class to persist trades into SQLite\n\"\"\"\n\nimport logging\nfrom datetime import datetime\nfrom decimal import Decimal\nfrom typing import Any, Dict, Optional\n\nimport arrow\nfrom sqlalchemy import (Boolean, Column, DateTime, Float, Integer, String,\n ...
diff --git a/freqtrade/persistence.py b/freqtrade/persistence.py index 71752d58e04..a393eb318d1 100644 --- a/freqtrade/persistence.py +++ b/freqtrade/persistence.py @@ -100,6 +100,9 @@ def check_migrate(engine) -> None: # Schema migration necessary engine.execute(f"alter table trades rename to {tabl...
pantsbuild__pants-20657
Docker: base image build arg detection does not support parametrized targets **Describe the bug** If the base image is parametrized, the dependency inference does not pick it up. **Pants version** `2.19.0` **OS** Any. **Additional info** [Reported](https://chat.pantsbuild.org/t/16633559/i-have-a-structure-...
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport json\nimport re\nimport sys\nfrom dataclasses import asdict, dataclass\nfrom itertools import chain\nfrom typing impor...
[ { "content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport json\nimport re\nimport sys\nfrom dataclasses import asdict, dataclass\nfrom itertools import chain\nfrom typing impor...
diff --git a/src/python/pants/backend/docker/subsystems/dockerfile_parser_test.py b/src/python/pants/backend/docker/subsystems/dockerfile_parser_test.py index 252da437027..bc91c463952 100644 --- a/src/python/pants/backend/docker/subsystems/dockerfile_parser_test.py +++ b/src/python/pants/backend/docker/subsystems/docke...
litestar-org__litestar-1883
StaticFilesConfig and virtual directories I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/using.html#). But because ``directories`` is defined as ``DirectoryPath``, pydantic checks if the given directories ...
[ { "content": "from __future__ import annotations\n\nfrom functools import singledispatchmethod\nfrom typing import TYPE_CHECKING, Generic, Optional, TypeVar\n\nfrom sqlalchemy import Column, inspect, orm, sql\nfrom sqlalchemy.ext.associationproxy import AssociationProxy, AssociationProxyExtensionType\nfrom sqla...
[ { "content": "from __future__ import annotations\n\nfrom functools import singledispatchmethod\nfrom typing import TYPE_CHECKING, Generic, Optional, TypeVar\n\nfrom sqlalchemy import Column, inspect, orm, sql\nfrom sqlalchemy.ext.associationproxy import AssociationProxy, AssociationProxyExtensionType\nfrom sqla...
diff --git a/litestar/contrib/sqlalchemy/dto.py b/litestar/contrib/sqlalchemy/dto.py index 0a821c5682..e864054e86 100644 --- a/litestar/contrib/sqlalchemy/dto.py +++ b/litestar/contrib/sqlalchemy/dto.py @@ -216,6 +216,11 @@ def _detect_defaults(elem: ElementType) -> tuple[Any, Any]: def default_factory(d: ...
python-pillow__Pillow-6269
[JPEG 2000] OverflowError is raised when the size is too large Hi, I am recently fuzzing this library and found the test case which raises OverflowError. ### What did you do? ```python from PIL import Image import io # assumes the current directory is the root of this repository. with open('Tests/images/1...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# base class for image file handlers\n#\n# history:\n# 1995-09-09 fl Created\n# 1996-03-11 fl Fixed load mechanism.\n# 1996-04-15 fl Added pcx/xbm decoders.\n# 1996-04-30 fl Added encoders.\n# 1996-12-14 fl Added load helpers\n# 1997-01-11 fl ...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# base class for image file handlers\n#\n# history:\n# 1995-09-09 fl Created\n# 1996-03-11 fl Fixed load mechanism.\n# 1996-04-15 fl Added pcx/xbm decoders.\n# 1996-04-30 fl Added encoders.\n# 1996-12-14 fl Added load helpers\n# 1997-01-11 fl ...
diff --git a/Tests/images/zero_height.j2k b/Tests/images/zero_height.j2k new file mode 100644 index 00000000000..21bdd8f7667 Binary files /dev/null and b/Tests/images/zero_height.j2k differ diff --git a/Tests/test_imagefile.py b/Tests/test_imagefile.py index 0b3aecd0849..fc0fbfb9bbc 100644 --- a/Tests/test_imagefile.py...
opsdroid__opsdroid-589
Potential vulnerability with yaml.loader # Description I was listening to Talk Python to Me podcast - the one where they talk about Python vulnerabilities and things that we shouldn't be doing in Python. One of the things that they mention was using `yaml.load` instead of `yaml.safe_load`. I know that when I wrot...
[ { "content": "\"\"\"Class for loading in modules to OpsDroid.\"\"\"\n\nimport importlib\nimport importlib.util\nimport json\nimport logging\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nimport urllib.request\nfrom collections import Mapping\n\nimport yaml\n\nfrom opsdroid...
[ { "content": "\"\"\"Class for loading in modules to OpsDroid.\"\"\"\n\nimport importlib\nimport importlib.util\nimport json\nimport logging\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nimport urllib.request\nfrom collections import Mapping\n\nimport yaml\n\nfrom opsdroid...
diff --git a/opsdroid/loader.py b/opsdroid/loader.py index bbd13b513..f269114b7 100644 --- a/opsdroid/loader.py +++ b/opsdroid/loader.py @@ -226,7 +226,7 @@ def include_constructor(loader, node): loader.construct_scalar(node)) with open(included_yaml, 'r') as inc...
yt-dlp__yt-dlp-1858
Jamando: 'JamendoIE' object has no attribute '_VALID_URL_RE' ### Checklist - [X] I'm reporting a broken site - [X] I've verified that I'm running yt-dlp version **2021.12.01**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) - [X] I've checked that all provided URLs are alive and playable in a browser...
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport hashlib\nimport random\n\nfrom ..compat import compat_str\nfrom .common import InfoExtractor\nfrom ..utils import (\n clean_html,\n int_or_none,\n try_get,\n)\n\n\nclass JamendoIE(InfoExtractor):\n _VALID_URL = r'''(?x)...
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport hashlib\nimport random\n\nfrom ..compat import compat_str\nfrom .common import InfoExtractor\nfrom ..utils import (\n clean_html,\n int_or_none,\n try_get,\n)\n\n\nclass JamendoIE(InfoExtractor):\n _VALID_URL = r'''(?x)...
diff --git a/yt_dlp/extractor/jamendo.py b/yt_dlp/extractor/jamendo.py index 1db7c64afa82..755d9703bdac 100644 --- a/yt_dlp/extractor/jamendo.py +++ b/yt_dlp/extractor/jamendo.py @@ -59,7 +59,7 @@ def _call_api(self, resource, resource_id): })[0] def _real_extract(self, url): - track_id, disp...
facebookresearch__hydra-277
Clean up --cfg It will be cleaner for --cfg to always take one of job|hydra|all, and not have it default to job. this will eliminate the problem that occures when --cfg is not the last flag in the command line and some override is associated with --cfg.
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport inspect\nimport os\nimport sys\nfrom .hydra import Hydra\nimport argparse\n\n\ndef run_hydra(args_parser, task_function, config_path, strict):\n stack = inspect.stack()\n frame = stack[2]\n\n calling_file = Non...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport inspect\nimport os\nimport sys\nfrom .hydra import Hydra\nimport argparse\n\n\ndef run_hydra(args_parser, task_function, config_path, strict):\n stack = inspect.stack()\n frame = stack[2]\n\n calling_file = Non...
diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py index e3bba4d6d22..65b2a411c54 100644 --- a/hydra/_internal/utils.py +++ b/hydra/_internal/utils.py @@ -92,10 +92,8 @@ def get_args_parser(): parser.add_argument( "--cfg", "-c", - const="job", - nargs="?", cho...
yt-project__yt-4547
BUG: min_level and max_level are not reliably set Some of the handlers are not correctly setting `max_level`, which then propagates to things like `ds.r[:]`. For instance: ```python import yt import numpy as np oct_mask = np.zeros(33) oct_mask[[0, 5, 7, 16]] = 8 octree_mask = np.array(oct_mask, dtype=np.uint...
[ { "content": "import os\nimport time\nimport uuid\nimport weakref\nfrom collections import UserDict\nfrom functools import cached_property\nfrom itertools import chain, product, repeat\nfrom numbers import Number as numeric_type\nfrom typing import Optional, Tuple, Type\n\nimport numpy as np\nfrom more_itertool...
[ { "content": "import os\nimport time\nimport uuid\nimport weakref\nfrom collections import UserDict\nfrom functools import cached_property\nfrom itertools import chain, product, repeat\nfrom numbers import Number as numeric_type\nfrom typing import Optional, Tuple, Type\n\nimport numpy as np\nfrom more_itertool...
diff --git a/yt/frontends/stream/data_structures.py b/yt/frontends/stream/data_structures.py index 61585d17b1a..dfc6110cf4f 100644 --- a/yt/frontends/stream/data_structures.py +++ b/yt/frontends/stream/data_structures.py @@ -866,6 +866,8 @@ def _initialize_oct_handler(self): "partial_coverage": self.ds.par...
getpelican__pelican-1718
-D (debug mode) doesn't show any trackbacks on internal exceptions Also, exceptions are rendered using `str` instead of `repr`, making this worse than it already is.
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport os\nimport re\nimport sys\nimport time\nimport logging\nimport argparse\nimport locale\nimport collections\n\n# pelican.log has to be the first pelican module to be loaded\n# because logging.setL...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport os\nimport re\nimport sys\nimport time\nimport logging\nimport argparse\nimport locale\nimport collections\n\n# pelican.log has to be the first pelican module to be loaded\n# because logging.setL...
diff --git a/pelican/__init__.py b/pelican/__init__.py index 056c45ef0..12da111af 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -444,7 +444,7 @@ def _ignore_cache(pelican_obj): except Exception as e: if (args.verbosity == logging.DEBUG): - l...
engnadeau__pybotics-425
Strip links/badges/images from README for PyPi - While the new PyPi Warehouse supports markdown, images/badges/links are slow to load and will not work if they use relative paths (e.g., https://test.pypi.org/project/pybotics/201803222157/#description) - These elements should be stripped from the README prior to upload...
[ { "content": "\"\"\"Setup module.\"\"\"\nimport logging\nfrom pathlib import Path\n\nfrom setuptools import find_packages, setup # type: ignore\n\n\ndef main() -> None:\n \"\"\"Run setup.\"\"\"\n # run setup\n setup(name='pybotics',\n packages=find_packages(include=['pybotics']),\n u...
[ { "content": "\"\"\"Setup module.\"\"\"\nimport logging\nfrom pathlib import Path\n\nfrom setuptools import find_packages, setup # type: ignore\n\n\ndef main() -> None:\n \"\"\"Run setup.\"\"\"\n # run setup\n setup(name='pybotics',\n packages=find_packages(include=['pybotics']),\n u...
diff --git a/.travis.yml b/.travis.yml index 33d14c87..4b0d3bdf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,6 +69,7 @@ after_success: deploy: - provider: pypi + distributions: sdist bdist_wheel skip_cleanup: true user: nnadeau password: @@ -76,10 +77,10 @@ deploy: server: https://test.pypi.org/le...
OpenNMT__OpenNMT-py-1679
Fix overflow error on translation perplexity Now calculate `ppl` with `numpy` instead of `math` which converts overflow to `inf` and prints a warning (which make sense imo). Fix #1655
[ { "content": "#!/usr/bin/env python\n\"\"\" Translator Class and builder \"\"\"\nfrom __future__ import print_function\nimport codecs\nimport os\nimport time\nimport numpy as np\nfrom itertools import count, zip_longest\n\nimport torch\n\nimport onmt.model_builder\nimport onmt.inputters as inputters\nimport onm...
[ { "content": "#!/usr/bin/env python\n\"\"\" Translator Class and builder \"\"\"\nfrom __future__ import print_function\nimport codecs\nimport os\nimport time\nimport numpy as np\nfrom itertools import count, zip_longest\n\nimport torch\n\nimport onmt.model_builder\nimport onmt.inputters as inputters\nimport onm...
diff --git a/onmt/translate/translator.py b/onmt/translate/translator.py index 4b373db35b..7fe4c5c09b 100644 --- a/onmt/translate/translator.py +++ b/onmt/translate/translator.py @@ -731,7 +731,7 @@ def _report_score(self, name, score_total, words_total): msg = "%s No words predicted" % (name,) el...
pypa__pip-1432
pip 1.5 "Accept: */*" header breaks devpi server pip 1.5 now sends an "Accept: _/_" header where previously it would send one containing "application/json", "text/html" or nothing at all (I'm not sure which). This means devpi is unable to determine its correct response to the query (should it send back HTML or JSON?) I...
[ { "content": "\"\"\"Routines related to PyPI, indexes\"\"\"\n\nimport sys\nimport os\nimport re\nimport mimetypes\nimport posixpath\nimport pkg_resources\n\nfrom pip.log import logger\nfrom pip.util import Inf, normalize_name, splitext, is_prerelease\nfrom pip.exceptions import (DistributionNotFound, BestVersio...
[ { "content": "\"\"\"Routines related to PyPI, indexes\"\"\"\n\nimport sys\nimport os\nimport re\nimport mimetypes\nimport posixpath\nimport pkg_resources\n\nfrom pip.log import logger\nfrom pip.util import Inf, normalize_name, splitext, is_prerelease\nfrom pip.exceptions import (DistributionNotFound, BestVersio...
diff --git a/pip/index.py b/pip/index.py index 45d4707590c..a9418b6587c 100644 --- a/pip/index.py +++ b/pip/index.py @@ -675,7 +675,7 @@ def get_page(cls, link, req, cache=None, skip_archives=True, session=None): url = urlparse.urljoin(url, 'index.html') logger.debug(' file: URL is dir...
getnikola__nikola-1467
Broken headlines using typogrify (caused by insertion of `&nbsp;`) Maybe we should prevent typogrify on running on h-elements because otherwise you headings won't wrap like you expect on mobile displays. I have created an [issue](https://github.com/mintchaos/typogrify/issues/40) with a more detailed description in the ...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2014 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2014 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
diff --git a/nikola/filters.py b/nikola/filters.py index c2f3a48dfb..8d06880042 100644 --- a/nikola/filters.py +++ b/nikola/filters.py @@ -160,7 +160,8 @@ def typogrify(data): req_missing(['typogrify'], 'use the typogrify filter') data = typo.amp(data) - data = typo.widont(data) + # disabled becau...
dynaconf__dynaconf-290
[bug] RuntimeError: dictionary changed size during iteration when using @del within dynaconf_merge logic **Describe the bug** The following [line](https://github.com/rochacbruno/dynaconf/blob/25fed5dc27d1dd78c368d7464f7d160b46aa1d24/dynaconf/utils/__init__.py#L49 ) is bugged, changing dict size during iteration, via ...
[ { "content": "import functools\nimport os\nimport warnings\n\n\nBANNER = \"\"\"\n██████╗ ██╗ ██╗███╗ ██╗ █████╗ ██████╗ ██████╗ ███╗ ██╗███████╗\n██╔══██╗╚██╗ ██╔╝████╗ ██║██╔══██╗██╔════╝██╔═══██╗████╗ ██║██╔════╝\n██║ ██║ ╚████╔╝ ██╔██╗ ██║███████║██║ ██║ ██║██╔██╗ ██║█████╗\n██║ ██║ ╚██╔╝ ...
[ { "content": "import functools\nimport os\nimport warnings\n\n\nBANNER = \"\"\"\n██████╗ ██╗ ██╗███╗ ██╗ █████╗ ██████╗ ██████╗ ███╗ ██╗███████╗\n██╔══██╗╚██╗ ██╔╝████╗ ██║██╔══██╗██╔════╝██╔═══██╗████╗ ██║██╔════╝\n██║ ██║ ╚████╔╝ ██╔██╗ ██║███████║██║ ██║ ██║██╔██╗ ██║█████╗\n██║ ██║ ╚██╔╝ ...
diff --git a/dynaconf/utils/__init__.py b/dynaconf/utils/__init__.py index b53c55d53..03fd0617a 100644 --- a/dynaconf/utils/__init__.py +++ b/dynaconf/utils/__init__.py @@ -40,7 +40,7 @@ def object_merge(old, new, unique=False): object_merge(value, new[key]) # Cleanup of MetaValues on New di...
pytorch__text-149
Multi30k Test Set URL Changed Looks like the organizers moved the test set to : http://www.quest.dcs.shef.ac.uk/wmt17_files_mmt/mmt_task1_test2016.tar.gz
[ { "content": "import os\nimport xml.etree.ElementTree as ET\nimport glob\nimport io\n\nfrom .. import data\n\n\nclass TranslationDataset(data.Dataset):\n \"\"\"Defines a dataset for machine translation.\"\"\"\n\n @staticmethod\n def sort_key(ex):\n return data.interleave_keys(len(ex.src), len(ex...
[ { "content": "import os\nimport xml.etree.ElementTree as ET\nimport glob\nimport io\n\nfrom .. import data\n\n\nclass TranslationDataset(data.Dataset):\n \"\"\"Defines a dataset for machine translation.\"\"\"\n\n @staticmethod\n def sort_key(ex):\n return data.interleave_keys(len(ex.src), len(ex...
diff --git a/torchtext/datasets/translation.py b/torchtext/datasets/translation.py index c7a75afd1c..f69994a30c 100644 --- a/torchtext/datasets/translation.py +++ b/torchtext/datasets/translation.py @@ -73,7 +73,8 @@ class Multi30k(TranslationDataset): urls = ['http://www.quest.dcs.shef.ac.uk/wmt16_files_mmt/tra...
hpcaitech__ColossalAI-5228
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\n\"\"\"\nInitialize new tokenizer for continual pre-training\n\"\"\"\n\nimport argparse\nimport os\nimport json\nfrom typing import List, Union\n\nfrom transformers.models.llama.tokenization_llama import LlamaTokenizer\nfrom sentencepiece import s...
[ { "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\n\"\"\"\nInitialize new tokenizer for continual pre-training\n\"\"\"\n\nimport argparse\nimport json\nimport os\nfrom typing import List, Union\n\nfrom sentencepiece import sentencepiece_model_pb2 as sp_pb2_model\nfrom transformers.models.llama.to...
diff --git a/applications/Colossal-LLaMA-2/colossal_llama2/tokenizer/init_tokenizer.py b/applications/Colossal-LLaMA-2/colossal_llama2/tokenizer/init_tokenizer.py index 43297633db1a..439135503002 100644 --- a/applications/Colossal-LLaMA-2/colossal_llama2/tokenizer/init_tokenizer.py +++ b/applications/Colossal-LLaMA-2/c...
sanic-org__sanic-2728
Static routes containing ".." don't work ### Is there an existing issue for this? - [X] I have searched the existing issues ### Describe the bug Sanic does serve static files if the server file path contains "..", instead it returns file not found errors. ### Code snippet The following doesn't work: ``` from san...
[ { "content": "from email.utils import formatdate\nfrom functools import partial, wraps\nfrom mimetypes import guess_type\nfrom os import PathLike, path\nfrom pathlib import Path, PurePath\nfrom typing import Optional, Sequence, Set, Union\nfrom urllib.parse import unquote\n\nfrom sanic_routing.route import Rout...
[ { "content": "from email.utils import formatdate\nfrom functools import partial, wraps\nfrom mimetypes import guess_type\nfrom os import PathLike, path\nfrom pathlib import Path, PurePath\nfrom typing import Optional, Sequence, Set, Union\nfrom urllib.parse import unquote\n\nfrom sanic_routing.route import Rout...
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1113fa80f9..f270d1dd97 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,10 +4,12 @@ on: push: branches: - main + - current-release - "*LTS" p...
biolab__orange3-text-464
Word Cloud: annoying white line at the top Word Cloud plot has two bugs. 1.) The visualization is not always immediately plotted and one needs to press 'Regenerate word cloud' for anything to be displayed. 2.) The annoying small line of mirrored text when the visualization is resized.
[ { "content": "# coding: utf-8\nfrom collections import Counter\nfrom math import pi as PI\n\nimport numpy as np\nfrom AnyQt.QtCore import Qt, QItemSelection, QItemSelectionModel, pyqtSlot, \\\n QObject, QSortFilterProxyModel\nfrom AnyQt.QtWidgets import QApplication\n\nfrom Orange.data import StringVariable,...
[ { "content": "# coding: utf-8\nfrom collections import Counter\nfrom math import pi as PI\n\nimport numpy as np\nfrom AnyQt.QtCore import Qt, QItemSelection, QItemSelectionModel, pyqtSlot, \\\n QObject, QSortFilterProxyModel\nfrom AnyQt.QtWidgets import QApplication\n\nfrom Orange.data import StringVariable,...
diff --git a/orangecontrib/text/widgets/owwordcloud.py b/orangecontrib/text/widgets/owwordcloud.py index 9bac74224..cbdbb33ad 100644 --- a/orangecontrib/text/widgets/owwordcloud.py +++ b/orangecontrib/text/widgets/owwordcloud.py @@ -88,7 +88,6 @@ def update_selection(self, words): self.mainArea.layout().addWid...