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
⌀
comic__grand-challenge.org-1433
Helptext for supported file formats is not up-to-date
[ { "content": "from typing import List\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Submit\nfrom django import forms\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\n\nfrom grandchallenge.cases.models import RawImageFile, RawImageUploadSessi...
[ { "content": "from typing import List\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Submit\nfrom django import forms\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\n\nfrom grandchallenge.cases.models import RawImageFile, RawImageUploadSessi...
diff --git a/app/grandchallenge/cases/forms.py b/app/grandchallenge/cases/forms.py index a581622cf5..a4f1387e53 100644 --- a/app/grandchallenge/cases/forms.py +++ b/app/grandchallenge/cases/forms.py @@ -22,7 +22,10 @@ class UploadRawImagesForm(forms.ModelForm): "The total size of all files uploaded in a si...
microsoft__Qcodes-1735
get_shaped_data_by_runid does not reshape data ### Steps to reproduce 1. use function with qc_run_id corresponding to a 2D dataset 2. print shapes of array and see they are all 1D ### Expected behaviour Expecting 2D np arrays to be returned ### Potential fix datatype_from_setpoints_2d seem to return datatypes...
[ { "content": "from typing import List, Any, Sequence, Tuple, Dict, Union\nimport logging\n\nimport numpy as np\n\nfrom qcodes.dataset.descriptions.param_spec import ParamSpecBase\nfrom qcodes.dataset.sqlite.queries import (get_dependencies, get_dependents,\n get_layout)...
[ { "content": "from typing import List, Any, Sequence, Tuple, Dict, Union\nimport logging\n\nimport numpy as np\n\nfrom qcodes.dataset.descriptions.param_spec import ParamSpecBase\nfrom qcodes.dataset.sqlite.queries import (get_dependencies, get_dependents,\n get_layout)...
diff --git a/qcodes/dataset/data_export.py b/qcodes/dataset/data_export.py index 1b7f70a6130..737319656dc 100644 --- a/qcodes/dataset/data_export.py +++ b/qcodes/dataset/data_export.py @@ -424,7 +424,7 @@ def get_shaped_data_by_runid(run_id: int) -> List: datatype = datatype_from_setpoints_2d(independet[...
nipy__nipype-2828
Incompatibility with networkx>=2 and version conflict with prov dependency ### Summary As far as I can tell nipype isn't compatible with networkx>=2, as running with networkx>=2 raises a "graph change during iteration" error. So perhaps this should be reflected in the install requires of the setup.py (i.e. frozen at...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Defines functionality for pipelined execution of interfaces\n\nThe `Workflow` class provides core functionality for batch proces...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Defines functionality for pipelined execution of interfaces\n\nThe `Workflow` class provides core functionality for batch proces...
diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index 8a3649660f..6c0757bead 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -878,7 +878,7 @@ def _generate_flatgraph(self): if not nx.is_directed_acyclic_graph(self._graph): ...
fedora-infra__bodhi-2461
bugs can't be marked as fixed In https://bodhi.fedoraproject.org/updates/FEDORA-2018-1a6e6196b9 I tried to mark #1580530 as fixed by giving it +1 feedback (directly for that bug). But only generic karma was shown in my [comment](https://bodhi.fedoraproject.org/updates/ansible-2.5.5-2.fc28#comment-800652), not the speci...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright © 2013-2017 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either ve...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright © 2013-2017 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either ve...
diff --git a/bodhi/server/schemas.py b/bodhi/server/schemas.py index 33335de382..590c6480e9 100644 --- a/bodhi/server/schemas.py +++ b/bodhi/server/schemas.py @@ -145,6 +145,11 @@ class TestcaseFeedbacks(colander.SequenceSchema): class SaveCommentSchema(CSRFProtectedSchema, colander.MappingSchema): """An API sche...
bentoml__BentoML-2711
`--reload` is not supported on Windows **Describe the bug** <!--- A clear and concise description of what the bug is. --> In QuickStart guide, calling `bentoml serve --reload` will throw error: ``` NotImplementedError: Streams are not supported on Windows. ``` **To Reproduce** <!-- Steps to reproduce the issue: 1. G...
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nimport json\nimport math\nimport shutil\nimport typing as t\nimport logging\nimport tempfile\nimport contextlib\n\nimport psutil\nfrom simple_di import inject\nfrom simple_di import Provide\n\nfrom bentoml import load\n\nfrom ..utils imp...
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nimport json\nimport math\nimport shutil\nimport typing as t\nimport logging\nimport tempfile\nimport contextlib\n\nimport psutil\nfrom simple_di import inject\nfrom simple_di import Provide\n\nfrom bentoml import load\n\nfrom ..utils imp...
diff --git a/bentoml/_internal/server/__init__.py b/bentoml/_internal/server/__init__.py index 9ea111a9af6..ffa602f94b7 100644 --- a/bentoml/_internal/server/__init__.py +++ b/bentoml/_internal/server/__init__.py @@ -106,12 +106,16 @@ def serve_development( "bentoml_home": bentoml_home, },...
pymedusa__Medusa-10257
uTServer handler - Incorrect labeling with special characters **Describe the bug** I am using uTorrent Server (uTServer) Labels for file destinations as it's intended but when the show is named with special characters such as question mark or a colon these characters are forwarded to Labels and then uTServer is unable...
[ { "content": "# coding=utf-8\n\n\"\"\"uTorrent Client.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\n\nfrom medusa import app\nfrom medusa.clients.torrent.generic import GenericClient\nfrom medusa.helper.exceptions import DownloadC...
[ { "content": "# coding=utf-8\n\n\"\"\"uTorrent Client.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\n\nfrom medusa import app\nfrom medusa.clients.torrent.generic import GenericClient\nfrom medusa.helper.exceptions import DownloadC...
diff --git a/medusa/clients/torrent/utorrent.py b/medusa/clients/torrent/utorrent.py index 8747c511f8..789a9ee7e5 100644 --- a/medusa/clients/torrent/utorrent.py +++ b/medusa/clients/torrent/utorrent.py @@ -133,7 +133,8 @@ def _add_torrent_file(self, result): def _set_torrent_label(self, result): """Sen...
Azure__azure-cli-extensions-1831
Error firewall network-rule create when trying to create a rule in a Firewall Manager ### Describe the bug This happens when trying to add rule to a firewall manager resource: https://docs.microsoft.com/en-us/azure/firewall-manager/overview **Command Name** `az network firewall network-rule create Extension Na...
[ { "content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------...
[ { "content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------...
diff --git a/src/azure-firewall/azext_firewall/custom.py b/src/azure-firewall/azext_firewall/custom.py index f709ae588ce..58aa7d7e802 100644 --- a/src/azure-firewall/azext_firewall/custom.py +++ b/src/azure-firewall/azext_firewall/custom.py @@ -258,7 +258,7 @@ def _upsert_af_rule(cmd, resource_group_name, firewall_name...
saulpw__visidata-1365
vdj variable name issues Hello, I'm using `visidata` version 4f9a1d5e74f6801e3f17bd8c53c734cef4a24150 and I've created a very simple vdj file with a variable in place, but I'm getting an error on playback. ``` $ cat test.vdj #!vd -p {"longname": "open-file", "input": "myfile_{date}.xlsx", "keystrokes": "o"} `...
[ { "content": "#\n# Usage: $0 [<options>] [<input> ...]\n# $0 [<options>] --play <cmdlog> [--batch] [-w <waitsecs>] [-o <output>] [field=value ...]\n\n__version__ = '2.9dev'\n__version_info__ = 'saul.pw/VisiData v' + __version__\n\nfrom copy import copy\nimport os\nimport io\nimport sys\nimport locale\nim...
[ { "content": "#\n# Usage: $0 [<options>] [<input> ...]\n# $0 [<options>] --play <cmdlog> [--batch] [-w <waitsecs>] [-o <output>] [field=value ...]\n\n__version__ = '2.9dev'\n__version_info__ = 'saul.pw/VisiData v' + __version__\n\nfrom copy import copy\nimport os\nimport io\nimport sys\nimport locale\nim...
diff --git a/visidata/main.py b/visidata/main.py index 1a133e293..04f438c69 100755 --- a/visidata/main.py +++ b/visidata/main.py @@ -33,7 +33,11 @@ def eval_vd(logpath, *args, **kwargs): 'Instantiate logpath with args/kwargs replaced and replay all commands.' log = logpath.read_text() if args or kwargs: ...
nautobot__nautobot-877
Migrate user, social auth, and system settings from Django Admin to be first-class citizens in UI/API ### Proposed Functionality Before the launch of Nautobot, there was significant work to migrate functionality from Django Admin into core and create first-class views and APIs for webhooks, custom links, and export...
[ { "content": "from django.conf import settings\nfrom django.contrib.admin import site as admin_site\nfrom taggit.models import Tag\n\n\n# Override default AdminSite attributes so we can avoid creating and\n# registering our own class\nadmin_site.site_header = \"Nautobot Administration\"\nadmin_site.site_title =...
[ { "content": "from django.conf import settings\nfrom django.contrib.admin import site as admin_site\nfrom social_django.models import Association, Nonce, UserSocialAuth\nfrom taggit.models import Tag\n\n\n# Override default AdminSite attributes so we can avoid creating and\n# registering our own class\nadmin_si...
diff --git a/nautobot/core/admin.py b/nautobot/core/admin.py index a1e7a224b21..4b572e5545e 100644 --- a/nautobot/core/admin.py +++ b/nautobot/core/admin.py @@ -1,5 +1,6 @@ from django.conf import settings from django.contrib.admin import site as admin_site +from social_django.models import Association, Nonce, UserSo...
joke2k__faker-121
Tests fail (on Xubuntu 14.04) due to timestamp out of range issue Running the tests fail on my Xubuntu 14.04 virtual machine (32-bit with Python 2.7.6) due to a `ValueError: timestamp out of range for platform time_t` in L246 of `faker/providers/date_time.py`; see below for the output: ``` $ python setup.py test runni...
[ { "content": "from __future__ import unicode_literals\nfrom . import BaseProvider\nimport random\nimport re\nfrom time import time, mktime\nfrom datetime import timedelta\nfrom faker.utils.datetime_safe import date, datetime, real_date, real_datetime\nfrom faker.utils import is_string\n\n\ndef datetime_to_times...
[ { "content": "from __future__ import unicode_literals\nfrom . import BaseProvider\nimport random\nimport re\nfrom time import time, mktime\nfrom datetime import timedelta\nfrom faker.utils.datetime_safe import date, datetime, real_date, real_datetime\nfrom faker.utils import is_string\n\n\ndef datetime_to_times...
diff --git a/faker/providers/date_time.py b/faker/providers/date_time.py index 381c47df5c..576a0bccc9 100644 --- a/faker/providers/date_time.py +++ b/faker/providers/date_time.py @@ -243,7 +243,12 @@ def date_time_ad(cls): :example DateTime('1265-03-22 21:15:52') :return datetime """ - ...
huggingface__trl-1531
a bug which leads to "Cuda: Out of memory" in CPOTrainer (cpo_trainer.py), trl 0.8.1 0.8.2, please fix this bug there is a bug in CPOTrainer. when runing CPOTrainer after runing sevreal steps, the usage of gpu memory increases and it raises the out-of-memory exception. we found that the exception is caused by missing ...
[ { "content": "# CPO Authors: Haoran Xu, Amr Sharaf, Yunmo Chen, Weiting Tan, Lingfeng Shen, Benjamin Van Durme, Kenton Murray, Young Jin Kim\n# Copyright 2024 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...
[ { "content": "# CPO Authors: Haoran Xu, Amr Sharaf, Yunmo Chen, Weiting Tan, Lingfeng Shen, Benjamin Van Durme, Kenton Murray, Young Jin Kim\n# Copyright 2024 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...
diff --git a/trl/trainer/cpo_trainer.py b/trl/trainer/cpo_trainer.py index 8525f0046b..04e2cf2c9b 100644 --- a/trl/trainer/cpo_trainer.py +++ b/trl/trainer/cpo_trainer.py @@ -738,7 +738,7 @@ def get_batch_loss_metrics( metrics[f"{prefix}logps/chosen"] = policy_chosen_logps.detach().mean().cpu() metric...
encode__django-rest-framework-7105
OpenAPI schema generation does not handle callable defaults ## Checklist - [x] I have verified that that issue exists against the `master` branch of Django REST framework. - [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate. - [x] This is not a usage question. (Thos...
[ { "content": "import warnings\nfrom operator import attrgetter\nfrom urllib.parse import urljoin\n\nfrom django.core.validators import (\n DecimalValidator, EmailValidator, MaxLengthValidator, MaxValueValidator,\n MinLengthValidator, MinValueValidator, RegexValidator, URLValidator\n)\nfrom django.db impor...
[ { "content": "import warnings\nfrom operator import attrgetter\nfrom urllib.parse import urljoin\n\nfrom django.core.validators import (\n DecimalValidator, EmailValidator, MaxLengthValidator, MaxValueValidator,\n MinLengthValidator, MinValueValidator, RegexValidator, URLValidator\n)\nfrom django.db impor...
diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index 134df50434..fe688facc6 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -393,7 +393,7 @@ def _map_serializer(self, serializer): schema['writeOnly'] = True if fi...
beetbox__beets-4076
lyrics: Crash when BeautifulSoup is not installed ### Problem The Lyrics plugin throws an error/crashes when ran without BeautifulSoup installed. ### Terminal output _I currently can't run a verbose command because Beets is dragging itself through finding lyrics for many many albums._ The following error is dis...
[ { "content": "# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita...
[ { "content": "# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita...
diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index f13db7ad00..2cb50ca5ef 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -757,7 +757,7 @@ def __init__(self): def sanitize_bs_sources(self, sources): enabled_sources = [] for source in sources: - if source.REQUIRE...
searx__searx-1602
Searchengine Wikipedia causes Internal Error 500 when searching for placenames When the searchengine Wikipedia is enabled; I get Internal server errors ("TypeError: encoding without a string argument") when searching for placenames (tested with searchterms 'Amsterdam', 'Singapore', 'Eindhoven' and others). Disabling...
[ { "content": "import csv\nimport hashlib\nimport hmac\nimport os\nimport re\n\nfrom babel.core import get_global\nfrom babel.dates import format_date\nfrom codecs import getincrementalencoder\nfrom imp import load_source\nfrom numbers import Number\nfrom os.path import splitext, join\nfrom io import open\nfrom ...
[ { "content": "import csv\nimport hashlib\nimport hmac\nimport os\nimport re\n\nfrom babel.core import get_global\nfrom babel.dates import format_date\nfrom codecs import getincrementalencoder\nfrom imp import load_source\nfrom numbers import Number\nfrom os.path import splitext, join\nfrom io import open\nfrom ...
diff --git a/searx/utils.py b/searx/utils.py index dfa22c5fc0..6619dd0aee 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -384,10 +384,17 @@ def load_module(filename, module_dir): def new_hmac(secret_key, url): + try: + secret_key_bytes = bytes(secret_key, 'utf-8') + except TypeError as err: + ...
goauthentik__authentik-887
Add support for docker secrets **Is your feature request related to a problem? Please describe.** The environment variables in the docker images don´t support docker secrets. I would like to add `_File` after it, and fill in a path. Something like `/run/secrets/*` From a security standpoint, please add secrets for...
[ { "content": "\"\"\"authentik core config loader\"\"\"\nimport os\nfrom collections.abc import Mapping\nfrom contextlib import contextmanager\nfrom glob import glob\nfrom json import dumps\nfrom time import time\nfrom typing import Any\nfrom urllib.parse import urlparse\n\nimport yaml\nfrom django.conf import I...
[ { "content": "\"\"\"authentik core config loader\"\"\"\nimport os\nfrom collections.abc import Mapping\nfrom contextlib import contextmanager\nfrom glob import glob\nfrom json import dumps\nfrom time import time\nfrom typing import Any\nfrom urllib.parse import urlparse\n\nimport yaml\nfrom django.conf import I...
diff --git a/authentik/lib/config.py b/authentik/lib/config.py index 9980b5dc8e8e..41f51595e35a 100644 --- a/authentik/lib/config.py +++ b/authentik/lib/config.py @@ -88,10 +88,10 @@ def parse_uri(self, value): value = os.getenv(url.netloc, url.query) if url.scheme == "file": try: - ...
aio-libs__aiohttp-4813
Server static handler includes body for HEAD response 🐞 **Describe the bug** When using `web.static` to serve static content, the server responds to HEAD requests as if they were GET requests i.e. it includes a body with the file content. Apart from wasting bandwidth, this completely breaks pipelined connections beca...
[ { "content": "import asyncio\nimport mimetypes\nimport os\nimport pathlib\nfrom functools import partial\nfrom typing import ( # noqa\n IO,\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n List,\n Optional,\n Union,\n cast,\n)\n\nfrom . import hdrs\nfrom .abc import AbstractStreamW...
[ { "content": "import asyncio\nimport mimetypes\nimport os\nimport pathlib\nfrom functools import partial\nfrom typing import ( # noqa\n IO,\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n List,\n Optional,\n Union,\n cast,\n)\n\nfrom . import hdrs\nfrom .abc import AbstractStreamW...
diff --git a/CHANGES/4809.bugfix b/CHANGES/4809.bugfix new file mode 100644 index 00000000000..dd5142fc84b --- /dev/null +++ b/CHANGES/4809.bugfix @@ -0,0 +1 @@ +Fix HEAD requests for static content. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 87088240089..6ea5ea6e860 100644 --- a/CONTRIBUTORS.txt +++ b/CONT...
getpelican__pelican-1967
Reload settings file when not specified Explicitly defining a settings file will be reloaded when using the --autoreload option. Using the default will indicate that the settings file is tracked, but will not reload the file when it is changed.
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport argparse\nimport collections\nimport locale\nimport logging\nimport os\nimport re\nimport sys\nimport time\n\nimport six\n\n# pelican.log has to be the first pelican module to be loaded\n# because logging.se...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport argparse\nimport collections\nimport locale\nimport logging\nimport os\nimport re\nimport sys\nimport time\n\nimport six\n\n# pelican.log has to be the first pelican module to be loaded\n# because logging.se...
diff --git a/pelican/__init__.py b/pelican/__init__.py index 30b3c2f87..f676c33f5 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -277,6 +277,7 @@ def parse_arguments(): '"output" in the current path.') parser.add_argument('-s', '--settings', dest='settings', + ...
freqtrade__freqtrade-4932
current_profit in custom_sell and custom_stoploss does not align with backtest sell value Since we discussed this in Discord I am skipping the usual bits of information and just opening this for tracking purposes. Currently the "current_rate" and "current_profit" parameters fed into the custom_sell and custom_stoplo...
[ { "content": "\"\"\"\nIStrategy interface\nThis module defines the interface to apply for strategies\n\"\"\"\nimport logging\nimport warnings\nfrom abc import ABC, abstractmethod\nfrom datetime import datetime, timedelta, timezone\nfrom enum import Enum\nfrom typing import Dict, List, Optional, Tuple, Union\n\n...
[ { "content": "\"\"\"\nIStrategy interface\nThis module defines the interface to apply for strategies\n\"\"\"\nimport logging\nimport warnings\nfrom abc import ABC, abstractmethod\nfrom datetime import datetime, timedelta, timezone\nfrom enum import Enum\nfrom typing import Dict, List, Optional, Tuple, Union\n\n...
diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 7483abf6d70..e2cde52eb4b 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -573,6 +573,10 @@ def should_sell(self, trade: Trade, rate: float, date: datetime, buy: bool, sell_signal = SellT...
freqtrade__freqtrade-1801
Kraken Read timed out ## Step 1: Have you search for this issue before posting it? After running the bot in dry-run mode for an hour there was a fatal exception due to a read timeout with using the Kraken api. ## Step 2: Describe your environment * Python Version: 3.7.3 (`python -V`) * CCXT version: 1.18....
[ { "content": "# pragma pylint: disable=W0603\n\"\"\"\nCryptocurrency Exchanges support\n\"\"\"\nimport logging\nimport inspect\nfrom random import randint\nfrom typing import List, Dict, Tuple, Any, Optional\nfrom datetime import datetime\nfrom math import floor, ceil\n\nimport arrow\nimport asyncio\nimport ccx...
[ { "content": "# pragma pylint: disable=W0603\n\"\"\"\nCryptocurrency Exchanges support\n\"\"\"\nimport logging\nimport inspect\nfrom random import randint\nfrom typing import List, Dict, Tuple, Any, Optional\nfrom datetime import datetime\nfrom math import floor, ceil\n\nimport arrow\nimport asyncio\nimport ccx...
diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 94673fdc344..66857a7a576 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -222,8 +222,11 @@ def _reload_markets(self) -> None: > arrow.utcnow().timestamp): return None ...
goauthentik__authentik-8938
Authentik sending email to nobody **Describe the bug** Authentik attempted to send email to zero email addresses (To field is blank) **To Reproduce** These aren't 100% confirmed but this is what my situation was: 1. Turn off worker 2. Capture oauth authorization URL and change the redirect URL to something inv...
[ { "content": "\"\"\"authentik events models\"\"\"\n\nimport time\nfrom collections import Counter\nfrom datetime import timedelta\nfrom difflib import get_close_matches\nfrom functools import lru_cache\nfrom inspect import currentframe\nfrom smtplib import SMTPException\nfrom uuid import uuid4\n\nfrom django.ap...
[ { "content": "\"\"\"authentik events models\"\"\"\n\nimport time\nfrom collections import Counter\nfrom datetime import timedelta\nfrom difflib import get_close_matches\nfrom functools import lru_cache\nfrom inspect import currentframe\nfrom smtplib import SMTPException\nfrom uuid import uuid4\n\nfrom django.ap...
diff --git a/authentik/events/models.py b/authentik/events/models.py index 1a01ea737739..c76931f93d21 100644 --- a/authentik/events/models.py +++ b/authentik/events/models.py @@ -452,6 +452,13 @@ def send_webhook_slack(self, notification: "Notification") -> list[str]: def send_email(self, notification: "Notifica...
acl-org__acl-anthology-990
Recaser bug: adding fixed-case inside tex-math markup `<tex-math><fixed-case>O</fixed-case>(<fixed-case>M</fixed-case>(n^2))</tex-math>` caused the build to fail in #892
[ { "content": "#!/usr/bin/env python3\n\n# protect.py <infile> <outfile>\n# looks for file \"truelist\" in current dir\n\n# cd data/xml\n# for i in *xml ; do (cd ../../tools/fixedcase/ ; python3 ./protect.py ../../data/xml/$i /tmp/$i ; echo $i ); done > log\n\n\nimport lxml.etree as ET\nimport os\nimport sys\nim...
[ { "content": "#!/usr/bin/env python3\n\n# protect.py <infile> <outfile>\n# looks for file \"truelist\" in current dir\n\n# cd data/xml\n# for i in *xml ; do (cd ../../tools/fixedcase/ ; python3 ./protect.py ../../data/xml/$i /tmp/$i ; echo $i ); done > log\n\n\nimport lxml.etree as ET\nimport os\nimport sys\nim...
diff --git a/bin/fixedcase/protect.py b/bin/fixedcase/protect.py index 949f7b5e74..ebb2aa04ea 100755 --- a/bin/fixedcase/protect.py +++ b/bin/fixedcase/protect.py @@ -24,7 +24,7 @@ # recursive helper called by protect # protect text of "node", including children, and tails of children def protect_recurse(node, recas...
OpenNMT__OpenNMT-tf-986
"Horovod has been shut down" error when training is finished due to early stopping Hello, I'm training a Transformer model using OpenNMT-tf 2.29.0 with Horovod on a single node with 4 GPUs, but if the training is finished due to early stopping (in the example below, early stopping kicked in at 600k steps but 1M step...
[ { "content": "\"\"\"Training related classes and functions.\"\"\"\n\nimport collections\nimport contextlib\nimport itertools\nimport time\n\nimport tensorflow as tf\n\nfrom opennmt.inputters import text_inputter\nfrom opennmt.optimizers import utils as optimizer_util\nfrom opennmt.utils import misc\n\n\nclass T...
[ { "content": "\"\"\"Training related classes and functions.\"\"\"\n\nimport collections\nimport contextlib\nimport itertools\nimport time\n\nimport tensorflow as tf\n\nfrom opennmt.inputters import text_inputter\nfrom opennmt.optimizers import utils as optimizer_util\nfrom opennmt.utils import misc\n\n\nclass T...
diff --git a/opennmt/training.py b/opennmt/training.py index f3cb9548d..8b835f863 100644 --- a/opennmt/training.py +++ b/opennmt/training.py @@ -346,6 +346,15 @@ def is_master(self): def num_replicas(self): return self._hvd.size() + def _evaluate(self, evaluator, step, moving_average=None): + ...
bokeh__bokeh-1360
bokeh.charts.Bar displays overlapping bars This is pretty minor, but the Bar class makes bar charts with overlapping bars if there are more than 4 values. The widths are currently hardcoded, but it would be nice if they were adjusted based on the data and/or adjustable through a keyword argument, etc. https://github....
[ { "content": "\"\"\"This is the Bokeh charts interface. It gives you a high level API to build\ncomplex plot is a simple way.\n\nThis is the Bar class which lets you build your Bar charts just passing\nthe arguments to the Chart class and calling the proper functions.\nIt also add a new chained stacked method.\...
[ { "content": "\"\"\"This is the Bokeh charts interface. It gives you a high level API to build\ncomplex plot is a simple way.\n\nThis is the Bar class which lets you build your Bar charts just passing\nthe arguments to the Chart class and calling the proper functions.\nIt also add a new chained stacked method.\...
diff --git a/bokeh/charts/bar.py b/bokeh/charts/bar.py index 0438cf31bb9..1f47033da02 100644 --- a/bokeh/charts/bar.py +++ b/bokeh/charts/bar.py @@ -174,7 +174,10 @@ def get_data(self, cat, **value): """ self.cat = cat self.width = [0.8] * len(self.cat) - self.width_cat = [0.2] * len(s...
OCA__social-1068
[15.0] mail_tracking: portal tests fail <!-- Provide a general summary of the issue in the Title above. Before opening the issue, please check that there isn't another issue addressing the same problem already created --> ## Module mail_tracking ## Describe the bug mail_tracking causes TestPortalWizard.test_po...
[ { "content": "# Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n\nimport re\nimport threading\n\nfrom odoo import api, models, tools\n\n\nclass IrMailServer(models.Model):\n _inherit = \"ir.mail_server\"\n\n def _tra...
[ { "content": "# Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n\nimport re\nimport threading\n\nfrom odoo import api, models, tools\n\n\nclass IrMailServer(models.Model):\n _inherit = \"ir.mail_server\"\n\n def _tra...
diff --git a/mail_tracking/models/ir_mail_server.py b/mail_tracking/models/ir_mail_server.py index 9f6be4d935..7d4ce7552d 100644 --- a/mail_tracking/models/ir_mail_server.py +++ b/mail_tracking/models/ir_mail_server.py @@ -45,10 +45,10 @@ def build_email( if tracking_email_id: headers = self._trac...
docker__docker-py-1972
Build context (.tar) is not prepared properly Hey, This morning I've updated to version `3.1.1` however, using this version i'm getting wired error from docker-engine build: ``` ERROR: Error processing tar file(exit status 1): mkdir /foodir/bardir: no such file or directory ``` and the actual building does not s...
[ { "content": "import os\nimport re\n\nfrom ..constants import IS_WINDOWS_PLATFORM\nfrom fnmatch import fnmatch\nfrom itertools import chain\nfrom .utils import create_archive\n\n\ndef tar(path, exclude=None, dockerfile=None, fileobj=None, gzip=False):\n root = os.path.abspath(path)\n exclude = exclude or ...
[ { "content": "import os\nimport re\n\nfrom ..constants import IS_WINDOWS_PLATFORM\nfrom fnmatch import fnmatch\nfrom itertools import chain\nfrom .utils import create_archive\n\n\ndef tar(path, exclude=None, dockerfile=None, fileobj=None, gzip=False):\n root = os.path.abspath(path)\n exclude = exclude or ...
diff --git a/docker/utils/build.py b/docker/utils/build.py index 1622ec356..894b29936 100644 --- a/docker/utils/build.py +++ b/docker/utils/build.py @@ -93,7 +93,7 @@ def match(p): # Whether this file is implicitely included / excluded. matched = default if hit is None else hit sub = list(fil...
scrapy__scrapy-5269
ItemLoader: support non-TextResponse At the moment, `ItemLoader(response=response)` fails if `response` is not a `TextResponse` instance. Passing a binary response can still be useful, though. For example, to allow processors to access the response from their loader context, and hence be able to report the source UR...
[ { "content": "\"\"\"\nItem Loader\n\nSee documentation in docs/topics/loaders.rst\n\"\"\"\nimport itemloaders\n\nfrom scrapy.item import Item\nfrom scrapy.selector import Selector\n\n\nclass ItemLoader(itemloaders.ItemLoader):\n \"\"\"\n A user-friendly abstraction to populate an :ref:`item <topics-items>...
[ { "content": "\"\"\"\nItem Loader\n\nSee documentation in docs/topics/loaders.rst\n\"\"\"\nimport itemloaders\n\nfrom scrapy.item import Item\nfrom scrapy.selector import Selector\n\n\nclass ItemLoader(itemloaders.ItemLoader):\n \"\"\"\n A user-friendly abstraction to populate an :ref:`item <topics-items>...
diff --git a/scrapy/loader/__init__.py b/scrapy/loader/__init__.py index 014951a8e8b..91337b94950 100644 --- a/scrapy/loader/__init__.py +++ b/scrapy/loader/__init__.py @@ -83,6 +83,9 @@ class ItemLoader(itemloaders.ItemLoader): def __init__(self, item=None, selector=None, response=None, parent=None, **context):...
freqtrade__freqtrade-2100
Strategy list is space separated `--strategy-list Strat1,Strat2` produces an error while `--strategy-list Strat1 Strat2` works It became a space separated list somehow while its description states it's a comma-separated list: ``` --strategy-list STRATEGY_LIST [STRATEGY_LIST ...] Provide ...
[ { "content": "\"\"\"\nDefinition of cli arguments used in arguments.py\n\"\"\"\nimport argparse\nimport os\n\nfrom freqtrade import __version__, constants\n\n\ndef check_int_positive(value: str) -> int:\n try:\n uint = int(value)\n if uint <= 0:\n raise ValueError\n except ValueEr...
[ { "content": "\"\"\"\nDefinition of cli arguments used in arguments.py\n\"\"\"\nimport argparse\nimport os\n\nfrom freqtrade import __version__, constants\n\n\ndef check_int_positive(value: str) -> int:\n try:\n uint = int(value)\n if uint <= 0:\n raise ValueError\n except ValueEr...
diff --git a/docs/backtesting.md b/docs/backtesting.md index 179bcee15af..7e9f7ff53a3 100644 --- a/docs/backtesting.md +++ b/docs/backtesting.md @@ -57,7 +57,15 @@ freqtrade backtesting --datadir freqtrade/tests/testdata-20180101 freqtrade -s TestStrategy backtesting ``` -Where `-s TestStrategy` refers to the class...
obspy__obspy-2316
obspy-scan doc does not document depiction of data overlaps Hi - Just a short suggestion to modify a sentence in the obspy-scan documentation reporting that blue lines/blocks represent data overlaps. (I had to read the code to figure this out.) Suggest "Start times of traces with available data are marked by cross...
[ { "content": "#!/usr/bin/env python\n# 2010-01-27 Moritz Beyreuther\n\"\"\"\nScan a directory to determine the data availability.\n\nScan all specified files/directories, determine which time spans are covered\nfor which stations and plot everything in summarized in one overview plot.\nStart times of traces wit...
[ { "content": "#!/usr/bin/env python\n# 2010-01-27 Moritz Beyreuther\n\"\"\"\nScan a directory to determine the data availability.\n\nScan all specified files/directories, determine which time spans are covered\nfor which stations and plot everything in summarized in one overview plot.\nStart times of traces wit...
diff --git a/obspy/imaging/scripts/scan.py b/obspy/imaging/scripts/scan.py index a3cbd9921cb..9155c6652f3 100755 --- a/obspy/imaging/scripts/scan.py +++ b/obspy/imaging/scripts/scan.py @@ -6,7 +6,7 @@ Scan all specified files/directories, determine which time spans are covered for which stations and plot everything i...
celery__celery-3752
Celery Worker crashing after first task with TypeError: 'NoneType' object is not callable ## Checklist - [X] I have included the output of ``celery -A proj report`` in the issue. (if you are not able to do this, then at least specify the Celery version affected). ``` software -> celery:4.0.0 (latent...
[ { "content": "\"\"\"The consumers highly-optimized inner loop.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\nimport errno\nimport socket\nfrom celery import bootsteps\nfrom celery.exceptions import WorkerShutdown, WorkerTerminate, WorkerLostError\nfrom celery.utils.log import get_logger\nfrom...
[ { "content": "\"\"\"The consumers highly-optimized inner loop.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\nimport errno\nimport socket\nfrom celery import bootsteps\nfrom celery.exceptions import WorkerShutdown, WorkerTerminate, WorkerLostError\nfrom celery.utils.log import get_logger\nfrom...
diff --git a/celery/worker/loops.py b/celery/worker/loops.py index 3bc45993b3a..b97e6a05808 100644 --- a/celery/worker/loops.py +++ b/celery/worker/loops.py @@ -44,10 +44,10 @@ def asynloop(obj, connection, consumer, blueprint, hub, qos, _enable_amqheartbeats(hub.timer, connection, rate=hbrate) consumer.on_...
kymatio__kymatio-316
Unused 2D Psi filters The generated 2D filterbank includes filters that are not used in the computation. Let's create a scattering transform: ``` >>> import kymatio >>> s = kymatio.Scattering2D(J=2, shape=(32, 32)) ``` Let's look at the shapes of the generated filters: ``` >>> print("\n".join('{' + ', '.joi...
[ { "content": "\"\"\"\nAuthors: Eugene Belilovsky, Edouard Oyallon and Sergey Zagoruyko\nAll rights reserved, 2017.\n\"\"\"\n\n__all__ = ['filter_bank']\n\nimport torch\nimport numpy as np\nfrom .utils import fft2\n\n\ndef filter_bank(M, N, J, L=8):\n \"\"\"\n Builds in Fourier the Morlet filters used ...
[ { "content": "\"\"\"\nAuthors: Eugene Belilovsky, Edouard Oyallon and Sergey Zagoruyko\nAll rights reserved, 2017.\n\"\"\"\n\n__all__ = ['filter_bank']\n\nimport torch\nimport numpy as np\nfrom .utils import fft2\n\n\ndef filter_bank(M, N, J, L=8):\n \"\"\"\n Builds in Fourier the Morlet filters used ...
diff --git a/kymatio/scattering2d/filter_bank.py b/kymatio/scattering2d/filter_bank.py index 7c2057ab1..60aae8265 100644 --- a/kymatio/scattering2d/filter_bank.py +++ b/kymatio/scattering2d/filter_bank.py @@ -46,7 +46,7 @@ def filter_bank(M, N, J, L=8): (int(L-L/2-1)-theta) * np.pi / L, ...
docker__docker-py-352
attach_socket returns a closed socket when TLS is enabled https://github.com/d11wtq/dockerpty/issues/13 is actually a docker-py bug: a docker-py client communicating over TLS will always return a closed socket from `attach_socket()`. This appears to be because the response object (returned by `self.post`) is [garbage-c...
[ { "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 1ff43cc4e..0da71b3c3 100644 --- a/docker/client.py +++ b/docker/client.py @@ -259,9 +259,11 @@ def _create_websocket_connection(self, url): def _get_raw_response_socket(self, response): self._raise_for_status(response) if six.PY3: - ...
certbot__certbot-5992
HTTP responses logged as hard-to-read bytes repr in Python 3 If you're having trouble using Certbot and aren't sure you've found a bug or request for a new feature, please first try asking for help at https://community.letsencrypt.org/. There is a much larger community there of people familiar with the project who w...
[ { "content": "\"\"\"ACME client API.\"\"\"\nimport base64\nimport collections\nimport datetime\nfrom email.utils import parsedate_tz\nimport heapq\nimport logging\nimport time\n\nimport six\nfrom six.moves import http_client # pylint: disable=import-error\nimport josepy as jose\nimport OpenSSL\nimport re\nimpo...
[ { "content": "\"\"\"ACME client API.\"\"\"\nimport base64\nimport collections\nimport datetime\nfrom email.utils import parsedate_tz\nimport heapq\nimport logging\nimport time\n\nimport six\nfrom six.moves import http_client # pylint: disable=import-error\nimport josepy as jose\nimport OpenSSL\nimport re\nimpo...
diff --git a/acme/acme/client.py b/acme/acme/client.py index 7807f0eceea..5ccc6ba5b8e 100644 --- a/acme/acme/client.py +++ b/acme/acme/client.py @@ -1018,7 +1018,7 @@ def _send_request(self, method, url, *args, **kwargs): if response.headers.get("Content-Type") == DER_CONTENT_TYPE: debug_content =...
docker__docker-py-2129
Specifying `chunk_size` when saving images results in a max chunk of size 32768, with wrap-around The docstring in `docker.models.images.Image#save` states that 'data will be streamed as it is received. Default: 2 MB'. This default is from `docker.constants#DEFAULT_DATA_CHUNK_SIZE` which is set to 1024 * 2048, or 2MB. ...
[ { "content": "import itertools\nimport re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..constants import DEFAULT_DATA_CHUNK_SIZE\nfrom ..errors import BuildError, ImageLoadError, InvalidArgument\nfrom ..utils import parse_repository_tag\nfrom ..utils.json_stream import json_stream\nfrom .resource import ...
[ { "content": "import itertools\nimport re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..constants import DEFAULT_DATA_CHUNK_SIZE\nfrom ..errors import BuildError, ImageLoadError, InvalidArgument\nfrom ..utils import parse_repository_tag\nfrom ..utils.json_stream import json_stream\nfrom .resource import ...
diff --git a/docker/models/images.py b/docker/models/images.py index 41632c6a3..7d9ab70b5 100644 --- a/docker/models/images.py +++ b/docker/models/images.py @@ -64,9 +64,9 @@ def save(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE): Get a tarball of an image. Similar to the ``docker save`` command. Args: ...
mathesar-foundation__mathesar-2529
Handle 404 pages throughout the app ## Description * Client side routing: A non existent url results in a blank screen, or has obscure errors. * Server side routing: A non existent url entered on the browser results in a 404, which returns a django 404 page. ## Expected behavior * 404s should be clearly presented...
[ { "content": "from django.conf import settings\nfrom django.contrib.auth.decorators import login_required\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom rest_framework import status\nfrom rest_framework.decorators import api_view\nfrom rest_framework.response import Response\n\nfrom mat...
[ { "content": "from django.conf import settings\nfrom django.contrib.auth.decorators import login_required\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom rest_framework import status\nfrom rest_framework.decorators import api_view\nfrom rest_framework.response import Response\n\nfrom mat...
diff --git a/config/urls.py b/config/urls.py index 4e9d954f5f..76d4272b88 100644 --- a/config/urls.py +++ b/config/urls.py @@ -24,3 +24,5 @@ path('', include(mathesar_urls)), path('api-docs/', include('rest_framework.urls')), ] + +handler404 = 'mathesar.views.page_not_found_view' diff --git a/docker-compose....
zostera__django-bootstrap5-521
Pass "horizontal_field_offset_class" to child renderers The "horizontal_field_offset_class" doesnt pass to child renderers (from form to fields), so it actually does't work as described in documentation.
[ { "content": "from django.forms import (\n BaseForm,\n BaseFormSet,\n BoundField,\n CheckboxInput,\n CheckboxSelectMultiple,\n ClearableFileInput,\n MultiWidget,\n RadioSelect,\n Select,\n)\nfrom django.forms.widgets import Input, SelectMultiple, Textarea\nfrom django.utils.html impor...
[ { "content": "from django.forms import (\n BaseForm,\n BaseFormSet,\n BoundField,\n CheckboxInput,\n CheckboxSelectMultiple,\n ClearableFileInput,\n MultiWidget,\n RadioSelect,\n Select,\n)\nfrom django.forms.widgets import Input, SelectMultiple, Textarea\nfrom django.utils.html impor...
diff --git a/src/django_bootstrap5/renderers.py b/src/django_bootstrap5/renderers.py index 0787dcd2..0a3f2d95 100644 --- a/src/django_bootstrap5/renderers.py +++ b/src/django_bootstrap5/renderers.py @@ -94,6 +94,7 @@ def get_kwargs(self): "size": self.size, "horizontal_label_class": self.horiz...
boto__botocore-852
Unable to use non-string header values with Signature Version 4 When using S3 Signature Version 4 it's not possible to use non-string values in headers, such as Content-Length (which expects a integer/long). When passing a non-string value the following exception will be raised: `AttributeError: 'int' object has no att...
[ { "content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ...
[ { "content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ...
diff --git a/botocore/serialize.py b/botocore/serialize.py index 4917264cde..641a73bff1 100644 --- a/botocore/serialize.py +++ b/botocore/serialize.py @@ -483,7 +483,7 @@ def _partition_parameters(self, partitioned, param_name, elif location == 'header': shape = shape_members[param_name] ...
mkdocs__mkdocs-276
Multi-page documentaion does not work on Windows Multi-page documentation did not work on Windows, possibly because of Windows usage of backward slash instead of forward slash for paths. ![capture](https://cloud.githubusercontent.com/assets/627637/5159293/1d38f74e-732e-11e4-807f-28fd80831b07.PNG) Should be similar to...
[ { "content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nfrom mkdocs import utils\nimport posixpath\nimport os\n\n\ndef filename_to_title(filename):\n \"\"\"\n Automatically generate a def...
[ { "content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nfrom mkdocs import utils\nimport posixpath\nimport os\n\n\ndef filename_to_title(filename):\n \"\"\"\n Automatically generate a def...
diff --git a/mkdocs/nav.py b/mkdocs/nav.py index 3a0cee0a0a..530c5c73d1 100644 --- a/mkdocs/nav.py +++ b/mkdocs/nav.py @@ -210,10 +210,11 @@ def _generate_site_navigation(pages_config, url_context, use_directory_urls=True assert False, msg if title is None: - filename = path.split('/'...
wandb__wandb-953
Cannot log a slice as config parameter `wandb --version && python --version && uname` * Weights and Biases version: 0.8.31 * Python version: 3.8.1 * Operating System: Linux ### Description I cannot log a slice as config parameter. ### What I Did ```python import wandb wandb.init() wandb.config.updat...
[ { "content": "from collections import OrderedDict\n\n# six >=1.13.0 not available in all environmnents yet\n#from six.moves.collections_abc import Sequence\ntry:\n from collections.abc import Sequence\nexcept ImportError:\n from collections import Sequence\n\nimport inspect\nimport logging\nimport os\nimp...
[ { "content": "from collections import OrderedDict\n\n# six >=1.13.0 not available in all environmnents yet\n#from six.moves.collections_abc import Sequence\ntry:\n from collections.abc import Sequence\nexcept ImportError:\n from collections import Sequence\n\nimport inspect\nimport logging\nimport os\nimp...
diff --git a/wandb/wandb_config.py b/wandb/wandb_config.py index bbe4ebed19c..8ba35eda1aa 100644 --- a/wandb/wandb_config.py +++ b/wandb/wandb_config.py @@ -240,6 +240,9 @@ def _sanitize_val(self, val): for key, value in six.iteritems(val): converted[key] = self._sanitize_val(value) ...
Pyomo__pyomo-2923
DataPortal bug # bug found by: Maria Marcos Nuñez ```python from pyomo.environ import * model = AbstractModel() # Definición de los diferentes parametros del modelo model.qv = Param(within = NonNegativeReals) # Definicion de las variables model.D = Var(within = NonNegativeReals, bounds =(0.2, 6),initialize =...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\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-2022\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/dataportal/process_data.py b/pyomo/dataportal/process_data.py index 1b0354454fa..5eb15269e0c 100644 --- a/pyomo/dataportal/process_data.py +++ b/pyomo/dataportal/process_data.py @@ -343,7 +343,8 @@ def _process_param(cmd, _model, _data, _default, index=None, param=None, ncolumn ...
nonebot__nonebot2-2374
Bug: on_called_api 后处理异常的逻辑问题 ### 操作系统 Windows ### Python 版本 3.10.11 ### NoneBot 版本 2.1.0 ### 适配器 adapter-qqguild 0.3.0 ### 协议端 QQ-Guild ### 描述问题 这应该是一个 `on_called_api` 处理逻辑的问题 ## 场景 在 [adapter-qqguild](https://github.com/nonebot/adapter-qqguild) 中发送图片之类的消息会引发审核异常 `AuditException` 为使插件层面不受该异常影响而通过 `on...
[ { "content": "import abc\nimport asyncio\nfrom functools import partial\nfrom typing import TYPE_CHECKING, Any, Set, Union, Optional, Protocol\n\nfrom nonebot.log import logger\nfrom nonebot.config import Config\nfrom nonebot.exception import MockApiException\nfrom nonebot.typing import T_CalledAPIHook, T_Calli...
[ { "content": "import abc\nimport asyncio\nfrom functools import partial\nfrom typing import TYPE_CHECKING, Any, Set, Union, Optional, Protocol\n\nfrom nonebot.log import logger\nfrom nonebot.config import Config\nfrom nonebot.exception import MockApiException\nfrom nonebot.typing import T_CalledAPIHook, T_Calli...
diff --git a/nonebot/internal/adapter/bot.py b/nonebot/internal/adapter/bot.py index 8961b89f3fb6..3f827b18884a 100644 --- a/nonebot/internal/adapter/bot.py +++ b/nonebot/internal/adapter/bot.py @@ -106,7 +106,10 @@ async def call_api(self, api: str, **data: Any) -> Any: logger.debug("Running CalledAPI...
alltheplaces__alltheplaces-2457
Spider sheetz is broken During the global build at 2021-06-23-14-42-18, spider **sheetz** failed with **526 features** and **1 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/logs/sheetz.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/output/sheetz.geojson...
[ { "content": "import json\nimport re\nimport scrapy\nfrom locations.items import GeojsonPointItem\n\n\nclass SheetzSpider(scrapy.Spider):\n name = \"sheetz\"\n item_attributes = {'brand': \"Sheetz\"}\n allowed_domains = [\"orderz.sheetz.com\"]\n start_urls = (\n \"https://orderz.sheetz.com/sa...
[ { "content": "import json\nimport re\nimport scrapy\nfrom locations.items import GeojsonPointItem\n\n\nclass SheetzSpider(scrapy.Spider):\n name = \"sheetz\"\n item_attributes = {'brand': \"Sheetz\"}\n allowed_domains = [\"orderz.sheetz.com\"]\n start_urls = (\n \"https://orderz.sheetz.com/sa...
diff --git a/locations/spiders/sheetz.py b/locations/spiders/sheetz.py index 464c7b6600e..8b969200ca5 100644 --- a/locations/spiders/sheetz.py +++ b/locations/spiders/sheetz.py @@ -22,7 +22,7 @@ def parse(self, response): 'state': store['state'], 'postcode': store['zip'], ...
django-oscar__django-oscar-1770
Basket View Error with Weight Based shipping and discount Applied When a discount it's applied to shipping and the shipping method is WeightBased occurs the following error: File "/Users/christian/virtualenvs/webstores/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response response...
[ { "content": "import json\n\nfrom django import shortcuts\nfrom django.contrib import messages\nfrom django.shortcuts import redirect\nfrom django.template.loader import render_to_string\nfrom django.template import RequestContext\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpRespon...
[ { "content": "import json\n\nfrom django import shortcuts\nfrom django.contrib import messages\nfrom django.shortcuts import redirect\nfrom django.template.loader import render_to_string\nfrom django.template import RequestContext\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpRespon...
diff --git a/src/oscar/apps/basket/views.py b/src/oscar/apps/basket/views.py index ef827236fd7..95b5b77b41c 100644 --- a/src/oscar/apps/basket/views.py +++ b/src/oscar/apps/basket/views.py @@ -159,7 +159,7 @@ def get_context_data(self, **kwargs): shipping_charge = method.calculate(self.request.basket) ...
Cog-Creators__Red-DiscordBot-2722
[Help] No help without a docstring # Other bugs #### What were you trying to do? `[p]help <command>` alternatively, `[p]<command>` with missing required arguments. #### What were you expecting to happen? The help embed to show. #### What actually happened? Nothing, if the docstring for the command do...
[ { "content": "# This is a full replacement of discord.py's help command\n# Signatures are not guaranteed to be unchanging in this file.\n# At a later date when this is more set in stone, this warning will be removed.\n# At said later date, there should also be things added to support extra formatter\n# registra...
[ { "content": "# This is a full replacement of discord.py's help command\n# Signatures are not guaranteed to be unchanging in this file.\n# At a later date when this is more set in stone, this warning will be removed.\n# At said later date, there should also be things added to support extra formatter\n# registra...
diff --git a/redbot/core/commands/help.py b/redbot/core/commands/help.py index f1f590e219d..3f671df7e08 100644 --- a/redbot/core/commands/help.py +++ b/redbot/core/commands/help.py @@ -249,6 +249,12 @@ async def make_and_send_embeds(self, ctx, embed_dict: dict): author_info = {"name": f"{ctx.me.display_name}...
google__jax-11544
`lax.conv_general_dilated` will crash when `padding` has some negative `lax.conv_general_dilated` will crash when `padding` has some negative ```py import jax def fn(lhs, rhs): window_strides = [1, 1] padding = [[5, 16], [-5, 1]] return jax.lax.conv_general_dilated(lhs, rhs, window_strides, padding)...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/jax/_src/lax/convolution.py b/jax/_src/lax/convolution.py index e73d147ad499..1c31fe6a361f 100644 --- a/jax/_src/lax/convolution.py +++ b/jax/_src/lax/convolution.py @@ -812,6 +812,9 @@ def conv_shape_tuple(lhs_shape, rhs_shape, strides, pads, batch_group_count=1): lhs_padded = np.add(lhs_shape[2:], n...
python__mypy-4522
Allow 'x_' flags in the [mypy-foo] section of mypy.ini This is a feature request. I'd like to use the `[mypy-foo]` sections in `mypy.ini` to control behavior of some other tool (so I can have a centralized config file -- the tool is a linter that requires annotations if a certain flag is set). I can't reuse an exist...
[ { "content": "\"\"\"Mypy type checker command line tool.\"\"\"\n\nimport argparse\nimport configparser\nimport fnmatch\nimport os\nimport re\nimport sys\nimport time\n\nfrom typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Tuple, Callable\n\nfrom mypy import build\nfrom mypy import defaults\nfro...
[ { "content": "\"\"\"Mypy type checker command line tool.\"\"\"\n\nimport argparse\nimport configparser\nimport fnmatch\nimport os\nimport re\nimport sys\nimport time\n\nfrom typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Tuple, Callable\n\nfrom mypy import build\nfrom mypy import defaults\nfro...
diff --git a/mypy/main.py b/mypy/main.py index a418dfa6cf8d..90b1285abc51 100644 --- a/mypy/main.py +++ b/mypy/main.py @@ -755,6 +755,8 @@ def parse_section(prefix: str, template: Options, print("%s: Unrecognized report type: %s" % (prefix, orig_key), file=sys.std...
ESMCI__cime-2444
CESM provenance fails if you don't have write permission in SRCROOT If you don't have write permission in SRCROOT, the CESM provenance function fails, and thus the build ends in an error. This is because manage_externals tries to write to the log file in SRCROOT and fails to do so. I have a fix incoming.
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nLibrary for saving build/run provenance.\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import touch, gzip_existing_file, SharedArea, copy_umask, convert_to_babylonian_time, get_current_commit\n\nimport tarfile, getpass, signal, glob, shut...
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nLibrary for saving build/run provenance.\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import touch, gzip_existing_file, SharedArea, copy_umask, convert_to_babylonian_time, get_current_commit\n\nimport tarfile, getpass, signal, glob, shut...
diff --git a/scripts/lib/CIME/provenance.py b/scripts/lib/CIME/provenance.py index 14ee01e0f26..39bcef865bb 100644 --- a/scripts/lib/CIME/provenance.py +++ b/scripts/lib/CIME/provenance.py @@ -83,7 +83,7 @@ def _save_build_provenance_cesm(case, lid): # pylint: disable=unused-argument manic = os.path.join(srcroot, ...
nvaccess__nvda-12182
When testing with NVDA version alpha-21882, the input gesture interface could not be opened ### Steps to reproduce: First open the NVDA Menu/Preferences submenu, then find the input gesture, and then enter to open the menu. ### Actual behavior: This is when the NVDA error tone appears ### Expected behavior: Ca...
[ { "content": "# -*- coding: UTF-8 -*-\r\n# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2020 NV Access Limited\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n\r\nimport itertools\r\nimport re\r\nfrom typing import Tuple, Union, Dict\r\...
[ { "content": "# -*- coding: UTF-8 -*-\r\n# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2020 NV Access Limited\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n\r\nimport itertools\r\nimport re\r\nfrom typing import Tuple, Union, Dict\r\...
diff --git a/source/gui/inputGestures.py b/source/gui/inputGestures.py index 8920275ed82..82dbb9808a9 100644 --- a/source/gui/inputGestures.py +++ b/source/gui/inputGestures.py @@ -608,7 +608,7 @@ def makeSettings(self, settingsSizer): bHelper.sizer.AddStretchSpacer() # Translators: The label of a button to rese...
iterative__dvc-8738
DVC Repro incorrectly saving directory to cache ## Bug Report UPDATE: Skip to https://github.com/iterative/dvc/issues/4428#issuecomment-778259232 As the title states. I run `dvc repro extract` for my `extract` pipeline stage. This takes two pretty large zip files and extracts them into specified folders. These fo...
[ { "content": "import logging\nimport os\nimport string\nfrom collections import defaultdict\nfrom contextlib import suppress\nfrom dataclasses import dataclass\nfrom typing import TYPE_CHECKING, Any, Dict, Optional, Set\n\nfrom funcy import cached_property, project\n\nfrom dvc import prompt\nfrom dvc.exceptions...
[ { "content": "import logging\nimport os\nimport string\nfrom collections import defaultdict\nfrom contextlib import suppress\nfrom dataclasses import dataclass\nfrom typing import TYPE_CHECKING, Any, Dict, Optional, Set\n\nfrom funcy import cached_property, project\n\nfrom dvc import prompt\nfrom dvc.exceptions...
diff --git a/dvc/stage/__init__.py b/dvc/stage/__init__.py index 64070ddd5b..7a9ed63dbf 100644 --- a/dvc/stage/__init__.py +++ b/dvc/stage/__init__.py @@ -591,7 +591,15 @@ def run( if kwargs.get("checkpoint_func", None) or no_download: allow_missing = True - self.save(allow_mi...
keras-team__keras-13477
ValueError: Unable to create group (Name already exists) with model.save_weights() This is a similar issue to https://github.com/keras-team/keras/issues/6005 but I believe it is caused by the way `h5py` defines groups. In particular, if a layer named `foo` is in a network after a layer named `foo/bar`, `h5py` throws an...
[ { "content": "\"\"\"Model saving utilities.\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport os\nimport json\nimport yaml\nimport inspect\nimport warnings\nimport tempfile\nfrom six.moves import zip\nfrom six import string_types\nf...
[ { "content": "\"\"\"Model saving utilities.\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport os\nimport json\nimport yaml\nimport inspect\nimport warnings\nimport tempfile\nfrom six.moves import zip\nfrom six import string_types\nf...
diff --git a/keras/engine/saving.py b/keras/engine/saving.py index 95af7dd14c8c..ba3beb657849 100644 --- a/keras/engine/saving.py +++ b/keras/engine/saving.py @@ -744,7 +744,9 @@ def save_weights_to_hdf5_group(group, layers): group.attrs['backend'] = K.backend().encode('utf8') group.attrs['keras_version'] = s...
qtile__qtile-1659
qtile-top crash 'Client' object has no attribute 'tracemalloc_dump' <!-- Please do not ask general questions here! There are [community contact](https://github.com/qtile/qtile#community) options for that. --> # Issue description <!-- A brief discussion of what failed and how it failed. A description of what ...
[ { "content": "# Copyright (c) 2015, Roger Duran\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m...
[ { "content": "# Copyright (c) 2015, Roger Duran\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m...
diff --git a/libqtile/scripts/qtile_top.py b/libqtile/scripts/qtile_top.py index f6df9908a1..c6df228aaa 100644 --- a/libqtile/scripts/qtile_top.py +++ b/libqtile/scripts/qtile_top.py @@ -30,7 +30,7 @@ import tracemalloc from tracemalloc import Snapshot -from libqtile import ipc +from libqtile import command_client,...
zulip__zulip-5459
"Link to this conversation" with group pm conversations isn't shareable If I have a conversation with alice@example.com and bob@example.com, and want to email them a permanent link to the conversation using the "Link to this conversation" feature, it doesn't work, because we generate a link of the form: `/#narrow/ne...
[ { "content": "from __future__ import absolute_import\n\nfrom django.utils.translation import ugettext as _\nfrom django.utils.timezone import now as timezone_now\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ValidationError\nfrom django.db import conne...
[ { "content": "from __future__ import absolute_import\n\nfrom django.utils.translation import ugettext as _\nfrom django.utils.timezone import now as timezone_now\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ValidationError\nfrom django.db import conne...
diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.js index eb045fdaf0205..e7109340d5492 100644 --- a/frontend_tests/node_tests/filter.js +++ b/frontend_tests/node_tests/filter.js @@ -310,6 +310,19 @@ function make_sub(name, stream_id) { })); assert(!predicate({type: 'stream'}...
Pyomo__pyomo-1806
pyomo.common.tempfiles.TempfileManager raises FileNotFoundError I've recently started using pyomo.common.tempfiles.TempfileManager to set the temporary directory in a package, as in https://pyomo.readthedocs.io/en/stable/working_models.html#changing-the-temporary-directory. I was previously using TempfileManager from P...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin...
diff --git a/pyomo/common/tempfiles.py b/pyomo/common/tempfiles.py index 7f5c07cd122..d9a28f664fd 100644 --- a/pyomo/common/tempfiles.py +++ b/pyomo/common/tempfiles.py @@ -34,9 +34,8 @@ class TempfileManagerClass: """A class that manages temporary files.""" - tempdir = None - def __init__(self, **kwds)...
unionai-oss__pandera-500
Better error message when validating pandas.MultiIndex with a pandera.Index schema **Describe the bug** Trying to validate a MultiIndex data frame with a schema that Index has been set to single Index. - [x] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the...
[ { "content": "\"\"\"Components used in pandera schemas.\"\"\"\n\nimport warnings\nfrom copy import copy, deepcopy\nfrom typing import Any, Dict, List, Optional, Tuple, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom . import errors\nfrom . import strategies as st\nfrom .error_handlers import SchemaErro...
[ { "content": "\"\"\"Components used in pandera schemas.\"\"\"\n\nimport warnings\nfrom copy import copy, deepcopy\nfrom typing import Any, Dict, List, Optional, Tuple, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom . import errors\nfrom . import strategies as st\nfrom .error_handlers import SchemaErro...
diff --git a/pandera/schema_components.py b/pandera/schema_components.py index 5b3b3d912..14b457d1e 100644 --- a/pandera/schema_components.py +++ b/pandera/schema_components.py @@ -354,6 +354,11 @@ def validate( otherwise creates a copy of the data. :returns: validated DataFrame or Series. ...
MongoEngine__mongoengine-1860
Querying EmbeddedDocumentListField with operators 'Client' object has no attribute 'name__icontains' I have an EmbeddedDocumentListField with Following Fields Clients [{"name","email","mobile",..},.....] now i am able to filter pure on pure fld=value but unable to use any of the operators along with the fields...
[ { "content": "import itertools\nimport weakref\n\nfrom bson import DBRef\nimport six\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = ('BaseDict', 'BaseList', 'EmbeddedDocumentList', 'LazyReference')\n\n\nclass BaseDict(dict):\n ...
[ { "content": "import itertools\nimport weakref\n\nfrom bson import DBRef\nimport six\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = ('BaseDict', 'BaseList', 'EmbeddedDocumentList', 'LazyReference')\n\n\nclass BaseDict(dict):\n ...
diff --git a/mongoengine/base/datastructures.py b/mongoengine/base/datastructures.py index 8948243e4..db292f144 100644 --- a/mongoengine/base/datastructures.py +++ b/mongoengine/base/datastructures.py @@ -234,6 +234,9 @@ def filter(self, **kwargs): Filters the list by only including embedded documents with the...
pretix__pretix-241
Substring search when matching voucher tags I might use a tagging structure such as "DE-Berlin", "DE-Stuttgart" for vouchers, and it'd be neat to match all "DE-" tagged vouchers at once.
[ { "content": "import csv\nimport io\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.urlresolvers import resolve, reverse\nfrom django.db import transaction\nfrom django.db.models import Count, Q, Sum\nfrom django.http import (\n Http404, HttpResponse, HttpResponseBa...
[ { "content": "import csv\nimport io\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.urlresolvers import resolve, reverse\nfrom django.db import transaction\nfrom django.db.models import Count, Q, Sum\nfrom django.http import (\n Http404, HttpResponse, HttpResponseBa...
diff --git a/src/pretix/control/views/vouchers.py b/src/pretix/control/views/vouchers.py index 5ea01d68899..c045202bdfc 100644 --- a/src/pretix/control/views/vouchers.py +++ b/src/pretix/control/views/vouchers.py @@ -37,7 +37,7 @@ def get_queryset(self): qs = qs.filter(Q(code__icontains=s) | Q(tag__icontai...
conda__conda-6656
conda update --name AssertionError ``` error: AssertionError() command: /Users/cpthgli/.anyenv/envs/pyenv/versions/default/bin/conda update --name --all --yes user_agent: conda/4.4.4 requests/2.18.4 CPython/3.6.4 Darwin/17.3.0 OSX/10.13.2 _messageid: -9223372036843525540 _messagetime: 1514462637935 / 2017-12-28 0...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom errno import ENOENT\nfrom logging import getLogger\nimport os\nfrom os.path import (abspath, basename, dirname, expanduser, isdir, isfile, join, normpath,\n split...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom errno import ENOENT\nfrom logging import getLogger\nimport os\nfrom os.path import (abspath, basename, dirname, expanduser, isdir, isfile, join, normpath,\n split...
diff --git a/conda/base/context.py b/conda/base/context.py index 16bea2ed73a..60b8c4a931d 100644 --- a/conda/base/context.py +++ b/conda/base/context.py @@ -968,6 +968,14 @@ def determine_target_prefix(ctx, args=None): except AttributeError: prefix_path = None + if prefix_name is not None and not pre...
privacyidea__privacyidea-1597
Unable to Enroll Push Token if tokenlabel is configured in policy # What did you try to do? Enroll push token for user with **tokenlabel** set to \<u>_\<s> within an enrollment policy. Username is testuser and token serial is PIPU00001234 # What outcome did you expect? Token enrolled successfully in app. ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# 2019-02-08 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Start the pushtoken class\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms o...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# 2019-02-08 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Start the pushtoken class\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms o...
diff --git a/privacyidea/lib/tokens/pushtoken.py b/privacyidea/lib/tokens/pushtoken.py index e6f5da34d1..bff080d77c 100644 --- a/privacyidea/lib/tokens/pushtoken.py +++ b/privacyidea/lib/tokens/pushtoken.py @@ -343,6 +343,7 @@ def get_init_detail(self, params=None, user=None): extra_data[k] = fb_option...
sopel-irc__sopel-1587
admin: admins can usurp owners I believe `admin` and `owner` are meant to be two separate permission levels for the bot. There are `@require_admin` and `@require_owner` for commands, implying that there are certain functions for an `owner` that should not be available to `admin`s. That being said, if the `admin` p...
[ { "content": "# coding=utf-8\n\"\"\"\nadmin.py - Sopel Admin Module\nCopyright 2010-2011, Sean B. Palmer (inamidst.com) and Michael Yanovich\n(yanovich.net)\nCopyright © 2012, Elad Alfassa, <elad@fedoraproject.org>\nCopyright 2013, Ari Koivula <ari@koivu.la>\n\nLicensed under the Eiffel Forum License 2.\n\nhttp...
[ { "content": "# coding=utf-8\n\"\"\"\nadmin.py - Sopel Admin Module\nCopyright 2010-2011, Sean B. Palmer (inamidst.com) and Michael Yanovich\n(yanovich.net)\nCopyright © 2012, Elad Alfassa, <elad@fedoraproject.org>\nCopyright 2013, Ari Koivula <ari@koivu.la>\n\nLicensed under the Eiffel Forum License 2.\n\nhttp...
diff --git a/sopel/modules/admin.py b/sopel/modules/admin.py index 22fc0f93e6..3191f8916f 100644 --- a/sopel/modules/admin.py +++ b/sopel/modules/admin.py @@ -220,6 +220,13 @@ def set_config(bot, trigger): bot.reply("%s.%s = %s" % (section_name, option, value)) return + # 'core.owner' cannot be s...
lutris__lutris-3944
Won't open configure panel with some icons ``` 2021-11-03 02:59:23,691: Unable to load icon from image fl-studio Traceback (most recent call last): File "/usr/lib/python3/dist-packages/lutris/game_actions.py", line 178, in on_edit_game_configuration EditGameConfigDialog(self.window, self.game) File "/usr/l...
[ { "content": "\"\"\"Various utilities using the GObject framework\"\"\"\nimport array\nimport os\n\nfrom gi.repository import Gdk, GdkPixbuf, Gio, GLib, Gtk\n\nfrom lutris import settings\nfrom lutris.util import datapath, system\nfrom lutris.util.log import logger\n\ntry:\n from PIL import Image\nexcept Imp...
[ { "content": "\"\"\"Various utilities using the GObject framework\"\"\"\nimport array\nimport os\n\nfrom gi.repository import Gdk, GdkPixbuf, Gio, GLib, Gtk\n\nfrom lutris import settings\nfrom lutris.util import datapath, system\nfrom lutris.util.log import logger\n\ntry:\n from PIL import Image\nexcept Imp...
diff --git a/lutris/gui/widgets/utils.py b/lutris/gui/widgets/utils.py index 52de2a51db..5f9ea11990 100644 --- a/lutris/gui/widgets/utils.py +++ b/lutris/gui/widgets/utils.py @@ -54,7 +54,7 @@ def get_pixbuf(image, size, fallback=None, is_installed=True): fallback = get_default_icon(size) if syste...
pulp__pulpcore-2558
Implementation of does_batch in DeclarativeContent is wrong **Describe the bug** `does_batch` is supposed to decide, whether content can be waited on, or must be evaluated asap. It produces `False` unnecessarily often, leading to performance issues. **Additional context** This is suspected to at least one of the r...
[ { "content": "from gettext import gettext as _\n\nimport asyncio\n\nfrom pulpcore.constants import ALL_KNOWN_CONTENT_CHECKSUMS\nfrom pulpcore.plugin.models import Artifact\n\n\nclass DeclarativeArtifact:\n \"\"\"\n Relates an :class:`~pulpcore.plugin.models.Artifact`, how to download it, and its\n `rel...
[ { "content": "from gettext import gettext as _\n\nimport asyncio\n\nfrom pulpcore.constants import ALL_KNOWN_CONTENT_CHECKSUMS\nfrom pulpcore.plugin.models import Artifact\n\n\nclass DeclarativeArtifact:\n \"\"\"\n Relates an :class:`~pulpcore.plugin.models.Artifact`, how to download it, and its\n `rel...
diff --git a/CHANGES/2557.bugfix b/CHANGES/2557.bugfix new file mode 100644 index 0000000000..097b40ae8a --- /dev/null +++ b/CHANGES/2557.bugfix @@ -0,0 +1 @@ +Fixed `does_batch` method in sync pipeline to allow waiting on content that is already resolved. diff --git a/pulpcore/plugin/stages/models.py b/pulpcore/plugin...
beeware__toga-645
ImageView example not working on Linux ## Expected Behavior <!--- If you're describing a bug, tell us what you expect to happen. --> ImageView demos display both a local image file and one from a web url <!--- If you're requesting a new feature, tell us why you'd like this feature. --> ## Current Behavior <!--...
[ { "content": "import os\nimport toga\nfrom toga.style.pack import *\n\nclass ImageViewApp(toga.App):\n def startup(self):\n self.main_window = toga.MainWindow(title=self.name)\n \n box = toga.Box()\n box.style.padding = 40\n box.style.update(alignment=CENTER)\n box.s...
[ { "content": "import os\nimport toga\nfrom toga.style.pack import *\n\nclass ImageViewApp(toga.App):\n def startup(self):\n self.main_window = toga.MainWindow(title=self.name)\n \n box = toga.Box()\n box.style.padding = 40\n box.style.update(alignment=CENTER)\n box.s...
diff --git a/examples/imageview/imageview/app.py b/examples/imageview/imageview/app.py index 77a4d5e3c7..62b532e0e1 100644 --- a/examples/imageview/imageview/app.py +++ b/examples/imageview/imageview/app.py @@ -14,7 +14,7 @@ def startup(self): # image from local path # load brutus.png from the package...
vacanza__python-holidays-474
Add Juneteenth https://www.nytimes.com/2021/06/17/us/politics/juneteenth-holiday-biden.html
[ { "content": "# -*- coding: utf-8 -*-\n\n# 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# ...
[ { "content": "# -*- coding: utf-8 -*-\n\n# 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# ...
diff --git a/holidays/countries/united_states.py b/holidays/countries/united_states.py index fa3a23da2..4be7f73c0 100644 --- a/holidays/countries/united_states.py +++ b/holidays/countries/united_states.py @@ -375,6 +375,10 @@ def _populate(self, year): elif date(year, JUN, 11).weekday() == SUN: ...
linz__geostore-790
Improve metadata description for catalog metadata ### User Story <!-- A user story to describe why a user wants to do something, who the user is and what they want to do --> So that I can understand more about the catalog metadata for the Geostore, as an external data analyst or developer, I want a good description a...
[ { "content": "from json import dumps\nfrom typing import TYPE_CHECKING\n\nimport boto3\nfrom pystac import STAC_IO, Catalog, CatalogType, Collection, Item # type: ignore[import]\nfrom pystac.layout import HrefLayoutStrategy # type: ignore[import]\n\nfrom ..api_keys import EVENT_KEY\nfrom ..api_responses impor...
[ { "content": "from json import dumps\nfrom typing import TYPE_CHECKING\n\nimport boto3\nfrom pystac import STAC_IO, Catalog, CatalogType, Collection, Item # type: ignore[import]\nfrom pystac.layout import HrefLayoutStrategy # type: ignore[import]\n\nfrom ..api_keys import EVENT_KEY\nfrom ..api_responses impor...
diff --git a/backend/populate_catalog/task.py b/backend/populate_catalog/task.py index af9c519b7..f7f2c9bde 100644 --- a/backend/populate_catalog/task.py +++ b/backend/populate_catalog/task.py @@ -32,8 +32,12 @@ S3_CLIENT: S3Client = boto3.client("s3") ROOT_CATALOG_ID = "root_catalog" -ROOT_CATALOG_TITLE = "Geostor...
nltk__nltk-2810
usage function: repair or drop? Do we need to support this usage method? https://github.com/nltk/nltk/blob/develop/nltk/util.py#L40 Here's a discussion of it's shortcomings: https://github.com/nltk/nltk/pull/2801#discussion_r706567025
[ { "content": "# Natural Language Toolkit: Utility functions\n#\n# Copyright (C) 2001-2021 NLTK Project\n# Author: Steven Bird <stevenbird1@gmail.com>\n# Eric Kafe <kafe.eric@gmail.com> (acyclic closures)\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\nimport bisect\nimport insp...
[ { "content": "# Natural Language Toolkit: Utility functions\n#\n# Copyright (C) 2001-2021 NLTK Project\n# Author: Steven Bird <stevenbird1@gmail.com>\n# Eric Kafe <kafe.eric@gmail.com> (acyclic closures)\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\nimport bisect\nimport insp...
diff --git a/nltk/test/classify.doctest b/nltk/test/classify.doctest index bfdf17b1ef..3e1319d312 100644 --- a/nltk/test/classify.doctest +++ b/nltk/test/classify.doctest @@ -11,16 +11,13 @@ Classifiers label tokens with category labels (or *class labels*). Typically, labels are represented with strings (such as ``"h...
streamlit__streamlit-265
On rerun, faded elements are becoming opaque one by one. Instead they become opaque all at once. Steps to repro: 1. Run `examples/reference.py` 2. When done, rerun it. **Expected:** on rerun, all elements fade out and then become opaque one by one even before the run is done. **Actual:** on rerun, all elements fa...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2018-2019 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2018-2019 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n...
diff --git a/lib/streamlit/watcher/LocalSourcesWatcher.py b/lib/streamlit/watcher/LocalSourcesWatcher.py index 49f837525911..edfec054b341 100644 --- a/lib/streamlit/watcher/LocalSourcesWatcher.py +++ b/lib/streamlit/watcher/LocalSourcesWatcher.py @@ -194,9 +194,13 @@ def update_watched_modules(self): def _file_is_...
yt-dlp__yt-dlp-8399
"ERROR: Unable to download video subtitles for 'en': [Errno 2] No such file or directory" with m3u8 webvtt subs ### Checklist - [X] I'm reporting a bug unrelated to a specific site - [X] I've verified that I'm running yt-dlp version **2022.07.18** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or ...
[ { "content": "import os\nimport random\nimport time\n\nfrom .common import FileDownloader\nfrom ..networking import Request\nfrom ..networking.exceptions import (\n CertificateVerifyError,\n HTTPError,\n TransportError,\n)\nfrom ..utils import (\n ContentTooShortError,\n RetryManager,\n Thrott...
[ { "content": "import os\nimport random\nimport time\n\nfrom .common import FileDownloader\nfrom ..networking import Request\nfrom ..networking.exceptions import (\n CertificateVerifyError,\n HTTPError,\n TransportError,\n)\nfrom ..utils import (\n ContentTooShortError,\n RetryManager,\n Thrott...
diff --git a/yt_dlp/downloader/http.py b/yt_dlp/downloader/http.py index f5237443e212..693828b6e5e7 100644 --- a/yt_dlp/downloader/http.py +++ b/yt_dlp/downloader/http.py @@ -237,8 +237,13 @@ def download(): def retry(e): close_stream() - ctx.resume_len = (byte_counter if ...
liqd__a4-opin-2485
Community debate module error messages **expected behaviour:** Error message only shown for document upload if file is incorrect **behaviour:** Error message is also shown when title is not added
[ { "content": "from django.contrib import messages\nfrom django.shortcuts import render\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\nfrom django.views import generic\nfrom rules.contrib.views import PermissionRequiredMixin\n\nfrom adhocracy4.filters import views as filter_...
[ { "content": "from django.contrib import messages\nfrom django.shortcuts import render\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\nfrom django.views import generic\nfrom rules.contrib.views import PermissionRequiredMixin\n\nfrom adhocracy4.filters import views as filter_...
diff --git a/euth/communitydebate/views.py b/euth/communitydebate/views.py index cb16d590d..e6b4b3f58 100644 --- a/euth/communitydebate/views.py +++ b/euth/communitydebate/views.py @@ -95,8 +95,9 @@ def post(self, request, *args, **kwargs): 'successfully created')) ...
pyqtgraph__pyqtgraph-905
[CI-fail] HDF5 big data This test fails due to h5py missing. Probably we can change requisites to include h5py or skip this test if h5py is not found. ``` examples/test_examples.py::test_examples[PyQt4-f17] frontend = PyQt4. f = ('HDF5 big data', 'hdf5.py') HDF5 big data.....................................FAILED P...
[ { "content": "from __future__ import division, print_function, absolute_import\nimport subprocess\nimport time\nimport os\nimport sys\nimport errno\nfrom pyqtgraph.pgcollections import OrderedDict\nfrom pyqtgraph.python2_3 import basestring\n\npath = os.path.abspath(os.path.dirname(__file__))\n\n\nexamples = Or...
[ { "content": "from __future__ import division, print_function, absolute_import\nimport subprocess\nimport time\nimport os\nimport sys\nimport errno\nimport copy\nfrom pyqtgraph.pgcollections import OrderedDict\nfrom pyqtgraph.python2_3 import basestring\n\npath = os.path.abspath(os.path.dirname(__file__))\n\n\n...
diff --git a/examples/test_examples.py b/examples/test_examples.py index d8de370fa0..c5997348d4 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -41,7 +41,7 @@ def flaky_print(*args): "pypi\n\npip install importlib\n\n") pass -files = utils.buildFileList(utils.examples) +files...
pyinstaller__pyinstaller-8378
Mac OS Catalina App crash on app start 1. Create mac os app using PyInstaller build.spec 2. Set "LSBackgroundOnly" to "false" in "Contents/Info.plist" 3. Open App... loading.. loading.. crash build app on mac os Catalina, it crashes when i launch app. on Mojave everything worked perfectly Versions: PyInstal...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/building/osx.py b/PyInstaller/building/osx.py index c56f40d3d4..a0cf924db8 100644 --- a/PyInstaller/building/osx.py +++ b/PyInstaller/building/osx.py @@ -58,7 +58,10 @@ def __init__(self, *args, **kwargs): self.name = os.path.join(CONF['distpath'], base_name) self.appname = ...
Mailu__Mailu-2651
plus mail in auto-forward destination The email address in `admin -> User settings -> Auto-forward -> Destination` cannot contains a '+' character (error: Invalid email address). But the '+' in email address is valid and admin should accept it.
[ { "content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass...
[ { "content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass...
diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py index c6335559a..79c764504 100644 --- a/core/admin/mailu/ui/forms.py +++ b/core/admin/mailu/ui/forms.py @@ -37,7 +37,7 @@ def __init__(self,message=_('Invalid email address.')): self.message = message def __call__(self, form, field...
fossasia__open-event-server-4882
Session allowed to be created without an associated Track **Describe the bug** <!-- A clear and concise description of what the bug is. --> Sessions can be created without being associated with a Track **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> It shouldn't be...
[ { "content": "from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\n\nfrom app.api.bootstrap import api\nfrom app.api.events import Event\nfrom app.api.helpers.db import safe_query, get_count\nfrom app.api.helpers.exceptions import ForbiddenException\nfrom app.api.helpers.mail impor...
[ { "content": "from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\n\nfrom app.api.bootstrap import api\nfrom app.api.events import Event\nfrom app.api.helpers.db import safe_query, get_count\nfrom app.api.helpers.exceptions import ForbiddenException\nfrom app.api.helpers.mail impor...
diff --git a/app/api/sessions.py b/app/api/sessions.py index 1a04ce1071..6c86f9b056 100644 --- a/app/api/sessions.py +++ b/app/api/sessions.py @@ -32,7 +32,7 @@ def before_post(self, args, kwargs, data): :param data: :return: """ - require_relationship(['event'], data) + require...
django-cms__django-cms-2655
unfolding subitem in page tree leaves them without title See attached file. When I am unfolding a branch of the tree, the page names are not there. Upon reloading the page, all the unfolded branches contain their page names. When inspecting the DOM, the a tag is there, but no content. ![branches-without-title](https:...
[ { "content": "# -*- coding: utf-8 -*-\n\n\nfrom django.utils.timezone import now\n\nfrom os.path import join\nfrom cms import constants\nfrom cms.constants import PUBLISHER_STATE_DEFAULT, PUBLISHER_STATE_PENDING, PUBLISHER_STATE_DIRTY, TEMPLATE_INHERITANCE_MAGIC\nfrom cms.exceptions import PublicIsUnmodifiable,...
[ { "content": "# -*- coding: utf-8 -*-\n\n\nfrom django.utils.timezone import now\n\nfrom os.path import join\nfrom cms import constants\nfrom cms.constants import PUBLISHER_STATE_DEFAULT, PUBLISHER_STATE_PENDING, PUBLISHER_STATE_DIRTY, TEMPLATE_INHERITANCE_MAGIC\nfrom cms.exceptions import PublicIsUnmodifiable,...
diff --git a/cms/models/pagemodel.py b/cms/models/pagemodel.py index defce42274a..4f69a929319 100644 --- a/cms/models/pagemodel.py +++ b/cms/models/pagemodel.py @@ -729,7 +729,7 @@ def validate_title(title): if not hasattr(self, 'title_cache'): self.title_cache = {} - for title in sel...
django-cms__django-cms-3856
Frontend glitch for get_extra_local_plugin_menu_items() I'm trying to add an additional item to content menu for a custom plugin. So I added this to my plugin. ``` def get_extra_local_plugin_menu_items(self, request, plugin): return [ PluginMenuItem( _('Preview Wrapper'), ...
[ { "content": "# -*- coding: utf-8 -*-\nfrom copy import copy\nfrom datetime import datetime\nfrom itertools import chain\nimport re\nfrom classytags.values import StringValue\nfrom cms.utils.urlutils import admin_reverse\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.sites...
[ { "content": "# -*- coding: utf-8 -*-\nfrom copy import copy\nfrom datetime import datetime\nfrom itertools import chain\nimport re\nfrom classytags.values import StringValue\nfrom cms.utils.urlutils import admin_reverse\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.sites...
diff --git a/cms/templatetags/cms_tags.py b/cms/templatetags/cms_tags.py index 8a582b3cfc7..50a3207f4a4 100644 --- a/cms/templatetags/cms_tags.py +++ b/cms/templatetags/cms_tags.py @@ -439,7 +439,7 @@ def get_context(self, context, obj): plugin_class_inst = plugin.get_plugin_class_instance() i...
angr__angr-2558
ReachingDefinitionsAnalysis ListIndexError <!-- *Disclaimer: The angr suite is maintained by a small team of volunteers. While we cannot guarantee any timeliness for fixes and enhancements, we will do our best. For more real-time help with angr, from us and the community, join our [Slack.](http://angr.io/invite/)* ...
[ { "content": "from typing import Optional, Iterable, Set, Union, TYPE_CHECKING\nimport logging\n\nimport pyvex\n\nfrom ...engines.light import SimEngineLight, SimEngineLightVEXMixin, SpOffset, RegisterOffset\nfrom ...engines.vex.claripy.irop import operations as vex_operations\nfrom ...errors import SimEngineEr...
[ { "content": "from typing import Optional, Iterable, Set, Union, TYPE_CHECKING\nimport logging\n\nimport pyvex\n\nfrom ...engines.light import SimEngineLight, SimEngineLightVEXMixin, SpOffset, RegisterOffset\nfrom ...engines.vex.claripy.irop import operations as vex_operations\nfrom ...errors import SimEngineEr...
diff --git a/angr/analyses/reaching_definitions/engine_vex.py b/angr/analyses/reaching_definitions/engine_vex.py index 3e40607aa83..23cd60fdc7a 100644 --- a/angr/analyses/reaching_definitions/engine_vex.py +++ b/angr/analyses/reaching_definitions/engine_vex.py @@ -182,7 +182,7 @@ def _store_core(self, addr: Iterable[Un...
freedomofpress__securedrop-6659
`i18n_tool.py update-from-weblate` no longer detects translators for attribution ## Description After #6580, including with the fix proposed in #6629, `i18n_tool.py update-from-weblate` fails to detect the translators to credit for each per-language commit. ## Steps to Reproduce ```sh-session user@sd-dev:~/se...
[ { "content": "#!/opt/venvs/securedrop-app-code/bin/python\n# -*- coding: utf-8 -*-\n\nimport argparse\nimport glob\nimport io\nimport json\nimport logging\nimport os\nimport re\nimport signal\nimport subprocess\nimport sys\nimport textwrap\nfrom argparse import _SubParsersAction\nfrom os.path import abspath, di...
[ { "content": "#!/opt/venvs/securedrop-app-code/bin/python\n# -*- coding: utf-8 -*-\n\nimport argparse\nimport glob\nimport io\nimport json\nimport logging\nimport os\nimport re\nimport signal\nimport subprocess\nimport sys\nimport textwrap\nfrom argparse import _SubParsersAction\nfrom os.path import abspath, di...
diff --git a/securedrop/i18n_tool.py b/securedrop/i18n_tool.py index 15afeb79a5..c66f8a2671 100755 --- a/securedrop/i18n_tool.py +++ b/securedrop/i18n_tool.py @@ -389,7 +389,10 @@ def translators( log_command.extend([args.target, "--", path]) - log_lines = subprocess.check_output(log_command, encodi...
pulp__pulpcore-2566
Implementation of does_batch in DeclarativeContent is wrong **Describe the bug** `does_batch` is supposed to decide, whether content can be waited on, or must be evaluated asap. It produces `False` unnecessarily often, leading to performance issues. **Additional context** This is suspected to at least one of the r...
[ { "content": "from gettext import gettext as _\n\nimport asyncio\n\nfrom pulpcore.constants import ALL_KNOWN_CONTENT_CHECKSUMS\nfrom pulpcore.plugin.models import Artifact\n\n\nclass DeclarativeArtifact:\n \"\"\"\n Relates an :class:`~pulpcore.plugin.models.Artifact`, how to download it, and its\n `rel...
[ { "content": "from gettext import gettext as _\n\nimport asyncio\n\nfrom pulpcore.constants import ALL_KNOWN_CONTENT_CHECKSUMS\nfrom pulpcore.plugin.models import Artifact\n\n\nclass DeclarativeArtifact:\n \"\"\"\n Relates an :class:`~pulpcore.plugin.models.Artifact`, how to download it, and its\n `rel...
diff --git a/CHANGES/2557.bugfix b/CHANGES/2557.bugfix new file mode 100644 index 0000000000..097b40ae8a --- /dev/null +++ b/CHANGES/2557.bugfix @@ -0,0 +1 @@ +Fixed `does_batch` method in sync pipeline to allow waiting on content that is already resolved. diff --git a/pulpcore/plugin/stages/models.py b/pulpcore/plugin...
nextcloud__appstore-270
API: changing the certificate for an app should delete all of its releases Since they can not be validated anymore
[ { "content": "import datetime\nfrom functools import reduce\nfrom semantic_version import Version, Spec\nfrom django.conf import settings # type: ignore\nfrom django.contrib.auth.models import User # type: ignore\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _ # ty...
[ { "content": "import datetime\nfrom functools import reduce\nfrom semantic_version import Version, Spec\nfrom django.conf import settings # type: ignore\nfrom django.contrib.auth.models import User # type: ignore\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _ # ty...
diff --git a/nextcloudappstore/core/models.py b/nextcloudappstore/core/models.py index 44bc80bef30..a9ba88d2c91 100644 --- a/nextcloudappstore/core/models.py +++ b/nextcloudappstore/core/models.py @@ -203,6 +203,17 @@ def _latest(self, releases): except ValueError: return None + def save(self...
wemake-services__wemake-python-styleguide-1962
WPS503 on for ... else ### What's wrong wps reports a useless `else` clause after a `for`, but I don't think the clause is useless: I don't see any way to remove it without writing *more* code: ```python for search_path in self.environment.loader.searchpath: template_relative_path = Path(search_path) / rela...
[ { "content": "import ast\nfrom collections import defaultdict\nfrom functools import reduce\nfrom typing import ClassVar, DefaultDict, List, Mapping, Set, Type\n\nfrom typing_extensions import final\n\nfrom wemake_python_styleguide.logic import source, walk\nfrom wemake_python_styleguide.logic.tree import ifs, ...
[ { "content": "import ast\nfrom collections import defaultdict\nfrom functools import reduce\nfrom typing import ClassVar, DefaultDict, List, Mapping, Set, Type\n\nfrom typing_extensions import final\n\nfrom wemake_python_styleguide.logic import source, walk\nfrom wemake_python_styleguide.logic.tree import ifs, ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index aba8b3a71..d468ff8ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,13 @@ Semantic versioning in our case means: There are no major releases right now: we are still at `0.x.y` version. But, in the future we might change the configuration names / logic, ...
scrapy__scrapy-4074
Support pathlib.Path in FEED_URI Make things work the same when the value assigned to the `FEED_URI` setting is a string containing a path or an instance of `pathlib.Path`.
[ { "content": "\"\"\"\nFeed Exports extension\n\nSee documentation in docs/topics/feed-exports.rst\n\"\"\"\n\nimport os\nimport sys\nimport logging\nimport posixpath\nfrom tempfile import NamedTemporaryFile\nfrom datetime import datetime\nimport six\nfrom six.moves.urllib.parse import urlparse, unquote\nfrom ftp...
[ { "content": "\"\"\"\nFeed Exports extension\n\nSee documentation in docs/topics/feed-exports.rst\n\"\"\"\n\nimport os\nimport sys\nimport logging\nimport posixpath\nfrom tempfile import NamedTemporaryFile\nfrom datetime import datetime\nimport six\nfrom six.moves.urllib.parse import urlparse, unquote\nfrom ftp...
diff --git a/requirements-py2.txt b/requirements-py2.txt deleted file mode 100644 index dde8d1c9c86..00000000000 --- a/requirements-py2.txt +++ /dev/null @@ -1,18 +0,0 @@ -parsel>=1.5.0 -PyDispatcher>=2.0.5 -w3lib>=1.17.0 -protego>=0.1.15 - -pyOpenSSL>=16.2.0 # Earlier versions fail with "AttributeError: module 'lib' ...
fedora-infra__bodhi-3945
bodhi allows maintainer to request testing after stable already requested This may be related to configuration around when rawhide gating was first enabled, but there were/are 17 cases of updates where bodhi requested stable (and indeed did tag them for stable), but the maintainer then came and requested testing. This ...
[ { "content": "# Copyright © 2014-2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License...
[ { "content": "# Copyright © 2014-2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License...
diff --git a/bodhi/server/services/updates.py b/bodhi/server/services/updates.py index e967e83b64..405b671c9f 100644 --- a/bodhi/server/services/updates.py +++ b/bodhi/server/services/updates.py @@ -205,6 +205,11 @@ def set_request(request): "Can't change request for an archived release") ...
spack__spack-40298
Installation issue: yaksa@0.2 +cuda %gcc@12.3.0 ### Steps to reproduce the issue I ran into this when trying to build `mpich %gcc@12.3.0 +cuda netmod=ucx pmi=pmix ^cuda@11.8 +allow-unsupported-compilers` ```console $ spack spec -l mpich%gcc@12.3.0+cuda netmod=ucx pmi=pmix ^cuda@11.8 Input spec ------------------...
[ { "content": "# Copyright 2013-2023 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.package import *\n\n\nclass Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):\n ...
[ { "content": "# Copyright 2013-2023 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.package import *\n\n\nclass Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):\n ...
diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py index b696c00e1263a6..46366659be0ffc 100644 --- a/var/spack/repos/builtin/packages/yaksa/package.py +++ b/var/spack/repos/builtin/packages/yaksa/package.py @@ -47,6 +47,8 @@ def configure_args(self): ...
scrapy__scrapy-4816
Wrong annotations in scrapy.crawler.CrawlProcess.crawl docstrings <!-- Thanks for taking an interest in Scrapy! If you have a question that starts with "How to...", please see the Scrapy Community page: https://scrapy.org/community/. The GitHub issue tracker's purpose is to deal with bug reports and feature requ...
[ { "content": "import logging\nimport pprint\nimport signal\nimport warnings\n\nfrom twisted.internet import defer\nfrom zope.interface.exceptions import DoesNotImplement\n\ntry:\n # zope >= 5.0 only supports MultipleInvalid\n from zope.interface.exceptions import MultipleInvalid\nexcept ImportError:\n ...
[ { "content": "import logging\nimport pprint\nimport signal\nimport warnings\n\nfrom twisted.internet import defer\nfrom zope.interface.exceptions import DoesNotImplement\n\ntry:\n # zope >= 5.0 only supports MultipleInvalid\n from zope.interface.exceptions import MultipleInvalid\nexcept ImportError:\n ...
diff --git a/scrapy/crawler.py b/scrapy/crawler.py index 4c6b0e496e8..5780165360a 100644 --- a/scrapy/crawler.py +++ b/scrapy/crawler.py @@ -180,9 +180,9 @@ def crawl(self, crawler_or_spidercls, *args, **kwargs): :type crawler_or_spidercls: :class:`~scrapy.crawler.Crawler` instance, :class:`~scrap...
RedHatInsights__insights-core-1624
ifcfg parser to support for MASTER and TEAM_MASTER keys slave type We need to update the ifcfg parser to support TEAMING and BONDING slave type in the configuration file, so, that we can use MASTER' and 'TEAM_MASTER' keys in raw format. For ex- `obj['MASTER']="'bond0'"` or `obj['TEAM_MASTER']="'team0'"`
[ { "content": "\"\"\"\nIfCFG - files ``/etc/sysconfig/network-scripts/ifcfg-*``\n========================================================\n\nIfCFG is a parser for the network interface definition files in\n``/etc/sysconfig/network-scripts``. These are pulled into the network\nscripts using ``source``, so they a...
[ { "content": "\"\"\"\nIfCFG - files ``/etc/sysconfig/network-scripts/ifcfg-*``\n========================================================\n\nIfCFG is a parser for the network interface definition files in\n``/etc/sysconfig/network-scripts``. These are pulled into the network\nscripts using ``source``, so they a...
diff --git a/insights/parsers/ifcfg.py b/insights/parsers/ifcfg.py index 4abb3050fb..fc6ef1a0f7 100644 --- a/insights/parsers/ifcfg.py +++ b/insights/parsers/ifcfg.py @@ -95,7 +95,7 @@ def parse_content(self, content): # In some cases we want to know what the actual value-side # of the key i...
Mailu__Mailu-2654
plus mail in auto-forward destination The email address in `admin -> User settings -> Auto-forward -> Destination` cannot contains a '+' character (error: Invalid email address). But the '+' in email address is valid and admin should accept it.
[ { "content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass...
[ { "content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass...
diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py index 24d6f8991..587faf0e4 100644 --- a/core/admin/mailu/ui/forms.py +++ b/core/admin/mailu/ui/forms.py @@ -37,7 +37,7 @@ def __init__(self,message=_('Invalid email address.')): self.message = message def __call__(self, form, field...
electricitymaps__electricitymaps-contrib-982
Mockserver server.py does not work in Python 3 ```mockserver_1 | Traceback (most recent call last): mockserver_1 | File "../server.py", line 5, in <module> mockserver_1 | from SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer mockserver_1 | ModuleNotFoundError: No module named 'SimpleHTTPSer...
[ { "content": "#! /usr/bin/env python\n\n# Usage: python __file__.py <port>\n\nfrom SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer\n\nclass CORSRequestHandler(SimpleHTTPRequestHandler):\n def do_OPTIONS(self):\n self.send_response(200, 'OK')\n self.end_headers()\n\n def end_...
[ { "content": "#! /usr/bin/env python\n\n# Usage: python __file__.py <port>\n\nfrom http.server import SimpleHTTPRequestHandler, HTTPServer, test\n\nclass CORSRequestHandler(SimpleHTTPRequestHandler):\n def do_OPTIONS(self):\n self.send_response(200, 'OK')\n self.end_headers()\n\n def end_hea...
diff --git a/docker-compose.yml b/docker-compose.yml index 42eccd5251..d59ef21b7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.2' services: mockserver: build: mockserver - ports: ['9000:9000'] + ports: ['9000:8000'] volumes: - './mockserver/public:/home...
Qiskit__qiskit-11782
Round durations in `GenericBackendV2` <!-- ⚠️ If you do not respect this template, your pull request will be closed. ⚠️ Your pull request title should be short detailed and understandable for all. ⚠️ Also, please add a release note file using reno if the change needs to be documented in the release notes. ⚠️ If ...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ...
diff --git a/qiskit/circuit/duration.py b/qiskit/circuit/duration.py index 88ce7af968ed..6acb230baadd 100644 --- a/qiskit/circuit/duration.py +++ b/qiskit/circuit/duration.py @@ -78,8 +78,15 @@ def convert_durations_to_dt(qc: QuantumCircuit, dt_in_sec: float, inplace=True): operation.duration = duration_in_dt(...
prowler-cloud__prowler-2430
[Bug]: cloudfront_distributions_https_enabled false positive ### Steps to Reproduce Prowler reports cloudfront_distributions_https_enabled as failed when the cloudfront distribution has "Redirect HTTP to HTTPS" set in viewer protocol policy on behavior. ### Expected behavior For the example attached, it should "PAS...
[ { "content": "from dataclasses import dataclass\nfrom enum import Enum\nfrom typing import Optional\n\nfrom pydantic import BaseModel\n\nfrom prowler.lib.logger import logger\nfrom prowler.lib.scan_filters.scan_filters import is_resource_filtered\nfrom prowler.providers.aws.aws_provider import generate_regional...
[ { "content": "from enum import Enum\nfrom typing import Optional\n\nfrom pydantic import BaseModel\n\nfrom prowler.lib.logger import logger\nfrom prowler.lib.scan_filters.scan_filters import is_resource_filtered\nfrom prowler.providers.aws.aws_provider import generate_regional_clients\n\n\n################## Cl...
diff --git a/prowler/providers/aws/services/cloudfront/cloudfront_service.py b/prowler/providers/aws/services/cloudfront/cloudfront_service.py index cbd1a18d80..8c51a31a71 100644 --- a/prowler/providers/aws/services/cloudfront/cloudfront_service.py +++ b/prowler/providers/aws/services/cloudfront/cloudfront_service.py @...
ray-project__ray-9461
[tune] ExperimentAnalysis doesn't expand user as docs imply ### What is the problem? The Ray docs give an example where a path with the "~" operator is included: https://docs.ray.io/en/master/tune/api_docs/analysis.html#experimentanalysis-tune-experimentanalysis ``` >>> tune.run(my_trainable, name="my_exp", loc...
[ { "content": "import json\nimport logging\nimport os\n\ntry:\n import pandas as pd\nexcept ImportError:\n pd = None\n\nfrom ray.tune.error import TuneError\nfrom ray.tune.result import EXPR_PROGRESS_FILE, EXPR_PARAM_FILE,\\\n CONFIG_PREFIX, TRAINING_ITERATION\nfrom ray.tune.trial import Trial\nfrom ray...
[ { "content": "import json\nimport logging\nimport os\n\ntry:\n import pandas as pd\nexcept ImportError:\n pd = None\n\nfrom ray.tune.error import TuneError\nfrom ray.tune.result import EXPR_PROGRESS_FILE, EXPR_PARAM_FILE,\\\n CONFIG_PREFIX, TRAINING_ITERATION\nfrom ray.tune.trial import Trial\nfrom ray...
diff --git a/python/ray/tune/analysis/experiment_analysis.py b/python/ray/tune/analysis/experiment_analysis.py index 12023a3779052..09aba20a619b3 100644 --- a/python/ray/tune/analysis/experiment_analysis.py +++ b/python/ray/tune/analysis/experiment_analysis.py @@ -201,6 +201,11 @@ class ExperimentAnalysis(Analysis): ...
beetbox__beets-4974
discogs: TypeError whenever artist and title are empty <!-- Describe your problem, feature request, or discussion topic here. Please fill out this and the "Setup" section below and remember to include enough detail so that other people can reproduce the problem. --> ### Problem Running this command in verbo...
[ { "content": "# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita...
[ { "content": "# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita...
diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 5bdd277054..5085214f52 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -246,13 +246,13 @@ def item_candidates(self, item, artist, title): :rtype: list[beets.autotag.hooks.TrackInfo] """ if not self.discogs_client: ...
speechbrain__speechbrain-1929
[Bug]: Error while running the TransducerLoss module ### Describe the bug Originally reported by #1867 `ValueError: Found inputs tensors to be on [device(type='cuda', index=0), device(type='cuda', index=0), device(type='cuda', index=0), device(type='cuda', index=0)] while needed to be on a 'cuda' device to use th...
[ { "content": "\"\"\"\nTransducer loss implementation (depends on numba)\n\nAuthors\n * Abdelwahab Heba 2020\n\"\"\"\n\nimport torch\nfrom torch.autograd import Function\nfrom torch.nn import Module\n\ntry:\n from numba import cuda\nexcept ImportError:\n err_msg = \"The optional dependency Numba is needed ...
[ { "content": "\"\"\"\nTransducer loss implementation (depends on numba)\n\nAuthors\n * Abdelwahab Heba 2020\n\"\"\"\n\nimport torch\nfrom torch.autograd import Function\nfrom torch.nn import Module\n\ntry:\n from numba import cuda\nexcept ImportError:\n err_msg = \"The optional dependency Numba is needed ...
diff --git a/speechbrain/nnet/loss/transducer_loss.py b/speechbrain/nnet/loss/transducer_loss.py index cc15a1ace3..39317daf9a 100644 --- a/speechbrain/nnet/loss/transducer_loss.py +++ b/speechbrain/nnet/loss/transducer_loss.py @@ -340,7 +340,7 @@ def __init__(self, blank=0, reduction="mean"): def forward(self, log...
open-mmlab__mmdetection-1935
CUDA error: device-side assert triggered The error is related to learning_rate, I want to use 4 gpus and each gpu has 24 images to train ssd, so according to your markdown, I should set lr = 3e-3, but CUDA error occurs, if I decreasing the lr, the problem is fixed, so what's the problem?
[ { "content": "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import xavier_init\n\nfrom mmdet.core import AnchorGenerator, anchor_target, multi_apply\nfrom ..losses import smooth_l1_loss\nfrom ..registry import HEADS\nfrom .anchor_head import AnchorHead\n...
[ { "content": "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import xavier_init\n\nfrom mmdet.core import AnchorGenerator, anchor_target, multi_apply\nfrom ..losses import smooth_l1_loss\nfrom ..registry import HEADS\nfrom .anchor_head import AnchorHead\n...
diff --git a/mmdet/models/anchor_heads/ssd_head.py b/mmdet/models/anchor_heads/ssd_head.py index 056dfa53f25..57113679b45 100644 --- a/mmdet/models/anchor_heads/ssd_head.py +++ b/mmdet/models/anchor_heads/ssd_head.py @@ -182,6 +182,12 @@ def loss(self, all_bbox_weights = torch.cat(bbox_weights_list, ...
locustio__locust-2493
FastHttpUser is stricter than HttpUser about the host attribute ### Prerequisites - [X] I am using [the latest version of Locust](https://github.com/locustio/locust/releases/) - [X] I am reporting a bug, not asking a question ### Description As a followup to https://github.com/locustio/locust/issues/1222: `FastHt...
[ { "content": "from __future__ import annotations\nimport re\nimport socket\nimport json\nimport json as unshadowed_json # some methods take a named parameter called json\nfrom base64 import b64encode\nfrom contextlib import contextmanager\nfrom json.decoder import JSONDecodeError\nfrom urllib.parse import urlp...
[ { "content": "from __future__ import annotations\nimport re\nimport socket\nimport json\nimport json as unshadowed_json # some methods take a named parameter called json\nfrom base64 import b64encode\nfrom contextlib import contextmanager\nfrom json.decoder import JSONDecodeError\nfrom urllib.parse import urlp...
diff --git a/locust/contrib/fasthttp.py b/locust/contrib/fasthttp.py index 73dff3551b..912023d121 100644 --- a/locust/contrib/fasthttp.py +++ b/locust/contrib/fasthttp.py @@ -338,8 +338,6 @@ def __init__(self, environment): raise LocustError( "You must specify the base host. Either in the ...
mlflow__mlflow-3929
[BUG] archive_existing_versions flag not working Thank you for submitting an issue. Please refer to our [issue policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md) for additional information about bug reports. For help with debugging your code, please refer to [Stack Overflow](https://stackoverflow...
[ { "content": "import time\n\nimport logging\nimport sqlalchemy\n\nfrom mlflow.entities.model_registry.model_version_stages import (\n get_canonical_stage,\n DEFAULT_STAGES_FOR_GET_LATEST_VERSIONS,\n STAGE_DELETED_INTERNAL,\n STAGE_ARCHIVED,\n)\nfrom mlflow.exceptions import MlflowException\nfrom mlf...
[ { "content": "import time\n\nimport logging\nimport sqlalchemy\n\nfrom mlflow.entities.model_registry.model_version_stages import (\n get_canonical_stage,\n DEFAULT_STAGES_FOR_GET_LATEST_VERSIONS,\n STAGE_DELETED_INTERNAL,\n STAGE_ARCHIVED,\n)\nfrom mlflow.exceptions import MlflowException\nfrom mlf...
diff --git a/mlflow/store/model_registry/sqlalchemy_store.py b/mlflow/store/model_registry/sqlalchemy_store.py index aaa2f79f2ffad..b6fee936ed8d1 100644 --- a/mlflow/store/model_registry/sqlalchemy_store.py +++ b/mlflow/store/model_registry/sqlalchemy_store.py @@ -662,7 +662,7 @@ def transition_model_version_stage(self...
svthalia__concrexit-1628
Warnings about DEFAULT_AUTO_FIELD setting since Django 3.2 <!-- Please add the appropriate label for what change should be made: docs: changes to the documentation) refactor: refactoring production code, eg. renaming a variable or rewriting a function test: adding missing tests, refactoring tests; no production c...
[ { "content": "\"\"\"Django settings for concrexit.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\n\nimport logging\n\nimport base64\nimport json...
[ { "content": "\"\"\"Django settings for concrexit.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\n\nimport logging\n\nimport base64\nimport json...
diff --git a/website/thaliawebsite/settings.py b/website/thaliawebsite/settings.py index c7aa7f4f7..ce4436d1c 100644 --- a/website/thaliawebsite/settings.py +++ b/website/thaliawebsite/settings.py @@ -228,6 +228,9 @@ def from_env( # https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure CSRF_COOKIE_SE...
oppia__oppia-10876
Skill ids are not viewable in My Contributions > Skills <!-- - Thanks for taking the time to report a bug in the Oppia project. - Before filing a new issue, please do a quick search to check that it hasn't - already been filed on the [issue tracker](https://github.com/oppia/oppia/issues)._ --> **Describe...
[ { "content": "# coding: utf-8\n#\n# Copyright 2019 The Oppia Authors. 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/licen...
[ { "content": "# coding: utf-8\n#\n# Copyright 2019 The Oppia Authors. 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/licen...
diff --git a/core/domain/opportunity_services.py b/core/domain/opportunity_services.py index 3651f6ef22af7..b57e53f657326 100644 --- a/core/domain/opportunity_services.py +++ b/core/domain/opportunity_services.py @@ -623,10 +623,9 @@ def get_skill_opportunities_by_ids(ids): opportunity_models.SkillOpportunityM...
electricitymaps__electricitymaps-contrib-1060
MISO <-> Canada interconnector ..needs to be updated as it still pointing to Montana instead of MISO ![image](https://user-images.githubusercontent.com/1655848/35481513-36ff7488-0425-11e8-91f4-b487c037240a.png)
[ { "content": "#!/usr/bin/env python3\n\n# The arrow library is used to handle datetimes\nimport arrow\n# The request library is used to fetch content through HTTP\nimport requests\n\nfrom bs4 import BeautifulSoup\n\nMAP_GENERATION = {\n 'BIOFUEL': 'biomass',\n 'GAS': 'gas',\n 'HYDRO': 'hydro',\n 'NU...
[ { "content": "#!/usr/bin/env python3\n\n# The arrow library is used to handle datetimes\nimport arrow\n# The request library is used to fetch content through HTTP\nimport requests\n\nfrom bs4 import BeautifulSoup\n\nMAP_GENERATION = {\n 'BIOFUEL': 'biomass',\n 'GAS': 'gas',\n 'HYDRO': 'hydro',\n 'NU...
diff --git a/config/exchanges.json b/config/exchanges.json index f34be3198c..d69a58d996 100644 --- a/config/exchanges.json +++ b/config/exchanges.json @@ -405,25 +405,15 @@ }, "rotation": 90 }, - "CA-ON->US-MI": { + "CA-ON->US-MISO": { "lonlat": [ - -82.1195, - 43.5896 + -84.188, + ...
ckan__ckan-5864
Embed file in another site problem with mime type **CKAN version** ckan_version": "2.9" **Describe the bug** Embed file in another site from ckan force to download because mime type is incorrect, always is embed with Content-Type: application/octet-stream **Steps to reproduce** Load PDF in ckan and use embed t...
[ { "content": "# encoding: utf-8\nimport cgi\nimport json\nimport logging\n\nimport flask\nfrom flask.views import MethodView\n\nimport six\nimport ckan.lib.base as base\nimport ckan.lib.datapreview as lib_datapreview\nimport ckan.lib.helpers as h\nimport ckan.lib.navl.dictization_functions as dict_fns\nimport c...
[ { "content": "# encoding: utf-8\nimport cgi\nimport json\nimport logging\n\nimport flask\nfrom flask.views import MethodView\n\nimport six\nimport ckan.lib.base as base\nimport ckan.lib.datapreview as lib_datapreview\nimport ckan.lib.helpers as h\nimport ckan.lib.navl.dictization_functions as dict_fns\nimport c...
diff --git a/ckan/tests/controllers/test_package.py b/ckan/tests/controllers/test_package.py index 6107a828d19..c7025ddf566 100644 --- a/ckan/tests/controllers/test_package.py +++ b/ckan/tests/controllers/test_package.py @@ -1065,6 +1065,29 @@ def test_anonymous_users_cannot_edit_resource(self, app): ) ...
python__mypy-9462
TypeVar with Any upper bound generates missing attribute errors is used as Type[T] Imagine the following code: ``` class Foo(): NAME: ClassVar[str] = "" T = TypeVar("T", bound=Foo) def create_foo(object_class: Type[T]) -> T: print(T.NAME) # Generates error in static analysis return T() ``` ...
[ { "content": "\"\"\"Type checking of attribute access\"\"\"\n\nfrom typing import cast, Callable, Optional, Union, Sequence\nfrom typing_extensions import TYPE_CHECKING\n\nfrom mypy.types import (\n Type, Instance, AnyType, TupleType, TypedDictType, CallableType, FunctionLike,\n TypeVarLikeDef, Overloaded...
[ { "content": "\"\"\"Type checking of attribute access\"\"\"\n\nfrom typing import cast, Callable, Optional, Union, Sequence\nfrom typing_extensions import TYPE_CHECKING\n\nfrom mypy.types import (\n Type, Instance, AnyType, TupleType, TypedDictType, CallableType, FunctionLike,\n TypeVarLikeDef, Overloaded...
diff --git a/mypy/checkmember.py b/mypy/checkmember.py index b9221958dacb..64e693d52c96 100644 --- a/mypy/checkmember.py +++ b/mypy/checkmember.py @@ -280,6 +280,9 @@ def analyze_type_type_member_access(name: str, item = upper_bound elif isinstance(upper_bound, TupleType): item = tupl...
MycroftAI__mycroft-core-2338
Skill Shutdown sometimes fails causing duplicate instances of Skill ## Devices: Issue occurred on two separate Debian Linux installations - one running Mycroft-core 19.02.14, - the other running dev branch the date of this issue. ## Steps to reproduce: 1. Load Mycroft and ensure working as expected 2. Make int...
[ { "content": "from inspect import signature\n\nfrom mycroft.messagebus.message import Message\nfrom mycroft.metrics import Stopwatch, report_timing\nfrom mycroft.util.log import LOG\n\nfrom ..skill_data import to_alnum\n\n\ndef unmunge_message(message, skill_id):\n \"\"\"Restore message keywords by removing ...
[ { "content": "from inspect import signature\n\nfrom mycroft.messagebus.message import Message\nfrom mycroft.metrics import Stopwatch, report_timing\nfrom mycroft.util.log import LOG\n\nfrom ..skill_data import to_alnum\n\n\ndef unmunge_message(message, skill_id):\n \"\"\"Restore message keywords by removing ...
diff --git a/mycroft/skills/mycroft_skill/event_container.py b/mycroft/skills/mycroft_skill/event_container.py index fb444d005af0..623ae3f602d0 100644 --- a/mycroft/skills/mycroft_skill/event_container.py +++ b/mycroft/skills/mycroft_skill/event_container.py @@ -138,9 +138,12 @@ def once_wrapper(message): if h...
huggingface__trl-743
Bug in dpo_trainer.py, prediction_step function I see the following code in dpo_trainer.py's prediction_step method: ```python ... ... logits_dict = { "logits_test/chosen": metrics["logits_test/chosen"], "logits_test/rejected": metrics["logits_test/rejected"], } ... ... ``` But the keys and values are ...
[ { "content": "# DPO Authors: Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn 2023\n# 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 com...
[ { "content": "# DPO Authors: Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn 2023\n# 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 com...
diff --git a/trl/trainer/dpo_trainer.py b/trl/trainer/dpo_trainer.py index c30e2b6c2e..3f4ee1503b 100644 --- a/trl/trainer/dpo_trainer.py +++ b/trl/trainer/dpo_trainer.py @@ -472,8 +472,8 @@ def prediction_step( # logits for the chosen and rejected samples from model logits_dict = { - "lo...