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
python-gitlab__python-gitlab-2361
Expose call to change the default MR target project on the CLI ## Description of the problem, including code/CLI snippet Since [GitLab 13.11](https://gitlab.com/gitlab-org/gitlab/-/blob/v13.11.0-ee/doc/user/project/merge_requests/creating_merge_requests.md#new-merge-request-from-a-fork) it is possible to change the ...
[ { "content": "\"\"\"\nGitLab API:\nhttps://docs.gitlab.com/ee/api/projects.html\n\"\"\"\nfrom typing import (\n Any,\n Callable,\n cast,\n Dict,\n Iterator,\n List,\n Optional,\n TYPE_CHECKING,\n Union,\n)\n\nimport requests\n\nfrom gitlab import cli, client\nfrom gitlab import except...
[ { "content": "\"\"\"\nGitLab API:\nhttps://docs.gitlab.com/ee/api/projects.html\n\"\"\"\nfrom typing import (\n Any,\n Callable,\n cast,\n Dict,\n Iterator,\n List,\n Optional,\n TYPE_CHECKING,\n Union,\n)\n\nimport requests\n\nfrom gitlab import cli, client\nfrom gitlab import except...
diff --git a/gitlab/v4/objects/projects.py b/gitlab/v4/objects/projects.py index 65be58174..5bbebe9ae 100644 --- a/gitlab/v4/objects/projects.py +++ b/gitlab/v4/objects/projects.py @@ -740,6 +740,7 @@ class ProjectManager(CRUDMixin, RESTManager): "mirror_trigger_builds", "mirror_user_id", ...
secdev__scapy-3007
sendp can enter a busy loop #### Brief description Recent version of scapy (>= 2.4.3rc2) can enter a busy loop in `scapy.arch.linux._flush_fd`. I can repro on scapy 2.4.4 but not 2.4.0. I have had this script running fine for ages on 2.4.0. With no This reproduces on hosts having a lot of traffic. I have this is...
[ { "content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\n\n\nimport arr...
[ { "content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\n\n\nimport arr...
diff --git a/scapy/arch/linux.py b/scapy/arch/linux.py index ef1e018b5c9..af78f7e0a9a 100644 --- a/scapy/arch/linux.py +++ b/scapy/arch/linux.py @@ -445,6 +445,7 @@ def __init__(self, iface=None, type=ETH_P_ALL, promisc=None, filter=None, ) self.ins = socket.socket( socket.AF_PACKET, ...
nltk__nltk-2896
Hack to keep NLTK's "tokenize" module fails in decorators.py file line 24: `sys.path = [p for p in sys.path if "nltk" not in p]` causes an error while importing nltk when there are other objects than strings in the path variable(such as pathlib.Posixpath) this issue can be solved simply just by replacing the above...
[ { "content": "\"\"\"\nDecorator module by Michele Simionato <michelesimionato@libero.it>\nCopyright Michele Simionato, distributed under the terms of the BSD License (see below).\nhttp://www.phyast.pitt.edu/~micheles/python/documentation.html\n\nIncluded in NLTK for its support of a nice memoization decorator.\...
[ { "content": "\"\"\"\nDecorator module by Michele Simionato <michelesimionato@libero.it>\nCopyright Michele Simionato, distributed under the terms of the BSD License (see below).\nhttp://www.phyast.pitt.edu/~micheles/python/documentation.html\n\nIncluded in NLTK for its support of a nice memoization decorator.\...
diff --git a/nltk/decorators.py b/nltk/decorators.py index 7687224a23..d64fe0e1ec 100644 --- a/nltk/decorators.py +++ b/nltk/decorators.py @@ -20,7 +20,7 @@ # Hack to keep NLTK's "tokenize" module from colliding with the "tokenize" in # the Python standard library. OLD_SYS_PATH = sys.path[:] -sys.path = [p for p in ...
iterative__dvc-6074
stage add: quotes are missing in dvc.yaml # Bug Report ## Description Quotes in `dvc stage add` aren't added to dvc.yaml as expected. The following `dvc repro` fails as python script expects to have an empty string provided. ### Reproduce 1. mkdir dvc-bug-empty-string-arg 2. cd dvc-bug-empty-string-arg 3....
[ { "content": "import argparse\nimport logging\nfrom itertools import chain, filterfalse\nfrom typing import TYPE_CHECKING, Dict, Iterable, List\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link, fix_subparsers\nfrom dvc.utils.cli_parse import parse_params\nfrom dvc.uti...
[ { "content": "import argparse\nimport logging\nfrom itertools import chain, filterfalse\nfrom typing import TYPE_CHECKING, Dict, Iterable, List\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link, fix_subparsers\nfrom dvc.utils.cli_parse import parse_params\nfrom dvc.uti...
diff --git a/dvc/command/stage.py b/dvc/command/stage.py index 06cc03bbbd..b9491b2d67 100644 --- a/dvc/command/stage.py +++ b/dvc/command/stage.py @@ -113,8 +113,11 @@ def parse_cmd(commands: List[str]) -> str: """ def quote_argument(arg: str): - should_quote = " " in arg and '"' not in arg - ...
sunpy__sunpy-1346
database complains of EIT non-existent wavelengths units Without any reason I've been able to find, `database.fetch` fails with some EIT files... not always the same, with the following error message: ``` WaveunitNotFoundError: the wavelength unit cannot be found in ~/sunpy/data/efz20000912.203610 ``` That was from t...
[ { "content": "# Author: Simon Liedtke <liedtke.simon@googlemail.com>\n#\n# This module was developed with funding provided by\n# the Google Summer of Code (2013).\n\nfrom __future__ import absolute_import\n\nfrom time import strptime, mktime\nfrom datetime import datetime\nimport fnmatch\nimport os\nfrom iterto...
[ { "content": "# Author: Simon Liedtke <liedtke.simon@googlemail.com>\n#\n# This module was developed with funding provided by\n# the Google Summer of Code (2013).\n\nfrom __future__ import absolute_import\n\nfrom time import strptime, mktime\nfrom datetime import datetime\nimport fnmatch\nimport os\nfrom iterto...
diff --git a/sunpy/database/tables.py b/sunpy/database/tables.py index 859ed2fa533..773d22a6c86 100644 --- a/sunpy/database/tables.py +++ b/sunpy/database/tables.py @@ -48,7 +48,8 @@ def __init__(self, obj): self.obj = obj def __str__(self): # pragma: no cover - return 'the wavelength unit canno...
open-mmlab__mmdetection-1781
Cannot reproduce the results of SSD-300 on WIDER_FACE Hi @sovrasov, Recently, I'm reproducing the results of SSD-300 on WIDER_FACE. I use the provided config based on mmdetection and get Recall 36.9, Precision 0.023 and AP 27.3. The results are worse than Recall 43.4, Precision 0.029 and AP 34.7 (shown in https://gi...
[ { "content": "# model settings\ninput_size = 300\nmodel = dict(\n type='SingleStageDetector',\n pretrained='open-mmlab://vgg16_caffe',\n backbone=dict(\n type='SSDVGG',\n input_size=input_size,\n depth=16,\n with_last_pool=False,\n ceil_mode=True,\n out_indices...
[ { "content": "# model settings\ninput_size = 300\nmodel = dict(\n type='SingleStageDetector',\n pretrained='open-mmlab://vgg16_caffe',\n backbone=dict(\n type='SSDVGG',\n input_size=input_size,\n depth=16,\n with_last_pool=False,\n ceil_mode=True,\n out_indices...
diff --git a/configs/wider_face/ssd300_wider_face.py b/configs/wider_face/ssd300_wider_face.py index 6a4184e1d87..9c0ce79d0bc 100644 --- a/configs/wider_face/ssd300_wider_face.py +++ b/configs/wider_face/ssd300_wider_face.py @@ -107,7 +107,7 @@ img_prefix=data_root + 'WIDER_val/', pipeline=test_pipeli...
spack__spack-44296
Installation issue: bison (Spack v0.22) ### Steps to reproduce the issue ```console $ spack spec -I bison %intel@2021.10.0 target=x86_64 Input spec -------------------------------- - bison%intel@2021.10.0 arch=None-None-x86_64 Concretized -------------------------------- - bison@3.8.2%intel@2021.10.0~co...
[ { "content": "# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport re\nimport sys\n\nfrom spack.operating_systems.mac_os import macos_version\nfrom spack.p...
[ { "content": "# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport re\nimport sys\n\nfrom spack.operating_systems.mac_os import macos_version\nfrom spack.p...
diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index 709e8905678511..e3305d7a8f1653 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -59,6 +59,7 @@ class Bison(AutotoolsPackage, G...
pypa__pipenv-1591
pipenv does not install all extras Pipenv seems to process only the first element in a list of extras. Given a folder with the following Pipfile (otherwise empty): ``` [[source]] url = "https://pypi.python.org/simple" verify_ssl = true name = "pypi" [dev-packages] [packages] apache-airflow = {extras = ["...
[ { "content": "# -*- coding: utf-8 -*-\nimport errno\nimport os\nimport hashlib\nimport tempfile\nimport sys\nimport shutil\nimport logging\nimport errno\nimport click\nimport crayons\nimport delegator\nimport parse\nimport requests\nimport six\nimport stat\nimport warnings\ntry:\n from weakref import finaliz...
[ { "content": "# -*- coding: utf-8 -*-\nimport errno\nimport os\nimport hashlib\nimport tempfile\nimport sys\nimport shutil\nimport logging\nimport errno\nimport click\nimport crayons\nimport delegator\nimport parse\nimport requests\nimport six\nimport stat\nimport warnings\ntry:\n from weakref import finaliz...
diff --git a/HISTORY.txt b/HISTORY.txt index 822ba0f9e0..839f92bbac 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,3 +1,4 @@ + - Bugfix with resolving multiple extras 11.1.3: - Bugfix. 11.1.2: diff --git a/pipenv/utils.py b/pipenv/utils.py index 2e4e258da5..665770831b 100644 --- a/pipenv/utils.py +++ b/pipenv/uti...
facebookresearch__mmf-74
ERROR: 'BaseTrainer' object has no attribute 'args' I followed the instructions on the https://learnpythia.readthedocs.io/ to setup. I seem to have everything installed, and I could run the collab notebook locally. However, when I am trying to run the below command to try out inferences: python tools/run.py --ta...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\nimport torch\nimport warnings\n\nfrom pythia.utils.configuration import Configuration\nfrom pythia.common.registry import registry\nfrom pythia.utils.general import get_optimizer_parameters\n\n\ndef build_trainer(args, *rest, **kwargs):\n conf...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\nimport torch\nimport warnings\n\nfrom pythia.utils.configuration import Configuration\nfrom pythia.common.registry import registry\nfrom pythia.utils.general import get_optimizer_parameters\n\n\ndef build_trainer(args, *rest, **kwargs):\n conf...
diff --git a/pythia/utils/build_utils.py b/pythia/utils/build_utils.py index d09ff9f24..e22332cad 100644 --- a/pythia/utils/build_utils.py +++ b/pythia/utils/build_utils.py @@ -27,7 +27,12 @@ def build_trainer(args, *rest, **kwargs): trainer_type = config.training_parameters.trainer trainer_cls = registry.g...
django-compressor__django-compressor-1050
JS files are minified by default, but CSS files are not Hi, I am using Django(1.8.2) and django-compressor(2.2). The compressed js works good, however, the css file is not compressed. Here is part of my template: ```html {% load staticfiles %} {% load compress %} {% compress css %} <link rel="stylesheet" href="...
[ { "content": "import os\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.template.utils import InvalidTemplateEngineError\n\nfrom appconf import AppConf\n\n\ndefault_filters = dict(\n css=['compressor.filters.css_default.CssAbsoluteFilter'],\n js=['co...
[ { "content": "import os\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.template.utils import InvalidTemplateEngineError\n\nfrom appconf import AppConf\n\n\ndefault_filters = {\n 'css': [\n 'compressor.filters.css_default.CssAbsoluteFilter',\n ...
diff --git a/compressor/conf.py b/compressor/conf.py index ab9373e4..863b93fe 100644 --- a/compressor/conf.py +++ b/compressor/conf.py @@ -6,9 +6,13 @@ from appconf import AppConf -default_filters = dict( - css=['compressor.filters.css_default.CssAbsoluteFilter'], - js=['compressor.filters.jsmin.JSMinFilter'...
sherlock-project__sherlock-49
Fails when invoking script from a different directory ``` $ python sherlock/sherlock.py user123 ."""-. / \ ____ _ _ _ | _..--'-. / ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-""\;...
[ { "content": "\"\"\"\nSherlock: Find Usernames Across Social Networks Module\n\nThis module contains the main logic to search for usernames at social\nnetworks.\n\"\"\"\n\nimport requests\nfrom concurrent.futures import ThreadPoolExecutor\nfrom requests_futures.sessions import FuturesSession\nimport json\nimpor...
[ { "content": "\"\"\"\nSherlock: Find Usernames Across Social Networks Module\n\nThis module contains the main logic to search for usernames at social\nnetworks.\n\"\"\"\n\nimport requests\nfrom concurrent.futures import ThreadPoolExecutor\nfrom requests_futures.sessions import FuturesSession\nimport json\nimpor...
diff --git a/sherlock.py b/sherlock.py index f59d28b13..eea0ffa8a 100644 --- a/sherlock.py +++ b/sherlock.py @@ -90,7 +90,8 @@ def sherlock(username, verbose=False, tor=False, unique_tor=False): } # Load the data - with open("data.json", "r", encoding="utf-8") as raw: + data_file_path = os.path.join(o...
sublimelsp__LSP-1942
Don't use emoji for "deprecated" completion icon I saw that LSP-typescript marks certain completion items as "deprecated", and LSP uses the warning sign emoji (U+26A0) for the completion icon: https://github.com/sublimelsp/LSP/blob/039b389d8ca8977f1bf308bd598804a5fe39a345/plugin/core/views.py#L879 ![default](http...
[ { "content": "from .css import css as lsp_css\nfrom .protocol import CompletionItem\nfrom .protocol import CompletionItemTag\nfrom .protocol import Diagnostic\nfrom .protocol import DiagnosticRelatedInformation\nfrom .protocol import DiagnosticSeverity\nfrom .protocol import DocumentUri\nfrom .protocol import E...
[ { "content": "from .css import css as lsp_css\nfrom .protocol import CompletionItem\nfrom .protocol import CompletionItemTag\nfrom .protocol import Diagnostic\nfrom .protocol import DiagnosticRelatedInformation\nfrom .protocol import DiagnosticSeverity\nfrom .protocol import DocumentUri\nfrom .protocol import E...
diff --git a/plugin/core/views.py b/plugin/core/views.py index 8a05f5199..89fdafcc8 100644 --- a/plugin/core/views.py +++ b/plugin/core/views.py @@ -876,7 +876,7 @@ def format_completion( kind = sublime.KIND_AMBIGUOUS if _is_completion_item_deprecated(item): - kind = (kind[0], '⚠', "⚠ {} - Deprec...
evennia__evennia-1991
[BUG] unpause() does not restart the associated task because self.ndb._task is still set #### Describe the bug Calling `unpause()` does not restart the task because _start_task() returns immediately if self.ndb._task is set, but `pause()` doesn't remove this object #### To Reproduce Steps to reproduce the behavior...
[ { "content": "\"\"\"\nThis module defines Scripts, out-of-character entities that can store\ndata both on themselves and on other objects while also having the\nability to run timers.\n\n\"\"\"\n\nfrom twisted.internet.defer import Deferred, maybeDeferred\nfrom twisted.internet.task import LoopingCall\nfrom dja...
[ { "content": "\"\"\"\nThis module defines Scripts, out-of-character entities that can store\ndata both on themselves and on other objects while also having the\nability to run timers.\n\n\"\"\"\n\nfrom twisted.internet.defer import Deferred, maybeDeferred\nfrom twisted.internet.task import LoopingCall\nfrom dja...
diff --git a/evennia/scripts/scripts.py b/evennia/scripts/scripts.py index 75c9074ad48..b45ac2a0eeb 100644 --- a/evennia/scripts/scripts.py +++ b/evennia/scripts/scripts.py @@ -162,9 +162,8 @@ def _start_task(self): Start task runner. """ - if self.ndb._task: - return - self...
vacanza__python-holidays-794
DeprecationWarning upon "import holidays" in version 0.17 The implementation of deprecating the Swaziland calendar contains a bug. Just importing the holidays package is enough to fire the `DeprecationWarning`. **Steps to reproduce (in bash):** ```bash # Setup python -m venv demo source demo/bin/activate pip ...
[ { "content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <mauriz...
[ { "content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <mauriz...
diff --git a/holidays/countries/eswatini.py b/holidays/countries/eswatini.py index 00ca75bf5..798bd4950 100644 --- a/holidays/countries/eswatini.py +++ b/holidays/countries/eswatini.py @@ -80,11 +80,13 @@ def _populate(self, year): class Swaziland(Eswatini): - warnings.warn( - "Swaziland is deprecated, u...
cisagov__manage.get.gov-2113
create sandbox for christina ### Issue description Create Christina's sandbox ### Acceptance criteria - [x] Christina's sandbox is created - [ ] epp creds added - [ ] email creds added - [x] fixtures are loaded ### Additional context _No response_ ### Links to other issues blocked by: #2052
[ { "content": "\"\"\"\nDjango settings for .gov registrar project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/4.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/4.0/ref/settings/\n\nIF you'd like to see all of these set...
[ { "content": "\"\"\"\nDjango settings for .gov registrar project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/4.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/4.0/ref/settings/\n\nIF you'd like to see all of these set...
diff --git a/.github/workflows/deploy-sandbox.yaml b/.github/workflows/deploy-sandbox.yaml index d9d7cbe14..1c486bdf7 100644 --- a/.github/workflows/deploy-sandbox.yaml +++ b/.github/workflows/deploy-sandbox.yaml @@ -24,6 +24,7 @@ jobs: || startsWith(github.head_ref, 'backup/') || startsWith(github.he...
PrefectHQ__prefect-7914
KubernetesJob job_watch_timeout_seconds none is not an allowed value (2.7.1 / Cloud) ### First check - [X] I added a descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it. - [X] I searched the Prefect documentation for this issue. - [X] I checked that this issu...
[ { "content": "import copy\nimport enum\nimport os\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Tuple, Union\n\nimport anyio.abc\nimport yaml\nfrom pydantic import Field, root_validator, validator\nfrom typing_extensions import Literal\n\nfrom pr...
[ { "content": "import copy\nimport enum\nimport os\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Tuple, Union\n\nimport anyio.abc\nimport yaml\nfrom pydantic import Field, root_validator, validator\nfrom typing_extensions import Literal\n\nfrom pr...
diff --git a/src/prefect/infrastructure/kubernetes.py b/src/prefect/infrastructure/kubernetes.py index 196fbe6d8c19..53602ea9607f 100644 --- a/src/prefect/infrastructure/kubernetes.py +++ b/src/prefect/infrastructure/kubernetes.py @@ -119,7 +119,7 @@ class KubernetesJob(Infrastructure): ) # controls the beh...
spack__spack-21932
shell test kcov suggestion does not work ### Steps to reproduce the issue ```console $ ./share/spack/qa/run-shell-tests ERROR: kcov is required to run this script. To install with Spack, run: $ spack install kcov Then add the bin directory to your PATH. $ spack load kcov $ ./share/spack/qa/run-shell-te...
[ { "content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Kcov(CMakePackage):\n \"\"\"Code coverage tool for compiled p...
[ { "content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Kcov(CMakePackage):\n \"\"\"Code coverage tool for compiled p...
diff --git a/var/spack/repos/builtin/packages/kcov/package.py b/var/spack/repos/builtin/packages/kcov/package.py index 68296c06cbb4d8..5365d5d6bcf351 100644 --- a/var/spack/repos/builtin/packages/kcov/package.py +++ b/var/spack/repos/builtin/packages/kcov/package.py @@ -19,6 +19,8 @@ class Kcov(CMakePackage): depe...
django-cms__django-cms-3209
Bug in PageManager.published Manager says: def published(self, site=None): return self.get_query_set().published(site) where Query.published is def published(self, language=None, site=None). So the if site is set, it goes to language and the query ends up like: ".. publication_end_date" IS NULL) AND "cms_tit...
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.cache.permissions import get_permission_cache, set_permission_cache\nfrom cms.exceptions import NoPermissionsException\nfrom cms.models.query import PageQuerySet\nfrom cms.publisher import PublisherManager\nfrom cms.utils import get_cms_setting\nfrom cms.utils.i18...
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.cache.permissions import get_permission_cache, set_permission_cache\nfrom cms.exceptions import NoPermissionsException\nfrom cms.models.query import PageQuerySet\nfrom cms.publisher import PublisherManager\nfrom cms.utils import get_cms_setting\nfrom cms.utils.i18...
diff --git a/cms/models/managers.py b/cms/models/managers.py index 4af1da5dde5..0bb5633a447 100644 --- a/cms/models/managers.py +++ b/cms/models/managers.py @@ -61,7 +61,7 @@ def valid_targets(self, page_id, request, perms, page=None): return self.get_query_set().valid_targets(page_id, request, perms, page) ...
cal-itp__benefits-544
Mobile: New button design for Sign Out <img width="386" alt="image" src="https://user-images.githubusercontent.com/3673236/166524695-c3e2bca8-7833-40a1-b463-888dd25c264f.png">
[ { "content": "\"\"\"\nThe core application: view model definitions for the root of the webapp.\n\"\"\"\nfrom django.utils.translation import pgettext, gettext as _\nfrom django.urls import reverse\n\nfrom benefits.core import models\n\nfrom . import session\n\n\nclass Button:\n \"\"\"\n Represents a click...
[ { "content": "\"\"\"\nThe core application: view model definitions for the root of the webapp.\n\"\"\"\nfrom django.utils.translation import pgettext, gettext as _\nfrom django.urls import reverse\n\nfrom benefits.core import models\n\nfrom . import session\n\n\nclass Button:\n \"\"\"\n Represents a click...
diff --git a/benefits/core/templates/core/page.html b/benefits/core/templates/core/page.html index 89e9d7fc12..69c761a289 100644 --- a/benefits/core/templates/core/page.html +++ b/benefits/core/templates/core/page.html @@ -15,7 +15,7 @@ <div class="container"> {% else %} {% load static %} - ...
docker__docker-py-653
'None' timeout breaks with Client.stop Hi, We are wotking on a script to automate some stuff using docker and docker-py in some point we execute some code inside docker, this command can take from a few minutes to a 5 or 6 hours. I realized that I could do something like this: ``` python container_name = 'container_...
[ { "content": "# Copyright 2013 dotCloud 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 requir...
[ { "content": "# Copyright 2013 dotCloud 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 requir...
diff --git a/docker/client.py b/docker/client.py index f63da5014..8bcc419e3 100644 --- a/docker/client.py +++ b/docker/client.py @@ -1101,7 +1101,7 @@ def stop(self, container, timeout=10): url = self._url("/containers/{0}/stop".format(container)) res = self._post(url, params=params, - ...
crytic__slither-1971
Suggestion to make the recommendation in the `msgvalue-inside-a-loop` detector wiki clearer ### Describe the desired feature Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#msgvalue-inside-a-loop This is the current recommendation for the `msgvalue-inside-a-loop` detector: ```solidity T...
[ { "content": "from typing import List, Optional\nfrom slither.core.cfg.node import NodeType, Node\nfrom slither.detectors.abstract_detector import (\n AbstractDetector,\n DetectorClassification,\n DETECTOR_INFO,\n)\nfrom slither.slithir.operations import InternalCall\nfrom slither.core.declarations imp...
[ { "content": "from typing import List, Optional\nfrom slither.core.cfg.node import NodeType, Node\nfrom slither.detectors.abstract_detector import (\n AbstractDetector,\n DetectorClassification,\n DETECTOR_INFO,\n)\nfrom slither.slithir.operations import InternalCall\nfrom slither.core.declarations imp...
diff --git a/slither/detectors/statements/msg_value_in_loop.py b/slither/detectors/statements/msg_value_in_loop.py index 55bd9bfc2a..83c5658ca4 100644 --- a/slither/detectors/statements/msg_value_in_loop.py +++ b/slither/detectors/statements/msg_value_in_loop.py @@ -79,7 +79,7 @@ class MsgValueInLoop(AbstractDetector):...
elastic__apm-agent-python-1571
Wrong transaction name in Django 4.0+ **Describe the bug**: When using Django versions 4.0+, the transaction names are incorrect. Expected: `django_app.views.ListUsers` Actual: `django_app.views.view` **Environment (please complete the following information)** - OS: Debian Bullseye - Python version: 3.9.13 ...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c...
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 493810f6c..e144116ab 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -48,6 +48,7 @@ endif::[] * Fix return for `opentelemetry.Span.is_recording()` {pull}1530[#1530] * Fix error logging for bad SERVICE_NAME config {pull}1546[#1546] * Do not instru...
mathesar-foundation__mathesar-2671
1.0 is not a boolean ## Description The software detects `1.0` as a boolean instead of a numeric, which makes the system fail. UI: `When making an XHR request, the server responded with an error, but the response body was not valid JSON.` Database: `ERROR: 1.0 is not a boolean` ## Expected behavior The soft...
[ { "content": "import logging\n\nfrom sqlalchemy import VARCHAR, TEXT, Text\nfrom sqlalchemy.exc import DatabaseError\n\nfrom db.columns.exceptions import DagCycleError\nfrom db.columns.operations.alter import alter_column_type\nfrom db.tables.operations.select import get_oid_from_table, reflect_table\nfrom db.t...
[ { "content": "import logging\n\nfrom sqlalchemy import VARCHAR, TEXT, Text\nfrom sqlalchemy.exc import DatabaseError\n\nfrom db.columns.exceptions import DagCycleError\nfrom db.columns.operations.alter import alter_column_type\nfrom db.tables.operations.select import get_oid_from_table, reflect_table\nfrom db.t...
diff --git a/db/columns/operations/infer_types.py b/db/columns/operations/infer_types.py index ea2fd4d0cb..5d69cb30d6 100644 --- a/db/columns/operations/infer_types.py +++ b/db/columns/operations/infer_types.py @@ -18,9 +18,7 @@ PostgresType.BOOLEAN: [], MathesarCustomType.EMAIL: [], PostgresType.INTERVA...
ansible__ansible-modules-extras-2163
rabbitmq_user module assumes there is at least one user on target system <!--- Verify first that your issue/request is not already reported in GitHub --> ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME rabbitmq_user ##### ANSIBLE VERSION "ansible 2.2.0 (devel fbec9ce58b) last updated 2016/05/04 13:07:35 (GMT +200)...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Chatham Financial <oss@chathamfinancial.com>\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 Softwa...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Chatham Financial <oss@chathamfinancial.com>\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 Softwa...
diff --git a/messaging/rabbitmq_user.py b/messaging/rabbitmq_user.py index 85921ce45c7..2e902eaa696 100644 --- a/messaging/rabbitmq_user.py +++ b/messaging/rabbitmq_user.py @@ -139,7 +139,7 @@ def __init__(self, module, username, password, tags, permissions, self.bulk_permissions = bulk_permissions ...
facebookresearch__hydra-1660
[Bug] Error when using config with UTF characters # 🐛 Bug ## Description An exception is thrown when using Unicode chars in the config. ## Workaround In `hydra/core/utils.py`: ``` def _save_config(cfg: DictConfig, filename: str, output_dir: Path) -> None: output_dir.mkdir(parents=True, exist_ok=True) ...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport copy\nimport logging\nimport os\nimport re\nimport sys\nimport warnings\nfrom contextlib import contextmanager\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom enum import Enum\nfrom os.path impor...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport copy\nimport logging\nimport os\nimport re\nimport sys\nimport warnings\nfrom contextlib import contextmanager\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom enum import Enum\nfrom os.path impor...
diff --git a/.yamllint b/.yamllint index 87a88fd6393..72ee487ee55 100644 --- a/.yamllint +++ b/.yamllint @@ -41,3 +41,4 @@ ignore: | # https://github.com/adrienverge/yamllint/issues/238 tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/config_with_unicode.yaml tests/test_...
dpgmediamagazines__django-arctic-377
Advanced search form is removed from the DOM after being closed After closing the advanced search form popup the form is removed from the DOM. This causes a weird behaviour with the toggle buttons because they will ignore the advanced popup form if the form was opened at least once
[ { "content": "from __future__ import division, unicode_literals\n\nimport calendar\nimport csv\nimport json\nfrom collections import OrderedDict\n\nimport extra_views\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth import authenticate, login, logout\nfrom django....
[ { "content": "from __future__ import division, unicode_literals\n\nimport calendar\nimport csv\nimport json\nfrom collections import OrderedDict\n\nimport extra_views\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth import authenticate, login, logout\nfrom django....
diff --git a/arctic/generics.py b/arctic/generics.py index 6a5d04a9..5bf33453 100755 --- a/arctic/generics.py +++ b/arctic/generics.py @@ -641,7 +641,7 @@ def csv_file_response(self): writer.writerow(titles) m2m_fields = [m2m_f.attname for m2m_f in model._meta.many_to_many] - for obj in self....
SciTools__cartopy-1245
SlippyImageArtist cannot be composited For example, take the WMTS example and add a second layer. Then attempt to save as a PDF. ``` python import cartopy.crs as ccrs import matplotlib.pyplot as plt url = 'http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi' layer1 = 'VIIRS_CityLights_2012' layer2 = 'ASTER_GDEM_Col...
[ { "content": "# (C) British Crown Copyright 2014 - 2018, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the Li...
[ { "content": "# (C) British Crown Copyright 2014 - 2018, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the Li...
diff --git a/lib/cartopy/mpl/slippy_image_artist.py b/lib/cartopy/mpl/slippy_image_artist.py index 21f4d0fa3..3a96d0ba0 100644 --- a/lib/cartopy/mpl/slippy_image_artist.py +++ b/lib/cartopy/mpl/slippy_image_artist.py @@ -74,3 +74,8 @@ def draw(self, renderer, *args, **kwargs): with ax.hold_limits(): ...
jazzband__pip-tools-608
README broken on PyPI (must be reStructuredText) The [package description](https://pypi.python.org/pypi/pip-tools/) on PyPI is unreadable since PyPI expects the README in [reStructuredText](http://www.sphinx-doc.org/en/stable/rest.html) file format and we use MarkDown. Solution A: Convert to reST ------------------...
[ { "content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nfrom os.path import abspath, dirname, join\nfrom setuptools import find_packages, setup\n\ndef read_file(filename):\n \"\"\"Read the contents of a file located relative to setup.py\"\"\"\n with open(join(abspath(dirname(__file_...
[ { "content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nfrom os.path import abspath, dirname, join\nfrom setuptools import find_packages, setup\n\ndef read_file(filename):\n \"\"\"Read the contents of a file located relative to setup.py\"\"\"\n with open(join(abspath(dirname(__file_...
diff --git a/.travis.yml b/.travis.yml index dcdb84d88..7d5413707 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,9 @@ jobs: - stage: flake8 python: 2.7 env: TOXENV=flake8 - - stage: checkdocs + - stage: readme python: 2.7 - env: TOXENV=checkdocs + env: TOXENV=readme ...
astronomer__astro-sdk-176
Use standard AWS environment variables **Context** At the moment, Astro 0.6.x uses a custom environment variable `AIRFLOW__ASTRO__CONN_AWS_DEFAULT` to define AWS credentials. However, there are standard [AWS environment variables to define credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/conf...
[ { "content": "import json\nimport os\nfrom urllib import parse\n\nfrom airflow.hooks.base import BaseHook\n\nfrom astro.utils.dependencies import (\n AwsBaseHook,\n BotoSession,\n GCSClient,\n GCSHook,\n google_service_account,\n)\n\n\ndef parse_s3_env_var():\n raw_data = (\n os.environ...
[ { "content": "import json\nimport os\nfrom urllib import parse\n\nfrom airflow.hooks.base import BaseHook\n\nfrom astro.utils.dependencies import (\n AwsBaseHook,\n BotoSession,\n GCSClient,\n GCSHook,\n google_service_account,\n)\n\n\ndef parse_s3_env_var():\n return os.environ[\"AWS_ACCESS_K...
diff --git a/.env-template b/.env-template index ec65eed43f..8218b9813c 100644 --- a/.env-template +++ b/.env-template @@ -8,5 +8,6 @@ SNOWFLAKE_REGION=<add snowflake region here> SNOWFLAKE_ROLE=<add snowflake role here> SNOWFLAKE_DATABASE=<add snowflake database here> SNOWFLAKE_WAREHOUSE=<add snowflake warehouse he...
vispy__vispy-1534
GLFW glfw.glfwSetWindowTitle issue Hello there, I am using a library https://github.com/p5py/p5 which is dependent on vispy. When passing a new title as str to glfw.glfwSetWindowTitle only the first letter of the passed string is coming up as the changed title. I was able to find a workaround to this by passing the t...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"\nvispy backend for glfw.\n\"\"\"\n\n# Note: to install GLFW on Ubuntu:\n# $ git clone git://github.com/glfw/glfw.git\n# $ cd glfw...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"\nvispy backend for glfw.\n\"\"\"\n\n# Note: to install GLFW on Ubuntu:\n# $ git clone git://github.com/glfw/glfw.git\n# $ cd glfw...
diff --git a/vispy/app/backends/_glfw.py b/vispy/app/backends/_glfw.py index f60d026af7..a50ca076ef 100644 --- a/vispy/app/backends/_glfw.py +++ b/vispy/app/backends/_glfw.py @@ -324,7 +324,7 @@ def _vispy_set_title(self, title): if self._id is None: return # Set the window title. Has no ...
ourownstory__neural_prophet-1282
Exception handling for too small dataset to detect learning rate is missleading In case the dataset is too small to detect a learning rate the following warning is show: `ERROR - (NP.utils.smooth_loss_and_suggest) - The number of loss values (1) is too small to estimate a learning rate. Increase the number of sample...
[ { "content": "from __future__ import annotations\n\nimport logging\nimport math\nimport os\nimport sys\nfrom collections import OrderedDict\nfrom typing import TYPE_CHECKING, Iterable, Optional, Union\n\nimport numpy as np\nimport pandas as pd\nimport pytorch_lightning as pl\nimport torch\n\nfrom neuralprophet ...
[ { "content": "from __future__ import annotations\n\nimport logging\nimport math\nimport os\nimport sys\nfrom collections import OrderedDict\nfrom typing import TYPE_CHECKING, Iterable, Optional, Union\n\nimport numpy as np\nimport pandas as pd\nimport pytorch_lightning as pl\nimport torch\n\nfrom neuralprophet ...
diff --git a/neuralprophet/utils.py b/neuralprophet/utils.py index 499b4b14c..a4b0181ff 100644 --- a/neuralprophet/utils.py +++ b/neuralprophet/utils.py @@ -730,6 +730,7 @@ def smooth_loss_and_suggest(lr_finder_results, window=10): log.error( f"The number of loss values ({len(loss)}) is too small ...
statsmodels__statsmodels-7141
Avoid np.linalg.inv call in regression.rolling.RollingWLS.fit if output is not used #### Problem description In the documentation of `statsmodels.regression.rolling.RollingWLS.fit` the parameter `method` is described as > method{‘inv’, ‘lstsq’, ‘pinv’} > Method to use when computing the the model parameters. >...
[ { "content": "\"\"\"\nRolling OLS and WLS\n\nImplements an efficient rolling estimator that avoids repeated matrix\nmultiplication.\n\nCopyright (c) 2019 Kevin Sheppard\nLicense: 3-clause BSD\n\"\"\"\nfrom statsmodels.compat.numpy import lstsq\nfrom statsmodels.compat.pandas import Appender, Substitution, cache...
[ { "content": "\"\"\"\nRolling OLS and WLS\n\nImplements an efficient rolling estimator that avoids repeated matrix\nmultiplication.\n\nCopyright (c) 2019 Kevin Sheppard\nLicense: 3-clause BSD\n\"\"\"\nfrom statsmodels.compat.numpy import lstsq\nfrom statsmodels.compat.pandas import Appender, Substitution, cache...
diff --git a/statsmodels/regression/rolling.py b/statsmodels/regression/rolling.py index 764b70e8080..5fd4654c636 100644 --- a/statsmodels/regression/rolling.py +++ b/statsmodels/regression/rolling.py @@ -223,7 +223,8 @@ def _fit_single(self, idx, wxpwx, wxpwy, nobs, store, params_only, method): if nobs < self...
django-oscar__django-oscar-3178
Offer Consumed Many Times on Same Product ### Issue Summary The Offer Incentive type "Discount is percentage off of the products value" will multiply the discount value by the max affected items. For example, an Offer for 10% discount with max affected 5 items in the basket will result in a 50% discount on 1 product, ...
[ { "content": "from collections import defaultdict\n\nfrom django.contrib import messages\nfrom django.template.loader import render_to_string\n\nfrom oscar.core.loading import get_class, get_model\n\nApplicator = get_class('offer.applicator', 'Applicator')\nConditionalOffer = get_model('offer', 'ConditionalOffe...
[ { "content": "from collections import defaultdict\n\nfrom django.contrib import messages\nfrom django.template.loader import render_to_string\n\nfrom oscar.core.loading import get_class, get_model\n\nApplicator = get_class('offer.applicator', 'Applicator')\nConditionalOffer = get_model('offer', 'ConditionalOffe...
diff --git a/src/oscar/apps/basket/utils.py b/src/oscar/apps/basket/utils.py index b383f0079ad..1a069373cb4 100644 --- a/src/oscar/apps/basket/utils.py +++ b/src/oscar/apps/basket/utils.py @@ -162,6 +162,6 @@ def available(self, offer=None) -> int: # respect max_affected_items if offer.benef...
obspy__obspy-2504
FutureWarning for signal.headers This happens with current master and NumPy 1.17.3: ```python >>> from obspy import signal ``` ``` [...]/obspy/signal/headers.py:93: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nDefines the libsignal and evalresp structures and blockettes.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\nfrom future.utils import native_str\n\nimpor...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nDefines the libsignal and evalresp structures and blockettes.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\nfrom future.utils import native_str\n\nimpor...
diff --git a/obspy/signal/headers.py b/obspy/signal/headers.py index 06b2e7afc35..30367b1b42a 100644 --- a/obspy/signal/headers.py +++ b/obspy/signal/headers.py @@ -87,9 +87,9 @@ clibsignal.utl_geo_km.restype = C.c_void_p head_stalta_t = np.dtype([ - (native_str('N'), np.uint32, 1), - (native_str('nsta'), np....
streamlit__streamlit-7358
Misconfigured _xsrf cookies ### Checklist - [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues. - [X] I added a very descriptive title to this issue. - [X] I have provided sufficient information below to help reproduce this issue. ### Summary Hi, I am runni...
[ { "content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2...
[ { "content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2...
diff --git a/e2e/specs/st_file_uploader.spec.js b/e2e/specs/st_file_uploader.spec.js index 6039aa8d5bce..718ba12fafc1 100644 --- a/e2e/specs/st_file_uploader.spec.js +++ b/e2e/specs/st_file_uploader.spec.js @@ -55,6 +55,14 @@ describe("st.file_uploader", () => { ); }); + it("sets cookie options correctly", (...
CTFd__CTFd-1827
Set plugin migration version in between each migration https://github.com/CTFd/CTFd/blob/e1991e16963b10302baa7cc50d52071a5053bf2f/CTFd/plugins/migrations.py#L72-L77 This code here probably should be setting the plugin version in between each migration so that if a migration fails it doesn't need to be started from t...
[ { "content": "import inspect\nimport os\n\nfrom alembic.config import Config\nfrom alembic.migration import MigrationContext\nfrom alembic.operations import Operations\nfrom alembic.script import ScriptDirectory\nfrom flask import current_app\nfrom sqlalchemy import create_engine, pool\n\nfrom CTFd.utils import...
[ { "content": "import inspect\nimport os\n\nfrom alembic.config import Config\nfrom alembic.migration import MigrationContext\nfrom alembic.operations import Operations\nfrom alembic.script import ScriptDirectory\nfrom flask import current_app\nfrom sqlalchemy import create_engine, pool\n\nfrom CTFd.utils import...
diff --git a/CTFd/plugins/migrations.py b/CTFd/plugins/migrations.py index a3661de27..7b9393fa0 100644 --- a/CTFd/plugins/migrations.py +++ b/CTFd/plugins/migrations.py @@ -73,6 +73,9 @@ def upgrade(plugin_name=None, revision=None, lower="current"): for r in revs: with context.begin_transaction():...
pyro-ppl__pyro-1896
vae comparison example giving different results for Pyro and PyTorch implementations Hi, Pyro version: 3.3 PyTorch: 1.1 Running `examples/vae/vae_comparison.py` With PyTorch: ``` downloading data download complete. downloading data download complete. Running PyTorch VAE implementation ====> Epoch: 0 ...
[ { "content": "import argparse\nimport itertools\nimport os\nfrom abc import ABCMeta, abstractmethod\n\nimport torch\nimport torch.nn as nn\nfrom six import add_metaclass\nfrom torch.nn import functional\nfrom torchvision.utils import save_image\n\nimport pyro\nfrom pyro.contrib.examples import util\nfrom pyro.d...
[ { "content": "import argparse\nimport itertools\nimport os\nfrom abc import ABCMeta, abstractmethod\n\nimport torch\nimport torch.nn as nn\nfrom six import add_metaclass\nfrom torch.nn import functional\nfrom torchvision.utils import save_image\n\nimport pyro\nfrom pyro.contrib.examples import util\nfrom pyro.d...
diff --git a/examples/vae/vae_comparison.py b/examples/vae/vae_comparison.py index 0cf873b779..7bd4e8bf3e 100644 --- a/examples/vae/vae_comparison.py +++ b/examples/vae/vae_comparison.py @@ -103,7 +103,7 @@ def model_eval(self, x): """ z_mean, z_var = self.vae_encoder(x) if self.mode == TRAIN...
deis__deis-2818
Deis pull does not respect permissions. Any user can `deis pull` into any app without having the needed permissions. Steps to reproduce: ``` - deis login --username user1 - deis create - deis pull postgres # creates release v2 - deis login --username user2 - deis pull postgres # creates release v3 ``` The ...
[ { "content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import AnonymousUser, User\nfrom django.core.exceptions import ValidationErr...
[ { "content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import AnonymousUser, User\nfrom django.core.exceptions import ValidationErr...
diff --git a/controller/api/tests/test_build.py b/controller/api/tests/test_build.py index f3a2595542..1a15c76d5c 100644 --- a/controller/api/tests/test_build.py +++ b/controller/api/tests/test_build.py @@ -172,7 +172,6 @@ def test_build_default_containers(self): def test_build_str(self): """Test the text...
strawberry-graphql__strawberry-887
Bug: Failure when returning List[List[int]] as a strawberry type in a query The follow code doesn't run strawberry server schema Then running a graphiql query is sufficient to reproduce this error. error message TypeError: 'float' object is not iterable ```python @strawberry.type(description="list of list br...
[ { "content": "import dataclasses\nimport enum\nimport typing\nfrom inspect import iscoroutine\nfrom typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Type, Union\n\nfrom graphql import GraphQLResolveInfo\n\nfrom strawberry.arguments import UNSET, convert_arguments\nfrom strawberry.types.info ...
[ { "content": "import dataclasses\nimport enum\nimport typing\nfrom inspect import iscoroutine\nfrom typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Type, Union\n\nfrom graphql import GraphQLResolveInfo\n\nfrom strawberry.arguments import UNSET, convert_arguments\nfrom strawberry.types.info ...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..e4b7856bd3 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,18 @@ +Release type: patch + +This release fixes an issue when using nested lists, this now works properly: + +```python +def get_polygons() -> List[List[float]]: + return [[2.0, 6.0]] + +...
ivy-llc__ivy-19282
erfc
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import (\n with_unsupported_dtypes,\n with_supported_dtypes,\n)\nimport ivy.functional.frontends.torch as torch_frontend\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_dtypes(\n {\"1.12.0 and...
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import (\n with_unsupported_dtypes,\n with_supported_dtypes,\n)\nimport ivy.functional.frontends.torch as torch_frontend\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_dtypes(\n {\"1.12.0 and...
diff --git a/ivy/functional/frontends/torch/pointwise_ops.py b/ivy/functional/frontends/torch/pointwise_ops.py index 6af3662a4960c..0b75cac4247ba 100644 --- a/ivy/functional/frontends/torch/pointwise_ops.py +++ b/ivy/functional/frontends/torch/pointwise_ops.py @@ -528,6 +528,12 @@ def erf(input, *, out=None): retu...
fonttools__fonttools-2689
[varLib.merger] <exception str() failed> I'm in the process of figuring out what is happening here, but in the meantime I thought I'd post this as it apears there is a bug in the exception handling: see the `<exception str() failed>` messages below. ``` Traceback (most recent call last): File "/opt/hostedtoolcac...
[ { "content": "import textwrap\n\n\nclass VarLibError(Exception):\n \"\"\"Base exception for the varLib module.\"\"\"\n\n\nclass VarLibValidationError(VarLibError):\n \"\"\"Raised when input data is invalid from varLib's point of view.\"\"\"\n\n\nclass VarLibMergeError(VarLibError):\n \"\"\"Raised when ...
[ { "content": "import textwrap\n\n\nclass VarLibError(Exception):\n \"\"\"Base exception for the varLib module.\"\"\"\n\n\nclass VarLibValidationError(VarLibError):\n \"\"\"Raised when input data is invalid from varLib's point of view.\"\"\"\n\n\nclass VarLibMergeError(VarLibError):\n \"\"\"Raised when ...
diff --git a/Lib/fontTools/varLib/errors.py b/Lib/fontTools/varLib/errors.py index fb3708a176..777292077f 100644 --- a/Lib/fontTools/varLib/errors.py +++ b/Lib/fontTools/varLib/errors.py @@ -86,7 +86,9 @@ def details(self): good_ttf = next( ttf for ttf in self.merger.ttfs - ...
bookwyrm-social__bookwyrm-504
Shelf page json view has a server error This is a quick fix, needs a unittest.
[ { "content": "''' puttin' books on shelves '''\nimport re\nfrom django.db import models\n\nfrom bookwyrm import activitypub\nfrom .base_model import ActivitypubMixin, BookWyrmModel\nfrom .base_model import OrderedCollectionMixin\nfrom . import fields\n\n\nclass Shelf(OrderedCollectionMixin, BookWyrmModel):\n ...
[ { "content": "''' puttin' books on shelves '''\nimport re\nfrom django.db import models\n\nfrom bookwyrm import activitypub\nfrom .base_model import ActivitypubMixin, BookWyrmModel\nfrom .base_model import OrderedCollectionMixin\nfrom . import fields\n\n\nclass Shelf(OrderedCollectionMixin, BookWyrmModel):\n ...
diff --git a/bookwyrm/models/shelf.py b/bookwyrm/models/shelf.py index 69df43b4c9..a06f78dcb7 100644 --- a/bookwyrm/models/shelf.py +++ b/bookwyrm/models/shelf.py @@ -39,7 +39,7 @@ def save(self, *args, **kwargs): @property def collection_queryset(self): ''' list of books for this shelf, overrides Or...
ipython__ipython-10046
Autocompletion with Init-Signatures of C extension classes I don't quite get the autocompletion to work with C extension classes. These classes have a Signature (at least since python 3.4 by utilizing `__text_signature__`) but it seems IPython cannot autocomplete the parameters in `__text_signature__`. For example: ...
[ { "content": "# encoding: utf-8\n\"\"\"A fancy version of Python's builtin :func:`dir` function.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport inspect\nfrom .py3compat import string_types\n\n\ndef safe_hasattr(obj, attr):\n \"\"\"In...
[ { "content": "# encoding: utf-8\n\"\"\"A fancy version of Python's builtin :func:`dir` function.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport inspect\nfrom .py3compat import string_types\n\n\ndef safe_hasattr(obj, attr):\n \"\"\"In...
diff --git a/IPython/utils/dir2.py b/IPython/utils/dir2.py index f6f164f9b12..62797ae0528 100644 --- a/IPython/utils/dir2.py +++ b/IPython/utils/dir2.py @@ -41,6 +41,9 @@ def dir2(obj): # TypeError: dir(obj) does not return a list words = set() + if safe_hasattr(obj, '__class__'): + words ...
learningequality__kolibri-6194
Upgrading a channel using 'importchannel' command fails with sqlalchemy errors <!-- Instructions: * Fill out the sections below, replace …'s with information about your issue * Use the 'preview' function above this text box to verify formatting before submitting --> ### Observed behavior I get errors trying...
[ { "content": "import logging\n\nfrom django.apps import apps\nfrom django.db.models.fields.related import ForeignKey\nfrom sqlalchemy.exc import OperationalError\nfrom sqlalchemy.exc import SQLAlchemyError\nfrom sqlalchemy.sql import text\n\nfrom .annotation import update_content_metadata\nfrom .channels import...
[ { "content": "import logging\n\nfrom django.apps import apps\nfrom django.db.models.fields.related import ForeignKey\nfrom sqlalchemy.exc import OperationalError\nfrom sqlalchemy.exc import SQLAlchemyError\nfrom sqlalchemy.sql import text\n\nfrom .annotation import update_content_metadata\nfrom .channels import...
diff --git a/kolibri/core/content/utils/channel_import.py b/kolibri/core/content/utils/channel_import.py index 1073e95eab4..32b1223a953 100644 --- a/kolibri/core/content/utils/channel_import.py +++ b/kolibri/core/content/utils/channel_import.py @@ -558,7 +558,7 @@ def delete_old_channel_data(self, old_tree_id): ...
sktime__sktime-5208
[BUG] ColumnSelect missing tag`"skip-inverse-transform"` **Describe the bug** <!-- A clear and concise description of what the bug is. --> The ColumnSelect is missing the tag `"skip-inverse-transform"`. Thus, a TransformedTargetForecaster subsetting the `y` input will fail when calling predict. **To Reproduce**...
[ { "content": "\"\"\"Transformers for index and column subsetting.\"\"\"\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file).\n\n__author__ = [\"fkiraly\"]\n\nimport pandas as pd\n\nfrom sktime.transformations.base import BaseTransformer\n\n\nclass IndexSubset(BaseTransformer):\n r\"\"\"I...
[ { "content": "\"\"\"Transformers for index and column subsetting.\"\"\"\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file).\n\n__author__ = [\"fkiraly\"]\n\nimport pandas as pd\n\nfrom sktime.transformations.base import BaseTransformer\n\n\nclass IndexSubset(BaseTransformer):\n r\"\"\"I...
diff --git a/.all-contributorsrc b/.all-contributorsrc index 3441d656054..ed91edebc62 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1740,6 +1740,7 @@ "name": "Benedikt Heidrich", "profile": "https://github.com/benheid", "contributions": [ + "bug", "code" ] ...
jdb78__pytorch-forecasting-280
[NBeats] plot_interpretation with axes list - PyTorch-Forecasting version: 0.8.2 - PyTorch version: 1.8.0 - Python version: 3.6.9 - Operating System: Ubuntu 18.04 ### Expected behavior plot_interpretation with ax as list of axes gives 'AttributeError: 'list' object has no attribute 'get_figure'. Docs says a...
[ { "content": "\"\"\"\nN-Beats model for timeseries forecasting without covariates.\n\"\"\"\nfrom typing import Dict, List\n\nimport matplotlib.pyplot as plt\nimport torch\nfrom torch import nn\n\nfrom pytorch_forecasting.data import TimeSeriesDataSet\nfrom pytorch_forecasting.data.encoders import NaNLabelEncode...
[ { "content": "\"\"\"\nN-Beats model for timeseries forecasting without covariates.\n\"\"\"\nfrom typing import Dict, List\n\nimport matplotlib.pyplot as plt\nimport torch\nfrom torch import nn\n\nfrom pytorch_forecasting.data import TimeSeriesDataSet\nfrom pytorch_forecasting.data.encoders import NaNLabelEncode...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ee5344c3..1295dc0ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed - Underlying data is copied if modified. Original data is not modified inplace (#263) +- Allow plotting of interpretation on passed figure for NBEATS (#280) ### Contributors ...
getmoto__moto-1739
[SES] Does not properly verify mailbox with display name https://tools.ietf.org/html/rfc2822.html#section-3.4 defines two forms of valid mailbox: * `foo@example.com` * `"Foo Bar" <foo@example.com>` SES supports both of these forms. Per https://github.com/spulec/moto/blob/master/moto/ses/models.py#L55, only the f...
[ { "content": "from __future__ import unicode_literals\n\nimport email\nfrom email.utils import parseaddr\n\nfrom moto.core import BaseBackend, BaseModel\nfrom .exceptions import MessageRejectedError\nfrom .utils import get_random_message_id\n\n\nRECIPIENT_LIMIT = 50\n\n\nclass Message(BaseModel):\n\n def __i...
[ { "content": "from __future__ import unicode_literals\n\nimport email\nfrom email.utils import parseaddr\n\nfrom moto.core import BaseBackend, BaseModel\nfrom .exceptions import MessageRejectedError\nfrom .utils import get_random_message_id\n\n\nRECIPIENT_LIMIT = 50\n\n\nclass Message(BaseModel):\n\n def __i...
diff --git a/moto/ses/models.py b/moto/ses/models.py index 3dced60f2fa8..71fe9d9a14e9 100644 --- a/moto/ses/models.py +++ b/moto/ses/models.py @@ -49,7 +49,8 @@ def __init__(self): self.sent_messages = [] self.sent_message_count = 0 - def _is_verified_address(self, address): + def _is_verified...
pallets__werkzeug-2612
Increase default work factor for PBKDF2 to 600,000 iterations https://github.com/pallets/werkzeug/blob/bba2109e276ab876b8d64e2b967412cb6da1d865/src/werkzeug/security.py#L12 The value has not been updated for a few years. I propose increasing it to the same number as the next release of Django will use. See https:...
[ { "content": "import hashlib\nimport hmac\nimport os\nimport posixpath\nimport secrets\nimport typing as t\n\nif t.TYPE_CHECKING:\n pass\n\nSALT_CHARS = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\nDEFAULT_PBKDF2_ITERATIONS = 260000\n\n_os_alt_seps: t.List[str] = list(\n sep for sep...
[ { "content": "import hashlib\nimport hmac\nimport os\nimport posixpath\nimport secrets\nimport typing as t\n\nif t.TYPE_CHECKING:\n pass\n\nSALT_CHARS = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\nDEFAULT_PBKDF2_ITERATIONS = 600000\n\n_os_alt_seps: t.List[str] = list(\n sep for sep...
diff --git a/CHANGES.rst b/CHANGES.rst index 58eb407ff..328fa6f4a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -31,6 +31,7 @@ Unreleased Watchdog to 2.3.0. :issue:`2603` - When using a Unix socket for the development server, the path can start with a dot. :issue:`2595` +- Increase default work factor fo...
python-poetry__poetry-1129
Malformed METADATA when using optional git dependencies <!-- Hi there! Thank you for discovering and submitting an issue. Before you submit this; let's make sure of a few things. Please make sure the following boxes are ticked if they are correct. If not, please try and fulfill these first. --> <!-- C...
[ { "content": "import poetry.packages\n\nfrom poetry.semver import parse_constraint\nfrom poetry.semver import Version\nfrom poetry.semver import VersionConstraint\nfrom poetry.semver import VersionRange\nfrom poetry.semver import VersionUnion\nfrom poetry.utils.helpers import canonicalize_name\nfrom poetry.vers...
[ { "content": "import poetry.packages\n\nfrom poetry.semver import parse_constraint\nfrom poetry.semver import Version\nfrom poetry.semver import VersionConstraint\nfrom poetry.semver import VersionRange\nfrom poetry.semver import VersionUnion\nfrom poetry.utils.helpers import canonicalize_name\nfrom poetry.vers...
diff --git a/poetry/packages/dependency.py b/poetry/packages/dependency.py index 31a360ebdbf..74d8f92c1d4 100644 --- a/poetry/packages/dependency.py +++ b/poetry/packages/dependency.py @@ -200,6 +200,9 @@ def to_pep_508(self, with_extras=True): # type: (bool) -> str ) if markers: + i...
encode__uvicorn-272
HEAD request raise error with h11 I'm using the same example from the Readme but running with h11: ```bash uvicorn --http h11 app:App ``` When I make a HEAD request, I get this error: ```bash > uvicorn --http h11 app:App INFO: Started server process [509] INFO: Uvicorn running on http://127.0.0.1:8000 (Pr...
[ { "content": "import asyncio\nfrom email.utils import formatdate\nimport http\nimport logging\nimport time\nfrom urllib.parse import unquote\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\nimport h11\n\n\ndef _get_default_headers():\n current_time = time.time()\n current_da...
[ { "content": "import asyncio\nfrom email.utils import formatdate\nimport http\nimport logging\nimport time\nfrom urllib.parse import unquote\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\nimport h11\n\n\ndef _get_default_headers():\n current_time = time.time()\n current_da...
diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py index f1b3ca1ca..3c93aa96a 100644 --- a/tests/protocols/test_http.py +++ b/tests/protocols/test_http.py @@ -242,33 +242,33 @@ def app(scope): @pytest.mark.parametrize("protocol_cls", [HttpToolsProtocol, H11Protocol]) def test_chunked_encoding_...
vispy__vispy-1213
problem with basic plot example Hi, I have some issues to run the following example: https://github.com/vispy/vispy/blob/master/examples/basics/plotting/colorbar.py: Im on OS X Yosemite: ``` $ python --version Python 2.7.6 vispy.sys_info(): Platform: Darwin-14.5.0-x86_64-i386-64bit Python: 2.7.6 (default, Apr 10 ...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"Data downloading and reading functions\n\"\"\"\n\nfrom math import log\nimport os\nfrom os import path as op\nimport sys\nimport shutil\nimport...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"Data downloading and reading functions\n\"\"\"\n\nfrom math import log\nimport os\nfrom os import path as op\nimport sys\nimport shutil\nimport...
diff --git a/vispy/testing/image_tester.py b/vispy/testing/image_tester.py index fc854f32b0..06bb2da476 100644 --- a/vispy/testing/image_tester.py +++ b/vispy/testing/image_tester.py @@ -377,7 +377,7 @@ def get_test_data_repo(): test_data_tag = 'test-data-5' data_path = config['test_data_path'] - git_pat...
freedomofpress__securedrop-676
Seven word code name option is weaker than the recommended default When the source generates a new code name, the default is to recommend a string that is eight words long. The source can select strings that contain more words, but the source can also select a string that has fewer words than the recommended default. A...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro...
diff --git a/securedrop/source.py b/securedrop/source.py index 618d7b180f..de821adeba 100644 --- a/securedrop/source.py +++ b/securedrop/source.py @@ -132,7 +132,7 @@ def generate(): # page, or inform them that they're logged in. session.pop('logged_in', None) - num_words = 8 + num_words = 7 if r...
PyGithub__PyGithub-706
Implement __hash__() and __eq__() on NamedUser I have a case where I'm processing the list of reviewers on a Pull Request. When the same person does two reviews the `NamedUser` return from the `PullRequest.get_reviews()`, while they have the same `login`, `id`, and `name`, don't have the same hash value. If you imp...
[ { "content": "# -*- coding: utf-8 -*-\n\n# ########################## Copyrights and license ############################\n# #\n# Copyright 2012 Steve English <steve.english@navetas.com> #\n# Copyright 2012 Vincent ...
[ { "content": "# -*- coding: utf-8 -*-\n\n# ########################## Copyrights and license ############################\n# #\n# Copyright 2012 Steve English <steve.english@navetas.com> #\n# Copyright 2012 Vincent ...
diff --git a/github/NamedUser.py b/github/NamedUser.py index 22eb3fc6e8..58d9bec854 100644 --- a/github/NamedUser.py +++ b/github/NamedUser.py @@ -46,6 +46,12 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def __repr__(self): return self.get__repr__({"login": self._login.value}) + d...
pymedusa__Medusa-4725
YGGTorrent : Unable to bdecode torrent **Describe the bug** The YggTorrent provider seems to have a bug. The downloads are not correctly handled to rtorrent. The "unable to bdecode torrent" occurs. Thank you for your help. **Medusa (please complete the following information):** Branch: master  Commit: e7c4ff...
[ { "content": "# coding=utf-8\n\n\"\"\"Provider code for Yggtorrent.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import (\n convert_size,\n try_int,\n)\nfrom medusa.logger.adapters...
[ { "content": "# coding=utf-8\n\n\"\"\"Provider code for Yggtorrent.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import (\n convert_size,\n try_int,\n)\nfrom medusa.logger.adapters...
diff --git a/medusa/providers/torrent/html/yggtorrent.py b/medusa/providers/torrent/html/yggtorrent.py index 660900a389..df99008a76 100644 --- a/medusa/providers/torrent/html/yggtorrent.py +++ b/medusa/providers/torrent/html/yggtorrent.py @@ -36,7 +36,7 @@ def __init__(self): self.password = None # ...
ckan__ckan-7033
IConfigurer plugin load order **CKAN version** (all) **Describe the bug** `update_config` runs through all IConfigurer plugins from first to last calling `plugin.update_config`. The pattern for other interfaces is that the "first plugin wins", but this is difficult to implement when later plugins override values f...
[ { "content": "# encoding: utf-8\n'''CKAN environment configuration'''\nfrom __future__ import annotations\n\nimport os\nimport logging\nimport warnings\nimport pytz\n\nfrom typing import Union, cast\n\nimport sqlalchemy\n\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.lib.plugins as lib_plug...
[ { "content": "# encoding: utf-8\n'''CKAN environment configuration'''\nfrom __future__ import annotations\n\nimport os\nimport logging\nimport warnings\nimport pytz\n\nfrom typing import Union, cast\n\nimport sqlalchemy\n\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.lib.plugins as lib_plug...
diff --git a/changes/6898.changes b/changes/6898.changes new file mode 100644 index 00000000000..5e46448fdba --- /dev/null +++ b/changes/6898.changes @@ -0,0 +1 @@ +Reverse the order in which IConfigurer plugins are read to be consistent with other hooks. \ No newline at end of file diff --git a/ckan/config/environment...
cookiecutter__cookiecutter-django-4255
Docker Django 4.1 template reload behavior Using Django 4.1 under Docker gives trouble in development with the changed default behavior of the template loading. Templates are cached until restart since the cached loader is added as default: https://docs.djangoproject.com/en/4.1/releases/4.1/#templates My current wor...
[ { "content": "\"\"\"\nNOTE:\n the below code is to be maintained Python 2.x-compatible\n as the whole Cookiecutter Django project initialization\n can potentially be run in Python 2.x environment\n (at least so we presume in `pre_gen_project.py`).\n\nTODO: restrict Cookiecutter Django project initia...
[ { "content": "\"\"\"\nNOTE:\n the below code is to be maintained Python 2.x-compatible\n as the whole Cookiecutter Django project initialization\n can potentially be run in Python 2.x environment\n (at least so we presume in `pre_gen_project.py`).\n\nTODO: restrict Cookiecutter Django project initia...
diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index dbc3671754..b28bb0166d 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -182,7 +182,7 @@ def handle_js_runner(choice, use_docker, use_async): dev_django_cmd = ( "uvicorn config.asgi:applicatio...
qutebrowser__qutebrowser-980
platform.dist() deprecated ``` WARNING py.warnings platform:dist:380 /usr/lib/python3.5/site-packages/qutebrowser/utils/version.py:165: PendingDeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5 and will be removed in Python 3.7 osver = ', '.join([e for e in platform.dist() if ...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2015 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-2015 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/utils/version.py b/qutebrowser/utils/version.py index e0e96661574..6975ba5fa02 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -162,7 +162,7 @@ def _os_info(): lines = [] releaseinfo = None if sys.platform == 'linux': - osver = ', '.join([e ...
opentensor__bittensor-969
Bit 590 backward fix - Keep count of remote loss on server, saving model based on most 20 recent average loss. - When doing tokenization remap, make sure the input size and output size is the same. - Ensure encode_forward_causallmnext deterministic by set seed. - When both local_train and remote_train are on: do loc...
[ { "content": "# The MIT License (MIT)\n# Copyright © 2021 Yuma Rao\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated \n# documentation files (the “Software”), to deal in the Software without restriction, including without limitation \n# the rights ...
[ { "content": "# The MIT License (MIT)\n# Copyright © 2021 Yuma Rao\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated \n# documentation files (the “Software”), to deal in the Software without restriction, including without limitation \n# the rights ...
diff --git a/bittensor/__init__.py b/bittensor/__init__.py index aba412a2ac..a3ecd64793 100644 --- a/bittensor/__init__.py +++ b/bittensor/__init__.py @@ -23,7 +23,7 @@ nest_asyncio.apply() # Bittensor code and protocol version. -__version__ = '3.4.1' +__version__ = '3.4.2' version_split = __version__.split(".") ...
xonsh__xonsh-4191
Unhandled exception I have found the minimal way of how to reproduce the error but I'm not sure how to correctly describe what am I doing or am I using Xonsh as intended as I'm a new user. My practical use case is that I was trying to do something like `find ... | xargs @(lambda ...)` ## xonfig <details> `...
[ { "content": "\"\"\"Subprocess specification and related utilities.\"\"\"\nimport os\nimport io\nimport re\nimport sys\nimport shlex\nimport signal\nimport inspect\nimport pathlib\nimport builtins\nimport subprocess\nimport contextlib\n\nimport xonsh.tools as xt\nimport xonsh.lazyasd as xl\nimport xonsh.platfor...
[ { "content": "\"\"\"Subprocess specification and related utilities.\"\"\"\nimport os\nimport io\nimport re\nimport sys\nimport shlex\nimport signal\nimport inspect\nimport pathlib\nimport builtins\nimport subprocess\nimport contextlib\n\nimport xonsh.tools as xt\nimport xonsh.lazyasd as xl\nimport xonsh.platfor...
diff --git a/news/catch_callable.rst b/news/catch_callable.rst new file mode 100644 index 0000000000..fbe64a5b6d --- /dev/null +++ b/news/catch_callable.rst @@ -0,0 +1,23 @@ +**Added:** + +* <news item> + +**Changed:** + +* <news item> + +**Deprecated:** + +* <news item> + +**Removed:** + +* <news item> + +**Fixed:** +...
docker__docker-py-1393
Exception retrieving untagged images on api >= 1.24 Docker API >= 1.24 will return a null object if image tags DNE instead of not including it in the response. This makes the dict.get fail to catch the null case and the list comprehension to iterate over a non-iterable. ``` File "<stdin>", line 1, in <module> ...
[ { "content": "import re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..errors import BuildError\nfrom ..utils.json_stream import json_stream\nfrom .resource import Collection, Model\n\n\nclass Image(Model):\n \"\"\"\n An image on the server.\n \"\"\"\n def __repr__(self):\n return \"<%s...
[ { "content": "import re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..errors import BuildError\nfrom ..utils.json_stream import json_stream\nfrom .resource import Collection, Model\n\n\nclass Image(Model):\n \"\"\"\n An image on the server.\n \"\"\"\n def __repr__(self):\n return \"<%s...
diff --git a/docker/models/images.py b/docker/models/images.py index 32068e692..6f8f4fe27 100644 --- a/docker/models/images.py +++ b/docker/models/images.py @@ -30,10 +30,10 @@ def tags(self): """ The image's tags. """ - return [ - tag for tag in self.attrs.get('RepoTags', [...
secdev__scapy-3800
PPPoED miscalculated Padding ### Brief description If bytes 4 and 5 of the PPPoED payload are 0, the whole payload is considered `Padding`. Most of the time those bytes will contain a `PPPoED_Tag.tag_type`, e.g `0x0103`. With either vendor-specific tags or the end-of-list tag they can be 0. (The end-of-list tag i...
[ { "content": "# SPDX-License-Identifier: GPL-2.0-only\n# This file is part of Scapy\n# See https://scapy.net/ for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n\n\"\"\"\nPPP (Point to Point Protocol)\n\n[RFC 1661]\n\"\"\"\n\nimport struct\nfrom scapy.config import conf\nfrom scapy.data im...
[ { "content": "# SPDX-License-Identifier: GPL-2.0-only\n# This file is part of Scapy\n# See https://scapy.net/ for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n\n\"\"\"\nPPP (Point to Point Protocol)\n\n[RFC 1661]\n\"\"\"\n\nimport struct\nfrom scapy.config import conf\nfrom scapy.data im...
diff --git a/scapy/layers/ppp.py b/scapy/layers/ppp.py index e9a29a6892a..e38c1677d31 100644 --- a/scapy/layers/ppp.py +++ b/scapy/layers/ppp.py @@ -78,10 +78,7 @@ class PPPoED(PPPoE): ShortField("len", None)] def extract_padding(self, s): - if len(s) < 5: - return s, None -...
buildbot__buildbot-237
Fix plugins a different approach for handling transiitons
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
diff --git a/master/buildbot/status/mail.py b/master/buildbot/status/mail.py index e2eaaa22f1fe..60f77ca13b73 100644 --- a/master/buildbot/status/mail.py +++ b/master/buildbot/status/mail.py @@ -605,6 +605,8 @@ def buildMessage(self, name, builds, results): d.addCallback(self.useLookup) ...
docker__docker-py-1528
Cannot wait blocking generator output from events() Since upgrade to `docker 2.2.0`. API 'events()' using same API client time out. So I got `UnixHTTPConnectionPool(host='localhost', port=None): Read timed out.` exception message. But in my use case, `containers()` or other client APIs are reasonable to set an...
[ { "content": "import os\nimport warnings\nfrom datetime import datetime\n\nfrom .. import auth, utils\nfrom ..constants import INSECURE_REGISTRY_DEPRECATION_WARNING\n\n\nclass DaemonApiMixin(object):\n @utils.minimum_version('1.25')\n def df(self):\n \"\"\"\n Get data usage information.\n\n ...
[ { "content": "import os\nimport warnings\nfrom datetime import datetime\n\nfrom .. import auth, utils\nfrom ..constants import INSECURE_REGISTRY_DEPRECATION_WARNING\n\n\nclass DaemonApiMixin(object):\n @utils.minimum_version('1.25')\n def df(self):\n \"\"\"\n Get data usage information.\n\n ...
diff --git a/docker/api/daemon.py b/docker/api/daemon.py index 00367bc30..91c777f09 100644 --- a/docker/api/daemon.py +++ b/docker/api/daemon.py @@ -68,9 +68,10 @@ def events(self, since=None, until=None, filters=None, decode=None): 'until': until, 'filters': filters } + url = ...
Lightning-AI__torchmetrics-1302
MatthewsCorrCoef has massive slow down on both CPU and especially GPU ## 🐛 Bug It's extremely slow to compute the Matthew Correlation Coefficient since torchmetrics == 0.10.0. ### To Reproduce During my testing, I am seeing massive slow down when computing the Matthew Correlation Coefficient, especially on th...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index b95c4d551d2..646427e9fcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed precision problems when `structural_similarity_index_measure` was used with autocast ([#1291](h...
dotkom__onlineweb4-2115
It's not possible to delete event relations in django admin ## What kind of an issue is this? - [x] Bug report ## What is the expected behaviour? When you mark an event relation for deletion it should be deleted when you save the object. ## What is the current behaviour? The object is saved, but the re...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.contrib import admin, messages\nfrom django.utils.translation import ugettext as _\nfrom guardian.admin import GuardedModelAdmin\nfrom reversion.admin import VersionAdmin\n\nfrom apps.events.models import (AttendanceEvent, Attendee, CompanyEvent, Event, Extra...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.contrib import admin, messages\nfrom django.utils.translation import ugettext as _\nfrom guardian.admin import GuardedModelAdmin\nfrom reversion.admin import VersionAdmin\n\nfrom apps.events.models import (AttendanceEvent, Attendee, CompanyEvent, Event, Extra...
diff --git a/apps/events/admin.py b/apps/events/admin.py index d38bb3468..52f352efa 100644 --- a/apps/events/admin.py +++ b/apps/events/admin.py @@ -151,12 +151,6 @@ def save_model(self, request, obj, form, change): obj.author = request.user obj.save() - def save_formset(self, request, form, ...
python-pillow__Pillow-530
PNG transparency keyword ignored In PngImagePlugin.py around line 564 we have the following: ``` transparency = im.encoderinfo.get('transparency',im.info.get('transparency', None)) if transparency: if im.mode == "P": ... ``` For paletted images you are supposed to give the palette index n...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# PNG support code\n#\n# See \"PNG (Portable Network Graphics) Specification, version 1.0;\n# W3C Recommendation\", 1996-10-01, Thomas Boutell (ed.).\n#\n# history:\n# 1996-05-06 fl Created (couldn't resist it)\n# 1996-12-14 fl Upgraded, added read ...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# PNG support code\n#\n# See \"PNG (Portable Network Graphics) Specification, version 1.0;\n# W3C Recommendation\", 1996-10-01, Thomas Boutell (ed.).\n#\n# history:\n# 1996-05-06 fl Created (couldn't resist it)\n# 1996-12-14 fl Upgraded, added read ...
diff --git a/PIL/PngImagePlugin.py b/PIL/PngImagePlugin.py index a6038d9f2ad..18abf27d34a 100644 --- a/PIL/PngImagePlugin.py +++ b/PIL/PngImagePlugin.py @@ -561,7 +561,7 @@ def _save(im, fp, filename, chunk=putchunk, check=0): transparency = im.encoderinfo.get('transparency',im.info.get('transparency', None)) ...
deepchecks__deepchecks-1076
[FEAT] Exclude tests from the package distribution Currently, the tests folder is shipped with the dist package. This shouldn't happen.
[ { "content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n#...
[ { "content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n#...
diff --git a/setup.py b/setup.py index e56c5d91c8..acef6257f1 100644 --- a/setup.py +++ b/setup.py @@ -158,7 +158,7 @@ def read_requirements() -> t.Dict[str,t.List[str]]: }, # -- dependencies -------------------------------- - packages=setuptools.find_packages(), + packages=setuptools.find_package...
borgbackup__borg-6686
crashing with UnboundLocalError in create_filter_process ``` try: yield stream except Exception: # something went wrong with processing the stream by borg logger.debug('Exception, killing the filter...') > proc.kill() E UnboundLocalErr...
[ { "content": "import contextlib\nimport os\nimport os.path\nimport re\nimport shlex\nimport signal\nimport subprocess\nimport sys\nimport time\nimport traceback\n\nfrom .. import __version__\n\nfrom ..platformflags import is_win32, is_linux, is_freebsd, is_darwin\nfrom ..logger import create_logger\nlogger = cr...
[ { "content": "import contextlib\nimport os\nimport os.path\nimport re\nimport shlex\nimport signal\nimport subprocess\nimport sys\nimport time\nimport traceback\n\nfrom .. import __version__\n\nfrom ..platformflags import is_win32, is_linux, is_freebsd, is_darwin\nfrom ..logger import create_logger\nlogger = cr...
diff --git a/src/borg/helpers/process.py b/src/borg/helpers/process.py index 7af8d5fcb4..0cedcb7b70 100644 --- a/src/borg/helpers/process.py +++ b/src/borg/helpers/process.py @@ -332,7 +332,8 @@ def create_filter_process(cmd, stream, stream_close, inbound=True): except Exception: # something went wrong wi...
akvo__akvo-rsr-1893
Only display the first 5 narrative updates on the project summary page ## Test plan GIVEN the summary page of the project WHEN a project has more than 5 narrative updates THEN only the first 5 should be shown on the summary page
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nAkvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please see\n< http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nAkvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please see\n< http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\...
diff --git a/akvo/rsr/views/project.py b/akvo/rsr/views/project.py index 3d5b4af025..c2f699b79f 100644 --- a/akvo/rsr/views/project.py +++ b/akvo/rsr/views/project.py @@ -344,7 +344,7 @@ def main(request, project_id): 'pledged': project.get_pledged(), 'project': project, 'project_admin': proj...
cookiecutter__cookiecutter-1526
Enforce the minimal coverage to 100%
[ { "content": "\"\"\"Helper functions used throughout Cookiecutter.\"\"\"\nimport contextlib\nimport errno\nimport logging\nimport os\nimport shutil\nimport stat\nimport sys\n\nfrom cookiecutter.prompt import read_user_yes_no\n\nlogger = logging.getLogger(__name__)\n\n\ndef force_delete(func, path, exc_info):\n ...
[ { "content": "\"\"\"Helper functions used throughout Cookiecutter.\"\"\"\nimport contextlib\nimport errno\nimport logging\nimport os\nimport shutil\nimport stat\nimport sys\n\nfrom cookiecutter.prompt import read_user_yes_no\n\nlogger = logging.getLogger(__name__)\n\n\ndef force_delete(func, path, exc_info):\n ...
diff --git a/cookiecutter/utils.py b/cookiecutter/utils.py index 5935a249c..19b727a52 100644 --- a/cookiecutter/utils.py +++ b/cookiecutter/utils.py @@ -16,7 +16,7 @@ def force_delete(func, path, exc_info): """Error handler for `shutil.rmtree()` equivalent to `rm -rf`. Usage: `shutil.rmtree(path, onerror=fo...
huggingface__diffusers-5854
Using pretrained MusicLDM pipeline ### Describe the bug Hello, in diffusers docs, MusicLDM is used as follow: ```python from diffusers import MusicLDMPipeline import torch import scipy repo_id = "cvssp/audioldm-s-full-v2" pipe = MusicLDMPipeline.from_pretrained(repo_id, torch_dtype=torch.float16) pipe = pipe....
[ { "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/pipelines/musicldm/pipeline_musicldm.py b/src/diffusers/pipelines/musicldm/pipeline_musicldm.py index 9e6b6fea13e5..68af3925fa02 100644 --- a/src/diffusers/pipelines/musicldm/pipeline_musicldm.py +++ b/src/diffusers/pipelines/musicldm/pipeline_musicldm.py @@ -51,7 +51,7 @@ >>> import...
ESMCI__cime-3863
nuopc run complete message location In commit b9d7b65fd case_run.py was changed to look for the run completed message in drv.log instead of in med.log for nuopc runs, however the system_tests_common.py was not changed to correspond. PR incoming. @mvertens @uturuncoglu
[ { "content": "\"\"\"\nCIME restart upon failed node test.\n\"\"\"\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.SystemTests.ers import ERS\nfrom CIME.utils import get_model\n\nlogger = logging.getLogger(__name__)\n\nclass NODEFAIL(ERS):\n\n def __init__(self, case):\n \"\"\"\n initia...
[ { "content": "\"\"\"\nCIME restart upon failed node test.\n\"\"\"\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.SystemTests.ers import ERS\nfrom CIME.utils import get_model\n\nlogger = logging.getLogger(__name__)\n\nclass NODEFAIL(ERS):\n\n def __init__(self, case):\n \"\"\"\n initia...
diff --git a/scripts/lib/CIME/SystemTests/nodefail.py b/scripts/lib/CIME/SystemTests/nodefail.py index 5706ffd2e39..e040b564225 100644 --- a/scripts/lib/CIME/SystemTests/nodefail.py +++ b/scripts/lib/CIME/SystemTests/nodefail.py @@ -24,7 +24,7 @@ def _restart_fake_phase(self): exeroot = self._case.get_value("E...
interlegis__sapl-2174
Norma Jurídica - Detalhe Nos detalhes da norma jurídica, no que seria o título da norma, não aparece mais o nome da norma. Antes aparecia "Decreto Legislativo nº ....." ![image](https://user-images.githubusercontent.com/13314947/44723262-e39f6500-aaa5-11e8-9024-02c10e26c0b5.png) Norma Jurídica - Detalhe Nos detal...
[ { "content": "from django.contrib.contenttypes.fields import GenericRelation\nfrom django.db import models\nfrom django.template import defaultfilters\nfrom django.utils.translation import ugettext_lazy as _\nfrom model_utils import Choices\nimport reversion\n\nfrom sapl.compilacao.models import TextoArticulado...
[ { "content": "from django.contrib.contenttypes.fields import GenericRelation\nfrom django.db import models\nfrom django.template import defaultfilters\nfrom django.utils.translation import ugettext_lazy as _\nfrom model_utils import Choices\nimport reversion\n\nfrom sapl.compilacao.models import TextoArticulado...
diff --git a/sapl/norma/models.py b/sapl/norma/models.py index c011b174e..5e34214a1 100644 --- a/sapl/norma/models.py +++ b/sapl/norma/models.py @@ -147,7 +147,8 @@ def get_anexos_norma_juridica(self): return anexos def __str__(self): - return _('nº %(numero)s de %(data)s') % { + return _(...
OpenNMT__OpenNMT-py-1423
Gold score computation bug The current gold score computation has an off-by-one error. The current code gathers the logps of tgt_in = tgt[:-1], but it should be tgt[1:]. This is because tgt[:-1] is the input to the LSTM (i.e. [START] + words, without an [END] token) and tgt[1:] is the output from the LSTM (i.e. no star...
[ { "content": "#!/usr/bin/env python\n\"\"\" Translator Class and builder \"\"\"\nfrom __future__ import print_function\nimport codecs\nimport os\nimport math\nimport time\nfrom itertools import count\n\nimport torch\n\nimport onmt.model_builder\nimport onmt.translate.beam\nimport onmt.inputters as inputters\nim...
[ { "content": "#!/usr/bin/env python\n\"\"\" Translator Class and builder \"\"\"\nfrom __future__ import print_function\nimport codecs\nimport os\nimport math\nimport time\nfrom itertools import count\n\nimport torch\n\nimport onmt.model_builder\nimport onmt.translate.beam\nimport onmt.inputters as inputters\nim...
diff --git a/onmt/translate/translator.py b/onmt/translate/translator.py index 4aaa630464..0b225dda72 100644 --- a/onmt/translate/translator.py +++ b/onmt/translate/translator.py @@ -806,7 +806,7 @@ def _score_target(self, batch, memory_bank, src_lengths, memory_lengths=src_lengths, src_map=src_map) ...
wagtail__wagtail-10939
Getting a "cannot pickle" error in Wagtail 5.1 when when using a custom image model <!-- Found a bug? Please fill out the sections below. 👍 --> ### Issue Summary I recently upgraded four small sites to Wagtail 5.1. None of these sites have ever used caching, and each site uses a custom image model. On all bu...
[ { "content": "from django.db import models\nfrom django.utils.functional import cached_property\nfrom django.utils.translation import gettext as _\n\nfrom wagtail.coreutils import InvokeViaAttributeShortcut\nfrom wagtail.models import Site\n\nfrom .registry import register_setting\n\n__all__ = [\n \"BaseGene...
[ { "content": "from django.db import models\nfrom django.utils.functional import cached_property\nfrom django.utils.translation import gettext as _\n\nfrom wagtail.coreutils import InvokeViaAttributeShortcut\nfrom wagtail.models import Site\n\nfrom .registry import register_setting\n\n__all__ = [\n \"BaseGene...
diff --git a/wagtail/contrib/settings/models.py b/wagtail/contrib/settings/models.py index 71ed4f2b932e..075021db9aa6 100644 --- a/wagtail/contrib/settings/models.py +++ b/wagtail/contrib/settings/models.py @@ -131,6 +131,12 @@ def for_request(cls, request): setattr(request, attr_name, site_settings) ...
Lightning-AI__torchmetrics-476
User Warning thrown when calling AveragePrecision ## 🐛 Bug Using the AveragePrecision metric throws the following warning every time it is called: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather tha...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/torchmetrics/functional/classification/precision_recall_curve.py b/torchmetrics/functional/classification/precision_recall_curve.py index 72489e44f92..cfdda58b5b6 100644 --- a/torchmetrics/functional/classification/precision_recall_curve.py +++ b/torchmetrics/functional/classification/precision_recall_curv...
strawberry-graphql__strawberry-858
from_pydantic() converts False values to None When calling `from_pydantic()`, values consistent with `bool(value) == False` may be replaced with None. This recreates the issue: ``` from pydantic import BaseModel import strawberry class PydanticClass(BaseModel): str1: str str2: str bool1: bool ...
[ { "content": "from typing import cast\n\nfrom strawberry.field import StrawberryField\nfrom strawberry.scalars import is_scalar\n\n\ndef _convert_from_pydantic_to_strawberry_field(\n field: StrawberryField, data_from_model=None, extra=None\n):\n data = data_from_model or extra\n\n if field.is_list:\n ...
[ { "content": "from typing import cast\n\nfrom strawberry.field import StrawberryField\nfrom strawberry.scalars import is_scalar\n\n\ndef _convert_from_pydantic_to_strawberry_field(\n field: StrawberryField, data_from_model=None, extra=None\n):\n data = data_from_model if data_from_model is not None else e...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..ae8983ae89 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: patch + +Fix converting pydantic objects to strawberry types using `from_pydantic` when having a falsy value like 0 or ''. diff --git a/strawberry/experimental/pydantic/co...
ManimCommunity__manim-646
The config value `html_favicon' has type `PosixPath'; expected `str'. BTW when building the docs now I get ``` WARNING: The config value `html_favicon' has type `PosixPath'; expected `str'. ``` _Originally posted by @leotrs in https://github.com/ManimCommunity/manim/pull/631#issuecomment-719075737_
[ { "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------...
[ { "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------...
diff --git a/docs/source/conf.py b/docs/source/conf.py index d815548824..be0a98777c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -80,7 +80,7 @@ html_theme_path = guzzle_sphinx_theme.html_theme_path() html_theme = "guzzle_sphinx_theme" -html_favicon = Path("_static/favicon.ico") +html_favicon = str(...
readthedocs__readthedocs.org-1530
Social Network Login Failure When clicking on connect GitHub on the [social accounts page](https://readthedocs.org/accounts/social/connections/?) I get a message: > An error occurred while attempting to login via your social network account. There's a `?` in the url. Could that be a hint? Is it missing some request a...
[ { "content": "import os\n\nfrom .base import * # noqa\n\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'docs',\n 'USER': 'postgres', # Not used with sqlite3.\n 'PASSWORD': '',\n 'HOST': '10.177.73.97',\n 'PORT': '',\...
[ { "content": "import os\n\nfrom .base import * # noqa\n\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'docs',\n 'USER': 'postgres', # Not used with sqlite3.\n 'PASSWORD': '',\n 'HOST': '10.177.73.97',\n 'PORT': '',\...
diff --git a/readthedocs/settings/postgres.py b/readthedocs/settings/postgres.py index 2086b4fd423..788743d142a 100644 --- a/readthedocs/settings/postgres.py +++ b/readthedocs/settings/postgres.py @@ -69,6 +69,9 @@ 'github': {'SCOPE': ['user:email', 'read:org', 'admin:repo_hook', 'repo:status']} } +# allauth se...
speechbrain__speechbrain-1052
Installation into user site directory with editable source fails Currently, the installation of speechbrain fails for a user site directory with an editable source if the user does not have write access to the base-Python site-packages directory. Both the problem and the solution are also described in https://github.c...
[ { "content": "#!/usr/bin/env python3\nimport os\nimport setuptools\nfrom distutils.core import setup\n\nwith open(\"README.md\") as f:\n long_description = f.read()\n\nwith open(os.path.join(\"speechbrain\", \"version.txt\")) as f:\n version = f.read().strip()\n\nsetup(\n name=\"speechbrain\",\n ver...
[ { "content": "#!/usr/bin/env python3\nimport os\nimport sys\nimport site\nimport setuptools\nfrom distutils.core import setup\n\n\n# Editable install in user site directory can be allowed with this hack:\n# https://github.com/pypa/pip/issues/7953.\nsite.ENABLE_USER_SITE = \"--user\" in sys.argv[1:]\n\nwith open...
diff --git a/setup.py b/setup.py index 3a32fc315b..4edd81208c 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,15 @@ #!/usr/bin/env python3 import os +import sys +import site import setuptools from distutils.core import setup + +# Editable install in user site directory can be allowed with this hack: +# https://gi...
mozmeao__snippets-service-1002
Filter by targets used in snippet list view
[ { "content": "import re\n\nfrom django.contrib import admin, messages\nfrom django.db import transaction\nfrom django.db.models import TextField, Q\nfrom django.template.loader import get_template\nfrom django.utils.safestring import mark_safe\n\nfrom reversion.admin import VersionAdmin\nfrom django_ace import ...
[ { "content": "import re\n\nfrom django.contrib import admin, messages\nfrom django.db import transaction\nfrom django.db.models import TextField, Q\nfrom django.template.loader import get_template\nfrom django.utils.safestring import mark_safe\n\nfrom reversion.admin import VersionAdmin\nfrom django_ace import ...
diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py index 755fb257b..296bf51db 100644 --- a/snippets/base/admin/adminmodels.py +++ b/snippets/base/admin/adminmodels.py @@ -453,6 +453,7 @@ class ASRSnippetAdmin(admin.ModelAdmin): filters.ModifiedFilter, filters.Template...
plone__Products.CMFPlone-1068
mail controlpanel: doesn't keep password field Saving the mail settings in the controlpanel doesn't keep the password field value, as it is obviously never shown in ESMTP password. Steps to reproduce: 1. Fill in ESMTP username and ESMTP password. Save settings. They are correctly stored. 2. Apply save settings again. ...
[ { "content": "from Products.CMFCore.utils import getToolByName\nfrom Products.CMFPlone import PloneMessageFactory as _\nfrom Products.CMFPlone.interfaces.controlpanel import IMailSchema\nfrom Products.MailHost.MailHost import MailHostError\nfrom Products.statusmessages.interfaces import IStatusMessage\nfrom log...
[ { "content": "from Products.CMFCore.utils import getToolByName\nfrom Products.CMFPlone import PloneMessageFactory as _\nfrom Products.CMFPlone.interfaces.controlpanel import IMailSchema\nfrom Products.MailHost.MailHost import MailHostError\nfrom Products.statusmessages.interfaces import IStatusMessage\nfrom log...
diff --git a/CHANGES.rst b/CHANGES.rst index 6d23a48a2f..aafa3bfc51 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,9 @@ Changelog 5.0rc4 (unreleased) ------------------- +- Fix mail controlpanel not keeping password field when saving + [allusa] + - Remove trying to install plone.protect to global site mana...
pytorch__TensorRT-1863
🐛 [Bug] Encountered bug when using `torch.ops.aten.cat` converter ## Bug Description When compiling the [T5-Base Model](https://huggingface.co/t5-base) model via the `aten` path, the following error is encountered: ``` IndexError: tuple index out of range While executing %cat_default : [#users=1] = call_funct...
[ { "content": "# flake8: noqa\nimport logging\nimport math\nimport operator\nimport warnings\nfrom typing import cast, Dict, Optional, Sequence, Tuple, Union\n\nimport numpy as np\n\n# @manual=//deeplearning/trt/python:py_tensorrt\nimport tensorrt as trt\nimport torch\nfrom torch_tensorrt.fx.converters import ac...
[ { "content": "# flake8: noqa\nimport logging\nimport math\nimport operator\nimport warnings\nfrom typing import cast, Dict, Optional, Sequence, Tuple, Union\n\nimport numpy as np\n\n# @manual=//deeplearning/trt/python:py_tensorrt\nimport tensorrt as trt\nimport torch\nfrom torch_tensorrt.fx.converters import ac...
diff --git a/py/torch_tensorrt/fx/converters/aten_ops_converters.py b/py/torch_tensorrt/fx/converters/aten_ops_converters.py index c86f2bd228..e8efc30ddf 100644 --- a/py/torch_tensorrt/fx/converters/aten_ops_converters.py +++ b/py/torch_tensorrt/fx/converters/aten_ops_converters.py @@ -358,7 +358,7 @@ def aten_ops_cat(...
sosreport__sos-3193
URL for commercial support seems wrong Just noticed that the vendor URL for commercial support is not working. Looks like the leading `www.` should be removed: https://github.com/sosreport/sos/blob/31b991ef2b51856264c911018eddea8dd55b5718/sos/policies/distros/redhat.py#L41 ``` % curl https://www.access.redhat.co...
[ { "content": "# Copyright (C) Steve Conklin <sconklin@redhat.com>\n\n# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of\n# version 2 of the...
[ { "content": "# Copyright (C) Steve Conklin <sconklin@redhat.com>\n\n# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of\n# version 2 of the...
diff --git a/sos/policies/distros/redhat.py b/sos/policies/distros/redhat.py index b02817de3f..907c4c1f4c 100644 --- a/sos/policies/distros/redhat.py +++ b/sos/policies/distros/redhat.py @@ -38,7 +38,7 @@ class RedHatPolicy(LinuxPolicy): vendor = "Red Hat" vendor_urls = [ ('Distribution Website', 'ht...
hylang__hy-1403
Exception in __repr__ crashes repl ```Python => (defclass BadRepr[] (defn __repr__ [self] (/ 0))) class BadRepr: def __repr__(self): return (1 / 0) None => (BadRepr) BadRepr() Traceback (most recent call last): File "C:\Users\ME\workspace\hy36-gilch\Scripts\hy-script.py", line 11, in <module> ...
[ { "content": "# Copyright 2017 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\n\nfrom __future__ import print_function\n\nimport argparse\nimport code\nimport ast\nimport sys\nimport os\nimport importlib\n\nimport astor.codegen\n\nimport hy\...
[ { "content": "# Copyright 2017 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\n\nfrom __future__ import print_function\n\nimport argparse\nimport code\nimport ast\nimport sys\nimport os\nimport importlib\n\nimport astor.codegen\n\nimport hy\...
diff --git a/NEWS b/NEWS index 468d884a5..3e23f6686 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,7 @@ Changes from 0.13.0 * Fixed a crash when `macroexpand`ing a macro with a named import * Fixed a crash when `with` suppresses an exception. `with` now returns `None` in this case. + * Fixed a crash when --r...
saleor__saleor-1832
Localization of duplicate email account doesn't make sense I saw this weird thing in post production when I was creating a customer account that was already registered. ![](https://i.imgur.com/DIT6uHC.png) ![](https://i.imgur.com/SXlwkvt.png) --- Edit: note, the untranslated string is ` User with this Email...
[ { "content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import forms as django_forms, update_session_auth_hash\nfrom django.utils.translation import pgettext, pgettext_lazy\nfrom phonenumbers.phonenumberutil import country_code_for_region\n\nfrom ..account.models impor...
[ { "content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import forms as django_forms, update_session_auth_hash\nfrom django.utils.translation import pgettext, pgettext_lazy\nfrom phonenumbers.phonenumberutil import country_code_for_region\n\nfrom ..account.models impor...
diff --git a/saleor/account/forms.py b/saleor/account/forms.py index 925c7c6cee1..4b45a4aa8df 100644 --- a/saleor/account/forms.py +++ b/saleor/account/forms.py @@ -70,6 +70,11 @@ def __init__(self, request=None, *args, **kwargs): class SignupForm(forms.ModelForm): password = forms.CharField( widget=form...
vega__altair-692
Two renderers with same name Working with a fresh Anaconda installation of Jupyter 3.6. Followed Altair Notebook installation instructions. Basic example (flower petals scatter plot) rendered but with JSON underneath graph (issue #634). I thought this might be due to having selected the wrong renderer., so I went to...
[ { "content": "from typing import Callable, Generic, List, TypeVar, Union, cast\n\nimport entrypoints\n\n\nPluginType = TypeVar('PluginType')\n\n\nclass PluginRegistry(Generic[PluginType]):\n \"\"\"A registry for plugins.\n\n This is a plugin registry that allows plugins to be loaded/registered\n in two...
[ { "content": "from typing import Callable, Generic, List, TypeVar, Union, cast\n\nimport entrypoints\n\n\nPluginType = TypeVar('PluginType')\n\n\nclass PluginRegistry(Generic[PluginType]):\n \"\"\"A registry for plugins.\n\n This is a plugin registry that allows plugins to be loaded/registered\n in two...
diff --git a/altair/utils/plugin_registry.py b/altair/utils/plugin_registry.py index 594e9a480..3b370a971 100644 --- a/altair/utils/plugin_registry.py +++ b/altair/utils/plugin_registry.py @@ -75,7 +75,7 @@ def names(self) -> List[str]: exts = list(self._plugins.keys()) more_exts = [ep.name for ep in ...
jazzband__pip-tools-1039
setup.py install_requires should have `"click>=7"` not `"click>=6"` Thank you for all the work on this tool, it's very useful. Issue: As of 4.4.0 pip-tools now depends on version 7.0 of click, not 6.0. The argument `show_envvar` is now being passed to `click.option()` https://github.com/jazzband/pip-tools/compa...
[ { "content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nfrom os.path import abspath, dirname, join\n\nfrom setuptools import find_packages, setup\n\n\ndef read_file(filename):\n \"\"\"Read the contents of a file located relative to setup.py\"\"\"\n with open(join(abspath(dirname(__f...
[ { "content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nfrom os.path import abspath, dirname, join\n\nfrom setuptools import find_packages, setup\n\n\ndef read_file(filename):\n \"\"\"Read the contents of a file located relative to setup.py\"\"\"\n with open(join(abspath(dirname(__f...
diff --git a/setup.py b/setup.py index 77f7e4cab..6bdf433e1 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def read_file(filename): package_data={}, python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", setup_requires=["setuptools_scm"], - install_requires=["click>=6", "six"], ...
translate__pootle-6497
Top scorers list includes zero score users The top scorer list in e.g. `/af/?details` includes a number of users with zero score. I'm doubtful that these contributed in last 30 days. So they shouldn't be on the list at all. ![screen shot 2017-05-17 at 10 37 08](https://cloud.githubusercontent.com/assets/647438/2...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom datetime ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom datetime ...
diff --git a/pootle/apps/pootle_score/utils.py b/pootle/apps/pootle_score/utils.py index 4c78021aac9..046d85a4d4f 100644 --- a/pootle/apps/pootle_score/utils.py +++ b/pootle/apps/pootle_score/utils.py @@ -78,7 +78,8 @@ def get_top_scorers(self, days=30): Sum("score"), Sum("suggested"),...
psf__black-2791
Black specifies a requirement for click>=7.1.2 but actually requires click>=8.0 **Describe the bug** Installing `black` from the head of the `main` branch and `click<8.0` results in a stack trace whenever the tool is run. **To Reproduce** ```bash python3 -m venv black-click-compat-bug source black-click-comp...
[ { "content": "# Copyright (C) 2020 Łukasz Langa\nfrom setuptools import setup, find_packages\nimport sys\nimport os\n\nassert sys.version_info >= (3, 6, 2), \"black requires Python 3.6.2+\"\nfrom pathlib import Path # noqa E402\nfrom typing import List # noqa: E402\n\nCURRENT_DIR = Path(__file__).parent\nsys....
[ { "content": "# Copyright (C) 2020 Łukasz Langa\nfrom setuptools import setup, find_packages\nimport sys\nimport os\n\nassert sys.version_info >= (3, 6, 2), \"black requires Python 3.6.2+\"\nfrom pathlib import Path # noqa E402\nfrom typing import List # noqa: E402\n\nCURRENT_DIR = Path(__file__).parent\nsys....
diff --git a/CHANGES.md b/CHANGES.md index a2e5c0a4ff8..83117e65dc4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -39,6 +39,7 @@ - All upper version bounds on dependencies have been removed (#2718) - `typing-extensions` is no longer a required dependency in Python 3.10+ (#2772) +- Set `click` lower bound to `8.0.0` (...
aio-libs__aiohttp-2657
Adding routes to subapps is broken after attaching subapp to the parent app ## Long story short If one adds routes to subapp before `app.add_subapp` accessing them works well, otherwise it results in 404. ## Expected behaviour It's naturally expected that routing will work well regardless of the order of funct...
[ { "content": "import asyncio\nimport warnings\nfrom collections import MutableMapping\nfrom functools import partial\n\nfrom . import hdrs\nfrom .abc import AbstractAccessLogger, AbstractMatchInfo, AbstractRouter\nfrom .frozenlist import FrozenList\nfrom .helpers import AccessLogger\nfrom .log import web_logger...
[ { "content": "import asyncio\nimport warnings\nfrom collections import MutableMapping\nfrom functools import partial\n\nfrom . import hdrs\nfrom .abc import AbstractAccessLogger, AbstractMatchInfo, AbstractRouter\nfrom .frozenlist import FrozenList\nfrom .helpers import AccessLogger\nfrom .log import web_logger...
diff --git a/CHANGES/2656.bugfix b/CHANGES/2656.bugfix new file mode 100644 index 00000000000..93e054deede --- /dev/null +++ b/CHANGES/2656.bugfix @@ -0,0 +1 @@ +Freeze sub-application on adding to parent app \ No newline at end of file diff --git a/aiohttp/web_app.py b/aiohttp/web_app.py index 944316e93bd..76428d8b54c...
pypa__setuptools-2770
[BUG] Should fail hard when installing packages that want 2to3 ### setuptools version setuptools==58.0.0 ### Python version Python 3.9 ### OS Linux ### Additional environment information _No response_ ### Description Tried to install a package that uses 2to3 (specifically https://pypi.org/pro...
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nimport distutils.command\nfrom distutils.util import strtobool\nfrom distut...
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nimport distutils.command\nfrom distutils.util import strtobool\nfrom distut...
diff --git a/changelog.d/2769.misc.rst b/changelog.d/2769.misc.rst new file mode 100644 index 0000000000..503b4208a9 --- /dev/null +++ b/changelog.d/2769.misc.rst @@ -0,0 +1 @@ +Build now fails fast when ``use_2to3`` is supplied. diff --git a/setup.cfg b/setup.cfg index 30817c00e6..859bf7283b 100644 --- a/setup.cfg +++...
Pyomo__pyomo-3234
SCIPAMPL failing to read solving time from log file ## Summary From the code seems that SCIPAMPL expects a single float as the solving time like '43.98', however it got a bigger string like '43.98 (over 1 runs: 43.98)' ### Traceback ```python File venv/lib/python3.10/site-packages/pyomo/opt/base/solvers.py:636...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2024\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2024\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n...
diff --git a/pyomo/solvers/plugins/solvers/SCIPAMPL.py b/pyomo/solvers/plugins/solvers/SCIPAMPL.py index fd69954b428..966fb1e1a1d 100644 --- a/pyomo/solvers/plugins/solvers/SCIPAMPL.py +++ b/pyomo/solvers/plugins/solvers/SCIPAMPL.py @@ -455,7 +455,7 @@ def read_scip_log(filename: str): solver_status = scip_lin...
cookiecutter__cookiecutter-578
Cookiecutter needs to always use utf-8 for writing files I get this on Windows (pitty me): ``` File "c:\program files\python 3.5\lib\site-packages\cookiecutter\generate.py", line 318, in generate_files run_hook('post_gen_project', project_dir, context) File "c:\program files\python 3.5\lib\site-packages\cookie...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.hooks\n------------------\n\nFunctions for discovering and executing various cookiecutter hooks.\n\"\"\"\n\nimport io\nimport logging\nimport os\nimport subprocess\nimport sys\nimport tempfile\n\nfrom jinja2 import Template\n\n...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.hooks\n------------------\n\nFunctions for discovering and executing various cookiecutter hooks.\n\"\"\"\n\nimport io\nimport logging\nimport os\nimport subprocess\nimport sys\nimport tempfile\n\nfrom jinja2 import Template\n\n...
diff --git a/cookiecutter/hooks.py b/cookiecutter/hooks.py index 81045d1e4..254bc2e7a 100755 --- a/cookiecutter/hooks.py +++ b/cookiecutter/hooks.py @@ -90,10 +90,11 @@ def run_script_with_context(script_path, cwd, context): with tempfile.NamedTemporaryFile( delete=False, - mode='w', + mod...
encode__uvicorn-296
Deploying inside a process manager: must account for inherited socket family and type Hi, I get an error when trying to run uvicorn with Circus, but only if using a socket with file descriptor (which I'd like to do to increase the number of processes). circus.ini: ``` [socket:web] host = 0.0.0.0 port = 80 [w...
[ { "content": "import asyncio\nimport functools\nimport os\nimport signal\nimport sys\nimport time\nfrom email.utils import formatdate\n\nimport click\n\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n LIFESPAN,\n LOG_LEVELS,\n LOOP_SETUPS,\n WS_PROTOCOLS,\n Config,\n get_logger,\n)\nfrom u...
[ { "content": "import asyncio\nimport functools\nimport os\nimport signal\nimport socket\nimport sys\nimport time\nfrom email.utils import formatdate\n\nimport click\n\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n LIFESPAN,\n LOG_LEVELS,\n LOOP_SETUPS,\n WS_PROTOCOLS,\n Config,\n get_log...
diff --git a/uvicorn/__init__.py b/uvicorn/__init__.py index 0bb1d316e..924c3c16c 100644 --- a/uvicorn/__init__.py +++ b/uvicorn/__init__.py @@ -1,4 +1,4 @@ from uvicorn.main import main, run -__version__ = "0.4.1" +__version__ = "0.4.2" __all__ = ["main", "run"] diff --git a/uvicorn/main.py b/uvicorn/main.py index...
jupyterhub__zero-to-jupyterhub-k8s-882
Annotations on single user notebook I'm trying to add an annotation to all notebooks which are created, however I can't seem to find where to configure this in the chart config. The hub, proxy and ingress all have annotation options, but the singleuser section doesn't. Am I missing something or has this not been imp...
[ { "content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\nfrom jupyterhub.utils import url_path_join\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather...
[ { "content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\nfrom jupyterhub.utils import url_path_join\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather...
diff --git a/images/hub/jupyterhub_config.py b/images/hub/jupyterhub_config.py index 455deb71ef..9458a65cfc 100644 --- a/images/hub/jupyterhub_config.py +++ b/images/hub/jupyterhub_config.py @@ -57,6 +57,8 @@ c.KubeSpawner.events_enabled = get_config('singleuser.events', False) +c.KubeSpawner.extra_annotations = g...
getmoto__moto-2446
STS: Invalid xmlns in response from STS I got error below, when trying to AssumeRole by AWS SDK (for PHP). ``` Error parsing XML: xmlns: 'https:\/\/sts.amazonaws.com\/doc\/ 2011-06-15\/' is not a valid URI ```
[ { "content": "from __future__ import unicode_literals\n\nfrom moto.core.responses import BaseResponse\nfrom moto.iam.models import ACCOUNT_ID\nfrom moto.iam import iam_backend\nfrom .exceptions import STSValidationError\nfrom .models import sts_backend\n\nMAX_FEDERATION_TOKEN_POLICY_LENGTH = 2048\n\n\nclass Tok...
[ { "content": "from __future__ import unicode_literals\n\nfrom moto.core.responses import BaseResponse\nfrom moto.iam.models import ACCOUNT_ID\nfrom moto.iam import iam_backend\nfrom .exceptions import STSValidationError\nfrom .models import sts_backend\n\nMAX_FEDERATION_TOKEN_POLICY_LENGTH = 2048\n\n\nclass Tok...
diff --git a/moto/sts/responses.py b/moto/sts/responses.py index ebdc4321c8bb..496b81682cb4 100644 --- a/moto/sts/responses.py +++ b/moto/sts/responses.py @@ -128,8 +128,7 @@ def get_caller_identity(self): </GetFederationTokenResponse>""" -ASSUME_ROLE_RESPONSE = """<AssumeRoleResponse xmlns="https://sts.amazonaws....
DataBiosphere__toil-4805
FileJobStore's default_caching() result of False is not respected The `FileJobStore` is supposed to be able to set a default of no caching on the workflow: https://github.com/DataBiosphere/toil/blob/e45b27cb3086fc57f35653562357ab9537f45d4e/src/toil/jobStores/fileJobStore.py#L70-L78 But this no longer works. If I run a...
[ { "content": "import os\nfrom argparse import ArgumentParser, Action, _AppendAction\nfrom typing import Any, Optional, Union, Type, Callable, List, Dict, TYPE_CHECKING\n\nfrom configargparse import SUPPRESS\nimport logging\n\nfrom ruamel.yaml import YAML\n\nfrom toil.lib.conversions import bytes2human, human2by...
[ { "content": "import os\nfrom argparse import ArgumentParser, Action, _AppendAction\nfrom typing import Any, Optional, Union, Type, Callable, List, Dict, TYPE_CHECKING\n\nfrom configargparse import SUPPRESS\nimport logging\n\nfrom ruamel.yaml import YAML\n\nfrom toil.lib.conversions import bytes2human, human2by...
diff --git a/src/toil/options/common.py b/src/toil/options/common.py index 61086f3da0..5c041f3be9 100644 --- a/src/toil/options/common.py +++ b/src/toil/options/common.py @@ -733,4 +733,4 @@ def __call__(self, parser: Any, namespace: Any, values: Any, option_string: Any # dest is set to enableCaching to not conf...
ietf-tools__datatracker-4710
ietf links filter overmatches From EKR: ![image](https://user-images.githubusercontent.com/10996692/200128592-07f10f62-6dd3-4130-ae33-0302afd6af4d.png) The agenda parser seems to think that anything matching "RFC<ws>####" is an RFC, even if there is a line break, as in the thing above.
[ { "content": "# Copyright The IETF Trust 2007-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport datetime\nimport re\nfrom urllib.parse import urljoin\n\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.html import escape\nfrom django.template.defaultfilters import tr...
[ { "content": "# Copyright The IETF Trust 2007-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport datetime\nimport re\nfrom urllib.parse import urljoin\n\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.html import escape\nfrom django.template.defaultfilters import tr...
diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index f472f8b038..9c73840b11 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -249,7 +249,7 @@ def urlize_ietf_docs(string, autoescape=None): flags=re.IGNORECASE | re.ASCI...
pallets__click-995
Google App Engine ImportError: No module named msvcrt Because Click was added to [Flask 0.11](http://flask.pocoo.org/docs/0.11/) for the [New Command Line Interface](http://flask.pocoo.org/docs/0.11/cli/), and Click imports the Windows only module [msvcrt](https://docs.python.org/2/library/msvcrt.html), and the [Google...
[ { "content": "import re\nimport io\nimport os\nimport sys\nimport codecs\nfrom weakref import WeakKeyDictionary\n\n\nPY2 = sys.version_info[0] == 2\nWIN = sys.platform.startswith('win')\nCYGWIN = sys.platform.startswith('cygwin')\nDEFAULT_COLUMNS = 80\n\n\n_ansi_re = re.compile(r'\\033\\[((?:\\d|;)*)([a-zA-Z])'...
[ { "content": "import re\nimport io\nimport os\nimport sys\nimport codecs\nfrom weakref import WeakKeyDictionary\n\n\nPY2 = sys.version_info[0] == 2\nCYGWIN = sys.platform.startswith('cygwin')\n# Determine local App Engine environment, per Google's own suggestion\nAPP_ENGINE = ('APPENGINE_RUNTIME' in os.environ ...
diff --git a/click/_compat.py b/click/_compat.py index f15e80205..e8b06a4db 100644 --- a/click/_compat.py +++ b/click/_compat.py @@ -7,8 +7,11 @@ PY2 = sys.version_info[0] == 2 -WIN = sys.platform.startswith('win') CYGWIN = sys.platform.startswith('cygwin') +# Determine local App Engine environment, per Google's ...