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
⌀
freqtrade__freqtrade-3798
Telegram Balance not updating correctly after sell ## Describe your environment * Operating system: Ubuntu 18.04 * Python Version: 2.7.17 * CCXT version: 1.34.7 * Freqtrade Version: develop-4c349342 ## Describe the problem: Balance is not updated after sell on Bittrex live. All positions ever bou...
[ { "content": "# pragma pylint: disable=W0603\n\"\"\" Wallet \"\"\"\n\nimport logging\nfrom typing import Any, Dict, NamedTuple\n\nimport arrow\n\nfrom freqtrade.exchange import Exchange\nfrom freqtrade.persistence import Trade\n\nlogger = logging.getLogger(__name__)\n\n\n# wallet data structure\nclass Wallet(Na...
[ { "content": "# pragma pylint: disable=W0603\n\"\"\" Wallet \"\"\"\n\nimport logging\nfrom copy import deepcopy\nfrom typing import Any, Dict, NamedTuple\n\nimport arrow\n\nfrom freqtrade.exchange import Exchange\nfrom freqtrade.persistence import Trade\n\nlogger = logging.getLogger(__name__)\n\n\n# wallet data...
diff --git a/freqtrade/wallets.py b/freqtrade/wallets.py index b913155bc33..ac08f337cb5 100644 --- a/freqtrade/wallets.py +++ b/freqtrade/wallets.py @@ -2,6 +2,7 @@ """ Wallet """ import logging +from copy import deepcopy from typing import Any, Dict, NamedTuple import arrow @@ -93,6 +94,10 @@ def _update_live(...
google__mobly-194
logcat is empty for some NBU devices When starting adb logcat, we use `-b all` to catch all buffers. But some NBU devices (like HTC Desire 526g+) don't have the buffer option "all", and their adb logcat would only have one line saying "Unable to open log device '/dev/log/all': No such file or directory". We need ...
[ { "content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py index 159f5879..286cc013 100644 --- a/mobly/controllers/android_device.py +++ b/mobly/controllers/android_device.py @@ -759,11 +759,11 @@ def start_adb_logcat(self): try: extra_params = self.adb_logcat_param ...
django-helpdesk__django-helpdesk-232
timesince vs naturaltime A few templates are using something like `{{some_datetime|timesince}} ago` to format elapsed times. This can be difficult to translate (and currently isn't marked for translation), since the equivalent expression in other languages may also require a prefix. `django.contrib.humanize` provides ...
[ { "content": "import os\nimport sys\nimport argparse\nfrom django.conf import settings\n\nclass QuickDjangoTest(object):\n \"\"\"\n A quick way to run the Django test suite without a fully-configured project.\n\n Example usage:\n\n >>> QuickDjangoTest('app1', 'app2')\n\n Based on a script pub...
[ { "content": "import os\nimport sys\nimport argparse\nfrom django.conf import settings\n\nclass QuickDjangoTest(object):\n \"\"\"\n A quick way to run the Django test suite without a fully-configured project.\n\n Example usage:\n\n >>> QuickDjangoTest('app1', 'app2')\n\n Based on a script pub...
diff --git a/docs/install.rst b/docs/install.rst index 13e1d19af..f95619842 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -30,17 +30,18 @@ Adding To Your Django Project ----------------------------- 1. Edit your ``settings.py`` file and add ``helpdesk`` to the ``INSTALLED_APPS`` setting. You also need ``d...
rotki__rotki-1112
DAI in DSR multiplies every time I refresh blockchain balances ## Problem Definition As described above, my 10 DAI in Oasis Saving turn into 20 DAI, then 30 DAI, and so on every time I hit refresh on blockchain balance. ### System Description Running Appimage Rotki on Fedora 32.
[ { "content": "import logging\nimport operator\nfrom collections import defaultdict\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union, overload\n\nimport requests\nfrom web3.exceptions import BadFunctionCallOutput...
[ { "content": "import logging\nimport operator\nfrom collections import defaultdict\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union, overload\n\nimport requests\nfrom web3.exceptions import BadFunctionCallOutput...
diff --git a/docs/changelog.rst b/docs/changelog.rst index 52faa41af1..741b0f6726 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,7 @@ Changelog ========= +* :bug: `1110` DSR Dai balance will now not be recounted with every force refresh querying of blockchain balances * :feature: `-` Support A...
Pylons__pyramid-1170
BasicAuthAuthenticationPolicy is unable to handle intl characters Decoding only ASCII characters is supported. Using "pörpör" as password to basic auth yields the following kind of Exception: 2013-03-09 16:22:12,479 ERROR [waitress][Dummy-3] Exception when serving /_debug_toolbar/static/img/source.png Traceback (most ...
[ { "content": "import binascii\nfrom codecs import utf_8_decode\nfrom codecs import utf_8_encode\nimport hashlib\nimport base64\nimport datetime\nimport re\nimport time as time_mod\nimport warnings\n\nfrom zope.interface import implementer\n\nfrom pyramid.compat import (\n long,\n text_type,\n binary_ty...
[ { "content": "import binascii\nfrom codecs import utf_8_decode\nfrom codecs import utf_8_encode\nimport hashlib\nimport base64\nimport datetime\nimport re\nimport time as time_mod\nimport warnings\n\nfrom zope.interface import implementer\n\nfrom pyramid.compat import (\n long,\n text_type,\n binary_ty...
diff --git a/CHANGES.txt b/CHANGES.txt index a228fbb3ad..f170308b06 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,12 @@ Bug Fixes - Remove unused ``renderer`` argument from ``Configurator.add_route``. +- Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames + and passwords. The charse...
facebookresearch__xformers-582
Is xformers still not support cuda 12.0? # ❓ Questions and Help I got the following error while installing... Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com/ Obtaining file:///F:/Stable_Diffusion/stable-diffusion-webui-master/repositories/xformers Preparing metadata (setup.py) ... erro...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport datetime\nimport distutils.command.clean\nimport glob\nimport...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport datetime\nimport distutils.command.clean\nimport glob\nimport...
diff --git a/setup.py b/setup.py index 02f7ff9937..b81649efe1 100644 --- a/setup.py +++ b/setup.py @@ -76,11 +76,21 @@ def symlink_package(name: str, path: Path) -> None: cwd = Path(__file__).parent path_from = cwd / path path_to = os.path.join(cwd, *name.split(".")) + + # OSError: [WinError 1314] A r...
dj-stripe__dj-stripe-547
Error: Cannot resolve keyword 'customer' into field. All, Cannot get past the step `python manage.py djstripe_init_customers` in the installation. Running Python 3.6.0, Django 1.11, and the latest version of dj-stripe (1.0.0). What combination of Django version and dj-stripe version are folks successfu...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. module:: djstripe.management.commands.djstripe_init_customers.\n\n :synopsis: dj-stripe - init_customers command.\n\n.. moduleauthor:: @kavdev, @pydanny\n\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.core.management.base import BaseCommand\n...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. module:: djstripe.management.commands.djstripe_init_customers.\n\n :synopsis: dj-stripe - init_customers command.\n\n.. moduleauthor:: @kavdev, @pydanny\n\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.core.management.base import BaseCommand\n...
diff --git a/djstripe/management/commands/djstripe_init_customers.py b/djstripe/management/commands/djstripe_init_customers.py index 53eae4a83a..cbf4c0b3a3 100644 --- a/djstripe/management/commands/djstripe_init_customers.py +++ b/djstripe/management/commands/djstripe_init_customers.py @@ -22,7 +22,7 @@ class Command(B...
getmoto__moto-1883
cognito-idp admin_get_user should raise a UserNotFoundException, when user not in pool Hi, when using cognito-idp and searching for a non existing user, the Exception raised is `ResourceNotFoundException`, the Exception i'm expecting to be raised is a `UserNotFoundException` This is how to reproduce in moto ```...
[ { "content": "from __future__ import unicode_literals\n\nimport datetime\nimport json\nimport os\nimport time\nimport uuid\n\nimport boto.cognito.identity\nfrom jose import jws\n\nfrom moto.compat import OrderedDict\nfrom moto.core import BaseBackend, BaseModel\nfrom .exceptions import NotAuthorizedError, Resou...
[ { "content": "from __future__ import unicode_literals\n\nimport datetime\nimport json\nimport os\nimport time\nimport uuid\n\nimport boto.cognito.identity\nfrom jose import jws\n\nfrom moto.compat import OrderedDict\nfrom moto.core import BaseBackend, BaseModel\nfrom .exceptions import NotAuthorizedError, Resou...
diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py index 4c0132d3134b..476d470b935d 100644 --- a/moto/cognitoidp/models.py +++ b/moto/cognitoidp/models.py @@ -383,7 +383,7 @@ def admin_get_user(self, user_pool_id, username): raise ResourceNotFoundError(user_pool_id) if username n...
StackStorm__st2-6073
"local-shell-script" does not work on read only file systems ## SUMMARY While using the action runner type "local-shell-script", the action always try to set execute permission for the action script before the execution. For example, action runner logs for the core.sendmail action ``` 2022-03-09 07:02:06,86...
[ { "content": "# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/l...
[ { "content": "# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/l...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 13ec231513..7a1bfa4e8e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -44,6 +44,9 @@ Fixed * Update importlib-metadata from 3.10.1 to 4.8.3 for py3.6 and to 4.10.1 for py3.8 (security). #6072 Contributed by @jk464 +* For "local-shell-script" runner, on readonly ...
getnikola__nikola-1462
Hyphenate breaks inline math If you activate `HYPHENATE = True` in the `conf.py` inline math is broken because pyphen inserts `-` in the `<span>` elements. This bug has taken some time before I found the source, because the html looks okay in Chrome and Firefoxes developer tools. A test post (w/o metadata): ``` Some...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2014 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2014 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
diff --git a/AUTHORS.txt b/AUTHORS.txt index dd7381e5b5..84d556ac7c 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -76,3 +76,4 @@ yarko <https://github.com/yarko> Alex Walters <https://github.com/tritium21> Carsten Grohmann <https://github.com/CarstenGrohmann> Aurelien Naldi <https://github.com/aurelien-naldi> +Andre...
pulp__pulpcore-382
Improve the logic in the ACSHandleStage **Version** main **Describe the bug** If there are ACS that point to the same content, pick the first RA instead of last **To Reproduce** Steps to reproduce the behavior: **Expected behavior** A clear and concise description of what you expected to happen. **Addi...
[ { "content": "from collections import defaultdict\nfrom gettext import gettext as _\nimport logging\n\nfrom django.db.models import Q\n\n\n_logger = logging.getLogger(__name__)\n\n\ndef remove_duplicates(repository_version):\n \"\"\"\n Inspect content additions in the `RepositoryVersion` and replace repos...
[ { "content": "from collections import defaultdict\nfrom gettext import gettext as _\nimport logging\n\nfrom django.db.models import Q\n\n\n_logger = logging.getLogger(__name__)\n\n\ndef remove_duplicates(repository_version):\n \"\"\"\n Inspect content additions in the `RepositoryVersion` and replace repos...
diff --git a/CHANGES/plugin_api/3541.removal b/CHANGES/plugin_api/3541.removal index cafc7cb10a..cb617f899c 100644 --- a/CHANGES/plugin_api/3541.removal +++ b/CHANGES/plugin_api/3541.removal @@ -1,4 +1,4 @@ -Renamed the Content.repo_key to be Content.repo_unit_key. Also the calling of `RemoveDuplicates` +Renamed the Co...
joke2k__faker-863
uuid4 should return UUID instead of str __Context__: I'm using faker in combination with [FactoryBoy](https://github.com/FactoryBoy/factory_boy) to test [Django](https://www.djangoproject.com/) models. I have this test to make sure some data dict generated from model data is JSON-serializable. The test passed, but not ...
[ { "content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nimport hashlib\nimport string\nimport uuid\nimport sys\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n # Locales supported by Linux Mint from `/usr/share/i18n/SUPPORTED`\n language_locale_codes = {\n 'aa': ...
[ { "content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nimport hashlib\nimport string\nimport uuid\nimport sys\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n # Locales supported by Linux Mint from `/usr/share/i18n/SUPPORTED`\n language_locale_codes = {\n 'aa': ...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 2c9a9f2cc9..ef39ce0317 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -130,12 +130,14 @@ def locale(self): def language_code(self): return self.random_element(Provider.language_l...
readthedocs__readthedocs.org-4845
checking out wrong branch name ## Details * Read the Docs project URL: https://readthedocs.org/projects/flatland/ * Build URL (if applicable): https://readthedocs.org/projects/flatland/builds/8034952/ * Read the Docs username (if applicable): thomaswaldmann ## Expected Result build docs from master branch. ...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Project models.\"\"\"\n\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals)\n\nimport fnmatch\nimport logging\nimport os\nfrom builtins import object # pylint: disable=redefined-builtin\n\nfrom django.conf import settings\nfro...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Project models.\"\"\"\n\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals)\n\nimport fnmatch\nimport logging\nimport os\nfrom builtins import object # pylint: disable=redefined-builtin\n\nfrom django.conf import settings\nfro...
diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index bfc0bb9bd28..9d5c3855f35 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -323,11 +323,11 @@ def save(self, *args, **kwargs): # pylint: disable=arguments-differ for owner in self.users.all(): ...
huggingface__text-generation-inference-1910
Unable to stop TGI after serving models ### System Info I use the official docker image: ghcr.io/huggingface/text-generation-inference:2.0.1 ### Information - [X] Docker - [ ] The CLI directly ### Tasks - [X] An officially supported command - [ ] My own modifications ### Reproduction I used the following command...
[ { "content": "import asyncio\nimport os\nimport torch\nimport time\nimport signal\n\nfrom grpc import aio\nfrom loguru import logger\n\nfrom grpc_reflection.v1alpha import reflection\nfrom pathlib import Path\nfrom typing import List, Optional\n\nfrom text_generation_server.cache import Cache\nfrom text_generat...
[ { "content": "import asyncio\nimport os\nimport torch\nimport time\nimport signal\n\nfrom grpc import aio\nfrom loguru import logger\n\nfrom grpc_reflection.v1alpha import reflection\nfrom pathlib import Path\nfrom typing import List, Optional\n\nfrom text_generation_server.cache import Cache\nfrom text_generat...
diff --git a/server/text_generation_server/server.py b/server/text_generation_server/server.py index 92126fe62c7..7c06822fd3e 100644 --- a/server/text_generation_server/server.py +++ b/server/text_generation_server/server.py @@ -35,9 +35,6 @@ def exit_gracefully(self, signum, frame): self.KEEP_PROCESSING = Fal...
django-hijack__django-hijack-528
Using HijackUserAdminMixin on Classes with optional ForeignKeys to User may lead to error 500 When using `HijackUserAdminMixin` on a Class that only has an optional ForeignKey (`null=True` allowed) to User, any instance that does not have a User set will lead to an error (500): ```'NoneType' object has no attribute 'i...
[ { "content": "def superusers_only(*, hijacker, hijacked):\n \"\"\"Superusers may hijack any other user.\"\"\"\n return hijacked.is_active and hijacker.is_superuser\n\n\ndef superusers_and_staff(*, hijacker, hijacked):\n \"\"\"\n Superusers and staff members may hijack other users.\n\n A superuser...
[ { "content": "def superusers_only(*, hijacker, hijacked):\n \"\"\"Superusers may hijack any other user.\"\"\"\n if not hijacked:\n return False\n return hijacked.is_active and hijacker.is_superuser\n\n\ndef superusers_and_staff(*, hijacker, hijacked):\n \"\"\"\n Superusers and staff member...
diff --git a/hijack/permissions.py b/hijack/permissions.py index eb5ad8e3..a8151342 100644 --- a/hijack/permissions.py +++ b/hijack/permissions.py @@ -1,5 +1,7 @@ def superusers_only(*, hijacker, hijacked): """Superusers may hijack any other user.""" + if not hijacked: + return False return hijacke...
pre-commit__pre-commit-1814
Pre-commit install fails on Windows network mount drive Hi, I'm trying to help some team members set up pre-commit on a Windows network mount drive, and they're encountering an issue with paths. Seems related to [this comment](https://github.com/pre-commit/pre-commit/issues/1610#issuecomment-719774326) in #1610, which ...
[ { "content": "import logging\nimport os.path\nimport sys\nfrom typing import Dict\nfrom typing import List\nfrom typing import MutableMapping\nfrom typing import Optional\nfrom typing import Set\n\nfrom pre_commit.errors import FatalError\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util imp...
[ { "content": "import logging\nimport os.path\nimport sys\nfrom typing import Dict\nfrom typing import List\nfrom typing import MutableMapping\nfrom typing import Optional\nfrom typing import Set\n\nfrom pre_commit.errors import FatalError\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util imp...
diff --git a/pre_commit/git.py b/pre_commit/git.py index bec816c94..4bf282357 100644 --- a/pre_commit/git.py +++ b/pre_commit/git.py @@ -52,10 +52,10 @@ def get_root() -> str: # "rev-parse --show-cdup" to get the appropriate path, but must perform # an extra check to see if we are in the .git directory. ...
Project-MONAI__MONAI-139
Port additive gaussian noise transform a subtask of #62, port an additive Gaussian noise transform into Monai (for data augmentation)
[ { "content": "# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable l...
[ { "content": "# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable l...
diff --git a/monai/transforms/transforms.py b/monai/transforms/transforms.py index 4447cdd282..7f8961b4e6 100644 --- a/monai/transforms/transforms.py +++ b/monai/transforms/transforms.py @@ -64,6 +64,24 @@ def __call__(self, img): return rescale_array(img, self.minv, self.maxv, self.dtype) +@export +class ...
pytorch__vision-2143
Imagefolder none descriptive error message ## 🐛 Bug You get an weird python error: `TypeError: can only join an iterable` If you make an Imagefolder dataset with no samples in the directory and a is_valid_file. Because the extensions variable is set to none because is_valid_file which causes the TypeError. #...
[ { "content": "from .vision import VisionDataset\n\nfrom PIL import Image\n\nimport os\nimport os.path\n\n\ndef has_file_allowed_extension(filename, extensions):\n \"\"\"Checks if a file is an allowed extension.\n\n Args:\n filename (string): path to a file\n extensions (tuple of strings): ex...
[ { "content": "from .vision import VisionDataset\n\nfrom PIL import Image\n\nimport os\nimport os.path\n\n\ndef has_file_allowed_extension(filename, extensions):\n \"\"\"Checks if a file is an allowed extension.\n\n Args:\n filename (string): path to a file\n extensions (tuple of strings): ex...
diff --git a/test/test_datasets.py b/test/test_datasets.py index 06c3a58b4c1..60445b1d98a 100644 --- a/test/test_datasets.py +++ b/test/test_datasets.py @@ -84,6 +84,16 @@ def test_imagefolder(self): outputs = sorted([dataset[i] for i in range(len(dataset))]) self.assertEqual(imgs, outputs) ...
blakeblackshear__frigate-5021
[Config Support]: #backchannel=0 argument isn't being passed to go2rtc ### Describe the problem you are having Looks like the #backchannel=0 argument isn't being passed to go2rtc from the Frigate config file. I've even added ' ' around the input as I'm aware that Frigate sees # as comments. This is causing my doo...
[ { "content": "\"\"\"Controls go2rtc restream.\"\"\"\n\n\nimport logging\nimport requests\n\nfrom typing import Optional\n\nfrom frigate.config import FrigateConfig, RestreamCodecEnum\nfrom frigate.const import BIRDSEYE_PIPE\nfrom frigate.ffmpeg_presets import (\n parse_preset_hardware_acceleration_encode,\n ...
[ { "content": "\"\"\"Controls go2rtc restream.\"\"\"\n\n\nimport logging\nimport requests\n\nfrom typing import Optional\n\nfrom frigate.config import FrigateConfig, RestreamCodecEnum\nfrom frigate.const import BIRDSEYE_PIPE\nfrom frigate.ffmpeg_presets import (\n parse_preset_hardware_acceleration_encode,\n ...
diff --git a/frigate/restream.py b/frigate/restream.py index a16d5acc6d..0f99d4a8a1 100644 --- a/frigate/restream.py +++ b/frigate/restream.py @@ -52,7 +52,9 @@ def add_cameras(self) -> None: input.path.startswith("rtsp") and not camera.restream.force_audio ...
frappe__frappe-22795
Cron server script runs twice <!-- Welcome to the Frappe Framework issue tracker! Before creating an issue, please heed the following: 1. This tracker should only be used to report bugs and request features / enhancements to Frappe - For questions and general support, use https://stackoverflow.com/questions/ta...
[ { "content": "# Copyright (c) 2021, Frappe Technologies and contributors\n# License: MIT. See LICENSE\n\nimport json\nfrom datetime import datetime\n\nimport click\nfrom croniter import croniter\n\nimport frappe\nfrom frappe.model.document import Document\nfrom frappe.utils import get_datetime, now_datetime\nfr...
[ { "content": "# Copyright (c) 2021, Frappe Technologies and contributors\n# License: MIT. See LICENSE\n\nimport json\nfrom datetime import datetime\n\nimport click\nfrom croniter import croniter\n\nimport frappe\nfrom frappe.model.document import Document\nfrom frappe.utils import get_datetime, now_datetime\nfr...
diff --git a/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py b/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py index fc84204b3722..6f56180c896c 100644 --- a/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py +++ b/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py @@ -105,9...
pandas-dev__pandas-27368
Pandas Test Scripts always fail tried 0.24.0rc1, 0.23.4, 0.23.3 and 0.23.2 I am trying to install python and pandas on an AWS Linux EC2 instance. I have tried many versions of pandas and many ways to install it, but they all seem to have errors when I try to run the test() function. I create a brand new EC2 instanc...
[ { "content": "\"\"\"\nHelpers for configuring locale settings.\n\nName `localization` is chosen to avoid overlap with builtin `locale` module.\n\"\"\"\nfrom contextlib import contextmanager\nimport locale\nimport re\nimport subprocess\n\nfrom pandas._config.config import options\n\n\n@contextmanager\ndef set_lo...
[ { "content": "\"\"\"\nHelpers for configuring locale settings.\n\nName `localization` is chosen to avoid overlap with builtin `locale` module.\n\"\"\"\nfrom contextlib import contextmanager\nimport locale\nimport re\nimport subprocess\n\nfrom pandas._config.config import options\n\n\n@contextmanager\ndef set_lo...
diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index ea52736cb11a7..cc33d1120b51e 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -239,6 +239,7 @@ Datetimelike - Bug in :class:`Week` with ``weekday`` incorrectly raising ``AttributeError`` instead of ``T...
mlflow__mlflow-10098
Support Flask 3.0 in MLflow ### Summary We currently pin `Flask` to `< 3.0`. Flask 3.0 was recently released. We should update the requirement: ```diff diff --git a/requirements/core-requirements.txt b/requirements/core-requirements.txt index 99f4cdd62..11f7e3770 100644 --- a/requirements/core-requirements.txt...
[ { "content": "import importlib\nimport importlib.metadata\nimport os\nimport shlex\nimport sys\nimport textwrap\nimport types\n\nfrom flask import Flask, Response, send_from_directory\nfrom flask import __version__ as flask_version\nfrom packaging.version import Version\n\nfrom mlflow.exceptions import MlflowEx...
[ { "content": "import importlib\nimport importlib.metadata\nimport os\nimport shlex\nimport sys\nimport textwrap\nimport types\n\nfrom flask import Flask, Response, send_from_directory\nfrom packaging.version import Version\n\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.server import handlers\nfro...
diff --git a/.github/workflows/requirements.yml b/.github/workflows/requirements.yml index 679145e25a0c3..d112ade1d758d 100644 --- a/.github/workflows/requirements.yml +++ b/.github/workflows/requirements.yml @@ -79,4 +79,5 @@ jobs: - name: Run tests run: | source dev/setup-ssh.sh - ...
alltheplaces__alltheplaces-2642
Spider sheetz is broken During the global build at 2021-08-11-14-42-19, spider **sheetz** failed with **526 features** and **1 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-11-14-42-19/logs/sheetz.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-11-14-42-19/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 8b969200ca5..c9f8db43f45 100644 --- a/locations/spiders/sheetz.py +++ b/locations/spiders/sheetz.py @@ -24,8 +24,8 @@ def parse(self, response): 'ref': store['storeNumber'], 'phone': store.get('phone'), ...
open-telemetry__opentelemetry-python-3572
Prometheus metric target_info with SERVICE_NAME contains a dot **Describe your environment** - Python = 3.11.4 - opentelemetry-api = 1.21.0 - opentelemetry-sdk = 1.21.0 - opentelemetry-exporter-prometheus = 0.42b0 - prometheus-client = 0.19.0 - Prometheus = 2.48.0 - Windows **Steps to reproduce** When using ...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 894dccc9902..0e29f65d615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Prometheus exporter sanitize info metric ([#3572](https://github.com/open-telemetry/...
pymedusa__Medusa-3657
Post-processor crashes **Tried submitting this log through Medusa, but that feature doesn't work** (someone else already submitted that issue) **Branch/Commit:** commit b16e0e5eb4ded727eebd2ab2cd9683ab597662f5 (HEAD -> master, origin/master, origin/HEAD) **OS:** FreeNAS 11.0-U4 **What you did:** restarted Medusa, ...
[ { "content": "# coding=utf-8\n\"\"\"Replace core filesystem functions.\"\"\"\n\nimport glob\nimport io\nimport os\nimport shutil\nimport sys\nimport tarfile\n\nimport tempfile # noqa # pylint: disable=unused-import\nimport certifi\n\nfrom six import binary_type, text_type\n\n\nfs_encoding = sys.getfilesystemenc...
[ { "content": "# coding=utf-8\n\"\"\"Replace core filesystem functions.\"\"\"\n\nimport glob\nimport io\nimport os\nimport shutil\nimport sys\nimport tarfile\nimport tempfile # noqa # pylint: disable=unused-import\n\nimport certifi\n\nimport rarfile\n\nfrom six import binary_type, text_type\n\n\nfs_encoding = sy...
diff --git a/medusa/init/filesystem.py b/medusa/init/filesystem.py index 822b78b5ed..ef3498c4d0 100644 --- a/medusa/init/filesystem.py +++ b/medusa/init/filesystem.py @@ -7,10 +7,12 @@ import shutil import sys import tarfile - import tempfile # noqa # pylint: disable=unused-import + import certifi +import rarfil...
Lightning-AI__pytorch-lightning-2513
For versions >0.8.2 learning rate is zero for last epoch (potentially a logging bug) ## 🐛 Bug Version 0.8.2 and above changed the behavior of either my learning rate scheduler or the `WandbLogger` logger. I am using a linear warmup and decay scheduler. However, the learning rate graph produced by the `LearningRateL...
[ { "content": "import math\nimport sys\nfrom abc import ABC, abstractmethod\nimport gc\nimport os\nfrom typing import Optional\n\nimport torch\nfrom torch import Tensor\nfrom torch.utils.data import DataLoader\n\nfrom pytorch_lightning import _logger as log\nfrom pytorch_lightning.core.lightning import Lightning...
[ { "content": "import math\nimport sys\nfrom abc import ABC, abstractmethod\nimport gc\nimport os\nfrom typing import Optional\n\nimport torch\nfrom torch import Tensor\nfrom torch.utils.data import DataLoader\n\nfrom pytorch_lightning import _logger as log\nfrom pytorch_lightning.core.lightning import Lightning...
diff --git a/pytorch_lightning/trainer/training_tricks.py b/pytorch_lightning/trainer/training_tricks.py index 69c764e06e48f..883eed320f80d 100644 --- a/pytorch_lightning/trainer/training_tricks.py +++ b/pytorch_lightning/trainer/training_tricks.py @@ -99,7 +99,7 @@ def configure_accumulated_gradients(self, accumulate_...
internetarchive__openlibrary-4462
ImportBot Archive.org Imports Failing (403) ImportBot's logs show a bunch of errors, and it seems like it's not successfully import/syncing new IA records. ### Evidence / Screenshot (if possible) ``` importbot_1 | 2021-01-21 18:43:06 [178] [openlibrary.importer] [INFO] sleeping for 5 seconds before next at...
[ { "content": "r\"\"\"Open Library API Client.\n\nSample Usage::\n\n ol = OpenLibrary(\"http://0.0.0.0:8080\")\n ol.login('joe', 'secret')\n\n page = ol.get(\"/sandbox\")\n print page[\"body\"]\n\n page[\"body\"] += \"\\n\\nTest from API\"\n ol.save(\"/sandbox\", page, \"test from api\")\n\"\"\...
[ { "content": "r\"\"\"Open Library API Client.\n\nSample Usage::\n\n ol = OpenLibrary(\"http://0.0.0.0:8080\")\n ol.login('joe', 'secret')\n\n page = ol.get(\"/sandbox\")\n print page[\"body\"]\n\n page[\"body\"] += \"\\n\\nTest from API\"\n ol.save(\"/sandbox\", page, \"test from api\")\n\"\"\...
diff --git a/openlibrary/api.py b/openlibrary/api.py index aaee69ff52d..c486f7e0c2f 100644 --- a/openlibrary/api.py +++ b/openlibrary/api.py @@ -29,6 +29,7 @@ logger = logging.getLogger("openlibrary.api") + class OLError(Exception): def __init__(self, e): self.code = e.response.status_code @@ -198,7...
ray-project__ray-8493
import error ray 0.8.5,when I try to use ray, it occurs Ray must be imported before pickle5 because Ray requires a specific version of pickle5 (which is packaged along with Ray. I want to know it must import pickle5 before import ray, Right?
[ { "content": "import os\nimport logging\nfrom os.path import dirname\nimport sys\n\nlogger = logging.getLogger(__name__)\n\n# MUST add pickle5 to the import path because it will be imported by some\n# raylet modules.\n\nif \"pickle5\" in sys.modules:\n raise ImportError(\"Ray must be imported before pickle5 ...
[ { "content": "import os\nimport logging\nfrom os.path import dirname\nimport sys\n\nlogger = logging.getLogger(__name__)\n\n# MUST add pickle5 to the import path because it will be imported by some\n# raylet modules.\n\nif \"pickle5\" in sys.modules:\n import pkg_resources\n version_info = pkg_resources.r...
diff --git a/build.sh b/build.sh index 37f5ad8dbc97e..803dc5067d6a8 100755 --- a/build.sh +++ b/build.sh @@ -143,9 +143,9 @@ if [ "$RAY_BUILD_PYTHON" == "YES" ]; then # Install pickle5-backport. TEMP_DIR="$(mktemp -d)" pushd "$TEMP_DIR" - curl -f -s -L -R -o "pickle5-backport.zip" "https://github.com/...
iterative__dvc-1004
`dvc status` print something even if project is just initialized Empty outputs look like a bug
[ { "content": "from dvc.command.data_sync import CmdDataBase\n\n\nclass CmdDataStatus(CmdDataBase):\n STATUS_LEN = 10\n STATUS_INDENT = '\\t'\n\n def _normalize(self, s):\n s += ':'\n assert len(s) < self.STATUS_LEN\n return s + (self.STATUS_LEN - len(s))*' '\n\n def _show(self, ...
[ { "content": "from dvc.command.data_sync import CmdDataBase\n\n\nclass CmdDataStatus(CmdDataBase):\n STATUS_LEN = 10\n STATUS_INDENT = '\\t'\n\n def _normalize(self, s):\n s += ':'\n assert len(s) < self.STATUS_LEN\n return s + (self.STATUS_LEN - len(s))*' '\n\n def _show(self, ...
diff --git a/dvc/command/status.py b/dvc/command/status.py index 33b3ce3e5b..2dfe7c7cd3 100644 --- a/dvc/command/status.py +++ b/dvc/command/status.py @@ -29,7 +29,11 @@ def do_run(self, target=None): cloud=self.args.cloud, show_checksums=self....
lutris__lutris-488
Specify a User Agent for HTTP requests Right now it's python-urllib/someversion, and Cloudflare sites (tested on medium protection site) blocks it and returns 403 status code. Testing the same url with curl works without it blocking, so I'm guessing Cloudflare checks the request UA.
[ { "content": "import json\nimport socket\nimport urllib.request\nimport urllib.error\nimport urllib.parse\nfrom ssl import CertificateError\n\nfrom lutris.settings import SITE_URL\nfrom lutris.util.log import logger\n\n\nclass Request(object):\n def __init__(self, url, timeout=5, stop_request=None,\n ...
[ { "content": "import json\nimport socket\nimport urllib.request\nimport urllib.error\nimport urllib.parse\nfrom ssl import CertificateError\n\nfrom lutris.settings import PROJECT\nfrom lutris.settings import VERSION\nfrom lutris.settings import SITE_URL\nfrom lutris.util.log import logger\n\n\nclass Request(obj...
diff --git a/lutris/util/http.py b/lutris/util/http.py index 5eb7e3c028..7c1fba47bd 100644 --- a/lutris/util/http.py +++ b/lutris/util/http.py @@ -5,6 +5,8 @@ import urllib.parse from ssl import CertificateError +from lutris.settings import PROJECT +from lutris.settings import VERSION from lutris.settings import S...
pypa__pipenv-4519
Pipfile.lock contains md5 hashes on my docker build ### Issue description I have a problem with pipfile.lock and I can't find out what is causing it. On my local machine, which is a Windows 10 if I remove Pipfile.lock and issue a `pipenv install` I get sha256 hashes in Pipfile.lock, as seen here: ``` "color...
[ { "content": "# coding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport collections\nimport copy\nimport hashlib\nimport os\nfrom contextlib import contextmanager\nfrom shutil import rmtree\n\nfrom pip_shims.shims import (\n TempDirectory,\n global_tempd...
[ { "content": "# coding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport collections\nimport copy\nimport hashlib\nimport os\nfrom contextlib import contextmanager\nfrom shutil import rmtree\n\nfrom pip_shims.shims import (\n TempDirectory,\n global_tempd...
diff --git a/news/4517.bugfix.rst b/news/4517.bugfix.rst new file mode 100644 index 0000000000..d8cd4c3e28 --- /dev/null +++ b/news/4517.bugfix.rst @@ -0,0 +1 @@ +Restrict the acceptable hash type to SHA256 only. diff --git a/pipenv/patched/piptools/repositories/pypi.py b/pipenv/patched/piptools/repositories/pypi.py in...
keras-team__keras-2980
Why TF-IDF matrix generated by keras.preprocessing.text.Tokenizer() has negative values? Say, if run the following script: > > > import keras > > > tk = keras.preprocessing.text.Tokenizer() > > > texts = ['I love you.', 'I love you, too.'] > > > tk.fit_on_texts(texts) > > > tk.texts_to_matrix(texts, mode='tfidf') The...
[ { "content": "# -*- coding: utf-8 -*-\n'''These preprocessing utilities would greatly benefit\nfrom a fast Cython rewrite.\n'''\nfrom __future__ import absolute_import\n\nimport string\nimport sys\nimport numpy as np\nfrom six.moves import range\nfrom six.moves import zip\n\nif sys.version_info < (3,):\n mak...
[ { "content": "# -*- coding: utf-8 -*-\n'''These preprocessing utilities would greatly benefit\nfrom a fast Cython rewrite.\n'''\nfrom __future__ import absolute_import\n\nimport string\nimport sys\nimport numpy as np\nfrom six.moves import range\nfrom six.moves import zip\n\nif sys.version_info < (3,):\n mak...
diff --git a/keras/preprocessing/text.py b/keras/preprocessing/text.py index 09c60481d1cb..1300a7ef3994 100644 --- a/keras/preprocessing/text.py +++ b/keras/preprocessing/text.py @@ -206,8 +206,10 @@ def sequences_to_matrix(self, sequences, mode='binary'): elif mode == 'binary': X[...
django-haystack__django-haystack-1686
DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm') I'm getting the following `setuptools_scm` error when trying to install via the latest version of pip in a virtual environment. As you can see in the code below, setuptools_scm does appear to be installed. I'm trying to figure ...
[ { "content": "#!/usr/bin/env python\n# encoding: utf-8\n\n# n.b. we can't have unicode_literals here due to http://bugs.python.org/setuptools/issue152\nfrom __future__ import absolute_import, division, print_function\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from ez_setup import use_se...
[ { "content": "#!/usr/bin/env python\n# encoding: utf-8\n\nfrom setuptools import setup\n\ninstall_requires = [\"Django>=1.11\"]\n\ntests_require = [\n \"pysolr>=3.7.0\",\n \"whoosh>=2.5.4,<3.0\",\n \"python-dateutil\",\n \"geopy==0.95.1\",\n \"nose\",\n \"mock\",\n \"coverage\",\n \"requ...
diff --git a/setup.cfg b/setup.cfg index 8cfac863d..5e3dd1772 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,7 @@ ignore = E203, E501, W503 line_length=88 default_section=THIRDPARTY known_first_party=haystack + +[options] +setup_requires = + setuptools_scm diff --git a/setup.py b/setup.py index 887956047..3c17...
mne-tools__mne-bids-111
prune dependencies that we do not really depend on As became apparent in a discussion with @agramfort and @jasmainak, we probably do not need the `environment.yml` and instead should rely on minimal dependencies such as numpy, scipy, and matplotlib. if we decide to keep the `environment.yml` for convenience during i...
[ { "content": "\"\"\"Helper functions to fetch data to work with.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Stefan Appelhoff <stefan.appelhoff@mailbox.org>\n#\...
[ { "content": "\"\"\"Helper functions to fetch data to work with.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Stefan Appelhoff <stefan.appelhoff@mailbox.org>\n#\...
diff --git a/.circleci/config.yml b/.circleci/config.yml index df1cf6358..07d8e98c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,14 +15,17 @@ jobs: - run: name: Setup Python environment command: | - conda update --yes --quiet conda; ...
secdev__scapy-2604
[ipv6] Scapy cannot recognize the reply of an ICMP6 echo request. #### Brief description Scapy cannot recognize the reply of an ICMP6 echo request. #### Environment - Scapy version: 2.4.3 - Python version: 2.7.3 - Operating System: openSUSE 12.3 (x86_64) my ppp network interface: ``` # ip a s dev ...
[ { "content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\n\n\nimport arr...
[ { "content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\n\n\nimport arr...
diff --git a/scapy/arch/linux.py b/scapy/arch/linux.py index 4abe14e3967..fd979f0b9a5 100644 --- a/scapy/arch/linux.py +++ b/scapy/arch/linux.py @@ -559,10 +559,15 @@ def send(self, x): self.outs.bind(sdto) sn = self.outs.getsockname() ll = lambda x: x - if type(x) in conf.l3types: - ...
ipython__ipython-3640
setp() issue in ipython notebook with figure references In IPython notebook, when I run `setp()` to change parameters of a figure created in another cell and accessed with its reference, an exception occurs ``` python --------------------------------------------------------------------------- AttributeError ...
[ { "content": "\"\"\"Produce SVG versions of active plots for display by the rich Qt frontend.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\nfrom __future__ import print_function\...
[ { "content": "\"\"\"Produce SVG versions of active plots for display by the rich Qt frontend.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\nfrom __future__ import print_function\...
diff --git a/IPython/kernel/zmq/pylab/backend_inline.py b/IPython/kernel/zmq/pylab/backend_inline.py index 4e50e6c31cc..6241e043216 100644 --- a/IPython/kernel/zmq/pylab/backend_inline.py +++ b/IPython/kernel/zmq/pylab/backend_inline.py @@ -122,8 +122,10 @@ def draw_if_interactive(): # execution. Also sets the _d...
iterative__dvc-2554
SSH remote permission error Hi I get a permission error when trying to push to an ssh remote. I assume it is due to the fact, that I don't have full permission on the remote (only from /cluster/data/user onwards) As far as I can see dvc tries to create directories from the root. https://github.com/iterative/dvc...
[ { "content": "import os\nimport posixpath\nimport logging\nimport errno\nimport stat\nfrom funcy import cached_property\n\ntry:\n import paramiko\nexcept ImportError:\n paramiko = None\n\nfrom dvc.utils import tmp_fname\nfrom dvc.utils.compat import ignore_file_not_found\nfrom dvc.progress import Tqdm\nfr...
[ { "content": "import os\nimport posixpath\nimport logging\nimport errno\nimport stat\nfrom funcy import cached_property\n\ntry:\n import paramiko\nexcept ImportError:\n paramiko = None\n\nfrom dvc.utils import tmp_fname\nfrom dvc.utils.compat import ignore_file_not_found\nfrom dvc.progress import Tqdm\nfr...
diff --git a/dvc/remote/ssh/connection.py b/dvc/remote/ssh/connection.py index 4e1e52a430..dcbb1727cc 100644 --- a/dvc/remote/ssh/connection.py +++ b/dvc/remote/ssh/connection.py @@ -106,7 +106,10 @@ def makedirs(self, path): # Since paramiko errors are very vague we need to recheck # ...
qtile__qtile-1546
Improve documentation for image widget I wanted to add icons to my bar and found the image widget to do that. But from the documentation it seems quite inflexible. From the documentation my only option for resizing and positioning is scale, which means I can either keep the original size or resize it to the size of the...
[ { "content": "# Copyright (c) 2008-2010 Aldo Cortesi\n# Copyright (c) 2011 Florian Mounier\n# Copyright (c) 2011 Kenji_Takahashi\n# Copyright (c) 2011 Paul Colomiets\n# Copyright (c) 2012 roger\n# Copyright (c) 2012 Craig Barnes\n# Copyright (c) 2012-2015 Tycho Andersen\n# Copyright (c) 2013 dequis\n# Copyright...
[ { "content": "# Copyright (c) 2008-2010 Aldo Cortesi\n# Copyright (c) 2011 Florian Mounier\n# Copyright (c) 2011 Kenji_Takahashi\n# Copyright (c) 2011 Paul Colomiets\n# Copyright (c) 2012 roger\n# Copyright (c) 2012 Craig Barnes\n# Copyright (c) 2012-2015 Tycho Andersen\n# Copyright (c) 2013 dequis\n# Copyright...
diff --git a/libqtile/widget/base.py b/libqtile/widget/base.py index 834b41898b..ce2b59390b 100644 --- a/libqtile/widget/base.py +++ b/libqtile/widget/base.py @@ -545,7 +545,7 @@ def poll(self): # these two classes below look SUSPICIOUSLY similar -class PaddingMixin: +class PaddingMixin(configurable.Configurable):...
pex-tool__pex-2166
Release 2.1.138 On the docket: + [x] Bad installed_wheels dir when a wheel's top_level.txt dirname collides with sources #2160 + [x] Sporadic Pip HTTP errors in CI #2163
[ { "content": "# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\n__version__ = \"2.1.137\"\n", "path": "pex/version.py" }, { "content": "# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed ...
[ { "content": "# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\n__version__ = \"2.1.138\"\n", "path": "pex/version.py" }, { "content": "# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed ...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c37fd08ab..6950592f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,13 +48,7 @@ jobs: strategy: matrix: include: - # N.B.: We need 20.04 for Python 2.7 & 3.5 tool cache support. - -...
conan-io__conan-2525
cmake compiler check do not recognize compiler in cross build (Windows to Android) With Conan 1.0.4, trying to build bzip2 or zlib (In Windows) with the Android toolchain described in the docs and blogpost **Profile:** ```config standalone_toolchain=C:/ndk/arm_21_toolchain target_host=arm-linux-androideabi cc_...
[ { "content": "_cmake_single_dep_vars = \"\"\"set(CONAN_{dep}_ROOT{build_type} {deps.rootpath})\nset(CONAN_INCLUDE_DIRS_{dep}{build_type} {deps.include_paths})\nset(CONAN_LIB_DIRS_{dep}{build_type} {deps.lib_paths})\nset(CONAN_BIN_DIRS_{dep}{build_type} {deps.bin_paths})\nset(CONAN_RES_DIRS_{dep}{build_type} {de...
[ { "content": "_cmake_single_dep_vars = \"\"\"set(CONAN_{dep}_ROOT{build_type} {deps.rootpath})\nset(CONAN_INCLUDE_DIRS_{dep}{build_type} {deps.include_paths})\nset(CONAN_LIB_DIRS_{dep}{build_type} {deps.lib_paths})\nset(CONAN_BIN_DIRS_{dep}{build_type} {deps.bin_paths})\nset(CONAN_RES_DIRS_{dep}{build_type} {de...
diff --git a/conans/client/generators/cmake_common.py b/conans/client/generators/cmake_common.py index 7228f2b5afa..35803564b1f 100644 --- a/conans/client/generators/cmake_common.py +++ b/conans/client/generators/cmake_common.py @@ -379,7 +379,12 @@ def generate_targets_section(dependencies): message(STATUS "W...
UTNkar__moore-512
Fix navigation bar on laptop screens On utn.se there are many items in the menu. On laptop screens (1366x768 pixels) the navigation bar splits into two rows which makes it unusable. To solve this, make the navigation bar scrollable if it's width gets to long. That way it will still be usable. This is done by setting `s...
[ { "content": "from django import template\n\nfrom branding.models import Logo, SocialMediaSettings, FooterSettings\nfrom wagtail.core.models import Site\n\nregister = template.Library()\n\n\n@register.inclusion_tag('branding/tags/footer.html', takes_context=True)\ndef custom_footer(context):\n request = cont...
[ { "content": "from django import template\n\nfrom branding.models import Logo, SocialMediaSettings, FooterSettings\nfrom wagtail.core.models import Site\n\nregister = template.Library()\n\n\n@register.inclusion_tag('branding/tags/footer.html', takes_context=True)\ndef custom_footer(context):\n request = cont...
diff --git a/README.md b/README.md index 23be97dc..870bb38f 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,16 @@ To create translations for an app: since those cannot handle all the subtleties) to fix the translations. 4. `../manage.py compilemessages` +## Notes about the materialize framework + +Project moore...
PrefectHQ__prefect-3127
LocalDaskExecutor with "processes" scheduler runs some tasks twice ## Description I noticed that when running a Flow containing mapped tasks via the `LocalDaskExecutor(scheduler="processes")` some of the tasks in the flow run twice, and in worst case scenario the whole pipeline runs twice. With all the other execut...
[ { "content": "import logging\nimport uuid\nimport warnings\nimport weakref\nfrom contextlib import contextmanager\nfrom typing import Any, Callable, Iterator, TYPE_CHECKING, Union, Optional\n\nfrom prefect import context\nfrom prefect.engine.executors.base import Executor\nfrom prefect.utilities.importtools imp...
[ { "content": "import logging\nimport uuid\nimport warnings\nimport weakref\nfrom contextlib import contextmanager\nfrom typing import Any, Callable, Iterator, TYPE_CHECKING, Union, Optional\n\nfrom prefect import context\nfrom prefect.engine.executors.base import Executor\nfrom prefect.utilities.importtools imp...
diff --git a/changes/pr3127.yaml b/changes/pr3127.yaml new file mode 100644 index 000000000000..3a28785625b1 --- /dev/null +++ b/changes/pr3127.yaml @@ -0,0 +1,2 @@ +fix: + - "Fix bug with `LocalDaskExecutor('processes')` that allowed tasks to be run multiple times in certain cases - [#3127](https://github.com/Prefect...
litestar-org__litestar-2377
Docs: stale chart for lifecycle hooks ### Summary ![image](https://github.com/litestar-org/litestar/assets/20659309/38edd05f-1942-49a7-96f5-f4d498fefbba) We only have `on_startup` and `on_shutdown` hooks now, so this should probably be removed. <!-- POLAR PLEDGE BADGE START --> --- ## Funding * If you would like ...
[ { "content": "from __future__ import annotations\n\nimport inspect\nimport logging\nimport os\nfrom contextlib import AbstractAsyncContextManager, AsyncExitStack, asynccontextmanager, suppress\nfrom datetime import date, datetime, time, timedelta\nfrom functools import partial\nfrom itertools import chain\nfrom...
[ { "content": "from __future__ import annotations\n\nimport inspect\nimport logging\nimport os\nfrom contextlib import AbstractAsyncContextManager, AsyncExitStack, asynccontextmanager, suppress\nfrom datetime import date, datetime, time, timedelta\nfrom functools import partial\nfrom itertools import chain\nfrom...
diff --git a/docs/usage/applications.rst b/docs/usage/applications.rst index 3bd7aeec21..5e33cc9528 100644 --- a/docs/usage/applications.rst +++ b/docs/usage/applications.rst @@ -36,8 +36,8 @@ order, once the ASGI server (uvicorn, hypercorn, etc.) emits the respective even .. mermaid:: flowchart LR - Start...
larq__larq-596
__version__ ### Feature motivation Is there a way to dynamically poll the version of larq (or lce or larq-zoo for that matter)? If not, could it be done using `__version__` as usual for standard library modules? ### Feature description ``` import larq print(larq.__version__) ```
[ { "content": "from setuptools import find_packages, setup\n\n\ndef readme():\n with open(\"README.md\", \"r\") as f:\n return f.read()\n\n\nsetup(\n name=\"larq\",\n version=\"0.10.1\",\n python_requires=\">=3.6\",\n author=\"Plumerai\",\n author_email=\"opensource@plumerai.com\",\n ...
[ { "content": "from setuptools import find_packages, setup\n\n\ndef readme():\n with open(\"README.md\", \"r\") as f:\n return f.read()\n\n\nsetup(\n name=\"larq\",\n version=\"0.10.1\",\n python_requires=\">=3.6\",\n author=\"Plumerai\",\n author_email=\"opensource@plumerai.com\",\n ...
diff --git a/larq/__init__.py b/larq/__init__.py index 1c11de1d..6682684f 100644 --- a/larq/__init__.py +++ b/larq/__init__.py @@ -12,6 +12,14 @@ utils, ) +try: + from importlib import metadata # type: ignore +except ImportError: + # Running on pre-3.8 Python; use importlib-metadata package + import i...
easybuilders__easybuild-easyblocks-2109
EB_PYTHON startup behaviour The documentation at https://easybuild.readthedocs.io/en/latest/Python-2-3-compatibility.html?#controlling-which-python-command-easybuild-will-use-via-eb-python suggests that one can control which version of Python EasyBuild will use by setting EB_PYTHON. Since https://github.com/easybuil...
[ { "content": "# #\n# Copyright 2013-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# ...
[ { "content": "# #\n# Copyright 2013-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# ...
diff --git a/easybuild/easyblocks/e/easybuildmeta.py b/easybuild/easyblocks/e/easybuildmeta.py index 95f9403869f..5e9ca62c012 100644 --- a/easybuild/easyblocks/e/easybuildmeta.py +++ b/easybuild/easyblocks/e/easybuildmeta.py @@ -219,10 +219,11 @@ def sanity_check_step(self): def make_module_extra(self): ...
ckan__ckan-4265
Upload logo is not working ### CKAN Version if known (or site URL) 2.8+ ### Please describe the expected behaviour When uploading logo from config page, we should see new logo on the portal ### Please describe the actual behaviour Logo is not uploaded ### What steps can be taken to reproduce the issue? ...
[ { "content": "# encoding: utf-8\n\nimport logging\n\nfrom ckan.controllers.home import CACHE_PARAMETERS\nfrom flask import Blueprint\nfrom flask.views import MethodView\n\nimport ckan.lib.app_globals as app_globals\nimport ckan.lib.base as base\nimport ckan.lib.helpers as h\nimport ckan.lib.navl.dictization_fun...
[ { "content": "# encoding: utf-8\n\nimport logging\n\nfrom ckan.controllers.home import CACHE_PARAMETERS\nfrom flask import Blueprint\nfrom flask.views import MethodView\n\nimport ckan.lib.app_globals as app_globals\nimport ckan.lib.base as base\nimport ckan.lib.helpers as h\nimport ckan.lib.navl.dictization_fun...
diff --git a/ckan/views/admin.py b/ckan/views/admin.py index 3a80ffbd56d..defd3850f17 100644 --- a/ckan/views/admin.py +++ b/ckan/views/admin.py @@ -110,11 +110,14 @@ def get(self): def post(self): try: + req = request.form.copy() + req.update(request.files.to_dict()) ...
mathesar-foundation__mathesar-3267
Add openAPI Specification for UI related databases endpoint Generate openAPI spec for `databases` endpoint corresponding to UI
[ { "content": "def custom_preprocessing_hook(endpoints):\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n if path.startswith(\"/api/db/v0/databases/\") or path.startswith(\"/api/db/v0/data_files/\") or path.startswith(\"/api/db/v0...
[ { "content": "def custom_preprocessing_hook(endpoints):\n prefixes = [\n \"/api/db/v0/databases/\",\n \"/api/db/v0/data_files/\",\n \"/api/db/v0/schemas/\",\n \"/api/db/v0/tables/\",\n \"/api/db/v0/links/\",\n \"/api/db/v0/queries/\",\n \"/api/ui/v0/databases/...
diff --git a/config/settings/openapi.py b/config/settings/openapi.py index 1095acbd77..e71ef3141e 100644 --- a/config/settings/openapi.py +++ b/config/settings/openapi.py @@ -1,9 +1,14 @@ def custom_preprocessing_hook(endpoints): - filtered = [] - for (path, path_regex, method, callback) in endpoints: - #...
ivy-llc__ivy-19895
dropout2d
[ { "content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_d...
[ { "content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n@with_supported_dty...
diff --git a/ivy/functional/frontends/mindspore/ops/function/nn_func.py b/ivy/functional/frontends/mindspore/ops/function/nn_func.py index 2644f25d4880a..ce699c26ddea7 100644 --- a/ivy/functional/frontends/mindspore/ops/function/nn_func.py +++ b/ivy/functional/frontends/mindspore/ops/function/nn_func.py @@ -6,6 +6,23 @...
modoboa__modoboa-1350
error when updating email info # Impacted versions * Modoboa: 1.8.2 * installer used: Yes/No Yes * Webserver: Nginx # Steps to reproduce As admin user, edit user. # Current behavior When clicking on "update", on the mail tab I see the following error message, " Failed to retrieve mailbox location (sudo: n...
[ { "content": "\"\"\"Models related to mailboxes management.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport os\nimport pwd\n\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\nfrom django.db.models import Q\nfrom django.db.models.manager import Manager\nfrom dj...
[ { "content": "\"\"\"Models related to mailboxes management.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport os\nimport pwd\n\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\nfrom django.db.models import Q\nfrom django.db.models.manager import Manager\nfrom dj...
diff --git a/modoboa/admin/models/mailbox.py b/modoboa/admin/models/mailbox.py index 790cf9fbb..d32005959 100644 --- a/modoboa/admin/models/mailbox.py +++ b/modoboa/admin/models/mailbox.py @@ -158,11 +158,11 @@ def mail_home(self): if curuser != mbowner: options["sudo_user"] = mbowner ...
zalando__patroni-1888
Disable creation of PGPASS if using kerberos Hello, It doesn't make sense to create `PGPASS` file if we are using [kerberos](https://github.com/zalando/patroni/pull/1015). Can we disable in that case? PGPASS is being created in [here](https://github.com/zalando/patroni/blob/881bba9e1cd081f7cd4c340f9a6ad977daa92c5...
[ { "content": "import logging\nimport os\nimport re\nimport shutil\nimport socket\nimport stat\nimport time\n\nfrom six.moves.urllib_parse import urlparse, parse_qsl, unquote\n\nfrom .validator import CaseInsensitiveDict, recovery_parameters,\\\n transform_postgresql_parameter_value, transform_recovery_pa...
[ { "content": "import logging\nimport os\nimport re\nimport shutil\nimport socket\nimport stat\nimport time\n\nfrom six.moves.urllib_parse import urlparse, parse_qsl, unquote\n\nfrom .validator import CaseInsensitiveDict, recovery_parameters,\\\n transform_postgresql_parameter_value, transform_recovery_pa...
diff --git a/patroni/postgresql/config.py b/patroni/postgresql/config.py index d6e70bc72..9d0b23529 100644 --- a/patroni/postgresql/config.py +++ b/patroni/postgresql/config.py @@ -336,8 +336,9 @@ def check_directories(self): if "stats_temp_directory" in self._server_parameters: self.try_to_create...
django-cms__django-cms-2720
deleting a language after having the user language set to this language raises 500
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.constants import LEFT\nfrom cms.models import UserSettings, Placeholder\nfrom cms.toolbar.items import Menu, ToolbarAPIMixin, ButtonList\nfrom cms.toolbar_pool import toolbar_pool\nfrom cms.utils import get_language_from_request\nfrom cms.utils.i18n import force_l...
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.constants import LEFT\nfrom cms.models import UserSettings, Placeholder\nfrom cms.toolbar.items import Menu, ToolbarAPIMixin, ButtonList\nfrom cms.toolbar_pool import toolbar_pool\nfrom cms.utils import get_language_from_request\nfrom cms.utils.i18n import force_l...
diff --git a/cms/tests/toolbar.py b/cms/tests/toolbar.py index 3bd1bc404e4..2fd8493fc9c 100644 --- a/cms/tests/toolbar.py +++ b/cms/tests/toolbar.py @@ -1,4 +1,5 @@ from __future__ import with_statement +from cms.models import UserSettings import re from django.template.defaultfilters import truncatewords import da...
ytdl-org__youtube-dl-1591
Opus audio conversion failure When trying to extract and convert audio from a youtube video into an opus-encoded audio file I get "ERROR: audio conversion failed:" with no further explanation. Both libopus0 and opus-tools are installed and I have no problems with other codecs like vorbis. I'm not sure if this is becaus...
[ { "content": "import os\nimport subprocess\nimport sys\nimport time\nimport datetime\n\nfrom .utils import *\n\n\nclass PostProcessor(object):\n \"\"\"Post Processor class.\n\n PostProcessor objects can be added to downloaders with their\n add_post_processor() method. When the downloader has finished a...
[ { "content": "import os\nimport subprocess\nimport sys\nimport time\nimport datetime\n\nfrom .utils import *\n\n\nclass PostProcessor(object):\n \"\"\"Post Processor class.\n\n PostProcessor objects can be added to downloaders with their\n add_post_processor() method. When the downloader has finished a...
diff --git a/youtube_dl/PostProcessor.py b/youtube_dl/PostProcessor.py index fbf8a7f98ff..07b6895c0ab 100644 --- a/youtube_dl/PostProcessor.py +++ b/youtube_dl/PostProcessor.py @@ -178,7 +178,8 @@ def run(self, information): extension = self._preferredcodec more_opts = [] if self....
pennersr__django-allauth-2087
LinkedIn - Changes to OAuth 2.0 URLs LinkedIn flow is broken due to these changes (from August 6, 2018): https://developer.linkedin.com/blog/posts/2018/redirecting-oauth-uas So: access_token_url = 'https://api.linkedin.com/uas/oauth2/accessToken' authorize_url = 'https://www.linkedin.com/uas/oauth2/authorization...
[ { "content": "import requests\n\nfrom allauth.socialaccount.providers.oauth2.views import (\n OAuth2Adapter,\n OAuth2CallbackView,\n OAuth2LoginView,\n)\n\nfrom .provider import LinkedInOAuth2Provider\n\n\nclass LinkedInOAuth2Adapter(OAuth2Adapter):\n provider_id = LinkedInOAuth2Provider.id\n acc...
[ { "content": "import requests\n\nfrom allauth.socialaccount.providers.oauth2.views import (\n OAuth2Adapter,\n OAuth2CallbackView,\n OAuth2LoginView,\n)\n\nfrom .provider import LinkedInOAuth2Provider\n\n\nclass LinkedInOAuth2Adapter(OAuth2Adapter):\n provider_id = LinkedInOAuth2Provider.id\n acc...
diff --git a/allauth/socialaccount/providers/linkedin_oauth2/views.py b/allauth/socialaccount/providers/linkedin_oauth2/views.py index 637f116909..da8bb3feef 100644 --- a/allauth/socialaccount/providers/linkedin_oauth2/views.py +++ b/allauth/socialaccount/providers/linkedin_oauth2/views.py @@ -11,8 +11,8 @@ class Li...
rucio__rucio-2801
1.20.4rc2 storm protocol bug Motivation ---------- The Storm protocol in RSEManager returns the input lfn as the pfn in lfns2pfns. This causes a crash as an InternalScope is then used as a dictionary key in list_replicas. Modification ------------ The lfns dictionary should be sanitised so that scope is returned...
[ { "content": "# Copyright European Organization for Nuclear Research (CERN)\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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# A...
[ { "content": "# Copyright European Organization for Nuclear Research (CERN)\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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# A...
diff --git a/lib/rucio/rse/protocols/storm.py b/lib/rucio/rse/protocols/storm.py index 16fde1b769..1d599199af 100644 --- a/lib/rucio/rse/protocols/storm.py +++ b/lib/rucio/rse/protocols/storm.py @@ -43,8 +43,23 @@ def _get_path(self, scope, name): return '%s/%s' % (scope, name) def lfns2pfns(self, lfns)...
easybuilders__easybuild-easyblocks-1878
Increase timeout of CUDA install The current CUDA EB fails on our Power system with `== FAILED: Installation ended unsuccessfully (build directory: /tmp/easybuild_build-ml/CUDA/10.1.243/GCC-8.3.0): build failed (first 300 chars): run_cmd_qa: cmd ./cuda-installer --silent --toolkit --toolkitpath=/scratch/ws/s32489...
[ { "content": "##\n# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild\n#\n# Copyright:: Copyright 2012-2019 Cyprus Institute / CaSToRC, Uni.Lu, NTUA, Ghent University, Forschungszentrum Juelich GmbH\n# Authors:: George Tsouloupas <g.tsouloupas@cyi.ac.cy>, Fotis Georgatos <fotis...
[ { "content": "##\n# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild\n#\n# Copyright:: Copyright 2012-2019 Cyprus Institute / CaSToRC, Uni.Lu, NTUA, Ghent University, Forschungszentrum Juelich GmbH\n# Authors:: George Tsouloupas <g.tsouloupas@cyi.ac.cy>, Fotis Georgatos <fotis...
diff --git a/easybuild/easyblocks/c/cuda.py b/easybuild/easyblocks/c/cuda.py index 51532e78c61..fc0de0f39ca 100644 --- a/easybuild/easyblocks/c/cuda.py +++ b/easybuild/easyblocks/c/cuda.py @@ -153,9 +153,9 @@ def install_step(self): # instead of segfaulting in the cuda-installer. remove_file('/tmp/cud...
aws-cloudformation__cfn-lint-674
AttributeError: 'PosixPath' object has no attribute 'read_text' *cfn-lint version:* 0.9.x & 0.11.x *Description of issue.* When running `cfn-lint -c I -t <path to template.yml> -a <path to rules>` with a .cfnlintrc file, I receive the error from here: https://github.com/awslabs/cfn-python-lint/blob/master/src/cfn...
[ { "content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
[ { "content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
diff --git a/src/cfnlint/config.py b/src/cfnlint/config.py index 55653fe708..a130acbe3b 100644 --- a/src/cfnlint/config.py +++ b/src/cfnlint/config.py @@ -21,8 +21,8 @@ import json import os import six -import yaml import jsonschema +import cfnlint.decode.cfn_yaml from cfnlint.version import __version__ try: # p...
fedora-infra__bodhi-3718
Override active time typo The time remaining for Overrides says something like "still active for in 7 days". There is an extra 'in' in that statement. Or it should say 'Expires in 7 days'.
[ { "content": "# Copyright © 2007-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 © 2007-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/templates/fragments.html b/bodhi/server/templates/fragments.html index 897e8ca88a..97e7fdf6c2 100644 --- a/bodhi/server/templates/fragments.html +++ b/bodhi/server/templates/fragments.html @@ -193,7 +193,7 @@ ${update['user']['name']} </a> %endif - ...
pypa__setuptools-3205
When parsing `pyproject.toml` current implementation will overwrite dist.include_package_data What I find confusing with the include_package_data explanation is that even if I set it to False manually in setup.py I still see the same weird behavior. Do you expect that ? _Originally posted by @MatthieuDartiailh in ht...
[ { "content": "\"\"\"Load setuptools configuration from ``pyproject.toml`` files\"\"\"\nimport logging\nimport os\nimport warnings\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom typing import TYPE_CHECKING, Callable, Dict, Optional, Mapping, Union\n\nfrom setuptools.errors import Fil...
[ { "content": "\"\"\"Load setuptools configuration from ``pyproject.toml`` files\"\"\"\nimport logging\nimport os\nimport warnings\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom typing import TYPE_CHECKING, Callable, Dict, Optional, Mapping, Union\n\nfrom setuptools.errors import Fil...
diff --git a/CHANGES.rst b/CHANGES.rst index 3c6dc17a25..23ca208598 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -26,6 +26,15 @@ Breaking Changes You can check details about the automatic discovery (and how to configure a different behaviour) in :doc:`/userguide/package_discovery`. +* #3067: If the file ``pypr...
pyro-ppl__pyro-3002
[bug] bart.py example consistently fails with cholesky error with default arguments I'm just attempting to get started using pyro, and was trying to work through examples when I found that the example listed on the example page under "Multivariate Forecasting" reliably fails for me. I see that there is a related ope...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nimport argparse\nimport logging\n\nimport numpy as np\nimport torch\n\nimport pyro\nimport pyro.distributions as dist\nfrom pyro.contrib.examples.bart import load_bart_od\nfrom pyro.contrib.forecast import Fore...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nimport argparse\nimport logging\n\nimport numpy as np\nimport torch\n\nimport pyro\nimport pyro.distributions as dist\nfrom pyro.contrib.examples.bart import load_bart_od\nfrom pyro.contrib.forecast import Fore...
diff --git a/examples/contrib/forecast/bart.py b/examples/contrib/forecast/bart.py index fb7b1d9ee3..06e80c8d37 100644 --- a/examples/contrib/forecast/bart.py +++ b/examples/contrib/forecast/bart.py @@ -171,7 +171,7 @@ def transform(pred, truth): parser.add_argument("--test-window", default=336, type=int) par...
biolab__orange3-5702
Orange.statistics.util.py: improper computation of missing meta values 1. Metas are always read as dtype=object. Try to read them as float64 if possible (numeric, categorical, datetime). 2. If dtype=object (at least one string meta variable), compute better statistics for primitive variables. Example no1: Datasets...
[ { "content": "\"\"\"\nThis module provides alternatives for the few additional functions found in\nand once used from the bottlechest package (fork of bottleneck).\n\nIt also patches bottleneck to contain these functions.\n\"\"\"\nimport warnings\nfrom typing import Iterable\n\nimport bottleneck as bn\nimport n...
[ { "content": "\"\"\"\nThis module provides alternatives for the few additional functions found in\nand once used from the bottlechest package (fork of bottleneck).\n\nIt also patches bottleneck to contain these functions.\n\"\"\"\nimport warnings\nfrom typing import Iterable\n\nimport bottleneck as bn\nimport n...
diff --git a/Orange/statistics/util.py b/Orange/statistics/util.py index 87af6833f7a..6ef6509e395 100644 --- a/Orange/statistics/util.py +++ b/Orange/statistics/util.py @@ -9,6 +9,7 @@ import bottleneck as bn import numpy as np +import pandas import scipy.stats.stats from scipy import sparse as sp @@ -373,8 +37...
jupyterhub__jupyterhub-443
Spawner custom form validation Are there ideas for allowing form validation for spawners that have a custom form? I was thinking of raising an exception in `options_from_form()` and moving the `try` up by one line in [SpawnHandler](https://github.com/jupyter/jupyterhub/blob/master/jupyterhub/handlers/pages.py#L97).
[ { "content": "\"\"\"Basic html-rendering handlers.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom tornado import web, gen\n\nfrom .. import orm\nfrom ..utils import admin_only, url_path_join\nfrom .base import BaseHandler\nfrom .login impor...
[ { "content": "\"\"\"Basic html-rendering handlers.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom tornado import web, gen\n\nfrom .. import orm\nfrom ..utils import admin_only, url_path_join\nfrom .base import BaseHandler\nfrom .login impor...
diff --git a/jupyterhub/handlers/pages.py b/jupyterhub/handlers/pages.py index f1d5c73f35..6575d1a822 100644 --- a/jupyterhub/handlers/pages.py +++ b/jupyterhub/handlers/pages.py @@ -93,8 +93,8 @@ def post(self): form_options[key] = [ bs.decode('utf8') for bs in byte_list ] for key, byte_list in s...
projectmesa__mesa-1941
JupyterViz: Easy way to plot multiple measures in 1 figure **What's the problem this feature will solve?** Currently, each agent variable can only be plotted in separate figures. The virus on a network example is one such use case where we want to plot everything in one figure. See https://github.com/projectmesa/mesa-...
[ { "content": "import sys\nimport threading\nfrom typing import Optional\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport reacton.ipywidgets as widgets\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\nfrom solara.alias import rv\n\nimport mesa\n\n#...
[ { "content": "import sys\nimport threading\nfrom typing import Optional\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport reacton.ipywidgets as widgets\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\nfrom solara.alias import rv\n\nimport mesa\n\n#...
diff --git a/mesa/experimental/jupyter_viz.py b/mesa/experimental/jupyter_viz.py index 63165eb6ca4..f4ac1271054 100644 --- a/mesa/experimental/jupyter_viz.py +++ b/mesa/experimental/jupyter_viz.py @@ -406,8 +406,17 @@ def make_plot(model, measure): fig = Figure() ax = fig.subplots() df = model.datacollec...
nautobot__nautobot-4330
Filtering By Related Tree Models With Non-Unique Names Can Return Unexpected Results Additional unexpected behavior transforms filtering of parent locations into the parent name and the name of all descendants in the tree (as opposed to the actual descendants in the tree). For example, having the followin...
[ { "content": "from collections import OrderedDict\nfrom copy import deepcopy\nimport logging\nimport uuid\n\nfrom django import forms as django_forms\nfrom django.conf import settings\nfrom django.db import models\nfrom django.forms.utils import ErrorDict, ErrorList\nimport django_filters\nfrom django_filters.c...
[ { "content": "from collections import OrderedDict\nfrom copy import deepcopy\nimport logging\nimport uuid\n\nfrom django import forms as django_forms\nfrom django.conf import settings\nfrom django.db import models\nfrom django.forms.utils import ErrorDict, ErrorList\nimport django_filters\nfrom django_filters.c...
diff --git a/changes/4329.fixed b/changes/4329.fixed new file mode 100644 index 00000000000..be6ccd25839 --- /dev/null +++ b/changes/4329.fixed @@ -0,0 +1 @@ +Fixed an issue in `TreeNodeMultipleChoiceFilter` filtering that could result in incorrect inclusion of unrelated records with the same name located elsewhere in ...
getsentry__sentry-56459
Expose source map method on event endpoints Problem: We'd like to determine how effective symbolication using the new debugIDs method is compared to the legacy method that uses releases. However, this information it not yet available on the FE. Proposed solution: Expose the `resolved_with` property of the event stack ...
[ { "content": "from __future__ import annotations\n\nimport re\nfrom collections import defaultdict\nfrom datetime import datetime, timezone\nfrom typing import Any, Dict, List, Sequence\n\nimport sentry_sdk\nimport sqlparse\nfrom sentry_relay.processing import meta_with_chunks\n\nfrom sentry.api.serializers imp...
[ { "content": "from __future__ import annotations\n\nimport re\nfrom collections import defaultdict\nfrom datetime import datetime, timezone\nfrom typing import Any, Dict, List, Sequence\n\nimport sentry_sdk\nimport sqlparse\nfrom sentry_relay.processing import meta_with_chunks\n\nfrom sentry.api.serializers imp...
diff --git a/src/sentry/api/serializers/models/event.py b/src/sentry/api/serializers/models/event.py index 62d477166278b4..633dd78b89ca63 100644 --- a/src/sentry/api/serializers/models/event.py +++ b/src/sentry/api/serializers/models/event.py @@ -434,12 +434,10 @@ def _get_resolved_with(self, obj: Event) -> List[str]: ...
mkdocs__mkdocs-417
Publish personal GitHub pages I've switched over to using mkdocs for [my personal page](http://jiahao.github.io) and am really liking the output. I'd like to request that `gh-deploy` be extended to support personal GitHub pages also. Unlike project pages, personal pages must have repository names `<username>.github.io...
[ { "content": "from __future__ import print_function\nimport subprocess\nimport os\n\n\ndef gh_deploy(config):\n if not os.path.exists('.git'):\n print('Cannot deploy - this directory does not appear to be a git repository')\n return\n\n print(\"Copying '%s' to `gh-pages` branch and pushing t...
[ { "content": "from __future__ import print_function\nimport subprocess\nimport os\n\n\ndef gh_deploy(config):\n\n if not os.path.exists('.git'):\n print('Cannot deploy - this directory does not appear to be a git repository')\n return\n\n print(\"Copying '%s' to `gh-pages` branch and pushing...
diff --git a/mkdocs/gh_deploy.py b/mkdocs/gh_deploy.py index 7f1582f4d4..f5692d2dcb 100644 --- a/mkdocs/gh_deploy.py +++ b/mkdocs/gh_deploy.py @@ -4,13 +4,17 @@ def gh_deploy(config): + if not os.path.exists('.git'): print('Cannot deploy - this directory does not appear to be a git repository') ...
aws-cloudformation__cfn-lint-2424
Support serverless v2 DBInstanceClass *cfn-lint version: 0.59.0* *Allowed list of DBInstanceClass does not include "db.serverless"* Please provide as much information as possible: * Template linting issues: * Please provide a CloudFormation sample that generated the issue. ``` DbInstance0: Type: AWS:...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\n\n\"\"\"\n Updates our dynamic patches from the pricing API\n This script requires Boto3 and Credentials to call the Pricing API\n\"\"\"\n\n\nimport boto...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\n\n\"\"\"\n Updates our dynamic patches from the pricing API\n This script requires Boto3 and Credentials to call the Pricing API\n\"\"\"\n\n\nimport boto...
diff --git a/scripts/update_specs_from_pricing.py b/scripts/update_specs_from_pricing.py index d3936326cd..777c561892 100755 --- a/scripts/update_specs_from_pricing.py +++ b/scripts/update_specs_from_pricing.py @@ -178,7 +178,7 @@ def get_rds_pricing(): if not rds_specs.get(license_name).get(pr...
pre-commit__pre-commit-306
Improve error message when attempting to run non-existent hook Hook id in `/.pre-commit-config.yaml` doesn't exist in the included repository (From https://github.com/pre-commit/pre-commit-hooks/issues/37) It should probably suggest updating hooks or checking the spelling of the hookid
[ { "content": "from __future__ import unicode_literals\n\nimport logging\nimport shutil\nfrom collections import defaultdict\n\nfrom cached_property import cached_property\n\nfrom pre_commit import git\nfrom pre_commit.clientlib.validate_config import is_local_hooks\nfrom pre_commit.clientlib.validate_manifest i...
[ { "content": "from __future__ import unicode_literals\n\nimport logging\nimport shutil\nfrom collections import defaultdict\n\nfrom cached_property import cached_property\n\nfrom pre_commit import git\nfrom pre_commit.clientlib.validate_config import is_local_hooks\nfrom pre_commit.clientlib.validate_manifest i...
diff --git a/pre_commit/repository.py b/pre_commit/repository.py index 1d046911a..4c045c8c0 100644 --- a/pre_commit/repository.py +++ b/pre_commit/repository.py @@ -61,7 +61,16 @@ def additional_dependencies(self): @cached_property def hooks(self): - # TODO: merging in manifest dicts is a smell imo +...
dask__dask-10827
Deprecate convert_dtype in apply deprecated in pandas, so lets rip it out now before we move to dask-expr
[ { "content": "from __future__ import annotations\n\nimport warnings\nfrom functools import partial\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_extension_array_dtype\nfrom pandas.errors import PerformanceWarning\nfrom tlz import partition\n\nfrom dask.dataframe._compat import (\n ...
[ { "content": "from __future__ import annotations\n\nimport warnings\nfrom functools import partial\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_extension_array_dtype\nfrom pandas.errors import PerformanceWarning\nfrom tlz import partition\n\nfrom dask.dataframe._compat import (\n ...
diff --git a/dask/dataframe/methods.py b/dask/dataframe/methods.py index 546510ee5e0..6b82ad9127c 100644 --- a/dask/dataframe/methods.py +++ b/dask/dataframe/methods.py @@ -32,6 +32,7 @@ union_categoricals, ) from dask.dataframe.utils import is_dataframe_like, is_index_like, is_series_like +from dask.utils impor...
cupy__cupy-4130
`cupyx.scipy.ndimage.affine_transform` broken with `mode=opencv` Rel #3559. `cupyx.scipy.ndimage.affine_transform` can take `opencv` for its `mode` paramter to make it work like OpenCV's one. However, some change (maybe #2483?), broke it and the current master does not work with the parameter. ``` >>> cupyx.scip...
[ { "content": "import math\nimport warnings\n\nimport cupy\nimport numpy\n\nfrom cupyx.scipy.ndimage import _util\nfrom cupyx.scipy.ndimage import _interp_kernels\n\n_prod = cupy.core.internal.prod\n\n\ndef _check_parameter(func_name, order, mode):\n if order is None:\n warnings.warn('In the current fe...
[ { "content": "import math\nimport warnings\n\nimport cupy\nimport numpy\n\nfrom cupyx.scipy.ndimage import _util\nfrom cupyx.scipy.ndimage import _interp_kernels\n\n_prod = cupy.core.internal.prod\n\n\ndef _check_parameter(func_name, order, mode):\n if order is None:\n warnings.warn('In the current fe...
diff --git a/cupyx/scipy/ndimage/interpolation.py b/cupyx/scipy/ndimage/interpolation.py index 1488de9844b..2528c506394 100644 --- a/cupyx/scipy/ndimage/interpolation.py +++ b/cupyx/scipy/ndimage/interpolation.py @@ -175,6 +175,17 @@ def affine_transform(input, matrix, offset=0.0, output_shape=None, output=None, i...
avocado-framework__avocado-4183
plugin fetchasset error: Attribute object has no attribute id ``` avocado run examples/tests/multiple_tests.py Error running method "pre_tests" of plugin "fetchasset": 'Attribute' object has no attribute 'id' JOB ID : f8e40b2a453da3f9115aa222f2cea668d62836d1 JOB LOG : /home/local/avocado/job-results/job-202...
[ { "content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t...
[ { "content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t...
diff --git a/avocado/plugins/assets.py b/avocado/plugins/assets.py index 3a3fff0303..e0c6c877bd 100644 --- a/avocado/plugins/assets.py +++ b/avocado/plugins/assets.py @@ -168,7 +168,12 @@ def visit_Assign(self, node): # pylint: disable=C0103 # variables to make dictionary assignment line shorter ...
encode__django-rest-framework-2940
Allow unexpected values for `ChoiceField`/`MultipleChoiceField` representations. When an invalid value is present in the database that isn't part of the list of choices (perhaps dealing with a legacy database) a KeyError will be raised in to_representation() of ChoiceField/MultipleChoiceField. Personally I'd like to s...
[ { "content": "from __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.exceptions import ValidationError as DjangoValidationError\nfrom django.core.validators import RegexValidator\nfrom django.forms import ImageField as D...
[ { "content": "from __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.exceptions import ValidationError as DjangoValidationError\nfrom django.core.validators import RegexValidator\nfrom django.forms import ImageField as D...
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 460645796a..96fcc257a2 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -1045,7 +1045,7 @@ def to_internal_value(self, data): def to_representation(self, value): if value in ('', None): return value ...
pyro-ppl__pyro-2706
PyroModule.requires_grad_(False).__call__() issues unwanted warning After training a `PyroModule` model, I'd like to detach it and use it elsewhere in a "frozen" state. One obvious way to do so would be to call `my_module.requires_grad_(False)` to detach all parameters. Doing so results in the desired behavior, but has...
[ { "content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport copy\nimport warnings\nfrom collections import OrderedDict\nfrom contextlib import ExitStack, contextmanager\nfrom inspect import isclass\n\nimport pyro.distributions as dist\nimport pyro.infer as in...
[ { "content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport copy\nimport warnings\nfrom collections import OrderedDict\nfrom contextlib import ExitStack, contextmanager\nfrom inspect import isclass\n\nimport pyro.distributions as dist\nimport pyro.infer as in...
diff --git a/pyro/primitives.py b/pyro/primitives.py index 83473b4014..3e39f0ec0a 100644 --- a/pyro/primitives.py +++ b/pyro/primitives.py @@ -356,9 +356,10 @@ def module(name, nn_module, update_module_params=False): if param_value._cdata != returned_param._cdata: target_state_dict[param...
fossasia__open-event-server-4418
[sentry] KeyError/v1/users/<int:user_id>/access-codes **I'm submitting a ...** (check one with "x") - [x] bug report - [ ] feature request - [ ] support request => Please do not submit support requests here, instead ask your query in out Gitter channel at https://gitter.im/fossasia/open-event-orga-server ``` Ke...
[ { "content": "from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\nfrom app.api.helpers.exceptions import ForbiddenException\n\nfrom app.api.bootstrap import api\nfrom app.api.helpers.db import safe_query\nfrom app.api.helpe...
[ { "content": "from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\nfrom app.api.helpers.exceptions import ForbiddenException\n\nfrom app.api.bootstrap import api\nfrom app.api.helpers.db import safe_query\nfrom app.api.helpe...
diff --git a/app/api/access_codes.py b/app/api/access_codes.py index 3d139a2ea9..4674eb14f1 100644 --- a/app/api/access_codes.py +++ b/app/api/access_codes.py @@ -53,7 +53,7 @@ def query(self, view_kwargs): query_ = event_query(self, query_, view_kwargs, permission='is_coorganizer') if view_kwargs.get...
pytorch__rl-148
Make `TDSequence` support indexing A `TDSequence` is the equivalent of `nn.Sequence` for TDModules. As of now, it does not support indexing. A short method mapping `TDSequence.__getitem__(index)` to `TDSequence.module.__getitem__(index)` should be implemented. Tests should be written in `test/test_tdmodules.py` to...
[ { "content": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom __future__ import annotations\n\nfrom copy import copy, deepcopy\nfrom textwrap import indent\nfrom typing i...
[ { "content": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom __future__ import annotations\n\nfrom copy import copy, deepcopy\nfrom textwrap import indent\nfrom typing i...
diff --git a/test/test_tdmodules.py b/test/test_tdmodules.py index 8f400617300..f62257144fd 100644 --- a/test/test_tdmodules.py +++ b/test/test_tdmodules.py @@ -314,9 +314,11 @@ def test_stateful(self, safe, spec_type, probabilistic, lazy): param_multiplier = 2 if probabilistic else 1 if lazy: ...
bokeh__bokeh-7939
Using on_event with string names in Python2.7 As discovered in #7893, trying to set `on_event` with a string (i.e. `"tap"` instead of `events.Tap`) currently fails with: ``` python =================================== FAILURES =================================== Test_standalone_docs_json_and_render_items.test_log_...
[ { "content": "''' Provides ``PropertyCallbackManager`` and ``EventCallbackManager``\nmixin classes for adding ``on_change`` and ``on_event`` callback\ninterfaces to classes.\n'''\nfrom __future__ import absolute_import\n\nfrom ..events import Event\nfrom ..util.future import get_param_info, format_signature, si...
[ { "content": "''' Provides ``PropertyCallbackManager`` and ``EventCallbackManager``\nmixin classes for adding ``on_change`` and ``on_event`` callback\ninterfaces to classes.\n'''\nfrom __future__ import absolute_import\n\nfrom six import string_types\n\nfrom ..events import Event\nfrom ..util.future import get_...
diff --git a/bokeh/util/callback_manager.py b/bokeh/util/callback_manager.py index 533f51ca93b..70dba3d72dc 100644 --- a/bokeh/util/callback_manager.py +++ b/bokeh/util/callback_manager.py @@ -4,6 +4,8 @@ ''' from __future__ import absolute_import +from six import string_types + from ..events import Event from .....
Cog-Creators__Red-DiscordBot-6159
[redbot.core.tree] The kwarg `delete_after` doesn't exist in `discord.Interaction.followup.send`. ### Description of the changes Hello, This PR fixes an error in the error handler for slash commands. It was reported by @Drapersniper in the main Red server (https://canary.discord.com/channels/133049272517001216/71...
[ { "content": "import discord\nfrom discord.abc import Snowflake\nfrom discord.utils import MISSING\n\nfrom .app_commands import (\n AppCommand,\n AppCommandError,\n BotMissingPermissions,\n CheckFailure,\n Command,\n CommandAlreadyRegistered,\n CommandInvokeError,\n CommandNotFound,\n ...
[ { "content": "import discord\nfrom discord.abc import Snowflake\nfrom discord.utils import MISSING\n\nfrom .app_commands import (\n AppCommand,\n AppCommandError,\n BotMissingPermissions,\n CheckFailure,\n Command,\n CommandAlreadyRegistered,\n CommandInvokeError,\n CommandNotFound,\n ...
diff --git a/redbot/core/tree.py b/redbot/core/tree.py index dfd7cebe1cb..59bf0ac5f87 100644 --- a/redbot/core/tree.py +++ b/redbot/core/tree.py @@ -251,7 +251,12 @@ async def _send_from_interaction(interaction, *args, **kwargs): if interaction.response.is_done(): if interaction.is_expired(): ...
bokeh__bokeh-10032
Documentation spelling and formatting There are various typos scattered throughout the documentation.
[ { "content": "import numpy as np\n\nfrom bokeh.layouts import column, row\nfrom bokeh.models import CustomJS, Div, Slider\nfrom bokeh.plotting import ColumnDataSource, figure, output_file, show\n\nx = np.linspace(0, 10, 500)\ny = np.sin(x)\n\nsource = ColumnDataSource(data=dict(x=x, y=y))\n\nplot = figure(y_ran...
[ { "content": "import numpy as np\n\nfrom bokeh.layouts import column, row\nfrom bokeh.models import CustomJS, Div, Slider\nfrom bokeh.plotting import ColumnDataSource, figure, output_file, show\n\nx = np.linspace(0, 10, 500)\ny = np.sin(x)\n\nsource = ColumnDataSource(data=dict(x=x, y=y))\n\nplot = figure(y_ran...
diff --git a/sphinx/source/docs/user_guide/examples/layout_sizing_mode_multiple.py b/sphinx/source/docs/user_guide/examples/layout_sizing_mode_multiple.py index 1324516614c..9b5b4b4386f 100644 --- a/sphinx/source/docs/user_guide/examples/layout_sizing_mode_multiple.py +++ b/sphinx/source/docs/user_guide/examples/layout...
pre-commit__pre-commit-33
pre-commit -i does not install the file with +x No executable = no run :'(
[ { "content": "import functools\nimport os\nimport os.path\nimport pkg_resources\nimport re\nfrom plumbum import local\n\nfrom pre_commit.util import memoize_by_cwd\n\n\ndef _get_root_new():\n path = os.getcwd()\n while len(path) > 1:\n if os.path.exists(os.path.join(path, '.git')):\n ret...
[ { "content": "import functools\nimport os\nimport os.path\nimport pkg_resources\nimport re\nimport stat\nfrom plumbum import local\n\nfrom pre_commit.util import memoize_by_cwd\n\n\ndef _get_root_new():\n path = os.getcwd()\n while len(path) > 1:\n if os.path.exists(os.path.join(path, '.git')):\n ...
diff --git a/pre_commit/git.py b/pre_commit/git.py index 986adb84b..3ed28da4c 100644 --- a/pre_commit/git.py +++ b/pre_commit/git.py @@ -3,6 +3,7 @@ import os.path import pkg_resources import re +import stat from plumbum import local from pre_commit.util import memoize_by_cwd @@ -32,6 +33,8 @@ def create_pre_com...
Azure__azure-cli-extensions-93
Change help for az webapp new ### Extension name (the extension in question) webapp ### Description of issue (in as much detail as possible) currently the help information for the command return the Command az webapp new: Create and deploy a node web app. Requested changes: - add the callout for .ne...
[ { "content": "#!/usr/bin/env python\n\n# --------------------------------------------------------------------------------------------\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": "#!/usr/bin/env python\n\n# --------------------------------------------------------------------------------------------\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/index.json b/src/index.json index da522c98334..c1818cd3de8 100644 --- a/src/index.json +++ b/src/index.json @@ -370,9 +370,9 @@ ], "webapp": [ { - "filename": "webapp-0.1.0-py2.py3-none-any.whl", - "sha256Digest": "faaeec44cdfb88f6a2531130914...
roboflow__supervision-1222
Loading OBB detection from ultralytics fails ### Search before asking - [X] I have searched the Supervision [issues](https://github.com/roboflow/supervision/issues) and found no similar bug report. ### Bug When passing in the results from ultralytics yolov8 OBB model to from_ultralytics it will fail and give...
[ { "content": "from __future__ import annotations\n\nfrom contextlib import suppress\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom supervision.config import CLASS_NAME_DATA_FIELD, ORIENTED_BOX_COORDINATES\nfrom superv...
[ { "content": "from __future__ import annotations\n\nfrom contextlib import suppress\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom supervision.config import CLASS_NAME_DATA_FIELD, ORIENTED_BOX_COORDINATES\nfrom superv...
diff --git a/supervision/detection/core.py b/supervision/detection/core.py index 0ba9e4f42..6563de7d3 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -240,7 +240,7 @@ def from_ultralytics(cls, ultralytics_results) -> Detections: Class names values can be accessed using `de...
NVIDIA__NVFlare-292
HE aggregator has wrong check for data kind This [block](https://github.com/NVIDIA/NVFlare/blob/52fa8fc989811526c50ecd4030cc89141b1b26cd/nvflare/app_common/homomorphic_encryption/he_intime_accumulate_model_aggregator.py#L104) should be replaced with ``` if dxo.data_kind != self.expected_data_kind: ...
[ { "content": "# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICEN...
[ { "content": "# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICEN...
diff --git a/nvflare/app_common/homomorphic_encryption/he_intime_accumulate_model_aggregator.py b/nvflare/app_common/homomorphic_encryption/he_intime_accumulate_model_aggregator.py index 58166c81ac..c1c571e288 100644 --- a/nvflare/app_common/homomorphic_encryption/he_intime_accumulate_model_aggregator.py +++ b/nvflare/...
kartoza__prj.app-263
Disqus functionality is currently broken There should be disqus inline chat widgets on each version page and each entry page. Currently these are not working - can we work to fix it.
[ { "content": "# coding=utf-8\n\n\"\"\"Project level settings.\n\nAdjust these values as needed but don't commit passwords etc. to any public\nrepository!\n\"\"\"\n\nimport os # noqa\nfrom django.utils.translation import ugettext_lazy as _\nfrom .utils import absolute_path\nfrom .contrib import * # noqa\n\n# P...
[ { "content": "# coding=utf-8\n\n\"\"\"Project level settings.\n\nAdjust these values as needed but don't commit passwords etc. to any public\nrepository!\n\"\"\"\n\nimport os # noqa\nfrom django.utils.translation import ugettext_lazy as _\nfrom .utils import absolute_path\nfrom .contrib import * # noqa\n\n# P...
diff --git a/django_project/core/settings/contrib.py b/django_project/core/settings/contrib.py index bc8d69b3f..0ea4f2942 100644 --- a/django_project/core/settings/contrib.py +++ b/django_project/core/settings/contrib.py @@ -20,8 +20,12 @@ 'django_hashedfilenamestorage', 'django_countries', # for sponsor add...
sosreport__sos-2628
[pulp] no obfuscation of proxy_password in /etc/pulp/server/plugins.conf.d/*.json files Reproducer: `/etc/pulp/server/plugins.conf.d/iso_importer.json` with: "proxy_password": 'my_SECRET_password', Then `sos report` does not obfuscate this password.
[ { "content": "# Copyright (C) 2018 Red Hat, Inc., Jake Hunsaker <jhunsake@redhat.com>\n\n# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of...
[ { "content": "# Copyright (C) 2018 Red Hat, Inc., Jake Hunsaker <jhunsake@redhat.com>\n\n# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of...
diff --git a/sos/report/plugins/pulp.py b/sos/report/plugins/pulp.py index ca49ff069a..5a62075151 100644 --- a/sos/report/plugins/pulp.py +++ b/sos/report/plugins/pulp.py @@ -160,8 +160,8 @@ def postproc(self): # Now handle JSON-formatted data in the same /etc/pulp directory # structure. We use a diff...
pypa__pip-1015
meta-package causes IndexError when converted to, then installed from, a .whl file I ran across this with the [celery-with-redis](https://pypi.python.org/pypi/celery-with-redis) package, which consistens of a setup.py with an `install_requires` clause. Using `pip wheel`, the whl file is generated just fine just fine, ...
[ { "content": "import sys\nimport shutil\nimport os\nimport stat\nimport re\nimport posixpath\nimport pkg_resources\nimport zipfile\nimport tarfile\nimport subprocess\nimport textwrap\nfrom pip.exceptions import InstallationError, BadCommand, PipError\nfrom pip.backwardcompat import(WindowsError, string_types, r...
[ { "content": "import sys\nimport shutil\nimport os\nimport stat\nimport re\nimport posixpath\nimport pkg_resources\nimport zipfile\nimport tarfile\nimport subprocess\nimport textwrap\nfrom pip.exceptions import InstallationError, BadCommand, PipError\nfrom pip.backwardcompat import(WindowsError, string_types, r...
diff --git a/pip/util.py b/pip/util.py index 2cbc4f576c9..dc52b0b05e9 100644 --- a/pip/util.py +++ b/pip/util.py @@ -589,8 +589,9 @@ def unpack_file(filename, location, content_type, link): if (content_type == 'application/zip' or filename.endswith('.zip') or filename.endswith('.pybundle') + ...
streamlink__streamlink-4576
plugins.youtube: --http-cookie not working anymore on members content ### Checklist - [X] This is a plugin issue and not a different kind of issue - [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink) - [X] [I have checked the l...
[ { "content": "\"\"\"\n$description Global live-streaming and video hosting social platform owned by Google.\n$url youtube.com\n$url youtu.be\n$type live, vod\n$notes Protected videos are not supported\n\"\"\"\n\nimport json\nimport logging\nimport re\nfrom urllib.parse import urlparse, urlunparse\n\nfrom stream...
[ { "content": "\"\"\"\n$description Global live-streaming and video hosting social platform owned by Google.\n$url youtube.com\n$url youtu.be\n$type live, vod\n$notes Protected videos are not supported\n\"\"\"\n\nimport json\nimport logging\nimport re\nfrom urllib.parse import urlparse, urlunparse\n\nfrom stream...
diff --git a/src/streamlink/plugins/youtube.py b/src/streamlink/plugins/youtube.py index cbd5fa86e12..038f7dfdf5a 100644 --- a/src/streamlink/plugins/youtube.py +++ b/src/streamlink/plugins/youtube.py @@ -44,7 +44,7 @@ """, re.VERBOSE)) class YouTube(Plugin): _re_ytInitialData = re.compile(r"""var\s+ytInitialDat...
vyperlang__vyper-3287
`FunctionNodeVisitor` visits twice `sqrt` body ### Version Information * vyper Version (output of `vyper --version`): 0.3.8+commit.d76c6ed2 * OS: OSX * Python Version (output of `python --version`): 3.8.0 ### What's your issue about? The `FunctionNodeVisitor` seems to visit twice the body of `sqrt` builtin, ...
[ { "content": "from vyper.ast import parse_to_ast\nfrom vyper.codegen.context import Context\nfrom vyper.codegen.global_context import GlobalContext\nfrom vyper.codegen.stmt import parse_body\nfrom vyper.semantics.analysis.local import FunctionNodeVisitor\nfrom vyper.semantics.namespace import Namespace, overrid...
[ { "content": "from vyper.ast import parse_to_ast\nfrom vyper.codegen.context import Context\nfrom vyper.codegen.global_context import GlobalContext\nfrom vyper.codegen.stmt import parse_body\nfrom vyper.semantics.analysis.local import FunctionNodeVisitor\nfrom vyper.semantics.namespace import Namespace, overrid...
diff --git a/vyper/builtins/_utils.py b/vyper/builtins/_utils.py index 3439cd5df1..77185f6e53 100644 --- a/vyper/builtins/_utils.py +++ b/vyper/builtins/_utils.py @@ -25,9 +25,9 @@ def generate_inline_function(code, variables, variables_2, memory_allocator): ast_code.body[0]._metadata["type"] = ContractFunctio...
keras-team__keras-19618
keras with pytorch backend and mps set to default should use an mps generatir in randperm Keras with pytorch backend and mps set to default needs to use an mps generator in randperm The following code ``` import os os.environ["KERAS_BACKEND"] = "torch" import torch as torch torch.set_default_device('mps'...
[ { "content": "import contextlib\nimport os\n\nimport ml_dtypes\nimport numpy as np\nimport torch\n\nfrom keras.src import tree\nfrom keras.src.backend.common import KerasVariable\nfrom keras.src.backend.common import global_state\nfrom keras.src.backend.common import standardize_dtype\nfrom keras.src.backend.co...
[ { "content": "import contextlib\n\nimport ml_dtypes\nimport numpy as np\nimport torch\n\nfrom keras.src import tree\nfrom keras.src.backend.common import KerasVariable\nfrom keras.src.backend.common import global_state\nfrom keras.src.backend.common import standardize_dtype\nfrom keras.src.backend.common.dtypes...
diff --git a/keras/src/backend/torch/core.py b/keras/src/backend/torch/core.py index 257afeeec699..8cc6c5b5b564 100644 --- a/keras/src/backend/torch/core.py +++ b/keras/src/backend/torch/core.py @@ -1,5 +1,4 @@ import contextlib -import os import ml_dtypes import numpy as np @@ -19,10 +18,7 @@ # Some operators su...
keras-team__keras-10946
Keras >= 2.2.1 no longer respects fit_generator(validation_steps=...) It seems that starting with Keras 2.2.1 `fit_generator()` no longer stops the validation process after `validation_steps` steps, but continues through the entire sequence. See this example code: ``` import numpy from keras import Input, Model f...
[ { "content": "\"\"\"Part of the training engine related to Python generators of array data.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport warnings\nimport numpy as np\n\nfrom .. import backend as K\nfrom ..utils.data_utils impor...
[ { "content": "\"\"\"Part of the training engine related to Python generators of array data.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport warnings\nimport numpy as np\n\nfrom .. import backend as K\nfrom ..utils.data_utils impor...
diff --git a/keras/engine/training_generator.py b/keras/engine/training_generator.py index 535f34e0909f..733e5b2fe672 100644 --- a/keras/engine/training_generator.py +++ b/keras/engine/training_generator.py @@ -111,7 +111,7 @@ def fit_generator(model, if isinstance(val_data, Sequence): ...
python-pillow__Pillow-8085
Missing ImageDraw.Draw.circle function ### What did you do? I find it frustrating that Pillow's ImageDraw does still not have a function to draw a circle. Every time I come around to do it, I find that I must use ImageDraw.Draw.ellipse instead, which costs time. It must be even more frustrating for beginners who don...
[ { "content": "#\n# The Python Imaging Library\n# $Id$\n#\n# drawing interface operations\n#\n# History:\n# 1996-04-13 fl Created (experimental)\n# 1996-08-07 fl Filled polygons, ellipses.\n# 1996-08-13 fl Added text support\n# 1998-06-28 fl Handle I and F images\n# 1998-12-29 fl Added arc; use arc pri...
[ { "content": "#\n# The Python Imaging Library\n# $Id$\n#\n# drawing interface operations\n#\n# History:\n# 1996-04-13 fl Created (experimental)\n# 1996-08-07 fl Filled polygons, ellipses.\n# 1996-08-13 fl Added text support\n# 1998-06-28 fl Handle I and F images\n# 1998-12-29 fl Added arc; use arc pri...
diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index 0a699e2ab6a..69d09e03d86 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -2,6 +2,7 @@ import contextlib import os.path +from typing import Sequence import pytest @@ -265,6 +266,21 @@ def test_chord_too_fat() -> None: ...
cisagov__manage.get.gov-1461
Content: Clarify that a domain that appears "available" is not guaranteed ### Story As an applicant I want to understand that my requested domain is not guaranteed so that I can set appropriate expectations for myself and my team. ### Acceptance Criteria On the ".gov Domain" step in the application process, language ...
[ { "content": "\"\"\"Internal API views\"\"\"\nfrom django.apps import apps\nfrom django.views.decorators.http import require_http_methods\nfrom django.http import HttpResponse, JsonResponse\nfrom django.utils.safestring import mark_safe\n\nfrom registrar.templatetags.url_helpers import public_site_url\nfrom reg...
[ { "content": "\"\"\"Internal API views\"\"\"\nfrom django.apps import apps\nfrom django.views.decorators.http import require_http_methods\nfrom django.http import HttpResponse, JsonResponse\nfrom django.utils.safestring import mark_safe\n\nfrom registrar.templatetags.url_helpers import public_site_url\nfrom reg...
diff --git a/src/api/views.py b/src/api/views.py index 700a8b1d5..068844919 100644 --- a/src/api/views.py +++ b/src/api/views.py @@ -32,7 +32,9 @@ "Read more about choosing your .gov domain.</a>".format(public_site_url("domains/choosing")) ), "invalid": "Enter a domain using only letters, numbers, or...
OpenMined__PySyft-2387
OpenMined.org Demo Broken On our homepage - we link to colabs which implement a simple SocketWorker demo - as the new version of PySyft has no SocketWorker - the demo fails to work. https://colab.research.google.com/drive/1-Jb_E_nDuBGHIJ_psI95k-ukh-P_aly-
[ { "content": "import binascii\nfrom typing import Union\nfrom typing import List\n\nimport asyncio\nimport torch\nimport websockets\nimport ssl\nimport sys\nimport tblib.pickling_support\n\ntblib.pickling_support.install()\n\nimport syft as sy\nfrom syft.frameworks.torch.tensors.interpreters import AbstractTens...
[ { "content": "import binascii\nfrom typing import Union\nfrom typing import List\n\nimport asyncio\nimport torch\nimport websockets\nimport ssl\nimport sys\nimport tblib.pickling_support\nimport socket\nimport logging\n\ntblib.pickling_support.install()\n\nimport syft as sy\nfrom syft.frameworks.torch.tensors.i...
diff --git a/examples/tutorials/WebsocketServerWorker.ipynb b/examples/tutorials/WebsocketServerWorker.ipynb new file mode 100644 index 00000000000..1d2e3c78181 --- /dev/null +++ b/examples/tutorials/WebsocketServerWorker.ipynb @@ -0,0 +1,254 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "...
mesonbuild__meson-3715
Windows module fails on multiple resource files with same name I have a project with multiple subfolders that contain resource scripts named 'rsrc.rc', this worked with at least 0.44.0, but fails with current master: > meson.build:7:0: ERROR: Tried to create target "Windows resource for file 'rsrc.rc'", but a targe...
[ { "content": "# Copyright 2015 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required...
[ { "content": "# Copyright 2015 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required...
diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index fb5bacfc14dc..7dd87f2453db 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -88,8 +88,10 @@ def add_target(src): 'depend_files': wrc_deps, } - if isinstance(src, (...
pypa__pip-11779
pip 23.0: `pip list` fails with error "ValueError: not enough values to unpack" for archives installed from URL ### Description When a project contains installed archives installed by specifying URL (e.g. spaCy models), `pip list` does not display the list of installed packages, because it crashes. Probable cause...
[ { "content": "\"\"\" PEP 610 \"\"\"\nimport json\nimport re\nimport urllib.parse\nfrom typing import Any, Dict, Iterable, Optional, Type, TypeVar, Union\n\n__all__ = [\n \"DirectUrl\",\n \"DirectUrlValidationError\",\n \"DirInfo\",\n \"ArchiveInfo\",\n \"VcsInfo\",\n]\n\nT = TypeVar(\"T\")\n\nDIR...
[ { "content": "\"\"\" PEP 610 \"\"\"\nimport json\nimport re\nimport urllib.parse\nfrom typing import Any, Dict, Iterable, Optional, Type, TypeVar, Union\n\n__all__ = [\n \"DirectUrl\",\n \"DirectUrlValidationError\",\n \"DirInfo\",\n \"ArchiveInfo\",\n \"VcsInfo\",\n]\n\nT = TypeVar(\"T\")\n\nDIR...
diff --git a/news/11773.bugfix.rst b/news/11773.bugfix.rst new file mode 100644 index 00000000000..077bf061259 --- /dev/null +++ b/news/11773.bugfix.rst @@ -0,0 +1 @@ +Do not crash in presence of misformatted hash field in ``direct_url.json``. diff --git a/src/pip/_internal/models/direct_url.py b/src/pip/_internal/mode...
frappe__frappe-12943
Query report doesn't load translations from app ### Reproduce 1. Create a query report for your custom app 2. Add a column. Give it a weird name so there isn't a translation in frappe already. For example, "Not translated in frontend" 3. Add a translation to `your_app/translations/de.csv` (german, in this case). I...
[ { "content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals, print_function\n\nfrom six import iteritems, text_type, string_types, PY2\n\nfrom frappe.utils import cstr\n\n\"\"\"\n\tfrappe.translate\n\t~~~~~~~~~~~~~...
[ { "content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals, print_function\n\nfrom six import iteritems, text_type, string_types, PY2\n\nfrom frappe.utils import cstr\n\n\"\"\"\n\tfrappe.translate\n\t~~~~~~~~~~~~~...
diff --git a/frappe/translate.py b/frappe/translate.py index 4baf4bdd8931..f5f9797d070f 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -443,8 +443,15 @@ def get_messages_from_report(name): messages = _get_messages_from_page_or_report("Report", name, frappe.db.get_value("DocType", report.ref_doctype,...
ydataai__ydata-profiling-1109
Cramer correlation matrix is not computed /usr/local/lib/python3.7/dist-packages/pandas_profiling/model/correlations.py:61: UserWarning:There was an attempt to calculate the cramers correlation, but this failed. To hide this warning, disable the calculation (using `df.profile_report(correlations={"cramers": {"calcula...
[ { "content": "\"\"\"Correlations between variables.\"\"\"\nimport itertools\nimport warnings\nfrom typing import Optional\n\nimport numpy as np\nimport pandas as pd\nfrom scipy import stats\n\nfrom pandas_profiling.config import Settings\nfrom pandas_profiling.model.correlations import (\n Cramers,\n Kend...
[ { "content": "\"\"\"Correlations between variables.\"\"\"\nimport itertools\nimport warnings\nfrom typing import Optional\n\nimport numpy as np\nimport pandas as pd\nfrom scipy import stats\n\nfrom pandas_profiling.config import Settings\nfrom pandas_profiling.model.correlations import (\n Cramers,\n Kend...
diff --git a/src/pandas_profiling/model/pandas/correlations_pandas.py b/src/pandas_profiling/model/pandas/correlations_pandas.py index 25db58834..156702bc8 100644 --- a/src/pandas_profiling/model/pandas/correlations_pandas.py +++ b/src/pandas_profiling/model/pandas/correlations_pandas.py @@ -97,9 +97,12 @@ def pandas_c...
conan-io__conan-6994
[bug] deploy generator broken with 1.25.0 ### Environment Details (include every applicable attribute) * Operating System+version: Ubuntu 20.04 * Compiler+version: any * Conan version: 1.25.0 * Python version: 3.8.2 ### Steps to reproduce (Include if Applicable) * mkdir /tmp/conan-paho-mqtt * conan ins...
[ { "content": "import calendar\nimport os\nimport shutil\nimport time\n\nfrom conans.model import Generator\nfrom conans.model.manifest import FileTreeManifest\nfrom conans.paths import BUILD_INFO_DEPLOY\nfrom conans.util.files import mkdir, md5sum\n\n\nFILTERED_FILES = [\"conaninfo.txt\", \"conanmanifest.txt\"]...
[ { "content": "import calendar\nimport os\nimport shutil\nimport time\n\nfrom conans.model import Generator\nfrom conans.model.manifest import FileTreeManifest\nfrom conans.paths import BUILD_INFO_DEPLOY\nfrom conans.util.files import mkdir, md5sum\n\n\nFILTERED_FILES = [\"conaninfo.txt\", \"conanmanifest.txt\"]...
diff --git a/conans/client/generators/deploy.py b/conans/client/generators/deploy.py index daf8f50d424..25757d8c098 100644 --- a/conans/client/generators/deploy.py +++ b/conans/client/generators/deploy.py @@ -43,7 +43,10 @@ def content(self): dst = os.path.normpath(dst) mkdir(o...
projectmesa__mesa-1984
JupyterViz space view limits **What's the problem this feature will solve?** At the moment, when drawing spaces with JupyterViz, the axes limits are left to be automatically determined by Matplotlib. Would it not make more sense (in particular of continuous spaces, to derive xlim and xmax from the space itself? **D...
[ { "content": "from typing import Optional\n\nimport networkx as nx\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\n\nimport mesa\n\n\n@solara.component\ndef SpaceMatplotlib(model, agent_portrayal, dependencies: Optional[list[any]] = None):\n space_fig = Figure...
[ { "content": "from typing import Optional\n\nimport networkx as nx\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\n\nimport mesa\n\n\n@solara.component\ndef SpaceMatplotlib(model, agent_portrayal, dependencies: Optional[list[any]] = None):\n space_fig = Figure...
diff --git a/mesa/experimental/components/matplotlib.py b/mesa/experimental/components/matplotlib.py index e2389b5ce39..7932407247b 100644 --- a/mesa/experimental/components/matplotlib.py +++ b/mesa/experimental/components/matplotlib.py @@ -55,6 +55,8 @@ def portray(g): out["c"] = c return out +...
pulp__pulpcore-4031
--url file:///foo/bar/PULP_MANIFEST with policy of on_demand or streamed raises unhandled RuntimeError **Version** Using the all-in-one pulp container with pulpcore 3.28.1 and pulp-file 1.14.3 **Describe the bug** With a remote with --url file:///foo/bar/ using either on_demand or streamed policy, when attempt...
[ { "content": "import asyncio\nimport logging\nfrom multidict import CIMultiDict\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import (\n HTTPError,...
[ { "content": "import asyncio\nimport logging\nfrom multidict import CIMultiDict\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import (\n HTTPError,...
diff --git a/CHANGES/4019.bugfix b/CHANGES/4019.bugfix new file mode 100644 index 0000000000..d8c421dd18 --- /dev/null +++ b/CHANGES/4019.bugfix @@ -0,0 +1 @@ +Fixed FileDownloader in the presence of on_demand remotes. diff --git a/pulpcore/content/handler.py b/pulpcore/content/handler.py index 7a12301375..bbfd601b87 1...
fonttools__fonttools-1398
DeprecationWarning: invalid escape sequence the rest is nicely escaped with `r'...'` https://github.com/fonttools/fonttools/blob/master/Lib/fontTools/ttLib/tables/ttProgram.py#L198-L199 DeprecationWarning: invalid escape sequence the rest is nicely escaped with `r'...'` https://github.com/fonttools/fonttool...
[ { "content": "\"\"\"ttLib.tables.ttProgram.py -- Assembler/disassembler for TrueType bytecode programs.\"\"\"\n\nfrom __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc.textTools import num2binary, binary2num, readHex\nimport array\nimport re\nimp...
[ { "content": "\"\"\"ttLib.tables.ttProgram.py -- Assembler/disassembler for TrueType bytecode programs.\"\"\"\n\nfrom __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc.textTools import num2binary, binary2num, readHex\nimport array\nimport re\nimp...
diff --git a/Lib/fontTools/ttLib/tables/ttProgram.py b/Lib/fontTools/ttLib/tables/ttProgram.py index 62e0e1a749..7ffb37a028 100644 --- a/Lib/fontTools/ttLib/tables/ttProgram.py +++ b/Lib/fontTools/ttLib/tables/ttProgram.py @@ -159,7 +159,7 @@ def bitRepr(value, bits): return s -_mnemonicPat = re.compile("[A-Z][A-...
keras-team__keras-8209
Incorrect sample-wise normalization in ImageDataGenerator I think the ImageDataGenerator is doing sample-wise normalization wrong. The goal should be "subtracting the mean from each image, then rescaling it so that the standard deviation across its pixels is equal to some constant", quoted from Goodfellow et al's _Deep...
[ { "content": "\"\"\"Fairly basic set of tools for real-time data augmentation on image data.\nCan easily be extended to include new transformations,\nnew preprocessing methods, etc...\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport numpy as np\nimport re\nfrom sc...
[ { "content": "\"\"\"Fairly basic set of tools for real-time data augmentation on image data.\nCan easily be extended to include new transformations,\nnew preprocessing methods, etc...\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport numpy as np\nimport re\nfrom sc...
diff --git a/keras/preprocessing/image.py b/keras/preprocessing/image.py index cb1378c6b939..36e787656d1f 100644 --- a/keras/preprocessing/image.py +++ b/keras/preprocessing/image.py @@ -524,12 +524,10 @@ def standardize(self, x): x = self.preprocessing_function(x) if self.rescale: x ...