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
⌀
opendatacube__datacube-core-1255
Don't use rasterio.path @Kirill888 exposing rasterio.path and its members in Rasterio's public API was a mistake (https://github.com/rasterio/rasterio/issues/2365). Can you change https://github.com/opendatacube/datacube-core/blob/95e72fdbff2707aa6f7abc837d9eab52c50258e1/datacube/storage/_rio.py#L16 to not use it and t...
[ { "content": "# This file is part of the Open Data Cube, see https://opendatacube.org for more information\n#\n# Copyright (c) 2015-2020 ODC Contributors\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"\nDriver implementation for Rasterio based reader.\n\"\"\"\nimport logging\nimport warnings\nimport contextlib\n...
[ { "content": "# This file is part of the Open Data Cube, see https://opendatacube.org for more information\n#\n# Copyright (c) 2015-2020 ODC Contributors\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"\nDriver implementation for Rasterio based reader.\n\"\"\"\nimport logging\nimport warnings\nimport contextlib\n...
diff --git a/datacube/storage/_rio.py b/datacube/storage/_rio.py index 1ee7e8bf88..bf4d39f2c7 100644 --- a/datacube/storage/_rio.py +++ b/datacube/storage/_rio.py @@ -13,7 +13,6 @@ import numpy as np from affine import Affine import rasterio -import rasterio.path from urllib.parse import urlparse from typing impor...
open-telemetry__opentelemetry-python-2490
Update docs to reflect intent of get_tracer/get_meter instrumenting_module_name argument Currently the [documentation](https://opentelemetry-python.readthedocs.io/en/latest/api/trace.html?highlight=get_tracer#opentelemetry.trace.TracerProvider.get_tracer) for `get_tracer` says: >The name of the instrumenting module ...
[ { "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/opentelemetry-api/src/opentelemetry/trace/__init__.py b/opentelemetry-api/src/opentelemetry/trace/__init__.py index 56927bf6640..34ac532e305 100644 --- a/opentelemetry-api/src/opentelemetry/trace/__init__.py +++ b/opentelemetry-api/src/opentelemetry/trace/__init__.py @@ -202,8 +202,11 @@ def get_tracer( ...
digitalfabrik__integreat-cms-923
Autosave changes unversioned `Page` model ### Describe the Bug <!-- A clear and concise description of what the bug is. --> When an autosave is triggered, the complete `Page` and `PageTranslation` model instances are saved. Since just the `PageTranslation` is versioned, this might lead to unexpected changes on publi...
[ { "content": "import logging\n\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django.urls import reverse\nfrom django.utils.decorators imp...
[ { "content": "import logging\n\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django.urls import reverse\nfrom django.utils.decorators imp...
diff --git a/src/cms/locale/de/LC_MESSAGES/django.po b/src/cms/locale/de/LC_MESSAGES/django.po index ab636e9613..43e334bbf2 100644 --- a/src/cms/locale/de/LC_MESSAGES/django.po +++ b/src/cms/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"PO...
readthedocs__readthedocs.org-1969
move to sphinx 1.3.5 sphinx 1.3.4 introduced this bug: https://github.com/sphinx-doc/sphinx/issues/2247 , which breaks builds of projects using definition lists containing regular expression like strings. This was considered a high priority bug by the sphinx devs and was fixed with version 1.3.5. Please move to the ne...
[ { "content": "import logging\nimport os\nimport shutil\n\nfrom django.conf import settings\n\nfrom readthedocs.doc_builder.config import ConfigWrapper\nfrom readthedocs.doc_builder.loader import get_builder_class\nfrom readthedocs.projects.constants import LOG_TEMPLATE\n\nlog = logging.getLogger(__name__)\n\n\n...
[ { "content": "import logging\nimport os\nimport shutil\n\nfrom django.conf import settings\n\nfrom readthedocs.doc_builder.config import ConfigWrapper\nfrom readthedocs.doc_builder.loader import get_builder_class\nfrom readthedocs.projects.constants import LOG_TEMPLATE\n\nlog = logging.getLogger(__name__)\n\n\n...
diff --git a/readthedocs/doc_builder/python_environments.py b/readthedocs/doc_builder/python_environments.py index 6da73751861..eb1163891fe 100644 --- a/readthedocs/doc_builder/python_environments.py +++ b/readthedocs/doc_builder/python_environments.py @@ -97,7 +97,7 @@ def setup_base(self): def install_core_req...
pyinstaller__pyinstaller-7035
Docstrings of `exec_statement` and `eval_statement` have a note with an incorrect version number ## Description of the issue This is a documentation issue. The docstrings of `exec_statement` and `eval_statement` in `PyInstaller.utils.hooks` contains the following note: Notes: As of v4.6.0, usage o...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2022, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2022, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/utils/hooks/__init__.py b/PyInstaller/utils/hooks/__init__.py index 2f6609ee57..2918dbbd7d 100644 --- a/PyInstaller/utils/hooks/__init__.py +++ b/PyInstaller/utils/hooks/__init__.py @@ -88,7 +88,7 @@ def exec_statement(statement): datas = [ (mpl_data_dir, "") ] Notes: - A...
PyGithub__PyGithub-1039
Organization.add_to_members() doesn't pass role correctly https://pygithub.readthedocs.io/en/latest/github_objects/Organization.html#github.Organization.Organization.add_to_members passes the role as part of the query string: https://github.com/PyGithub/PyGithub/blob/master/github/Organization.py#L316 But Github exp...
[ { "content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2012 Steve English <steve.english@navetas.com> #\n# Copyright 2012 Vincent ...
[ { "content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2012 Steve English <steve.english@navetas.com> #\n# Copyright 2012 Vincent ...
diff --git a/github/Organization.py b/github/Organization.py index 33a4e7c2ae..ff7f3677f0 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -313,12 +313,12 @@ def add_to_members(self, member, role=github.GithubObject.NotSet): """ assert isinstance(role, (str, unicode)), role ...
encode__httpx-270
Make ASGI dispatcher asyncio-agnostic *Note: this issue breaks apart steps originally taken in #217.* The ASGI dispatcher currently relies on asyncio-specific APIs to perform various operations, which is a blocker towards supporting alternative concurrency backends. We want to make sure all of the I/O inside `ASG...
[ { "content": "import typing\n\nfrom .base import AsyncDispatcher\nfrom ..concurrency.base import ConcurrencyBackend\nfrom ..concurrency.asyncio import AsyncioBackend\nfrom ..config import CertTypes, TimeoutTypes, VerifyTypes\nfrom ..models import AsyncRequest, AsyncResponse\n\n\nclass ASGIDispatch(AsyncDispatch...
[ { "content": "import typing\n\nfrom .base import AsyncDispatcher\nfrom ..concurrency.base import ConcurrencyBackend\nfrom ..concurrency.asyncio import AsyncioBackend\nfrom ..config import CertTypes, TimeoutTypes, VerifyTypes\nfrom ..models import AsyncRequest, AsyncResponse\n\n\nclass ASGIDispatch(AsyncDispatch...
diff --git a/httpx/dispatch/asgi.py b/httpx/dispatch/asgi.py index 4e3f3dcd8c..6c1fc267da 100644 --- a/httpx/dispatch/asgi.py +++ b/httpx/dispatch/asgi.py @@ -48,13 +48,13 @@ def __init__( raise_app_exceptions: bool = True, root_path: str = "", client: typing.Tuple[str, int] = ("127.0.0.1", 1...
django-wiki__django-wiki-761
Installation of 0.2.3 using pip seems to be missing a file specifically the glyphicons font from bootstrap, located at: `/wiki/static/wiki/bootstrap/fonts/glyphicons-halflings-regular.woff2` within the repository causes a bug when calling `collectstatic`.. I've verified it by manually downloading the `.whl` archive ...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nimport sys\nfrom setuptools import find_packages, setup\n\nfrom wiki import __version__\n\n\n# Utility function to read the README file.\n# Used for the long_description. It's ni...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nimport sys\n\nfrom setuptools import find_packages, setup\n\nfrom wiki import __version__\n\n\n# Utility function to read the README file.\n# Used for the long_description. It's ...
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b2f61dd5e..4cd327df8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,6 @@ +repos: - repo: git://github.com/pre-commit/pre-commit-hooks - sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f + sha: 79915aa6ef4624ba66a580...
privacyidea__privacyidea-3443
Wrong QR-Code sent during enroll_via_validate If `enroll_via_multichallenge` is active, the QR-code sent after the first request only contains the token seed, not the complete `otpauth://` uri in case of enrolling HOTP/TOTP token. When calling [`get_init_detail()`](https://github.com/privacyidea/privacyidea/blob/b1e6c...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# privacyIDEA is a fork of LinOTP\n# May 08, 2014 Cornelius Kölbel\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# 2022-02-03 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add verified enrollment\n# 2018-06-06 Michael Becker <mi...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# privacyIDEA is a fork of LinOTP\n# May 08, 2014 Cornelius Kölbel\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# 2022-02-03 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add verified enrollment\n# 2018-06-06 Michael Becker <mi...
diff --git a/privacyidea/lib/tokens/hotptoken.py b/privacyidea/lib/tokens/hotptoken.py index 27144bf82c..e93508c7d7 100644 --- a/privacyidea/lib/tokens/hotptoken.py +++ b/privacyidea/lib/tokens/hotptoken.py @@ -832,10 +832,10 @@ def enroll_via_validate(cls, g, content, user_obj): # Create a challenge! ...
netbox-community__netbox-9563
Set default manufacturer on module insert ### NetBox version v3.2.3 ### Feature type Change to existing functionality ### Proposed functionality When inserting a module into a device, the manufacturer of the module should default to the same manufacturer as the parent device. Eg, if I'm inserting a module into a ...
[ { "content": "LINKTERMINATION = \"\"\"\n{% if value %}\n {% if value.parent_object %}\n <a href=\"{{ value.parent_object.get_absolute_url }}\">{{ value.parent_object }}</a>\n <i class=\"mdi mdi-chevron-right\"></i>\n {% endif %}\n <a href=\"{{ value.get_absolute_url }}\">{{ value }}</a>\n{% endif %}\n\...
[ { "content": "LINKTERMINATION = \"\"\"\n{% if value %}\n {% if value.parent_object %}\n <a href=\"{{ value.parent_object.get_absolute_url }}\">{{ value.parent_object }}</a>\n <i class=\"mdi mdi-chevron-right\"></i>\n {% endif %}\n <a href=\"{{ value.get_absolute_url }}\">{{ value }}</a>\n{% endif %}\n\...
diff --git a/netbox/dcim/tables/template_code.py b/netbox/dcim/tables/template_code.py index 92739c6ed6e..7124c2b1f7e 100644 --- a/netbox/dcim/tables/template_code.py +++ b/netbox/dcim/tables/template_code.py @@ -385,7 +385,7 @@ <i class="mdi mdi-server-minus" aria-hidden="true" title="Remove module"></i> ...
facebookresearch__nevergrad-11
Hello-world install question ## Steps to reproduce Install nevergrad ``` pip3 install -e git+git@github.com:facebookresearch/nevergrad@master#egg=nevergrad Obtaining nevergrad from git+git@github.com:facebookresearch/nevergrad@master#egg=nevergrad Cloning git@github.com:facebookresearch/nevergrad (to revisio...
[ { "content": "#!/usr/bin/env python\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\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\n# from distutils.core import setup\nfrom setuptools import setup\n\n\nw...
[ { "content": "#!/usr/bin/env python\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\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\n# from distutils.core import setup\nfrom setuptools import setup\n\nwit...
diff --git a/setup.py b/setup.py index 1739736a8..ab6ecbf7c 100644 --- a/setup.py +++ b/setup.py @@ -7,14 +7,22 @@ # from distutils.core import setup from setuptools import setup - with open('requirements.txt') as f: requirements = f.read().splitlines() - -setup(name='nevergrad', - version='0.1.0', - ...
jupyterhub__zero-to-jupyterhub-k8s-809
traitlets.traitlets.TraitError: The 'extra_resource_limits' trait of a KubeSpawner instance must be a dict I just tried to deploy `v0.7-0fdbfb5` and I'm getting an error immediately after login. Hub logs: ``` [D 2018-08-01 09:28:25.829 JupyterHub user:190] Creating <class 'kubespawner.spawner.KubeSpawner'> for XXX...
[ { "content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\nfrom jupyterhub.utils import url_path_join\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather...
[ { "content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\nfrom jupyterhub.utils import url_path_join\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather...
diff --git a/images/hub/jupyterhub_config.py b/images/hub/jupyterhub_config.py index b3cba3e892..da6fb17e62 100644 --- a/images/hub/jupyterhub_config.py +++ b/images/hub/jupyterhub_config.py @@ -126,8 +126,8 @@ c.KubeSpawner.mem_guarantee = get_config('singleuser.memory.guarantee') c.KubeSpawner.cpu_limit = get_confi...
google__turbinia-1418
[Bug]: plaso jobs fail when plaso >6 months old ### What steps will reproduce the bug? * Use a plaso version > 6 months old * Run a plaso job * pinfo.py will output warnings that are not json format so evidence.py will error * request never completes ### What is the expected behavior? requests to end... pinfo.py...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
diff --git a/turbinia/evidence.py b/turbinia/evidence.py index a52d2f557..fbe605c9f 100644 --- a/turbinia/evidence.py +++ b/turbinia/evidence.py @@ -1070,6 +1070,8 @@ def _validate(self): log.info(f'Running pinfo.py to validate PlasoFile {self.local_path}') command = subprocess.run(cmd, capture_output=Tru...
mne-tools__mne-python-5125
BUG- can no longer compute projs from CTF data PR #5083 added an assert to make sure that ref channels are retained when picking data channels. this had the side effect of breaking EOG and ECG proj computations. reference channels are explicitly not included when computing proj operators (https://github.com/mne-tool...
[ { "content": "# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Matti Hamalainen <msh@nmr.mgh.harvard.edu>\n# Martin Luessi <mluessi@nmr.mgh.harvard.edu>\n#\n# License: BSD (3-clause)\n\nimport copy as cp\n\nimport numpy as np\n\nfrom .. import Epochs, compute_proj_evo...
[ { "content": "# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Matti Hamalainen <msh@nmr.mgh.harvard.edu>\n# Martin Luessi <mluessi@nmr.mgh.harvard.edu>\n#\n# License: BSD (3-clause)\n\nimport copy as cp\n\nimport numpy as np\n\nfrom .. import Epochs, compute_proj_evo...
diff --git a/mne/preprocessing/ssp.py b/mne/preprocessing/ssp.py index e7541c8a6ce..6a9a90301f1 100644 --- a/mne/preprocessing/ssp.py +++ b/mne/preprocessing/ssp.py @@ -183,8 +183,11 @@ def _compute_exg_proj(mode, raw, raw_event, tmin, tmax, _safe_del_key(flat, 'eog') # exclude bad channels from pro...
pyg-team__pytorch_geometric-3930
Computing the size of the in-degree histogram tensor dynamically in the PNA example ### 🛠 Proposed Refactor The `deg` tensor in the PNA example is initialized with the size `5`. https://github.com/pyg-team/pytorch_geometric/blob/50b7bfc4a59b5b6f7ec547ff862985f3b2e22798/examples/pna.py#L23 This value will obvious...
[ { "content": "import os.path as osp\n\nimport torch\nimport torch.nn.functional as F\nfrom torch.nn import Embedding, Linear, ModuleList, ReLU, Sequential\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\n\nfrom torch_geometric.datasets import ZINC\nfrom torch_geometric.loader import DataLoader\nfrom tor...
[ { "content": "import os.path as osp\n\nimport torch\nimport torch.nn.functional as F\nfrom torch.nn import Embedding, Linear, ModuleList, ReLU, Sequential\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\n\nfrom torch_geometric.datasets import ZINC\nfrom torch_geometric.loader import DataLoader\nfrom tor...
diff --git a/examples/pna.py b/examples/pna.py index c0aa29549d62..4697f49d7121 100644 --- a/examples/pna.py +++ b/examples/pna.py @@ -19,8 +19,14 @@ val_loader = DataLoader(val_dataset, batch_size=128) test_loader = DataLoader(test_dataset, batch_size=128) -# Compute in-degree histogram over training data. -deg = ...
SarthakJariwala__seaborn-image-574
Can't input colormaps to imshow Hi, i was trying to use a colormap from the sunpy library to display images of the sun with seaborn_image, but i encountered a bug where when reading the Colormap class it throws an "unhashable type" error. Here's a piece of code to reproduce the bug: ``` import numpy as np import ...
[ { "content": "import warnings\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom matplotlib.cm import register_cmap\n\nfrom ._colormap import _CMAP_QUAL\n\n__all__ = [\n \"set_context\",\n \"set_save_context\",\n \"reset_defaults\",\n \"set_image\",\n \"set_scalebar\",\n]\n\n# TOD...
[ { "content": "import warnings\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom matplotlib.cm import register_cmap\n\nfrom ._colormap import _CMAP_QUAL\n\n__all__ = [\n \"set_context\",\n \"set_save_context\",\n \"reset_defaults\",\n \"set_image\",\n \"set_scalebar\",\n]\n\n# TOD...
diff --git a/src/seaborn_image/_context.py b/src/seaborn_image/_context.py index 4332eb1b..d0c972ce 100644 --- a/src/seaborn_image/_context.py +++ b/src/seaborn_image/_context.py @@ -123,7 +123,7 @@ def set_image(cmap="deep", origin="lower", interpolation="nearest", despine=Fals """ - if cmap in _CMAP_QUAL....
interlegis__sapl-1067
Migração: status de matéria O status de matéria legislativa Autógrafo foi migrado como "??????????" e sigla "??????????".
[ { "content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import Con...
[ { "content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import Con...
diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py index 6ab3cd184..0d2f5be10 100644 --- a/sapl/legacy/migration.py +++ b/sapl/legacy/migration.py @@ -130,9 +130,7 @@ def get_fk_related(field, value, label=None): if not field.null: fields_dict = get_fields_dict(field....
archlinux__archinstall-538
Output looks broken with pacman 6 Since `pacman` v6 was released, it introduced paralell downloads among other things (color enhancement and other good stuff). Due to how we show "progressbars" in archinstall, the output looks broken and scrambled. **The installs work fine!** It's jut that the outlook looks garb...
[ { "content": "import hashlib\nimport json\nimport logging\nimport os\nimport pty\nimport shlex\nimport subprocess\nimport sys\nimport time\nfrom datetime import datetime, date\nfrom select import epoll, EPOLLIN, EPOLLHUP\nfrom typing import Union\n\nfrom .exceptions import *\nfrom .output import log\n\n\ndef ge...
[ { "content": "import hashlib\nimport json\nimport logging\nimport os\nimport pty\nimport shlex\nimport subprocess\nimport sys\nimport time\nfrom datetime import datetime, date\nfrom select import epoll, EPOLLIN, EPOLLHUP\nfrom typing import Union\n\nfrom .exceptions import *\nfrom .output import log\n\n\ndef ge...
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 3b62c891a8..9711382fb8 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -202,27 +202,6 @@ def peak(self, output: Union[str, bytes]) -> bool: except UnicodeDecodeError: return False - output = output.stri...
scrapy__scrapy-5412
Remove Python 2 code from WrappedRequest [The WrappedRequest class](https://github.com/scrapy/scrapy/blob/06f3d12c1208c380f9f1a16cb36ba2dfa3c244c5/scrapy/http/cookies.py#L148) has methods that can be removed, as [they were only used in Python 3.3 and earlier](https://docs.python.org/3/library/http.cookiejar.html#http.c...
[ { "content": "import re\nimport time\nfrom http.cookiejar import CookieJar as _CookieJar, DefaultCookiePolicy\n\nfrom scrapy.utils.httpobj import urlparse_cached\nfrom scrapy.utils.python import to_unicode\n\n\n# Defined in the http.cookiejar module, but undocumented:\n# https://github.com/python/cpython/blob/v...
[ { "content": "import re\nimport time\nfrom http.cookiejar import CookieJar as _CookieJar, DefaultCookiePolicy\n\nfrom scrapy.utils.httpobj import urlparse_cached\nfrom scrapy.utils.python import to_unicode\n\n\n# Defined in the http.cookiejar module, but undocumented:\n# https://github.com/python/cpython/blob/v...
diff --git a/scrapy/http/cookies.py b/scrapy/http/cookies.py index bf4ae7b45d5..b43c383fe2f 100644 --- a/scrapy/http/cookies.py +++ b/scrapy/http/cookies.py @@ -142,10 +142,6 @@ def is_unverifiable(self): """ return self.request.meta.get('is_unverifiable', False) - def get_origin_req_host(self): ...
mitmproxy__mitmproxy-797
Mitmweb can't run When I run mitmweb,then open 121.0.0.1:8081, the error happened. ``` Traceback (most recent call last): File "/Users/venv.mitmproxy/lib/python2.7/site-packages/tornado/ioloop.py", line 1020, in _run return self.callback() File "/Users/mitmproxy/libmproxy/web/__init__.py", line 141, in tick ...
[ { "content": "from __future__ import (absolute_import, print_function, division)\n\nimport copy\nimport os\n\nfrom netlib import tcp, certutils\nfrom .. import stateobject, utils\n\n\nclass ClientConnection(tcp.BaseHandler, stateobject.StateObject):\n def __init__(self, client_connection, address, server):\n...
[ { "content": "from __future__ import (absolute_import, print_function, division)\n\nimport copy\nimport os\n\nfrom netlib import tcp, certutils\nfrom .. import stateobject, utils\n\n\nclass ClientConnection(tcp.BaseHandler, stateobject.StateObject):\n def __init__(self, client_connection, address, server):\n...
diff --git a/libmproxy/models/connections.py b/libmproxy/models/connections.py index f1e10de9f6..95ffbaf6da 100644 --- a/libmproxy/models/connections.py +++ b/libmproxy/models/connections.py @@ -135,8 +135,8 @@ def tls_established(self): def get_state(self, short=False): d = super(ServerConnection, self)....
ranaroussi__yfinance-1496
Name Error ``` import yfinance as yf import matplotlib.pyplot as plt # Define the ticker symbol symbol = "NQ=F" plt.style.use('dark_background') # Create the object representing the symbol of interest equity = yf.Ticker(symbol) info = equity.fast_info # Get the data for the ticker ticker = yf.Ticker(sym...
[ { "content": "import datetime\nimport json\n\nimport pandas as pd\n\nfrom yfinance import utils\nfrom yfinance.data import TickerData\n\n\ninfo_retired_keys_price = {\"currentPrice\", \"dayHigh\", \"dayLow\", \"open\", \"previousClose\", \"volume\", \"volume24Hr\"}\ninfo_retired_keys_price.update({\"regularMark...
[ { "content": "import datetime\nimport json\n\nimport pandas as pd\nimport numpy as _np\n\nfrom yfinance import utils\nfrom yfinance.data import TickerData\n\n\ninfo_retired_keys_price = {\"currentPrice\", \"dayHigh\", \"dayLow\", \"open\", \"previousClose\", \"volume\", \"volume24Hr\"}\ninfo_retired_keys_price....
diff --git a/tests/ticker.py b/tests/ticker.py index 55431b665..b2b9b5af2 100644 --- a/tests/ticker.py +++ b/tests/ticker.py @@ -704,6 +704,11 @@ def test_info(self): self.assertEqual(self.symbols[0], data["symbol"], "Wrong symbol value in info dict") def test_fast_info(self): + f = yf.Ticker("AA...
nvaccess__nvda-14409
Cannot reload plugins in NVDA snapshots <!-- Please read the text in this edit field before filling it in. Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files. Issues may be closed if the required information is not present. https://github.com/nvacc...
[ { "content": "#globalPluginHandler.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2010 James Teh <jamie@jantrid.net>\r\n\r\nimport sys\r\nimport pkgutil\r\nimport importlib\r\nimport config...
[ { "content": "#globalPluginHandler.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2010 James Teh <jamie@jantrid.net>\r\n\r\nimport sys\r\nimport pkgutil\r\nimport importlib\r\nimport config...
diff --git a/source/appModuleHandler.py b/source/appModuleHandler.py index 0b715bc27c3..32ea6529a0c 100644 --- a/source/appModuleHandler.py +++ b/source/appModuleHandler.py @@ -341,6 +341,8 @@ def reloadAppModules(): for mod in mods: del sys.modules[mod] import appModules + from addonHandler.packaging import ...
aws__aws-cli-436
Using --ip-permissions with --group-id causes validation error If you attempt to use the --ip-permissions option with `aws ec2 authorize-security-group-*` subcommands while using a `--group-id` option to specify a VPC group, you receive this validation error: ``` ValueError: The --group_id option is not compatible wit...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
diff --git a/awscli/customizations/ec2secgroupsimplify.py b/awscli/customizations/ec2secgroupsimplify.py index 4f1a1ff06a3e..72ad1ac8f4aa 100644 --- a/awscli/customizations/ec2secgroupsimplify.py +++ b/awscli/customizations/ec2secgroupsimplify.py @@ -48,12 +48,11 @@ def _check_args(parsed_args, **kwargs): # raise ...
jazzband__pip-tools-1159
5.1.2 regression: lost dependencies using same zip file with different subdirectories In `pip-tools` 5.1.2 and later, when I provide two copies of the same zip file URL with different subdirectories, the dependencies of the first are lost: ``` https://github.com/zulip/python-zulip-api/archive/0.7.0.zip#egg=zulip==0...
[ { "content": "# coding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom abc import ABCMeta, abstractmethod\nfrom contextlib import contextmanager\n\nfrom six import add_metaclass\n\n\n@add_metaclass(ABCMeta)\nclass BaseRepository(object):\n def clear_caches(s...
[ { "content": "# coding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom abc import ABCMeta, abstractmethod\nfrom contextlib import contextmanager\n\nfrom six import add_metaclass\n\n\n@add_metaclass(ABCMeta)\nclass BaseRepository(object):\n def clear_caches(s...
diff --git a/piptools/repositories/base.py b/piptools/repositories/base.py index 6ac06bad9..0343fe7d7 100644 --- a/piptools/repositories/base.py +++ b/piptools/repositories/base.py @@ -45,6 +45,7 @@ def allow_all_wheels(self): Monkey patches pip.Wheel to allow wheels from all platforms and Python versions. ...
Zeroto521__my-data-toolkit-834
BUG: `geocentroid` coordiantes should divide distance <!-- Thanks for contributing a pull request! Please follow these standard acronyms to start the commit message: - ENH: enhancement - BUG: bug fix - DOC: documentation - TYP: type annotations - TST: addition or modification of tests - MAINT: maintenance c...
[ { "content": "import geopandas as gpd\nimport numpy as np\nimport pandas as pd\nfrom shapely import Point\n\nfrom dtoolkit.geoaccessor.geoseries.geodistance import geodistance\nfrom dtoolkit.geoaccessor.geoseries.xy import xy\nfrom dtoolkit.geoaccessor.register import register_geoseries_method\n\n\n@register_ge...
[ { "content": "import geopandas as gpd\nimport numpy as np\nimport pandas as pd\nfrom shapely import Point\n\nfrom dtoolkit.geoaccessor.geoseries.geodistance import geodistance\nfrom dtoolkit.geoaccessor.geoseries.xy import xy\nfrom dtoolkit.geoaccessor.register import register_geoseries_method\n\n\n@register_ge...
diff --git a/dtoolkit/geoaccessor/geoseries/geocentroid.py b/dtoolkit/geoaccessor/geoseries/geocentroid.py index 596e1e0a2..778cfdb16 100644 --- a/dtoolkit/geoaccessor/geoseries/geocentroid.py +++ b/dtoolkit/geoaccessor/geoseries/geocentroid.py @@ -75,14 +75,14 @@ def geocentroid( Set weights for each point. ...
cisagov__manage.get.gov-1778
Logout: OIDC logout behavior resulting on "500" error in server restart/recompile ### Current Behavior Logout behavior observed: 1. 500 error is displayed when user logs out 2. By clicking sign in and then sign out, user is able to successfully log out without error Logs being shown when this error occurs ![...
[ { "content": "# coding: utf-8\n\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib.auth import logout as auth_logout\nfrom django.contrib.auth import authenticate, login\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import redirect, render\nfrom urllib.parse import p...
[ { "content": "# coding: utf-8\n\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib.auth import logout as auth_logout\nfrom django.contrib.auth import authenticate, login\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import redirect, render\nfrom urllib.parse import p...
diff --git a/src/djangooidc/tests/test_views.py b/src/djangooidc/tests/test_views.py index 4cd2241e3..0f734b80d 100644 --- a/src/djangooidc/tests/test_views.py +++ b/src/djangooidc/tests/test_views.py @@ -327,6 +327,27 @@ def test_logout_redirect_url(self, mock_client): self.assertEqual(response.status_cod...
spyder-ide__spyder-10114
Invert colors for "Pretty-Printing" symbolic math in IPython's dark background The pretty printed symbolic math is unreadable when the the IPython console background is set to dark. To reproduce: 1. Set preferences -> IPython console->Display->Background color to dark 2. Set preferences -> IPython console->Advance...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nShell Widget for the IPython Console\n\"\"\"\n\n# Standard library imports\nimport ast\nimport os\nimport uuid\nimport re\nfrom te...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nShell Widget for the IPython Console\n\"\"\"\n\n# Standard library imports\nimport ast\nimport os\nimport uuid\nimport re\nfrom te...
diff --git a/spyder/plugins/ipythonconsole/widgets/shell.py b/spyder/plugins/ipythonconsole/widgets/shell.py index a60716977d7..0f165ae337a 100644 --- a/spyder/plugins/ipythonconsole/widgets/shell.py +++ b/spyder/plugins/ipythonconsole/widgets/shell.py @@ -185,9 +185,16 @@ def set_color_scheme(self, color_scheme, reset...
buildbot__buildbot-930
cfg-www.rst: Fix some indentation. cfg-www.rst: Fix some indentation.
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
diff --git a/master/buildbot/process/buildstep.py b/master/buildbot/process/buildstep.py index d756eaf61336..341ad0ce621e 100644 --- a/master/buildbot/process/buildstep.py +++ b/master/buildbot/process/buildstep.py @@ -442,6 +442,17 @@ class BuildStep(object, properties.PropertiesMixin): # properties set on a buil...
comic__grand-challenge.org-2792
The help text for View content in Algorithm settings only list input interfaces. **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to an algorithm with inputs and outputs defined 2. Click on Update settings 3. Scroll down to View con...
[ { "content": "import re\nfrom itertools import chain\nfrom urllib.parse import urlparse\n\nimport requests\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import (\n HTML,\n ButtonHolder,\n Field,\n Fieldset,\n Layout,\n Submit,\n)\nfrom django.conf import settings\nfrom ...
[ { "content": "import re\nfrom itertools import chain\nfrom urllib.parse import urlparse\n\nimport requests\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import (\n HTML,\n ButtonHolder,\n Field,\n Fieldset,\n Layout,\n Submit,\n)\nfrom django.conf import settings\nfrom ...
diff --git a/app/grandchallenge/algorithms/forms.py b/app/grandchallenge/algorithms/forms.py index 55697e3edd..8630d16f54 100644 --- a/app/grandchallenge/algorithms/forms.py +++ b/app/grandchallenge/algorithms/forms.py @@ -344,9 +344,14 @@ def __init__(self, *args, **kwargs): self.fields["contact_email"].requi...
edgedb__edgedb-7400
`constraint expression on` causes InternalServerError: NotImplementedError <!-- Please search existing issues to avoid creating duplicates. --> <!-- For the EdgeDB Version: run `edgedb query 'select sys::get_version_as_str()'` from your project directory (or run `select sys::get_version_as_str();` in the EdgeDB in...
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2015-present MagicStack Inc. and the EdgeDB 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...
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2015-present MagicStack Inc. and the EdgeDB 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...
diff --git a/edb/edgeql/tracer.py b/edb/edgeql/tracer.py index 5a6e99e6a75..99968e99e69 100644 --- a/edb/edgeql/tracer.py +++ b/edb/edgeql/tracer.py @@ -27,6 +27,7 @@ import functools from contextlib import contextmanager +from edb import errors from edb.schema import links as s_links from edb.schema import name ...
akvo__akvo-rsr-2331
Bug in get_admin_employment_orgs() The `get_admin_employment_orgs` has a bug throwing a `TypeError` in certain cases. See http://sentry.support.akvo-ops.org/rsr/live/group/967/.
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom djang...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom djang...
diff --git a/akvo/rsr/models/user.py b/akvo/rsr/models/user.py index 4d3fa018af..b6819d9827 100644 --- a/akvo/rsr/models/user.py +++ b/akvo/rsr/models/user.py @@ -222,17 +222,8 @@ def set_is_org_admin(self, org, set_it): employment.group.delete() def get_admin_employment_orgs(self): - from .e...
pydantic__pydantic-8793
model_json_schema export with Annotated types misses 'required' parameters ### Initial Checks - [X] I confirm that I'm using Pydantic V2 ### Description It seems that using `model_json_schema` on type annotations combining `typing.Annotated` and `pydantic.Field` result in the `Annotated` not being marked as `r...
[ { "content": "\"\"\"Defining fields on models.\"\"\"\nfrom __future__ import annotations as _annotations\n\nimport dataclasses\nimport inspect\nimport typing\nfrom copy import copy\nfrom dataclasses import Field as DataclassField\nfrom functools import cached_property\nfrom typing import Any, ClassVar\nfrom war...
[ { "content": "\"\"\"Defining fields on models.\"\"\"\nfrom __future__ import annotations as _annotations\n\nimport dataclasses\nimport inspect\nimport typing\nfrom copy import copy\nfrom dataclasses import Field as DataclassField\nfrom functools import cached_property\nfrom typing import Any, ClassVar\nfrom war...
diff --git a/pydantic/fields.py b/pydantic/fields.py index e369b52d81b..a2c51771e84 100644 --- a/pydantic/fields.py +++ b/pydantic/fields.py @@ -402,6 +402,13 @@ def merge_field_infos(*field_infos: FieldInfo, **overrides: Any) -> FieldInfo: # No merging necessary, but we still need to make a copy and apply...
tiangolo__fastapi-454
Add support for Pydantic's dataclasses **Describe the question** I am using a pydantic.dataclasses.dataclass as a response_model of my fast api route. ``` from fastapi import FastAPI from pydantic.dataclasses import dataclass @dataclass class Foo: bar: int app = FastAPI() @app.get('/foo', resp...
[ { "content": "import re\nfrom typing import Any, Dict, List, Sequence, Set, Type, cast\n\nfrom fastapi import routing\nfrom fastapi.openapi.constants import REF_PREFIX\nfrom pydantic import BaseConfig, BaseModel, Schema, create_model\nfrom pydantic.fields import Field\nfrom pydantic.schema import get_flat_model...
[ { "content": "import re\nfrom dataclasses import is_dataclass\nfrom typing import Any, Dict, List, Sequence, Set, Type, cast\n\nfrom fastapi import routing\nfrom fastapi.openapi.constants import REF_PREFIX\nfrom pydantic import BaseConfig, BaseModel, Schema, create_model\nfrom pydantic.fields import Field\nfrom...
diff --git a/fastapi/utils.py b/fastapi/utils.py index de0260615ee00..17a16b5227687 100644 --- a/fastapi/utils.py +++ b/fastapi/utils.py @@ -1,4 +1,5 @@ import re +from dataclasses import is_dataclass from typing import Any, Dict, List, Sequence, Set, Type, cast from fastapi import routing @@ -52,6 +53,8 @@ def ge...
fidals__shopelectro-917
models.py:85: Explore and doc what is vendor_code. The puzzle `910-f547fee5` from #910 has to be resolved: https://github.com/fidals/shopelectro/blob/e7de650f01b749f584f374923d7863083cc83b3c/shopelectro/models.py#L85-L85 The puzzle was created by duker33 on 28-Jun-19. Estimate: 30 minutes, role: DEV. If you hav...
[ { "content": "import enum\nimport random\nimport string\nimport typing\nfrom uuid import uuid4\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom catalog import models as catalog_models\nfrom ecommer...
[ { "content": "import enum\nimport random\nimport string\nimport typing\nfrom uuid import uuid4\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom catalog import models as catalog_models\nfrom ecommer...
diff --git a/shopelectro/models.py b/shopelectro/models.py index c859a3b8..1667d670 100644 --- a/shopelectro/models.py +++ b/shopelectro/models.py @@ -82,7 +82,13 @@ class Product( verbose_name=_('tags'), ) - # @todo #910:30m Explore and doc what is vendor_code. + # `vendor_code` is a code that r...
pypa__pipenv-36
Trailing comments cause parse error in `pipenv install -r requirements.txt` Running `pipenv install -r requirements.txt` on a file with trailing comments (such as those generated by `pip-compile`) gives the following error: ``` $ pipenv install -r requirements.txt Installing amqp==2.1.4 # via kombu.....
[ { "content": "import codecs\nimport json\nimport os\nimport sys\nimport distutils.spawn\n\nimport click\nimport crayons\nimport delegator\nimport pexpect\nimport toml\n\nfrom . import _pipfile as pipfile\nfrom .project import Project\nfrom .utils import convert_deps_from_pip, convert_deps_to_pip\n\n__version__ ...
[ { "content": "import codecs\nimport json\nimport os\nimport sys\nimport distutils.spawn\n\nimport click\nimport crayons\nimport delegator\nimport pexpect\nimport toml\n\nfrom . import _pipfile as pipfile\nfrom .project import Project\nfrom .utils import convert_deps_from_pip, convert_deps_to_pip\n\n__version__ ...
diff --git a/pipenv/cli.py b/pipenv/cli.py index 7985d5b964..f2272a63fa 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -330,7 +330,7 @@ def cli(ctx, where=False, bare=False, three=False): @click.argument('package_name', default=False) @click.argument('more_packages', nargs=-1) @click.option('--dev','-d', is_flag=...
googleapis__google-auth-library-python-91
Add `connections` to `httplib2.AuthorizedHttp` /cc @dhermes
[ { "content": "# Copyright 2014 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 applica...
[ { "content": "# Copyright 2014 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 applica...
diff --git a/httplib2_transport/google_auth_httplib2.py b/httplib2_transport/google_auth_httplib2.py index 598ccb3e4..866841b2e 100644 --- a/httplib2_transport/google_auth_httplib2.py +++ b/httplib2_transport/google_auth_httplib2.py @@ -223,3 +223,13 @@ def request(self, uri, method='GET', body=None, headers=None, ...
huggingface__transformers-6461
Hashing a tokenizer using the 🤗 nlp lib is not deterministic In the `nlp` library it is common to use a tokenizer on a dataset. The library takes care of caching the results, so that if you run the tokenization twice, it will reuse the previous results. To make the caching work, we compute a hash of the tokenizer. ...
[ { "content": "# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. 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#...
[ { "content": "# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. 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#...
diff --git a/src/transformers/tokenization_utils.py b/src/transformers/tokenization_utils.py index cbe9b34beeff..3121980c0d5b 100644 --- a/src/transformers/tokenization_utils.py +++ b/src/transformers/tokenization_utils.py @@ -207,10 +207,10 @@ def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], speci...
sql-machine-learning__elasticdl-373
When worker/master image creation failed, client should fail instead of trying to launch master.
[ { "content": "import argparse\nimport os\nimport inspect\nimport tempfile\nimport time\nimport getpass\nimport sys\nfrom string import Template\nimport docker\nimport yaml\nfrom kubernetes.client.apis import core_v1_api\nfrom kubernetes import config\n\n\ndef _m_file_in_docker(model_file):\n return \"/model/...
[ { "content": "import argparse\nimport os\nimport inspect\nimport tempfile\nimport time\nimport getpass\nimport sys\nfrom string import Template\nimport docker\nimport yaml\nfrom kubernetes.client.apis import core_v1_api\nfrom kubernetes import config\n\n\ndef _m_file_in_docker(model_file):\n return \"/model/...
diff --git a/elasticdl/client/client.py b/elasticdl/client/client.py index 9c22d303d..61d39834c 100644 --- a/elasticdl/client/client.py +++ b/elasticdl/client/client.py @@ -32,12 +32,14 @@ def _build_docker_image( for line in client.build( dockerfile=df.name, path=".", rm=True, tag=image_name, decode=True...
gammapy__gammapy-3905
FluxEstimator._set_norm_parameter crashes **Gammapy version** 0.19 **Bug description** Any code passing trough the "scan" branch of `FluxPointsEstimator._nan_result()` will crash due the invocation of `_set_norm_parameter` without the argument `scaled_parameter`. **Expected behavior** Either `_nan_result` pass...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nimport numpy as np\nfrom gammapy.datasets import Datasets\nfrom gammapy.estimators.parameter import ParameterEstimator\nfrom gammapy.maps import Map, MapAxis\nfrom gammapy.modeling import Parameter\nfrom gammapy.model...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nimport numpy as np\nfrom gammapy.datasets import Datasets\nfrom gammapy.estimators.parameter import ParameterEstimator\nfrom gammapy.maps import Map, MapAxis\nfrom gammapy.modeling import Parameter\nfrom gammapy.model...
diff --git a/gammapy/estimators/flux.py b/gammapy/estimators/flux.py index af6c05f073..0f7bc39eae 100644 --- a/gammapy/estimators/flux.py +++ b/gammapy/estimators/flux.py @@ -113,10 +113,12 @@ def get_scale_model(self, models): ref_model = models[self.source].spectral_model scale_model = ScaleSpectral...
django-crispy-forms__django-crispy-forms-909
v1.8 shortlist Hi @carltongibson , I thought I'd put together a shortlist for the 1.8 release. I think there are a few 'easy' issues that could be closed. - [x] Review #899 fixes #798 - [x] Re-work #868 to extract fix for #861 - [x] Review #881 fixes #859 - [x] Investigate #793 as we have looked at this co...
[ { "content": "# -*- coding: utf-8 -*-\n\n__version__ = '1.7.2'\n", "path": "crispy_forms/__init__.py" }, { "content": "import os\nimport sys\nimport crispy_forms\n\nfrom setuptools import setup, find_packages\n\n\nif sys.argv[-1] == 'publish':\n if os.system(\"pip freeze | grep wheel\"):\n ...
[ { "content": "# -*- coding: utf-8 -*-\n\n__version__ = '1.8.0'\n", "path": "crispy_forms/__init__.py" }, { "content": "import os\nimport sys\nimport crispy_forms\n\nfrom setuptools import setup, find_packages\n\n\nif sys.argv[-1] == 'publish':\n if os.system(\"pip freeze | grep wheel\"):\n ...
diff --git a/.gitignore b/.gitignore index 3fa9675ea..1b9a5ab46 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ _build .pydevproject .settings/ /.pytest_cache +.vscode/settings.json diff --git a/CHANGELOG.md b/CHANGELOG.md index e22e228d8..6c3eaebac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1...
napari__napari-466
Canvas splitter no longer expanding when widening the viewer ## 🐛 Bug Introduced by #443 or #453 I presume. ![napari-resize](https://user-images.githubusercontent.com/492549/62437699-ebca4080-b709-11e9-8683-6f58908bec3e.png)
[ { "content": "import os.path\nfrom glob import glob\nimport numpy as np\nimport inspect\nfrom pathlib import Path\n\nfrom qtpy.QtCore import QCoreApplication, Qt, QSize\nfrom qtpy.QtWidgets import (\n QWidget,\n QVBoxLayout,\n QHBoxLayout,\n QFrame,\n QFileDialog,\n QSplitter,\n)\nfrom qtpy.Qt...
[ { "content": "import os.path\nfrom glob import glob\nimport numpy as np\nimport inspect\nfrom pathlib import Path\n\nfrom qtpy.QtCore import QCoreApplication, Qt, QSize\nfrom qtpy.QtWidgets import (\n QWidget,\n QVBoxLayout,\n QHBoxLayout,\n QFrame,\n QFileDialog,\n QSplitter,\n)\nfrom qtpy.Qt...
diff --git a/napari/_qt/qt_viewer.py b/napari/_qt/qt_viewer.py index dd44c3b4545..ce20d9f8ebd 100644 --- a/napari/_qt/qt_viewer.py +++ b/napari/_qt/qt_viewer.py @@ -13,7 +13,7 @@ QFileDialog, QSplitter, ) -from qtpy.QtWidgets import QStackedWidget +from qtpy.QtWidgets import QStackedWidget, QSizePolicy from...
voxel51__fiftyone-3936
Installing Fiftyone on Ubuntu 23.10 ### System information - **OS Platform and Distribution**: Distributor ID: Ubuntu Description: Ubuntu 23.10 Release: 23.10 Codename: mantic - **Python version** (`python --version`): Python 3.11.6 - **FiftyOne version** (`fiftyone --version`): (venv) aitalent...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstalls the ``fiftyone-db`` package.\n\n| Copyright 2017-2023, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport csv\nimport os\nimport pathlib\nimport platform\nimport shutil\nimport tarfile\nimport traceback\nimport zipfile\n\nfrom setuptoo...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstalls the ``fiftyone-db`` package.\n\n| Copyright 2017-2023, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport csv\nimport os\nimport pathlib\nimport platform\nimport shutil\nimport tarfile\nimport traceback\nimport zipfile\n\nfrom setuptoo...
diff --git a/package/db/setup.py b/package/db/setup.py index 5c2997e5909..ee4aa4a3078 100644 --- a/package/db/setup.py +++ b/package/db/setup.py @@ -78,6 +78,10 @@ "aarch64": "https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu2204-6.0.5.tgz", "x86_64": "https://fastdl.mongodb.org/li...
Netflix__lemur-1231
Uploading certificate Hi Team, How can we upload / import a certificate to Lemur using APIs? I am not that much good in python scripting. Could you please guide me how can we achieve this?
[ { "content": "\"\"\"\n.. module: lemur.certificates.views\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport base64\nfrom builtins import str\n\nfrom fla...
[ { "content": "\"\"\"\n.. module: lemur.certificates.views\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport base64\nfrom builtins import str\n\nfrom fla...
diff --git a/lemur/certificates/views.py b/lemur/certificates/views.py index 8035595077..59f9652293 100644 --- a/lemur/certificates/views.py +++ b/lemur/certificates/views.py @@ -300,12 +300,14 @@ def post(self, data=None): { "owner": "joe@example.com", - "publicCert":...
ckan__ckan-7058
Lock down cookie based authentication on API endpoints Discussed on 2022-08-23 dev meeting: 1. Default behaviour: discard cookie based authentication in the API if it doesn't include the CSRF token - Is this equivalent to remove the `@csrf.exempt` decorator [here](https://github.com/ckan/ckan/blob/34401f000846a...
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport os\nimport logging\nimport html\nimport io\n\nfrom typing import Any, Callable, Optional, cast, Union\n\nfrom flask import Blueprint, make_response\n\nfrom werkzeug.exceptions import BadRequest\nfrom werkzeug.datastructures import Mul...
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport os\nimport logging\nimport html\nimport io\n\nfrom typing import Any, Callable, Optional, cast, Union\n\nfrom flask import Blueprint, make_response\n\nfrom werkzeug.exceptions import BadRequest\nfrom werkzeug.datastructures import Mul...
diff --git a/ckan/public-bs3/base/javascript/client.js b/ckan/public-bs3/base/javascript/client.js index 1da0e90dde8..22123faafdb 100644 --- a/ckan/public-bs3/base/javascript/client.js +++ b/ckan/public-bs3/base/javascript/client.js @@ -51,6 +51,10 @@ if (type == 'POST') { options.type = 'POST'; ...
spacetelescope__jwql-280
Update install_requires in setup.py After some research on StackOverflow and discussion with @SaOgaz and @laurenmarietta on the subject of `setup.py` dependencies and `requirements.txt`/`environment.yml` dependencies (#261, #94), we should probably update the list of dependencies in `install_requires` in `setup.py` to ...
[ { "content": "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.17.0'\n\nAUTHORS = 'Matthew Bourque, Sara Ogaz, Joe Filippazzo, Bryan Hilbert, Misty Cracraft, '\nAUTHORS += 'Graham Kanarek, Johannes Sahlmann, Lauren Chambers, Catherine Martlin'\n\nREQUIRES = ...
[ { "content": "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.17.0'\n\nAUTHORS = 'Matthew Bourque, Sara Ogaz, Joe Filippazzo, Bryan Hilbert, Misty Cracraft, '\nAUTHORS += 'Graham Kanarek, Johannes Sahlmann, Lauren Chambers, Catherine Martlin'\n\nREQUIRES = ...
diff --git a/setup.py b/setup.py index 63f6c9cbe..0fabd59ab 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,22 @@ AUTHORS = 'Matthew Bourque, Sara Ogaz, Joe Filippazzo, Bryan Hilbert, Misty Cracraft, ' AUTHORS += 'Graham Kanarek, Johannes Sahlmann, Lauren Chambers, Catherine Martlin' -REQUIRES = ['astroquery', 'bok...
cowrie__cowrie-897
Mysql output has incorrect sql query in line 121 line 120-121 of src/cowrie/output/mysql.py show: ``` elif entry["eventid"] == 'cowrie.login.failed': self.simpleQuery('INSERT INTO `auth` (`session`, `success` `username`, `password`, `timestamp`) ' ``` There is a missing comma between `success` & `username`. Th...
[ { "content": "\"\"\"\nMySQL output connector. Writes audit logs to MySQL database\n\"\"\"\n\nfrom __future__ import absolute_import, division\n\nimport MySQLdb\n\nfrom twisted.enterprise import adbapi\nfrom twisted.internet import defer\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.c...
[ { "content": "\"\"\"\nMySQL output connector. Writes audit logs to MySQL database\n\"\"\"\n\nfrom __future__ import absolute_import, division\n\nimport MySQLdb\n\nfrom twisted.enterprise import adbapi\nfrom twisted.internet import defer\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.c...
diff --git a/src/cowrie/output/mysql.py b/src/cowrie/output/mysql.py index a9c2c2e661..131ddabd70 100644 --- a/src/cowrie/output/mysql.py +++ b/src/cowrie/output/mysql.py @@ -118,7 +118,7 @@ def write(self, entry): (entry["session"], 1, entry['username'], entry['password'], entry["time"]))...
psf__black-2146
21.4b0 doesn't appear in docs changelog **Describe the bug** 21.4b0 and corresponding changes are missing from https://black.readthedocs.io/en/stable/change_log.html It seems there are two changelog files, out of sync https://github.com/psf/black/blob/master/CHANGES.md https://github.com/psf/black/blob/master/do...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------...
diff --git a/docs/change_log.md b/docs/change_log.md deleted file mode 100644 index 01c27553fca..00000000000 --- a/docs/change_log.md +++ /dev/null @@ -1,536 +0,0 @@ -[//]: # "NOTE: THIS FILE WAS AUTOGENERATED FROM CHANGES.md" - -## Change Log - -### Unreleased - -#### _Black_ - -- `Black` now respects `--skip-string-n...
pre-commit__pre-commit-622
Unstaged files + never ran pre-commit => "No such file or directory: .../.cache/pre-commit/patch..." ``` $ pre-commit run [WARNING] Unstaged files detected. [INFO] Stashing unstaged files to /home/asottile/.cache/pre-commit/patch1505686307. An unexpected error has occurred: IOError: [Errno 2] No such file or direct...
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport logging\nimport os.path\nimport time\n\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util import cmd_output\n\n\nlogger = logging.getLogger('pre_commit')\n\n\ndef _git_apply(patch):\n args = ('app...
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport logging\nimport os.path\nimport time\n\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util import cmd_output\nfrom pre_commit.util import mkdirp\n\n\nlogger = logging.getLogger('pre_commit')\n\n\ndef ...
diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py index cfd638155..1d0c36488 100644 --- a/pre_commit/staged_files_only.py +++ b/pre_commit/staged_files_only.py @@ -8,6 +8,7 @@ from pre_commit.util import CalledProcessError from pre_commit.util import cmd_output +from pre_commit.util imp...
hpcaitech__ColossalAI-2925
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport functools\nimport os\nimport random\nimport socket\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom typing import Callable, Dict, List, Optional, Union\n\nimport torch\nimport torch....
[ { "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport functools\nimport os\nimport random\nimport socket\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom typing import Callable, Dict, List, Optional, Union\n\nimport torch\nimport torch....
diff --git a/colossalai/utils/common.py b/colossalai/utils/common.py index e35b29c2ac56..e15981140be1 100644 --- a/colossalai/utils/common.py +++ b/colossalai/utils/common.py @@ -50,16 +50,20 @@ def ensure_path_exists(filename: str): Path(dirpath).mkdir(parents=True, exist_ok=True) -def free_port(): +def f...
fonttools__fonttools-2376
[ttLib] font.importXML() always sets sfntVersion from imported TTX When using `ttx -m` or `font.importXML()`, the font's `sfntVersion` is unconditionally taken from the imported TTX. That is correct if we're doing a full import (starting with an empty TTFont) but is dubious when importing some tables into an existing f...
[ { "content": "from fontTools import ttLib\nfrom fontTools.misc.textTools import safeEval\nfrom fontTools.ttLib.tables.DefaultTable import DefaultTable\nimport sys\nimport os\nimport logging\n\n\nlog = logging.getLogger(__name__)\n\nclass TTXParseError(Exception): pass\n\nBUFSIZE = 0x4000\n\n\nclass XMLReader(ob...
[ { "content": "from fontTools import ttLib\nfrom fontTools.misc.textTools import safeEval\nfrom fontTools.ttLib.tables.DefaultTable import DefaultTable\nimport sys\nimport os\nimport logging\n\n\nlog = logging.getLogger(__name__)\n\nclass TTXParseError(Exception): pass\n\nBUFSIZE = 0x4000\n\n\nclass XMLReader(ob...
diff --git a/Lib/fontTools/misc/xmlReader.py b/Lib/fontTools/misc/xmlReader.py index b2707e993b..6ec50de46e 100644 --- a/Lib/fontTools/misc/xmlReader.py +++ b/Lib/fontTools/misc/xmlReader.py @@ -93,11 +93,12 @@ def _startElementHandler(self, name, attrs): if not stackSize: if name != "ttFont": raise TTXPars...
Flexget__Flexget-2065
filesystem plugin fails when encountering unusual characters in file name <!--- Before opening an issue, verify: - Is this a feature request? Post it on https://feathub.com/Flexget/Flexget - Did you recently upgrade? Look at the Change Log and Upgrade Actions to make sure that you don't need to make any changes to...
[ { "content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nfrom future.moves.urllib.request import urlopen\nfrom future.moves.urllib.parse import urlparse\n\nimport time\nimport logging\nfrom datetime import ...
[ { "content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nfrom future.moves.urllib.request import urlopen\nfrom future.moves.urllib.parse import urlparse\nfrom future.utils import text_to_native_str\n\nimpor...
diff --git a/flexget/utils/requests.py b/flexget/utils/requests.py index d10b89885e..cc5dd8379f 100644 --- a/flexget/utils/requests.py +++ b/flexget/utils/requests.py @@ -2,6 +2,7 @@ from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.request import urlopen from f...
cython__cython-5234
[BUG] Incorrect type inference for floats ### Describe the bug According to the [docs](https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#types): > int, long, and float are not available for static typing and instead interpreted as C ``int``, ``long``, and ``float`` respectively The fol...
[ { "content": "from __future__ import absolute_import\n\nfrom .Errors import error, message\nfrom . import ExprNodes\nfrom . import Nodes\nfrom . import Builtin\nfrom . import PyrexTypes\nfrom .. import Utils\nfrom .PyrexTypes import py_object_type, unspecified_type\nfrom .Visitor import CythonTransform, EnvTran...
[ { "content": "from __future__ import absolute_import\n\nfrom .Errors import error, message\nfrom . import ExprNodes\nfrom . import Nodes\nfrom . import Builtin\nfrom . import PyrexTypes\nfrom .. import Utils\nfrom .PyrexTypes import py_object_type, unspecified_type\nfrom .Visitor import CythonTransform, EnvTran...
diff --git a/Cython/Compiler/TypeInference.py b/Cython/Compiler/TypeInference.py index 0c2eda450bc..447d352be01 100644 --- a/Cython/Compiler/TypeInference.py +++ b/Cython/Compiler/TypeInference.py @@ -560,9 +560,11 @@ def safe_spanning_type(types, might_overflow, scope): return py_object_type else...
xonsh__xonsh-4770
dropping 3.7 after a release <!--- Provide a general summary of the issue in the Title above --> <!--- If you have a question along the lines of "How do I do this Bash command in xonsh" please first look over the Bash to Xonsh translation guide: https://xon.sh/bash_to_xsh.html If you don't find an answer there, plea...
[ { "content": "#!/usr/bin/env python3\n\"\"\"The xonsh installer.\"\"\"\n# Note: Do not embed any non-ASCII characters in this file until pip has been\n# fixed. See https://github.com/xonsh/xonsh/issues/487.\nimport os\nimport sys\nimport subprocess\n\nfrom setuptools import setup\nfrom setuptools.command.sdist ...
[ { "content": "#!/usr/bin/env python3\n\"\"\"The xonsh installer.\"\"\"\n# Note: Do not embed any non-ASCII characters in this file until pip has been\n# fixed. See https://github.com/xonsh/xonsh/issues/487.\nimport os\nimport sys\nimport subprocess\n\nfrom setuptools import setup\nfrom setuptools.command.sdist ...
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1689baade3..73a2f68d52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macOS-latest, windows-latest ] - python-version: ...
bokeh__bokeh-4129
Docs for styling selection overlays There is currently no way to style the box or poly overlays that various selection tools use.
[ { "content": "import numpy as np\n\nfrom bokeh.models import BoxSelectTool, BoxZoomTool, LassoSelectTool\nfrom bokeh.plotting import figure, output_file, show\n\noutput_file(\"styling_tool_overlays.html\")\n\nx = np.random.random(size=200)\ny = np.random.random(size=200)\n\n# Basic plot setup\nplot = figure(wid...
[ { "content": "import numpy as np\n\nfrom bokeh.models import BoxSelectTool, BoxZoomTool, LassoSelectTool\nfrom bokeh.plotting import figure, output_file, show\n\noutput_file(\"styling_tool_overlays.html\")\n\nx = np.random.random(size=200)\ny = np.random.random(size=200)\n\n# Basic plot setup\nplot = figure(wid...
diff --git a/sphinx/source/docs/user_guide/source_examples/styling_tool_overlays.py b/sphinx/source/docs/user_guide/source_examples/styling_tool_overlays.py index 38c695d9380..bcd61aad7c6 100644 --- a/sphinx/source/docs/user_guide/source_examples/styling_tool_overlays.py +++ b/sphinx/source/docs/user_guide/source_examp...
pyinstaller__pyinstaller-6671
Bug in TOC type (its __sub__ function) <!-- Welcome to the PyInstaller 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 PyInstaller - For questions and general support, use the mailing list, see <ht...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2022, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/building/datastruct.py b/PyInstaller/building/datastruct.py index aa12657cae..3bc3a4b28d 100644 --- a/PyInstaller/building/datastruct.py +++ b/PyInstaller/building/datastruct.py @@ -105,17 +105,9 @@ def extend(self, other): self.append(entry) def __sub__(self, other): + ...
biolab__orange3-3217
Value.__hash__ is wrong Hash function should return the same value for all objects that are considered equal. steps to reproduce: ``` from Orange.data.variable import StringVariable, Value val = Value(StringVariable("s"), "test") val == "test" # True hash(val) == hash("test") # False ```
[ { "content": "import collections\nimport re\n\nfrom datetime import datetime, timedelta, timezone\nfrom numbers import Number, Real, Integral\nfrom math import isnan, floor\nfrom pickle import PickleError\n\nimport numpy as np\n\nfrom Orange.data import _variable\nfrom Orange.util import Registry, color_to_hex,...
[ { "content": "import collections\nimport re\n\nfrom datetime import datetime, timedelta, timezone\nfrom numbers import Number, Real, Integral\nfrom math import isnan, floor\nfrom pickle import PickleError\n\nimport numpy as np\n\nfrom Orange.data import _variable\nfrom Orange.util import Registry, color_to_hex,...
diff --git a/Orange/data/variable.py b/Orange/data/variable.py index 5f3df10f115..838b4a66cb4 100644 --- a/Orange/data/variable.py +++ b/Orange/data/variable.py @@ -207,10 +207,15 @@ def __contains__(self, other): raise TypeError("invalid operation on Value()") def __hash__(self): + if self.varia...
readthedocs__readthedocs.org-11153
Notifications: always show notifications on build details' page It seems that in https://github.com/readthedocs/readthedocs.org/pull/11117 we introduced a bug that it only shows the notifications for the build to users that have permissions over that project in particular --which is wrong. Since the project is public, ...
[ { "content": "\"\"\"Views for builds app.\"\"\"\n\nimport textwrap\nfrom urllib.parse import urlparse\n\nimport structlog\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import HttpResponseForbidden, HttpResponse...
[ { "content": "\"\"\"Views for builds app.\"\"\"\n\nimport textwrap\nfrom urllib.parse import urlparse\n\nimport structlog\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import HttpResponseForbidden, HttpResponse...
diff --git a/readthedocs/builds/views.py b/readthedocs/builds/views.py index 5729effd0da..5ed96fe94df 100644 --- a/readthedocs/builds/views.py +++ b/readthedocs/builds/views.py @@ -168,6 +168,7 @@ def get_context_data(self, **kwargs): context["project"] = self.project build = self.get_object() + ...
DataDog__dd-trace-py-1395
Opentracing active_span not working without starting new child span ### Which version of dd-trace-py are you using? ddtrace[opentracing]==0.31.0 ### Which version of the libraries are you using? python 3.8 Django==2.2.6 channels==2.3.1 uvicorn==0.10.3 uvloop==0.14.0rc2 datadog==0.31.0 ### How can we reprod...
[ { "content": "import opentracing\nfrom opentracing import Format\nfrom opentracing.scope_managers import ThreadLocalScopeManager\n\nimport ddtrace\nfrom ddtrace import Tracer as DatadogTracer\nfrom ddtrace.constants import FILTERS_KEY\nfrom ddtrace.settings import ConfigException\nfrom ddtrace.utils import merg...
[ { "content": "import opentracing\nfrom opentracing import Format\nfrom opentracing.scope_managers import ThreadLocalScopeManager\n\nimport ddtrace\nfrom ddtrace import Tracer as DatadogTracer\nfrom ddtrace.constants import FILTERS_KEY\nfrom ddtrace.settings import ConfigException\nfrom ddtrace.utils import merg...
diff --git a/ddtrace/opentracer/tracer.py b/ddtrace/opentracer/tracer.py index dcf61312dd0..376111490e4 100644 --- a/ddtrace/opentracer/tracer.py +++ b/ddtrace/opentracer/tracer.py @@ -270,6 +270,25 @@ def start_span(self, operation_name=None, child_of=None, references=None, return otspan + @property + ...
PennyLaneAI__pennylane-2238
[BUG] `qml.ctrl` broken differentiability with parameter-shift/finite-diff ### Expected behavior `qml.ctrl` supports differentiating over input parameters to the function to be controlled. For example, for an operation being controlled, the following works: ```python # Autograd # ---- import pennylane as qml ...
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2...
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2...
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 60c36ef58dd..a0017ec476d 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -156,6 +156,10 @@ <h3>Bug fixes</h3> +* The ``qml.ctrl`` transform now works correctly with gradient transforms + such as the ...
ansible-collections__community.aws-1630
aws_ssm_parameter_store update fails if no description element was defined before ### Summary `aws_ssm_parameter_store` update fails if no description element was defined before. If an SSM parameter has an empty description already in SSM, then the AWS API (I'm guessing `aws ssm describe-parameters`) doesn't incl...
[ { "content": "#!/usr/bin/python\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: aws_ssm_paramet...
[ { "content": "#!/usr/bin/python\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: aws_ssm_paramet...
diff --git a/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml b/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml new file mode 100644 index 00000000000..98344a6ff4a --- /dev/null +++ b/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml @@...
hylang__hy-1615
rply causes a crash on read-only filesystems I currently have the following file setup on AWS Lambda: ``` challenge ├── handlers.py ├── hello.hy ├── __init__.hy └── __init__.py ``` handlers.py ```python import hy from hello import hello ``` hello.hy ```clojure (import [json [dumps]]) (defn hello...
[ { "content": "#!/usr/bin/env python\n# Copyright 2018 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\n\nimport sys, os\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.install import install\n\nfrom get_version import ...
[ { "content": "#!/usr/bin/env python\n# Copyright 2018 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\n\nimport sys, os\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.install import install\n\nfrom get_version import ...
diff --git a/hy/lex/parser.py b/hy/lex/parser.py index 236b8254f..fac2577f9 100755 --- a/hy/lex/parser.py +++ b/hy/lex/parser.py @@ -17,10 +17,7 @@ from .exceptions import LexException, PrematureEndOfInput -pg = ParserGenerator( - [rule.name for rule in lexer.rules] + ['$end'], - cache_id="hy_parser" -) +pg ...
elastic__ecs-1459
Multi-level self-nesting support ### Problem In ECS a self-nesting is when one field set is nested inside itself using a different name: Two examples: * `process.parent.*` self-nests the `process` field set renamed as `parent` * `user.target.*` self-nests the `user.*` field set renamed as `target` (same appli...
[ { "content": "import copy\nimport re\n\nfrom schema import visitor\n\n# This script takes the fleshed out deeply nested fields dictionary as emitted by\n# cleaner.py, and performs field reuse in two phases.\n#\n# Phase 1 performs field reuse across field sets. E.g. `group` fields should also be under `user`.\n#...
[ { "content": "import copy\nimport re\n\nfrom schema import visitor\n\n# This script takes the fleshed out deeply nested fields dictionary as emitted by\n# cleaner.py, and performs field reuse in two phases.\n#\n# Phase 1 performs field reuse across field sets. E.g. `group` fields should also be under `user`.\n#...
diff --git a/CHANGELOG.next.md b/CHANGELOG.next.md index 113b16e8e6..bac4b790cb 100644 --- a/CHANGELOG.next.md +++ b/CHANGELOG.next.md @@ -45,6 +45,7 @@ Thanks, you're awesome :-) --> #### Added * Support `match_only_text` data type in Go code generator. #1418 +* Support for multi-level, self-nestings. #1459 ###...
e-valuation__EvaP-1076
Add information message on deactivated course page for editors Editors can open a course's edit page after they approved the course, however the form will then be disabled. A message on top of the page should explain this to the user.
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied, SuspiciousOperation\nfrom django.forms.models import inlineformset_factory\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.utils.translation import ugettext as _\nfrom django.db...
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied, SuspiciousOperation\nfrom django.forms.models import inlineformset_factory\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.utils.translation import ugettext as _\nfrom django.db...
diff --git a/evap/contributor/tests/test_views.py b/evap/contributor/tests/test_views.py index 9657303da7..2cdea4d5bd 100644 --- a/evap/contributor/tests/test_views.py +++ b/evap/contributor/tests/test_views.py @@ -1,7 +1,7 @@ from model_mommy import mommy from evap.evaluation.models import Course, UserProfile -fro...
mozilla__pontoon-2826
Pretranslation issues with multiline strings Pretranslation struggles to translate Fluent strings where line breaks are used to limit the line width, as it treats each line as a separate sentence. ``` rec-pw-1-2 = Make this password unique and different from any others you use. A good strategy to follow is to...
[ { "content": "import logging\nimport operator\nimport re\n\nfrom django.db.models import CharField, Value as V\nfrom django.db.models.functions import Concat\n\nfrom fluent.syntax import FluentParser, FluentSerializer\nfrom functools import reduce\n\nfrom pontoon.base.models import User, TranslatedResource\nfro...
[ { "content": "import logging\nimport operator\nimport re\n\nfrom django.db.models import CharField, Value as V\nfrom django.db.models.functions import Concat\n\nfrom fluent.syntax import FluentParser, FluentSerializer\nfrom functools import reduce\n\nfrom pontoon.base.models import User, TranslatedResource\nfro...
diff --git a/pontoon/pretranslation/pretranslate.py b/pontoon/pretranslation/pretranslate.py index 15f5de1ece..109b11a0a5 100644 --- a/pontoon/pretranslation/pretranslate.py +++ b/pontoon/pretranslation/pretranslate.py @@ -32,11 +32,15 @@ def visit_SelectExpression(self, node): return self.generic_visit(node) ...
OpenMined__PySyft-2692
Allow worker registration of objects within python context **Is your feature request related to a problem? Please describe.** Tons of test and code samples using plans are currently like this: ```python hook.local_worker.is_client_worker = False # my awesome code hook.local_worker.is_client_worker = True ``` ...
[ { "content": "from abc import abstractmethod\nimport logging\nfrom typing import Callable\nfrom typing import List\nfrom typing import Tuple\nfrom typing import Union\nfrom typing import TYPE_CHECKING\n\nimport syft as sy\nfrom syft import codes\nfrom syft.generic.frameworks.hook import hook_args\nfrom syft.gen...
[ { "content": "from abc import abstractmethod\nfrom contextlib import contextmanager\n\nimport logging\nfrom typing import Callable\nfrom typing import List\nfrom typing import Tuple\nfrom typing import Union\nfrom typing import TYPE_CHECKING\n\nimport syft as sy\nfrom syft import codes\nfrom syft.generic.framew...
diff --git a/syft/workers/base.py b/syft/workers/base.py index 3e34d051a3a..52b955073b3 100644 --- a/syft/workers/base.py +++ b/syft/workers/base.py @@ -1,4 +1,6 @@ from abc import abstractmethod +from contextlib import contextmanager + import logging from typing import Callable from typing import List @@ -202,6 +2...
Cloud-CV__EvalAI-926
Add default field in test_annotation field of ChallengePhase model. Please add `default=False` in the test_annotation field of ChallengePhase model.
[ { "content": "from __future__ import unicode_literals\n\nfrom django.utils import timezone\nfrom django.contrib.postgres.fields import JSONField\nfrom django.db import models\n\nfrom base.models import (TimeStampedModel, )\nfrom base.utils import RandomFileName\nfrom participants.models import (ParticipantTeam,...
[ { "content": "from __future__ import unicode_literals\n\nfrom django.utils import timezone\nfrom django.contrib.postgres.fields import JSONField\nfrom django.db import models\n\nfrom base.models import (TimeStampedModel, )\nfrom base.utils import RandomFileName\nfrom participants.models import (ParticipantTeam,...
diff --git a/apps/challenges/migrations/0026_adds_default_field_in_test_annotation.py b/apps/challenges/migrations/0026_adds_default_field_in_test_annotation.py new file mode 100644 index 0000000000..eed357d37b --- /dev/null +++ b/apps/challenges/migrations/0026_adds_default_field_in_test_annotation.py @@ -0,0 +1,21 @@...
angr__angr-2445
Decompiler fails when handling return statements possibly due to issues identifying calling convention **Describe the bug.** The decompiler fails to decompile a function when trying to handle return statements. Based on the traceback, it seems to be because the calling convention is somehow not determined/known when...
[ { "content": "from collections import defaultdict\nimport logging\nfrom typing import List, Optional, TYPE_CHECKING\n\nimport networkx\n\nimport ailment\n\nfrom ...knowledge_base import KnowledgeBase\nfrom ...codenode import BlockNode\nfrom ...utils import timethis\nfrom ...calling_conventions import SimRegArg,...
[ { "content": "from collections import defaultdict\nimport logging\nfrom typing import List, Optional, TYPE_CHECKING\n\nimport networkx\n\nimport ailment\n\nfrom ...knowledge_base import KnowledgeBase\nfrom ...codenode import BlockNode\nfrom ...utils import timethis\nfrom ...calling_conventions import SimRegArg,...
diff --git a/angr/analyses/decompiler/clinic.py b/angr/analyses/decompiler/clinic.py index d3e3cc0cf9d..3ebe7c92e30 100644 --- a/angr/analyses/decompiler/clinic.py +++ b/angr/analyses/decompiler/clinic.py @@ -421,11 +421,15 @@ def _handler(block): return ail_graph @timethis - def _make_returns(self, ...
mitmproxy__mitmproxy-898
Client Address is not displayed for flows from dumpfiles I have two clients connecting to mitmproxy now, and I'd like to see the client IP for each request in the "Detail" tab. Maybe show the server's IP too, since it can differ when connections come from different local IPs (e.g. 127.0.0.1 and 192.168.1.101).
[ { "content": "from __future__ import absolute_import\nimport urwid\nfrom . import common, searchable\nfrom .. import utils\n\n\ndef maybe_timestamp(base, attr):\n if base and getattr(base, attr):\n return utils.format_timestamp_with_milli(getattr(base, attr))\n else:\n return \"active\"\n ...
[ { "content": "from __future__ import absolute_import\nimport urwid\nfrom . import common, searchable\nfrom .. import utils\n\n\ndef maybe_timestamp(base, attr):\n if base and getattr(base, attr):\n return utils.format_timestamp_with_milli(getattr(base, attr))\n else:\n return \"active\"\n ...
diff --git a/libmproxy/console/flowdetailview.py b/libmproxy/console/flowdetailview.py index 40769c9532..394ad217df 100644 --- a/libmproxy/console/flowdetailview.py +++ b/libmproxy/console/flowdetailview.py @@ -20,7 +20,7 @@ def flowdetails(state, flow): req = flow.request resp = flow.response - if sc: +...
nautobot__nautobot-5436
Import Objects UI `All or nothing import` field should be set as True by default. <!-- NOTE: This template is for use by maintainers only. Please do not submit an issue using this template unless you have been specifically asked to do so. --> ### Proposed Changes ![Screenshot 2024-03-11 at 5 09 19 PM](https...
[ { "content": "import contextlib\nfrom io import BytesIO\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.http import QueryDict\nfrom rest_framework import exception...
[ { "content": "import contextlib\nfrom io import BytesIO\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.http import QueryDict\nfrom rest_framework import exception...
diff --git a/changes/5414.changed b/changes/5414.changed new file mode 100644 index 00000000000..6c5d321a03a --- /dev/null +++ b/changes/5414.changed @@ -0,0 +1 @@ +Changed `ImportObjects.roll_back_if_error` form field help text and label. \ No newline at end of file diff --git a/nautobot/core/jobs/__init__.py b/nautob...
dask__dask-1646
slices of memmaps don't concatenate correctly I have several slices of the same underlying numpy.memmap object. I want to concatenate them using dask. As shown in the example below, it doesn't work. ``` python import dask.array as da import numpy as np # test data dtype = 'f8' data = np.arange(10, dtype=dtype) # save...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nfrom functools import partial\nfrom hashlib import md5\nfrom operator import attrgetter\nimport pickle\nimport os\nimport uuid\n\nfrom toolz import merge, groupby, curry, identity\nfrom toolz.functoolz import Compose\n\nfrom .comp...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nfrom functools import partial\nfrom hashlib import md5\nfrom operator import attrgetter\nimport pickle\nimport os\nimport uuid\n\nfrom toolz import merge, groupby, curry, identity\nfrom toolz.functoolz import Compose\n\nfrom .comp...
diff --git a/dask/base.py b/dask/base.py index 284cc53d7ec..8f427ab4f35 100644 --- a/dask/base.py +++ b/dask/base.py @@ -316,7 +316,13 @@ def normalize_array(x): if not x.shape: return (str(x), x.dtype) if hasattr(x, 'mode') and getattr(x, 'filename', None): - return x.filename...
getsentry__sentry-python-2476
FastApiIntegration hides request handler function name ### How do you use Sentry? Sentry Saas (sentry.io) ### Version 1.31.0 ### Steps to Reproduce Use the python sentry sdk in conjunction with FastAPI and the NewRelic python agent. View transactions in the NewRelic UI. ### Expected Result The NewRelic transa...
[ { "content": "import asyncio\nfrom copy import deepcopy\n\nfrom sentry_sdk._types import TYPE_CHECKING\nfrom sentry_sdk.hub import Hub, _should_send_default_pii\nfrom sentry_sdk.integrations import DidNotEnable\nfrom sentry_sdk.tracing import SOURCE_FOR_STYLE, TRANSACTION_SOURCE_ROUTE\nfrom sentry_sdk.utils imp...
[ { "content": "import asyncio\nfrom copy import deepcopy\n\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk._types import TYPE_CHECKING\nfrom sentry_sdk.hub import Hub, _should_send_default_pii\nfrom sentry_sdk.integrations import DidNotEnable\nfrom sentry_sdk.tracing import SOURCE_FOR_STYLE, TRANSACTIO...
diff --git a/sentry_sdk/integrations/fastapi.py b/sentry_sdk/integrations/fastapi.py index 11c9bdcf51..6fbe53b92b 100644 --- a/sentry_sdk/integrations/fastapi.py +++ b/sentry_sdk/integrations/fastapi.py @@ -1,6 +1,7 @@ import asyncio from copy import deepcopy +from sentry_sdk._functools import wraps from sentry_sd...
ray-project__ray-4504
Inconsistent weight assignment operations in DQNPolicyGraph <!-- General questions should be asked on the mailing list ray-dev@googlegroups.com. Questions about how to use Ray should be asked on [StackOverflow](https://stackoverflow.com/questions/tagged/ray). Before submitting an issue, please fill out the follow...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom gym.spaces import Discrete\nimport numpy as np\nfrom scipy.stats import entropy\nimport tensorflow as tf\nimport tensorflow.contrib.layers as layers\n\nimport ray\nfrom ray.rllib....
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom gym.spaces import Discrete\nimport numpy as np\nfrom scipy.stats import entropy\nimport tensorflow as tf\nimport tensorflow.contrib.layers as layers\n\nimport ray\nfrom ray.rllib....
diff --git a/python/ray/rllib/agents/dqn/dqn_policy_graph.py b/python/ray/rllib/agents/dqn/dqn_policy_graph.py index 318e0758b38a..e52dbcca41d3 100644 --- a/python/ray/rllib/agents/dqn/dqn_policy_graph.py +++ b/python/ray/rllib/agents/dqn/dqn_policy_graph.py @@ -387,9 +387,9 @@ def __init__(self, observation_space, act...
django-cms__django-cms-4093
Empty All in placeholder remove plugins from all the localized version of the page Solve Issue #3880
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.models.placeholderpluginmodel import PlaceholderReference\nfrom cms.utils.urlutils import admin_reverse\nfrom django.contrib.admin.helpers import AdminForm\nfrom django.utils.decorators import method_decorator\nimport json\n\nfrom django.views.decorators.clickjack...
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.models.placeholderpluginmodel import PlaceholderReference\nfrom cms.utils.urlutils import admin_reverse\nfrom django.contrib.admin.helpers import AdminForm\nfrom django.utils.decorators import method_decorator\nimport json\n\nfrom django.views.decorators.clickjack...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f91bb9e2374..4fa5373285d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -359,4 +359,8 @@ Please see Install/2.4 release notes *before* attempting to upgrade to version 2 - Improves frontend performance relating to resizing the sideframe - Corrects an issue where ite...
freqtrade__freqtrade-2096
Difference backtest live results (two consecutive buys) ## Step 1: Have you search for this issue before posting it? Yes ## Step 3: Describe the problem: I compare backtest and live differences (5 minute ticker same pair): If there is a buy signal at 21:00 and the stop loss in reach before 21:05 and the b...
[ { "content": "# pragma pylint: disable=missing-docstring, W0212, too-many-arguments\n\n\"\"\"\nThis module contains the backtesting logic\n\"\"\"\nimport logging\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta\nfrom pathlib import Path\nfrom typing import Any, Dict, List, NamedTuple, Option...
[ { "content": "# pragma pylint: disable=missing-docstring, W0212, too-many-arguments\n\n\"\"\"\nThis module contains the backtesting logic\n\"\"\"\nimport logging\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta\nfrom pathlib import Path\nfrom typing import Any, Dict, List, NamedTuple, Option...
diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 429633f3146..dcccd36a39e 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -373,7 +373,9 @@ def backtest(self, args: Dict) -> DataFrame: continue ...
enthought__chaco-902
Downstream users still import marker_trait from chaco.api This was removed in PR #679 To avoid breaking code we should bring it back into the `chaco.api` for the 5.0.0 release
[ { "content": "# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included in LICENSE.txt and may be redistributed only under\n# the conditions described in the aforementioned license. The license\n#...
[ { "content": "# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included in LICENSE.txt and may be redistributed only under\n# the conditions described in the aforementioned license. The license\n#...
diff --git a/chaco/api.py b/chaco/api.py index 61492745f..d9e0c4ee6 100644 --- a/chaco/api.py +++ b/chaco/api.py @@ -498,7 +498,7 @@ YlGn, YlGnBu, YlOrBr, - YlOrRd, + YlOrRd, gist_earth, gist_gray, gist_heat, @@ -527,3 +527,20 @@ Set3, ) from .default_colors import cbrewer, ...
Cloud-CV__EvalAI-1239
Text not being displayed for the 'star challenge feature' Please see the below image for the illustration: <img width="1438" alt="screen shot 2017-09-06 at 6 09 47 pm" src="https://user-images.githubusercontent.com/2945708/30137179-2a443974-9330-11e7-82c2-63658825255c.png">
[ { "content": "import csv\nimport logging\nimport random\nimport requests\nimport shutil\nimport string\nimport tempfile\nimport yaml\nimport zipfile\n\nfrom os.path import basename, isfile, join\n\nfrom django.core.files.base import ContentFile\nfrom django.db import transaction\nfrom django.http import HttpRes...
[ { "content": "import csv\nimport logging\nimport random\nimport requests\nimport shutil\nimport string\nimport tempfile\nimport yaml\nimport zipfile\n\nfrom os.path import basename, isfile, join\n\nfrom django.core.files.base import ContentFile\nfrom django.db import transaction\nfrom django.http import HttpRes...
diff --git a/apps/challenges/views.py b/apps/challenges/views.py index a77f723b19..979420bd76 100644 --- a/apps/challenges/views.py +++ b/apps/challenges/views.py @@ -882,6 +882,11 @@ def star_challenge(request, challenge_pk): return Response(response_data, status=status.HTTP_200_OK) except: ...
kornia__kornia-2108
rgb_to_yuv420 does not support (*, 3, H, W) format ### Describe the bug The documentation of the `rgb_to_yuv420` function states that the `(*, 3, H, W)` format is supported. However, the average pooling function (torch.nn.functional.avg_pool2d) used after converting to YUV does not support an arbitrary amount of dimen...
[ { "content": "from typing import Tuple\n\nimport torch\nimport torch.nn as nn\n\n\ndef rgb_to_yuv(image: torch.Tensor) -> torch.Tensor:\n r\"\"\"Convert an RGB image to YUV.\n\n .. image:: _static/img/rgb_to_yuv.png\n\n The image data is assumed to be in the range of (0, 1).\n\n Args:\n image...
[ { "content": "from typing import Tuple\n\nimport torch\nimport torch.nn as nn\n\n\ndef rgb_to_yuv(image: torch.Tensor) -> torch.Tensor:\n r\"\"\"Convert an RGB image to YUV.\n\n .. image:: _static/img/rgb_to_yuv.png\n\n The image data is assumed to be in the range of (0, 1).\n\n Args:\n image...
diff --git a/kornia/color/yuv.py b/kornia/color/yuv.py index aafeb4af74..e1d738708c 100644 --- a/kornia/color/yuv.py +++ b/kornia/color/yuv.py @@ -68,7 +68,7 @@ def rgb_to_yuv420(image: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: yuvimage = rgb_to_yuv(image) - return (yuvimage[..., :1, :, :], torch....
ietf-tools__datatracker-4703
Links to non-existing person profiles are being generated ### What happened? For example, on http://127.0.0.1:8000/ipr/2670/history/, a link to http://127.0.0.1:8000/person/laura.hill@parc.com is being generated, which 404s. ### What browser(s) are you seeing the problem on? _No response_ ### Code of Conduct - [X]...
[ { "content": "# Copyright The IETF Trust 2012-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nfrom io import StringIO, BytesIO\nfrom PIL import Image\n\nfrom django.contrib import messages\nfrom django.db.models import Q\nfrom django.http import HttpResponse, Http404\nfrom django.shortcuts import render...
[ { "content": "# Copyright The IETF Trust 2012-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nfrom io import StringIO, BytesIO\nfrom PIL import Image\n\nfrom django.contrib import messages\nfrom django.db.models import Q\nfrom django.http import HttpResponse, Http404\nfrom django.shortcuts import render...
diff --git a/ietf/person/tests.py b/ietf/person/tests.py index f659b98963..be330bdf0d 100644 --- a/ietf/person/tests.py +++ b/ietf/person/tests.py @@ -104,6 +104,23 @@ def test_person_profile(self): r = self.client.get(photo_url) self.assertEqual(r.status_code, 200) + def test_person_profile_with...
huggingface__trl-1509
conversational data for SFTTrainer For SFTTrainer, if we load the dataset using a conversational form (ChatML format), the function `apply_chat_template` is used (https://github.com/huggingface/trl/blob/v0.7.11/trl/extras/dataset_formatting.py#L55) with `tokenize=False`. Later in SFTTrainer, the data is tokenized again...
[ { "content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/trl/trainer/sft_trainer.py b/trl/trainer/sft_trainer.py index edbf2c6000..c3a7127199 100644 --- a/trl/trainer/sft_trainer.py +++ b/trl/trainer/sft_trainer.py @@ -264,6 +264,12 @@ def make_inputs_require_grad(module, input, output): # check if dataset has ChatML format or instruction format and...
cupy__cupy-1573
Support SciPy 1.0 SciPy 1.0 released. It has some compatibility breaks in `scipy.sparse`. We need to fix implementations or tests.
[ { "content": "import numpy\ntry:\n import scipy.sparse\n scipy_available = True\nexcept ImportError:\n scipy_available = False\n\nimport cupy\nfrom cupy import core\nfrom cupy.creation import basic\nfrom cupy import cusparse\nfrom cupyx.scipy.sparse import base\nfrom cupyx.scipy.sparse import data as s...
[ { "content": "import numpy\ntry:\n import scipy.sparse\n scipy_available = True\nexcept ImportError:\n scipy_available = False\n\nimport cupy\nfrom cupy import core\nfrom cupy.creation import basic\nfrom cupy import cusparse\nfrom cupyx.scipy.sparse import base\nfrom cupyx.scipy.sparse import data as s...
diff --git a/cupy/testing/helper.py b/cupy/testing/helper.py index ab454dc9b29..e4fc04d712d 100644 --- a/cupy/testing/helper.py +++ b/cupy/testing/helper.py @@ -193,10 +193,16 @@ def numpy_cupy_allclose(rtol=1e-7, atol=0, err_msg='', verbose=True, .. seealso:: :func:`cupy.testing.assert_allclose` """ - d...
sktime__sktime-4681
[DOC] change default documentation version from `latest` (`main` branch) to `stable` (latest tag) in read-the-docs configuration Currently the [documentation website](https://www.sktime.net) defaults to `latest`, i.e. the `main` branch. So, it is possible that it shows some estimators or arguments which are not yet rel...
[ { "content": "#!/usr/bin/env python3\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nimport os\nimport sys\nfrom importlib import import_module\n\nimport sktime\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document w...
[ { "content": "#!/usr/bin/env python3\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nimport os\nimport sys\nfrom importlib import import_module\n\nimport sktime\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document w...
diff --git a/docs/source/conf.py b/docs/source/conf.py index be43df43a65..21b7f73e43c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -49,6 +49,7 @@ "myst_parser", "sphinx_design", "sphinx_issues", + "versionwarning.extension", ] # Recommended by sphinx_design when using the MyST Par...
ManimCommunity__manim-2846
TransformMatchingTex fails if fade_transform_mismatches set but there are no mismatches ## Description of bug / unexpected behavior When rearranging the terms in a Latex equation, I ran into a confounding error that ended up being because I set `fade_transform_matches` when it wasn't strictly necessary. That is, all s...
[ { "content": "\"\"\"Animations transforming one mobject into another.\"\"\"\n\nfrom __future__ import annotations\n\n__all__ = [\n \"Transform\",\n \"ReplacementTransform\",\n \"TransformFromCopy\",\n \"ClockwiseTransform\",\n \"CounterclockwiseTransform\",\n \"MoveToTarget\",\n \"ApplyMeth...
[ { "content": "\"\"\"Animations transforming one mobject into another.\"\"\"\n\nfrom __future__ import annotations\n\n__all__ = [\n \"Transform\",\n \"ReplacementTransform\",\n \"TransformFromCopy\",\n \"ClockwiseTransform\",\n \"CounterclockwiseTransform\",\n \"MoveToTarget\",\n \"ApplyMeth...
diff --git a/manim/animation/transform.py b/manim/animation/transform.py index bff83be965..cdf44f409f 100644 --- a/manim/animation/transform.py +++ b/manim/animation/transform.py @@ -823,8 +823,14 @@ def begin(self): self.ghost_to(m0, m1) def ghost_to(self, source, target): - """Replaces the ...
sublimelsp__LSP-2376
Provide a way to save all modified files after applying workspace edits **Is your feature request related to a problem? Please describe.** When applying refactorings (like renames) it's often the case that multiple files are modified. It's a chore to then have to find and save all those modified files. **Describe...
[ { "content": "from .core.registry import LspTextCommand\nfrom .core.settings import userprefs\nfrom .core.typing import Callable, List, Type\nfrom abc import ABCMeta, abstractmethod\nimport sublime\nimport sublime_plugin\n\n\nclass SaveTask(metaclass=ABCMeta):\n \"\"\"\n Base class for tasks that run on s...
[ { "content": "from .core.registry import LspTextCommand\nfrom .core.settings import userprefs\nfrom .core.typing import Callable, List, Type\nfrom abc import ABCMeta, abstractmethod\nimport sublime\nimport sublime_plugin\n\n\nclass SaveTask(metaclass=ABCMeta):\n \"\"\"\n Base class for tasks that run on s...
diff --git a/Default.sublime-keymap b/Default.sublime-keymap index d95ffdb9e..bd59e5a76 100644 --- a/Default.sublime-keymap +++ b/Default.sublime-keymap @@ -17,10 +17,11 @@ {"key": "auto_complete_visible"} ] }, - // Save all open files with lsp_save + // Save all open files that have a ...
qutebrowser__qutebrowser-1734
Errors when `completion show` setting is false Pressing up, down, or tab when there are completions available but the `completion show` setting is `false` crashes qutebrowser. The relevant error: ``` ... File "/home/marshall/Github/qutebrowser/qutebrowser/completion/completionwidget.py", line 164, in _next_idx ...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py index 9fc1ef5d7b0..364d783f693 100644 --- a/qutebrowser/completion/completionwidget.py +++ b/qutebrowser/completion/completionwidget.py @@ -192,10 +192,13 @@ def _next_prev_item(self, prev): Args: ...
facebookresearch__fairseq-4623
Uninitialised bias parameters in RelPositionMultiHeadedAttention ## 🐛 Bug The (u, v) bias terms in the MHA layer with relative position encodings are defined using `torch.Tensor`s: https://github.com/facebookresearch/fairseq/blob/4fe8583396191c22011350248119db98ec1b5cb8/fairseq/modules/espnet_multihead_attention.p...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2019 Shigeki Karita\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Multi-Head Attention layer definition.\"\"\"\n\nimport math\nimport torch\nfrom torch import nn\nfrom fairseq.modules.rotary_positional_embedding...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2019 Shigeki Karita\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Multi-Head Attention layer definition.\"\"\"\n\nimport math\nimport torch\nfrom torch import nn\nfrom fairseq.modules.rotary_positional_embedding...
diff --git a/fairseq/modules/espnet_multihead_attention.py b/fairseq/modules/espnet_multihead_attention.py index d319a168f4..f25acc3b66 100644 --- a/fairseq/modules/espnet_multihead_attention.py +++ b/fairseq/modules/espnet_multihead_attention.py @@ -124,8 +124,8 @@ def __init__(self, n_feat, n_head, dropout, zero_triu...
Qiskit__qiskit-2512
increase spacing of parameters in latex drawer QISKit's visualization module is not properly drawing the **cu1** gate. With the following code, ``` from qiskit import QuantumProgram from qiskit.tools.visualization import circuit_drawer qp = QuantumProgram() qr = qp.create_quantum_register('qr', 3) cr = qp.cre...
[ { "content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org...
[ { "content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org...
diff --git a/qiskit/visualization/latex.py b/qiskit/visualization/latex.py index 399b56f49c82..178bb5ff65fa 100644 --- a/qiskit/visualization/latex.py +++ b/qiskit/visualization/latex.py @@ -113,7 +113,7 @@ def __init__(self, qregs, cregs, ops, scale, style=None, self.column_separation = 0.5 # em po...
boto__botocore-353
JSON protocol parser does not handle missing output shape When a operation does not define an output shape, we still try to parse the JSON body, which will fail because we call `json.loads('')`. This can be seen on any JSON service that has no output shape defined.
[ { "content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ...
[ { "content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ...
diff --git a/botocore/parsers.py b/botocore/parsers.py index 3baab1ba0a..7f336147ed 100644 --- a/botocore/parsers.py +++ b/botocore/parsers.py @@ -450,9 +450,11 @@ def _do_parse(self, response, shape): # The json.loads() gives us the primitive JSON types, # but we need to traverse the parsed JSON data...
ansible__awx-13977
Add error handling to scm_version.py script ##### SUMMARY I hit cases where this script failed in CI, but then all it tells you is that the subprocess failed, but doesn't give the output of the subprocess. ##### ISSUE TYPE - Bug, Docs Fix or other nominal change ##### COMPONENT NAME - API
[ { "content": "from collections import defaultdict\nimport itertools\nimport logging\n\nfrom awxkit.api.resources import resources\nimport awxkit.exceptions as exc\nfrom . import base\nfrom . import page\nfrom .. import utils\nfrom ..mixins import has_create\n\nlog = logging.getLogger(__name__)\n\n\nEXPORTABLE_R...
[ { "content": "from collections import defaultdict\nimport itertools\nimport logging\n\nfrom awxkit.api.resources import resources\nimport awxkit.exceptions as exc\nfrom . import base\nfrom . import page\nfrom .. import utils\nfrom ..mixins import has_create\n\nlog = logging.getLogger(__name__)\n\n\nEXPORTABLE_R...
diff --git a/awxkit/awxkit/api/pages/api.py b/awxkit/awxkit/api/pages/api.py index 8a89cbb2fff0..8ba64254ae15 100644 --- a/awxkit/awxkit/api/pages/api.py +++ b/awxkit/awxkit/api/pages/api.py @@ -404,6 +404,11 @@ def import_assets(self, data): for resource in self._dependent_resources(): endpoint...
fossasia__open-event-server-5229
Allow bank, cheque and onsite for payment_mode in orders schema **Describe the bug** Currently setting bank, cheque and onsite for payment_mode returns 422 error. **Expected behavior** Payment Mode should allow bank, cheque and onsite as options.
[ { "content": "from flask import request\nfrom marshmallow import post_dump, validates_schema, validate\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship\n\nfrom app import db\nfrom app.api.helpers.utilities import dasherize\nfrom app.api.schema.base import SoftDeletionS...
[ { "content": "from flask import request\nfrom marshmallow import post_dump, validates_schema, validate\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship\n\nfrom app import db\nfrom app.api.helpers.utilities import dasherize\nfrom app.api.schema.base import SoftDeletionS...
diff --git a/app/api/schema/orders.py b/app/api/schema/orders.py index 1a60b248d5..83d6b9a37c 100644 --- a/app/api/schema/orders.py +++ b/app/api/schema/orders.py @@ -56,8 +56,10 @@ def initial_values(self, data): completed_at = fields.DateTime(dump_only=True) created_at = fields.DateTime(dump_only=True) ...
mkdocs__mkdocs-1623
link of absolute path without domains will display a warning If I wrote `[link](/api/file.pdf)` in docs, it would show a warning like this: ``` WARNING - Documentation file 'forum.md' contains a link to 'api/file.pdf' which is not found in the documentation files. ``` The link works in the generated docs. The...
[ { "content": "# coding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport os\nimport io\nimport datetime\nimport logging\n\nimport markdown\nfrom markdown.extensions import Extension\nfrom markdown.treeprocessors import Treeprocessor\nfrom markdown.util import AMP_SUBSTITUTE\n\nfrom mkdocs.structure.to...
[ { "content": "# coding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport os\nimport io\nimport datetime\nimport logging\n\nimport markdown\nfrom markdown.extensions import Extension\nfrom markdown.treeprocessors import Treeprocessor\nfrom markdown.util import AMP_SUBSTITUTE\n\nfrom mkdocs.structure.to...
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py index 40921562a4..21d784bf4e 100644 --- a/mkdocs/structure/pages.py +++ b/mkdocs/structure/pages.py @@ -214,7 +214,8 @@ def run(self, root): def path_to_url(self, url): scheme, netloc, path, params, query, fragment = urlparse(url) - ...
nilearn__nilearn-2195
NiftiLabelsMasker misbehaves for integer niftis For niftis like the example attached to this issue, NiftiLabelsMasker() from the masker family does not seem to carry out expected behavhior. Using this nifti as argument for labels_img leads .transform() to produce only zero outputs. The reason appears to be that the int...
[ { "content": "\"\"\"\nFunctions for extracting region-defined signals.\n\nTwo ways of defining regions are supported: as labels in a single 3D image,\nor as weights in one image per region (maps).\n\"\"\"\n# Author: Philippe Gervais\n# License: simplified BSD\n\nimport numpy as np\nfrom scipy import linalg, ndi...
[ { "content": "\"\"\"\nFunctions for extracting region-defined signals.\n\nTwo ways of defining regions are supported: as labels in a single 3D image,\nor as weights in one image per region (maps).\n\"\"\"\n# Author: Philippe Gervais\n# License: simplified BSD\n\nimport numpy as np\nfrom scipy import linalg, ndi...
diff --git a/doc/whats_new.rst b/doc/whats_new.rst index d0ecf7f749..6c33f84892 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -20,6 +20,8 @@ Changes Fixes ----- +- :class:`nilearn.input_data.NiftiLabelsMasker` no longer truncates region means to their integral part + when input images are of integer ty...
ibis-project__ibis-2556
CLN: Remove or consolidate dev dependencies from setup.py and environment.yml I noticed in https://github.com/ibis-project/ibis/pull/2547#issue-529169508 that the dev dependencies are not in sync in https://github.com/ibis-project/ibis/blob/master/setup.py#L63 and https://github.com/ibis-project/ibis/blob/master/enviro...
[ { "content": "#!/usr/bin/env python\n\"\"\"Ibis setup module.\"\"\"\nimport pathlib\nimport sys\n\nfrom setuptools import find_packages, setup\n\nimport versioneer\n\nLONG_DESCRIPTION = \"\"\"\nIbis is a productivity-centric Python big data framework.\n\nSee http://ibis-project.org\n\"\"\"\n\nVERSION = sys.vers...
[ { "content": "#!/usr/bin/env python\n\"\"\"Ibis setup module.\"\"\"\nimport pathlib\nimport sys\n\nfrom setuptools import find_packages, setup\n\nimport versioneer\n\nLONG_DESCRIPTION = \"\"\"\nIbis is a productivity-centric Python big data framework.\n\nSee http://ibis-project.org\n\"\"\"\n\nVERSION = sys.vers...
diff --git a/setup.py b/setup.py index 640b7866e312..acbadcb6c4be 100644 --- a/setup.py +++ b/setup.py @@ -60,18 +60,6 @@ + dask_requires ) -develop_requires = all_requires + [ - 'black', - 'click', - 'pydocstyle==4.0.1', - 'flake8', - 'isort', - 'mypy', - 'pre-commit', - 'pygit2', - ...
privacyidea__privacyidea-3176
Fix recovery link in email The email that is sent when resetting a password, contains a faulty link. Currentlly `https://piserver/#/reset/...` is sent. It has to be `https://piserver/#!/reset/..`. This happens here: https://github.com/privacyidea/privacyidea/blob/35f0963b1bbacfbbad128c12ba0a0953fc17a339/privac...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2015-01-06 Cornelius Kölbel <cornelius@privacyidea.org>\n# The Password reset functions\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE\n# License as published by the F...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2022-06-06 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Fix recovery link\n# 2015-01-06 Cornelius Kölbel <cornelius@privacyidea.org>\n# The Password reset functions\n#\n# This code is free software; you can redistribute it and/or\n# ...
diff --git a/privacyidea/lib/passwordreset.py b/privacyidea/lib/passwordreset.py index a76cea5144..dd226bb7a0 100644 --- a/privacyidea/lib/passwordreset.py +++ b/privacyidea/lib/passwordreset.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- # +# 2022-06-06 Cornelius Kölbel <cornelius.koelbel@netknights.it> +# ...
rucio__rucio-6130
Keyword `type` gets overwritten Motivation ---------- The keyword `type` in identities.py gets overwritten, this is a bad practice. https://github.com/rucio/rucio/blob/1b68bbf6d44013b193db3f668b1e4b608e488bce/lib/rucio/web/rest/flaskapi/v1/identities.py#L134 Modification ------------ Use another variable name. ...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright European Organization for Nuclear Research (CERN) since 2012\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://w...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright European Organization for Nuclear Research (CERN) since 2012\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://w...
diff --git a/lib/rucio/web/rest/flaskapi/v1/identities.py b/lib/rucio/web/rest/flaskapi/v1/identities.py index 29c059e5ef..3a25a72a93 100644 --- a/lib/rucio/web/rest/flaskapi/v1/identities.py +++ b/lib/rucio/web/rest/flaskapi/v1/identities.py @@ -200,7 +200,7 @@ class Accounts(ErrorHandlingMethodView): """ Retriev...
kartoza__prj.app-270
Sponsors world map should be navigable via Project menu See also #264
[ { "content": "__author__ = 'rischan'\n\n\nimport logging\nfrom base.models import Project\n\nlogger = logging.getLogger(__name__)\n\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import get_object_or_404\nfrom django.http import HttpResponse\nfrom django.views.generic import (\n ListVie...
[ { "content": "__author__ = 'rischan'\n\n\nimport logging\nfrom base.models import Project\n\nlogger = logging.getLogger(__name__)\n\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import get_object_or_404\nfrom django.http import HttpResponse\nfrom django.views.generic import (\n ListVie...
diff --git a/django_project/changes/views/sponsor.py b/django_project/changes/views/sponsor.py index 3d5eb0f60..5034f9068 100644 --- a/django_project/changes/views/sponsor.py +++ b/django_project/changes/views/sponsor.py @@ -163,6 +163,21 @@ class SponsorWorldMapView(SponsorMixin, ListView): context_object_name = ...
castorini__pyserini-1626
Error for SPLADE on-the-fly encoding with pytorch command used: ```bash python -m pyserini.search.lucene --threads 12 --batch-size 128 \ --index msmarco-v1-passage-splade-pp-ed \ --topics msmarco-passage-dev-subset \ --encoder naver/splade-cocondenser-ensembledistil \ --output run.msmarco-v1-passage.spl...
[ { "content": "import torch\nfrom transformers import AutoModelForMaskedLM, AutoTokenizer\nimport numpy as np\n\nfrom pyserini.encode import QueryEncoder\n\n\nclass SpladeQueryEncoder(QueryEncoder):\n def __init__(self, model_name_or_path, tokenizer_name=None, device='cpu'):\n self.device = device\n ...
[ { "content": "import torch\nfrom transformers import AutoModelForMaskedLM, AutoTokenizer\nimport numpy as np\n\nfrom pyserini.encode import QueryEncoder\n\n\nclass SpladeQueryEncoder(QueryEncoder):\n def __init__(self, model_name_or_path, tokenizer_name=None, device='cpu'):\n self.device = device\n ...
diff --git a/pyserini/encode/_splade.py b/pyserini/encode/_splade.py index 6f866fe37..23312c6d5 100644 --- a/pyserini/encode/_splade.py +++ b/pyserini/encode/_splade.py @@ -25,7 +25,7 @@ def encode(self, text, max_length=256, **kwargs): batch_aggregated_logits, _ = torch.max(torch.log(1 + torch.relu(batch_logi...
pwr-Solaar__Solaar-911
Logitech receiver not found/Unpairable peripherals - Solaar version : 1.0.2 - Distribution: Kali Linux - Kernel version (ex. `uname -srmo`): Linux 5.5.0-kali2-amd64 x86_64 GNU/Linux - Output of `solaar show`: ``` OUTPUT HERE ``` solaar: error: Logitech receiver not found **Describe the bug** I'm using a Lo...
[ { "content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## 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...
[ { "content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## 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...
diff --git a/docs/devices.md b/docs/devices.md index 257b23e9af..32f66c3849 100644 --- a/docs/devices.md +++ b/docs/devices.md @@ -61,6 +61,7 @@ a tuple of known feature settings (from `lib/logitech/settings_templates.py`). | 064d:c53a | Lightspeed | 1 | | 064d:c53d | Lightspeed | 1 ...
goauthentik__authentik-6885
Self impersonation possible **Describe the bug** I can impersonate myself. **To Reproduce** Steps to reproduce the behavior: 1. Open admin interface 2. Go to users (directory > users) 3. Search for your username (same as in active session) 4. Impersonate button visible **Expected behavior** I dont think ...
[ { "content": "\"\"\"User API Views\"\"\"\nfrom datetime import timedelta\nfrom json import loads\nfrom typing import Any, Optional\n\nfrom django.contrib.auth import update_session_auth_hash\nfrom django.contrib.sessions.backends.cache import KEY_PREFIX\nfrom django.core.cache import cache\nfrom django.db.model...
[ { "content": "\"\"\"User API Views\"\"\"\nfrom datetime import timedelta\nfrom json import loads\nfrom typing import Any, Optional\n\nfrom django.contrib.auth import update_session_auth_hash\nfrom django.contrib.sessions.backends.cache import KEY_PREFIX\nfrom django.core.cache import cache\nfrom django.db.model...
diff --git a/authentik/core/api/users.py b/authentik/core/api/users.py index 2029ff7a664f..09a5dc5534da 100644 --- a/authentik/core/api/users.py +++ b/authentik/core/api/users.py @@ -616,8 +616,10 @@ def impersonate(self, request: Request, pk: int) -> Response: if not request.user.has_perm("impersonate"): ...
lk-geimfari__mimesis-697
Country generation does not respect chosen locale It appears that `Address('en').country()` does not respect the locale. Countries outside locale are still generated. Looking at the code it appears there is no implementation for locale specific country, if so, please change issue to a feature request.
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Address module.\n\nThis module contains provider Address() and other utils which represents\ndata related to location, such as street name, city, country and etc.\n\"\"\"\n\nfrom typing import Optional, Union\n\nfrom mimesis.data import (\n CALLING_CODES,\n C...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Address module.\n\nThis module contains provider Address() and other utils which represents\ndata related to location, such as street name, city, country and etc.\n\"\"\"\n\nfrom typing import Optional, Union\n\nfrom mimesis.data import (\n CALLING_CODES,\n C...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4e656a7e1..9971ce4c7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,9 @@ +Version 3.3.0 +------------- + +**Fixed**: +- ``country()`` from the ``Address()`` provider now by default returns the country name of the current locale. + Version 3.2.0 -------------...
localstack__localstack-4325
question: Problem with API GW<->Lambda integration: "Object of type datetime is not JSON serializable" ### Is there an existing issue for this? - [X] I have searched the existing issues and read the documentation ### Question Hey! This is the first time I've used LocalStack, so maybe I'm doing something wrong...
[ { "content": "import base64\nimport glob\nimport json\nimport logging\nimport os\nimport re\nimport subprocess\nimport sys\nimport threading\nimport time\nimport traceback\nfrom multiprocessing import Process, Queue\nfrom typing import Tuple\n\nfrom localstack import config\nfrom localstack.services.awslambda.l...
[ { "content": "import base64\nimport glob\nimport json\nimport logging\nimport os\nimport re\nimport subprocess\nimport sys\nimport threading\nimport time\nimport traceback\nfrom multiprocessing import Process, Queue\nfrom typing import Tuple\n\nfrom localstack import config\nfrom localstack.services.awslambda.l...
diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py index bdf0e17618ea3..6cc2b03453510 100644 --- a/localstack/services/awslambda/lambda_executors.py +++ b/localstack/services/awslambda/lambda_executors.py @@ -927,7 +927,7 @@ def execute_java_lambda(self, e...