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
⌀
oppia__oppia-12080
[Contributor Dashboard] Not able to submit question suggestions on main Oppia server Screenshot: ![error communicating with server](https://user-images.githubusercontent.com/9004726/109553398-fd6bf980-7aa0-11eb-9464-28c025eb3ea1.png) Related stack trace for a POST to /suggestionhandler/: ``` Traceback (most r...
[ { "content": "# coding: utf-8\n#\n# Copyright 2016 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen...
[ { "content": "# coding: utf-8\n#\n# Copyright 2016 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen...
diff --git a/core/domain/feedback_services.py b/core/domain/feedback_services.py index e9c3357a0e148..94886290c7b96 100644 --- a/core/domain/feedback_services.py +++ b/core/domain/feedback_services.py @@ -312,7 +312,10 @@ def create_messages( if (feconf.CAN_SEND_EMAILS and ( feconf.CAN_SEND_FEEDBACK...
conan-io__conan-center-index-18559
[package] util-linux-libuuid uses wrong cmake target ### Description In the following lines, the `util-linux-libuuid` recipe sets the cmake target to be `LibUUID::LibUUID` with a filename of `LibUUID-config.cmake`: https://github.com/conan-io/conan-center-index/blob/61c4f7819e6cd3594a57f6c3847f94ab86de623f/recipes/...
[ { "content": "from conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom conan.tools.apple import fix_apple_shared_install_name\nfrom conan.tools.files import copy, get, rm, rmdir\nfrom conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps\nfrom conan.tools.layout import...
[ { "content": "from conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom conan.tools.apple import fix_apple_shared_install_name\nfrom conan.tools.files import copy, get, rm, rmdir\nfrom conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps\nfrom conan.tools.layout import...
diff --git a/recipes/util-linux-libuuid/all/conanfile.py b/recipes/util-linux-libuuid/all/conanfile.py index 736f1aadf0369..71265d08f5124 100644 --- a/recipes/util-linux-libuuid/all/conanfile.py +++ b/recipes/util-linux-libuuid/all/conanfile.py @@ -109,7 +109,10 @@ def package(self): def package_info(self): ...
LMFDB__lmfdb-4267
CMF download fails for newform with very high dimension The download all data link for 983.2.c.a throws a server error (the other download links seem to work) https://www.lmfdb.org/ModularForm/GL2/Q/holomorphic/download_newform/983.2.c.a
[ { "content": "# -*- coding: utf-8 -*-\nfrom ast import literal_eval\nfrom flask import url_for, redirect, abort\nfrom lmfdb import db\nfrom lmfdb.backend.encoding import Json\nfrom lmfdb.utils import Downloader, flash_error\nfrom lmfdb.classical_modular_forms.web_newform import WebNewform\nfrom lmfdb.classical...
[ { "content": "# -*- coding: utf-8 -*-\nfrom ast import literal_eval\nfrom flask import url_for, redirect, abort\nfrom lmfdb import db\nfrom lmfdb.backend.encoding import Json\nfrom lmfdb.utils import Downloader, flash_error\nfrom lmfdb.classical_modular_forms.web_newform import WebNewform\nfrom lmfdb.classical...
diff --git a/lmfdb/classical_modular_forms/download.py b/lmfdb/classical_modular_forms/download.py index e6af9375d8..70289e058f 100644 --- a/lmfdb/classical_modular_forms/download.py +++ b/lmfdb/classical_modular_forms/download.py @@ -300,12 +300,9 @@ def download_newform(self, label, lang='text'): if data is ...
genialis__resolwe-183
Process crashes if rendered data name is too long After process is done, names of all child objects are re-rendered. If any of the names is longer than 100 characters (limit specified in name field), process crashes. Names of data object should probably be trimmed to that limit. Increasing of the limit should also b...
[ { "content": "# XXX: split module and remove pylint comment\n# pylint: disable=too-many-lines\n\"\"\".. Ignore pydocstyle D400.\n\n===========\nFlow Models\n===========\n\nBase Model\n==========\n\nBase model for all other models.\n\n.. autoclass:: resolwe.flow.models.BaseModel\n :members:\n\nCollection Mode...
[ { "content": "# XXX: split module and remove pylint comment\n# pylint: disable=too-many-lines\n\"\"\".. Ignore pydocstyle D400.\n\n===========\nFlow Models\n===========\n\nBase Model\n==========\n\nBase model for all other models.\n\n.. autoclass:: resolwe.flow.models.BaseModel\n :members:\n\nCollection Mode...
diff --git a/resolwe/flow/models.py b/resolwe/flow/models.py index 949a6f096..5c3ece6cf 100644 --- a/resolwe/flow/models.py +++ b/resolwe/flow/models.py @@ -595,13 +595,19 @@ def _render_name(self): template_context = inputs try: - self.name = render_template( + name = render_t...
pyqtgraph__pyqtgraph-1432
ExampleApp Syntax Highlighter broken in PyQt5 ### Short description Since merge of #1302, the syntax highlighter in the ExampleApp is broken (CC @j9ac9k ). ### Code to reproduce ```bash cd pyqtgraph\examples python3 . ``` ### Expected behavior Syntax highlighter should work ### Real behavior Following ...
[ { "content": "import sys, os\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtCore, QtGui\n\n\n\nif __name__ == '__main__':\n if __package__ is None or __package__ == \"\":\n parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n sys.path.insert(0, parent_dir)\n im...
[ { "content": "import sys, os\n\n# Set up path to contain pyqtgraph module when run without installation\nif __name__ == \"__main__\" and (__package__ is None or __package__==''):\n parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n sys.path.insert(0, parent_dir)\n import example...
diff --git a/examples/__main__.py b/examples/__main__.py index c372871ba7..41b989d00e 100644 --- a/examples/__main__.py +++ b/examples/__main__.py @@ -1,15 +1,16 @@ import sys, os + +# Set up path to contain pyqtgraph module when run without installation +if __name__ == "__main__" and (__package__ is None or __package...
mozmeao__snippets-service-621
Add `generated_at` key in AS Router payload Add `generated_at` with UTC datetime in ISO format in AS Router payload for debugging purposes Final payload should look like this: ```json "messages": { ... } "metadata": { "generated_at": "2018-07-24T13:48:24.531139" }
[ { "content": "import copy\nimport hashlib\nimport json\nimport os\nimport re\nimport uuid\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom urlparse import urljoin, urlparse\n\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.files.base import Conten...
[ { "content": "import copy\nimport hashlib\nimport json\nimport os\nimport re\nimport uuid\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom urlparse import urljoin, urlparse\n\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.files.base import Conten...
diff --git a/snippets/base/models.py b/snippets/base/models.py index a1dcb0818..b6bf3b326 100644 --- a/snippets/base/models.py +++ b/snippets/base/models.py @@ -194,7 +194,12 @@ def generate(self): if self.client.startpage_version == '6': # Generate the new AS Router bundle format dat...
holoviz__panel-2143
Quote conversion in JSON pane breaks valid JSON content The Javascript code for the JSON pane blindly replaces all single quotes with double quotes, presumably to convert Python single quoted strings to standard JSON double quoted strings. https://github.com/holoviz/panel/blob/3fdfa3248d1bd838fee88af6a277bf94eeaad8...
[ { "content": "\"\"\"\nPane class which render various markup languages including HTML,\nMarkdown, and also regular strings.\n\"\"\"\nimport json\nimport textwrap\n\nfrom six import string_types\n\nimport param\n\nfrom ..models import HTML as _BkHTML, JSON as _BkJSON\nfrom ..util import escape\nfrom ..viewable i...
[ { "content": "\"\"\"\nPane class which render various markup languages including HTML,\nMarkdown, and also regular strings.\n\"\"\"\nimport json\nimport textwrap\n\nfrom six import string_types\n\nimport param\n\nfrom ..models import HTML as _BkHTML, JSON as _BkJSON\nfrom ..util import escape\nfrom ..viewable i...
diff --git a/panel/models/json.ts b/panel/models/json.ts index 8e4ac077f1..4499c45904 100644 --- a/panel/models/json.ts +++ b/panel/models/json.ts @@ -15,7 +15,7 @@ export class JSONView extends PanelMarkupView { render(): void { super.render(); - const text = this.model.text.replace(/(\r\n|\n|\r)/gm, "")....
replicate__cog-362
Support importing model from subdirectories This works: ```yaml model: "predict.py:MyModel" ``` But this doesn't: ```yaml: model: "mymodel/predict.py:MyModel" ``` It should.
[ { "content": "from abc import ABC, abstractmethod\nimport importlib\nimport os.path\nfrom pathlib import Path\nfrom typing import Dict, Any\n\nimport yaml\n\nfrom .errors import ConfigDoesNotExist, PredictorNotSet\n\n\n# TODO(andreas): handle directory input\n# TODO(andreas): handle List[Dict[str, int]], etc.\n...
[ { "content": "from abc import ABC, abstractmethod\nimport importlib\nimport os.path\nfrom pathlib import Path\nfrom typing import Dict, Any\n\nimport yaml\n\nfrom .errors import ConfigDoesNotExist, PredictorNotSet\n\n\n# TODO(andreas): handle directory input\n# TODO(andreas): handle List[Dict[str, int]], etc.\n...
diff --git a/pkg/config/config.go b/pkg/config/config.go index e8f9005e29..12e11272cd 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -124,9 +124,6 @@ func (c *Config) ValidateAndCompleteConfig() error { if len(strings.Split(c.Predict, ".py:")) != 2 { return fmt.Errorf("'predict' in cog.yaml must...
jazzband__pip-tools-842
pip-tools --upgrade --dry-run --output-file requirements.pc should not erase requirements.pc when --dry-run is specified Describe the issue briefly here. ##### Environment Versions 1. OS Type $ uname -v Darwin Kernel Version 16.7.0: Thu Dec 20 21:53:35 PST 2018; root:xnu-3789.73.31~1/RELEASE_X86_64 2. Pyth...
[ { "content": "# coding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport sys\nfrom collections import OrderedDict\nfrom itertools import chain, groupby\n\nimport six\nfrom six.moves import shlex_quote\n\nfrom ._compat import install_req_from_line\nfrom .click i...
[ { "content": "# coding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport sys\nfrom collections import OrderedDict\nfrom itertools import chain, groupby\n\nimport six\nfrom click.utils import LazyFile\nfrom six.moves import shlex_quote\n\nfrom ._compat import in...
diff --git a/piptools/utils.py b/piptools/utils.py index c0b1bdbaf..9642c49f5 100644 --- a/piptools/utils.py +++ b/piptools/utils.py @@ -6,6 +6,7 @@ from itertools import chain, groupby import six +from click.utils import LazyFile from six.moves import shlex_quote from ._compat import install_req_from_line @@ -...
tensorflow__tfx-25
base_component.BaseComponent.__str__ method raising KeyError I got a `KeyError` when calling this method: `base_component.BaseComponent.__str__` Here is the code to reproduce: ```python import os from tfx.utils.dsl_utils import csv_input from tfx.components.example_gen.csv_example_gen.component import CsvExamp...
[ { "content": "# Copyright 2019 Google LLC. 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 2019 Google LLC. 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/tfx/components/base/base_component.py b/tfx/components/base/base_component.py index f6eb4b3582..ac4a9734db 100644 --- a/tfx/components/base/base_component.py +++ b/tfx/components/base/base_component.py @@ -72,7 +72,7 @@ def __init__(self, def __str__(self): return """ -{ +{{ component_name: {c...
cookiecutter__cookiecutter-2010
Adding value to nested dicts broken after 2.2.0 Tested with cookiecutter version: 2.5.0 and main Prior to Version 2.2.0 one could have a `cookiecutter.json` with a dict as value like so: ```json { "mainkey": { "subkey1": "value1" "subkey2": "value2" } } ``` and then define an YAML to pass in wi...
[ { "content": "\"\"\"Functions for generating a project from a project template.\"\"\"\nimport fnmatch\nimport json\nimport logging\nimport os\nimport shutil\nimport warnings\nfrom collections import OrderedDict\nfrom pathlib import Path\n\nfrom binaryornot.check import is_binary\nfrom jinja2 import Environment,...
[ { "content": "\"\"\"Functions for generating a project from a project template.\"\"\"\nimport fnmatch\nimport json\nimport logging\nimport os\nimport shutil\nimport warnings\nfrom collections import OrderedDict\nfrom pathlib import Path\n\nfrom binaryornot.check import is_binary\nfrom jinja2 import Environment,...
diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py index d505825ac..a148b384f 100644 --- a/cookiecutter/generate.py +++ b/cookiecutter/generate.py @@ -55,8 +55,11 @@ def apply_overwrites_to_context( """Modify the given context in place based on the overwrite_context.""" for variable, overwrite i...
openshift__openshift-ansible-5350
Invalid boolean conversion for extraAuthorizeParameters include_granted_scopes When trying to define an OpenIDConnect ID provider in Ansible hosts by setting include_granted_scopes. If the value is “true” with the double quotes then the definition is invalid. For instance extraAuthorizeParameters': {'include_granted_...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\n\n# pylint import-error disabled because pylint cannot find the package\n# when installed in a virtualenv\nfrom distutils.version import LooseVersion # pylint: disable=no-nam...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\n\n# pylint import-error disabled because pylint cannot find the package\n# when installed in a virtualenv\nfrom distutils.version import LooseVersion # pylint: disable=no-nam...
diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py index e767772ce09..5558f55cb8d 100644 --- a/roles/openshift_master_facts/filter_plugins/openshift_master.py +++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py...
open-mmlab__mmcv-1164
log repeat twice The log print in screen like **`2021-04-28 17:55:36,274 - mmseg - INFO - Distributed training: True ` `INFO:mmseg:Distributed training: True`** All log messages ware printed twice in screen, but in log files, the message was only writed once. I tried to locate the bug, and found that after run `c ...
[ { "content": "import logging\n\nimport torch.distributed as dist\n\nlogger_initialized = {}\n\n\ndef get_logger(name, log_file=None, log_level=logging.INFO, file_mode='w'):\n \"\"\"Initialize and get a logger by name.\n\n If the logger has not been initialized, this method will initialize the\n logger ...
[ { "content": "import logging\n\nimport torch.distributed as dist\n\nlogger_initialized = {}\n\n\ndef get_logger(name, log_file=None, log_level=logging.INFO, file_mode='w'):\n \"\"\"Initialize and get a logger by name.\n\n If the logger has not been initialized, this method will initialize the\n logger ...
diff --git a/mmcv/utils/logging.py b/mmcv/utils/logging.py index a6b566ca75..e7ede61a46 100644 --- a/mmcv/utils/logging.py +++ b/mmcv/utils/logging.py @@ -37,6 +37,17 @@ def get_logger(name, log_file=None, log_level=logging.INFO, file_mode='w'): if name.startswith(logger_name): return logger + ...
comic__grand-challenge.org-1229
Allow PatientID, PatientName and StudyDate through in metadata of mha/mhd,zraw See title. This metadata is scrubbed of during import, but should stay, because it can be used by the ImageInfoPlugin
[ { "content": "import re\nimport zlib\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Mapping, Pattern, Tuple, Union\n\nimport SimpleITK\nimport SimpleITK._SimpleITK as _SimpleITK\nfrom django.core.files import File\n\nMETAIO_IMAGE_TYPES = {\n \"MET_NONE\": None,\n \"MET_ASCII_CHAR\": None,\...
[ { "content": "import re\nimport zlib\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Mapping, Pattern, Tuple, Union\n\nimport SimpleITK\nimport SimpleITK._SimpleITK as _SimpleITK\nfrom django.core.files import File\n\nMETAIO_IMAGE_TYPES = {\n \"MET_NONE\": None,\n \"MET_ASCII_CHAR\": None,\...
diff --git a/app/grandchallenge/cases/image_builders/metaio_utils.py b/app/grandchallenge/cases/image_builders/metaio_utils.py index f152b6c109..1f63c74d36 100644 --- a/app/grandchallenge/cases/image_builders/metaio_utils.py +++ b/app/grandchallenge/cases/image_builders/metaio_utils.py @@ -51,7 +51,16 @@ r"(\s(2[0...
internetarchive__openlibrary-8265
Adds "Safe Mode" to blur NSWF covers <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> ## Describe the problem that you'd like solved <!-- A clear and concise description of what you want to happen. --> ### SFW: “Safe For Work” mode MVP **Objective:** Allow ...
[ { "content": "from dataclasses import dataclass\nimport copy\nimport json\nimport logging\nimport re\nfrom typing import Any\nfrom collections.abc import Iterable\nfrom unicodedata import normalize\nimport requests\nimport web\nfrom requests import Response\nimport urllib\n\nfrom infogami import config\nfrom in...
[ { "content": "from dataclasses import dataclass\nimport copy\nimport json\nimport logging\nimport re\nfrom typing import Any\nfrom collections.abc import Iterable\nfrom unicodedata import normalize\nimport requests\nimport web\nfrom requests import Response\nimport urllib\n\nfrom infogami import config\nfrom in...
diff --git a/openlibrary/macros/SearchResultsWork.html b/openlibrary/macros/SearchResultsWork.html index c791d3ae30e..57693b04b46 100644 --- a/openlibrary/macros/SearchResultsWork.html +++ b/openlibrary/macros/SearchResultsWork.html @@ -1,4 +1,4 @@ -$def with (doc, decorations=None, cta=True, availability=None, extra=N...
google__jax-2561
BatchNorm doesn't work with center or scale turned off BatchNorm raises TypeError when using without center or scale or both. Seems pretty straightforward to fix (e.x. as a workaround I've set beta to None `beta = None if not center else beta[ed]` if center is False, the same for gamma but there might be some better so...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/jax/experimental/stax.py b/jax/experimental/stax.py index d2413181c18a..b5881a0f6bae 100644 --- a/jax/experimental/stax.py +++ b/jax/experimental/stax.py @@ -134,12 +134,10 @@ def apply_fun(params, x, **kwargs): # TODO(phawkins): np.expand_dims should accept an axis tuple. # (https://github.com/n...
ansible__awx-5709
AWX ships analytics bundle multiple times per upload window. ##### ISSUE TYPE - Bug Report ##### SUMMARY AWX ships analytics bundle multiple times per upload window. ##### ENVIRONMENT * AWX version: X.Y.Z * AWX install method: openshift, minishift, docker on linux, docker for mac, boot2docker * Ansible ve...
[ { "content": "# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\nimport os\nimport re # noqa\nimport sys\nfrom datetime import timedelta\nfrom celery.schedules import crontab\n\n# global settings\nfrom django.conf import global_settings\n# ugettext lazy\nfrom django.utils.translation import ugettext...
[ { "content": "# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\nimport os\nimport re # noqa\nimport sys\nfrom datetime import timedelta\nfrom celery.schedules import crontab\nimport random\n\n# global settings\nfrom django.conf import global_settings\n# ugettext lazy\nfrom django.utils.translation ...
diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index a84b9403eed4..ba8fb9bbe207 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -6,6 +6,7 @@ import sys from datetime import timedelta from celery.schedules import crontab +import random # global settings from django.conf i...
napari__napari-1217
Don't use magenta when `channel_axis` is given but nchannels is 1 ## 🐛 Bug The OME-zarr [plugin](https://github.com/ome/ome-zarr-py) nicely grabs the channel axis from the OME standard layout. However, for single channel images, this results in the selected colormap being magenta. It should be gray if there is only...
[ { "content": "import inspect\nimport itertools\nfrom logging import getLogger\nfrom os import fspath\nfrom typing import Any, Dict, List, Optional, Sequence, Union\nfrom ..utils.colormaps import ensure_colormap_tuple\n\nimport numpy as np\n\nfrom .. import layers\nfrom ..layers.image._image_utils import guess_m...
[ { "content": "import inspect\nimport itertools\nfrom logging import getLogger\nfrom os import fspath\nfrom typing import Any, Dict, List, Optional, Sequence, Union\nfrom ..utils.colormaps import ensure_colormap_tuple\n\nimport numpy as np\n\nfrom .. import layers\nfrom ..layers.image._image_utils import guess_m...
diff --git a/napari/components/_tests/test_multichannel.py b/napari/components/_tests/test_multichannel.py index 2133a5b2946..11acec6f4bb 100644 --- a/napari/components/_tests/test_multichannel.py +++ b/napari/components/_tests/test_multichannel.py @@ -99,7 +99,9 @@ def test_multichannel(shape, kwargs): assert...
falconry__falcon-909
Add support to Response for the Accept-Ranges header Should be fairly straightforward (see also: https://tools.ietf.org/html/rfc7233#section-2.3)
[ { "content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
[ { "content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
diff --git a/falcon/response.py b/falcon/response.py index 6e73436aa..eabced508 100644 --- a/falcon/response.py +++ b/falcon/response.py @@ -625,6 +625,24 @@ def add_link(self, target, rel, title=None, title_star=None, """, lambda v: ', '.join(v)) + accept_ranges = header_property( + 'Acce...
activeloopai__deeplake-2496
Video Tensor cannot be read back after appending numpy array of raw video # Issue description I create a new local deeplake dataset, create a tensor, and then append to/extend this tensor (issue is the same with both methods). When I then try to access the data I just appended, this raises an issue. `read_sample()...
[ { "content": "import numpy as np\nfrom typing import Union, Dict, List\n\nfrom deeplake.core.vectorstore.vector_search.indra import query\nfrom deeplake.core.vectorstore.vector_search import utils\nfrom deeplake.core.dataset import Dataset as DeepLakeDataset\nfrom deeplake.enterprise.util import raise_indra_ins...
[ { "content": "import numpy as np\nfrom typing import Union, Dict, List\n\nfrom deeplake.core.vectorstore.vector_search.indra import query\nfrom deeplake.core.vectorstore.vector_search import utils\nfrom deeplake.core.dataset import Dataset as DeepLakeDataset\nfrom deeplake.enterprise.util import raise_indra_ins...
diff --git a/deeplake/api/tests/test_video.py b/deeplake/api/tests/test_video.py index d481040e07..04ff251b37 100644 --- a/deeplake/api/tests/test_video.py +++ b/deeplake/api/tests/test_video.py @@ -26,7 +26,10 @@ def test_video(local_ds, compression, video_paths): elif compression == "mkv": ...
PrefectHQ__prefect-3847
AzureResult read function not working ## Description <!-- A clear description of the bug --> Using `AzureResult` to read a file, an exception is raised: > TypeError: a bytes-like object is required, not 'StorageStreamDownloader' Looking at the `read` function in `src/prefect/engine/results/azure_result.py` I se...
[ { "content": "import os\nfrom typing import TYPE_CHECKING, Any\n\nfrom prefect.client import Secret\nfrom prefect.engine.result import Result\n\nif TYPE_CHECKING:\n import azure.storage.blob\n\n\nclass AzureResult(Result):\n \"\"\"\n Result for writing to and reading from an Azure Blob storage.\n\n ...
[ { "content": "import os\nfrom typing import TYPE_CHECKING, Any\n\nfrom prefect.client import Secret\nfrom prefect.engine.result import Result\n\nif TYPE_CHECKING:\n import azure.storage.blob\n\n\nclass AzureResult(Result):\n \"\"\"\n Result for writing to and reading from an Azure Blob storage.\n\n ...
diff --git a/changes/issue3846.yaml b/changes/issue3846.yaml new file mode 100644 index 000000000000..6462b652f468 --- /dev/null +++ b/changes/issue3846.yaml @@ -0,0 +1,2 @@ +fix: + - "Fix Azure result byte decoding of blob data - [#3846](https://github.com/PrefectHQ/prefect/issues/3846)" diff --git a/src/prefect/engi...
MycroftAI__mycroft-core-2823
FileNotFoundError on Skill removal **Describe the bug** I hit this error when doing an uninstall using PR #2803 ``` 2021-02-04 11:35:41.063 | ERROR | 20080 | mycroft.skills.skill_manager:run:260 | Something really unexpected has occured and the skill manager loop safety harness was hit. Traceback (most recent c...
[ { "content": "# Copyright 2017 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ { "content": "# Copyright 2017 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
diff --git a/mycroft/skills/skill_manager.py b/mycroft/skills/skill_manager.py index 9bffb28c9352..d1bd79ff9148 100644 --- a/mycroft/skills/skill_manager.py +++ b/mycroft/skills/skill_manager.py @@ -240,9 +240,9 @@ def run(self): # unload the existing version from memory and reload from the disk. whil...
getmoto__moto-1620
Moto CreateTopic for SNS uses incorrect regex AWS allows me to create an SNS topic with leading underscores (`__app-ses-bounces`). Moto (1.3.3) does not. The cause is the regex incorrectly insists that the topic name may not begin or end with underscores, which makes no sense given that AWS documentation states: ...
[ { "content": "from __future__ import unicode_literals\n\nimport datetime\nimport uuid\nimport json\n\nimport requests\nimport six\nimport re\n\nfrom boto3 import Session\n\nfrom moto.compat import OrderedDict\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.core.utils import iso_8601_datetime_with_milli...
[ { "content": "from __future__ import unicode_literals\n\nimport datetime\nimport uuid\nimport json\n\nimport requests\nimport six\nimport re\n\nfrom boto3 import Session\n\nfrom moto.compat import OrderedDict\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.core.utils import iso_8601_datetime_with_milli...
diff --git a/moto/sns/models.py b/moto/sns/models.py index 1c1be6680d5d..d6105c1d00b1 100644 --- a/moto/sns/models.py +++ b/moto/sns/models.py @@ -240,7 +240,7 @@ def update_sms_attributes(self, attrs): self.sms_attributes.update(attrs) def create_topic(self, name): - fails_constraints = not re.m...
django-cms__django-filer-1057
Out of memory error fix. As described by @leonsmith in issue #973, 10000 value is causing timeout and eventually killing process.
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nimport os\n\nfrom django.db import models\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom .. import settings as filer_settings\nfrom ..utils.compatibility import GTE_DJ...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nimport os\n\nfrom django.db import models\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom .. import settings as filer_settings\nfrom ..utils.compatibility import GTE_DJ...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a8d48245b..c9c2e5c8f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ CHANGELOG * Fixed a regression with loading and dumping fixtures (#965) * Added callable instead of setting as Filer.is_public default * Fixed canonical URL computation +* Fixed imag...
getsentry__sentry-52100
SDK Crash Detection: Store Project ID and Event ID Store project ID and event ID in the SDK crash detection context to find the original SDK crash event, which is only possible with admin Sentry rights. https://github.com/getsentry/sentry/blob/2c31ee009b44964f78b9e7e8282e602b7ef849b0/src/sentry/utils/sdk_crashes/sdk...
[ { "content": "from __future__ import annotations\n\nfrom typing import Any, Mapping, Optional\n\nfrom sentry.eventstore.models import Event\nfrom sentry.issues.grouptype import GroupCategory\nfrom sentry.utils.safe import get_path, set_path\nfrom sentry.utils.sdk_crashes.cocoa_sdk_crash_detector import CocoaSDK...
[ { "content": "from __future__ import annotations\n\nfrom typing import Any, Mapping, Optional\n\nfrom sentry.eventstore.models import Event\nfrom sentry.issues.grouptype import GroupCategory\nfrom sentry.utils.safe import get_path, set_path\nfrom sentry.utils.sdk_crashes.cocoa_sdk_crash_detector import CocoaSDK...
diff --git a/src/sentry/utils/sdk_crashes/sdk_crash_detection.py b/src/sentry/utils/sdk_crashes/sdk_crash_detection.py index 37650220a6925a..6e4de39b1b5671 100644 --- a/src/sentry/utils/sdk_crashes/sdk_crash_detection.py +++ b/src/sentry/utils/sdk_crashes/sdk_crash_detection.py @@ -57,7 +57,14 @@ def detect_sdk_crash(s...
nf-core__tools-1449
[BUG] KeyError when installing modules ## Check Documentation I have checked the following places for your error: - [x] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) - [x] [nf-core/module documentation](https://github.com/nf-core/modules/blob/master/README.md) ## Description of th...
[ { "content": "import glob\nimport json\nimport os\nimport requests\nimport logging\nimport rich\nimport datetime\nimport questionary\n\n\nimport nf_core.utils\n\nfrom .modules_repo import ModulesRepo\nfrom .nfcore_module import NFCoreModule\n\nlog = logging.getLogger(__name__)\n\n\nclass ModuleException(Excepti...
[ { "content": "import glob\nimport json\nimport os\nimport requests\nimport logging\nimport rich\nimport datetime\nimport questionary\n\n\nimport nf_core.utils\n\nfrom .modules_repo import ModulesRepo\nfrom .nfcore_module import NFCoreModule\n\nlog = logging.getLogger(__name__)\n\n\nclass ModuleException(Excepti...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fa099addb..8fd6e61793 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ * Fail linting if a md5sum for an empty file is found (instead of a warning) * Don't skip the md5 when generating a test file if an empty file is found (so that linting fails an...
mkdocs__mkdocs-173
Update PyPI description At the moment I wouldn't be tempted if I first seen this page. https://pypi.python.org/pypi/mkdocs
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n\nname = 'mkdocs'\npackage = 'mkdocs'\ndescription = 'In progress.'\nurl = 'http://www.mkdocs.org'\nauthor = 'Tom Christie'\nauthor_email = 'to...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n\nname = 'mkdocs'\npackage = 'mkdocs'\ndescription = 'Project documentation with Markdown.'\nurl = 'http://www.mkdocs.org'\nauthor = 'Tom Chris...
diff --git a/setup.py b/setup.py index aa6b236919..9da482a059 100755 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ name = 'mkdocs' package = 'mkdocs' -description = 'In progress.' +description = 'Project documentation with Markdown.' url = 'http://www.mkdocs.org' author = 'Tom Christie' author_email = 'tom@tom...
boto__boto-1940
AttributeError: _strptime (Python issue 7980) when using S3Connection on multiple threads Provider._populate_keys_from_metadata_server is affected by Python issue 7980 (http://bugs.python.org/issue7980), where an AttributeError can be thrown when datetime.strptime is called from multiple threads at the same time. This ...
[ { "content": "# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.\n# Copyright (c) 2010, Google, Inc.\n# All rights reserved.\n#\n# Permission is her...
[ { "content": "# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n# Copyright (c) 2011, Nexenta Systems Inc.\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.\n# Copyright (c) 2010, Google, Inc.\n# All rights reserved.\n#\n# Permission is her...
diff --git a/boto/__init__.py b/boto/__init__.py index 344306f663..aba9368954 100644 --- a/boto/__init__.py +++ b/boto/__init__.py @@ -27,6 +27,7 @@ from boto.pyami.config import Config, BotoConfigLocations from boto.storage_uri import BucketStorageUri, FileStorageUri import boto.plugin +import datetime import os ...
readthedocs__readthedocs.org-4833
Redirect full path to default version I'd like to be able to create versionless links to the documentation, for use in error messages, code comments, etc. For example, a message like `see https://click.palletsprojects.com/windows for more information`. I don't want to use URLs with versions because I would have to reme...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nCore views, including the main homepage,\n\ndocumentation and header rendering, and server errors.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nimport os\nimport logging\n\nfrom django.conf import settings\nfrom django.http ...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nCore views, including the main homepage,\n\ndocumentation and header rendering, and server errors.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nimport os\nimport logging\n\nfrom django.conf import settings\nfrom django.http ...
diff --git a/readthedocs/core/views/__init__.py b/readthedocs/core/views/__init__.py index e97a7247ba1..342eb530498 100644 --- a/readthedocs/core/views/__init__.py +++ b/readthedocs/core/views/__init__.py @@ -116,8 +116,16 @@ def server_error_404(request, exception=None, template_name='404.html'): # pyli Mark...
vega__altair-2570
Tooltip doesn't support "image" key My understanding is that to render tooltips, Altair uses the `vega-tooltip` plugin. Per that project's [README](https://github.com/vega/vega-tooltip), one awesome feature that library has is the ability to render images as part of the tooltip with the image key. From the docs: > S...
[ { "content": "\"\"\"\nImage tooltip\n-------------\nThis example shows how to render images in tooltips.\nEither URLs or local file paths can be used to reference\nthe images.\n\"\"\"\n# category: other charts\n\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame.from_records(\n [{'a': 1, 'b'...
[ { "content": "\"\"\"\nImage tooltip\n-------------\nThis example shows how to render images in tooltips.\nEither URLs or local file paths can be used to reference\nthe images. To render the image, you must use the special\ncolumn name \"image\" in your data and pass it as a list to\nthe tooltip encoding.\n\"\"\...
diff --git a/altair/examples/image_tooltip.py b/altair/examples/image_tooltip.py index 9b818c6f7..f831d774a 100644 --- a/altair/examples/image_tooltip.py +++ b/altair/examples/image_tooltip.py @@ -3,7 +3,9 @@ ------------- This example shows how to render images in tooltips. Either URLs or local file paths can be us...
google__timesketch-2300
Uploads not working with newest Plaso **Describe the bug** When trying to upload a plaso file (I used the test plaso file in this case), the upload fails with `psort.py: error: unrecognized arguments: --elastic_user opensearch --elastic_password opensearch` **To Reproduce** Steps to reproduce the behavior: 1. Go ...
[ { "content": "# Copyright 2015 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 2015 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/timesketch/lib/tasks.py b/timesketch/lib/tasks.py index 950e36453a..d2bba8f4d7 100644 --- a/timesketch/lib/tasks.py +++ b/timesketch/lib/tasks.py @@ -658,11 +658,11 @@ def run_plaso(file_path, events, timeline_name, index_name, source_type, timelin opensearch_username = current_app.config.get("OPENS...
mampfes__hacs_waste_collection_schedule-561
Specify local file path information in docs Neither - https://github.com/mampfes/hacs_waste_collection_schedule/blob/master/doc/faq.md nor - https://github.com/mampfes/hacs_waste_collection_schedule/blob/master/doc/source/ics.md#configuration-variables - https://github.com/mampfes/hacs_waste_collection_schedule/b...
[ { "content": "import datetime\nimport logging\nfrom pathlib import Path\n\nimport requests\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\nfrom waste_collection_schedule.service.ICS_v1 import ICS_v1\n\nTITLE = \"ICS\"\nDESCR...
[ { "content": "import datetime\nimport logging\nfrom os import getcwd\nfrom pathlib import Path\n\nimport requests\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\nfrom waste_collection_schedule.service.ICS_v1 import ICS_v1\n\...
diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py index 761a524bb..afae579aa 100644 --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py +++ b/custom_...
Gallopsled__pwntools-282
2 doctests in proc fail on debian We have some tests that assume pid 1 is init , and they fail on debian versions that use systemd. I can't really think of tests that are less platform-specific, any suggestions?
[ { "content": "import time, errno, logging\nfrom .. import tubes\n\ntry:\n import psutil\n _ok_import = True\nexcept ImportError:\n _ok_import = False\n\nlog = logging.getLogger(__name__)\n\nif _ok_import:\n all_pids = psutil.pids\n\ndef pidof(target):\n \"\"\"pidof(target) -> int list\n\n Get ...
[ { "content": "import time, errno, logging\nfrom .. import tubes\n\ntry:\n import psutil\n _ok_import = True\nexcept ImportError:\n _ok_import = False\n\nlog = logging.getLogger(__name__)\n\nif _ok_import:\n all_pids = psutil.pids\n\ndef pidof(target):\n \"\"\"pidof(target) -> int list\n\n Get ...
diff --git a/docs/source/util/proc.rst b/docs/source/util/proc.rst index e50d3a194..8196b6462 100644 --- a/docs/source/util/proc.rst +++ b/docs/source/util/proc.rst @@ -1,7 +1,7 @@ .. testsetup:: * from pwnlib.util.proc import * - import os + import os, sys :mod:`pwnlib.util.proc` --- Working with ``/pr...
aws-cloudformation__cfn-lint-778
Update rule E2541 to not error when action names are not strings *Issue #, if available:* Fix #752 *Description of changes:* - Update rule E2541 to only check for duplicate names when the action name is a string By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contr...
[ { "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/transform.py b/src/cfnlint/transform.py index 3dc560fb4b..0648705176 100644 --- a/src/cfnlint/transform.py +++ b/src/cfnlint/transform.py @@ -78,8 +78,10 @@ def _replace_local_codeuri(self): resource_dict['Location'] = '' Transform._update_to_s3_uri('Lo...
Project-MONAI__MONAI-7778
Some algorithm templates in Auto3DSeg doesn't support validation skipping **Describe the bug** If we have a datalist that includes 3 folds of data, whether it's allowed to run the 4th fold is debatable. For example, we split the data in 3 groups: `#0`, `#1`, and `#2`. 1st experiment would hold `#0` for validatio...
[ { "content": "# Copyright (c) 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 la...
[ { "content": "# Copyright (c) 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 la...
diff --git a/monai/apps/auto3dseg/auto_runner.py b/monai/apps/auto3dseg/auto_runner.py index 05c961f999..5b6b501555 100644 --- a/monai/apps/auto3dseg/auto_runner.py +++ b/monai/apps/auto3dseg/auto_runner.py @@ -499,8 +499,8 @@ def set_num_fold(self, num_fold: int = 5) -> AutoRunner: if num_fold <= 0: ...
microsoft__AzureTRE-395
Application Insights configuration for processor function broken The `createNewWorkspace` function monitoring blade indicates that Application Insights integration is not enabled. ![image](https://user-images.githubusercontent.com/166592/123793166-b7edfa80-d8e1-11eb-8906-b4175f4348e0.png) At a first glance, the con...
[ { "content": "import logging\nimport os\n\nfrom opencensus.ext.azure.log_exporter import AzureLogHandler\nfrom opencensus.trace import config_integration\nfrom opencensus.trace.samplers import AlwaysOnSampler\nfrom opencensus.trace.tracer import Tracer\n\n\ndef initialize_logging(logging_level: int, correlation...
[ { "content": "import logging\nimport os\n\nfrom opencensus.ext.azure.log_exporter import AzureLogHandler\nfrom opencensus.trace import config_integration\nfrom opencensus.trace.samplers import AlwaysOnSampler\nfrom opencensus.trace.tracer import Tracer\n\n\ndef initialize_logging(logging_level: int, correlation...
diff --git a/processor_function/shared/logging.py b/processor_function/shared/logging.py index 42221f9d52..2c7dddb6a3 100644 --- a/processor_function/shared/logging.py +++ b/processor_function/shared/logging.py @@ -18,10 +18,10 @@ def initialize_logging(logging_level: int, correlation_id: str) -> logging.Logge """...
inventree__InvenTree-6284
Platform UI refuses to log out ### Please verify that this bug has NOT been raised before. - [X] I checked and didn't find a similar issue ### Describe the bug* Discovered when I was setting up Platorm UI for dev, trying to log out simply sends you to the Home page and tells you that you were already logged in ![im...
[ { "content": "\"\"\"URLs for web app.\"\"\"\n\nfrom django.conf import settings\nfrom django.shortcuts import redirect\nfrom django.urls import include, path\nfrom django.views.decorators.csrf import ensure_csrf_cookie\nfrom django.views.generic import TemplateView\n\n\nclass RedirectAssetView(TemplateView):\n ...
[ { "content": "\"\"\"URLs for web app.\"\"\"\n\nfrom django.conf import settings\nfrom django.shortcuts import redirect\nfrom django.urls import include, path, re_path\nfrom django.views.decorators.csrf import ensure_csrf_cookie\nfrom django.views.generic import TemplateView\n\n\nclass RedirectAssetView(Template...
diff --git a/InvenTree/web/urls.py b/InvenTree/web/urls.py index 13f05f5267f6..16cdb57f4028 100644 --- a/InvenTree/web/urls.py +++ b/InvenTree/web/urls.py @@ -2,7 +2,7 @@ from django.conf import settings from django.shortcuts import redirect -from django.urls import include, path +from django.urls import include, p...
e-valuation__EvaP-1811
Anonymize can fail when replacing TextAnswers The anonymize script replaces TextAnswers with lorem ipsum text. If an original answer exists, it gets replaced as well. In some circumstances this can result in an AssertionError because on saving the answer and original answer must not be equal: ``` Traceback (most re...
[ { "content": "import itertools\nimport os\nimport random\nfrom datetime import date, timedelta\nfrom math import floor\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.core.serializers.base import ProgressBar\nfrom django.db import transaction\n\nfrom evap.ev...
[ { "content": "import itertools\nimport os\nimport random\nfrom datetime import date, timedelta\nfrom math import floor\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.core.serializers.base import ProgressBar\nfrom django.db import transaction\n\nfrom evap.ev...
diff --git a/evap/evaluation/management/commands/anonymize.py b/evap/evaluation/management/commands/anonymize.py index a261015466..35eb79ee1a 100644 --- a/evap/evaluation/management/commands/anonymize.py +++ b/evap/evaluation/management/commands/anonymize.py @@ -222,6 +222,9 @@ def anonymize_answers(self, lorem_ipsum):...
nf-core__tools-1448
nf-core modules install has duplicated text in message ### Description of the bug nf-core modules install gives a message with the text "Recomputing commit SHAs for modules **which which were were** missing from" The duplicated words should be removed. ### Command used and terminal output _No response_ ### System...
[ { "content": "from posixpath import dirname\nfrom nf_core import modules\nimport os\nimport glob\nimport shutil\nimport copy\nimport json\nimport logging\nimport yaml\n\nimport nf_core.modules.module_utils\nimport nf_core.utils\nfrom nf_core.modules.modules_repo import ModulesRepo\n\nlog = logging.getLogger(__n...
[ { "content": "from posixpath import dirname\nfrom nf_core import modules\nimport os\nimport glob\nimport shutil\nimport copy\nimport json\nimport logging\nimport yaml\n\nimport nf_core.modules.module_utils\nimport nf_core.utils\nfrom nf_core.modules.modules_repo import ModulesRepo\n\nlog = logging.getLogger(__n...
diff --git a/nf_core/modules/modules_command.py b/nf_core/modules/modules_command.py index dbfff111c5..a60291fcfa 100644 --- a/nf_core/modules/modules_command.py +++ b/nf_core/modules/modules_command.py @@ -207,7 +207,7 @@ def modules_json_up_to_date(self): log.info(f"Recomputing commit SHA for module ...
googleapis__google-cloud-python-1773
happybase emulation docs mention private api the page at https://googlecloudplatform.github.io/gcloud-python/latest/happybase-package.html mentions `make_row()` and `make_ordered_row()`, both of which are _not_ public api. please don't mention those at all. :) (fyi: i'm the happybase author)
[ { "content": "# Copyright 2016 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 2016 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/bigtable/happybase/__init__.py b/gcloud/bigtable/happybase/__init__.py index 03e4d9215ff1..30955b8be936 100644 --- a/gcloud/bigtable/happybase/__init__.py +++ b/gcloud/bigtable/happybase/__init__.py @@ -36,10 +36,6 @@ * :meth:`Connection.compact_table() \ <gcloud.bigtable.happybase.connectio...
bokeh__bokeh-1495
Method to update data source contents in the notebook There is a reference implementation by @akloster in https://github.com/akloster/nb-bokeh-animations ``` def update_data_source(ds): id = ds.ref['id'] model = ds.ref['type'] js = """ var ds = Bokeh.Collections('{model}').get('{id}'); var ...
[ { "content": "from __future__ import absolute_import\n\nfrom ..plot_object import PlotObject\nfrom ..properties import HasProps\nfrom ..properties import Any, Int, String, Instance, List, Dict, Either\n\nclass DataSource(PlotObject):\n \"\"\" Base class for data sources \"\"\"\n # List of names of the fie...
[ { "content": "from __future__ import absolute_import\n\nfrom ..plot_object import PlotObject\nfrom ..properties import HasProps\nfrom ..properties import Any, Int, String, Instance, List, Dict, Either\n\nclass DataSource(PlotObject):\n \"\"\" Base class for data sources \"\"\"\n # List of names of the fie...
diff --git a/bokeh/models/sources.py b/bokeh/models/sources.py index 0ac62e87078..d7b3c59ea18 100644 --- a/bokeh/models/sources.py +++ b/bokeh/models/sources.py @@ -96,6 +96,19 @@ def remove(self, name): import warnings warnings.warn("Unable to find column '%s' in datasource" % name) + de...
pyro-ppl__numpyro-1418
signature error when running SA MCMC sampler in parallel the following code fails: ``` from jax.random import PRNGKey import numpyro import numpyro.distributions as dist import numpyro.infer as infer numpyro.set_platform('cpu') numpyro.set_host_device_count(4) def model(): y = numpyro.sample("y",...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom collections import namedtuple\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom typing import Callable, Dict, List, Optional\nimport warnings\n\nimport numpy as np\n\nimport jax\n...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom collections import namedtuple\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom typing import Callable, Dict, List, Optional\nimport warnings\n\nimport numpy as np\n\nimport jax\n...
diff --git a/numpyro/infer/util.py b/numpyro/infer/util.py index c4a77889e..3abae742e 100644 --- a/numpyro/infer/util.py +++ b/numpyro/infer/util.py @@ -374,7 +374,8 @@ def body_fn(state): return i + 1, key, (params, pe, z_grad), is_valid def _find_valid_params(rng_key, exit_early=False): - init_...
psf__black-2739
Custom cache directory to be thread/process safe **Is your feature request related to a problem? Please describe.** The cache files are not thread/process safe. I've checked multiple projects simultaneously in different processes but get permission errors when one process is writing to the cache while another is rea...
[ { "content": "\"\"\"Caching of formatted files with feature-based invalidation.\"\"\"\n\nimport os\nimport pickle\nfrom pathlib import Path\nimport tempfile\nfrom typing import Dict, Iterable, Set, Tuple\n\nfrom platformdirs import user_cache_dir\n\nfrom black.mode import Mode\n\nfrom _black_version import vers...
[ { "content": "\"\"\"Caching of formatted files with feature-based invalidation.\"\"\"\n\nimport os\nimport pickle\nfrom pathlib import Path\nimport tempfile\nfrom typing import Dict, Iterable, Set, Tuple\n\nfrom platformdirs import user_cache_dir\n\nfrom black.mode import Mode\n\nfrom _black_version import vers...
diff --git a/CHANGES.md b/CHANGES.md index 4f4c6a2ffc7..dc52ca34cbb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,6 +20,8 @@ - Tuple unpacking on `return` and `yield` constructs now implies 3.8+ (#2700) - Unparenthesized tuples on annotated assignments (e.g `values: Tuple[int, ...] = 1, 2, 3`) now implies 3.8+ (...
Zeroto521__my-data-toolkit-454
BLD: change pypi name from `dtoolkit` to `my-data-toolkit` 400 The name 'dtoolkit' isn't allowed. https://github.com/Zeroto521/my-data-toolkit/runs/4673018493?check_suite_focus=true
[ { "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options.\n# For a full list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n\n# -- Project information --------------------------------...
[ { "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options.\n# For a full list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n\n# -- Project information --------------------------------...
diff --git a/doc/source/conf.py b/doc/source/conf.py index b09c649ae..c09c88255 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -24,7 +24,7 @@ version = version.replace(".post0", "") -project = "DToolKit" +project = "My Data Toolkit" author = "Zero <@Zeroto521>" copyright = f"2021-{datetime.now().yea...
scrapy__scrapy-1816
PY3: Output to stdout cause TypeError in Scrapy 1.1.0rc1 ## Environment - Mac OS X 10.10.5 - Python 3.4.2 - Scrapy 1.1.0rc1 ## Steps to Reproduce 1. Save the following spider as `myspider.py`. ``` py import scrapy class BlogSpider(scrapy.Spider): name = 'blogspider' start_urls = ['htt...
[ { "content": "\"\"\"\nFeed Exports extension\n\nSee documentation in docs/topics/feed-exports.rst\n\"\"\"\n\nimport os\nimport sys\nimport logging\nimport posixpath\nfrom tempfile import TemporaryFile\nfrom datetime import datetime\nfrom six.moves.urllib.parse import urlparse\nfrom ftplib import FTP\n\nfrom zop...
[ { "content": "\"\"\"\nFeed Exports extension\n\nSee documentation in docs/topics/feed-exports.rst\n\"\"\"\n\nimport os\nimport sys\nimport logging\nimport posixpath\nfrom tempfile import TemporaryFile\nfrom datetime import datetime\nimport six\nfrom six.moves.urllib.parse import urlparse\nfrom ftplib import FTP...
diff --git a/scrapy/extensions/feedexport.py b/scrapy/extensions/feedexport.py index 6c54bd38e62..3dab2d77e57 100644 --- a/scrapy/extensions/feedexport.py +++ b/scrapy/extensions/feedexport.py @@ -10,6 +10,7 @@ import posixpath from tempfile import TemporaryFile from datetime import datetime +import six from six.mo...
open-telemetry__opentelemetry-python-3659
Prometheus exporter target_info key-value pairs must be string **Describe your environment** ... **Steps to reproduce** Prometheus expects labels to be string key-value pairs. Currently, the labels are not cast to string for the `target_info` Here is a minimal example which causes this problem: ```python im...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6106b889b17..7121b281cc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Prometheus Exporter string representation for target_info labels + ([#3659](https:/...
OpenNMT__OpenNMT-tf-153
Error when using pre-trained word embedding features System configuration: Tensorflow : 1.8.0 OpenNMT-tf: 1.5.0 I use pre-trained word embedding for training Transformer, and it can only last for one epoch and will be failed when it is constructing the model for the next epoch. Here is my code, the "embedding_fil...
[ { "content": "\"\"\"Define word-based embedders.\"\"\"\n\nimport abc\nimport collections\nimport io\nimport os\nimport shutil\nimport six\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom tensorflow.contrib.tensorboard.plugins import projector\n\nfrom google.protobuf import text_format\n\nfrom opennmt.toke...
[ { "content": "\"\"\"Define word-based embedders.\"\"\"\n\nimport abc\nimport collections\nimport io\nimport os\nimport shutil\nimport six\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom tensorflow.contrib.tensorboard.plugins import projector\n\nfrom google.protobuf import text_format\n\nfrom opennmt.toke...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9199f7232..2814ca908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ OpenNMT-tf follows [semantic versioning 2.0.0](https://semver.org/). The API cov ### Fixes and improvements +* Fix error when reloading models with target pretrained embeddings + ## [...
e-valuation__EvaP-688
Exporter only uses first contributor per type The exporter only uses the results of the first contributor per type. It should instead compute the average of all contributors per type.
[ { "content": "from evap.evaluation.models import Questionnaire\nfrom evap.evaluation.tools import calculate_results, calculate_average_grades_and_deviation, get_grade_color, get_deviation_color\n\nfrom django.utils.translation import ugettext as _\n\nfrom collections import OrderedDict\nfrom collections import ...
[ { "content": "from evap.evaluation.models import Questionnaire\nfrom evap.evaluation.tools import calculate_results, calculate_average_grades_and_deviation, get_grade_color, get_deviation_color\n\nfrom django.utils.translation import ugettext as _\n\nfrom collections import OrderedDict\nfrom collections import ...
diff --git a/evap/results/exporters.py b/evap/results/exporters.py index 293d546190..dd6d53f834 100644 --- a/evap/results/exporters.py +++ b/evap/results/exporters.py @@ -132,7 +132,6 @@ def export(self, response, ignore_not_enough_answers=False): if grade_result.average: ...
encode__uvicorn-1604
Memory leak when using request.state ### Discussed in https://github.com/encode/starlette/discussions/1748 <div type='discussions-op-text'> <sup>Originally posted by **galkahana** July 10, 2022</sup> Hi, I noticed that setting properties on request.state results in memory leak. Originally an issue I reporte...
[ { "content": "import asyncio\nimport http\nimport logging\nimport re\nimport sys\nimport urllib\nfrom asyncio.events import TimerHandle\nfrom collections import deque\nfrom typing import TYPE_CHECKING, Callable, Deque, List, Optional, Tuple, Union, cast\n\nimport httptools\n\nfrom uvicorn.config import Config\n...
[ { "content": "import asyncio\nimport http\nimport logging\nimport re\nimport sys\nimport urllib\nfrom asyncio.events import TimerHandle\nfrom collections import deque\nfrom typing import TYPE_CHECKING, Callable, Deque, List, Optional, Tuple, Union, cast\n\nimport httptools\n\nfrom uvicorn.config import Config\n...
diff --git a/uvicorn/protocols/http/h11_impl.py b/uvicorn/protocols/http/h11_impl.py index 89e550229..556b94f2e 100644 --- a/uvicorn/protocols/http/h11_impl.py +++ b/uvicorn/protocols/http/h11_impl.py @@ -145,6 +145,7 @@ def connection_lost(self, exc: Optional[Exception]) -> None: self.flow.resume_writing(...
Lightning-AI__pytorch-lightning-1718
Do not configure python logging ## 🐛 Bug pytorch-lightning right now configures the python logging module ([here](https://github.com/PyTorchLightning/pytorch-lightning/blob/8322f1b039c890b8ccdbfe29bf42056e5273d74f/pytorch_lightning/__init__.py#L16)). This is generally not recommended when writing a library as it ma...
[ { "content": "\"\"\"Root package info.\"\"\"\n\n__version__ = '0.7.5'\n__author__ = 'William Falcon et al.'\n__author_email__ = 'waf2107@columbia.edu'\n__license__ = 'Apache-2.0'\n__copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__\n__homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning'\...
[ { "content": "\"\"\"Root package info.\"\"\"\n\n__version__ = '0.7.5'\n__author__ = 'William Falcon et al.'\n__author_email__ = 'waf2107@columbia.edu'\n__license__ = 'Apache-2.0'\n__copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__\n__homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning'\...
diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 705bdfc64157e..683300419d7fc 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -34,7 +34,8 @@ import logging as python_logging _logger = python_logging.getLogger("lightning") -python_logging.basicConfig(...
aws-cloudformation__cfn-lint-2891
E2520 false positive for CloudWatch Alarm with expression ### CloudFormation Lint Version 0.80.3 ### What operating system are you using? MacOS ### Describe the bug A valid CloudWatch alarm that uses a metrics expression is resulting in an E2520 false positive. The alarm was defined in the CloudWatch co...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport cfnlint.helpers\nfrom cfnlint.data import AdditionalSpecs\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass Exclusive(CloudFormationLintRule):\n \"\"\...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport cfnlint.helpers\nfrom cfnlint.data import AdditionalSpecs\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass Exclusive(CloudFormationLintRule):\n \"\"\...
diff --git a/src/cfnlint/rules/resources/properties/Exclusive.py b/src/cfnlint/rules/resources/properties/Exclusive.py index f8d1062821..0fba566d47 100644 --- a/src/cfnlint/rules/resources/properties/Exclusive.py +++ b/src/cfnlint/rules/resources/properties/Exclusive.py @@ -40,7 +40,7 @@ def check(self, properties, exc...
djangopackages__djangopackages-948
:closed_lock_with_key: Auth Improvement **Is your feature request related to a problem? Please describe.** No. **Describe the solution you'd like** A better way to auth in order to use Django packages **Describe alternatives you've considered** N/A **Additional context** ![Screen Shot 2023-02-02 at 1 45 41...
[ { "content": "# Django settings\nimport sys\nfrom pathlib import Path\n\nimport environ\nfrom django.template.defaultfilters import slugify\n\nenv = environ.Env()\n\nPROJECT_ROOT = Path(__file__).parent.parent\n\nDEBUG = env.bool(\"DJANGO_DEBUG\", True)\nTEMPLATE_DEBUG = env.bool(\"TEMPLATE_DEBUG\", True)\nTEST...
[ { "content": "# Django settings\nimport sys\nfrom pathlib import Path\n\nimport environ\nfrom django.template.defaultfilters import slugify\n\nenv = environ.Env()\n\nPROJECT_ROOT = Path(__file__).parent.parent\n\nDEBUG = env.bool(\"DJANGO_DEBUG\", True)\nTEMPLATE_DEBUG = env.bool(\"TEMPLATE_DEBUG\", True)\nTEST...
diff --git a/settings/base.py b/settings/base.py index 178945e8a..1b62824c6 100644 --- a/settings/base.py +++ b/settings/base.py @@ -256,11 +256,12 @@ GITHUB_APP_ID = env("GITHUB_APP_ID", default="") GITHUB_TOKEN = env("GITHUB_TOKEN", default="") -SOCIAL_AUTH_GITHUB_KEY = GITHUB_APP_ID -SOCIAL_AUTH_GITHUB_SECRET = ...
getsentry__sentry-python-309
Send events without proxy when http_proxy is configured as env variable Hi, I have problem with configuration of sentry_sdk. My code is behind corporate proxy and `http_proxy` is configured on machine as env variable (required when I want to install something via pip for example). Also I have env variable `no_proxy` ...
[ { "content": "from __future__ import print_function\n\nimport json\nimport io\nimport urllib3 # type: ignore\nimport certifi\nimport gzip\n\nfrom datetime import datetime, timedelta\n\nfrom sentry_sdk.consts import VERSION\nfrom sentry_sdk.utils import Dsn, logger, capture_internal_exceptions\nfrom sentry_sdk....
[ { "content": "from __future__ import print_function\n\nimport json\nimport io\nimport urllib3 # type: ignore\nimport certifi\nimport gzip\n\nfrom datetime import datetime, timedelta\n\nfrom sentry_sdk.consts import VERSION\nfrom sentry_sdk.utils import Dsn, logger, capture_internal_exceptions\nfrom sentry_sdk....
diff --git a/sentry_sdk/transport.py b/sentry_sdk/transport.py index fe6c41cd70..fc071f0df6 100644 --- a/sentry_sdk/transport.py +++ b/sentry_sdk/transport.py @@ -156,10 +156,15 @@ def _make_pool( ca_certs, # type: Optional[Any] ): # type: (...) -> Union[PoolManager, ProxyManager] - # Use...
doccano__doccano-1558
Mutli-label text classification export issues: same classes but in different orders How to reproduce the behaviour --------- <!-- Before submitting an issue, make sure to check the docs and closed issues and FAQ to see if any of the solutions work for you. https://github.com/doccano/doccano/wiki/Frequently-Asked-Ques...
[ { "content": "import abc\nimport csv\nimport itertools\nimport json\nimport os\nimport uuid\nimport zipfile\nfrom collections import defaultdict\nfrom typing import Dict, Iterable, Iterator, List\n\nfrom .data import Record\n\n\nclass BaseWriter:\n\n def __init__(self, tmpdir: str):\n self.tmpdir = tm...
[ { "content": "import abc\nimport csv\nimport itertools\nimport json\nimport os\nimport uuid\nimport zipfile\nfrom collections import defaultdict\nfrom typing import Dict, Iterable, Iterator, List\n\nfrom .data import Record\n\n\nclass BaseWriter:\n\n def __init__(self, tmpdir: str):\n self.tmpdir = tm...
diff --git a/backend/api/tests/download/test_writer.py b/backend/api/tests/download/test_writer.py index 2c48cb9220..720244dd2d 100644 --- a/backend/api/tests/download/test_writer.py +++ b/backend/api/tests/download/test_writer.py @@ -32,6 +32,16 @@ def test_create_line(self): } self.assertEqual(line,...
cisagov__manage.get.gov-1395
Add a filter for "status" to the `DomainInvitation` model in Django admin ### Story As a registrar team member I want to be able to look at domain invitations that are retrieved so that I can monitor domain manager uptake ### Acceptance Criteria - [ ] Add a filter on the "status" field to the Django admin view o...
[ { "content": "import logging\nfrom django import forms\nfrom django.http import HttpResponse\nfrom django_fsm import get_available_FIELD_transitions\nfrom django.contrib import admin, messages\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.contrib.auth.models import Group\nfrom d...
[ { "content": "import logging\nfrom django import forms\nfrom django.http import HttpResponse\nfrom django_fsm import get_available_FIELD_transitions\nfrom django.contrib import admin, messages\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.contrib.auth.models import Group\nfrom d...
diff --git a/src/registrar/admin.py b/src/registrar/admin.py index c059e5674..6585d602a 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -344,6 +344,12 @@ class UserDomainRoleAdmin(ListHeaderAdmin): class DomainInvitationAdmin(ListHeaderAdmin): """Custom domain invitation admin class.""" + ...
scrapy__scrapy-1769
PY3: Output to stdout cause TypeError in Scrapy 1.1.0rc1 ## Environment - Mac OS X 10.10.5 - Python 3.4.2 - Scrapy 1.1.0rc1 ## Steps to Reproduce 1. Save the following spider as `myspider.py`. ``` py import scrapy class BlogSpider(scrapy.Spider): name = 'blogspider' start_urls = ['htt...
[ { "content": "\"\"\"\nFeed Exports extension\n\nSee documentation in docs/topics/feed-exports.rst\n\"\"\"\n\nimport os\nimport sys\nimport logging\nimport posixpath\nfrom tempfile import TemporaryFile\nfrom datetime import datetime\nfrom six.moves.urllib.parse import urlparse\nfrom ftplib import FTP\n\nfrom zop...
[ { "content": "\"\"\"\nFeed Exports extension\n\nSee documentation in docs/topics/feed-exports.rst\n\"\"\"\n\nimport os\nimport sys\nimport logging\nimport posixpath\nfrom tempfile import TemporaryFile\nfrom datetime import datetime\nimport six\nfrom six.moves.urllib.parse import urlparse\nfrom ftplib import FTP...
diff --git a/scrapy/extensions/feedexport.py b/scrapy/extensions/feedexport.py index daea551cbf2..fce5e251b0e 100644 --- a/scrapy/extensions/feedexport.py +++ b/scrapy/extensions/feedexport.py @@ -10,6 +10,7 @@ import posixpath from tempfile import TemporaryFile from datetime import datetime +import six from six.mo...
interactions-py__interactions.py-1199
[REQUEST] Add event listener for bot disconnect ### Describe the feature. I am currently developing my own Discord bot using interactions.py, however due to my internet not being the best, the bot tends to go offline randomly. I would like to know when the bot goes offline, and adding an event listener to listen for b...
[ { "content": "try:\n from orjson import dumps, loads\nexcept ImportError:\n from json import dumps, loads\n\nfrom asyncio import (\n FIRST_COMPLETED,\n Event,\n Lock,\n Task,\n TimeoutError,\n create_task,\n get_event_loop,\n get_running_loop,\n new_event_loop,\n wait,\n w...
[ { "content": "try:\n from orjson import dumps, loads\nexcept ImportError:\n from json import dumps, loads\n\nfrom asyncio import (\n FIRST_COMPLETED,\n Event,\n Lock,\n Task,\n TimeoutError,\n create_task,\n get_event_loop,\n get_running_loop,\n new_event_loop,\n wait,\n w...
diff --git a/docs/events.rst b/docs/events.rst index 9699056d0..4af7801f4 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -52,6 +52,7 @@ There are several different internal events: - ``raw_socket_create`` - ``on_start`` + - ``on_disconnect`` - ``on_interaction`` - ``on_command`` - `...
ckan__ckan-7871
current_user.is_anonymous doesn't care if context has an user ## CKAN version 2.10 ## Describe the bug While looking into why https://github.com/ckan/ckan/pull/7266 started failing on unmodified ckan, I noticed that deciphering anonymous users has changed. On 2.9 `restrict_anon` works as follows https://github.c...
[ { "content": "# encoding: utf-8\n\n'''\nHelper functions to be used in the auth check functions\n'''\n\nfrom typing import Any, Optional, TYPE_CHECKING, overload\nfrom typing_extensions import Literal\n\nimport ckan.logic as logic\nfrom ckan.types import Context, AuthResult, DataDict\nfrom ckan.common import cu...
[ { "content": "# encoding: utf-8\n\n'''\nHelper functions to be used in the auth check functions\n'''\n\nfrom typing import Any, Optional, TYPE_CHECKING, overload\nfrom typing_extensions import Literal\n\nimport ckan.logic as logic\nimport ckan.authz as authz\nfrom ckan.types import Context, AuthResult, DataDict...
diff --git a/changes/7871.bugfix b/changes/7871.bugfix new file mode 100644 index 00000000000..6a0f2ec1d72 --- /dev/null +++ b/changes/7871.bugfix @@ -0,0 +1 @@ +Fixed restricting anonymous users in actions to check user in context. diff --git a/ckan/logic/auth/__init__.py b/ckan/logic/auth/__init__.py index 2daced86c2...
py-pdf__pypdf-69
Multiple definitions in dictionary error Getting a Multiple definitions in dictionary at byte 0x3ee546 for key /CPUCstFn1 for file http://docs.cpuc.ca.gov/PublishedDocs/Efile/G000/M075/K768/75768464.PDF when doing reader.getPage() The file opens without an issue in Foxit.
[ { "content": "# vim: sw=4:expandtab:foldmethod=marker\n#\n# Copyright (c) 2006, Mathieu Fenniak\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are\n# met:\n#\n# * Redistributions of source cod...
[ { "content": "# vim: sw=4:expandtab:foldmethod=marker\n#\n# Copyright (c) 2006, Mathieu Fenniak\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are\n# met:\n#\n# * Redistributions of source cod...
diff --git a/PyPDF2/generic.py b/PyPDF2/generic.py index 92193625d..3e14ca229 100644 --- a/PyPDF2/generic.py +++ b/PyPDF2/generic.py @@ -587,11 +587,8 @@ def readFromStream(stream, pdf): tok = readNonWhitespace(stream) stream.seek(-1, 1) value = readObject(stream, pdf) - ...
pymodbus-dev__pymodbus-921
AttributeError: module 'asyncio' has no attribute 'exceptions' ``` Traceback (most recent call last): File "/home//.local/bin/pymodbus.server", line 6, in <module> from pymodbus.repl.server.main import server File "/home//.local/lib/python3.7/site-packages/pymodbus/repl/server/main.py", line 16, in <module>...
[ { "content": "\"\"\"Repl server main.\n\nCopyright (c) 2020 by RiptideIO\nAll rights reserved.\n\"\"\"\nimport sys\nimport logging\nimport asyncio\nimport json\nimport click\nfrom pymodbus.framer.socket_framer import ModbusSocketFramer\nfrom pymodbus.server.reactive.main import (\n ReactiveServer,\n DEFAU...
[ { "content": "\"\"\"Repl server main.\n\nCopyright (c) 2020 by RiptideIO\nAll rights reserved.\n\"\"\"\nimport logging\nimport asyncio\nimport json\nimport click\nfrom pymodbus.framer.socket_framer import ModbusSocketFramer\nfrom pymodbus.server.reactive.main import (\n ReactiveServer,\n DEFAULT_FRAMER,\n...
diff --git a/pymodbus/repl/server/main.py b/pymodbus/repl/server/main.py index 243fb591f..cbd4f6435 100644 --- a/pymodbus/repl/server/main.py +++ b/pymodbus/repl/server/main.py @@ -3,7 +3,6 @@ Copyright (c) 2020 by RiptideIO All rights reserved. """ -import sys import logging import asyncio import json @@ -17,10 ...
bids-standard__pybids-328
Warn or error on misspecified (or changed due to pybids changes) target value Going through the tutorial I saw that ```python # See all modality labels in this dataset layout.get(return_type='id', target='modality') ``` is no longer producing any output (well - returns an empty list) although before was reporting...
[ { "content": "import os\nimport re\nimport json\nimport warnings\nfrom io import open\nfrom .validation import BIDSValidator\nfrom .. import config as cf\nfrom grabbit import Layout, File\nfrom grabbit.external import six, inflect\nfrom grabbit.utils import listify\nfrom collections import defaultdict\nfrom fun...
[ { "content": "import os\nimport re\nimport json\nimport warnings\nfrom io import open\nfrom .validation import BIDSValidator\nfrom .. import config as cf\nfrom grabbit import Layout, File\nfrom grabbit.external import six, inflect\nfrom grabbit.utils import listify\nfrom collections import defaultdict\nfrom fun...
diff --git a/bids/layout/layout.py b/bids/layout/layout.py index c76246314..0e4874b70 100644 --- a/bids/layout/layout.py +++ b/bids/layout/layout.py @@ -397,6 +397,18 @@ def get(self, return_type='object', target=None, extensions=None, else: md_kwargs[k] = v + # Provide some sugge...
yt-project__yt-4637
BLD: oldest-supported-numpy is now unneeded Since numpy 1.25, building backward compatible wheels against newer versions of numpy is supported, see: https://numpy.org/doc/stable/release/1.25.0-notes.html#compiling-against-the-numpy-c-api-is-now-backwards-compatible-by-default As a result, `oldest-supported-numpy` w...
[ { "content": "import contextlib\nimport glob\nimport logging\nimport os\nimport platform\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom textwrap import dedent\nfrom concurrent.futures import ThreadPoolExecutor\nfrom distutils.ccompiler import CCompiler, new_compiler\nfrom distutils.sysconf...
[ { "content": "import contextlib\nimport glob\nimport logging\nimport os\nimport platform\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom textwrap import dedent\nfrom concurrent.futures import ThreadPoolExecutor\nfrom distutils.ccompiler import CCompiler, new_compiler\nfrom distutils.sysconf...
diff --git a/pyproject.toml b/pyproject.toml index 7183172ee29..5c15dccf3c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,11 @@ requires = [ # see https://github.com/yt-project/yt/issues/4044 "Cython>=3.0, <3.1", + # TODO: simplify requirement after numpy 1.26.0 final is released - "oldest-sup...
pypa__pip-392
"pip freeze -r" returns ValueError() if requirements file contains --find-links It seems that pip freeze should not pass --find-links or --index-url to distribute/setuptools when inlined in a requirements file. Here is an easy way to repro the problem: 1) echo "--find-links http://foo.bar/" > /tmp/req.txt 2) pip freez...
[ { "content": "import re\nimport sys\nimport pkg_resources\nimport pip\nfrom pip.req import InstallRequirement\nfrom pip.log import logger\nfrom pip.basecommand import Command\nfrom pip.util import get_installed_distributions\n\n\nclass FreezeCommand(Command):\n name = 'freeze'\n usage = '%prog [OPTIONS]'\...
[ { "content": "import re\nimport sys\nimport pkg_resources\nimport pip\nfrom pip.req import InstallRequirement\nfrom pip.log import logger\nfrom pip.basecommand import Command\nfrom pip.util import get_installed_distributions\n\n\nclass FreezeCommand(Command):\n name = 'freeze'\n usage = '%prog [OPTIONS]'\...
diff --git a/pip/commands/freeze.py b/pip/commands/freeze.py index 01b5df934f4..03ac80f55d1 100644 --- a/pip/commands/freeze.py +++ b/pip/commands/freeze.py @@ -85,7 +85,9 @@ def run(self, options, args): elif (line.startswith('-r') or line.startswith('--requirement') or line.sta...
spack__spack-37431
lua@5.4.5: could not find any remote versions for lua, cannot fetch ### Steps to reproduce the issue Using `spack@develop` (e6d37b3b612617c02700ac3500d5eed7602011f0 from `Thu May 4 13:48:24 2023 +0200`): ``` $> spack info lua ... MakefilePackage: lua Description: The Lua programming language interprete...
[ { "content": "# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport glob\nimport os\n\nimport spack.build_environment\nfrom spack.package import *\nfrom spa...
[ { "content": "# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport glob\nimport os\n\nimport spack.build_environment\nfrom spack.package import *\nfrom spa...
diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 9ebbb41619f96a..fbe125cee29a41 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -200,7 +200,6 @@ class Lua(LuaImplPackage): homep...
kedro-org__kedro-186
ParquetGCSDataSet crashes with `'PurePosixPath' object has no attribute 'startswith'` ## Description ParquetGCSDataSet has been introduced in the recent Kedro 0.15.5 release ( https://github.com/quantumblacklabs/kedro/blob/develop/RELEASE.md ). I suppose no one noticed that invalidate_cache takes a string ( https://...
[ { "content": "# Copyright 2018-2019 QuantumBlack Visual Analytics Limited\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 2018-2019 QuantumBlack Visual Analytics Limited\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/RELEASE.md b/RELEASE.md index 99c1de67c1..ef600cdb81 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,12 +5,14 @@ ## Bug fixes and other changes +* * Fixed a bug in the `invalidate_cache` method of `ParquetGCSDataSet` and `CSVGCSDataSet`. ## Breaking changes to the API ## Thanks for supporting c...
astronomer__astro-sdk-420
Add `__repr__` to all our classes **Reference**: - https://stackoverflow.com/questions/1436703/what-is-the-difference-between-str-and-repr Currently, without `__repr__`, if you create an instance of a Database class and print it out, it will give the memory address as shown below. ```python >>> from astro.databas...
[ { "content": "from abc import ABC\nfrom typing import List, Optional, Tuple\n\nimport pandas as pd\nimport sqlalchemy\nfrom airflow.hooks.base import BaseHook\n\nfrom astro.constants import (\n DEFAULT_CHUNK_SIZE,\n AppendConflictStrategy,\n ExportExistsStrategy,\n LoadExistStrategy,\n)\nfrom astro....
[ { "content": "from abc import ABC\nfrom typing import List, Optional, Tuple\n\nimport pandas as pd\nimport sqlalchemy\nfrom airflow.hooks.base import BaseHook\n\nfrom astro.constants import (\n DEFAULT_CHUNK_SIZE,\n AppendConflictStrategy,\n ExportExistsStrategy,\n LoadExistStrategy,\n)\nfrom astro....
diff --git a/src/astro/databases/base.py b/src/astro/databases/base.py index c9a620d761..c41b1c540c 100644 --- a/src/astro/databases/base.py +++ b/src/astro/databases/base.py @@ -46,6 +46,9 @@ class BaseDatabase(ABC): def __init__(self, conn_id: str): self.conn_id = conn_id + def __repr__(self): + ...
ytdl-org__youtube-dl-3089
AttributeError in ard module With the command given below, I get the error message below. I'm using version 2014.06.09. `youtube-dl http://www.ardmediathek.de/tv/Klassiker-der-Weltliteratur/Max-Frisch/BR-alpha/Video\?documentId\=19067308\&bcastId\=14913194` ``` [ARD] 19067308: Downloading webpage [ARD] 19067308: Down...
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n)\n\n\nclass ARDIE(InfoExtractor):\n _VALID_URL = r'^https?://(?:(?:www\\.)?ardmediathek\\.de|mediathek\\.daserste\\.de)/(?...
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n)\n\n\nclass ARDIE(InfoExtractor):\n _VALID_URL = r'^https?://(?:(?:www\\.)?ardmediathek\\.de|mediathek\\.daserste\\.de)/(?...
diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py index c6d22c029ef..b36a4d46a6d 100644 --- a/youtube_dl/extractor/ard.py +++ b/youtube_dl/extractor/ard.py @@ -56,7 +56,18 @@ def _real_extract(self, url): raise ExtractorError('This video is only available after 20:00') f...
yt-project__yt-4533
FileNotFoundError - InMemoryFITSFile error related to FITSDataset <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** Hello! I'm trying to convert a 3D radi...
[ { "content": "import os\nimport time\nimport uuid\nimport warnings\nimport weakref\nfrom collections import defaultdict\nfrom functools import cached_property\nfrom typing import Type\n\nimport numpy as np\nimport numpy.core.defchararray as np_char\nfrom more_itertools import always_iterable\n\nfrom yt.config i...
[ { "content": "import os\nimport time\nimport uuid\nimport warnings\nimport weakref\nfrom collections import defaultdict\nfrom functools import cached_property\nfrom typing import Type\n\nimport numpy as np\nimport numpy.core.defchararray as np_char\nfrom more_itertools import always_iterable\n\nfrom yt.config i...
diff --git a/yt/frontends/fits/data_structures.py b/yt/frontends/fits/data_structures.py index 70ab2248eae..7f1b67f09bf 100644 --- a/yt/frontends/fits/data_structures.py +++ b/yt/frontends/fits/data_structures.py @@ -426,9 +426,16 @@ def _set_code_unit_attributes(self): self.magnetic_unit.convert_to_units("gau...
chainer__chainer-441
Behavior of `mod` for int is inconsistent ``` >>> x=cupy.array(0, dtype=cupy.int32) >>> 3 % x array(3) >>> x=numpy.array(0, dtype=numpy.int32) >>> 3 % x __main__:1: RuntimeWarning: divide by zero encountered in remainder 0 ``` This behavior is written in the numpy document. > Returns 0 when x2 is 0 and both x1 and x2...
[ { "content": "import six\n\nfrom cupy import elementwise\nfrom cupy.math import ufunc\n\n\nadd = ufunc.create_arithmetic(\n 'add', '+', '|',\n '''Adds two arrays elementwise.\n\n .. seealso:: :data:`numpy.add`\n\n ''')\n\n\nreciprocal = elementwise.create_ufunc(\n 'cupy_reciprocal',\n ('b', 'B...
[ { "content": "import six\n\nfrom cupy import elementwise\nfrom cupy.math import ufunc\n\n\nadd = ufunc.create_arithmetic(\n 'add', '+', '|',\n '''Adds two arrays elementwise.\n\n .. seealso:: :data:`numpy.add`\n\n ''')\n\n\nreciprocal = elementwise.create_ufunc(\n 'cupy_reciprocal',\n ('b', 'B...
diff --git a/cupy/math/arithmetic.py b/cupy/math/arithmetic.py index fdaae2b02453..b62b83595a26 100644 --- a/cupy/math/arithmetic.py +++ b/cupy/math/arithmetic.py @@ -148,8 +148,11 @@ remainder = elementwise.create_ufunc( 'cupy_remainder', ('bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', 'll->l', 'LL->...
streamlink__streamlink-5758
plugins.twitch: is_bad_bot=true in headless mode (forced integrity-token acquirement) ### Checklist - [X] This is a bug report and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose) - [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob...
[ { "content": "\"\"\"\n$description Global live-streaming and video hosting social platform owned by Amazon.\n$url twitch.tv\n$type live, vod\n$metadata id\n$metadata author\n$metadata category\n$metadata title\n$notes See the :ref:`Authentication <cli/plugins/twitch:Authentication>` docs on how to prevent ads.\...
[ { "content": "\"\"\"\n$description Global live-streaming and video hosting social platform owned by Amazon.\n$url twitch.tv\n$type live, vod\n$metadata id\n$metadata author\n$metadata category\n$metadata title\n$notes See the :ref:`Authentication <cli/plugins/twitch:Authentication>` docs on how to prevent ads.\...
diff --git a/src/streamlink/plugins/twitch.py b/src/streamlink/plugins/twitch.py index 736f12bb02f..0a2eed22dd5 100644 --- a/src/streamlink/plugins/twitch.py +++ b/src/streamlink/plugins/twitch.py @@ -565,7 +565,12 @@ async def acquire_client_integrity_token(client: CDPClient): return await client_...
espnet__espnet-3257
Disable attention plot with a command line parameter **Describe the bug** I'm training on clusters, but the machines don't have libpng installed. Since I don't really need the attention plot, I want to just disable the plot. However, I cannot find a way to disable that. **To Reproduce** Steps to reproduce the beha...
[ { "content": "import argparse\nfrom contextlib import contextmanager\nimport dataclasses\nfrom dataclasses import is_dataclass\nfrom distutils.version import LooseVersion\nimport logging\nfrom pathlib import Path\nimport time\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import List\nfrom t...
[ { "content": "import argparse\nfrom contextlib import contextmanager\nimport dataclasses\nfrom dataclasses import is_dataclass\nfrom distutils.version import LooseVersion\nimport logging\nfrom pathlib import Path\nimport time\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import List\nfrom t...
diff --git a/espnet2/train/trainer.py b/espnet2/train/trainer.py index 5d86bbb7d45..10b90155d78 100644 --- a/espnet2/train/trainer.py +++ b/espnet2/train/trainer.py @@ -331,7 +331,8 @@ def run( if not distributed_option.distributed or distributed_option.dist_rank == 0: # 3. Report the resu...
openai__gym-2646
[Bug Report] AttributeError: 'Discrete' object has no attribute 'start' **Describe the bug** Change in https://github.com/openai/gym/pull/2470 introduced a bug when loading pre-trained agents with previous version of gym. Fix is probably similar to https://github.com/DLR-RM/stable-baselines3/issues/573 ... **C...
[ { "content": "from typing import Optional\n\nimport numpy as np\nfrom .space import Space\n\n\nclass Discrete(Space[int]):\n r\"\"\"A discrete space in :math:`\\{ 0, 1, \\\\dots, n-1 \\}`.\n\n A start value can be optionally specified to shift the range\n to :math:`\\{ a, a+1, \\\\dots, a+n-1 \\}`.\n\n...
[ { "content": "from typing import Optional\n\nimport numpy as np\nfrom .space import Space\n\n\nclass Discrete(Space[int]):\n r\"\"\"A discrete space in :math:`\\{ 0, 1, \\\\dots, n-1 \\}`.\n\n A start value can be optionally specified to shift the range\n to :math:`\\{ a, a+1, \\\\dots, a+n-1 \\}`.\n\n...
diff --git a/gym/spaces/discrete.py b/gym/spaces/discrete.py index 08403f83938..6c09e5718b4 100644 --- a/gym/spaces/discrete.py +++ b/gym/spaces/discrete.py @@ -12,7 +12,7 @@ class Discrete(Space[int]): Example:: - >>> Discrete(2) + >>> Discrete(2) # {0, 1} >>> Discrete(3, sta...
huggingface__text-generation-inference-661
GPTQ Continuous Batching not working ### System Info I pulled the latest commits few hrs back and built the docker image locally. I tried to use the gptq models such as Bloke 33b with the new changes to TGI regarding gptq. I am able to inference with the model but it seems to only server 1 request at a time. I tried t...
[ { "content": "import argparse\nimport time\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport math\nimport json\nimport os\n\nfrom texttable import Texttable\nfrom transformers import AutoModelForCausalLM, AutoConfig, AutoTokenizer\nimport transformers\nfrom huggingface_hub import HfApi\nimport nu...
[ { "content": "import argparse\nimport time\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport math\nimport json\nimport os\n\nfrom texttable import Texttable\nfrom transformers import AutoModelForCausalLM, AutoConfig, AutoTokenizer\nimport transformers\nfrom huggingface_hub import HfApi\nimport nu...
diff --git a/server/text_generation_server/utils/gptq/quantize.py b/server/text_generation_server/utils/gptq/quantize.py index d182456f7c0..8f4fb93d6aa 100644 --- a/server/text_generation_server/utils/gptq/quantize.py +++ b/server/text_generation_server/utils/gptq/quantize.py @@ -812,10 +812,13 @@ def inner(module, arg...
python-discord__bot-936
Invite Filter Raises on Invalid Invites Currently, if the [`_has_invites`](https://github.com/python-discord/bot/blob/007f771b9cdf9de608920feea7f0e4a98b61fcab/bot/cogs/filtering.py#L290) catches an invalid/expired/etc. link it returns `True`, which motors down the filtering logic to a point where we're expecting a dict...
[ { "content": "import logging\nimport re\nfrom typing import Optional, Union\n\nimport discord.errors\nfrom dateutil.relativedelta import relativedelta\nfrom discord import Colour, Member, Message, TextChannel\nfrom discord.ext.commands import Cog\nfrom discord.utils import escape_markdown\n\nfrom bot.bot import...
[ { "content": "import logging\nimport re\nfrom typing import Optional, Union\n\nimport discord.errors\nfrom dateutil.relativedelta import relativedelta\nfrom discord import Colour, Member, Message, TextChannel\nfrom discord.ext.commands import Cog\nfrom discord.utils import escape_markdown\n\nfrom bot.bot import...
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py index 1e21a4ce36..1d9fddb127 100644 --- a/bot/cogs/filtering.py +++ b/bot/cogs/filtering.py @@ -214,7 +214,9 @@ async def _filter_message(self, msg: Message, delta: Optional[int] = None) -> No additional_embeds = None ...
internetarchive__openlibrary-6846
Add notification bubble on Main Nav for super-librarians # pending MRs <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> ### Describe the problem that you'd like solved <!-- A clear and concise description of what you want to happen. --> Options are to add a bu...
[ { "content": "import datetime\nimport json\nfrom typing import Optional\nimport web\n\nfrom infogami.utils.view import public\n\nfrom openlibrary.i18n import gettext as _\n\nfrom . import db\n\n\n@public\ndef get_status_for_view(status_code: int) -> str:\n \"\"\"Returns localized status string that correspon...
[ { "content": "import datetime\nimport json\nfrom typing import Optional\nimport web\n\nfrom infogami.utils.view import public\n\nfrom openlibrary.i18n import gettext as _\nfrom openlibrary.core import cache\nfrom openlibrary.utils import dateutil\n\nfrom . import db\n\n\n@public\ndef get_status_for_view(status_...
diff --git a/openlibrary/core/edits.py b/openlibrary/core/edits.py index 56d110e259e..9192136be1f 100644 --- a/openlibrary/core/edits.py +++ b/openlibrary/core/edits.py @@ -6,6 +6,8 @@ from infogami.utils.view import public from openlibrary.i18n import gettext as _ +from openlibrary.core import cache +from openlibr...
dask__dask-8732
[upstream/build] Groupby mean result index doesn't preserve bool dtype <!-- Please include a self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report: - Craft Minimal Bug Reports http://matthewrocklin.co...
[ { "content": "from __future__ import annotations\n\nimport warnings\nfrom typing import Iterable\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import (\n is_categorical_dtype,\n is_datetime64tz_dtype,\n is_interval_dtype,\n is_period_dtype,\n is_scalar,\n is_sparse,\n un...
[ { "content": "from __future__ import annotations\n\nimport warnings\nfrom typing import Iterable\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import (\n is_categorical_dtype,\n is_datetime64tz_dtype,\n is_interval_dtype,\n is_period_dtype,\n is_scalar,\n is_sparse,\n un...
diff --git a/dask/dataframe/backends.py b/dask/dataframe/backends.py index e8ee26ed6a3..a502e9039d8 100644 --- a/dask/dataframe/backends.py +++ b/dask/dataframe/backends.py @@ -194,7 +194,13 @@ def _nonempty_index(idx): elif idx.is_numeric(): return typ([1, 2], name=idx.name) elif typ is pd.Index: - ...
kartoza__prj.app-116
Wrong links to images from entry page If I open an entry page, for example http://changelog.linfiniti.com/qgis/2.8/entry/more-responsive-browser/ and then click on the image I get server error 404 because the link is pointing to /qgis/2.8/entry/<entry name>/images/entries/<hash>.<ext> instead of /media/i...
[ { "content": "# coding=utf-8\n\"\"\"\ncore.settings.base\n\"\"\"\n# Django settings for projecta project.\n\nfrom .utils import absolute_path\n\nADMINS = (\n ('Tim Sutton', 'tim@linfiniti.com'),\n)\nSERVER_EMAIL = 'tim@linfiniti.com'\nEMAIL_HOST = 'localhost'\nDEFAULT_FROM_EMAIL = 'tim@linfiniti.com'\n\nMANA...
[ { "content": "# coding=utf-8\n\"\"\"\ncore.settings.base\n\"\"\"\n# Django settings for projecta project.\n\nfrom .utils import absolute_path\n\nADMINS = (\n ('Tim Sutton', 'tim@linfiniti.com'),\n)\nSERVER_EMAIL = 'tim@linfiniti.com'\nEMAIL_HOST = 'localhost'\nDEFAULT_FROM_EMAIL = 'tim@linfiniti.com'\n\nMANA...
diff --git a/django_project/base/templates/project/includes/project-panel.html b/django_project/base/templates/project/includes/project-panel.html index 5436230da..9d97b870a 100644 --- a/django_project/base/templates/project/includes/project-panel.html +++ b/django_project/base/templates/project/includes/project-panel....
pypa__virtualenv-2165
"ValueError: too many values to unpack (expected 2)" when running `python3 -m virtualenv xxx -p python3.8 ` **Issue** ``` python3 -m virtualenv xxx -p python3.7 # Fails with "ValueError: too many values to unpack (expected 2)" python3 -m virtualenv xxx -p python3.8 # Fails with "ValueError: too many values to u...
[ { "content": "\"\"\"\nThe PythonInfo contains information about a concrete instance of a Python interpreter\n\nNote: this file is also used to query target interpreters, so can only use standard library methods\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport json\nimport logging\nimpor...
[ { "content": "\"\"\"\nThe PythonInfo contains information about a concrete instance of a Python interpreter\n\nNote: this file is also used to query target interpreters, so can only use standard library methods\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport json\nimport logging\nimpor...
diff --git a/docs/changelog/2165.bugfix.rst b/docs/changelog/2165.bugfix.rst new file mode 100644 index 000000000..081bc3f34 --- /dev/null +++ b/docs/changelog/2165.bugfix.rst @@ -0,0 +1 @@ +Fix unpacking dictionary items in PythonInfo.install_path diff --git a/src/virtualenv/discovery/py_info.py b/src/virtualenv/disco...
ansible__ansible-38125
Remove edgeos modules from Ansible-Maintained list ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME edgeos_config ##### ANSIBLE VERSION 2.5 and higher ##### SUMMARY We've mistakenly included two `edgeos` modules in the list of Ansible-maintained network modules. We do not maintain those module...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2018 Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nANSIBLE_METADATA = {'metadat...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2018 Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nANSIBLE_METADATA = {'metadat...
diff --git a/lib/ansible/modules/network/edgeos/edgeos_config.py b/lib/ansible/modules/network/edgeos/edgeos_config.py index 6ca11069d6ad98..4ebe7022528f13 100644 --- a/lib/ansible/modules/network/edgeos/edgeos_config.py +++ b/lib/ansible/modules/network/edgeos/edgeos_config.py @@ -9,7 +9,7 @@ ANSIBLE_METADATA = {'m...
kymatio__kymatio-650
sphinx inverses colors... no clue why, but it can wait v3. cf here: https://www.kymat.io/gallery_2d/plot_scattering_disk.html#sphx-glr-gallery-2d-plot-scattering-disk-py https://www.kymat.io/gallery_2d/plot_invert_scattering_torch.html#sphx-glr-gallery-2d-plot-invert-scattering-torch-py
[ { "content": "\"\"\"\nScattering disk display\n=======================\nThis script reproduces concentric circles that encode Scattering coefficient's\nenergy as described in \"Invariant Scattering Convolution Networks\" by Bruna and Mallat.\nHere, for the sake of simplicity, we only consider first order scatte...
[ { "content": "\"\"\"\nScattering disk display\n=======================\nThis script reproduces concentric circles that encode Scattering coefficient's\nenergy as described in \"Invariant Scattering Convolution Networks\" by Bruna and Mallat.\nHere, for the sake of simplicity, we only consider first order scatte...
diff --git a/examples/2d/plot_invert_scattering_torch.py b/examples/2d/plot_invert_scattering_torch.py index 9af475d37..749c4a4c7 100644 --- a/examples/2d/plot_invert_scattering_torch.py +++ b/examples/2d/plot_invert_scattering_torch.py @@ -32,7 +32,7 @@ plt.title("Original image") src_img = np.moveaxis(src_img, -1...
aio-libs__aiohttp-2326
match_info missing in cloned request ## Long story short I am cloning the given request object when there is a special header `X-Method-Override` so that my users can bypass some overly-restrictive firewalls that doesn't allow HTTP methods other than GET/POST. To implement this feature, I wrote a middleware like ...
[ { "content": "import asyncio\nimport collections\nimport datetime\nimport json\nimport re\nimport socket\nimport string\nimport tempfile\nimport types\nimport warnings\nfrom email.utils import parsedate\nfrom types import MappingProxyType\nfrom urllib.parse import parse_qsl\n\nfrom multidict import CIMultiDict,...
[ { "content": "import asyncio\nimport collections\nimport datetime\nimport json\nimport re\nimport socket\nimport string\nimport tempfile\nimport types\nimport warnings\nfrom email.utils import parsedate\nfrom types import MappingProxyType\nfrom urllib.parse import parse_qsl\n\nfrom multidict import CIMultiDict,...
diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py index 933e6e5c52e..c2042515dc0 100644 --- a/aiohttp/web_request.py +++ b/aiohttp/web_request.py @@ -605,6 +605,18 @@ def __init__(self, *args, **kwargs): # or information about traversal lookup self._match_info = None # initialized after ro...
WordPress__openverse-api-860
Remove Sentry DSN from repository ## Problem <!-- Describe a problem solved by this feature; or delete the section entirely. --> If someone configures their local environment correctly, they can send scary (and hard to discern) errors to Sentry that we can easily mistake for production issues. It's not likely that an...
[ { "content": "\"\"\"\nDjango settings for catalog project.\n\nGenerated by 'django-admin startproject' using Django 2.0.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2...
[ { "content": "\"\"\"\nDjango settings for catalog project.\n\nGenerated by 'django-admin startproject' using Django 2.0.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2...
diff --git a/api/catalog/settings.py b/api/catalog/settings.py index 3af838aca..71bfd52f2 100644 --- a/api/catalog/settings.py +++ b/api/catalog/settings.py @@ -337,13 +337,11 @@ # https://docs.djangoproject.com/en/4.0/releases/4.0/#csrf-trusted-origins-changes-4-0 CSRF_TRUSTED_ORIGINS = ["https://*.openverse.enginee...
vacanza__python-holidays-1466
Clean up package build log warnings Take care of a bunch of ``` check.warn(importable) /private/var/folders/wr/zbdvblqs5fqff7xr1gqgg03c0000gn/T/build-env-v7q9lxn2/lib/python3.11/site-packages/setuptools/command/build_py.py:204: _Warning: Package 'holidays.locale.uk.LC_MESSAGES' is absent from the `packages` conf...
[ { "content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro...
[ { "content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro...
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 099b60c77..f5f26b89a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,11 +60,6 @@ repos: hooks: - id: tox-ini-fmt - - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.4.0 - hooks: - - id: set...
networkx__networkx-5048
`edgelist` is ignored when drawing selfloops An issue with self-loop drawing was identified in the discussion in #4991. The `edgelist` parameter for `nx.draw_networkx_edges` is not properly handled for self-loop drawing. ### Steps to Reproduce ```python >>> import matplotlib.pyplot as plt >>> G = nx.path_graph(...
[ { "content": "\"\"\"\n**********\nMatplotlib\n**********\n\nDraw networks with matplotlib.\n\nExamples\n--------\n>>> G = nx.complete_graph(5)\n>>> nx.draw(G)\n\nSee Also\n--------\n - :doc:`matplotlib <matplotlib:index>`\n - :func:`matplotlib.pyplot.scatter`\n - :obj:`matplotlib.patches.FancyArrowPatch`\n\"\"\...
[ { "content": "\"\"\"\n**********\nMatplotlib\n**********\n\nDraw networks with matplotlib.\n\nExamples\n--------\n>>> G = nx.complete_graph(5)\n>>> nx.draw(G)\n\nSee Also\n--------\n - :doc:`matplotlib <matplotlib:index>`\n - :func:`matplotlib.pyplot.scatter`\n - :obj:`matplotlib.patches.FancyArrowPatch`\n\"\"\...
diff --git a/networkx/drawing/nx_pylab.py b/networkx/drawing/nx_pylab.py index e66d0c3a492..bbffab22478 100644 --- a/networkx/drawing/nx_pylab.py +++ b/networkx/drawing/nx_pylab.py @@ -852,10 +852,10 @@ def _connectionstyle(posA, posB, *args, **kwargs): # Draw the edges if use_linecollection: edge_vi...
searxng__searxng-1869
Duckduckgo weather formatting error **Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG** 2022.10.01-901143f0 **How did you install SearXNG?** Script **What happened?** Humidity formatting has floating point error, 14+ numbers after decimal. Stuff like `56.00...
[ { "content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"DuckDuckGo Weather\"\"\"\n\nfrom json import loads\nfrom urllib.parse import quote\n\nfrom datetime import datetime\nfrom flask_babel import gettext\n\nabout = {\n \"website\": 'https://duckduckgo.com/',\n \"wikidata_id\": '...
[ { "content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"DuckDuckGo Weather\"\"\"\n\nfrom json import loads\nfrom urllib.parse import quote\n\nfrom datetime import datetime\nfrom flask_babel import gettext\n\nabout = {\n \"website\": 'https://duckduckgo.com/',\n \"wikidata_id\": '...
diff --git a/searx/engines/duckduckgo_weather.py b/searx/engines/duckduckgo_weather.py index d0f34d60f11..0540cbcb525 100644 --- a/searx/engines/duckduckgo_weather.py +++ b/searx/engines/duckduckgo_weather.py @@ -39,12 +39,12 @@ def generate_condition_table(condition): res += ( f"<tr><td>{gettext('Wind'...
doccano__doccano-2089
data task error * Operating System:ubuntu22 * Python Version Used:3.9 * When you install doccano:2022-12-04 * How did you install doccano (Heroku button etc):pip install doccano <img width="732" alt="image" src="https://user-images.githubusercontent.com/43643599/205482588-64111fa6-23bc-4c19-ade7-a7fb4532b...
[ { "content": "import argparse\nimport multiprocessing\nimport os\nimport platform\nimport sys\nfrom pathlib import Path\n\nimport django\nfrom django.core import management\nfrom environs import Env\n\nfrom .config.celery import app\n\nenv = Env()\nDOCCANO_HOME = os.path.expanduser(os.environ.get(\"DOCCANO_HOME...
[ { "content": "import argparse\nimport multiprocessing\nimport os\nimport platform\nimport sys\nfrom pathlib import Path\n\nimport django\nfrom django.core import management\nfrom environs import Env\n\nfrom .config.celery import app\n\nenv = Env()\nDOCCANO_HOME = os.path.expanduser(os.environ.get(\"DOCCANO_HOME...
diff --git a/backend/cli.py b/backend/cli.py index 5272c5f027..d531c64c76 100644 --- a/backend/cli.py +++ b/backend/cli.py @@ -155,7 +155,7 @@ def main(): # Create a parser for task queue. parser_queue = subparsers.add_parser("task", help="see `task -h`") parser_queue.add_argument("--concurrency", type=i...
jazzband__pip-tools-1649
`@ git+` requirements with backtracking resolver can result in pins to local wheel cache If an `@ git+` requirement is present in pip's wheel cache, `pip-compile --resolver backtracking` will pin to `@ file://....whl`. (Moved from https://github.com/jazzband/pip-tools/pull/1539#issuecomment-1170845933. `@ git+` pinn...
[ { "content": "import collections\nimport copy\nfrom abc import ABCMeta, abstractmethod\nfrom functools import partial\nfrom itertools import chain, count, groupby\nfrom typing import (\n Any,\n Container,\n DefaultDict,\n Dict,\n Iterable,\n Iterator,\n List,\n Optional,\n Set,\n T...
[ { "content": "import collections\nimport copy\nfrom abc import ABCMeta, abstractmethod\nfrom functools import partial\nfrom itertools import chain, count, groupby\nfrom typing import (\n Any,\n Container,\n DefaultDict,\n Dict,\n Iterable,\n Iterator,\n List,\n Optional,\n Set,\n T...
diff --git a/piptools/resolver.py b/piptools/resolver.py index bb85a20e6..09263c74b 100644 --- a/piptools/resolver.py +++ b/piptools/resolver.py @@ -751,7 +751,14 @@ def _get_install_requirement_from_candidate( # Prepare pinned install requirement. Copy it from candidate's install # requirement so t...
docker__docker-py-1694
client.networks.create check_duplicates docs not reflective of behavior Docs say it does, but it's actually set to `None`.
[ { "content": "from ..errors import InvalidVersion\nfrom ..utils import check_resource, minimum_version\nfrom ..utils import version_lt\nfrom .. import utils\n\n\nclass NetworkApiMixin(object):\n @minimum_version('1.21')\n def networks(self, names=None, ids=None, filters=None):\n \"\"\"\n Lis...
[ { "content": "from ..errors import InvalidVersion\nfrom ..utils import check_resource, minimum_version\nfrom ..utils import version_lt\nfrom .. import utils\n\n\nclass NetworkApiMixin(object):\n @minimum_version('1.21')\n def networks(self, names=None, ids=None, filters=None):\n \"\"\"\n Lis...
diff --git a/docker/api/network.py b/docker/api/network.py index 5549bf0cf..befbb583c 100644 --- a/docker/api/network.py +++ b/docker/api/network.py @@ -52,7 +52,7 @@ def create_network(self, name, driver=None, options=None, ipam=None, options (dict): Driver options as a key-value dictionary i...
encode__httpx-1259
Confusing error messages when passing in the wrong URL type https://github.com/encode/httpx/blob/642aabdac093cf9798f4881cbdd8b39bd3398bb5/httpx/_models.py#L74 Say, for example, we're using a Starlette API which features a URL type: https://github.com/encode/starlette/blob/c566fc6c819f0d565f8cff432351fe009e83d866/st...
[ { "content": "import cgi\nimport contextlib\nimport datetime\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nimport warnings\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, quote, unquote, urlenco...
[ { "content": "import cgi\nimport contextlib\nimport datetime\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nimport warnings\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, quote, unquote, urlenco...
diff --git a/httpx/_models.py b/httpx/_models.py index 17ba955890..5b6a9b6571 100644 --- a/httpx/_models.py +++ b/httpx/_models.py @@ -71,8 +71,12 @@ def __init__(self, url: URLTypes = "", params: QueryParamTypes = None) -> None: # We don't want to normalize relative URLs, since doing so ...
NVIDIA__NeMo-5260
Fix links to speaker identification notebook # What does this PR do ? Fixes #5258 **Collection**: [Note which collection this PR will affect] # Changelog - Add specific line by line info of high level changes in this PR. # Usage * You can potentially add a usage example below ```python # Add a code s...
[ { "content": "# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
[ { "content": "# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
diff --git a/examples/speaker_tasks/recognition/README.md b/examples/speaker_tasks/recognition/README.md index f6c84e6e68c6..0e0f5ae3b4fc 100644 --- a/examples/speaker_tasks/recognition/README.md +++ b/examples/speaker_tasks/recognition/README.md @@ -29,14 +29,14 @@ For training ecapa_tdnn (channel-attention) model: `...
NVIDIA__NeMo-5261
Fix links to speaker identification notebook # What does this PR do ? Fixes #5258 **Collection**: [Note which collection this PR will affect] # Changelog - Add specific line by line info of high level changes in this PR. # Usage * You can potentially add a usage example below ```python # Add a code s...
[ { "content": "# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
[ { "content": "# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
diff --git a/examples/speaker_tasks/recognition/README.md b/examples/speaker_tasks/recognition/README.md index f6c84e6e68c6..0e0f5ae3b4fc 100644 --- a/examples/speaker_tasks/recognition/README.md +++ b/examples/speaker_tasks/recognition/README.md @@ -29,14 +29,14 @@ For training ecapa_tdnn (channel-attention) model: `...
keras-team__keras-18720
Doc: AdamW docstring is different from documentation on keras and tensorflow website From [Keras](https://keras.io/api/optimizers/adamw/) documentation on AdamW: > weight_decay: Float, defaults to None. If set, weight decay is applied. However, the AdamW constructor raises a ValueError if `weight_decay` is None ...
[ { "content": "import re\nimport warnings\n\nfrom keras import backend\nfrom keras import initializers\nfrom keras import ops\nfrom keras.optimizers.schedules import learning_rate_schedule\nfrom keras.saving import serialization_lib\nfrom keras.utils import tracking\nfrom keras.utils.naming import auto_name\n\n\...
[ { "content": "import re\nimport warnings\n\nfrom keras import backend\nfrom keras import initializers\nfrom keras import ops\nfrom keras.optimizers.schedules import learning_rate_schedule\nfrom keras.saving import serialization_lib\nfrom keras.utils import tracking\nfrom keras.utils.naming import auto_name\n\n\...
diff --git a/keras/optimizers/base_optimizer.py b/keras/optimizers/base_optimizer.py index 7ecd669d00d3..a0a94d2a340b 100644 --- a/keras/optimizers/base_optimizer.py +++ b/keras/optimizers/base_optimizer.py @@ -698,7 +698,7 @@ def __setattr__(self, name, value): base_optimizer_keyword_args = """name: String. The name ...
openshift__openshift-ansible-7919
OpenShift 3.9 origin install on aws fails memory_availability check due to skopeo not finding etcd on registry.access.redhat.com #### Description Provide a brief description of your issue here. For example: On a simple AWS CentOS install, memory availability check fails as follows: CHECK [memory_availability ...
[ { "content": "\"\"\"Check that required Docker images are available.\"\"\"\n\nimport re\nfrom pipes import quote\nfrom ansible.module_utils import six\nfrom openshift_checks import OpenShiftCheck\nfrom openshift_checks.mixins import DockerHostMixin\n\n\nNODE_IMAGE_SUFFIXES = [\"haproxy-router\", \"docker-regist...
[ { "content": "\"\"\"Check that required Docker images are available.\"\"\"\n\nimport re\nfrom pipes import quote\nfrom ansible.module_utils import six\nfrom openshift_checks import OpenShiftCheck\nfrom openshift_checks.mixins import DockerHostMixin\n\n\nNODE_IMAGE_SUFFIXES = [\"haproxy-router\", \"docker-regist...
diff --git a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py index c8c791fc451..db11aa617a0 100644 --- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py +++ b/roles/openshift_health_c...
PrefectHQ__prefect-433
Flows should not revert to PENDING after one run Currently, the FlowRunner assigns a PENDING state to a flow that ran but did not complete. This creates statefulness issues in settings with multiple FlowRunners, because any one FlowRunner doesn't have the ability to declare that the others are no longer RUNNING. ...
[ { "content": "# Licensed under LICENSE.md; also available at https://www.prefect.io/licenses/alpha-eula\n\nimport functools\nfrom collections import defaultdict\nfrom typing import Any, Callable, Dict, Iterable, Set, Union\n\nimport prefect\nfrom prefect import config\nfrom prefect.client import Client\nfrom pr...
[ { "content": "# Licensed under LICENSE.md; also available at https://www.prefect.io/licenses/alpha-eula\n\nimport functools\nfrom collections import defaultdict\nfrom typing import Any, Callable, Dict, Iterable, Set, Union\n\nimport prefect\nfrom prefect import config\nfrom prefect.client import Client\nfrom pr...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 978c840fc349..814d6457b9f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ - The `set_temporary_config` utility now accepts a single dict of multiple config values, instead of just a key/value pair, and is located in `utilities.configuration` - [#401](https...
unionai-oss__pandera-1216
Use of hypothesis type annotations forces downstream projects to install hypothesis **Describe the bug** A clear and concise description of what the bug is. - [x] I have checked that this issue has not already been reported. - [ ] I have confirmed this bug exists on the latest version of pandera. - [x] (optional) I ha...
[ { "content": "# pylint: disable=no-value-for-parameter,too-many-lines\n\"\"\"Generate synthetic data from a schema definition.\n\n*new in 0.6.0*\n\nThis module is responsible for generating data based on the type and check\nconstraints specified in a ``pandera`` schema. It's built on top of the\n`hypothesis <ht...
[ { "content": "# pylint: disable=no-value-for-parameter,too-many-lines\n\"\"\"Generate synthetic data from a schema definition.\n\n*new in 0.6.0*\n\nThis module is responsible for generating data based on the type and check\nconstraints specified in a ``pandera`` schema. It's built on top of the\n`hypothesis <ht...
diff --git a/pandera/strategies/pandas_strategies.py b/pandera/strategies/pandas_strategies.py index ef03068b1..f5e5cf318 100644 --- a/pandera/strategies/pandas_strategies.py +++ b/pandera/strategies/pandas_strategies.py @@ -20,6 +20,7 @@ Any, Callable, Dict, + Generic, List, Optional, ...
statsmodels__statsmodels-2013
DataFrame with bool type not cast correctly. From the mailing list. Replication ``` sm.Logit(np.random.randint(2, size=50), pandas.DataFrame(sm.add_constant(np.random.randint(2, size=50).astype(bool)))).fit() ``` dtype bug object arrays (raises in clustered standard errors code) I ran into this bug while trying to ge...
[ { "content": "\"\"\"\nBase tools for handling various kinds of data structures, attaching metadata to\nresults, and doing data cleaning\n\"\"\"\nfrom statsmodels.compat.python import reduce, iteritems, lmap, zip, range\nfrom statsmodels.compat.numpy import np_matrix_rank\nimport numpy as np\nfrom pandas import ...
[ { "content": "\"\"\"\nBase tools for handling various kinds of data structures, attaching metadata to\nresults, and doing data cleaning\n\"\"\"\nfrom statsmodels.compat.python import reduce, iteritems, lmap, zip, range\nfrom statsmodels.compat.numpy import np_matrix_rank\nimport numpy as np\nfrom pandas import ...
diff --git a/statsmodels/base/data.py b/statsmodels/base/data.py index 3f4700dedf7..23086aa913d 100644 --- a/statsmodels/base/data.py +++ b/statsmodels/base/data.py @@ -368,6 +368,16 @@ class PandasData(ModelData): Data handling class which knows how to reattach pandas metadata to model results """ + + ...
nltk__nltk-782
BLEU score returns 1 (perfect match) instead of zero Hi, taken from bleu implementation: ``` python @staticmethod def compute(candidate, references, weights): candidate = [c.lower() for c in candidate] references = [[r.lower() for r in reference] for reference in references] p_ns = (B...
[ { "content": "# -*- coding: utf-8 -*-\n# Natural Language Toolkit: BLEU\n#\n# Copyright (C) 2001-2013 NLTK Project\n# Authors: Chin Yee Lee, Hengfeng Li, Ruxin Hou, Calvin Tanujaya Lim\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\nfrom __future__ import division\n\nimport math\n\nfro...
[ { "content": "# -*- coding: utf-8 -*-\n# Natural Language Toolkit: BLEU\n#\n# Copyright (C) 2001-2013 NLTK Project\n# Authors: Chin Yee Lee, Hengfeng Li, Ruxin Hou, Calvin Tanujaya Lim\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\nfrom __future__ import division\n\nimport math\n\nfro...
diff --git a/nltk/align/bleu.py b/nltk/align/bleu.py index ac70f0f498..d0482ca307 100644 --- a/nltk/align/bleu.py +++ b/nltk/align/bleu.py @@ -132,7 +132,13 @@ def compute(candidate, references, weights): references = [[r.lower() for r in reference] for reference in references] p_ns = (BLEU.modified...
PrefectHQ__prefect-11999
no import statement for wait_for_flow_run ### First check - [X] I added a descriptive title to this issue. - [X] I used GitHub search to find a similar request and didn't find it 😇 ### Describe the issue There is no import statement for wait_for_flow_run so typing this code into pycharm shows wait_for_flow_r...
[ { "content": "from typing import Optional\nfrom uuid import UUID\n\nimport anyio\n\nfrom prefect.client.orchestration import PrefectClient\nfrom prefect.client.schemas import FlowRun\nfrom prefect.client.utilities import inject_client\nfrom prefect.exceptions import FlowRunWaitTimeout\nfrom prefect.logging impo...
[ { "content": "from typing import Optional\nfrom uuid import UUID\n\nimport anyio\n\nfrom prefect.client.orchestration import PrefectClient\nfrom prefect.client.schemas import FlowRun\nfrom prefect.client.utilities import inject_client\nfrom prefect.exceptions import FlowRunWaitTimeout\nfrom prefect.logging impo...
diff --git a/src/prefect/flow_runs.py b/src/prefect/flow_runs.py index e221acbf9ab7..436e8887f45d 100644 --- a/src/prefect/flow_runs.py +++ b/src/prefect/flow_runs.py @@ -38,6 +38,7 @@ async def wait_for_flow_run( import asyncio from prefect import get_client + from prefect.flow_r...
pallets__click-1186
ipython notebook support fo colored output hi, currently click strips colors when used in code invoked by ipython notebooks after a short chat on the ipython notebook channel i learned that a commonly suggested workaround is `click.utils.should_strip_ansi = lambda *k, **kw: False` and that a reasonably reliable ...
[ { "content": "import re\nimport io\nimport os\nimport sys\nimport codecs\nfrom weakref import WeakKeyDictionary\n\n\nPY2 = sys.version_info[0] == 2\nCYGWIN = sys.platform.startswith('cygwin')\n# Determine local App Engine environment, per Google's own suggestion\nAPP_ENGINE = ('APPENGINE_RUNTIME' in os.environ ...
[ { "content": "import re\nimport io\nimport os\nimport sys\nimport codecs\nfrom weakref import WeakKeyDictionary\n\n\nPY2 = sys.version_info[0] == 2\nCYGWIN = sys.platform.startswith('cygwin')\n# Determine local App Engine environment, per Google's own suggestion\nAPP_ENGINE = ('APPENGINE_RUNTIME' in os.environ ...
diff --git a/click/_compat.py b/click/_compat.py index 1ad18ec99..85f41523b 100644 --- a/click/_compat.py +++ b/click/_compat.py @@ -570,11 +570,23 @@ def strip_ansi(value): return _ansi_re.sub('', value) +def _is_jupyter_kernel_output(stream): + if WIN: + # TODO: Couldn't test on Windows, should't t...
pre-commit__pre-commit-1363
cache + virtualenv>=20 / python_venv + moving executables -> File not found: ... python failure mode looks something like this: ``` Check for added large files..............................................Failed - hook id: check-added-large-files - exit code: 1 Executable `/Users/runner/.cache/pre-commit/repo1...
[ { "content": "import contextlib\nimport functools\nimport os\nimport sys\nfrom typing import Callable\nfrom typing import ContextManager\nfrom typing import Generator\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nimport pre_commit.constants as C\nfrom pre_commit.envconte...
[ { "content": "import contextlib\nimport functools\nimport os\nimport sys\nfrom typing import Callable\nfrom typing import ContextManager\nfrom typing import Generator\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nimport pre_commit.constants as C\nfrom pre_commit.envconte...
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py index caa779489..5073a8bce 100644 --- a/pre_commit/languages/python.py +++ b/pre_commit/languages/python.py @@ -158,10 +158,12 @@ def in_env( yield def healthy(prefix: Prefix, language_version: str) -> bool: + envdir...