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
⌀
koxudaxi__datamodel-code-generator-1826
Importing code generator changes behavior of pyyaml When importing ``datamodel_code_generator``, the behaviour of ``pyyaml`` is changed after the import, datetime objects suddenly are deserialized from yaml as `str` whereas before they were deserialized as `datetime` objects. ## Steps to reproduce: ### create clean...
[ { "content": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, TypeVar\n\nimport pydantic\nfrom packaging import version\nfrom pydantic import BaseModel as _BaseModel\n\nPYDANTIC_VERSION = version.parse(\n pydantic.VERSION if isinstance(py...
[ { "content": "from __future__ import annotations\n\nimport copy\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, TypeVar\n\nimport pydantic\nfrom packaging import version\nfrom pydantic import BaseModel as _BaseModel\n\nPYDANTIC_VERSION = version.parse(\n pydantic.VERSION if ...
diff --git a/datamodel_code_generator/util.py b/datamodel_code_generator/util.py index e3b949e33..1a1585127 100644 --- a/datamodel_code_generator/util.py +++ b/datamodel_code_generator/util.py @@ -1,5 +1,6 @@ from __future__ import annotations +import copy from pathlib import Path from typing import TYPE_CHECKING,...
piskvorky__gensim-797
LdaMallet wrapper giving AttributeError This is on `develop` and it is in sync with upstream. Here's the code: ``` python from gensim.corpora.dictionary import Dictionary texts = [['human', 'interface', 'computer'], ['survey', 'user', 'computer', 'system', 'response', 'time'], ['eps', 'user', 'interf...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\n\"\"\"\nPython wrapper for Latent Dirichlet Allocation (LDA) from MALLET, the Java topic modelling\ntoolki...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\n\"\"\"\nPython wrapper for Latent Dirichlet Allocation (LDA) from MALLET, the Java topic modelling\ntoolki...
diff --git a/gensim/models/wrappers/ldamallet.py b/gensim/models/wrappers/ldamallet.py index c976c2c8b6..cce75823ec 100644 --- a/gensim/models/wrappers/ldamallet.py +++ b/gensim/models/wrappers/ldamallet.py @@ -95,7 +95,6 @@ def __init__(self, mallet_path, corpus=None, num_topics=100, alpha=50, id2word=N self....
django-json-api__django-rest-framework-json-api-987
Allow meta as attribute name It doesn't seem that the json api spec disallows meta as an attribute name but currently an exception is raised when such naming is used in DJA. See example PR https://github.com/django-json-api/django-rest-framework-json-api/pull/654 how to reproduce it.
[ { "content": "from collections import OrderedDict\nfrom collections.abc import Mapping\n\nimport inflection\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db.models.query import QuerySet\nfrom django.utils.module_loading import import_string as import_class_from_dotted_path\nfrom django.uti...
[ { "content": "from collections import OrderedDict\nfrom collections.abc import Mapping\n\nimport inflection\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db.models.query import QuerySet\nfrom django.utils.module_loading import import_string as import_class_from_dotted_path\nfrom django.uti...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 97ef872d..30ef91ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,9 @@ any parts of the framework not mentioned in the documentation should generally b ### Fixed -* Adjusted error messages to correctly use capitial "JSON:API" abbreviation as used in the spe...
Princeton-CDH__geniza-1076
documents without images can't be edited in django admin (v4.8) **Describe the bug** Documents without images can't be edited in django admin. Django complains about an error, but no field is highlighted. **Additional information** - Site version v4.8
[ { "content": "import logging\nfrom collections import defaultdict\nfrom functools import cached_property\nfrom itertools import chain\n\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import CHANGE, LogEntry\nfrom django.contrib.auth.models import ...
[ { "content": "import logging\nfrom collections import defaultdict\nfrom functools import cached_property\nfrom itertools import chain\n\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import CHANGE, LogEntry\nfrom django.contrib.auth.models import ...
diff --git a/geniza/corpus/migrations/0035_document_image_order_override.py b/geniza/corpus/migrations/0035_document_image_order_override.py index b04c41094..e2e6ccf1b 100644 --- a/geniza/corpus/migrations/0035_document_image_order_override.py +++ b/geniza/corpus/migrations/0035_document_image_order_override.py @@ -19,...
qtile__qtile-4065
All hooks in config will be subscribed and fired twice. ### The issue: ~~This is probably due to configuration testing syntax step.~~ ```python 'startup_complete': [<function xstartup_complete at 0x7f2005fc49d0>, <function xstartup_complete at 0x7f2005fc5510>]} ``` Code to reproduce is...
[ { "content": "# Copyright (c) 2008, Aldo Cortesi <aldo@corte.si>\n# Copyright (c) 2011, Andrew Grigorev <andrew@ei-grad.ru>\n#\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to ...
[ { "content": "# Copyright (c) 2008, Aldo Cortesi <aldo@corte.si>\n# Copyright (c) 2011, Andrew Grigorev <andrew@ei-grad.ru>\n#\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to ...
diff --git a/CHANGELOG b/CHANGELOG index 80a6b9cfc9..91eb173bdb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -34,6 +34,7 @@ Qtile x.xx.x, released XXXX-XX-XX: - Fix bug where Window.center() centers window on the wrong screen when using multiple monitors. - Fix `Notify` bug when apps close notifications....
pypa__setuptools-1720
setup_requires="string" not handled by PEP 517 backend Does this need to be fixed in setuptools rather since the PEP says the return value needs to be a list of strings? https://www.python.org/dev/peps/pep-0517/#get-requires-for-build-wheel It looks like here is the setuptools code: https://github.com/pypa/setuptool...
[ { "content": "\"\"\"A PEP 517 interface to setuptools\n\nPreviously, when a user or a command line tool (let's call it a \"frontend\")\nneeded to make a request of setuptools to take a certain action, for\nexample, generating a list of installation requirements, the frontend would\nwould call \"setup.py egg_inf...
[ { "content": "\"\"\"A PEP 517 interface to setuptools\n\nPreviously, when a user or a command line tool (let's call it a \"frontend\")\nneeded to make a request of setuptools to take a certain action, for\nexample, generating a list of installation requirements, the frontend would\nwould call \"setup.py egg_inf...
diff --git a/changelog.d/1720.change.rst b/changelog.d/1720.change.rst new file mode 100644 index 0000000000..a0d8fb35aa --- /dev/null +++ b/changelog.d/1720.change.rst @@ -0,0 +1 @@ +Added support for ``pkg_resources.parse_requirements``-style requirements in ``setup_requires`` when ``setup.py`` is invoked from the ``...
keras-team__keras-5944
IndexError: index 1 is out of bounds for axis 1 with size 1 - [x] Check that you are up-to-date with the master branch of Keras. You can update with: pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps - [x] If running on TensorFlow, check that you are up-to-date with the latest version. The ins...
[ { "content": "from __future__ import absolute_import\n\nimport copy\nimport inspect\nimport types\n\nimport numpy as np\n\nfrom ..utils.np_utils import to_categorical\nfrom ..models import Sequential\n\n\nclass BaseWrapper(object):\n \"\"\"Base class for the Keras scikit-learn wrapper.\n\n Warning: This c...
[ { "content": "from __future__ import absolute_import\n\nimport copy\nimport inspect\nimport types\n\nimport numpy as np\n\nfrom ..utils.np_utils import to_categorical\nfrom ..models import Sequential\n\n\nclass BaseWrapper(object):\n \"\"\"Base class for the Keras scikit-learn wrapper.\n\n Warning: This c...
diff --git a/keras/wrappers/scikit_learn.py b/keras/wrappers/scikit_learn.py index 0bf9148b1944..eda8650814ec 100644 --- a/keras/wrappers/scikit_learn.py +++ b/keras/wrappers/scikit_learn.py @@ -192,11 +192,13 @@ def fit(self, x, y, **kwargs): details about the training history at each epoch. ...
beetbox__beets-3781
Get genres from MusicBrainz ### Problem Next release of MusicBrainz will have genre support. An example can be seen at https://beta.musicbrainz.org/release-group/3bd76d40-7f0e-36b7-9348-91a33afee20e (JSON web service output: https://beta.musicbrainz.org/ws/2/release-group/3bd76d40-7f0e-36b7-9348-91a33afee20e?fmt=jso...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index ea8ef24da7..211f4c42fd 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -74,6 +74,8 @@ def get_message(self): TRACK_INCLUDES = ['artists', 'aliases'] if 'work-level-rels' in musicbrainzngs.VALID_INCLUDES['recording']: TRACK_INCLUDES += ['w...
HypothesisWorks__hypothesis-3476
Update pinned dependencies Automatically update pinned dependencies
[ { "content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Copyright the Hypothesis Authors.\n# Individual contributors are listed in AUTHORS.rst and the git log.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License...
[ { "content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Copyright the Hypothesis Authors.\n# Individual contributors are listed in AUTHORS.rst and the git log.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License...
diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..9cc7a6e4e9 --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,5 @@ +RELEASE_TYPE: patch + +This patch updates our vendored `list of top-level domains <https://www.iana.org/domains/root/db>`__, +wh...
bridgecrewio__checkov-599
Update urllib3: HTTP Header Injection vuln **Describe the bug** urllib3 needs to be updated to at least 1.25.9 to fix a high severity HTTP Header Injection vulnerability. Snyk info page [here](https://snyk.io/vuln/SNYK-PYTHON-URLLIB3-1014645).
[ { "content": "#!/usr/bin/env python\nimport logging\nimport os\nfrom importlib import util\nfrom os import path\n\nimport setuptools\nfrom setuptools import setup\n\n# read the contents of your README file\nthis_directory = path.abspath(path.dirname(__file__))\nwith open(path.join(this_directory, \"README.md\")...
[ { "content": "#!/usr/bin/env python\nimport logging\nimport os\nfrom importlib import util\nfrom os import path\n\nimport setuptools\nfrom setuptools import setup\n\n# read the contents of your README file\nthis_directory = path.abspath(path.dirname(__file__))\nwith open(path.join(this_directory, \"README.md\")...
diff --git a/Pipfile.lock b/Pipfile.lock index a0917891f0..9f871a42b6 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -26,18 +26,17 @@ }, "boto3": { "hashes": [ - "sha256:348cddfd56be6c8b759544f99d20d633cc6a65d346651700ad8ac93a5214c032", - "sha256:c4ccd1f2606...
scrapy__scrapy-4668
List of fields incorrectly accessed for dataclass items ### Description If I make a `dataclass` item and want to export to csv, I get this error: ``` ... File "/home/tadej/miniconda3/envs/main/lib/python3.7/site-packages/scrapy/exporters.py", line 251, in _write_headers_and_set_fields_to_export self.fiel...
[ { "content": "\"\"\"\nItem Exporters are used to export/serialize items into different formats.\n\"\"\"\n\nimport csv\nimport io\nimport marshal\nimport pickle\nimport pprint\nimport warnings\nfrom xml.sax.saxutils import XMLGenerator\n\nfrom itemadapter import is_item, ItemAdapter\n\nfrom scrapy.exceptions imp...
[ { "content": "\"\"\"\nItem Exporters are used to export/serialize items into different formats.\n\"\"\"\n\nimport csv\nimport io\nimport marshal\nimport pickle\nimport pprint\nimport warnings\nfrom xml.sax.saxutils import XMLGenerator\n\nfrom itemadapter import is_item, ItemAdapter\n\nfrom scrapy.exceptions imp...
diff --git a/scrapy/exporters.py b/scrapy/exporters.py index 71257267337..0aba1c90456 100644 --- a/scrapy/exporters.py +++ b/scrapy/exporters.py @@ -243,12 +243,8 @@ def _build_row(self, values): def _write_headers_and_set_fields_to_export(self, item): if self.include_headers_line: if not sel...
translate__translate-4647
rc2po won't generate pot file if a comment is encountered If comments are present in the rc file, rc2po processes the file without an error message but fails to create a pot file. This used to work but stopped sometime early 2021. Removing all comments is the current workaround. Note that comments in a STRINGTABLE are ...
[ { "content": "#\n# Copyright 2004-2006,2008-2009 Zuza Software Foundation\n#\n# This file is part of the Translate Toolkit.\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 v...
[ { "content": "#\n# Copyright 2004-2006,2008-2009 Zuza Software Foundation\n#\n# This file is part of the Translate Toolkit.\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 v...
diff --git a/translate/storage/rc.py b/translate/storage/rc.py index 4c4a2e2f75..cfc0600f96 100644 --- a/translate/storage/rc.py +++ b/translate/storage/rc.py @@ -234,7 +234,9 @@ def rc_statement(): Keyword("POPUP")("block_type") + Optional(quoted_string("caption")) + block_start - + Z...
easybuilders__easybuild-framework-3510
Containers still being configured for EB 3.x Containers from EB 4.x are still being configured for 3.9: ``` # install EasyBuild using pip pip install -U setuptools pip install 'vsc-install<0.11.4' 'vsc-base<2.9.0' pip install easybuild ```
[ { "content": "# Copyright 2017-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemi...
[ { "content": "# Copyright 2017-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemi...
diff --git a/easybuild/tools/containers/singularity.py b/easybuild/tools/containers/singularity.py index 4ecbed6990..9583f25d32 100644 --- a/easybuild/tools/containers/singularity.py +++ b/easybuild/tools/containers/singularity.py @@ -314,13 +314,6 @@ def resolve_template_data(self): "# install EasyBui...
goauthentik__authentik-8731
The Authorization Server requires End-User consent when set the offline_access scope After updating to 2024.2.1, refresh_token required offline_access, When I set the provider scope and identified offline_access scope in the client. Authentik shown consent_required: The Authorization Server requires End-User consent...
[ { "content": "\"\"\"authentik OAuth2 Authorization views\"\"\"\n\nfrom dataclasses import InitVar, dataclass, field\nfrom datetime import timedelta\nfrom hashlib import sha256\nfrom json import dumps\nfrom re import error as RegexError\nfrom re import fullmatch\nfrom urllib.parse import parse_qs, urlencode, url...
[ { "content": "\"\"\"authentik OAuth2 Authorization views\"\"\"\n\nfrom dataclasses import InitVar, dataclass, field\nfrom datetime import timedelta\nfrom hashlib import sha256\nfrom json import dumps\nfrom re import error as RegexError\nfrom re import fullmatch\nfrom urllib.parse import parse_qs, urlencode, url...
diff --git a/authentik/providers/oauth2/views/authorize.py b/authentik/providers/oauth2/views/authorize.py index e7989e4191af..e77b78bfc9e7 100644 --- a/authentik/providers/oauth2/views/authorize.py +++ b/authentik/providers/oauth2/views/authorize.py @@ -255,9 +255,9 @@ def check_scope(self, github_compat=False): ...
wright-group__WrightTools-688
Label generation inadvertently replacing more characters than desired https://github.com/wright-group/WrightTools/blob/5ca0358e93698b39f4dfc15bf194211a9c30c94a/WrightTools/data/_axis.py#L96 ```python >>> zero <WrightTools.Data 'zero' ('t',) at /tmp/p1jv7pfv.wt5::/zero> >>> zero.t.label '$\\ma\\tauhsf{\\tau\\,\\l...
[ { "content": "\"\"\"Axis class and associated.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport re\nimport numexpr\nimport operator\nimport functools\n\nimport numpy as np\n\nfrom .. import exceptions as wt_exceptions\nfrom .. import kit ...
[ { "content": "\"\"\"Axis class and associated.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport re\nimport numexpr\nimport operator\nimport functools\n\nimport numpy as np\n\nfrom .. import exceptions as wt_exceptions\nfrom .. import kit ...
diff --git a/WrightTools/data/_axis.py b/WrightTools/data/_axis.py index 5f448d4d9..c7d0226a7 100644 --- a/WrightTools/data/_axis.py +++ b/WrightTools/data/_axis.py @@ -89,7 +89,7 @@ def identity(self): @property def label(self): symbol = wt_units.get_symbol(self.units) - label = r"$\mathsf{" ...
crytic__slither-786
AttributeError: 'StructureTopLevel' object has no attribute 'contract' On 0x0cf55d57d241161e0ec68e72cbb175dbfe84173a Here there should be a different case for top-level elements and non-top-level: https://github.com/crytic/slither/blob/c0c581b3ba830b6ce8dc3f4be82592a7a42e9752/slither/core/solidity_types/user_defi...
[ { "content": "from typing import Union, TYPE_CHECKING, Tuple\nimport math\n\nfrom slither.core.solidity_types.type import Type\nfrom slither.exceptions import SlitherException\n\nif TYPE_CHECKING:\n from slither.core.declarations.structure import Structure\n from slither.core.declarations.enum import Enum...
[ { "content": "from typing import Union, TYPE_CHECKING, Tuple\nimport math\n\nfrom slither.core.solidity_types.type import Type\nfrom slither.exceptions import SlitherException\n\nif TYPE_CHECKING:\n from slither.core.declarations.structure import Structure\n from slither.core.declarations.enum import Enum...
diff --git a/slither/core/solidity_types/user_defined_type.py b/slither/core/solidity_types/user_defined_type.py index 75a44e10f2..cecbec449c 100644 --- a/slither/core/solidity_types/user_defined_type.py +++ b/slither/core/solidity_types/user_defined_type.py @@ -59,12 +59,13 @@ def storage_size(self) -> Tuple[int, bool...
SciTools__cartopy-1989
Nightshade w/ refraction=-6.0 yields ValueError: GEOSGeom_createLinearRing_r returned a NULL pointer ### Description I'm trying use Nightshade to draw twilight lines (and sub solar point). If I do Nightshade w/ refraction=-6.0, I get ValueError: GEOSGeom_createLinearRing_r returned a NULL pointer Nightshade w/...
[ { "content": "# Copyright Cartopy Contributors\n#\n# This file is part of Cartopy and is released under the LGPL license.\n# See COPYING and COPYING.LESSER in the root of the repository for full\n# licensing details.\n\nimport datetime\n\nimport numpy as np\nimport shapely.geometry as sgeom\n\nfrom . import Sha...
[ { "content": "# Copyright Cartopy Contributors\n#\n# This file is part of Cartopy and is released under the LGPL license.\n# See COPYING and COPYING.LESSER in the root of the repository for full\n# licensing details.\n\nimport datetime\n\nimport numpy as np\nimport shapely.geometry as sgeom\n\nfrom . import Sha...
diff --git a/lib/cartopy/feature/nightshade.py b/lib/cartopy/feature/nightshade.py index b8a613474..8a8f28858 100644 --- a/lib/cartopy/feature/nightshade.py +++ b/lib/cartopy/feature/nightshade.py @@ -77,8 +77,12 @@ def __init__(self, date=None, delta=0.1, refraction=-0.83, # Solve the generalized equation f...
dask__dask-5356
Numpy warnings in compute_meta I've noticed that the following (just an example) generates a warning (using dask version `2.3.0`): ```python import dask.array as da import numpy as np data0 = da.zeros((3, 10, 10), chunks=(3, 2, 2)) data1 = da.map_blocks(lambda x: np.mean(x, axis=0), data0, dtype=data0.dtype, dro...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport difflib\nimport functools\nimport math\nimport numbers\nimport os\n\nimport numpy as np\nfrom toolz import frequencies, concat\n\nfrom .core import Array\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import has...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport difflib\nimport functools\nimport math\nimport numbers\nimport os\nimport warnings\n\nimport numpy as np\nfrom toolz import frequencies, concat\n\nfrom .core import Array\nfrom ..highlevelgraph import HighLevelGraph\nfrom ....
diff --git a/dask/array/tests/test_array_core.py b/dask/array/tests/test_array_core.py index d406767b15c..05c0a1754ab 100644 --- a/dask/array/tests/test_array_core.py +++ b/dask/array/tests/test_array_core.py @@ -4080,6 +4080,11 @@ def test_auto_chunks_h5py(): def test_no_warnings_from_blockwise(): + with pytes...
googleapis__python-spanner-django-33
dbapi: implement Cursor.fetchmany
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/spanner/dbapi/cursor.py b/spanner/dbapi/cursor.py index f25599f1f9..e88066ce08 100644 --- a/spanner/dbapi/cursor.py +++ b/spanner/dbapi/cursor.py @@ -152,6 +152,28 @@ def fetchone(self): def fetchall(self): return list(self.__iter__()) + def fetchmany(self, n=50): + """ + F...
kornia__kornia-2620
expose `average_endpoint_error` on `kornia.metrics.__init__.py` can you expose it on kornia.metrics.__init__.py ? - to use as `kornia.metrics.average_endpoint_error` too _Originally posted by @johnnv1 in https://github.com/kornia/kornia/pull/2615#discussion_r1351007042_
[ { "content": "from .accuracy import accuracy\nfrom .average_meter import AverageMeter\nfrom .confusion_matrix import confusion_matrix\nfrom .endpoint_error import AEPE, aepe\nfrom .mean_average_precision import mean_average_precision\nfrom .mean_iou import mean_iou, mean_iou_bbox\nfrom .psnr import psnr\nfrom ....
[ { "content": "from .accuracy import accuracy\nfrom .average_meter import AverageMeter\nfrom .confusion_matrix import confusion_matrix\nfrom .endpoint_error import AEPE, aepe, average_endpoint_error\nfrom .mean_average_precision import mean_average_precision\nfrom .mean_iou import mean_iou, mean_iou_bbox\nfrom ....
diff --git a/kornia/metrics/__init__.py b/kornia/metrics/__init__.py index 41c5ebe4fe..a30ba3d4bf 100644 --- a/kornia/metrics/__init__.py +++ b/kornia/metrics/__init__.py @@ -1,7 +1,7 @@ from .accuracy import accuracy from .average_meter import AverageMeter from .confusion_matrix import confusion_matrix -from .endpo...
microsoft__playwright-python-190
`ignoreDefaultArgs` launch parameter is broken I'm trying to disable default launch arguments however when this parameter is set to True one of two things happen: ``` browser: Browser = chromium.launch(ignoreDefaultArgs=True) ``` will break with: ``` File "/home/user/.local/lib/python3.8/site-packages/playwri...
[ { "content": "# Copyright (c) Microsoft Corporation.\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 ap...
[ { "content": "# Copyright (c) Microsoft Corporation.\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 ap...
diff --git a/playwright/browser_type.py b/playwright/browser_type.py index 9592caf4d..1e675f266 100644 --- a/playwright/browser_type.py +++ b/playwright/browser_type.py @@ -132,10 +132,9 @@ def normalize_launch_params(params: Dict) -> None: if "env" in params: params["env"] = {name: str(value) for [name, ...
CTFd__CTFd-1311
log rotation does not works In the file https://github.com/CTFd/CTFd/blob/master/CTFd/utils/initialization/__init__.py#L107 the log handlers `logging.handlers.RotatingFileHandler` are not created with the right parameters (see [RotatingFileHandler](https://docs.python.org/3/library/logging.handlers.html#logging.handle...
[ { "content": "import datetime\nimport logging\nimport os\nimport sys\n\nfrom flask import abort, redirect, render_template, request, session, url_for\nfrom sqlalchemy.exc import IntegrityError, InvalidRequestError\nfrom werkzeug.wsgi import DispatcherMiddleware\n\nfrom CTFd.exceptions import UserNotFoundExcepti...
[ { "content": "import datetime\nimport logging\nimport os\nimport sys\n\nfrom flask import abort, redirect, render_template, request, session, url_for\nfrom sqlalchemy.exc import IntegrityError, InvalidRequestError\nfrom werkzeug.wsgi import DispatcherMiddleware\n\nfrom CTFd.exceptions import UserNotFoundExcepti...
diff --git a/CTFd/utils/initialization/__init__.py b/CTFd/utils/initialization/__init__.py index b09660db8..f6aef673a 100644 --- a/CTFd/utils/initialization/__init__.py +++ b/CTFd/utils/initialization/__init__.py @@ -102,11 +102,13 @@ def init_logs(app): open(log, "a").close() submission_log...
NVIDIA-Merlin__NVTabular-806
[BUG] Website in Parquet row group size warning message doesn't exist **Describe the bug** When I create a `Dataset` object with `part_size=10MB` (for reasons), I get this warning message: > nvtabular/io/parquet.py:83: UserWarning: Row group memory size (18299872) (bytes) of parquet file is bigger than requested pa...
[ { "content": "#\n# Copyright (c) 2021, NVIDIA CORPORATION.\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 requ...
[ { "content": "#\n# Copyright (c) 2021, NVIDIA CORPORATION.\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 requ...
diff --git a/nvtabular/io/parquet.py b/nvtabular/io/parquet.py index 46fd2cd3258..a5632db46e0 100644 --- a/nvtabular/io/parquet.py +++ b/nvtabular/io/parquet.py @@ -87,8 +87,8 @@ def __init__( f" than requested part_size ({self.part_size}) for the NVTabular dataset." f"A row gr...
quantumlib__Cirq-4521
Sympy Division by Integer in Exponent or Radians throws and error **Description of the issue** When using sympy to define a circuit, a ValueError exception might be thrown by NumPy (ValueError: Integers to negative integer powers are not allowed.) This happens when there is some division in the exponent by some in...
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/cirq-core/cirq/study/resolver.py b/cirq-core/cirq/study/resolver.py index abe53646b65..2bc199c4137 100644 --- a/cirq-core/cirq/study/resolver.py +++ b/cirq-core/cirq/study/resolver.py @@ -143,9 +143,11 @@ def value_of( product *= self.value_of(factor, recursive) return product...
mlflow__mlflow-10638
[BUG] Security Vulnerability
[ { "content": "import os\nimport pathlib\nimport posixpath\nimport re\nimport urllib.parse\nimport uuid\nfrom typing import Any, Tuple\n\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE\nfrom mlflow.store.db.db_types import DATABASE_ENGINES\nfrom ml...
[ { "content": "import os\nimport pathlib\nimport posixpath\nimport re\nimport urllib.parse\nimport uuid\nfrom typing import Any, Tuple\n\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE\nfrom mlflow.store.db.db_types import DATABASE_ENGINES\nfrom ml...
diff --git a/mlflow/utils/uri.py b/mlflow/utils/uri.py index bc217183030b0..5ba27194eecdc 100644 --- a/mlflow/utils/uri.py +++ b/mlflow/utils/uri.py @@ -41,6 +41,10 @@ def is_local_uri(uri, is_tracking_or_registry_uri=True): return False parsed_uri = urllib.parse.urlparse(uri) + scheme = parsed_uri.s...
mozilla__pontoon-2330
[notifications] Notify project Translators when suggestions are submitted *This issue was created automatically by a [script](https://github.com/mathjazz/bugzilla2github/).* ## [Bug 1398861](https://bugzilla.mozilla.org/show_bug.cgi?id=1398861) Bug Reporter: @mathjazz CC: @MikkCZ, mvasicek@mozilla.cz See also: ht...
[ { "content": "import calendar\n\nfrom collections import defaultdict\nfrom datetime import timedelta\nfrom functools import cached_property\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.db.models i...
[ { "content": "import calendar\n\nfrom collections import defaultdict\nfrom datetime import timedelta\nfrom functools import cached_property\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.db.models i...
diff --git a/frontend/src/core/user/components/UserNotification.css b/frontend/src/core/user/components/UserNotification.css index 30ece1b37a..e4e0c2a225 100644 --- a/frontend/src/core/user/components/UserNotification.css +++ b/frontend/src/core/user/components/UserNotification.css @@ -51,11 +51,7 @@ padding: 0 3p...
systemd__mkosi-1706
postinst has no networking if systemd package is installed Using main branch on Debian Sid with systemd-networkd and systemd-resolved. Not sure if bug, but: ``` $ cat mkosi.conf [Distribution] Distribution=ubuntu Release=jammy [Content] Bootable=no Packages= apt systemd WithNetwork=yes [Ou...
[ { "content": "# SPDX-License-Identifier: LGPL-2.1+\n\nimport asyncio\nimport asyncio.tasks\nimport ctypes\nimport ctypes.util\nimport fcntl\nimport logging\nimport os\nimport pwd\nimport queue\nimport shlex\nimport signal\nimport subprocess\nimport sys\nimport tempfile\nimport textwrap\nimport threading\nfrom p...
[ { "content": "# SPDX-License-Identifier: LGPL-2.1+\n\nimport asyncio\nimport asyncio.tasks\nimport ctypes\nimport ctypes.util\nimport fcntl\nimport logging\nimport os\nimport pwd\nimport queue\nimport shlex\nimport signal\nimport subprocess\nimport sys\nimport tempfile\nimport textwrap\nimport threading\nfrom p...
diff --git a/mkosi/run.py b/mkosi/run.py index 111266f9b..af2d39f8c 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -369,7 +369,7 @@ def chroot_cmd(root: Path, *, options: Sequence[PathString] = (), network: bool # mkdir(symlink) which obviously fails if multiple components of the dangling symlink path don...
django-cms__django-filer-1248
not owned files in unfiled folder can not be listed if perms ON If there are files in "unfiled folder" which are not owned by current user, he can not list those in admin because current code filters on files inside folders the user can see (but "unfiled folder" is virtual). Proposal: replace this line (filer/admin...
[ { "content": "import itertools\nimport os\nimport re\nfrom collections import OrderedDict\n\nfrom django import forms\nfrom django.conf import settings as django_settings\nfrom django.contrib import messages\nfrom django.contrib.admin import helpers\nfrom django.contrib.admin.utils import capfirst, quote, unquo...
[ { "content": "import itertools\nimport os\nimport re\nfrom collections import OrderedDict\n\nfrom django import forms\nfrom django.conf import settings as django_settings\nfrom django.contrib import messages\nfrom django.contrib.admin import helpers\nfrom django.contrib.admin.utils import capfirst, quote, unquo...
diff --git a/filer/admin/folderadmin.py b/filer/admin/folderadmin.py index 4b32e1254..cc18050db 100644 --- a/filer/admin/folderadmin.py +++ b/filer/admin/folderadmin.py @@ -322,7 +322,11 @@ def directory_listing(self, request, folder_id=None, viewtype=None): perms = FolderPermission.objects.get_read_id_list(re...
kymatio__kymatio-670
Keras not saving model architecture **Hi everybody, I have included in a Keras model a scattering layer using the following syntax:** ``` import kymatio from kymatio.keras import Scattering2D # Model architecture def Dual_ResNet_Atrous_Att_WST(input_shape=(HEIGHT, WIDTH, CHANNELS), mr...
[ { "content": "from ...frontend.keras_frontend import ScatteringKeras\nfrom ...scattering1d.frontend.base_frontend import ScatteringBase1D\n\nfrom kymatio.tensorflow import Scattering1D as ScatteringTensorFlow1D\n\nfrom tensorflow.python.framework import tensor_shape\n\n\nclass ScatteringKeras1D(ScatteringKeras,...
[ { "content": "from ...frontend.keras_frontend import ScatteringKeras\nfrom ...scattering1d.frontend.base_frontend import ScatteringBase1D\n\nfrom kymatio.tensorflow import Scattering1D as ScatteringTensorFlow1D\n\nfrom tensorflow.python.framework import tensor_shape\n\n\nclass ScatteringKeras1D(ScatteringKeras,...
diff --git a/kymatio/scattering1d/frontend/keras_frontend.py b/kymatio/scattering1d/frontend/keras_frontend.py index cd8194f43..3de81350a 100644 --- a/kymatio/scattering1d/frontend/keras_frontend.py +++ b/kymatio/scattering1d/frontend/keras_frontend.py @@ -27,5 +27,8 @@ def compute_output_shape(self, input_shape): ...
saulpw__visidata-1784
[capture-col] When nothing is captured, "IndexError: list index out of range" is thrown _Minor user exp bug_ **Small description** When using `capture-col` on a column and the regex does not capture any values, the below error is thrown. No new column is created (as expected) **Expected result** Just to show th...
[ { "content": "import re\nimport random\n\nfrom visidata import asyncthread, options, vd\nfrom visidata import VisiData, BaseSheet, Sheet, Column, Progress\n\n\n@Sheet.api\ndef setSubst(sheet, cols, rows):\n if not rows:\n vd.warning('no %s selected' % sheet.rowtype)\n return\n modified = 'co...
[ { "content": "import re\nimport random\n\nfrom visidata import asyncthread, options, vd\nfrom visidata import VisiData, BaseSheet, Sheet, Column, Progress\n\n\n@Sheet.api\ndef setSubst(sheet, cols, rows):\n if not rows:\n vd.warning('no %s selected' % sheet.rowtype)\n return\n modified = 'co...
diff --git a/visidata/features/regex.py b/visidata/features/regex.py index 5e497113e..222bbdd2b 100644 --- a/visidata/features/regex.py +++ b/visidata/features/regex.py @@ -24,6 +24,8 @@ def makeRegexSplitter(vd, regex, origcol): @VisiData.api def makeRegexMatcher(vd, regex, origcol): + if not regex.groups: + ...
conda__conda-build-734
CPU_COUNT reliability in MacOSX Hello! After a talk with @ccordoba12 in [conda-recipes/pr427](https://github.com/conda/conda-recipes/pull/427), it seems that CPU_COUNT is not reliable in MacOSX and he suggests to use "sysctl -n hw.ncpu". Have you encountered this bug ? I see that in python3.5, multiprocessing.cpu_coun...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nfrom os.path import join\nimport subprocess\nimport multiprocessing\n\nimport conda.config as cc\n\nfrom conda_build.config import config\n\nfrom conda_build import source\nfrom conda_build.scripts import pr...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nfrom os.path import join\nimport subprocess\nimport multiprocessing\n\nimport conda.config as cc\n\nfrom conda_build.config import config\n\nfrom conda_build import source\nfrom conda_build.scripts import pr...
diff --git a/conda_build/environ.py b/conda_build/environ.py index 7d68ae529a..b822f2d523 100644 --- a/conda_build/environ.py +++ b/conda_build/environ.py @@ -106,10 +106,16 @@ def get_dict(m=None, prefix=None): value = '<UNDEFINED>' d[var_name] = value - try: - d['CPU_COUNT'] ...
freedomofpress__securedrop-655
Selected codename length resets to default when a new codename is requested If a source wants to request a 10 word codename on /generate, she can do so by selecting "10 words" in the dropdown and clicking on the refresh-button on the right. If she is not happy with the new codename, she will have to select "10 words" i...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro...
diff --git a/securedrop/source.py b/securedrop/source.py index a506f56bb5..d1cbdb3e69 100644 --- a/securedrop/source.py +++ b/securedrop/source.py @@ -136,15 +136,15 @@ def generate(): # page, or inform them that they're logged in. session.pop('logged_in', None) - number_words = 8 + num_words = 8 ...
opendatacube__datacube-core-1147
2 character strings are treated as Range object by Query class ### Expected behaviour ```python from datacube.api.query import Query assert Query(k='AB').search['k'] == 'AB' ``` ### Actual behaviour Instead `k='AB'` is turned into `Range('A', 'B')` Error is here: https://github.com/opendatacube/datacube-c...
[ { "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\"\"\"\nStorage Query and Access API module\n\"\"\"\n\n\nimport logging\nimport datetime\nimport collections\nimport w...
[ { "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\"\"\"\nStorage Query and Access API module\n\"\"\"\n\n\nimport logging\nimport datetime\nimport collections\nimport w...
diff --git a/datacube/api/query.py b/datacube/api/query.py index 2ad4d693a9..b3aad1b4e9 100644 --- a/datacube/api/query.py +++ b/datacube/api/query.py @@ -246,8 +246,14 @@ def _values_to_search(**kwargs): if key.lower() in ('time', 't'): search['time'] = _time_to_search_dims(value) elif k...
Kinto__kinto-1473
Do not enforce instantiation of resource model during init Do not enforce instantiation of resource model during init
[ { "content": "import logging\nimport re\nimport functools\nfrom uuid import uuid4\n\nimport colander\nimport venusian\n\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPrec...
[ { "content": "import logging\nimport re\nimport functools\nfrom uuid import uuid4\n\nimport colander\nimport venusian\n\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPrec...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 396a748a8..10634b6dd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,8 +6,9 @@ This document describes changes between each past release. 8.1.4 (unreleased) ------------------ -- Nothing changed yet. +**Bug fixes** +- Allow inherited resources to set a custom ...
Parsl__parsl-1851
PR 1727 broke storage of task_hashsum in monitoring **Describe the bug** After PR 1727, the monitoring `task` no longer has the task_hashsum field populated. **To Reproduce** Run this code on parsl 1.0.0 and on origin/master da2e36d13129db4e567ca40a63c55363aa92f8d7. In the first case, the output of sqlite will s...
[ { "content": "import logging\nimport threading\nimport queue\nimport os\nimport time\nimport datetime\n\nfrom typing import Any, Dict, Set\n\nfrom parsl.log_utils import set_file_logger\nfrom parsl.dataflow.states import States\nfrom parsl.providers.error import OptionalModuleMissing\nfrom parsl.monitoring.mess...
[ { "content": "import logging\nimport threading\nimport queue\nimport os\nimport time\nimport datetime\n\nfrom typing import Any, Dict, Set\n\nfrom parsl.log_utils import set_file_logger\nfrom parsl.dataflow.states import States\nfrom parsl.providers.error import OptionalModuleMissing\nfrom parsl.monitoring.mess...
diff --git a/parsl/monitoring/db_manager.py b/parsl/monitoring/db_manager.py index ed2e4c2289..91f6b174a0 100644 --- a/parsl/monitoring/db_manager.py +++ b/parsl/monitoring/db_manager.py @@ -383,7 +383,8 @@ def start(self, priority_queue, node_queue, resource_queue) -> None: columns=['...
yt-project__yt-1869
SlicePlot artifacts on corners/edges ### Bug report A SlicePlot of a 2D cylindrical dataset has artifacts on the edges and corners that do not represent the underlying data. **Code for reproduction** This can be reproduced using the same dataset and plot as #1663. Download the WDMerger_hdf5_chk_1000 sample dat...
[ { "content": "\"\"\"\nDefinitions for cylindrical coordinate systems\n\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file ...
[ { "content": "\"\"\"\nDefinitions for cylindrical coordinate systems\n\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file ...
diff --git a/yt/geometry/coordinates/cylindrical_coordinates.py b/yt/geometry/coordinates/cylindrical_coordinates.py index 949e86f2994..554fb1ca559 100644 --- a/yt/geometry/coordinates/cylindrical_coordinates.py +++ b/yt/geometry/coordinates/cylindrical_coordinates.py @@ -96,7 +96,11 @@ def _path_z(field, data): ...
geopandas__geopandas-1255
Set operators are inconsistently handled Since merging #68 to allow geometric operations on `GeoDataFrame` objects, set operators work with a dataframe as the second item in an operation, but not the first. For example, ``` a = GeoSeries(...) b = GeoDataFrame(...) a.intersection(b) # Okay b.intersection(a) # Okay...
[ { "content": "import json\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\n\nfrom shapely.geometry import mapping, shape\n\nfrom geopandas.array import GeometryArray, from_shapely\nfrom geopandas.base import GeoPandasBase, is_geometry_type\nfrom geopandas.geoseries import GeoSer...
[ { "content": "import json\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\n\nfrom shapely.geometry import mapping, shape\n\nfrom geopandas.array import GeometryArray, from_shapely\nfrom geopandas.base import GeoPandasBase, is_geometry_type\nfrom geopandas.geoseries import GeoSer...
diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py index 65825c4d6a..3c9fb7ead0 100644 --- a/geopandas/geodataframe.py +++ b/geopandas/geodataframe.py @@ -747,6 +747,26 @@ def astype(self, dtype, copy=True, errors="raise", **kwargs): # do not return a GeoDataFrame return pd.DataFrame(d...
wagtail__wagtail-11017
Race condition with new page subscriptions ### Issue Summary If an editor visits the EditView for a page which they have not accessed before, a subscription is created. However if two processes take this request at the same time, there's a risk that a subscription already exists and a 500 error occurs: ``` Inter...
[ { "content": "import json\nimport warnings\nfrom urllib.parse import quote\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Prefetch, Q\nfrom django.http import HttpResponse\nfrom django.shortcu...
[ { "content": "import json\nimport warnings\nfrom urllib.parse import quote\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Prefetch, Q\nfrom django.http import HttpResponse\nfrom django.shortcu...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4a926f313fdb..1dfaebbcec07 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -68,6 +68,7 @@ Changelog * Fix: Ensure very long words can wrap when viewing saved comments (Chiemezuo Akujobi) * Fix: Avoid forgotten password link text conflicting with the supplied aria-l...
koxudaxi__datamodel-code-generator-421
IPv4Address doesn't import from pydantic.validators **Describe the bug** When using `format: ipv4`, the following import is added to the output: ```py from pydantic import IPv4Address ``` This isn't a valid import. **To Reproduce** Example schema: ```yaml openapi: 3.0.0 info: version: 0.0.1 ...
[ { "content": "from datamodel_code_generator.imports import Import\n\nIMPORT_CONSTR = Import.from_full_path('pydantic.constr')\nIMPORT_CONINT = Import.from_full_path('pydantic.conint')\nIMPORT_CONFLOAT = Import.from_full_path('pydantic.confloat')\nIMPORT_CONDECIMAL = Import.from_full_path('pydantic.condecimal')\...
[ { "content": "from datamodel_code_generator.imports import Import\n\nIMPORT_CONSTR = Import.from_full_path('pydantic.constr')\nIMPORT_CONINT = Import.from_full_path('pydantic.conint')\nIMPORT_CONFLOAT = Import.from_full_path('pydantic.confloat')\nIMPORT_CONDECIMAL = Import.from_full_path('pydantic.condecimal')\...
diff --git a/datamodel_code_generator/model/pydantic/imports.py b/datamodel_code_generator/model/pydantic/imports.py index 6c9ad19b5..5c77114bf 100644 --- a/datamodel_code_generator/model/pydantic/imports.py +++ b/datamodel_code_generator/model/pydantic/imports.py @@ -17,8 +17,8 @@ IMPORT_UUID4 = Import.from_full_path...
microsoft__AzureTRE-854
[Task] Modify InnerEye Deeplearning service so it can be registered with API Story: #694 **Description** Modify InnerEye Deeplearning service so template can be registered with publish_register_bundle.sh
[ { "content": "import os\nimport sys\nimport json\nimport socket\nimport asyncio\nimport logging\n\nfrom shared.logging import disable_unwanted_loggers, initialize_logging, get_message_id_logger, shell_output_logger # pylint: disable=import-error # noqa\nfrom resources import strings # pylint: disable=import-e...
[ { "content": "import os\nimport sys\nimport json\nimport socket\nimport asyncio\nimport logging\n\nfrom shared.logging import disable_unwanted_loggers, initialize_logging, get_message_id_logger, shell_output_logger # pylint: disable=import-error # noqa\nfrom resources import strings # pylint: disable=import-e...
diff --git a/.github/workflows/deploy_tre.yml b/.github/workflows/deploy_tre.yml index 825ec593dd..d34f162699 100644 --- a/.github/workflows/deploy_tre.yml +++ b/.github/workflows/deploy_tre.yml @@ -226,6 +226,11 @@ jobs: curl -L https://cdn.porter.sh/latest/install-linux.sh | bash && ~/.porter/porter mixin ...
pyinstaller__pyinstaller-3491
Security-Alert: try to store file outside of dist-directory. Aborting. 'my..data.txt' Including a data file with two consecutive periods in the filename like "my..data.txt" gives a "Security-Alert" error when using pyinstaller. Is this desired behavior or a bug? output log: ``` C:\Users\username\test_pyinstaller\...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2018, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING....
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2018, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING....
diff --git a/PyInstaller/building/api.py b/PyInstaller/building/api.py index 103d8fb15e..6b7ae55afd 100644 --- a/PyInstaller/building/api.py +++ b/PyInstaller/building/api.py @@ -678,7 +678,8 @@ def assemble(self): if not os.path.exists(fnm) or not os.path.isfile(fnm) and is_path_to_egg(fnm): ...
ethereum__consensus-specs-2803
Double check linting settings @potuz raised the issue that phase0's `get_validator_from_deposit` takes an additional `state` argument that is not used. From a cursory look, it seems like our linting stack *should* have caught this in the `pyspec`. Let's double-check it is working as intended and add if missing.
[ { "content": "from setuptools import setup, find_packages, Command\nfrom setuptools.command.build_py import build_py\nfrom distutils import dir_util\nfrom distutils.util import convert_path\nfrom pathlib import Path\nimport os\nimport re\nimport string\nimport textwrap\nfrom typing import Dict, NamedTuple, List...
[ { "content": "from setuptools import setup, find_packages, Command\nfrom setuptools.command.build_py import build_py\nfrom distutils import dir_util\nfrom distutils.util import convert_path\nfrom pathlib import Path\nimport os\nimport re\nimport string\nimport textwrap\nfrom typing import Dict, NamedTuple, List...
diff --git a/Makefile b/Makefile index ca0096fb9e..ec3302e27b 100644 --- a/Makefile +++ b/Makefile @@ -130,9 +130,11 @@ codespell: codespell . --skip ./.git -I .codespell-whitelist # TODO: add future protocol upgrade patch packages to linting. +# NOTE: we use `pylint` just for catching unused arguments in spec cod...
HypothesisWorks__hypothesis-1044
`escalation.belongs_to` cache is broken The problem is that the cache is checked with the incoming string type, but [the string type changes](https://github.com/HypothesisWorks/hypothesis-python/blob/3.44.1/src/hypothesis/internal/escalation.py#L41) before the value is inserted: A simple (but not elegant) fix: ``...
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2017 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2017 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b6243814f6..0a0c420d93 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -163,6 +163,7 @@ their individual contributions. * `Alex Stapleton <https://www.github.com/public>`_ * `Alex Willmer <https://github.com/moreati>`_ (alex@moreati.org.uk) * `Ben Peters...
pymodbus-dev__pymodbus-659
ModbusTCP _in_waiting not defined. <!-- Please use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) for support questions. Before opening a new issue, make sure you do the following: * check that your issu...
[ { "content": "\"\"\"\nCollection of transaction based abstractions\n\n\"\"\"\n\nimport struct\nimport socket\nimport time\nfrom threading import RLock\nfrom functools import partial\n\nfrom pymodbus.exceptions import ModbusIOException, NotImplementedException\nfrom pymodbus.exceptions import InvalidMessageRecei...
[ { "content": "\"\"\"\nCollection of transaction based abstractions\n\n\"\"\"\n\nimport struct\nimport socket\nimport time\nfrom threading import RLock\nfrom functools import partial\n\nfrom pymodbus.exceptions import ModbusIOException, NotImplementedException\nfrom pymodbus.exceptions import InvalidMessageRecei...
diff --git a/pymodbus/transaction.py b/pymodbus/transaction.py index bf94d23ba..cb0f55bcf 100644 --- a/pymodbus/transaction.py +++ b/pymodbus/transaction.py @@ -247,11 +247,12 @@ def _retry_transaction(self, retries, reason, time.sleep(delay) _logger.debug("Sleeping {}".format(delay)) ...
open-mmlab__mmsegmentation-261
an unexpected keyword argument 'drop_out_ratio' when using config file ocrnet_r50-d8.py **Describe the bug** It seems that there is a small error in the config file: https://github.com/open-mmlab/mmsegmentation/blob/381eacb9a5e0e8eb475e456845f1d4c55f3c0339/configs/_base_/models/ocrnet_r50-d8.py#L26 and https://g...
[ { "content": "# model settings\nnorm_cfg = dict(type='SyncBN', requires_grad=True)\nmodel = dict(\n type='CascadeEncoderDecoder',\n num_stages=2,\n pretrained='open-mmlab://resnet50_v1c',\n backbone=dict(\n type='ResNetV1c',\n depth=50,\n num_stages=4,\n out_indices=(0, 1...
[ { "content": "# model settings\nnorm_cfg = dict(type='SyncBN', requires_grad=True)\nmodel = dict(\n type='CascadeEncoderDecoder',\n num_stages=2,\n pretrained='open-mmlab://resnet50_v1c',\n backbone=dict(\n type='ResNetV1c',\n depth=50,\n num_stages=4,\n out_indices=(0, 1...
diff --git a/configs/_base_/models/ocrnet_r50-d8.py b/configs/_base_/models/ocrnet_r50-d8.py index 52fe060b1e..0f5ff956c0 100644 --- a/configs/_base_/models/ocrnet_r50-d8.py +++ b/configs/_base_/models/ocrnet_r50-d8.py @@ -23,7 +23,7 @@ channels=256, num_convs=1, concat_input=Fals...
MongoEngine__mongoengine-1858
select_related() ConnectionError Hi, I am having an interesting situation. We have been using MongoEngine in our project for a good few years now and this issue appeared out of nowhere (no update, no change to the code). Calling `select_related()` on the results of a query raises a `mongoengine.connection.Connec...
[ { "content": "from bson import DBRef, SON\nimport six\n\nfrom mongoengine.base import (BaseDict, BaseList, EmbeddedDocumentList,\n TopLevelDocumentMetaclass, get_document)\nfrom mongoengine.base.datastructures import LazyReference\nfrom mongoengine.connection import get_db\nfrom mon...
[ { "content": "from bson import DBRef, SON\nimport six\n\nfrom mongoengine.base import (BaseDict, BaseList, EmbeddedDocumentList,\n TopLevelDocumentMetaclass, get_document)\nfrom mongoengine.base.datastructures import LazyReference\nfrom mongoengine.connection import get_db\nfrom mon...
diff --git a/mongoengine/dereference.py b/mongoengine/dereference.py index 18b365ccd..40bc72b21 100644 --- a/mongoengine/dereference.py +++ b/mongoengine/dereference.py @@ -133,7 +133,12 @@ def _fetch_objects(self, doc_type=None): """ object_map = {} for collection, dbrefs in self.reference_m...
matrix-org__synapse-11890
Federation dying with `AttributeError: 'dict' object has no attribute 'edu_type'` or `... no attribute 'content'` ### Description After upgrading my homeserver to 1.51.0 yesterday, I noticed people on other homeservers weren't responding to my messages. On the receiving side some messages were getting through to me,...
[ { "content": "# Copyright 2021 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# ...
[ { "content": "# Copyright 2021 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# ...
diff --git a/changelog.d/11890.bugfix b/changelog.d/11890.bugfix new file mode 100644 index 000000000000..6b696692e332 --- /dev/null +++ b/changelog.d/11890.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in Synapse 1.51.0rc1 where incoming federation transactions containing at least one EDU would be dropped if debug loggin...
liqd__adhocracy4-893
django-admin: place comment's is_blocked next to is_censored **URL:** **user:** **expected behaviour:** As is_removed, is_censored and is_blocked have a very similar behaviour, the is_blocked field should be next to the first two fields. In the detail as well as in the list view **behaviour:** **important screen...
[ { "content": "from django.contrib import admin\n\nfrom .models import Comment\n\n\n@admin.register(Comment)\nclass CommentAdmin(admin.ModelAdmin):\n fields = (\n 'content_type', 'content_object', 'comment', 'is_removed',\n 'is_censored', 'is_moderator_marked', 'creator', 'comment_categories',\n...
[ { "content": "from django.contrib import admin\n\nfrom .models import Comment\n\n\n@admin.register(Comment)\nclass CommentAdmin(admin.ModelAdmin):\n fields = (\n 'content_type', 'content_object', 'comment', 'is_removed',\n 'is_censored', 'is_blocked', 'is_moderator_marked',\n 'creator', ...
diff --git a/adhocracy4/comments/admin.py b/adhocracy4/comments/admin.py index 93244a84e..2c027c3e4 100644 --- a/adhocracy4/comments/admin.py +++ b/adhocracy4/comments/admin.py @@ -7,13 +7,13 @@ class CommentAdmin(admin.ModelAdmin): fields = ( 'content_type', 'content_object', 'comment', 'is_removed', - ...
python-poetry__poetry-289
CLI help for install is ambiguous <!-- Checked checkbox should look like this: [x] --> - [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version. - [x] I have searched the [issues](https://github.com/sdispater/poetry/issues) of this repo and believe that this is not a duplicate. ...
[ { "content": "from .venv_command import VenvCommand\n\n\nclass InstallCommand(VenvCommand):\n \"\"\"\n Installs the project dependencies.\n\n install\n { --no-dev : Do not install dev dependencies. }\n { --dry-run : Outputs the operations but will not execute anything\n ...
[ { "content": "from .venv_command import VenvCommand\n\n\nclass InstallCommand(VenvCommand):\n \"\"\"\n Installs the project dependencies.\n\n install\n { --no-dev : Do not install dev dependencies. }\n { --dry-run : Outputs the operations but will not execute anything\n ...
diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py index 067cf4e5735..1d2031c07b5 100644 --- a/poetry/console/commands/install.py +++ b/poetry/console/commands/install.py @@ -13,12 +13,12 @@ class InstallCommand(VenvCommand): { --develop=* : Install given packages in developme...
codespell-project__codespell-1889
Add a way to ignore line endings when matching lines from `--exclude-file` This can be especially when repository is used on Windows with git's `core.autocrlf` set to `true` as then some files can have CRLF line endings locally even though they're checked out into git with LF endings. This mixing can therefore cause `c...
[ { "content": "#\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; version 2 of the License.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARR...
[ { "content": "#\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; version 2 of the License.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARR...
diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index 7be5e7fa13..f914c07fc1 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -628,7 +628,7 @@ def parse_ignore_words_option(ignore_words_option: List[str]) -> Set[str]: def build_exclude_hashes(filename: str, exclude_l...
Cloud-CV__EvalAI-1276
Disable the Challenge Phase buttons which are inactive while making submissions ## Observed Behaviour Currently, if a challenge phase is inactive then also a participant can select the phase to make submissions. See screenshot for example: <img width="1440" alt="screen shot 2017-08-08 at 7 21 16 pm" src="https://...
[ { "content": "from django.contrib.auth.models import User\n\nfrom rest_framework import serializers\n\nfrom challenges.serializers import ChallengeSerializer\nfrom .models import (Participant, ParticipantTeam)\n\n\nclass ParticipantTeamSerializer(serializers.ModelSerializer):\n \"\"\"Serializer class to map ...
[ { "content": "from django.contrib.auth.models import User\nfrom django.utils import timezone\n\nfrom rest_framework import serializers\n\nfrom challenges.serializers import ChallengeSerializer\nfrom .models import (Participant, ParticipantTeam)\n\n\nclass ParticipantTeamSerializer(serializers.ModelSerializer):\...
diff --git a/apps/participants/serializers.py b/apps/participants/serializers.py index e9c6bfda6b..b328049b9c 100644 --- a/apps/participants/serializers.py +++ b/apps/participants/serializers.py @@ -1,4 +1,5 @@ from django.contrib.auth.models import User +from django.utils import timezone from rest_framework import...
getsentry__sentry-python-143
Package not classified as Python 3 compatible * `sentry-sdk` is classified as not Python 3 compatible by [pyup](https://pyup.io) when it actually is - e.g. [https://pyup.io/repos/github/pushresume/backend](https://pyup.io/repos/github/pushresume/backend) ![image](https://user-images.githubusercontent.com/19856859/4...
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nSentry-Python - Sentry SDK for Python\n=====================================\n\n**Sentry-Python is an experimental SDK for Sentry.** Check out `GitHub\n<https://github.com/getsentry/sentry-python>`_ to find out more.\n\"\"\"\n\nfrom setuptools import setup, find_pa...
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nSentry-Python - Sentry SDK for Python\n=====================================\n\n**Sentry-Python is an experimental SDK for Sentry.** Check out `GitHub\n<https://github.com/getsentry/sentry-python>`_ to find out more.\n\"\"\"\n\nfrom setuptools import setup, find_pa...
diff --git a/setup.py b/setup.py index dfd0a72abf..3d43dc36c1 100644 --- a/setup.py +++ b/setup.py @@ -23,4 +23,20 @@ license="BSD", install_requires=["urllib3", "certifi"], extras_require={"flask": ["flask>=0.8", "blinker>=1.1"]}, + classifiers=[ + 'Development Status :: 5 - Production/Stable'...
mesonbuild__meson-9532
[regression] String formatting has regressed since 0.60. ERROR: Format placeholder @9@ out of range. **Describe the bug** There is a regression of as yet unknown cause in Meson's string formatting, as discovered by @alex3kov and diagnosed by myself at libsixel/libsixel#50. This regression causes previously building pa...
[ { "content": "# Copyright 2021 The Meson development team\n# SPDX-license-identifier: Apache-2.0\n\nimport re\nimport os\nfrom pathlib import PurePath\n\nimport typing as T\n\nfrom ...mesonlib import version_compare\nfrom ...interpreterbase import (\n ObjectHolder,\n MesonOperator,\n FeatureNew,\n t...
[ { "content": "# Copyright 2021 The Meson development team\n# SPDX-license-identifier: Apache-2.0\n\nimport re\nimport os\nfrom pathlib import PurePath\n\nimport typing as T\n\nfrom ...mesonlib import version_compare\nfrom ...interpreterbase import (\n ObjectHolder,\n MesonOperator,\n FeatureNew,\n t...
diff --git a/mesonbuild/interpreter/primitives/string.py b/mesonbuild/interpreter/primitives/string.py index 3f8df5eb70ea..a5fc9920275d 100644 --- a/mesonbuild/interpreter/primitives/string.py +++ b/mesonbuild/interpreter/primitives/string.py @@ -13,6 +13,7 @@ MesonOperator, FeatureNew, typed_operator, +...
Project-MONAI__MONAI-1224
Can't save classification result if "info" is empty in meta_data **Describe the bug** A clear and concise description of what the bug is. Thanks @madil90 for raising this issue. Most of the PNG images don't have `info` field in the metadata, and we saved an empty {} in metadata. But PyTorch `collate_fn` can't colla...
[ { "content": "# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable l...
[ { "content": "# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable l...
diff --git a/monai/data/image_reader.py b/monai/data/image_reader.py index 01351c2319..ab89e9ef49 100644 --- a/monai/data/image_reader.py +++ b/monai/data/image_reader.py @@ -579,7 +579,6 @@ def _get_meta_dict(self, img) -> Dict: meta["mode"] = img.mode meta["width"] = img.width meta["height"...
scikit-image__scikit-image-4662
data_dir always falling back to legacy_data_dir ## Description I'm not sure if I'm misunderstanding how I'm supposed to access the new pooch-handled data... but it seems that if all goes according to plan with the download in `data.__init__`, the `data_dir` variable will always fall back on the `legacy_data_dir`. (...
[ { "content": "\"\"\"Standard test images.\n\nFor more images, see\n\n - http://sipi.usc.edu/database/database.php\n\n\"\"\"\n\nimport warnings\nfrom warnings import warn\nimport numpy as np\nimport shutil\n\nfrom distutils.version import LooseVersion as Version\n\nfrom ..util.dtype import img_as_bool\nfrom ._bi...
[ { "content": "\"\"\"Standard test images.\n\nFor more images, see\n\n - http://sipi.usc.edu/database/database.php\n\n\"\"\"\n\nimport warnings\nfrom warnings import warn\nimport numpy as np\nimport shutil\n\nfrom distutils.version import LooseVersion as Version\n\nfrom ..util.dtype import img_as_bool\nfrom ._bi...
diff --git a/skimage/data/__init__.py b/skimage/data/__init__.py index ce458611b5d..c25aa929c1d 100644 --- a/skimage/data/__init__.py +++ b/skimage/data/__init__.py @@ -54,8 +54,7 @@ 'shepp_logan_phantom', 'stereo_motorcycle'] -legacy_data_dir = osp.abspath(osp.dirname(__file__)) -skimage_dist...
django-cms__django-filer-1165
Fixes value error when folder is empty Also makes sure the spacing is correct between button and text: ![image](https://user-images.githubusercontent.com/270307/67758686-70dda100-fa3e-11e9-8805-40fe04d90785.png) Fixes #1165
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport warnings\n\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import ...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport warnings\n\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import ...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4ceccca53..2f29c5f3f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,7 @@ CHANGELOG * Added management command ``filer_check`` to check the integrity of the database against the file system, and vice versa. * Add jQuery as AdminFileWidget Media dependenc...
cal-itp__benefits-2040
New `User enrollment error` page ![image](https://github.com/cal-itp/benefits/assets/25497886/22e984b8-ecb1-4f25-a9ce-c7a3eed5c5b0) ## Acceptance Criteria <!-- Remember to consider edge cases --> - [x] Headline copy updated - [x] Body copy updated - [x] 24px spacing between icon, headline, body, and agency...
[ { "content": "\"\"\"\nThe enrollment application: view definitions for the benefits enrollment flow.\n\"\"\"\n\nimport logging\nfrom datetime import timedelta\n\nfrom django.http import JsonResponse\nfrom django.template.response import TemplateResponse\nfrom django.urls import reverse\nfrom django.utils import...
[ { "content": "\"\"\"\nThe enrollment application: view definitions for the benefits enrollment flow.\n\"\"\"\n\nimport logging\nfrom datetime import timedelta\n\nfrom django.http import JsonResponse\nfrom django.template.response import TemplateResponse\nfrom django.urls import reverse\nfrom django.utils import...
diff --git a/benefits/enrollment/templates/enrollment/retry.html b/benefits/enrollment/templates/enrollment/retry.html index 4efb402f8d..53d1941bae 100644 --- a/benefits/enrollment/templates/enrollment/retry.html +++ b/benefits/enrollment/templates/enrollment/retry.html @@ -12,13 +12,13 @@ <div class="container"> ...
beetbox__beets-1061
Allow plugins to define the same flexible fields if they are of the same type It should be possible for plugins to define the same flexible fields if they are of the same type. At the moment lastfmimport and mpdstats define 'play_count' which leads to: `beets.plugins.PluginConflictException: Plugin mpdstats defines f...
[ { "content": "# This file is part of beets.\n# Copyright 2013, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita...
[ { "content": "# This file is part of beets.\n# Copyright 2013, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita...
diff --git a/beets/plugins.py b/beets/plugins.py index a4205e10df..2b68f2d02e 100755 --- a/beets/plugins.py +++ b/beets/plugins.py @@ -262,12 +262,11 @@ def types(model_cls): for plugin in find_plugins(): plugin_types = getattr(plugin, attr_name, {}) for field in plugin_types: - if fie...
aws-cloudformation__cfn-lint-963
W2030 Default value required on conditionally included property *cfn-lint version: 0.21.3* CloudFormation provides the AWS::NoValue pseudo-parameter, which allows for a property to be included based on a given Condition. However, cfn-lint will still validate the potential value provided for the property, even if it ...
[ { "content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
[ { "content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
diff --git a/src/cfnlint/rules/parameters/AllowedValue.py b/src/cfnlint/rules/parameters/AllowedValue.py index 0fc2df942b..7f72b38ac2 100644 --- a/src/cfnlint/rules/parameters/AllowedValue.py +++ b/src/cfnlint/rules/parameters/AllowedValue.py @@ -36,10 +36,14 @@ def initialize(self, cfn): for property_type_spe...
tornadoweb__tornado-1720
Incorrect response for invalid Content-Length header Tornado responds with status 500 when gets non decimal characters in Content-Length header. Environment: Ubuntu 14.04 Python 3.4.3 Tornado 4.3 Logged error message: ``` [ERROR] tornado.general: Uncaught exception Traceback (most recent call last): File "/usr/lo...
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2014 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2014 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
diff --git a/tornado/http1connection.py b/tornado/http1connection.py index 8194f91436..43034c6b50 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -540,7 +540,13 @@ def _read_body(self, code, headers, delegate): "Multiple unequal Content-Lengths: %r" % ...
litestar-org__litestar-2716
Bug: incorrect message in ValidationException when multiple errors occured ### Description When there is more than one validation issue detected, the message describing the problem for each parameter is the same. In my case, I have rules as `a > 5` and `b < 5` but I get: ```json { "status_code": 400, ...
[ { "content": "# ruff: noqa: UP006, UP007\nfrom __future__ import annotations\n\nimport re\nfrom functools import partial\nfrom pathlib import Path, PurePath\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ClassVar,\n Dict,\n Literal,\n Optional,\n Sequence,\n Set,\n Typ...
[ { "content": "# ruff: noqa: UP006, UP007\nfrom __future__ import annotations\n\nimport re\nfrom functools import partial\nfrom pathlib import Path, PurePath\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ClassVar,\n Dict,\n Literal,\n Optional,\n Sequence,\n Set,\n Typ...
diff --git a/litestar/_signature/model.py b/litestar/_signature/model.py index 0e37ac0d3e..94b4c6742f 100644 --- a/litestar/_signature/model.py +++ b/litestar/_signature/model.py @@ -198,7 +198,7 @@ def parse_values_from_connection_kwargs(cls, connection: ASGIConnection, **kwarg for field_name, exc in cls....
networkx__networkx-2136
relabel_nodes adds a graph attribute when copy=True I would have expected the following to work: ``` import networkx as nx graph_a = nx.DiGraph() graph_b = nx.relabel_nodes(graph_a, {}, copy=True) print "graph_a.graph", graph_a.graph print "graph_b.graph", graph_b.graph assert graph_a.graph == graph_b.graph ``` Howev...
[ { "content": "# Copyright (C) 2006-2013 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\nimport networkx as nx\n__author__ = \"\"\"\\n\"\"\".join(['Aric Hagberg <aric.hagberg@gmail.com>',\n ...
[ { "content": "# Copyright (C) 2006-2013 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\nimport networkx as nx\n__author__ = \"\"\"\\n\"\"\".join(['Aric Hagberg <aric.hagberg@gmail.com>',\n ...
diff --git a/networkx/readwrite/gml.py b/networkx/readwrite/gml.py index b6ab5e9ebc4..af8db1d0023 100644 --- a/networkx/readwrite/gml.py +++ b/networkx/readwrite/gml.py @@ -435,10 +435,6 @@ def pop_attr(dct, category, attr, i): if label != 'id': G = nx.relabel_nodes(G, mapping) - if 'name' in gra...
benoitc__gunicorn-1931
Must explicitly define `setuptools` as a dependency When running gunicorn in a hardened Python docker image (with most of the dependencies removed) `setuptools` might be missing. For instance: ``` Traceback (most recent call last): File "/app/manage-docker.binary.runfiles/__main__/server.py", line 1, in <modu...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\n\nfrom gunicorn import __version__\n\n...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\n\nfrom gunicorn import __version__\n\n...
diff --git a/setup.py b/setup.py index f7e5d5260..19e85c94c 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,14 @@ def run_tests(self): sys.exit(errno) +install_requires = [ + # We depend on functioning pkg_resources.working_set.add_entry() and + # pkg_resources.load_entry_point(). These both work a...
spacetelescope__jwql-419
Make JWQL pip installable Currently our `jwql` package is only installable by cloning the repository and running `setup.py`. It would be easier for users (and perhaps easier for us when distributing our code (#294)) if it were also uploaded to PyPI and `pip` installable.
[ { "content": "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.20.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.20.0'\n\nAUTHORS = 'Matthew Bourque, Lauren Chambers, Misty Cracraft, Joe Filippazzo, Bryan Hilbert, '\nAUTHORS += 'Graham Kanarek, Catherine Martlin, Johannes Sahlmann'\n\nDESCRIPTION = 'The Jam...
diff --git a/Jenkinsfile b/Jenkinsfile index 2f0c00fad..84bf708e9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,35 +5,37 @@ matrix_os = ["linux-stable"] matrix_python = ["3.5", "3.6"] matrix = [] -withCredentials([string( - credentialsId: 'jwql-codecov', - variable: 'codecov_token')]) { +withCredentials([ ...
fail2ban__fail2ban-918
asyncore: (9, 'Bad file descriptor') ``` Testing using /usr/bin/python2.6 Fail2ban 0.8.8 test suite. Python 2.6.8 (unknown, Jan 26 2013, 14:35:25) [GCC 4.7.2]. Please wait... .........................................Exception in thread Thread-61: Traceback (most recent call last): File "/usr/lib/python2.6/threading.p...
[ { "content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-\n# vi: set ft=python sts=4 ts=4 sw=4 noet :\n\n# This file is part of Fail2Ban.\n#\n# Fail2Ban 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# ...
[ { "content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-\n# vi: set ft=python sts=4 ts=4 sw=4 noet :\n\n# This file is part of Fail2Ban.\n#\n# Fail2Ban 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# ...
diff --git a/fail2ban/server/asyncserver.py b/fail2ban/server/asyncserver.py index a54d41a1df..c99cdffe07 100644 --- a/fail2ban/server/asyncserver.py +++ b/fail2ban/server/asyncserver.py @@ -149,8 +149,11 @@ def start(self, sock, force): self.__init = True # TODO Add try..catch # There's a bug report for Pytho...
pulp__pulpcore-3794
Remove `BaseDistribution` from the plugin API We tried to do this once before but there were migration issues perhaps? edit: See comment below > Maybe we just update the docstring with info that it can't be removed until Pulp4. and use this issue for that .misc change.
[ { "content": "import hashlib\nimport os\nimport re\nfrom datetime import timedelta\nfrom url_normalize import url_normalize\nfrom urllib.parse import urlparse, urljoin\n\nfrom aiohttp.web_exceptions import HTTPNotFound\n\nfrom django.conf import settings\nfrom django.contrib.postgres.fields import HStoreField\n...
[ { "content": "import hashlib\nimport os\nimport re\nfrom datetime import timedelta\nfrom url_normalize import url_normalize\nfrom urllib.parse import urlparse, urljoin\n\nfrom aiohttp.web_exceptions import HTTPNotFound\n\nfrom django.conf import settings\nfrom django.contrib.postgres.fields import HStoreField\n...
diff --git a/CHANGES/2993.misc b/CHANGES/2993.misc new file mode 100644 index 0000000000..271b880393 --- /dev/null +++ b/CHANGES/2993.misc @@ -0,0 +1 @@ +Added a note about removing the ``BaseDistribution`` class. diff --git a/pulpcore/app/models/publication.py b/pulpcore/app/models/publication.py index f150f3ed63..7f0...
ray-project__ray-6571
[tune] Ray Tune fails to parse typing hints of the function for experiment ### What is the problem? If the function for experiment has a [typing hint](https://docs.python.org/3/library/typing.html) for its argument `config`, then Ray Tune fails to parse the argument and assumes that there is a reporter signature. The ...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport logging\nimport time\nimport inspect\nimport threading\nimport traceback\nfrom six.moves import queue\n\nfrom ray.tune import track\nfrom ray.tune import TuneError\nfrom ray.tun...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport logging\nimport time\nimport inspect\nimport threading\nimport traceback\nimport sys\nfrom six.moves import queue\n\nfrom ray.tune import track\nfrom ray.tune import TuneError\n...
diff --git a/docker/tune_test/Dockerfile b/docker/tune_test/Dockerfile index c90245cd28104..b0d3eaf4d7749 100644 --- a/docker/tune_test/Dockerfile +++ b/docker/tune_test/Dockerfile @@ -6,7 +6,7 @@ FROM ray-project/base-deps # a test runner. RUN conda install -y numpy RUN pip install -U pip -RUN pip install -U https:...
freedomofpress__securedrop-634
Inconsistent use of "codename" vs "code name" We should use either "codename" or "code name" consistently throughout. For example: - on http://localhost:8080/generate it says “remember this code” - on /generate it says "we're assigning you a unique code name.” - on /generate it says “already have a codename?” - on /log...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro...
diff --git a/changelog.md b/changelog.md index e62e341f6f..b290d07ccd 100644 --- a/changelog.md +++ b/changelog.md @@ -92,7 +92,7 @@ functions (ex: storing codenames) * Wrote detailed documentation * Improved installation process * Wrote unit & integration tests -* Improved code name wordlist, based on Diceware +* I...
Zeroto521__my-data-toolkit-559
DEP: Drop `inplace` for `drop_inf`, no more `inplace` <!-- 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": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.util._validators import validate_bool_kwarg\n\nfrom dtoolkit.accessor.dataframe import boolean # noqa\nfrom dtoolkit.accessor.register import register_dataframe_method\nf...
[ { "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.util._validators import validate_bool_kwarg\n\nfrom dtoolkit.accessor.dataframe import boolean # noqa\nfrom dtoolkit.accessor.register import register_dataframe_method\nf...
diff --git a/dtoolkit/accessor/dataframe/drop_inf.py b/dtoolkit/accessor/dataframe/drop_inf.py index d2e4199c5..78aef56e2 100644 --- a/dtoolkit/accessor/dataframe/drop_inf.py +++ b/dtoolkit/accessor/dataframe/drop_inf.py @@ -63,6 +63,10 @@ def drop_inf( inplace : bool, default False If True, do operation ...
liqd__a4-meinberlin-2610
preview in text commenting does not work URL: https://meinberlin-dev.liqd.net/dashboard/projects/textkommentierung/basic/ user: initiator expected behaviour: should be able to see preview behaviour: get 405 error Comment/Question: I checked brainstorming and it works. After I enter content for the document it also ...
[ { "content": "from django.http import Http404\nfrom django.urls import reverse\nfrom django.utils.functional import cached_property\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.views import generic\n\nfrom adhocracy4.dashboard import mixins as dashboard_mixins\nfrom adhocracy4.projects....
[ { "content": "from django.urls import reverse\nfrom django.utils.functional import cached_property\nfrom django.views import generic\n\nfrom adhocracy4.dashboard import mixins as dashboard_mixins\nfrom adhocracy4.projects.mixins import DisplayProjectOrModuleMixin\nfrom adhocracy4.projects.mixins import ProjectM...
diff --git a/meinberlin/apps/documents/templates/meinberlin_documents/chapter_detail.html b/meinberlin/apps/documents/templates/meinberlin_documents/chapter_detail.html index 2ceb5f35d3..021aad22cd 100644 --- a/meinberlin/apps/documents/templates/meinberlin_documents/chapter_detail.html +++ b/meinberlin/apps/documents/...
Pyomo__pyomo-2007
Iterators in IndexedComponent In making Egret fully Pyomo 6 compatible grid-parity-exchange/Egret/pull/232, I noticed an incongruity and potential performance issue in `IndexedComponent`: https://github.com/Pyomo/pyomo/blob/acfe56514961bde3e68c781b1620387ae17d7bc1/pyomo/core/base/indexed_component.py#L361-L371 Th...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin...
diff --git a/pyomo/core/base/indexed_component.py b/pyomo/core/base/indexed_component.py index f38a968e714..0803e8e7c0b 100644 --- a/pyomo/core/base/indexed_component.py +++ b/pyomo/core/base/indexed_component.py @@ -360,15 +360,17 @@ def iteritems(self): def keys(self): """Return an iterator of the key...
TencentBlueKing__bk-user-410
[优化] HTTP API 数据源同步报错 对应API 没有按照要求, 返回`count/results`, 此时取空 实际上这里的逻辑会`results`的第一条, 处理; 但是没有很好地校验 会报错 ``` Task bkuser_core.categories.tasks.adapter_sync[78744136-5e83-4605-8503-d4d8ed90f9e3] raised unexpected: IndexError('list index out of range',) Traceback (most recent call last): File "/usr/local/lib/p...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nTencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.\nCopyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.\nLicensed under the MIT License (the \"License\"); you may not use this file ex...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nTencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.\nCopyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.\nLicensed under the MIT License (the \"License\"); you may not use this file ex...
diff --git a/src/api/bkuser_core/categories/plugins/custom/client.py b/src/api/bkuser_core/categories/plugins/custom/client.py index 840f2de3e..a338517fa 100644 --- a/src/api/bkuser_core/categories/plugins/custom/client.py +++ b/src/api/bkuser_core/categories/plugins/custom/client.py @@ -72,6 +72,12 @@ def _fetch_items...
matrix-org__synapse-7104
2/3 of non-email push notifications seem to not go through (it might be email as well but we don't have enough stats for them) We've received report that some users weren't receiving push notifications either via email or on their devices (i.e. via APNS or FCM). The graph for HTTP push (the latter category) on matri...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 New Vector Ltd\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#...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 New Vector Ltd\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#...
diff --git a/changelog.d/7104.misc b/changelog.d/7104.misc new file mode 100644 index 000000000000..ec5c004bbed0 --- /dev/null +++ b/changelog.d/7104.misc @@ -0,0 +1 @@ +Merge worker apps together. diff --git a/synapse/app/_base.py b/synapse/app/_base.py index 9ffd23c6df37..4d84f4595a58 100644 --- a/synapse/app/_base.p...
microsoft__torchgeo-467
Sampling from custom object detection dataset Hi all. Thanks a lot for this library... I am really looking forward to integrating it into my workflow. I am trying to sample from my own multiclass object detection dataset. I have a set of large raster images (geotiffs) and polygons in a geojson. All the source data i...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"Base classes for all :mod:`torchgeo` datasets.\"\"\"\n\nimport abc\nimport functools\nimport glob\nimport os\nimport re\nimport sys\nfrom typing import Any, Callable, Dict, List, Optional, Seque...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"Base classes for all :mod:`torchgeo` datasets.\"\"\"\n\nimport abc\nimport functools\nimport glob\nimport os\nimport re\nimport sys\nfrom typing import Any, Callable, Dict, List, Optional, Seque...
diff --git a/tests/data/vector/data.py b/tests/data/vector/data.py new file mode 100755 index 00000000000..97bdb902e9b --- /dev/null +++ b/tests/data/vector/data.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 + +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import json +...
pyca__cryptography-2445
cryptography.x509.Name implements __eq__ but not __hash__
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\...
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b64a0d18455e..08ac109370a2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Changelog * Add support for AES key wrapping with :func:`~cryptography.hazmat.primitives.keywrap.aes_key_wrap` and :func:`~cryptography.hazmat.primitives.keywrap.aes_key_un...
ansible-collections__community.general-1958
ZFS tries to change immutable attributes ##### SUMMARY Module `zfs` tries to set immutable attributes like `volblocksize`. Seems to be a regression, see [ansible/ansible-modules-extras#769](https://github.com/ansible/ansible-modules-extras/issues/769) and [ansible/ansible-modules-extras#1378](https://github.com/ansi...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>\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, pri...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>\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, pri...
diff --git a/changelogs/fragments/1833-zfs-creation-only-properties.yaml b/changelogs/fragments/1833-zfs-creation-only-properties.yaml new file mode 100644 index 00000000000..deb972a6d2e --- /dev/null +++ b/changelogs/fragments/1833-zfs-creation-only-properties.yaml @@ -0,0 +1,2 @@ +bugfixes: + - zfs - some ZFS proper...
openstates__openstates-scrapers-2814
TX: No vote data for v2 API State: TX There is no vote data being returned for TX bills/resolutions for the 86 session in the v2 API. I am opening this issue because it is specific to the latest API, and previous issues were specific to the v1 API. I would like to have a conversation with someone from open-state...
[ { "content": "from pupa.scrape import Jurisdiction, Organization\n\nfrom openstates.utils import url_xpath\nfrom .bills import TXBillScraper\n# from .committees import TXCommitteeScraper\n# from .events import TXEventScraper\nfrom .people import TXPersonScraper\n# from .votes import TXVoteScraper\n\n\nclass Tex...
[ { "content": "from pupa.scrape import Jurisdiction, Organization\n\nfrom openstates.utils import url_xpath\nfrom .bills import TXBillScraper\n# from .committees import TXCommitteeScraper\n# from .events import TXEventScraper\nfrom .people import TXPersonScraper\nfrom .votes import TXVoteScraper\n\n\nclass Texas...
diff --git a/openstates/tx/__init__.py b/openstates/tx/__init__.py index e1c544d55a..fd96fa107c 100644 --- a/openstates/tx/__init__.py +++ b/openstates/tx/__init__.py @@ -5,7 +5,7 @@ # from .committees import TXCommitteeScraper # from .events import TXEventScraper from .people import TXPersonScraper -# from .votes i...
pymeasure__pymeasure-547
Python 3.10: ManagedWindow TypeError Hi all, I am trying to use pymeasure for the first time. But when running the example "ManagedWindow" I get the following error message as soon as I press the "queue" button in the GUI and nothing will be plotted. ``` -----------------------------------------------------------...
[ { "content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2021 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restr...
[ { "content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2021 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restr...
diff --git a/.github/workflows/pymeasure_CI.yml b/.github/workflows/pymeasure_CI.yml index 616eed8404..4ccf94c75d 100644 --- a/.github/workflows/pymeasure_CI.yml +++ b/.github/workflows/pymeasure_CI.yml @@ -25,7 +25,7 @@ jobs: - name: Install pymeasure requirements uses: conda-incubator/setup-miniconda@...
google__pytype-520
pytype can't parse hex literals The following code causes the error `ParseError: syntax error, unexpected NAME, expecting ']'`: ```py from typing import Literal a: Literal[0x00ff] ``` Add lexing for base 2, 8, and 16 literals Alters lexer.lex and adds a test for the new numeric types, Closes #494
[ { "content": "# Lint as: python2, python3\n\"\"\"Source and trace information.\"\"\"\n\nfrom __future__ import print_function\nimport collections\n\nLocation = collections.namedtuple(\"Location\", (\"line\", \"column\"))\n\n\nclass AbstractTrace(\n collections.namedtuple(\"AbstractTrace\", (\"op\", \"symbol\...
[ { "content": "# Lint as: python2, python3\n\"\"\"Source and trace information.\"\"\"\n\nfrom __future__ import print_function\nimport collections\n\nfrom pytype import compat\n\n\nLocation = collections.namedtuple(\"Location\", (\"line\", \"column\"))\n\n\nclass AbstractTrace(\n collections.namedtuple(\"Abst...
diff --git a/pytype/pyi/lexer.lex b/pytype/pyi/lexer.lex index 8841586ef..6e5f804ca 100644 --- a/pytype/pyi/lexer.lex +++ b/pytype/pyi/lexer.lex @@ -119,6 +119,18 @@ typedef pytype::parser::token t; yylval->obj=PyInt_FromString(yytext, NULL, 10); return t::NUMBER; } +[-+]?0b[01]+ { + yylval->obj=PyInt_FromStri...
kivy__kivy-4045
WM touch/pen warning messages after 1.9.1 ``` [WARNING ] [Input ] WM_Touch/WM_Pen not supported by your version of Windows [WARNING ] [Base ] Unknown <wm_touch> provider [WARNING ] [Base ] Unknown <wm_pen> provider ```
[ { "content": "'''\nSupport for WM_TOUCH messages (Windows platform)\n================================================\n'''\n\n__all__ = ('WM_MotionEventProvider', 'WM_MotionEvent')\n\nimport os\nfrom kivy.input.providers.wm_common import (\n WM_TABLET_QUERYSYSTEMGESTURE,\n GWL_WNDPROC, QUERYSYSTEMGESTURE_...
[ { "content": "'''\nSupport for WM_TOUCH messages (Windows platform)\n================================================\n'''\n\n__all__ = ('WM_MotionEventProvider', 'WM_MotionEvent')\n\nimport os\nfrom kivy.input.providers.wm_common import (\n WM_TABLET_QUERYSYSTEMGESTURE,\n GWL_WNDPROC, QUERYSYSTEMGESTURE_...
diff --git a/kivy/input/providers/wm_touch.py b/kivy/input/providers/wm_touch.py index 71e8c0400e..73f25e7a17 100644 --- a/kivy/input/providers/wm_touch.py +++ b/kivy/input/providers/wm_touch.py @@ -14,7 +14,8 @@ TOUCHEVENTF_MOVE, SM_CYCAPTION) from kivy.input.motionevent import MotionEvent from kivy.input.shape...
AlexsLemonade__refinebio-1343
Email: Link 'Download' to dataset page instead of S3 ### Context Loosely related to https://github.com/AlexsLemonade/refinebio-frontend/issues/633#issuecomment-491928496 ### Problem or idea When the user receives the email with the dataset, the 'Download Now' button links to the S3 bucket. If the dataset is expi...
[ { "content": "# -*- coding: utf-8 -*-\n\nimport boto3\nimport csv\nimport os\nimport rpy2\nimport rpy2.robjects as ro\nimport shutil\nimport simplejson as json\nimport string\nimport warnings\n\nfrom botocore.exceptions import ClientError\nfrom datetime import datetime, timedelta\nfrom django.conf import settin...
[ { "content": "# -*- coding: utf-8 -*-\n\nimport boto3\nimport csv\nimport os\nimport rpy2\nimport rpy2.robjects as ro\nimport shutil\nimport simplejson as json\nimport string\nimport warnings\n\nfrom botocore.exceptions import ClientError\nfrom datetime import datetime, timedelta\nfrom django.conf import settin...
diff --git a/workers/data_refinery_workers/processors/smasher.py b/workers/data_refinery_workers/processors/smasher.py index e2396cb6f..f231041ef 100644 --- a/workers/data_refinery_workers/processors/smasher.py +++ b/workers/data_refinery_workers/processors/smasher.py @@ -934,8 +934,8 @@ def _notify(job_context: Dict) ...
biopython__biopython-3308
parse_pdb_header() fails to collect missing all residues from REMARK 465 lines; misses negative numbered ### Setup I am reporting a problem with Biopython version 1.78. Biopython version, Python version, and operating system where happened to be running as follows: ```bash 3.7.8 | packaged by conda-forge | (d...
[ { "content": "#!/usr/bin/env python\n# Copyright 2004 Kristian Rother.\n# Revisions copyright 2004 Thomas Hamelryck.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that sh...
[ { "content": "#!/usr/bin/env python\n# Copyright 2004 Kristian Rother.\n# Revisions copyright 2004 Thomas Hamelryck.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that sh...
diff --git a/Bio/PDB/parse_pdb_header.py b/Bio/PDB/parse_pdb_header.py index 10c9f1a5d1e..4827b7f13c5 100644 --- a/Bio/PDB/parse_pdb_header.py +++ b/Bio/PDB/parse_pdb_header.py @@ -150,7 +150,7 @@ def _parse_remark_465(line): (\d+\s[\sA-Z][\sA-Z][A-Z] | # Either model number + residue name [A-Z]...
python-discord__bot-1205
Bug: ` chars are not escaped when parsing !source ![Screenshot](https://arse.ee/zi7A9lec.png) When responding to faulty `!source` commands, the backticks aren't escaped and a formatting issue occurs. This _might_ lead to being able to ping roles/users, should Discord ever decide to change the embed ping behavior....
[ { "content": "import inspect\nfrom pathlib import Path\nfrom typing import Optional, Tuple, Union\n\nfrom discord import Embed\nfrom discord.ext import commands\n\nfrom bot.bot import Bot\nfrom bot.constants import URLs\n\nSourceType = Union[commands.HelpCommand, commands.Command, commands.Cog, str, commands.Ex...
[ { "content": "import inspect\nfrom pathlib import Path\nfrom typing import Optional, Tuple, Union\n\nfrom discord import Embed, utils\nfrom discord.ext import commands\n\nfrom bot.bot import Bot\nfrom bot.constants import URLs\n\nSourceType = Union[commands.HelpCommand, commands.Command, commands.Cog, str, comm...
diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py index f79be36b07..7b41352d46 100644 --- a/bot/exts/info/source.py +++ b/bot/exts/info/source.py @@ -2,7 +2,7 @@ from pathlib import Path from typing import Optional, Tuple, Union -from discord import Embed +from discord import Embed, utils from discord...
Cloud-CV__EvalAI-1224
Add support for filtering challenges on the basis of challenge phase for host. **Current Behaviour**: The filtering of submissions under the `View All Submissions` tab for a challenge host is on the basis of `challenge_pk` only. The results are same even if challenge host selects any `challenge_phase`. **Expected Beha...
[ { "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 f1e8fee8d5..890eb72bba 100644 --- a/apps/challenges/views.py +++ b/apps/challenges/views.py @@ -724,8 +724,7 @@ def get_all_submissions_of_challenge(request, challenge_pk, challenge_phase_pk): # Filter submissions on the basis of challeng...
DDMAL__CantusDB-582
On Century Detail pages, sometimes unpublished sources are listed Visiting century/3863 while not logged in, there's a link to source/672452. When I click on it, I get a 403 Access Denied error. We need to ensure that links to sources that are inaccessible to a user are never displayed. This bug occurs on both stagi...
[ { "content": "from django.views.generic import DetailView\nfrom main_app.models import Century\n\nclass CenturyDetailView(DetailView):\n model = Century\n context_object_name = \"century\"\n template_name = \"century_detail.html\"\n", "path": "django/cantusdb_project/main_app/views/century.py" } ...
[ { "content": "from django.views.generic import DetailView\nfrom main_app.models import Century, Source\nfrom typing import Any\n\nclass CenturyDetailView(DetailView):\n model = Century\n context_object_name = \"century\"\n template_name = \"century_detail.html\"\n\n def get_context_data(self, **kwar...
diff --git a/django/cantusdb_project/main_app/templates/century_detail.html b/django/cantusdb_project/main_app/templates/century_detail.html index 57a33dcec..6874d23b8 100644 --- a/django/cantusdb_project/main_app/templates/century_detail.html +++ b/django/cantusdb_project/main_app/templates/century_detail.html @@ -7,7...
ytdl-org__youtube-dl-1790
console title should change after youtube-dl finishes [fails in Terminal.app] Reported by @joeschmoe40: If you use --console-title, the console title is left changed (messed up) after the program exits (at least on Mac OSX).
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport errno\nimport io\nimport os\nimport re\nimport shutil\nimport socket\nimport sys\nimport time\nimport traceback\n\nif os.name == 'nt':\n import ctypes\n\nfrom .utils import (\n compat_http_clie...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport errno\nimport io\nimport os\nimport re\nimport shutil\nimport socket\nimport sys\nimport time\nimport traceback\n\nif os.name == 'nt':\n import ctypes\n\nfrom .utils import (\n compat_http_clie...
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 20eed96caf6..fd5a30a0c88 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -217,13 +217,15 @@ def save_console_title(self): if not self.params.get('consoletitle', False): return if 'TERM' in os.enviro...
wagtail__wagtail-2085
Migrations failing on Django 1.8.8 and 1.9.1 with PostgreSQL Weird bug. ``` $ python manage.py migrate ...truncated Applying wagtailimages.0004_make_focal_point_key_not_nullable... OK Applying wagtailimages.0005_make_filter_spec_unique...Traceback (most recent call last): File "manage.py", line 10, in <module> ...
[ { "content": "from __future__ import unicode_literals\n\nimport os.path\nimport hashlib\nfrom contextlib import contextmanager\nfrom collections import OrderedDict\n\nfrom taggit.managers import TaggableManager\nfrom willow.image import Image as WillowImage\n\nimport django\nfrom django.core.files import File\n...
[ { "content": "from __future__ import unicode_literals\n\nimport os.path\nimport hashlib\nfrom contextlib import contextmanager\nfrom collections import OrderedDict\n\nfrom taggit.managers import TaggableManager\nfrom willow.image import Image as WillowImage\n\nimport django\nfrom django.core.files import File\n...
diff --git a/wagtail/wagtailimages/migrations/0005_make_filter_spec_unique.py b/wagtail/wagtailimages/migrations/0005_make_filter_spec_unique.py index 9cd0d9cb0228..77c02d489aa1 100644 --- a/wagtail/wagtailimages/migrations/0005_make_filter_spec_unique.py +++ b/wagtail/wagtailimages/migrations/0005_make_filter_spec_uni...
huggingface__transformers-8239
'SummaryWriter' object has no attribute 'add_hparams' ## Environment info <!-- You can run the command `transformers-cli env` and copy-and-paste its output below. Don't forget to fill out the missing fields in that output! --> - `transformers` version: 3.4.0 - Platform: Linux-4.15.0-72-generic-x86_64-wi...
[ { "content": "# Integrations with other Python libraries\nimport math\nimport os\n\nfrom .utils import logging\n\n\nlogger = logging.get_logger(__name__)\n\n\n# Import 3rd-party integrations before ML frameworks:\n\ntry:\n # Comet needs to be imported before any ML frameworks\n import comet_ml # noqa: F4...
[ { "content": "# Integrations with other Python libraries\nimport math\nimport os\n\nfrom .utils import logging\n\n\nlogger = logging.get_logger(__name__)\n\n\n# Import 3rd-party integrations before ML frameworks:\n\ntry:\n # Comet needs to be imported before any ML frameworks\n import comet_ml # noqa: F4...
diff --git a/src/transformers/integrations.py b/src/transformers/integrations.py index 63f8d04080fc..c5f4442c5635 100644 --- a/src/transformers/integrations.py +++ b/src/transformers/integrations.py @@ -282,7 +282,9 @@ def on_train_begin(self, args, state, control, **kwargs): if hasattr(model, "config"...
NVIDIA-Merlin__NVTabular-600
[BUG] NVTabular workflow writes more input columns for triton inference server **Describe the bug** Using `generate_triton_model` generates the config file for triton inference. It depends on workflow.input_dtypes. If my workflow does not use all available columns, then the workflow.input_dtypes contains more input c...
[ { "content": "#\n# Copyright (c) 2020, NVIDIA CORPORATION.\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 requ...
[ { "content": "#\n# Copyright (c) 2020, NVIDIA CORPORATION.\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 requ...
diff --git a/nvtabular/workflow.py b/nvtabular/workflow.py index 0c0383fed1c..5261970ee47 100644 --- a/nvtabular/workflow.py +++ b/nvtabular/workflow.py @@ -151,7 +151,7 @@ def fit(self, dataset: Dataset): # hack: store input/output dtypes here. We should have complete dtype # information for each ope...
biolab__orange3-text-628
Corpus Viewer Index Error **Describe the bug** ``` Traceback (most recent call last): File "/Users/ajda/orange/orange-canvas-core/orangecanvas/scheme/signalmanager.py", line 936, in __process_next if self.__process_next_helper(use_max_active=True): File "/Users/ajda/orange/orange-canvas-core/orangecanvas/s...
[ { "content": "import re\nimport sre_constants\nfrom itertools import chain\nfrom typing import Set\n\nfrom AnyQt.QtCore import (\n Qt, QUrl, QItemSelection, QItemSelectionModel, QItemSelectionRange\n)\n\nfrom AnyQt.QtGui import QStandardItemModel, QStandardItem\nfrom AnyQt.QtWidgets import (QListView, QSizeP...
[ { "content": "import re\nimport sre_constants\nfrom itertools import chain\nfrom typing import Set\n\nfrom AnyQt.QtCore import (\n Qt, QUrl, QItemSelection, QItemSelectionModel, QItemSelectionRange\n)\n\nfrom AnyQt.QtGui import QStandardItemModel, QStandardItem\nfrom AnyQt.QtWidgets import (QListView, QSizeP...
diff --git a/orangecontrib/text/widgets/owcorpusviewer.py b/orangecontrib/text/widgets/owcorpusviewer.py index 4bb4ad12f..4b72520cf 100644 --- a/orangecontrib/text/widgets/owcorpusviewer.py +++ b/orangecontrib/text/widgets/owcorpusviewer.py @@ -140,7 +140,8 @@ def set_data(self, corpus=None): self.display_...
mitmproxy__mitmproxy-2659
command console.choose.cmd crashes when given no arguments Enter mitmproxy console, issue a command like: console.choose.cmd ... and press return.
[ { "content": "\"\"\"\n This module manges and invokes typed commands.\n\"\"\"\nimport inspect\nimport typing\nimport shlex\nimport textwrap\nimport functools\nimport sys\n\nfrom mitmproxy.utils import typecheck\nfrom mitmproxy import exceptions\nfrom mitmproxy import flow\n\n\nCuts = typing.Sequence[\n ty...
[ { "content": "\"\"\"\n This module manges and invokes typed commands.\n\"\"\"\nimport inspect\nimport typing\nimport shlex\nimport textwrap\nimport functools\nimport sys\n\nfrom mitmproxy.utils import typecheck\nfrom mitmproxy import exceptions\nfrom mitmproxy import flow\n\n\nCuts = typing.Sequence[\n ty...
diff --git a/mitmproxy/command.py b/mitmproxy/command.py index c9776bc325..eae3d80cb2 100644 --- a/mitmproxy/command.py +++ b/mitmproxy/command.py @@ -190,10 +190,19 @@ def parsearg(manager: CommandManager, spec: str, argtype: type) -> typing.Any: raise exceptions.CommandError("Unsupported argument type: %s" %...
getmoto__moto-997
SQS Message timestamp attributes in exponential notation When sending and receiving messages through SQS, the attributes `SentTimestamp` and `ApproximateFirstReceiveTimestamp` contain a string with a number in exponential notation. Example (taken from atlassian/localstack#135, which describes this issue): ```json ...
[ { "content": "from __future__ import unicode_literals\n\nimport base64\nimport hashlib\nimport re\nimport six\nimport struct\nfrom xml.sax.saxutils import escape\n\nimport boto.sqs\n\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.core.utils import camelcase_to_underscores, get_random_message_id, unix_...
[ { "content": "from __future__ import unicode_literals\n\nimport base64\nimport hashlib\nimport re\nimport six\nimport struct\nfrom xml.sax.saxutils import escape\n\nimport boto.sqs\n\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.core.utils import camelcase_to_underscores, get_random_message_id, unix_...
diff --git a/moto/sqs/models.py b/moto/sqs/models.py index 43a633c42619..f6657269c263 100644 --- a/moto/sqs/models.py +++ b/moto/sqs/models.py @@ -96,7 +96,7 @@ def body(self): return escape(self._body) def mark_sent(self, delay_seconds=None): - self.sent_timestamp = unix_time_millis() + s...
facebookresearch__fairscale-786
OSS detected that the parameter changed devices, re-allocating buffers ## ❓ Questions and Help For each iteration, I get this message "OSS detected that the parameter changed devices, re-allocating buffers ". Is this normal? if not, what should be done?
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom collections import OrderedDict\nimport copy\nimport io\nfrom itertools import chain\nimpo...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom collections import OrderedDict\nimport copy\nimport io\nfrom itertools import chain\nimpo...
diff --git a/fairscale/optim/oss.py b/fairscale/optim/oss.py index 189101a42..6e49d0621 100644 --- a/fairscale/optim/oss.py +++ b/fairscale/optim/oss.py @@ -462,10 +462,12 @@ def refresh_trainable(self) -> None: of some parameters changed. """ + # Make sure that we capture the current default...
arviz-devs__arviz-619
densityplot warning tight_layout plot density returns the following warning: _UserWarning: This figure was using constrained_layout==True, but that is incompatible with subplots_adjust and or tight_layout: setting constrained_layout==False. warnings.warn("This figure was using constrained_layout==True, ")_ Th...
[ { "content": "\"\"\"KDE and histogram plots for multiple variables.\"\"\"\nimport numpy as np\n\nfrom ..data import convert_to_dataset\nfrom ..stats import hpd\nfrom .kdeplot import _fast_kde\nfrom .plot_utils import (\n _scale_fig_size,\n make_label,\n xarray_var_iter,\n default_grid,\n _create_...
[ { "content": "\"\"\"KDE and histogram plots for multiple variables.\"\"\"\nimport numpy as np\n\nfrom ..data import convert_to_dataset\nfrom ..stats import hpd\nfrom .kdeplot import _fast_kde\nfrom .plot_utils import (\n _scale_fig_size,\n make_label,\n xarray_var_iter,\n default_grid,\n _create_...
diff --git a/arviz/plots/densityplot.py b/arviz/plots/densityplot.py index a69ebcac9a..a961c01ab5 100644 --- a/arviz/plots/densityplot.py +++ b/arviz/plots/densityplot.py @@ -181,7 +181,7 @@ def plot_density( figsize, textsize, rows, cols ) - fig, ax = _create_axes_grid(length_plotters, rows, cols, f...
mozilla__telemetry-analysis-service-975
Don't overwrite creator when saving jobs Since we can provide view and editing permissions to other users (e.g. admins) with row-level permissions we should stop overwriting the creator on every save of a scheduled Spark job since it would prevent an effective trail of ownership and has in the past led to inconsistenci...
[ { "content": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\nimport uuid\nfrom collections import OrderedDict\n\nfrom django import forms\n\nfrom .cache impo...
[ { "content": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\nimport uuid\nfrom collections import OrderedDict\n\nfrom django import forms\nfrom django.contri...
diff --git a/atmo/forms/mixins.py b/atmo/forms/mixins.py index 2930df30..43933713 100644 --- a/atmo/forms/mixins.py +++ b/atmo/forms/mixins.py @@ -5,6 +5,7 @@ from collections import OrderedDict from django import forms +from django.contrib.auth.models import User from .cache import CachedFileCache from .fields...
qtile__qtile-3099
Widget for updatable image I don't want to reinvent the wheel, so will check before. I use GenPollText for my keyboard layout indicator but instead I want to see the flag (image). As I change layout the image should be changed. Do Qtile has such widget or proper way to do that?
[ { "content": "# Copyright (c) 2013 dequis\n# Copyright (c) 2014 Sean Vig\n# Copyright (c) 2014 Adi Sieker\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, ...
[ { "content": "# Copyright (c) 2013 dequis\n# Copyright (c) 2014 Sean Vig\n# Copyright (c) 2014 Adi Sieker\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, ...
diff --git a/CHANGELOG b/CHANGELOG index ab91cc6fef..fabfd231a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -25,6 +25,7 @@ Qtile x.x.x, released xxxx-xx-xx: - Thermal zone widget. - Allow TextBox-based widgets to display in vertical bars. - Added a focused attribute to `lazy.function.when` whic...
Lightning-AI__pytorch-lightning-3188
RMSLE metric appears to be incorrect ## 🐛 Bug The usage of mse [in the rmsle function](https://github.com/PyTorchLightning/pytorch-lightning/blob/22b9642117394d3c50587ae137dbf94c6dd5173c/pytorch_lightning/metrics/functional/regression.py#L138) looks wrong to me. It looks like this function currently computes _mean ...
[ { "content": "from typing import Sequence\n\nimport torch\nfrom torch.nn import functional as F\n\nfrom pytorch_lightning.metrics.functional.reduction import reduce\n\n\ndef mse(\n pred: torch.Tensor,\n target: torch.Tensor,\n reduction: str = 'elementwise_mean'\n) -> torch.Tensor:\n \"\...
[ { "content": "from typing import Sequence\n\nimport torch\nfrom torch.nn import functional as F\n\nfrom pytorch_lightning.metrics.functional.reduction import reduce\n\n\ndef mse(\n pred: torch.Tensor,\n target: torch.Tensor,\n reduction: str = 'elementwise_mean'\n) -> torch.Tensor:\n \"\...
diff --git a/CHANGELOG.md b/CHANGELOG.md index fe4ea78c0525f..572b32664d183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed `num_sanity_val_steps` is clipped to `limit_val_batches` ([#2917](https://github.com/PyTor...
googleapis__google-cloud-python-1008
Make sure @property's are near constructor in methods See https://github.com/GoogleCloudPlatform/gcloud-python/pull/987/files#r35029989
[ { "content": "# Copyright 2014 Google Inc. 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#\n# Unless...
[ { "content": "# Copyright 2014 Google Inc. 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#\n# Unless...
diff --git a/gcloud/storage/bucket.py b/gcloud/storage/bucket.py index adcaede0c8c3..bc4c0977dfc2 100644 --- a/gcloud/storage/bucket.py +++ b/gcloud/storage/bucket.py @@ -98,6 +98,11 @@ def __init__(self, client, name=None): def __repr__(self): return '<Bucket: %s>' % self.name + @property + def c...
conan-io__conan-center-index-3850
[swig] swig/4.0.1/2 Recipe contains code to strip executables, why? Building swig/4.0.2 on AIX with gcc I ran into a problem with strip. Generally speaking, not all platforms will leave you with a functional binary when you run `strip <executable file>` as some platforms' strip commands will remove relocation inform...
[ { "content": "from conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom contextlib import contextmanager\nimport os\n\n\nclass SwigConan(ConanFile):\n name = \"swig\"\n description = \"SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level p...
[ { "content": "from conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom contextlib import contextmanager\nimport os\n\n\nclass SwigConan(ConanFile):\n name = \"swig\"\n description = \"SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level p...
diff --git a/recipes/swig/all/conanfile.py b/recipes/swig/all/conanfile.py index 09b9028a184f8..9c4f66c1d46ed 100644 --- a/recipes/swig/all/conanfile.py +++ b/recipes/swig/all/conanfile.py @@ -113,14 +113,6 @@ def package(self): autotools = self._configure_autotools() autotools.install() - ...
streamlink__streamlink-2102
ok.ru VODs <!-- Thanks for reporting a plugin issue! USE THE TEMPLATE. Otherwise your plugin issue may be rejected. First, see the contribution guidelines: https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink Also check the list of open and closed plugin issues: http...
[ { "content": "import re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.plugin.api import useragents\nfrom streamlink.stream import HLSStream\n\n_url_re = re.compile(r\"https?://(www\\.)?ok\\.ru/live/\\d+\")\n_vod_re = re.compile(r\";(?P<hlsurl>[^;]+video\\.m...
[ { "content": "import re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.plugin.api import useragents\nfrom streamlink.stream import HLSStream\n\n_url_re = re.compile(r\"https?://(www\\.)?ok\\.ru/(live|video)/\\d+\")\n_vod_re = re.compile(r\";(?P<hlsurl>[^;]+v...
diff --git a/docs/plugin_matrix.rst b/docs/plugin_matrix.rst index e0b05c65fab..eea5b2152b4 100644 --- a/docs/plugin_matrix.rst +++ b/docs/plugin_matrix.rst @@ -120,7 +120,7 @@ npo - npo.nl Yes Yes Streams may be geo-rest - zappelin.nl nrk ...