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 ⌀ |
|---|---|---|---|---|
bentoml__BentoML-4665 | feature: Allow removal of server header
### Feature request
Currently the server header is being exposed with the value 'uvicorn'. This does not pose an immediate security threat. However it exposes implementation details that could potentially aid bad actors in targeting specific software. Minimizing such disclosures... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport os\nimport typing as t\n\nimport click\n\n\n@click.command()\n@click.argument(\"bento_identifier\", type=click.STRING, required=False, default=\".\")\n@click.option(\"--service-name\", type=click.STRING, required=False, default=\"\")\n@clic... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport os\nimport typing as t\n\nimport click\n\n\n@click.command()\n@click.argument(\"bento_identifier\", type=click.STRING, required=False, default=\".\")\n@click.option(\"--service-name\", type=click.STRING, required=False, default=\"\")\n@clic... | diff --git a/src/_bentoml_impl/worker/service.py b/src/_bentoml_impl/worker/service.py
index 9d42bd5178c..e4c4a3a0c5c 100644
--- a/src/_bentoml_impl/worker/service.py
+++ b/src/_bentoml_impl/worker/service.py
@@ -192,6 +192,7 @@ def main(
ssl_keyfile=ssl_keyfile,
ssl_keyfile_password=ssl_keyfile_passw... |
Mailu__Mailu-2034 | Timezone in containers
Hello,
I have seen that timezones are not set for containers. This causes logs to have wrong timestamps and email "received" headers have wrong timezones.
It should be possible to set the timezone for all containers. The setting should be exposed and described in the .env file.
| [
{
"content": "import os\n\nfrom datetime import timedelta\nfrom socrate import system\nimport ipaddress\n\nDEFAULT_CONFIG = {\n # Specific to the admin UI\n 'DOCKER_SOCKET': 'unix:///var/run/docker.sock',\n 'BABEL_DEFAULT_LOCALE': 'en',\n 'BABEL_DEFAULT_TIMEZONE': 'UTC',\n 'BOOTSTRAP_SERVE_LOCAL'... | [
{
"content": "import os\n\nfrom datetime import timedelta\nfrom socrate import system\nimport ipaddress\n\nDEFAULT_CONFIG = {\n # Specific to the admin UI\n 'DOCKER_SOCKET': 'unix:///var/run/docker.sock',\n 'BABEL_DEFAULT_LOCALE': 'en',\n 'BABEL_DEFAULT_TIMEZONE': 'UTC',\n 'BOOTSTRAP_SERVE_LOCAL'... | diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile
index a4f284812..8dda76d2d 100644
--- a/core/admin/Dockerfile
+++ b/core/admin/Dockerfile
@@ -23,9 +23,11 @@ RUN set -eu \
FROM $DISTRO
COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
+ENV TZ Etc/UTC
+
# python3 shar... |
searx__searx-1093 | [bug] Python 3.6 Autocomplete not work
Use searx with archlinux and python 3.6 [https://aur.archlinux.org/packages/searx-py3](https://aur.archlinux.org/packages/searx-py3)
Autocomplete not working, log :
```
rv = self.dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dis... | [
{
"content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i... | [
{
"content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i... | diff --git a/searx/query.py b/searx/query.py
index 7acdd543d1..e4483f188f 100644
--- a/searx/query.py
+++ b/searx/query.py
@@ -51,7 +51,7 @@ def parse_query(self):
self.query_parts = []
# split query, including whitespaces
- raw_query_parts = re.split(r'(\s+)', self.query)
+ raw_query_... |
ocadotechnology__aimmo-543 | Latest minikube not starting on Travis CI
Same issue and hopefully fix as this https://github.com/kubernetes/minikube/issues/2704
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\n\nimport versioneer\n\nsetup(\n name='aimmo',\n cmdclass=versioneer.get_cmdclass(),\n packages=find_packages(),\n include_package_data=True,\n install_requires=[\n 'django >= 1.8.3, < 1.9.0',\n 'djan... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\n\nimport versioneer\n\nsetup(\n name='aimmo',\n cmdclass=versioneer.get_cmdclass(),\n packages=find_packages(),\n include_package_data=True,\n install_requires=[\n 'django >= 1.8.3, < 1.9.0',\n 'djan... | diff --git a/.travis.yml b/.travis.yml
index 6bd3b6844..c66d7333b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,7 +20,7 @@ jobs:
# Download kubectl, which is a requirement for using minikube.
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/linux/amd64/ku... |
docker__docker-py-832 | decode_auth function does not handle utf-8 logins or password
HI
I have found that the function **decode_auth** (line 96, [file](https://github.com/docker/docker-py/blob/master/docker/auth/auth.py)) fails when decoding UTF-8 passwords from the .dockercfg file, and **load_config** returning an empty config.
I have che... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index 2ed894ee7..416dd7c47 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -96,7 +96,7 @@ def decode_auth(auth):
auth = auth.encode('ascii')
s = base64.b64decode(auth)
login, pwd = s.split(b':', 1)
- return login.decode('ascii'),... |
wemake-services__wemake-python-styleguide-2067 | Python 3.10: ImportError
### What's wrong
Trying to run the code and getting the following exception:
```
ImportError: cannot import name 'Hashable' from 'collections'
```
### How it should be
There should be no exception, the import should be properly handled for Python 3.10
### Flake8 version and plugins
Not ... | [
{
"content": "import ast\nimport re\nimport string\nfrom collections import Counter, Hashable, defaultdict\nfrom contextlib import suppress\nfrom typing import (\n ClassVar,\n DefaultDict,\n FrozenSet,\n List,\n Optional,\n Sequence,\n Union,\n)\nfrom typing.re import Pattern\n\nfrom typing... | [
{
"content": "import ast\nimport re\nimport string\nfrom collections import Counter, defaultdict\nfrom collections.abc import Hashable\nfrom contextlib import suppress\nfrom typing import (\n ClassVar,\n DefaultDict,\n FrozenSet,\n List,\n Optional,\n Sequence,\n Union,\n)\nfrom typing.re i... | diff --git a/wemake_python_styleguide/visitors/ast/builtins.py b/wemake_python_styleguide/visitors/ast/builtins.py
index c17d318e0..810759ac8 100644
--- a/wemake_python_styleguide/visitors/ast/builtins.py
+++ b/wemake_python_styleguide/visitors/ast/builtins.py
@@ -1,7 +1,8 @@
import ast
import re
import string
-from... |
pantsbuild__pants-18537 | Failure while parsing pyprojectenvironment markers
**Describe the bug**
I'm unable to generate a lockfile when using `poetry_requirements` because environment markers fail to parse. I've created a minimal repro [here](https://gist.github.com/bobthemighty/2298ff9c7eb6bd295a43fda7565dfb75), which _does_ generate a lo... | [
{
"content": "# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nimport urllib.parse\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom... | [
{
"content": "# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nimport urllib.parse\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom... | diff --git a/src/python/pants/backend/python/macros/poetry_requirements.py b/src/python/pants/backend/python/macros/poetry_requirements.py
index 435c2ebe8c9..2d709f4a52f 100644
--- a/src/python/pants/backend/python/macros/poetry_requirements.py
+++ b/src/python/pants/backend/python/macros/poetry_requirements.py
@@ -254... |
ivy-llc__ivy-13210 | not_equal
| [
{
"content": "# global\nimport ivy\nfrom ivy import with_supported_dtypes, with_unsupported_dtypes\nfrom ivy.functional.frontends.tensorflow import check_tensorflow_casting\nfrom ivy.functional.frontends.tensorflow.func_wrapper import (\n to_ivy_arrays_and_back,\n handle_tf_dtype,\n to_ivy_dtype,\n)\n\... | [
{
"content": "# global\nimport ivy\nfrom ivy import with_supported_dtypes, with_unsupported_dtypes\nfrom ivy.functional.frontends.tensorflow import check_tensorflow_casting\nfrom ivy.functional.frontends.tensorflow.func_wrapper import (\n to_ivy_arrays_and_back,\n handle_tf_dtype,\n to_ivy_dtype,\n)\n\... | diff --git a/ivy/functional/frontends/tensorflow/math.py b/ivy/functional/frontends/tensorflow/math.py
index 4c3df6401ddce..0d8c23391ee1e 100644
--- a/ivy/functional/frontends/tensorflow/math.py
+++ b/ivy/functional/frontends/tensorflow/math.py
@@ -402,6 +402,12 @@ def equal(x, y, name=None):
return ivy.equal(x, y... |
databricks__koalas-1959 | plot does not work in Ubuntu
Plotting with `matplotlib` 3.3.0+ causes an exception because of Pillow dependency added at https://github.com/matplotlib/matplotlib/commit/370e9a2d5d9e637abc90b3270d368642c69f66c6#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7 on Ubuntu:
```python
import databric... | [
{
"content": "#!/usr/bin/env python\n\n#\n# Copyright (C) 2019 Databricks, 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-... | [
{
"content": "#!/usr/bin/env python\n\n#\n# Copyright (C) 2019 Databricks, 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-... | diff --git a/docs/source/getting_started/install.rst b/docs/source/getting_started/install.rst
index ba86c0c562..6c2870cf70 100644
--- a/docs/source/getting_started/install.rst
+++ b/docs/source/getting_started/install.rst
@@ -124,7 +124,7 @@ Package Required version
`pandas` >=0.23.2
`pyspark` >=2.4.0... |
alltheplaces__alltheplaces-316 | Wendy's
e.g. https://locations.wendys.com/jamestown-ny-3438
| [
{
"content": "import scrapy\nimport re\nimport json\nfrom locations.items import GeojsonPointItem\n\nDAY_MAPPING = {\n 'Monday': 'Mo',\n 'Tuesday': 'Tu',\n 'Wednesday': 'We',\n 'Thursday': 'Th',\n 'Friday': 'Fr',\n 'Saturday': 'Sa',\n 'Sunday': 'Su'\n}\n\n\nclass WendysSpider(scrapy.Spider)... | [
{
"content": "import scrapy\nimport re\nimport json\nfrom locations.items import GeojsonPointItem\n\nDAY_MAPPING = {\n 'Monday': 'Mo',\n 'Tuesday': 'Tu',\n 'Wednesday': 'We',\n 'Thursday': 'Th',\n 'Friday': 'Fr',\n 'Saturday': 'Sa',\n 'Sunday': 'Su'\n}\n\n\nclass WendysSpider(scrapy.Spider)... | diff --git a/locations/spiders/wendys.py b/locations/spiders/wendys.py
index 0ff95a60991..12d81f95046 100644
--- a/locations/spiders/wendys.py
+++ b/locations/spiders/wendys.py
@@ -18,7 +18,7 @@ class WendysSpider(scrapy.Spider):
name = "wendys"
allowed_domains = ["locations.wendys.com"]
- download_delay... |
pantsbuild__pants-18536 | Failure while parsing pyprojectenvironment markers
**Describe the bug**
I'm unable to generate a lockfile when using `poetry_requirements` because environment markers fail to parse. I've created a minimal repro [here](https://gist.github.com/bobthemighty/2298ff9c7eb6bd295a43fda7565dfb75), which _does_ generate a lo... | [
{
"content": "# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nimport urllib.parse\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom... | [
{
"content": "# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nimport urllib.parse\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom... | diff --git a/src/python/pants/backend/python/macros/poetry_requirements.py b/src/python/pants/backend/python/macros/poetry_requirements.py
index 1b550b91125..8d8d494fb86 100644
--- a/src/python/pants/backend/python/macros/poetry_requirements.py
+++ b/src/python/pants/backend/python/macros/poetry_requirements.py
@@ -254... |
openstates__openstates-scrapers-1736 | CA: email issue
State: CA
(via contact)
I’d like to call your attention to an error on your email address listings for State Senators in California. Your database lists an address in the form of senator.lastname@sen.ca.gov, whereas the correct email is senator.lastname@senator.ca.gov.
It does appear that Senat... | [
{
"content": "import re\nimport collections\nimport unicodedata\nfrom operator import methodcaller\n\nimport lxml.html\n\nfrom billy.scrape.legislators import LegislatorScraper, Legislator\n\n\ndef parse_address(s, split=re.compile(r'[;,]\\s{,3}').split):\n '''\n Extract address fields from text.\n '''... | [
{
"content": "import re\nimport collections\nimport unicodedata\nfrom operator import methodcaller\n\nimport lxml.html\n\nfrom billy.scrape.legislators import LegislatorScraper, Legislator\n\n\ndef parse_address(s, split=re.compile(r'[;,]\\s{,3}').split):\n '''\n Extract address fields from text.\n '''... | diff --git a/openstates/ca/legislators.py b/openstates/ca/legislators.py
index 68af8f543f..a6e2c46e99 100644
--- a/openstates/ca/legislators.py
+++ b/openstates/ca/legislators.py
@@ -244,5 +244,4 @@ def _construct_email(self, chamber, full_name):
if chamber == 'lower':
return 'assemblymember.' + ... |
localstack__localstack-4901 | bug: API Gateway base-path-mappings don't work for the (none) path
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
When creating base-path-mappings on an API Gateway, there is a special `(none)` path when you don't specify a path during creation. Localstack sto... | [
{
"content": "import json\nimport logging\nimport re\nfrom typing import Any, Dict, List, Tuple\n\nfrom jsonpatch import apply_patch\nfrom jsonpointer import JsonPointerException\nfrom moto.apigateway import models as apigateway_models\nfrom moto.apigateway.utils import create_id as create_resource_id\nfrom req... | [
{
"content": "import json\nimport logging\nimport re\nfrom typing import Any, Dict, List, Tuple\n\nfrom jsonpatch import apply_patch\nfrom jsonpointer import JsonPointerException\nfrom moto.apigateway import models as apigateway_models\nfrom moto.apigateway.utils import create_id as create_resource_id\nfrom req... | diff --git a/localstack/services/apigateway/helpers.py b/localstack/services/apigateway/helpers.py
index 93e2b517f67d6..d407cf27e9fb9 100644
--- a/localstack/services/apigateway/helpers.py
+++ b/localstack/services/apigateway/helpers.py
@@ -443,6 +443,7 @@ def delete_base_path_mapping(path):
def handle_base_path_m... |
holoviz__panel-3485 | Panel tries to use unexpectedly Django, while executing in Jupyterlab
#### ALL software version info
windows 10, pip install
<details>
Package Version
----------------------------- ------------
adodbapi 2.6.1.3
affine 2.3.1
aiofiles ... | [
{
"content": "\"\"\"\nThe io module contains utilities for loading JS components, embedding\nmodel state, and rendering panel objects.\n\"\"\"\nimport sys\n\nfrom .callbacks import PeriodicCallback # noqa\nfrom .document import init_doc, unlocked, with_lock # noqa\nfrom .embed import embed_state # noqa\nfrom .l... | [
{
"content": "\"\"\"\nThe io module contains utilities for loading JS components, embedding\nmodel state, and rendering panel objects.\n\"\"\"\nimport sys\n\nfrom .callbacks import PeriodicCallback # noqa\nfrom .document import init_doc, unlocked, with_lock # noqa\nfrom .embed import embed_state # noqa\nfrom .l... | diff --git a/panel/io/__init__.py b/panel/io/__init__.py
index ba8a9215c9..1c1593300b 100644
--- a/panel/io/__init__.py
+++ b/panel/io/__init__.py
@@ -22,7 +22,10 @@
else:
from .server import serve # noqa
if 'django' in sys.modules:
- from . import django # noqa
+ try:
+ from . impor... |
HypothesisWorks__hypothesis-1455 | Problem on OSX py2.7
We have got a problem on OSX py2.7 build for conda-forge packages:
https://travis-ci.org/conda-forge/hypothesis-feedstock/jobs/410755174
The rest of OSX builds are fine.
Support and test Django 2.1
[Django 2.1 was released on the first of August](https://docs.djangoproject.com/en/2.1/releases/2.1... | [
{
"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f... | [
{
"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f... | diff --git a/.travis.yml b/.travis.yml
index d7a3c19cfc..20d700dff8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -66,6 +66,7 @@ jobs:
- env: TASK=check-pytest30
- env: TASK=check-faker070
- env: TASK=check-faker-latest
+ - env: TASK=check-django21
- env: TASK=check-django20
- env: TASK=chec... |
akvo__akvo-rsr-1941 | Project up REST resource broken
## Test plan
The `/rest/v1/project_up/` resource should not give an error.
## Sentry
See http://sentry.support.akvo-ops.org/rsr/live/group/743/
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nfr... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nfr... | diff --git a/akvo/rest/views/project.py b/akvo/rest/views/project.py
index ad7619d4ea..745b8b4f34 100644
--- a/akvo/rest/views/project.py
+++ b/akvo/rest/views/project.py
@@ -136,7 +136,7 @@ class ProjectUpViewSet(ProjectViewSet):
'partners',
).prefetch_related(
'publishingstatus',
- 'upda... |
hydroshare__hydroshare-2401 | Discover page: search box does NOT obey SOLR syntax
The helpful text that suggests that SOLR syntax works in the search box has been wrong for over a year. It now tokenizes terms and is not compatible with SOLR syntax.
| [
{
"content": "from haystack.forms import FacetedSearchForm\nfrom haystack.query import SQ, SearchQuerySet\nfrom crispy_forms.layout import *\nfrom crispy_forms.bootstrap import *\nfrom django import forms\n\nclass DiscoveryForm(FacetedSearchForm):\n NElat = forms.CharField(widget = forms.HiddenInput(), requi... | [
{
"content": "from haystack.forms import FacetedSearchForm\nfrom haystack.query import SQ\nfrom django import forms\n\nclass DiscoveryForm(FacetedSearchForm):\n NElat = forms.CharField(widget = forms.HiddenInput(), required=False)\n NElng = forms.CharField(widget = forms.HiddenInput(), required=False)\n ... | diff --git a/hs_core/discovery_form.py b/hs_core/discovery_form.py
index f0aefeeebf..40afb0c703 100644
--- a/hs_core/discovery_form.py
+++ b/hs_core/discovery_form.py
@@ -1,7 +1,5 @@
from haystack.forms import FacetedSearchForm
-from haystack.query import SQ, SearchQuerySet
-from crispy_forms.layout import *
-from cri... |
hpcaitech__ColossalAI-3896 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
| [
{
"content": "import os\nimport sys\nfrom typing import List\n\nimport click\nimport torch\nfrom packaging import version\n\nfrom colossalai.context import Config\n\nfrom .hostinfo import HostInfo, HostInfoList\nfrom .multinode_runner import MultiNodeRunner\n\n# Constants that define our syntax\nNODE_SEP = ','\... | [
{
"content": "import os\nimport sys\nfrom typing import List\n\nimport click\nimport torch\nfrom packaging import version\n\nfrom colossalai.context import Config\n\nfrom .hostinfo import HostInfo, HostInfoList\nfrom .multinode_runner import MultiNodeRunner\n\n# Constants that define our syntax\nNODE_SEP = ','\... | diff --git a/colossalai/cli/launcher/run.py b/colossalai/cli/launcher/run.py
index 6411b4302e95..4bb749f9d293 100644
--- a/colossalai/cli/launcher/run.py
+++ b/colossalai/cli/launcher/run.py
@@ -154,7 +154,7 @@ def _arg_dict_to_list(arg_dict):
extra_launch_args = dict()
torch_version = version.parse(tor... |
mozmeao__basket-357 | Fx Account flow testing in Salesforce - ensure reactivation of an account flows properly
With the config of the deletion of a Firefox Account for subscription services, we will be automatically checking a flag on the Contact record to denote they've deleted their Firefox Account. A few things that may impact Basket:
... | [
{
"content": "import json\nimport logging\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta\nfrom email.utils import formatdate\nfrom functools import wraps\nfrom hashlib import sha256\nfrom time import mktime, time\nfrom urllib.parse import urlencode\n\nfrom django.conf import settings\nfrom... | [
{
"content": "import json\nimport logging\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta\nfrom email.utils import formatdate\nfrom functools import wraps\nfrom hashlib import sha256\nfrom time import mktime, time\nfrom urllib.parse import urlencode\n\nfrom django.conf import settings\nfrom... | diff --git a/basket/news/tasks.py b/basket/news/tasks.py
index 418776bae..06026cbd1 100644
--- a/basket/news/tasks.py
+++ b/basket/news/tasks.py
@@ -848,6 +848,9 @@ def process_subhub_event_subscription_cancel(data):
'StageName': SUB_STAGE_NAMES[data['event_type']],
})
+ if data['event_type'] == 'cus... |
easybuilders__easybuild-framework-3286 | UnicodeDecodeError when adding easyconfig to archive (if archspec is available)
I ran into this crash when installing `MAFFT-7.453-iccifort-2019.5.281-with-extensions.eb` (when using `eb` on top of Python 2):
```
ERROR: Traceback (most recent call last):
File "/lib/python2.7/site-packages/easybuild_framework-4.2... | [
{
"content": "##\n# Copyright 2011-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | [
{
"content": "##\n# Copyright 2011-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | diff --git a/easybuild/tools/systemtools.py b/easybuild/tools/systemtools.py
index 13e28cc6f3..cb6d163420 100644
--- a/easybuild/tools/systemtools.py
+++ b/easybuild/tools/systemtools.py
@@ -360,7 +360,7 @@ def get_cpu_arch_name():
if HAVE_ARCHSPEC:
res = archspec_cpu_host()
if res:
- ... |
conda__conda-5496 | An unexpected error has occurred.
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : win-64
conda version : 4.3.21
conda is priv... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, division, absolute_import\nfrom distutils.sysconfig import get_python_lib\nfrom logging import getLogger\nfrom os import chdir, getcwd\nfrom os.path import abspath, dirname, exists, expanduser, expandvars, isdir, isfile, join, sep\ntr... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, division, absolute_import\nfrom distutils.sysconfig import get_python_lib\nfrom logging import getLogger\nfrom os import chdir, getcwd\nfrom os.path import abspath, dirname, exists, expanduser, expandvars, isdir, isfile, join, sep\ntr... | diff --git a/conda/_vendor/auxlib/path.py b/conda/_vendor/auxlib/path.py
index 2af4a0f962f..2ce7a5cc922 100644
--- a/conda/_vendor/auxlib/path.py
+++ b/conda/_vendor/auxlib/path.py
@@ -6,7 +6,7 @@
from os.path import abspath, dirname, exists, expanduser, expandvars, isdir, isfile, join, sep
try:
import pkg_resou... |
mne-tools__mne-bids-259 | Update text before release
The setup.py still states that this is experimental. I think it's grown up a fair bit :) this is the text that ends up on pypi. we should update it to reflect the package's aim
https://github.com/mne-tools/mne-bids/blob/f8f267b45ac36e1600ea9ceb5540299e1bf3ab21/setup.py#L17
| [
{
"content": "#! /usr/bin/env python\n\"\"\"Setup MNE-BIDS.\"\"\"\nimport os\nfrom setuptools import setup, find_packages\n\n# get the version\nversion = None\nwith open(os.path.join('mne_bids', '__init__.py'), 'r') as fid:\n for line in (line.strip() for line in fid):\n if line.startswith('__version_... | [
{
"content": "#! /usr/bin/env python\n\"\"\"Setup MNE-BIDS.\"\"\"\nimport os\nfrom setuptools import setup, find_packages\n\n# get the version\nversion = None\nwith open(os.path.join('mne_bids', '__init__.py'), 'r') as fid:\n for line in (line.strip() for line in fid):\n if line.startswith('__version_... | diff --git a/setup.py b/setup.py
index 9595f48bc..e11b838a9 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,8 @@
raise RuntimeError('Could not determine version')
-descr = """Experimental code for BIDS using MNE."""
+descr = ('An MNE project for organizing and formatting MEG and EEG data '
+ 'accordi... |
pydantic__pydantic-6274 | Duplicate ref with multiple optional Enums inside a pydantic dataclass
### Initial Checks
- [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent
### Description
When using `pydantic.dataclasses.dataclass`, I noticed a data constellation which cannot be built (see th... | [
{
"content": "from __future__ import annotations\n\nfrom collections import defaultdict\nfrom typing import Any, Callable, Hashable, Iterable, TypeVar, Union, cast\n\nfrom pydantic_core import CoreSchema, core_schema\nfrom typing_extensions import TypeAliasType, TypeGuard, get_args\n\nfrom . import _repr\n\nAny... | [
{
"content": "from __future__ import annotations\n\nfrom collections import defaultdict\nfrom typing import Any, Callable, Hashable, Iterable, TypeVar, Union, cast\n\nfrom pydantic_core import CoreSchema, core_schema\nfrom typing_extensions import TypeAliasType, TypeGuard, get_args\n\nfrom . import _repr\n\nAny... | diff --git a/pydantic/_internal/_core_utils.py b/pydantic/_internal/_core_utils.py
index d03627471ed..7e01037b653 100644
--- a/pydantic/_internal/_core_utils.py
+++ b/pydantic/_internal/_core_utils.py
@@ -475,6 +475,9 @@ def flatten_refs(s: core_schema.CoreSchema, recurse: Recurse) -> core_schema.Cor
schema = wa... |
pytorch__torchdynamo-126 | Which IPEX version is supported as the backend
I think the latest IPEX has no method of `_optimize_catch_errors` , may I kindly know which IPEX version is supported as the default `ipex` optimization backend? https://github.com/facebookresearch/torchdynamo/blob/476ca6b7c148dd6705bf218684dfe05c6cd9fcfb/torchdynamo/optim... | [
{
"content": "import copy\nimport functools\nimport io\nimport logging\nimport os\nimport subprocess\nimport tempfile\n\nimport numpy as np\nimport torch\n\nimport torchdynamo.convert_frame\nfrom torchdynamo.optimizations.subgraph import SubGraph\nfrom torchdynamo.utils import identity\n\nlog = logging.getLogge... | [
{
"content": "import copy\nimport functools\nimport io\nimport logging\nimport os\nimport subprocess\nimport tempfile\n\nimport numpy as np\nimport torch\n\nimport torchdynamo.convert_frame\nfrom torchdynamo.optimizations.subgraph import SubGraph\nfrom torchdynamo.utils import identity\n\nlog = logging.getLogge... | diff --git a/torchdynamo/optimizations/backends.py b/torchdynamo/optimizations/backends.py
index b6379d449c..9c83beaaa7 100644
--- a/torchdynamo/optimizations/backends.py
+++ b/torchdynamo/optimizations/backends.py
@@ -282,7 +282,7 @@ def taso(subgraph):
def ipex(subgraph):
import intel_extension_for_pytorch
- ... |
learningequality__kolibri-9014 | Simplify webpack dev server
Use a single dev server instance to serve all bundles by using a multi-configuration setup instead of multiple independent devservers.
We did this due to a historic limitation in webpack dev server that now seems to have been resolved. More details here: https://github.com/webpack/webpack... | [
{
"content": "\"\"\"\nKolibri Webpack hooks\n---------------------\n\nTo manage assets, we use the webpack format. In order to have assets bundled in,\nyou should put them in ``yourapp/assets/src``.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import un... | [
{
"content": "\"\"\"\nKolibri Webpack hooks\n---------------------\n\nTo manage assets, we use the webpack format. In order to have assets bundled in,\nyou should put them in ``yourapp/assets/src``.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import un... | diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml
index 14d9f0da473..6a7f461e203 100644
--- a/.github/workflows/check_licenses.yml
+++ b/.github/workflows/check_licenses.yml
@@ -25,7 +25,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
- n... |
mathesar-foundation__mathesar-2525 | Demo template management command unexpected args.
## Description
<!-- A clear and concise description of what the bug is. -->
After starting dev environment, the management command to setup the demo DB is broken. Trying to run:
```sh
# docker exec -it mathesar_service_dev python manage.py setup_demo_template_db
... | [
{
"content": "from sqlalchemy import text\n\nfrom django.conf import settings\nfrom django.core.management import BaseCommand\n\nfrom db.install import install_mathesar\nfrom demo.install.datasets import load_datasets\nfrom mathesar.database.base import create_mathesar_engine\n\n\nclass Command(BaseCommand):\n ... | [
{
"content": "from sqlalchemy import text\n\nfrom django.conf import settings\nfrom django.core.management import BaseCommand\n\nfrom db.install import install_mathesar\nfrom demo.install.datasets import load_datasets\nfrom mathesar.database.base import create_mathesar_engine\n\n\nclass Command(BaseCommand):\n ... | diff --git a/demo/management/commands/setup_demo_template_db.py b/demo/management/commands/setup_demo_template_db.py
index 75eb3b9b67..956bf13c65 100644
--- a/demo/management/commands/setup_demo_template_db.py
+++ b/demo/management/commands/setup_demo_template_db.py
@@ -12,7 +12,7 @@ class Command(BaseCommand):
he... |
mitmproxy__mitmproxy-2051 | @concurrent annotation doesn't work in the OOP script method
I.E:
```
class SomeClass:
@concurrent [doesn't work, 2 args]
def request(self, flow):
pass
```
@concurrent annotation doesn't work in the OOP script method
I.E:
```
class SomeClass:
@concurrent [doesn't work, 2 args]
de... | [
{
"content": "\"\"\"\nThis module provides a @concurrent decorator primitive to\noffload computations from mitmproxy's main master thread.\n\"\"\"\n\nfrom mitmproxy import eventsequence\nfrom mitmproxy.types import basethread\n\n\nclass ScriptThread(basethread.BaseThread):\n name = \"ScriptThread\"\n\n\ndef ... | [
{
"content": "\"\"\"\nThis module provides a @concurrent decorator primitive to\noffload computations from mitmproxy's main master thread.\n\"\"\"\n\nfrom mitmproxy import eventsequence\nfrom mitmproxy.types import basethread\n\n\nclass ScriptThread(basethread.BaseThread):\n name = \"ScriptThread\"\n\n\ndef ... | diff --git a/mitmproxy/script/concurrent.py b/mitmproxy/script/concurrent.py
index 366929a5d5..7573f2a5cf 100644
--- a/mitmproxy/script/concurrent.py
+++ b/mitmproxy/script/concurrent.py
@@ -29,4 +29,8 @@ def run():
"script.concurrent (%s)" % fn.__name__,
target=run
).start()
- ret... |
great-expectations__great_expectations-1937 | ERROR: TypeError: Keys in TupleS3StoreBackend must be instances of <class 'tuple'>, not <class 'great_expectations.data_context.types.resource_identifiers.ValidationResultIdentifier'>
A few users reported this error, but we do not have precise steps to reproduce this - in progress...
TODO: fill in the details
**D... | [
{
"content": "# PYTHON 2 - py2 - update to ABC direct use rather than __metaclass__ once we drop py2 support\nimport logging\nimport os\nimport random\nimport re\nimport shutil\nfrom abc import ABCMeta\n\nfrom great_expectations.data_context.store.store_backend import StoreBackend\nfrom great_expectations.excep... | [
{
"content": "# PYTHON 2 - py2 - update to ABC direct use rather than __metaclass__ once we drop py2 support\nimport logging\nimport os\nimport random\nimport re\nimport shutil\nfrom abc import ABCMeta\n\nfrom great_expectations.data_context.store.store_backend import StoreBackend\nfrom great_expectations.excep... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 6ae6ce28c6e1..7374f7abf0a2 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -7,6 +7,7 @@ Changelog
Develop
-----------------
+* [BUGFIX] Change default prefix for TupleStoreBackend (issue 1907)
* [ENHANCEMENT] Add spark support for expect_compou... |
encode__django-rest-framework-7059 | HyperlinkedRelatedField exception on string with %20 instead of space
Use serializers.HyperlinkedRelatedField where defined lookup_field link to the field string causes an exception 'Invalid hyperlink - Object does not exist.' when the value of that field contains characters that are encoded in the url. eg space -> %20... | [
{
"content": "import sys\nfrom collections import OrderedDict\nfrom urllib import parse\n\nfrom django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist\nfrom django.db.models import Manager\nfrom django.db.models.query import QuerySet\nfrom django.urls import NoReverseMatch, Resolver404, get_scri... | [
{
"content": "import sys\nfrom collections import OrderedDict\nfrom urllib import parse\n\nfrom django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist\nfrom django.db.models import Manager\nfrom django.db.models.query import QuerySet\nfrom django.urls import NoReverseMatch, Resolver404, get_scri... | diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index 9bde79b199..af4dd18048 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -344,7 +344,7 @@ def to_internal_value(self, data):
if data.startswith(prefix):
data = '/' + data[len(prefix):]
... |
mlflow__mlflow-8089 | [DOC-FIX]
### Willingness to contribute
Yes. I can contribute a documentation fix independently.
### URL(s) with the issue
https://mlflow.org/docs/latest/models.html#model-signature-and-input-example
### Description of proposal (what needs changing)
The current typing for `ColSpec` goes as follow:
```
def __... | [
{
"content": "import json\nfrom enum import Enum\n\nimport numpy as np\nimport string\nfrom typing import Dict, Any, List, Union, Optional\n\nfrom mlflow.exceptions import MlflowException\n\n\nclass DataType(Enum):\n \"\"\"\n MLflow data types.\n \"\"\"\n\n def __new__(cls, value, numpy_type, spark_... | [
{
"content": "import json\nfrom enum import Enum\n\nimport numpy as np\nimport string\nfrom typing import Dict, Any, List, Union, Optional\n\nfrom mlflow.exceptions import MlflowException\n\n\nclass DataType(Enum):\n \"\"\"\n MLflow data types.\n \"\"\"\n\n def __new__(cls, value, numpy_type, spark_... | diff --git a/mlflow/types/schema.py b/mlflow/types/schema.py
index 3eab22aaf775d..1e15d59e470da 100644
--- a/mlflow/types/schema.py
+++ b/mlflow/types/schema.py
@@ -69,7 +69,9 @@ class ColSpec:
"""
def __init__(
- self, type: DataType, name: Optional[str] = None # pylint: disable=redefined-builtin
+... |
WeblateOrg__weblate-2262 | Improvement: show location for texts in screenshot management
### Steps to reproduce
1. Add a new screenshot
2. Search for a text string
3. See multiple identical results
### Actual behaviour
Sometimes you have the exact same text in multiple places in your project, but the translations can differ depending ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2012 - 2018 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2012 - 2018 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the ... | diff --git a/weblate/screenshots/views.py b/weblate/screenshots/views.py
index 11052ce20a59..28c28dd8ae82 100644
--- a/weblate/screenshots/views.py
+++ b/weblate/screenshots/views.py
@@ -193,7 +193,11 @@ def search_results(code, obj, units=None):
)
results = [
- {'text': unit.get_source_plurals()... |
airctic__icevision-798 | Fix the readme docs, and code snippet links
readme docs points to 404
code snippet is out-dated
| [
{
"content": "import os\nfrom pathlib import Path\nimport shutil\nfrom distutils.dir_util import copy_tree\n\nimport keras_autodoc\n\n# from keras_autodoc.examples import copy_examples\nimport tutobooks\nfrom loguru import logger\n\nPAGES = {\n \"parser.md\": [\n \"icevision.parsers.Parser\",\n ... | [
{
"content": "import os\nfrom pathlib import Path\nimport shutil\nfrom distutils.dir_util import copy_tree\n\nimport keras_autodoc\n\n# from keras_autodoc.examples import copy_examples\nimport tutobooks\nfrom loguru import logger\n\nPAGES = {\n \"parser.md\": [\n \"icevision.parsers.Parser\",\n ... | diff --git a/README.md b/README.md
index e143364e2..6ae4453a3 100644
--- a/README.md
+++ b/README.md
@@ -37,9 +37,6 @@ IceVision is the first agnostic computer vision framework to offer a curated col
- Multi-task training to efficiently combine object detection, segmentation, and classification models
-
-![image]... |
adamchainz__django-mysql-164 | mysql_cache_migration should add dependencies to migration file
Even though it doesn't know which app you'll put your migration in, a dependency is required to make it play nicely so the template should include a blank list and comment that you should hook it up.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.core.cache import InvalidCacheBackendError, caches\nfrom django.core.management import BaseCommand, CommandError\n\nfrom django_mysql.cache import MySQLCache\nfrom django_mysql.utils i... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.core.cache import InvalidCacheBackendError, caches\nfrom django.core.management import BaseCommand, CommandError\n\nfrom django_mysql.cache import MySQLCache\nfrom django_mysql.utils i... | diff --git a/django_mysql/management/commands/mysql_cache_migration.py b/django_mysql/management/commands/mysql_cache_migration.py
index 6514fac5..3fdbe11d 100644
--- a/django_mysql/management/commands/mysql_cache_migration.py
+++ b/django_mysql/management/commands/mysql_cache_migration.py
@@ -64,6 +64,9 @@ def render_... |
pyodide__pyodide-987 | Add PYODIDE_MINIMAL build option
From the added documentation,
> Minimal pyodide build can be enabled by setting the `PYODIDE_MINIMAL`
environment variable. For instance,
> ```
> PYODIDE_MINIMAL=true PYODIDE_PACKAGES="micropip" make
> ```
>
> This will,
> - not includ... | [
{
"content": "from typing import List, Optional\n\n\ndef get_completions(\n code: str, cursor: Optional[int] = None, namespaces: Optional[List] = None\n) -> List[str]:\n \"\"\"\n Get code autocompletion candidates\n\n Note that this function requires to have the jedi module loaded.\n\n Parameters... | [
{
"content": "from typing import List, Optional\n\n\ndef get_completions(\n code: str, cursor: Optional[int] = None, namespaces: Optional[List] = None\n) -> List[str]:\n \"\"\"\n Get code autocompletion candidates\n\n Note that this function requires to have the jedi module loaded.\n\n Parameters... | diff --git a/.gitignore b/.gitignore
index 6acb91e2063..a8bbcd0a646 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,8 +29,6 @@ ccache
packages/lz4/lz4-1.8.3
packages/CLAPACK/CLAPACK-WA
packages/CLAPACK/clapack.tgz
-packages/jedi/jedi-*
-packages/parso/parso-*
packages/libxml/libxml*
packages/libxslt/libxslt*
pack... |
ansible__molecule-659 | If raw_env_vars contains a var whose value is not a string, molecule silently fails to execute Ansible
# Issue Type
- Bug report
# Molecule and Ansible details
```
ansible --version
2.2.0.0
molecule --version
1.14.1.dev37
```
Sha256 of commit is 8eed3f539f0b30b04d98f8ab418a2a5d55cce01f, molecule --... | [
{
"content": "# Copyright (c) 2015-2016 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right... | [
{
"content": "# Copyright (c) 2015-2016 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right... | diff --git a/molecule/ansible_playbook.py b/molecule/ansible_playbook.py
index f03bcbde46..3a0d3aa8cb 100644
--- a/molecule/ansible_playbook.py
+++ b/molecule/ansible_playbook.py
@@ -95,6 +95,8 @@ def parse_arg(self, name, value):
if name == 'raw_env_vars':
for k, v in value.iteritems():
+ ... |
docker__docker-py-1653 | image.tag does not return anything
There's no return statement in `images.tag`:
https://github.com/docker/docker-py/blob/master/docker/models/images.py#L99
[Readthedocs](https://docker-py.readthedocs.io/en/stable/images.html) (and the method comments) suggest it should return a bool for success.
I saw this runni... | [
{
"content": "import re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..errors import BuildError\nfrom ..utils.json_stream import json_stream\nfrom .resource import Collection, Model\n\n\nclass Image(Model):\n \"\"\"\n An image on the server.\n \"\"\"\n def __repr__(self):\n return \"<%s... | [
{
"content": "import re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..errors import BuildError\nfrom ..utils.json_stream import json_stream\nfrom .resource import Collection, Model\n\n\nclass Image(Model):\n \"\"\"\n An image on the server.\n \"\"\"\n def __repr__(self):\n return \"<%s... | diff --git a/docker/models/images.py b/docker/models/images.py
index a9ed65ee3..e8af101d7 100644
--- a/docker/models/images.py
+++ b/docker/models/images.py
@@ -96,7 +96,7 @@ def tag(self, repository, tag=None, **kwargs):
Returns:
(bool): ``True`` if successful
"""
- self.client.ap... |
mne-tools__mne-bids-452 | `write_raw_bids` throws an error with mne >= 0.20
#### Describe the bug
Running `write_raw_bids` on a test recording results in an error with mne 0.21.dev0 and mne 0.20.*. Same code works fine with mne 0.19.2
#### Steps to reproduce
```python
from tempfile import mkdtemp
from pathlib import Path
import mne
... | [
{
"content": "\"\"\"Read/write BIDS compatible electrode/coords structures from MNE.\"\"\"\n# Authors: Adam Li <adam2392@gmail.com>\n#\n# License: BSD (3-clause)\nimport json\nfrom collections import OrderedDict\n\nimport mne\nimport numpy as np\nfrom mne.io.constants import FIFF\nfrom mne.utils import _check_c... | [
{
"content": "\"\"\"Read/write BIDS compatible electrode/coords structures from MNE.\"\"\"\n# Authors: Adam Li <adam2392@gmail.com>\n#\n# License: BSD (3-clause)\nimport json\nfrom collections import OrderedDict\n\nimport mne\nimport numpy as np\nfrom mne.io.constants import FIFF\nfrom mne.utils import _check_c... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index c3826cdf8..b399de7d6 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -41,6 +41,7 @@ Bug
- fix coordystem reading in :func:`mne_bids.read_raw_bids` for cases where the ``acq`` is undefined, by `Stefan Appelhoff`_ (`#440 <https://github.com/mne-tools/mne... |
lightly-ai__lightly-1450 | VICReg Loss De-Means Twice?
https://github.com/lightly-ai/lightly/blob/66ad1b40ebf3b53512703c774988211ce283211f/lightly/loss/vicreg_loss.py#L128-L129
I think the VICReg loss removes the mean, then calls `.var()` which also de-means (see: https://pytorch.org/docs/stable/generated/torch.var.html).
If I understand ... | [
{
"content": "import torch\nimport torch.distributed as dist\nimport torch.nn.functional as F\nfrom torch import Tensor\n\nfrom lightly.utils.dist import gather\n\n\nclass VICRegLoss(torch.nn.Module):\n \"\"\"Implementation of the VICReg loss [0].\n\n This implementation is based on the code published by ... | [
{
"content": "import torch\nimport torch.distributed as dist\nimport torch.nn.functional as F\nfrom torch import Tensor\n\nfrom lightly.utils.dist import gather\n\n\nclass VICRegLoss(torch.nn.Module):\n \"\"\"Implementation of the VICReg loss [0].\n\n This implementation is based on the code published by ... | diff --git a/lightly/loss/vicreg_loss.py b/lightly/loss/vicreg_loss.py
index f18965531..1b99e6f27 100644
--- a/lightly/loss/vicreg_loss.py
+++ b/lightly/loss/vicreg_loss.py
@@ -125,7 +125,6 @@ def variance_loss(x: Tensor, eps: float = 0.0001) -> Tensor:
eps:
Epsilon for numerical stability.
"... |
cowrie__cowrie-1753 | printf crashes
**Describe the bug**
When using the printf command it crashes
**To Reproduce**
Steps to reproduce the behavior:
1. login on the honeypot
2. run printf word
3. Server closes
**Server (please complete the following information):**
- OS:Linux rez-latitude 5.15.0-43-generic Ubuntu SMP x86_64 x... | [
{
"content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\n# coding=utf-8\n\nfrom __future__ import annotations\n\nimport codecs\nimport datetime\nimport getopt\nimport random\nimport re\nimport time\nfrom typing import Callable\n\nfrom twisted.interne... | [
{
"content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\n# coding=utf-8\n\nfrom __future__ import annotations\n\nimport codecs\nimport datetime\nimport getopt\nimport random\nimport re\nimport time\nfrom typing import Callable\n\nfrom twisted.interne... | diff --git a/src/cowrie/commands/base.py b/src/cowrie/commands/base.py
index f759960554..f9ab1f1ca3 100644
--- a/src/cowrie/commands/base.py
+++ b/src/cowrie/commands/base.py
@@ -198,7 +198,7 @@ def call(self):
if s.endswith("\\c"):
s = s[:-2]
- self.write(codecs.e... |
electricitymaps__electricitymaps-contrib-5188 | SV production parser down
## Description
This is an automatic error report generated for El Salvador (SV).
Issues:
- No recent data found for `production` parser
## Suggestions
- Try running the parser locally using the command `poetry run test_parser SV production`
- <a href="https://storage.googleapis.com/electric... | [
{
"content": "#!/usr/bin/env python3\n\nimport json\nimport re\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom logging import Logger, getLogger\nfrom operator import itemgetter\nfrom typing import Optional\n\nimport arrow\nfrom bs4 import BeautifulSoup\nfrom requests import Session\n\n... | [
{
"content": "#!/usr/bin/env python3\n\nimport json\nimport re\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom logging import Logger, getLogger\nfrom operator import itemgetter\nfrom typing import Optional\n\nimport arrow\nfrom bs4 import BeautifulSoup\nfrom requests import Session\n\n... | diff --git a/parsers/SV.py b/parsers/SV.py
index 0a04500cef..a015722957 100644
--- a/parsers/SV.py
+++ b/parsers/SV.py
@@ -21,7 +21,7 @@
# Thanks to jarek for figuring out how to make the correct POST request to the data url.
-url = "http://estadistico.ut.com.sv/OperacionDiaria.aspx"
+url = "https://estadistico.ut... |
scoutapp__scout_apm_python-679 | Disconnect receiver from celery task_failure signal
Celery instrumentation's `uninstall` should call `task_failure.disconnect(task_failure_callback)`.
| [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport datetime as dt\nimport logging\n\nfrom celery.signals import before_task_publish, task_failure, task_postrun, task_prerun\n\ntry:\n import django\n\n if django.VERSION < (3, 1):\n ... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport datetime as dt\nimport logging\n\nfrom celery.signals import before_task_publish, task_failure, task_postrun, task_prerun\n\ntry:\n import django\n\n if django.VERSION < (3, 1):\n ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c98e2b3b..7897f019 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@
([Issue #661](https://github.com/scoutapp/scout_apm_python/issues/661))
### Fixed
+- Disconnect receiver from celery task_failure signal.
+ ([Issue #678](https://github.com/scoutapp/scou... |
pyca__cryptography-3711 | Empty subject or issuer in x.509 certificates throws Unknown OpenSSL error.
When trying to build a x509 certificate with an empty string as issuer or subject name, an unknown OpenSSL error is thrown. Maybe that should be handled differently.
**Tested on:**
```
Ubuntu 16.04.2 LTS
OpenSSL 1.0.2g 1 Mar 2016
crypto... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | diff --git a/src/cryptography/x509/name.py b/src/cryptography/x509/name.py
index 277128fa8c70..108b60ccae28 100644
--- a/src/cryptography/x509/name.py
+++ b/src/cryptography/x509/name.py
@@ -27,6 +27,9 @@ def __init__(self, oid, value):
"Country name must be a 2 character country code"
)
... |
getsentry__sentry-44509 | No attachment preview for .log text files
### Environment
SaaS (https://sentry.io/)
### Version
_No response_
### Steps to Reproduce
1. upload a crash report with .log attachment
2. go into issue that was created and scroll to the bottom
3. in attachment section see the .log file and grayed out Preview button fo... | [
{
"content": "import os\nimport warnings\n\nimport click\n\nDEFAULT_SETTINGS_MODULE = \"sentry.conf.server\"\nDEFAULT_SETTINGS_CONF = \"config.yml\"\nDEFAULT_SETTINGS_OVERRIDE = \"sentry.conf.py\"\n\n\ndef generate_secret_key():\n from django.utils.crypto import get_random_string\n\n chars = \"abcdefghijk... | [
{
"content": "import os\nimport warnings\n\nimport click\n\nDEFAULT_SETTINGS_MODULE = \"sentry.conf.server\"\nDEFAULT_SETTINGS_CONF = \"config.yml\"\nDEFAULT_SETTINGS_OVERRIDE = \"sentry.conf.py\"\n\n\ndef generate_secret_key():\n from django.utils.crypto import get_random_string\n\n chars = \"abcdefghijk... | diff --git a/src/sentry/runner/settings.py b/src/sentry/runner/settings.py
index 1da50d284833be..4cb5e1801ded63 100644
--- a/src/sentry/runner/settings.py
+++ b/src/sentry/runner/settings.py
@@ -109,6 +109,7 @@ def configure(ctx, py, yaml, skip_service_validation=False):
("application/x-font-ttf", "ttc"),
... |
pymodbus-dev__pymodbus-1185 | Function code 0x15 fails because of incomplete receival of bytes
<!--
Please use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) for
support questions.
Before opening a new issue, make sure you do the followin... | [
{
"content": "\"\"\"Modbus client async serial communication.\"\"\"\nimport asyncio\nimport logging\nimport time\nfrom functools import partial\n\nfrom pymodbus.client.base import ModbusBaseClient, ModbusClientProtocol\nfrom pymodbus.constants import Defaults\nfrom pymodbus.exceptions import ConnectionException... | [
{
"content": "\"\"\"Modbus client async serial communication.\"\"\"\nimport asyncio\nimport logging\nimport time\nfrom functools import partial\n\nfrom pymodbus.client.base import ModbusBaseClient, ModbusClientProtocol\nfrom pymodbus.constants import Defaults\nfrom pymodbus.exceptions import ConnectionException... | diff --git a/pymodbus/client/serial.py b/pymodbus/client/serial.py
index 9c51c2560..03d9f1207 100644
--- a/pymodbus/client/serial.py
+++ b/pymodbus/client/serial.py
@@ -304,6 +304,8 @@ def recv(self, size):
)
if size is None:
size = self._wait_for_data()
+ elif size > self._in_... |
feast-dev__feast-3756 | Postgres engine default keepalives_idle value causes setsockopt(TCP_KEEPIDLE) invalid value
Get `OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: setsockopt(TCP_KEEPIDLE) failed: Invalid argument` when run `feast apply`.
Because of `keepalives_idle=config.keepalives_idle` field in f... | [
{
"content": "from enum import Enum\nfrom typing import Optional\n\nfrom pydantic import StrictStr\n\nfrom feast.repo_config import FeastConfigBaseModel\n\n\nclass ConnectionType(Enum):\n singleton = \"singleton\"\n pool = \"pool\"\n\n\nclass PostgreSQLConfig(FeastConfigBaseModel):\n min_conn: int = 1\... | [
{
"content": "from enum import Enum\nfrom typing import Optional\n\nfrom pydantic import StrictStr\n\nfrom feast.repo_config import FeastConfigBaseModel\n\n\nclass ConnectionType(Enum):\n singleton = \"singleton\"\n pool = \"pool\"\n\n\nclass PostgreSQLConfig(FeastConfigBaseModel):\n min_conn: int = 1\... | diff --git a/sdk/python/feast/infra/utils/postgres/postgres_config.py b/sdk/python/feast/infra/utils/postgres/postgres_config.py
index 9fbaed474d5..a4ebb456ef1 100644
--- a/sdk/python/feast/infra/utils/postgres/postgres_config.py
+++ b/sdk/python/feast/infra/utils/postgres/postgres_config.py
@@ -25,4 +25,4 @@ class Pos... |
mampfes__hacs_waste_collection_schedule-520 | Please expose service for manual schedule refresh
As per my understanding current setup allows refresh of the schedule to happen only once a day at the time configured in `fetch_time`.
This may cause issues if for some reason the source is not available at the given time, there is an issue with connectivity or a sche... | [
{
"content": "\"\"\"Waste Collection Schedule Component.\"\"\"\nimport logging\nimport site\nfrom pathlib import Path\nfrom random import randrange\n\nimport homeassistant.helpers.config_validation as cv\nimport homeassistant.util.dt as dt_util\nimport voluptuous as vol\nfrom homeassistant.core import HomeAssis... | [
{
"content": "\"\"\"Waste Collection Schedule Component.\"\"\"\nimport logging\nimport site\nfrom pathlib import Path\nfrom random import randrange\n\nimport homeassistant.helpers.config_validation as cv\nimport homeassistant.util.dt as dt_util\nimport voluptuous as vol\nfrom homeassistant.core import HomeAssis... | diff --git a/custom_components/waste_collection_schedule/__init__.py b/custom_components/waste_collection_schedule/__init__.py
index 72f054424..42fc848a6 100644
--- a/custom_components/waste_collection_schedule/__init__.py
+++ b/custom_components/waste_collection_schedule/__init__.py
@@ -123,6 +123,12 @@ async def asyn... |
searxng__searxng-733 | Engine without an about property raises an exception
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
current master branch
**How did you install SearXNG?**
Add an engine without an about property to your `settings.yml` / e.g.:
```yaml
- name: lo... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"This module implements the engine loader.\n\nLoad and initialize the ``engines``, see :py:func:`load_engines` and register\n:py:obj:`engine_shortcuts`.\n\nusage::\n\n load_engines( settings['engines'] )\n\n\"\"\"\n\nimport sys\... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"This module implements the engine loader.\n\nLoad and initialize the ``engines``, see :py:func:`load_engines` and register\n:py:obj:`engine_shortcuts`.\n\nusage::\n\n load_engines( settings['engines'] )\n\n\"\"\"\n\nimport sys\... | diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index ca3b5d4a83e..b762c0dd97d 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -44,6 +44,7 @@
"enable_http": False,
"display_error_messages": True,
"tokens": [],
+ "about": {},
}
# set automatically when an ... |
awslabs__gluonts-2187 | A demo symbol block cannot run inference after being serialized and deserialized
## Description
Hello,
I tried to serialize my predictor as symbo block format,
but when I deserialize them and use for predition, I got some error show below
## To Reproduce
```python
# Copyright 2018 Amazon.com, Inc. or its aff... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE... | diff --git a/src/gluonts/mx/util.py b/src/gluonts/mx/util.py
index 03c11676fe..b28f1581d1 100644
--- a/src/gluonts/mx/util.py
+++ b/src/gluonts/mx/util.py
@@ -181,6 +181,7 @@ def hybrid_block_to_symbol_block(
):
export_symb_block(hb, model_dir_path, model_name)
sb = import_symb_block(... |
WordPress__openverse-api-637 | Return secure URLs for the fields thumbnail, detail_url and related_url.
_(Framed the verbiage of the title as a feature request)_ 🙏
## Problem
The response for search and detail requests includes insecure URLs (`http` instead of `https`) in the fields `thumbnail`, `detail_url` and `related_url`.
:\n \"\"\"\n This field returns the link but allows the option to replace the URL scheme.\n \"\"\"\n\n def __init__(se... | [
{
"content": "import re\n\nfrom django.conf import settings\nfrom rest_framework import serializers\n\n\nclass SchemableHyperlinkedIdentityField(serializers.HyperlinkedIdentityField):\n \"\"\"\n This field returns the link but allows the option to replace the URL scheme.\n \"\"\"\n\n def __init__(se... | diff --git a/api/catalog/api/serializers/base.py b/api/catalog/api/serializers/base.py
index f07234d0b..ca54759b6 100644
--- a/api/catalog/api/serializers/base.py
+++ b/api/catalog/api/serializers/base.py
@@ -19,6 +19,6 @@ def get_url(self, *args, **kwargs):
# Only rewrite URLs if a fixed scheme is provided
... |
streamlink__streamlink-928 | Socket is not connected error when closing currently open stream with VLC
### Checklist
- [x] This is a bug report.
- [ ] This is a feature request.
- [ ] This is a plugin (improvement) request.
- [ ] I have read the contribution guidelines.
### Description
Every time I close a stream that was playing in VL... | [
{
"content": "import socket\n\nfrom io import BytesIO\n\ntry:\n from BaseHTTPServer import BaseHTTPRequestHandler\nexcept ImportError:\n from http.server import BaseHTTPRequestHandler\n\n\nclass HTTPRequest(BaseHTTPRequestHandler):\n def __init__(self, request_text):\n self.rfile = BytesIO(reque... | [
{
"content": "import socket\n\nfrom io import BytesIO\n\ntry:\n from BaseHTTPServer import BaseHTTPRequestHandler\nexcept ImportError:\n from http.server import BaseHTTPRequestHandler\n\n\nclass HTTPRequest(BaseHTTPRequestHandler):\n def __init__(self, request_text):\n self.rfile = BytesIO(reque... | diff --git a/src/streamlink_cli/utils/http_server.py b/src/streamlink_cli/utils/http_server.py
index 42dedc9484f..14aaf2919ff 100644
--- a/src/streamlink_cli/utils/http_server.py
+++ b/src/streamlink_cli/utils/http_server.py
@@ -114,6 +114,6 @@ def close(self, client_only=False):
if not client_only:
... |
cupy__cupy-2657 | problem in calculating inverse of complex matrix with cupy.linalg.pinv
Hello,
I am using cupy.linalg.pinv to calculate inverse of complex matrix. And the result is different from numpy.linalg.pinv, only imaginary part.
I know that if
:\n \"\"\"Solves a l... | [
{
"content": "import numpy\nfrom numpy import linalg\nimport six\n\nimport cupy\nfrom cupy.core import core\nfrom cupy.cuda import cublas\nfrom cupy.cuda import cusolver\nfrom cupy.cuda import device\nfrom cupy.linalg import decomposition\nfrom cupy.linalg import util\n\n\ndef solve(a, b):\n \"\"\"Solves a l... | diff --git a/cupy/linalg/solve.py b/cupy/linalg/solve.py
index 73b5c493af7..429e6838fb0 100644
--- a/cupy/linalg/solve.py
+++ b/cupy/linalg/solve.py
@@ -418,7 +418,7 @@ def pinv(a, rcond=1e-15):
.. seealso:: :func:`numpy.linalg.pinv`
"""
- u, s, vt = decomposition.svd(a, full_matrices=False)
+ u, s, v... |
NVIDIA__TransformerEngine-813 | `warnings.simplefilter('default')` in global scope causes excessive DeprecationWarnings
https://github.com/NVIDIA/TransformerEngine/blob/f85553ea369da15fd726ab279818e415be48a228/transformer_engine/common/utils.py#L9
Importing the `transformer_engine.common.utils` resets the warning filters to default settings using ... | [
{
"content": "# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# See LICENSE for license information.\n\"\"\"The utilities for Transformer Engine\"\"\"\nimport inspect\nimport warnings\nfrom enum import Enum\n\nwarnings.simplefilter('default')\n\n\nclass DeprecatedEnum: # ... | [
{
"content": "# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# See LICENSE for license information.\n\"\"\"The utilities for Transformer Engine\"\"\"\nimport inspect\nimport warnings\nfrom enum import Enum\n\nwarnings.filterwarnings(\n \"module\", category=DeprecationWar... | diff --git a/transformer_engine/common/utils.py b/transformer_engine/common/utils.py
index a54e778171..339fa59f6c 100644
--- a/transformer_engine/common/utils.py
+++ b/transformer_engine/common/utils.py
@@ -6,7 +6,8 @@
import warnings
from enum import Enum
-warnings.simplefilter('default')
+warnings.filterwarnings(... |
iterative__dvc-5579 | pull: can't do partial checkouts
Discourse context: https://discuss.dvc.org/t/how-to-pull-data-from-gcs-without-pipelines/697/3
Reprocuder;
```
$ dvc pull baz/bar -v
2021-03-09 15:17:11,217 DEBUG: Check for update is enabled.
2021-03-09 15:17:11,234 DEBUG: Checking if stage 'baz/bar... | [
{
"content": "import logging\nimport os\nfrom copy import copy\nfrom typing import Type\nfrom urllib.parse import urlparse\n\nfrom voluptuous import Any\n\nimport dvc.objects as objects\nimport dvc.prompt as prompt\nfrom dvc.checkout import checkout\nfrom dvc.exceptions import (\n CheckoutError,\n Collect... | [
{
"content": "import logging\nimport os\nfrom copy import copy\nfrom typing import Type\nfrom urllib.parse import urlparse\n\nfrom voluptuous import Any\n\nimport dvc.objects as objects\nimport dvc.prompt as prompt\nfrom dvc.checkout import checkout\nfrom dvc.exceptions import (\n CheckoutError,\n Collect... | diff --git a/dvc/output/base.py b/dvc/output/base.py
index be250f112a..30565d218b 100644
--- a/dvc/output/base.py
+++ b/dvc/output/base.py
@@ -475,7 +475,7 @@ def get_files_number(self, filter_info=None):
return 0
return ilen(
- filter_info.isin_or_eq(self.path_info / relpath)
+ ... |
pytorch__ignite-1629 | Images not rendered on PyPI
## 📚 Documentation
The logo and other assets on the project README.md are not rendered on the PyPI page of [pytorch-ignite](https://pypi.org/project/pytorch-ignite/)
This is because PyPI does not read the repo for the images, and we'll have to use external links for the image. (reference ... | [
{
"content": "import io\nimport os\nimport re\n\nfrom setuptools import find_packages, setup\n\n\ndef read(*names, **kwargs):\n with io.open(os.path.join(os.path.dirname(__file__), *names), encoding=kwargs.get(\"encoding\", \"utf8\")) as fp:\n return fp.read()\n\n\ndef find_version(*file_paths):\n ... | [
{
"content": "import io\nimport os\nimport re\n\nfrom setuptools import find_packages, setup\n\n\ndef read(*names, **kwargs):\n with io.open(os.path.join(os.path.dirname(__file__), *names), encoding=kwargs.get(\"encoding\", \"utf8\")) as fp:\n return fp.read()\n\n\ndef find_version(*file_paths):\n ... | diff --git a/setup.py b/setup.py
index c8475bb2d501..d2aa7f8e9f68 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,9 @@ def find_version(*file_paths):
raise RuntimeError("Unable to find version string.")
-readme = read("README.md")
+readme = read("README.md").replace(
+ 'src="assets/', 'src="https://raw.gi... |
web2py__web2py-1738 | python 3 web2py2.15.3 urllib has no getproxies
ben@x1:/home/www-data/web2py$ python3 /home/www-data/web2py/web2py.py -K app-name,app-name
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2017
Version 2.15.3-stable+timestamp.2017.08.07.07.32.04
Database drivers available: pymysql, imaplib, psycopg... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n\nThe widget is called from web2py\n----------------------------------... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n\nThe widget is called from web2py\n----------------------------------... | diff --git a/gluon/widget.py b/gluon/widget.py
index d56be20a6..20b602bba 100644
--- a/gluon/widget.py
+++ b/gluon/widget.py
@@ -1076,7 +1076,10 @@ def start_schedulers(options):
return
# Work around OS X problem: http://bugs.python.org/issue9405
- import urllib
+ if PY2:
+ import urllib
+ ... |
python-trio__trio-1041 | trio.Cancelled missing readable str()
Trying to print a trio.Cancelled exception e.g. with `f'{exc}'` yields an empty string. I usually resort to `type(exc)` when I need to see what's going on.
| [
{
"content": "import attr\n\n\nclass TrioInternalError(Exception):\n \"\"\"Raised by :func:`run` if we encounter a bug in trio, or (possibly) a\n misuse of one of the low-level :mod:`trio.hazmat` APIs.\n\n This should never happen! If you get this error, please file a bug.\n\n Unfortunately, if you ... | [
{
"content": "import attr\n\n\nclass TrioInternalError(Exception):\n \"\"\"Raised by :func:`run` if we encounter a bug in trio, or (possibly) a\n misuse of one of the low-level :mod:`trio.hazmat` APIs.\n\n This should never happen! If you get this error, please file a bug.\n\n Unfortunately, if you ... | diff --git a/newsfragments/674.misc.rst b/newsfragments/674.misc.rst
new file mode 100644
index 000000000..9895259cd
--- /dev/null
+++ b/newsfragments/674.misc.rst
@@ -0,0 +1 @@
+Calling ``str`` on a :exc:`trio.Cancelled` exception object returns "Cancelled" instead of an empty string.
\ No newline at end of file
diff ... |
kserve__kserve-3020 | response id in response should return request id if present
/kind bug
**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]
When a request is sent with request id, the response should contain the request id so that the response and request can be easily co-related. ... | [
{
"content": "# Copyright 2021 The KServe 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 a... | [
{
"content": "# Copyright 2021 The KServe 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 a... | diff --git a/python/kserve/kserve/utils/utils.py b/python/kserve/kserve/utils/utils.py
index 09804b8bddf..afae2755647 100644
--- a/python/kserve/kserve/utils/utils.py
+++ b/python/kserve/kserve/utils/utils.py
@@ -203,7 +203,7 @@ def get_predict_response(payload: Union[Dict, InferRequest], result: Union[np.nd
r... |
google__mobly-585 | DeprecationWarning for not using raw strings
The Windows test run gave some deprecation warnings:
============================== warnings summary ===============================
mobly\logger.py:32
T:\src\github\mobly\mobly\logger.py:32: DeprecationWarning: invalid escape sequence \d
logline_timestamp_re = r... | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/mobly/logger.py b/mobly/logger.py
index f82e94f8..fba6b2d1 100644
--- a/mobly/logger.py
+++ b/mobly/logger.py
@@ -29,7 +29,7 @@
log_line_time_format = '%m-%d %H:%M:%S'
log_line_timestamp_len = 18
-logline_timestamp_re = re.compile('\d\d-\d\d \d\d:\d\d:\d\d.\d\d\d')
+logline_timestamp_re = re.compile(r'... |
facebookresearch__CompilerGym-546 | Either explicitly prevent copy operators on environments, or add support for them
## 🚀 Feature
As of v0.1.9, the shallow copy operator works on `CompilerEnv` instances but the deep copy operator fails:
```py
In [1]: import compiler_gym
In [2]: env = compiler_gym.make("llvm-v0")
In [3]: import copy
In [... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"This module defines the OpenAI gym interface for compilers.\"\"\"\nimport logging\nimport numbers\nimport warni... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"This module defines the OpenAI gym interface for compilers.\"\"\"\nimport logging\nimport numbers\nimport warni... | diff --git a/compiler_gym/envs/compiler_env.py b/compiler_gym/envs/compiler_env.py
index b732464dd..383287cce 100644
--- a/compiler_gym/envs/compiler_env.py
+++ b/compiler_gym/envs/compiler_env.py
@@ -1322,3 +1322,12 @@ def send_params(self, *params: Iterable[Tuple[str, str]]) -> List[str]:
)
re... |
cobbler__cobbler-1266 | build_reporting fails if empty string in ignorelist
The default configuration in the ubuntu 12.04 cobbler 2.6.5 package has the following in `/etc/settings`:
```
build_reporting_ignorelist = [""]
```
The code that reads this value is in `install_post_report.py`, and the condition that determines whether to send a bui... | [
{
"content": "# (c) 2008-2009\n# Jeff Schroeder <jeffschroeder@computer.org>\n# Michael DeHaan <michael.dehaan AT gmail>\n#\n# License: GPLv2+\n\n# Post install trigger for cobbler to\n# send out a pretty email report that\n# contains target information.\n\nimport distutils.sysconfig\nimport smtplib\nimport sys... | [
{
"content": "# (c) 2008-2009\n# Jeff Schroeder <jeffschroeder@computer.org>\n# Michael DeHaan <michael.dehaan AT gmail>\n#\n# License: GPLv2+\n\n# Post install trigger for cobbler to\n# send out a pretty email report that\n# contains target information.\n\nimport distutils.sysconfig\nimport smtplib\nimport sys... | diff --git a/cobbler/modules/install_post_report.py b/cobbler/modules/install_post_report.py
index b35f763699..1370cf00b5 100755
--- a/cobbler/modules/install_post_report.py
+++ b/cobbler/modules/install_post_report.py
@@ -86,7 +86,7 @@ def run(api, args, logger):
sendmail = True
for prefix in settings.buil... |
voicepaw__so-vits-svc-fork-1139 | scipy ImportError on multiple platforms
### Describe the bug
When attempting to Infer, the process is cancelled with the following error message:
[10:53:57] ERROR [10:53:57] cannot import name 'kaiser' from 'scipy.signal' gui.py:764
(C:\Users\Marcello\AppData\R... | [
{
"content": "# Copyright 2020 Tomoki Hayashi\n# MIT License (https://opensource.org/licenses/MIT)\n\n\"\"\"Pseudo QMF modules.\"\"\"\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom scipy.signal import kaiser\n\n\ndef design_prototype_filter(taps=62, cutoff_ratio=0.15, beta=9.0):\n ... | [
{
"content": "# Copyright 2020 Tomoki Hayashi\n# MIT License (https://opensource.org/licenses/MIT)\n\n\"\"\"Pseudo QMF modules.\"\"\"\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom scipy.signal.windows import kaiser\n\n\ndef design_prototype_filter(taps=62, cutoff_ratio=0.15, beta=9... | diff --git a/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py b/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py
index c6b40c33..f0d0963c 100644
--- a/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py
+++ b/src/so_vits_svc_fork/modules/decoders/mb_istft/_pqmf.py
@@ -6,7 +6,7 @@
import numpy as np
... |
statsmodels__statsmodels-578 | PatsyData detection buglet
If exog is None, then is_using_patsy data utility function returns False. It's a quick fix, but I'm starting to use patsy a bit more internally for convenience (e.g., passing in names to plotting functions rather than having to pull out the data) so I'll make a ticket.
| [
{
"content": "\"\"\"\nCompatibility tools for various data structure inputs\n\"\"\"\n\n#TODO: question: interpret_data\n# looks good and could/should be merged with other check convertion functions we also have\n# similar also to what Nathaniel mentioned for Formula\n# good: if ndarray check passes then loading... | [
{
"content": "\"\"\"\nCompatibility tools for various data structure inputs\n\"\"\"\n\n#TODO: question: interpret_data\n# looks good and could/should be merged with other check convertion functions we also have\n# similar also to what Nathaniel mentioned for Formula\n# good: if ndarray check passes then loading... | diff --git a/statsmodels/tools/data.py b/statsmodels/tools/data.py
index 97343e54b4f..c505c540a15 100644
--- a/statsmodels/tools/data.py
+++ b/statsmodels/tools/data.py
@@ -122,5 +122,6 @@ def _is_array_like(endog, exog):
def _is_using_patsy(endog, exog):
# we get this when a structured array is passed through ... |
ansible-collections__community.aws-592 | sqs_queue is not idempotent when any queue attribute parameter passed in playbook
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: sqs_queue\nversion_added: 1... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: sqs_queue\nversion_added: 1... | diff --git a/changelogs/592-sqs_queue-idempotent.yml b/changelogs/592-sqs_queue-idempotent.yml
new file mode 100644
index 00000000000..94bd5ef2388
--- /dev/null
+++ b/changelogs/592-sqs_queue-idempotent.yml
@@ -0,0 +1,2 @@
+bugfixes:
+- sqs_queue - fix queue attribute comparison to make module idempotent (https://githu... |
hylang__hy-2070 | The manual is missing module names
It looks like the big doc reorganization ended up omitting the actual module names of the various contrib and extra modules; for example, the section named "Walk" documents the functions and macros in `hy.contrib.walk`, but doesn't mention the name `hy.contrib.walk` or otherwise indic... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# This file is execfile()d with the current directory set to its containing dir.\n\nimport re, os, sys, time, html\n\nsys.path.insert(0, os.path.abspath('..'))\n\nextensions = [\n 'sphinx.ext.napoleon',\n 'sphinx.ext.intersphinx',\n 'sphinx.ext.autodoc',\n '... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# This file is execfile()d with the current directory set to its containing dir.\n\nimport re, os, sys, time, html\n\nsys.path.insert(0, os.path.abspath('..'))\n\nextensions = [\n 'sphinx.ext.napoleon',\n 'sphinx.ext.intersphinx',\n 'sphinx.ext.autodoc',\n '... | diff --git a/docs/api.rst b/docs/api.rst
index 14372e253..ee1ab8b74 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -1098,7 +1098,7 @@ Special Forms
At end of outer loop
.. hy:function:: (with [#* args])
-
+
Wrap execution of `body` within a context manager given as bracket `args`.
`... |
Netflix__lemur-3922 | Metric reporting task fails if there are no other active celery tasks
When the `report_celery_last_success_metrics` task is run, it will [check if it's already running](https://github.com/Netflix/lemur/blob/master/lemur/common/celery.py#L139), and if so, skip the task execution. However, if there are no other active ta... | [
{
"content": "\"\"\"\nThis module controls defines celery tasks and their applicable schedules. The celery beat server and workers will start\nwhen invoked.\n\nWhen ran in development mode (LEMUR_CONFIG=<location of development configuration file. To run both the celery\nbeat scheduler and a worker simultaneous... | [
{
"content": "\"\"\"\nThis module controls defines celery tasks and their applicable schedules. The celery beat server and workers will start\nwhen invoked.\n\nWhen ran in development mode (LEMUR_CONFIG=<location of development configuration file. To run both the celery\nbeat scheduler and a worker simultaneous... | diff --git a/lemur/common/celery.py b/lemur/common/celery.py
index 7b90c8ecde..31fdf3fc29 100644
--- a/lemur/common/celery.py
+++ b/lemur/common/celery.py
@@ -75,6 +75,8 @@ def is_task_active(fun, task_id, args):
i = inspect()
active_tasks = i.active()
+ if active_tasks is None:
+ return False
... |
saleor__saleor-5110 | Product permissions are not properly checked for service accounts
### What I'm trying to achieve
I want to access all products using service account.
### Steps to reproduce the problem
1. Configure service account
2. Create unpublished product
3. Fetch product using service account token
### What I expected ... | [
{
"content": "import graphene_django_optimizer as gql_optimizer\nfrom django.db.models import Sum\nfrom graphql import GraphQLError\nfrom graphql_relay import from_global_id\n\nfrom ...order import OrderStatus\nfrom ...product import models\nfrom ...search.backends import picker\nfrom ..core.enums import OrderD... | [
{
"content": "import graphene_django_optimizer as gql_optimizer\nfrom django.db.models import Sum\nfrom graphql import GraphQLError\nfrom graphql_relay import from_global_id\n\nfrom ...order import OrderStatus\nfrom ...product import models\nfrom ...search.backends import picker\nfrom ..core.enums import OrderD... | diff --git a/saleor/graphql/product/resolvers.py b/saleor/graphql/product/resolvers.py
index 90b9ad73bb1..e537cc06c92 100644
--- a/saleor/graphql/product/resolvers.py
+++ b/saleor/graphql/product/resolvers.py
@@ -142,6 +142,8 @@ def resolve_products(
):
user = info.context.user
+ if user.is_anonymous and inf... |
wagtail__wagtail-6086 | Site.hostname should be lowercase to prevent duplicates
### Issue Summary
Wagtail `Site.hostname` accepts duplicate hostnames.
It possible to create `foo.com:80` and `Foo.com:80` but these are technically the same thus duplicates.
Site.hostname is case sensitive field. Hostnames and domain names are a case inse... | [
{
"content": "from collections import namedtuple\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models import Case, IntegerField, Q, When\nfrom django.db.mode... | [
{
"content": "from collections import namedtuple\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models import Case, IntegerField, Q, When\nfrom django.db.mode... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 1dec15ba1d92..677163d5aa88 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -17,6 +17,7 @@ Changelog
* Fix: Support creating `StructValue` copies (Tidiane Dia)
* Fix: Fix image uploads on storage backends that require file pointer to be at the start of the file (Mat... |
frappe__frappe-19504 | bug: Google Drive backup file names malformed
## Description of the issue
The files are uploaded with the full file path as the file name.
This makes extracting and restoring the files difficult.
 2019, Frappe Technologies and contributors\n# License: MIT. See LICENSE\n\nimport os\nfrom urllib.parse import quote\n\nfrom apiclient.http import MediaFileUpload\nfrom googleapiclient.errors import HttpError\n\nimport frappe\nfrom frappe import _\nfrom frappe.integrations.google_o... | [
{
"content": "# Copyright (c) 2019, Frappe Technologies and contributors\n# License: MIT. See LICENSE\n\nimport os\nfrom urllib.parse import quote\n\nfrom apiclient.http import MediaFileUpload\nfrom googleapiclient.errors import HttpError\n\nimport frappe\nfrom frappe import _\nfrom frappe.integrations.google_o... | diff --git a/frappe/integrations/doctype/google_drive/google_drive.py b/frappe/integrations/doctype/google_drive/google_drive.py
index 9315e868fe30..fbb970de4638 100644
--- a/frappe/integrations/doctype/google_drive/google_drive.py
+++ b/frappe/integrations/doctype/google_drive/google_drive.py
@@ -169,7 +169,7 @@ def u... |
elastic__apm-agent-python-1690 | KeyError: 'db' for DroppedSpan when running scan query on Elasticsearch
**Describe the bug**: ...
Elastic APM fails with a `KeyError: db key not found`.
The application where this happens is a Django project that stores/reads data from Elasticsearch. I have APM enable (APM server and Elasticsearch cluster are bot... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\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 met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\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 met:\n#\n# * Redistributions of source code must retain... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d6a9a7897..d515e1779 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -29,6 +29,18 @@ endif::[]
//===== Bug fixes
//
+=== Unreleased
+
+// Unreleased changes go here
+// When the next release happens, nest these changes under the "Python Agent ve... |
cocotb__cocotb-2782 | TestFactory: auto-generated test names are not applied
System:
Cocotb 1.6.0
Python 3.9
Linux 64bits
The removal of these lines in the RegressionManager method '_create_test' in commit fc32b3bb27bf78dd885c833e581f51bfeb50900b
> _my_test.__name__ = name
> _my_test.__qualname__ = name
> _my_test.... | [
{
"content": "# Copyright (c) 2013, 2018 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\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 met:\n# * Redistribut... | [
{
"content": "# Copyright (c) 2013, 2018 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\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 met:\n# * Redistribut... | diff --git a/cocotb/regression.py b/cocotb/regression.py
index 35249f1184..ba098525c7 100644
--- a/cocotb/regression.py
+++ b/cocotb/regression.py
@@ -623,6 +623,11 @@ def _create_test(function, name, documentation, mod, *args, **kwargs):
async def _my_test(dut):
await function(dut, *args, **kwargs)
+ ... |
elastic__apm-agent-python-1758 | KeyError:'db' when capturing elasticsearch span context
**Describe the bug**: ...
**To Reproduce**
1. Instrument via capture serverless
2. Perform an async_scan:
```python
async with AsyncElasticsearch(**elastic_context) as client:
async for doc in async_scan(
client=client,
index='X... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\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 met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\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 met:\n#\n# * Redistributions of source code must retain... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 33745c2a6..755e5dfa3 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -44,6 +44,7 @@ endif::[]
* Small fix to underlying Starlette logic to prevent duplicate Client objects {pull}1735[#1735]
* Change `server_url` default to `http://127.0.0.1:8200` ... |
qtile__qtile-3914 | `centre` doesn't centre window on correct screen.
Separate issue created from https://github.com/qtile/qtile/issues/2163#issuecomment-1218821651_:
> However, it has another issue - `cmd_center` doesn't seem to work correctly for my second monitor (the window always becomes centered on my left monitor). This is on X1... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport enum\nimport math\nimport typing\nfrom abc import ABCMeta, abstractmethod\n\nimport cairocffi\n\nfrom libqtile import drawer, pangocffi, utils\nfrom libqtile.command.base import CommandError, CommandObject, expose_command\nfrom libqti... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport enum\nimport math\nimport typing\nfrom abc import ABCMeta, abstractmethod\n\nimport cairocffi\n\nfrom libqtile import drawer, pangocffi, utils\nfrom libqtile.command.base import CommandError, CommandObject, expose_command\nfrom libqti... | diff --git a/CHANGELOG b/CHANGELOG
index 5e11f1a968..b92306ed90 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,6 +23,7 @@ Qtile x.xx.x, released XXXX-XX-XX:
- Add 'warp_pointer' option to `Drag` that when set will warp the pointer to the bottom right of
the window when dragging begins.
* bugfixe... |
enthought__chaco-537 | Switch on the default warning flag when running testsuite
See related https://github.com/enthought/envisage/issues/311
Deprecation warnings triggered during test runs are visible, but deprecation warnings triggered prior to when a unittest test case is loaded are by default hidden from the console.
With that, dep... | [
{
"content": "#\n# Copyright (c) 2017, Enthought, Inc.\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included in enthought/LICENSE.txt and may be redistributed only\n# under the conditions described in the aforementioned license. The license... | [
{
"content": "#\n# Copyright (c) 2017, Enthought, Inc.\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included in enthought/LICENSE.txt and may be redistributed only\n# under the conditions described in the aforementioned license. The license... | diff --git a/ci/edmtool.py b/ci/edmtool.py
index 6931c888d..9f7191435 100644
--- a/ci/edmtool.py
+++ b/ci/edmtool.py
@@ -190,7 +190,8 @@ def test(runtime, toolkit, environment):
environ['PYTHONUNBUFFERED'] = "1"
commands = [
- "edm run -e {environment} -- coverage run -m unittest discover -v chaco"
+... |
ansible__ansible-modules-core-4645 | Fix #4412: os_security_group_rule support numbered protocols
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
cloud/openstack/os_security_group_rule.py
##### ANSIBLE VERSION
```
ansible 2.1.1.0
config file =
configured module search path = Default w/o overrides
```
##### SUMMARY
Bugfix correctly poin... | [
{
"content": "#!/usr/bin/python\n\n# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2013, Benno Joy <benno@ansible.com>\n#\n# This module is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Sof... | [
{
"content": "#!/usr/bin/python\n\n# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2013, Benno Joy <benno@ansible.com>\n#\n# This module is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Sof... | diff --git a/cloud/openstack/os_security_group_rule.py b/cloud/openstack/os_security_group_rule.py
index 0bbb2427784..9dcda820dd7 100644
--- a/cloud/openstack/os_security_group_rule.py
+++ b/cloud/openstack/os_security_group_rule.py
@@ -38,7 +38,7 @@
required: true
protocol:
description:
- - IP ... |
statsmodels__statsmodels-5606 | Fix MICEData SettingWithCopyWarning on mixed-type dataframes
I believe this should fix #5430; I have an automated test that passes, at least for integer dtypes.
| [
{
"content": "\"\"\"\nOverview\n--------\n\nThis module implements the Multiple Imputation through Chained\nEquations (MICE) approach to handling missing data in statistical data\nanalyses. The approach has the following steps:\n\n0. Impute each missing value with the mean of the observed values of\nthe same va... | [
{
"content": "\"\"\"\nOverview\n--------\n\nThis module implements the Multiple Imputation through Chained\nEquations (MICE) approach to handling missing data in statistical data\nanalyses. The approach has the following steps:\n\n0. Impute each missing value with the mean of the observed values of\nthe same va... | diff --git a/statsmodels/imputation/mice.py b/statsmodels/imputation/mice.py
index b0e26c992c8..f05536125df 100644
--- a/statsmodels/imputation/mice.py
+++ b/statsmodels/imputation/mice.py
@@ -395,7 +395,7 @@ def _store_changes(self, col, vals):
ix = self.ix_miss[col]
if len(ix) > 0:
- se... |
mlcommons__GaNDLF-361 | Training classification accuracy >1
**Describe the bug**
Hi, I am training a classification model on MRI brain scans using vgg16 in gandlf. We expect to have accuracy in the range of 0-1. But Training classification accuracy is displayed >1. Validation accuracy seems correct. Attaching the screenshot below. Can you pl... | [
{
"content": "\"\"\"\nAll the metrics are to be called from here\n\"\"\"\nimport torch\nfrom sklearn.metrics import balanced_accuracy_score\nimport numpy as np\n\n\ndef classification_accuracy(output, label, params):\n if params[\"problem_type\"] == \"classification\":\n predicted_classes = torch.argm... | [
{
"content": "\"\"\"\nAll the metrics are to be called from here\n\"\"\"\nimport torch\nfrom sklearn.metrics import balanced_accuracy_score\nimport numpy as np\n\n\ndef classification_accuracy(output, label, params):\n if params[\"problem_type\"] == \"classification\":\n predicted_classes = torch.argm... | diff --git a/GANDLF/metrics/regression.py b/GANDLF/metrics/regression.py
index 9ebec04be..41af89239 100644
--- a/GANDLF/metrics/regression.py
+++ b/GANDLF/metrics/regression.py
@@ -11,7 +11,8 @@ def classification_accuracy(output, label, params):
predicted_classes = torch.argmax(output, 1)
else:
... |
scipy__scipy-10447 | Build adds the user folder inside the code base
After building the SciPy on Windows 10, the base folder has a copy of the following folder
```
C:\Users\<user>\Documents\GitHub\scipy\Users\<user>\AppData\Local\Temp\tmpuvtg6i4i\main.obj
```
From the look of the structure, it seems like a relative folder is used ins... | [
{
"content": "\ndef try_compile(compiler, code=None, flags=[], ext='.cpp'):\n \"\"\"Returns True if the compiler is able to compile the given code\"\"\"\n import tempfile\n from distutils.errors import CompileError\n import os\n\n code = code or 'int main (int argc, char **argv) { return 0; }'\n\... | [
{
"content": "\ndef try_compile(compiler, code=None, flags=[], ext='.cpp'):\n \"\"\"Returns True if the compiler is able to compile the given code\"\"\"\n import tempfile\n from distutils.errors import CompileError\n import os\n\n code = code or 'int main (int argc, char **argv) { return 0; }'\n\... | diff --git a/scipy/fft/_pocketfft/setup.py b/scipy/fft/_pocketfft/setup.py
index ea2d809b611d..83378c289f1b 100644
--- a/scipy/fft/_pocketfft/setup.py
+++ b/scipy/fft/_pocketfft/setup.py
@@ -13,7 +13,7 @@ def try_compile(compiler, code=None, flags=[], ext='.cpp'):
f.write(code)
try:
- ... |
numpy__numpy-12376 | import_array hides true cause of import errors
When compiling for Python 3, it would be useful to utilize exception chaining to explain why "numpy.core.multiarray failed to import". I think you can use [PyException_SetCause](https://docs.python.org/3/c-api/exceptions.html#c.PyException_SetCause) to do this?
| [
{
"content": "from __future__ import division, print_function\n\nimport os\nimport genapi\n\nfrom genapi import \\\n TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi\n\nimport numpy_api\n\n# use annotated api when running under cpychecker\nh_template = r\"\"\"\n#if defined(_MULTIARRAYMODULE) || defined(... | [
{
"content": "from __future__ import division, print_function\n\nimport os\nimport genapi\n\nfrom genapi import \\\n TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi\n\nimport numpy_api\n\n# use annotated api when running under cpychecker\nh_template = r\"\"\"\n#if defined(_MULTIARRAYMODULE) || defined(... | diff --git a/numpy/core/code_generators/generate_numpy_api.py b/numpy/core/code_generators/generate_numpy_api.py
index 7f2541667a76..a883ee469cfa 100644
--- a/numpy/core/code_generators/generate_numpy_api.py
+++ b/numpy/core/code_generators/generate_numpy_api.py
@@ -50,7 +50,6 @@
PyObject *c_api = NULL;
if (num... |
pyca__cryptography-1418 | EC key loading fails with AssertionError on bad key
Example:
``` py
numbers = ec.EllipticCurvePrivateNumbers(
357646505660320080863666618182642070958081774038609089496899025506,
ec.EllipticCurvePublicNumbers(
-4725080841032702313157360200834589492768638177232556118553296... | [
{
"content": "# 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 applicable law or agreed to in writing, so... | [
{
"content": "# 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 applicable law or agreed to in writing, so... | diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py
index 567f16481016..bb1a3f3dcfc1 100644
--- a/cryptography/hazmat/backends/openssl/backend.py
+++ b/cryptography/hazmat/backends/openssl/backend.py
@@ -984,6 +984,11 @@ def _ec_key_set_public_key_affine_coordi... |
microsoft__botbuilder-python-1804 | Django Component Governance vulnerability
Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection if untrusted data is used as a StringAgg delimiter (e.g., in Django applications that offer downloads of data as a series of rows with a user-specified column delimiter). By passing a suita... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"applicationinsights==0.11.9\",\n \"botbuilder-schema==4.15.0\",\n \"botframework-connector==4.15.0\",\n \"botbuilder-core==4.15.... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"applicationinsights==0.11.9\",\n \"botbuilder-schema==4.15.0\",\n \"botframework-connector==4.15.0\",\n \"botbuilder-core==4.15.... | diff --git a/libraries/botbuilder-applicationinsights/setup.py b/libraries/botbuilder-applicationinsights/setup.py
index 498667acb..a406c7add 100644
--- a/libraries/botbuilder-applicationinsights/setup.py
+++ b/libraries/botbuilder-applicationinsights/setup.py
@@ -12,7 +12,7 @@
]
TESTS_REQUIRES = [
"aiounittest=... |
netbox-community__netbox-16128 | Permit loading settings from a designated external module
### NetBox version
v4.0.1
### Feature type
New functionality
### Proposed functionality
Extend `settings.py` to load arbitrary settings from a designated external module (`local_settings.py`), if it exists, and set `settings._UNSUPPORTED_SETTINGS` to true, ... | [
{
"content": "import hashlib\nimport importlib\nimport importlib.util\nimport os\nimport platform\nimport sys\nimport warnings\nfrom urllib.parse import urlencode, urlsplit\n\nimport django\nimport requests\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import Improperly... | [
{
"content": "import hashlib\nimport importlib\nimport importlib.util\nimport os\nimport platform\nimport sys\nimport warnings\nfrom urllib.parse import urlencode, urlsplit\n\nimport django\nimport requests\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import Improperly... | diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index f86760b53f9..23704bfebc2 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -801,3 +801,10 @@ def _setting(name, default=None):
RQ_QUEUES.update({
f"{plugin_name}.{queue}": RQ_PARAMS for queue in plugin_config.... |
rasterio__rasterio-1452 | Make Window Hashable
<!--
WELCOME ABOARD!
Hi and welcome to the Rasterio project. We appreciate bug reports, questions
about documentation, and suggestions for new features. This issue template
isn't intended to ward you off; only to intercept and redirect some particular
categories of reports, and to collect ... | [
{
"content": "\"\"\"Window utilities and related functions.\n\nA window is an instance of Window\n\n Window(column_offset, row_offset, width, height)\n\nor a 2D N-D array indexer in the form of a tuple.\n\n ((row_start, row_stop), (col_start, col_stop))\n\nThe latter can be evaluated within the context of... | [
{
"content": "\"\"\"Window utilities and related functions.\n\nA window is an instance of Window\n\n Window(column_offset, row_offset, width, height)\n\nor a 2D N-D array indexer in the form of a tuple.\n\n ((row_start, row_stop), (col_start, col_stop))\n\nThe latter can be evaluated within the context of... | diff --git a/rasterio/windows.py b/rasterio/windows.py
index 0180cf1c2..1ab5bbe85 100644
--- a/rasterio/windows.py
+++ b/rasterio/windows.py
@@ -475,7 +475,8 @@ def validate_length_value(instance, attribute, value):
raise ValueError("Number of columns or rows must be non-negative")
-@attr.s(slots=True)
+@a... |
evennia__evennia-600 | '<' character is an "escape" character when messaging characters?
Hi! I'm not sure if anyone else has stumbled across this issue. I first discovered this using a custom character typeclass that didn't have its msg method overloaded, and then tested it again with the default character typeclass. I haven't messed/overrod... | [
{
"content": "\"\"\"\nMXP - Mud eXtension Protocol.\n\nPartial implementation of the MXP protocol.\nThe MXP protocol allows more advanced formatting options for telnet clients\nthat supports it (mudlet, zmud, mushclient are a few)\n\nThis only implements the SEND tag.\n\nMore information can be found on the fol... | [
{
"content": "\"\"\"\nMXP - Mud eXtension Protocol.\n\nPartial implementation of the MXP protocol.\nThe MXP protocol allows more advanced formatting options for telnet clients\nthat supports it (mudlet, zmud, mushclient are a few)\n\nThis only implements the SEND tag.\n\nMore information can be found on the fol... | diff --git a/src/server/portal/mxp.py b/src/server/portal/mxp.py
index 94eb3ac7f0c..05d9958a059 100644
--- a/src/server/portal/mxp.py
+++ b/src/server/portal/mxp.py
@@ -28,6 +28,10 @@ def mxp_parse(text):
"""
Replaces links to the correct format for MXP.
"""
+ text = text.replace("&", "&") \
+ ... |
translate__translate-4805 | Outdated footer on the documentation website
The copyright notice in the docs webpage still state 2022 instead of 2023.
| [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | diff --git a/docs/conf.py b/docs/conf.py
index 6d0cf107de..2f1c8e9c1e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -21,7 +21,7 @@
# -- Project information -----------------------------------------------------
project = "Translate Toolkit"
-copyright = "2002-2022, Translate"
+copyright = "2002-2023, Translate"
... |
ethereum__web3.py-3090 | Add `eth_chainId` to retry middleware whitelist
### What was wrong?
I enabled the `http_retry_request_middleware`, but an idempotent method that is called frequently (`eth_chainId`) is missing from the retry whitelist
### How can it be fixed?
Add this method to the retry method whitelist in the code
| [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Collection,\n Optional,\n Type,\n)\n\nimport aiohttp\nfrom requests.exceptions import (\n ConnectionError,\n HTTPError,\n Timeout,\n TooManyRedirects,\n)\n\nfrom web3.types import (\n AsyncM... | [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Collection,\n Optional,\n Type,\n)\n\nimport aiohttp\nfrom requests.exceptions import (\n ConnectionError,\n HTTPError,\n Timeout,\n TooManyRedirects,\n)\n\nfrom web3.types import (\n AsyncM... | diff --git a/newsfragments/3090.feature.rst b/newsfragments/3090.feature.rst
new file mode 100644
index 0000000000..6c7c2688e7
--- /dev/null
+++ b/newsfragments/3090.feature.rst
@@ -0,0 +1 @@
+Add ``eth_maxPriorityFeePerGas`` to ``exception_retry_middleware`` whitelist
diff --git a/tests/core/middleware/test_http_reque... |
pypa__setuptools-2897 | [FR] User configurable get_requires_for_build_wheel and get_requires_for_build_sdist
### What's the problem this feature will solve?
https://github.com/pypa/setuptools/issues/2823 proposes to remove the legacy `setup_requires` option. Currently, `setup_requires` can be set statically (which has been replaced by the `r... | [
{
"content": "extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']\n\nmaster_doc = \"index\"\n\nlink_files = {\n '../CHANGES.rst': dict(\n using=dict(\n BB='https://bitbucket.org',\n GH='https://github.com',\n ),\n replace=[\n dict... | [
{
"content": "import os\nimport sys\n\nextensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']\n\nmaster_doc = \"index\"\n\nlink_files = {\n '../CHANGES.rst': dict(\n using=dict(\n BB='https://bitbucket.org',\n GH='https://github.com',\n ),\n re... | diff --git a/changelog.d/2897.docs.rst b/changelog.d/2897.docs.rst
new file mode 100644
index 0000000000..763a39b8ef
--- /dev/null
+++ b/changelog.d/2897.docs.rst
@@ -0,0 +1,4 @@
+Added documentation about wrapping ``setuptools.build_meta`` in a in-tree
+custom backend. This is a :pep:`517`-compliant way of dynamically... |
CTFd__CTFd-2215 | Health check fails on / despite app being online
<!--
If this is a bug report please fill out the template below.
If this is a feature request please describe the behavior that you'd like to see.
-->
**Environment**:
- CTFd Version/Commit: Latest Docker
- Operating System: Latest Docker
- Web Browser and V... | [
{
"content": "import datetime\nimport logging\nimport os\nimport sys\n\nfrom flask import abort, redirect, render_template, request, session, url_for\nfrom sqlalchemy.exc import IntegrityError, InvalidRequestError\nfrom werkzeug.middleware.dispatcher import DispatcherMiddleware\n\nfrom CTFd.cache import clear_u... | [
{
"content": "import datetime\nimport logging\nimport os\nimport sys\n\nfrom flask import abort, redirect, render_template, request, session, url_for\nfrom sqlalchemy.exc import IntegrityError, InvalidRequestError\nfrom werkzeug.middleware.dispatcher import DispatcherMiddleware\n\nfrom CTFd.cache import clear_u... | diff --git a/CTFd/utils/initialization/__init__.py b/CTFd/utils/initialization/__init__.py
index a7ac22f1e..903d6168c 100644
--- a/CTFd/utils/initialization/__init__.py
+++ b/CTFd/utils/initialization/__init__.py
@@ -198,6 +198,7 @@ def needs_setup():
"views.integrations",
"views.theme... |
googleapis__python-bigquery-1477 | Add __str__ method to DatasetReference
Thanks for stopping by to let us know something could be better!
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
... | [
{
"content": "# Copyright 2015 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2015 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/google/cloud/bigquery/dataset.py b/google/cloud/bigquery/dataset.py
index c30204067..0edd29359 100644
--- a/google/cloud/bigquery/dataset.py
+++ b/google/cloud/bigquery/dataset.py
@@ -215,6 +215,9 @@ def __ne__(self, other):
def __hash__(self):
return hash(self._key())
+ def __str__(self... |
open-telemetry__opentelemetry-python-915 | Fix a few issues in Django example
The Django example has a few issues, fix them.
| [
{
"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/docs/examples/django/README.rst b/docs/examples/django/README.rst
index 95c106d32f7..e8a043684f6 100644
--- a/docs/examples/django/README.rst
+++ b/docs/examples/django/README.rst
@@ -56,7 +56,7 @@ Open up a new console and activate the previous virtual environment there too:
``source django_auto_instru... |
CTFd__CTFd-1908 | Bump pybluemonday to latest
Just tracking this so we don't forget. Latest should be 0.0.6 with bluemonday at 1.0.10. It adds support for comments in the HTML output.
| [
{
"content": "from pybluemonday import UGCPolicy\n\n# Copied from lxml:\n# https://github.com/lxml/lxml/blob/e986a9cb5d54827c59aefa8803bc90954d67221e/src/lxml/html/defs.py#L38\n# fmt: off\nSAFE_ATTRS = (\n 'abbr', 'accept', 'accept-charset', 'accesskey', 'action', 'align',\n 'alt', 'axis', 'border', 'cell... | [
{
"content": "from pybluemonday import UGCPolicy\n\n# Copied from lxml:\n# https://github.com/lxml/lxml/blob/e986a9cb5d54827c59aefa8803bc90954d67221e/src/lxml/html/defs.py#L38\n# fmt: off\nSAFE_ATTRS = (\n 'abbr', 'accept', 'accept-charset', 'accesskey', 'action', 'align',\n 'alt', 'axis', 'border', 'cell... | diff --git a/CTFd/utils/security/sanitize.py b/CTFd/utils/security/sanitize.py
index 0cef25329..5ad1b9c80 100644
--- a/CTFd/utils/security/sanitize.py
+++ b/CTFd/utils/security/sanitize.py
@@ -92,6 +92,9 @@
SANITIZER.RequireNoReferrerOnFullyQualifiedLinks(True)
SANITIZER.RequireNoReferrerOnLinks(True)
+# Allow Comm... |
bridgecrewio__checkov-2214 | CKV_AZURE_80 - dotnet_framework_version with v6.0 fails
**Describe the issue**
Currently .NET 6.0 is the latest LTS version. However, CKV_AZURE_80 expects that latest version is v5.0.
**Examples**
```
resource "azurerm_app_service" "searchApi" {
...
site_config {
dotnet_framework_version = "v6.0"
}
... | [
{
"content": "from checkov.common.models.enums import CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass AppServiceDotnetFrameworkVersion(BaseResourceValueCheck):\n def __init__(self):\n name = \"Ensure that 'Net Framework' versio... | [
{
"content": "from checkov.common.models.enums import CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass AppServiceDotnetFrameworkVersion(BaseResourceValueCheck):\n def __init__(self):\n name = \"Ensure that 'Net Framework' versio... | diff --git a/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py b/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py
index e4fd2f4619..8aa6622032 100644
--- a/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py
+++ b/checkov/terraform/checks/reso... |
RedHatInsights__insights-core-2914 | Remove verbose ImportError logs
The [ImportError logs generated during dynamic import](https://github.com/RedHatInsights/insights-core/blob/master/insights/core/dr.py#L160) are verbose and unhelpful. Let's remove them.
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1920989.
| [
{
"content": "\"\"\"\nThis module implements an inversion of control framework. It allows\ndependencies among functions and classes to be declared with decorators and the\nresulting dependency graphs to be executed.\n\nA decorator used to declare dependencies is called a :class:`ComponentType`, a\ndecorated fun... | [
{
"content": "\"\"\"\nThis module implements an inversion of control framework. It allows\ndependencies among functions and classes to be declared with decorators and the\nresulting dependency graphs to be executed.\n\nA decorator used to declare dependencies is called a :class:`ComponentType`, a\ndecorated fun... | diff --git a/insights/core/dr.py b/insights/core/dr.py
index 80d951df11..11ecec3fb9 100644
--- a/insights/core/dr.py
+++ b/insights/core/dr.py
@@ -156,9 +156,7 @@ def _import_component(name):
for f in (_get_from_module, _get_from_class):
try:
return f(name)
- except Exception as e:
- ... |
mkdocs__mkdocs-1940 | Jinja2 2.10 security vulnerability reported by GitHub
Hi
I just got an alert on my github repo (where we use mkdocs to build our doc) for Jinja2 2.10:
- https://github.com/eclipse/openj9-docs/network/alert/buildenv/requirements.txt/Jinja2/open
Recommendation is to move to 2.10.1.
Are there any known issues ... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n\nlong_description = (\n \"MkDocs is a fast, simple and downright gorgeous static site generator \"\n \"that's geared towards building project documentation. Documentation \"\n \"source files are wr... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n\nlong_description = (\n \"MkDocs is a fast, simple and downright gorgeous static site generator \"\n \"that's geared towards building project documentation. Documentation \"\n \"source files are wr... | diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index 27427106ea..a855eeda14 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -56,6 +56,8 @@ your global navigation uses more than one level, things will likely be broken.
### Other Changes and Additions to Version 1.... |
scikit-image__scikit-image-3213 | Rescale intensity returns only a float given an array
## Description
I start with a numpy `array` that has `array.shape == (1, 1)` and `array.dtype == np.float64`. Let's define an example `array = np.array([[0]], dtype=np.float64)`.
If I then pass this float64 array as the first argument of `exposure.rescale_inte... | [
{
"content": "import numpy as np\n\nfrom ..color import rgb2gray\nfrom ..util.dtype import dtype_range, dtype_limits\nfrom .._shared.utils import warn\n\n\n__all__ = ['histogram', 'cumulative_distribution', 'equalize_hist',\n 'rescale_intensity', 'adjust_gamma', 'adjust_log', 'adjust_sigmoid']\n\n\nDT... | [
{
"content": "import numpy as np\n\nfrom ..color import rgb2gray\nfrom ..util.dtype import dtype_range, dtype_limits\nfrom .._shared.utils import warn\n\n\n__all__ = ['histogram', 'cumulative_distribution', 'equalize_hist',\n 'rescale_intensity', 'adjust_gamma', 'adjust_log', 'adjust_sigmoid']\n\n\nDT... | diff --git a/skimage/exposure/exposure.py b/skimage/exposure/exposure.py
index 05046a849c9..386c0346cca 100644
--- a/skimage/exposure/exposure.py
+++ b/skimage/exposure/exposure.py
@@ -294,7 +294,7 @@ def rescale_intensity(image, in_range='image', out_range='dtype'):
image = np.clip(image, imin, imax)
image... |
ros__ros_comm-316 | Multiple core using 127.* address can't run
Ros should not handle 127.0.0.0/255.0.0.0 as a unique ip: 127.0.0.1. It makes sence on specific environment to bind on 127.1.2.3 and not on 127.0.0.1 like in openshift gears.
It looks like this might be because adress starting with 127. are converted to 127.0.0.1
| [
{
"content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\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\n# are met:\n#\n# * Redistributions of so... | [
{
"content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\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\n# are met:\n#\n# * Redistributions of so... | diff --git a/tools/rosgraph/src/rosgraph/network.py b/tools/rosgraph/src/rosgraph/network.py
index ee3ac6a88e..af69d2fc78 100644
--- a/tools/rosgraph/src/rosgraph/network.py
+++ b/tools/rosgraph/src/rosgraph/network.py
@@ -254,6 +254,8 @@ def get_bind_address(address=None):
#localhost or 127/8
if use_... |
swcarpentry__python-novice-inflammation-946 | Code provided for students contain python code not compatible with python 3
At least one file in the `code` directory, e.g., `gen_inflammation.py` fails when running it with python 3. The [problem is the "division" not giving an integer](https://github.com/swcarpentry/python-novice-inflammation/blob/11643f14d31726f2f60... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"\nGenerate pseudo-random patient inflammation data for use in Python lessons.\n\"\"\"\n\nimport random\n\nn_patients = 60\nn_days = 40\nn_range = 20\n\nmiddle = n_days / 2\n\nfor p in range(n_patients):\n vals = []\n for d in range(n_days):\n upper = max... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"\nGenerate pseudo-random patient inflammation data for use in Python lessons.\n\"\"\"\n\nimport random\n\nn_patients = 60\nn_days = 40\nn_range = 20\n\nmiddle = n_days / 2\n\nfor p in range(n_patients):\n vals = []\n for d in range(n_days):\n upper = max... | diff --git a/code/gen_inflammation.py b/code/gen_inflammation.py
index 9f6ca80cb..85fabbc6a 100755
--- a/code/gen_inflammation.py
+++ b/code/gen_inflammation.py
@@ -16,5 +16,5 @@
vals = []
for d in range(n_days):
upper = max(n_range - abs(d - middle), 0)
- vals.append(random.randint(upper/4, u... |
opsdroid__opsdroid-1969 | Rasa intents multilanguage support
<!-- Before you post an issue or if you are unsure about something join our matrix channel https://app.element.io/#/room/#opsdroid-general:matrix.org and ask away! We are more than happy to help you. -->
# Description
When using non-alphanumeric characters (non English language) i... | [
{
"content": "\"\"\"A helper function for training, parsing and executing Rasa NLU skills.\"\"\"\n\nimport logging\nimport json\nimport unicodedata\n\nfrom hashlib import sha256\n\nimport aiohttp\nimport arrow\n\nfrom opsdroid.const import (\n RASANLU_DEFAULT_URL,\n RASANLU_DEFAULT_MODELS_PATH,\n RASAN... | [
{
"content": "\"\"\"A helper function for training, parsing and executing Rasa NLU skills.\"\"\"\n\nimport logging\nimport json\nimport unicodedata\n\nfrom hashlib import sha256\n\nimport aiohttp\nimport arrow\n\nfrom opsdroid.const import (\n RASANLU_DEFAULT_URL,\n RASANLU_DEFAULT_MODELS_PATH,\n RASAN... | diff --git a/opsdroid/parsers/rasanlu.py b/opsdroid/parsers/rasanlu.py
index b8784f2f4..de92c679b 100644
--- a/opsdroid/parsers/rasanlu.py
+++ b/opsdroid/parsers/rasanlu.py
@@ -31,7 +31,7 @@ async def _get_all_intents(skills):
if not intents:
return None
intents = "\n\n".join(intents)
- return uni... |
Cloud-CV__EvalAI-3370 | [Frontend V2] Fix the media assets endpoint
### Description
We recently moved to `https://evalai.s3.amazonaws.com/` endpoint for our media assets. Frontend v2 is still using `https://staging-evalai.s3.amazonaws.com/` endpoint. We should switch to new enpdoint in frontend v2.
| [
{
"content": "from .prod import * # noqa: ignore=F405\n\nALLOWED_HOSTS = [\"staging.eval.ai\"]\n\nCORS_ORIGIN_ALLOW_ALL = False\n\nCORS_ORIGIN_WHITELIST = (\n \"https://staging-evalai.s3.amazonaws.com\",\n \"https://staging.eval.ai\",\n \"https://beta-staging.eval.ai\",\n)\n",
"path": "settings/st... | [
{
"content": "from .prod import * # noqa: ignore=F405\n\nALLOWED_HOSTS = [\"staging.eval.ai\"]\n\nCORS_ORIGIN_ALLOW_ALL = False\n\nCORS_ORIGIN_WHITELIST = (\n \"https://evalai.s3.amazonaws.com\",\n \"https://staging-evalai.s3.amazonaws.com\",\n \"https://staging.eval.ai\",\n \"https://beta-staging.... | diff --git a/settings/staging.py b/settings/staging.py
index c1c0eaeed7..bbae604d49 100644
--- a/settings/staging.py
+++ b/settings/staging.py
@@ -5,6 +5,7 @@
CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = (
+ "https://evalai.s3.amazonaws.com",
"https://staging-evalai.s3.amazonaws.com",
"https:/... |
rotki__rotki-5059 | Unicode logging entries in Windows
## Problem Definition
While checking the logs of a Windows user I noticed the following repeating multiple times inside rotki-electron.log
```--- Logging error ---
Traceback (most recent call last):
File "logging\__init__.py", line 1086, in emit
File "encodings\cp1252.py"... | [
{
"content": "import argparse\nimport logging.config\nimport re\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Dict, MutableMapping, Optional, Tuple\n\nimport gevent\n\nfrom rotkehlchen.utils.misc import timestamp_to_date, ts_now\n\nPYWSGI_RE = re.compile(r'\\[(.*)\\] ')\n\nTRACE ... | [
{
"content": "import argparse\nimport logging.config\nimport re\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Dict, MutableMapping, Optional, Tuple\n\nimport gevent\n\nfrom rotkehlchen.utils.misc import timestamp_to_date, ts_now\n\nPYWSGI_RE = re.compile(r'\\[(.*)\\] ')\n\nTRACE ... | diff --git a/rotkehlchen/logging.py b/rotkehlchen/logging.py
index b81ca6436b..3f314898a2 100644
--- a/rotkehlchen/logging.py
+++ b/rotkehlchen/logging.py
@@ -176,6 +176,7 @@ def configure_logging(args: argparse.Namespace) -> None:
'backupCount': backups_num,
'level': loglevel,
'f... |
cocotb__cocotb-1401 | Document run order of tests
With #1380 merged, tests are now defined to run in the order they are listed in the source file. Document this fact somewhere in the docs, and the change in the release notes.
| [
{
"content": "# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\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 met:\n# * Redistributions o... | [
{
"content": "# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\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 met:\n# * Redistributions o... | diff --git a/cocotb/decorators.py b/cocotb/decorators.py
index aecbb2cc42..b9b63b8413 100644
--- a/cocotb/decorators.py
+++ b/cocotb/decorators.py
@@ -421,6 +421,8 @@ class test(_py_compat.with_metaclass(_decorator_helper, coroutine)):
some common reporting etc., a test timeout and allows
us to mark tests as ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.