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 ⌀ |
|---|---|---|---|---|
uccser__cs-unplugged-1466 | HTML can be inserted into a user's Plugging it in challenge templates
### The steps are:
- [Open any programming challenge on PII](https://www.csunplugged.org/en/plugging-it-in/binary-numbers/how-binary-digits-work/binary-numbers-no-calculations/)
- Submit this code in the answer box:
- `</script><script type="t... | [
{
"content": "\"\"\"Module for Django system configuration.\"\"\"\n\n__version__ = \"6.0.0\"\n",
"path": "csunplugged/config/__init__.py"
},
{
"content": "\"\"\"Views for the plugging_it_in application.\"\"\"\n\nfrom django.http import HttpResponse\nfrom django.http import Http404\n\nimport json\nim... | [
{
"content": "\"\"\"Module for Django system configuration.\"\"\"\n\n__version__ = \"6.0.1\"\n",
"path": "csunplugged/config/__init__.py"
},
{
"content": "\"\"\"Views for the plugging_it_in application.\"\"\"\n\nfrom django.http import HttpResponse\nfrom django.http import Http404\n\nimport json\nim... | diff --git a/csunplugged/config/__init__.py b/csunplugged/config/__init__.py
index 25864d385..7d4ac7074 100644
--- a/csunplugged/config/__init__.py
+++ b/csunplugged/config/__init__.py
@@ -1,3 +1,3 @@
"""Module for Django system configuration."""
-__version__ = "6.0.0"
+__version__ = "6.0.1"
diff --git a/csunplugged... |
pymedusa__Medusa-1291 | View Log and Submit Errors broken
### Before submitting your issue:
Enable debug logging in SickRage settings, reproduce the error (be sure to disable after the bug is fixed)
**Branch/Commit**: Develop / 6eca5cd5343536f4ca9df32097e872c1a74dc4de
**OS**: Win 10x64
**What you did**: View Logs in GUI by either `Tools -> ... | [
{
"content": "# coding=utf-8\n# Author: Nic Wolfe <nic@wolfeden.ca>\n\n#\n# This file is part of Medusa.\n#\n# Medusa is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, ... | [
{
"content": "# coding=utf-8\n# Author: Nic Wolfe <nic@wolfeden.ca>\n\n#\n# This file is part of Medusa.\n#\n# Medusa is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, ... | diff --git a/medusa/logger.py b/medusa/logger.py
index b832152b61..9bc839a0bd 100644
--- a/medusa/logger.py
+++ b/medusa/logger.py
@@ -193,7 +193,10 @@ def reverse_readlines(filename, buf_size=2097152, encoding=default_encoding):
offset = min(file_size, offset + buf_size)
fh.seek(file_size - o... |
pwr-Solaar__Solaar-1744 | Claim about secure unencrypted mouse
**Information**
There is a message in solaar
```text
The wireless link between this device and its receiver is not encrypted.
For pointing devices (mice, trackballs, trackpads), this is a minor security issue.
It is, however, a major security issue for text-input device... | [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py
index 9a3b4c1818..4a2a7bf66f 100644
--- a/lib/solaar/ui/window.py
+++ b/lib/solaar/ui/window.py
@@ -730,11 +730,7 @@ def _update_device_panel(device, panel, buttons, full=False):
panel._secure.set_tooltip_text(
_(
... |
koxudaxi__datamodel-code-generator-1248 | (🎁) Log input file type when when `--input-file-type` is `auto`
I was left a little confused when my json file was silently detected as jsonschema instead of json.
| [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport os\nfrom datetime import datetime, timezone\nfrom enum import Enum\nfrom pathlib import Path\nfrom typing import (\n IO,\n TYPE_CHECKING,\n Any,\n Callable,\n DefaultDict,\n Dict,\n Iterator,\n List,\n Mappi... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport os\nimport sys\nfrom datetime import datetime, timezone\nfrom enum import Enum\nfrom pathlib import Path\nfrom typing import (\n IO,\n TYPE_CHECKING,\n Any,\n Callable,\n DefaultDict,\n Dict,\n Iterator,\n List... | diff --git a/datamodel_code_generator/__init__.py b/datamodel_code_generator/__init__.py
index b78d25f8d..552857540 100644
--- a/datamodel_code_generator/__init__.py
+++ b/datamodel_code_generator/__init__.py
@@ -2,6 +2,7 @@
import contextlib
import os
+import sys
from datetime import datetime, timezone
from enum... |
fossasia__open-event-server-1831 | Issue with Event Importing
Importing Event with Copyright information in event.json fails.
The issue is because of CopyrightDAO which has no real value of version_key defined.
| [
{
"content": "import json\nfrom hashlib import md5\n\nfrom flask import request\nfrom flask.ext.restplus import Resource as RestplusResource\nfrom flask_restplus import Model, fields, reqparse\n\nfrom .helpers import get_object_list, get_object_or_404, get_object_in_event, \\\n create_model, validate_payload... | [
{
"content": "import json\nfrom hashlib import md5\n\nfrom flask import request\nfrom flask.ext.restplus import Resource as RestplusResource\nfrom flask_restplus import Model, fields, reqparse\n\nfrom .helpers import get_object_list, get_object_or_404, get_object_in_event, \\\n create_model, validate_payload... | diff --git a/app/api/helpers/utils.py b/app/api/helpers/utils.py
index 776be47cb3..0cc3c27c5b 100644
--- a/app/api/helpers/utils.py
+++ b/app/api/helpers/utils.py
@@ -111,7 +111,7 @@ class BaseDAO:
"""
DAO for a basic independent model
"""
- version_key = 'base_ver'
+ version_key = None
def ... |
modin-project__modin-1642 | Upgrade to pandas 1.0.5
https://github.com/pandas-dev/pandas/releases/tag/v1.0.5
| [
{
"content": "from setuptools import setup, find_packages\nimport versioneer\nimport os\nfrom setuptools.dist import Distribution\n\ntry:\n from wheel.bdist_wheel import bdist_wheel\n\n HAS_WHEEL = True\nexcept ImportError:\n HAS_WHEEL = False\n\nwith open(\"README.md\", \"r\") as fh:\n long_descrip... | [
{
"content": "from setuptools import setup, find_packages\nimport versioneer\nimport os\nfrom setuptools.dist import Distribution\n\ntry:\n from wheel.bdist_wheel import bdist_wheel\n\n HAS_WHEEL = True\nexcept ImportError:\n HAS_WHEEL = False\n\nwith open(\"README.md\", \"r\") as fh:\n long_descrip... | diff --git a/modin/pandas/__init__.py b/modin/pandas/__init__.py
index bc320f16d7f..f42dd6e061e 100644
--- a/modin/pandas/__init__.py
+++ b/modin/pandas/__init__.py
@@ -13,7 +13,7 @@
import pandas
-__pandas_version__ = "1.0.3"
+__pandas_version__ = "1.0.5"
if pandas.__version__ != __pandas_version__:
impor... |
awslabs__gluonts-783 | Cannot Run examples in a MacOs and Python3.7
## Description
Hi,
~~I just installed using `pip` command showed in the documentation and, using one of the examples in a jupyter notebook, when I do an import:
`from gluonts.dataset.repository.datasets import get_dataset, dataset_recipes`
I got an error.~~
I found th... | [
{
"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/core/component.py b/src/gluonts/core/component.py
index f9ce6631bf..2220dfd1dc 100644
--- a/src/gluonts/core/component.py
+++ b/src/gluonts/core/component.py
@@ -393,15 +393,13 @@ def validator(init):
if base_model is None:
PydanticModel = create_model(
- ... |
translate__pootle-4218 | update_stores logic is no longer called when TP is initialised
This is a regression from #3877
If this is the desired behaviour ill make the necessary changes to restore it.
The other option is explicitly calling `update_stores` after adding TP - and changing docs to reflect that.
In order to fix i probably need to... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | diff --git a/docs/releases/dev.rst b/docs/releases/dev.rst
index 82c2a7cc0e4..36e2a9bb1ec 100644
--- a/docs/releases/dev.rst
+++ b/docs/releases/dev.rst
@@ -24,6 +24,8 @@ Major Changes
- Added support for Elasticsearch-based external Translation Memory servers.
- Cleaned up connection logic for Translation Memory ser... |
saleor__saleor-3337 | The fetch vat rates button should not be a GET method
### What I'm trying to achieve
Not to allow GET methods to fetch vat rates.
### Steps to reproduce the problem
1. Go to configuration -> Taxes ;
2. The fetch tax rates button, is a GET button.
### What I expected to happen
Get a POST instead of a GET, whic... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import permission_required\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.core.management import call_command\nfrom django.shortcuts import get_object... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import permission_required\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.core.management import call_command\nfrom django.shortcuts import get_object... | diff --git a/saleor/dashboard/taxes/views.py b/saleor/dashboard/taxes/views.py
index 31e52987b72..9eef38f8bc8 100644
--- a/saleor/dashboard/taxes/views.py
+++ b/saleor/dashboard/taxes/views.py
@@ -8,6 +8,7 @@
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateRespons... |
mitmproxy__mitmproxy-4068 | Crash from comparison with None
#### Problem Description
I got this crash after leaving mitmproxy open for a few hours:
```
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mitmproxy/proxy/server.py", line 121, in handle
root_layer()-laptop ~]$
File "/usr/lib/python3.8/site-p... | [
{
"content": "import os\nimport errno\nimport select\nimport socket\nimport sys\nimport threading\nimport time\nimport traceback\n\nfrom typing import Optional # noqa\n\nfrom mitmproxy.net import tls\n\nfrom OpenSSL import SSL\n\nfrom mitmproxy import certs\nfrom mitmproxy import exceptions\nfrom mitmproxy.cor... | [
{
"content": "import os\nimport errno\nimport select\nimport socket\nimport sys\nimport threading\nimport time\nimport traceback\n\nfrom typing import Optional # noqa\n\nfrom mitmproxy.net import tls\n\nfrom OpenSSL import SSL\n\nfrom mitmproxy import certs\nfrom mitmproxy import exceptions\nfrom mitmproxy.cor... | diff --git a/mitmproxy/net/tcp.py b/mitmproxy/net/tcp.py
index 07cee466e7..b76a48bf2b 100644
--- a/mitmproxy/net/tcp.py
+++ b/mitmproxy/net/tcp.py
@@ -125,7 +125,9 @@ def read(self, length):
# underlying BIO could not satisfy the needs of SSL_read() to continue the
# operation. In this... |
opendatacube__datacube-core-680 | Errors when running against the impending sqlalchemy 1.3 release (in beta)
Originally reported in #667
Datacube consistently fails when run against the current beta version of sqlalchemy. [According to](https://www.sqlalchemy.org/blog/2019/02/08/sqlalchemy-1.3.0b3-released/) the sqlalchemy devs this release "1.3b3 s... | [
{
"content": "# coding=utf-8\n\"\"\"\nCustom types for postgres & sqlalchemy\n\"\"\"\n\nfrom sqlalchemy import TIMESTAMP\nfrom sqlalchemy.dialects.postgresql.ranges import RangeOperators\nfrom sqlalchemy.ext.compiler import compiles\nfrom sqlalchemy.sql import sqltypes\nfrom sqlalchemy.sql.expression import Exe... | [
{
"content": "# coding=utf-8\n\"\"\"\nCustom types for postgres & sqlalchemy\n\"\"\"\n\nfrom sqlalchemy import TIMESTAMP\nfrom sqlalchemy.dialects.postgresql.ranges import RangeOperators\nfrom sqlalchemy.ext.compiler import compiles\nfrom sqlalchemy.sql import sqltypes\nfrom sqlalchemy.sql.expression import Exe... | diff --git a/datacube/drivers/postgres/sql.py b/datacube/drivers/postgres/sql.py
index 4f036df233..c9b472a408 100644
--- a/datacube/drivers/postgres/sql.py
+++ b/datacube/drivers/postgres/sql.py
@@ -57,7 +57,11 @@ class CommonTimestamp(GenericFunction):
package = 'agdc'
identifier = 'common_timestamp'
- ... |
pallets__click-1836 | Click prompts do not cooperate with readline module
When readline is imported and a user presses backspace during a Click prompt, the entire prompt message is erased and cursor goes to beginning of the line. This can be reproduced with the following code:
```
import click, readline
click.prompt("Input")
```
This is d... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport sys\nimport typing as t\nfrom gettext import gettext as _\n\nfrom ._compat import is_bytes\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions import ... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport sys\nimport typing as t\nfrom gettext import gettext as _\n\nfrom ._compat import is_bytes\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions import ... | diff --git a/CHANGES.rst b/CHANGES.rst
index 24eabda85..c6aa8100c 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -201,6 +201,8 @@ Unreleased
applications to translate Click's built-in strings. :issue:`303`
- Writing invalid characters to ``stderr`` when using the test runner
does not raise a ``UnicodeEncod... |
pytorch__ignite-2416 | ignite.distributed.Parallel: master_port seems always to be 2222 when using env:// init_method
I want to use another master_port in my machine. My code is below:
```python
def run(
backend='nccl',
resume=True,
nproc_per_node=4,
with_clearml=False,
with_amp=False,
**spawn_kwargs
):
... | [
{
"content": "import os\nimport re\nimport subprocess\nimport warnings\nfrom distutils.version import LooseVersion\nfrom typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Union, cast\n\nimport torch\nimport torch.distributed as dist\nimport torch.multiprocessing as mp\n\nfrom ignite.distributed... | [
{
"content": "import os\nimport re\nimport subprocess\nimport warnings\nfrom distutils.version import LooseVersion\nfrom typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Union, cast\n\nimport torch\nimport torch.distributed as dist\nimport torch.multiprocessing as mp\n\nfrom ignite.distributed... | diff --git a/ignite/distributed/comp_models/native.py b/ignite/distributed/comp_models/native.py
index b1fd40587cb5..5be4083fa1b5 100644
--- a/ignite/distributed/comp_models/native.py
+++ b/ignite/distributed/comp_models/native.py
@@ -382,8 +382,14 @@ def spawn( # type: ignore[override]
if init_method i... |
uccser__cs-unplugged-1464 | HTML can be inserted into a user's Plugging it in challenge templates
### The steps are:
- [Open any programming challenge on PII](https://www.csunplugged.org/en/plugging-it-in/binary-numbers/how-binary-digits-work/binary-numbers-no-calculations/)
- Submit this code in the answer box:
- `</script><script type="t... | [
{
"content": "\"\"\"Module for Django system configuration.\"\"\"\n\n__version__ = \"6.0.0\"\n",
"path": "csunplugged/config/__init__.py"
},
{
"content": "\"\"\"Views for the plugging_it_in application.\"\"\"\n\nfrom django.http import HttpResponse\nfrom django.http import Http404\n\nimport json\nim... | [
{
"content": "\"\"\"Module for Django system configuration.\"\"\"\n\n__version__ = \"6.0.1\"\n",
"path": "csunplugged/config/__init__.py"
},
{
"content": "\"\"\"Views for the plugging_it_in application.\"\"\"\n\nfrom django.http import HttpResponse\nfrom django.http import Http404\n\nimport json\nim... | diff --git a/csunplugged/config/__init__.py b/csunplugged/config/__init__.py
index 25864d385..7d4ac7074 100644
--- a/csunplugged/config/__init__.py
+++ b/csunplugged/config/__init__.py
@@ -1,3 +1,3 @@
"""Module for Django system configuration."""
-__version__ = "6.0.0"
+__version__ = "6.0.1"
diff --git a/csunplugged... |
jazzband__pip-tools-2083 | [TODO][CI][pip upstream changes] Fix failing nightlies running against `pip`'s `main` branch
Failure example: https://github.com/jazzband/pip-tools/actions/runs/8794562108/job/24134206791
| [
{
"content": "from __future__ import annotations\n\nfrom typing import Iterable\n\nfrom pip._internal.index.package_finder import PackageFinder\nfrom pip._internal.models.candidate import InstallationCandidate\nfrom pip._internal.req import InstallRequirement\nfrom pip._internal.utils.misc import redact_auth_fr... | [
{
"content": "from __future__ import annotations\n\nimport operator\nfrom typing import Iterable\n\nfrom pip._internal.index.package_finder import PackageFinder\nfrom pip._internal.models.candidate import InstallationCandidate\nfrom pip._internal.req import InstallRequirement\nfrom pip._internal.utils.misc impo... | diff --git a/piptools/exceptions.py b/piptools/exceptions.py
index 3e019a3d1..c056d02af 100644
--- a/piptools/exceptions.py
+++ b/piptools/exceptions.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+import operator
from typing import Iterable
from pip._internal.index.package_finder import PackageFinder
@@ ... |
conan-io__conan-center-index-5416 | [package] all: "Access is denied" in os.rename() on Windows
### Package and Environment Details (include every applicable attribute)
* Package Name/Version: **almost all packages affected**
* Operating System+version: **Windows 10**
* Compiler+version: **MSVC 16**
* Conan version: **conan 1.35.2**
* Pyth... | [
{
"content": "from conans import ConanFile, tools\nfrom conans.errors import ConanInvalidConfiguration\nimport os, glob\n\n\nclass ZuluOpenJDK(ConanFile):\n name = \"zulu-openjdk\"\n url = \"https://github.com/conan-io/conan-center-index/\"\n description = \"A OpenJDK distribution\"\n homepage = \"h... | [
{
"content": "from conans import ConanFile, tools\nfrom conans.errors import ConanInvalidConfiguration\nimport os, glob\n\n\nclass ZuluOpenJDK(ConanFile):\n name = \"zulu-openjdk\"\n url = \"https://github.com/conan-io/conan-center-index/\"\n description = \"A OpenJDK distribution\"\n homepage = \"h... | diff --git a/recipes/zulu-openjdk/all/conandata.yml b/recipes/zulu-openjdk/all/conandata.yml
index a4be6155f78fb..a57467339bfb7 100644
--- a/recipes/zulu-openjdk/all/conandata.yml
+++ b/recipes/zulu-openjdk/all/conandata.yml
@@ -1,12 +1,14 @@
sources:
"11.0.8":
- url: {
- "Windows": "https://cdn.azul.com/zu... |
mkdocs__mkdocs-254 | Modify stale files warning to ignore .htaccess, .gitignore and .git
I am not sure if this is the same as issue #167 or not, or if there a better workaround than the setup I am using.
I have the mkdocs project in one folder, and I am building to a sibling folder ( `site_dir: ../site` )
My site dir contains its own git ... | [
{
"content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nimport os\nimport shutil\n\nfrom mkdocs.compat import urlparse\n\n\ndef copy_file(source_path, output_path):\n ... | [
{
"content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nimport os\nimport shutil\n\nfrom mkdocs.compat import urlparse\n\n\ndef copy_file(source_path, output_path):\n ... | diff --git a/mkdocs/test.py b/mkdocs/test.py
index e0cce85bcc..2d88635166 100755
--- a/mkdocs/test.py
+++ b/mkdocs/test.py
@@ -596,6 +596,34 @@ def test_markdown_duplicate_custom_extension(self):
html_ext, _, _ = build.convert_markdown(md_input, ['toc'])
self.assertEqual(html_ext.strip(), '<p>foo</p>'... |
azavea__raster-vision-701 | Predict zero for nodata pixels on semantic segmentation
| [
{
"content": "from typing import List\nimport logging\n\nimport numpy as np\n\nfrom .task import Task\nfrom rastervision.core.box import Box\nfrom rastervision.data.scene import Scene\nfrom rastervision.data.label import SemanticSegmentationLabels\n\nlog = logging.getLogger(__name__)\n\n\ndef get_random_sample_... | [
{
"content": "from typing import List\nimport logging\n\nimport numpy as np\n\nfrom .task import Task\nfrom rastervision.core.box import Box\nfrom rastervision.data.scene import Scene\nfrom rastervision.data.label import SemanticSegmentationLabels\n\nlog = logging.getLogger(__name__)\n\n\ndef get_random_sample_... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 18e5826a9..2989486e4 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -6,6 +6,7 @@ Raster Vision 0.9
Raster Vision 0.9.0
~~~~~~~~~~~~~~~~~~~
+- Predict zero for nodata pixels on semantic segmentation `#701 <https://github.com/azavea/raster-vision... |
goauthentik__authentik-6913 | Do not silently ignore byte and none properties in _build_object_properties
**Is your feature request related to a problem? Please describe.**
It took me quite some time to understand why my custom ldap mapping had no effect.
**Describe the solution you'd like**
In the byte-case I think an exception should be rai... | [
{
"content": "\"\"\"Sync LDAP Users and groups into authentik\"\"\"\nfrom typing import Any, Generator\n\nfrom django.conf import settings\nfrom django.db.models.base import Model\nfrom django.db.models.query import QuerySet\nfrom ldap3 import DEREF_ALWAYS, SUBTREE, Connection\nfrom structlog.stdlib import Boun... | [
{
"content": "\"\"\"Sync LDAP Users and groups into authentik\"\"\"\nfrom typing import Any, Generator\n\nfrom django.conf import settings\nfrom django.db.models.base import Model\nfrom django.db.models.query import QuerySet\nfrom ldap3 import DEREF_ALWAYS, SUBTREE, Connection\nfrom structlog.stdlib import Boun... | diff --git a/authentik/sources/ldap/sync/base.py b/authentik/sources/ldap/sync/base.py
index b1d12df7ff84..2a769e101e5c 100644
--- a/authentik/sources/ldap/sync/base.py
+++ b/authentik/sources/ldap/sync/base.py
@@ -153,8 +153,10 @@ def _build_object_properties(
try:
value = mapping.evaluat... |
streamlit__streamlit-7255 | [v1.21.0] "TypeError: Unicode-objects must be encoded before hashing" in `util.calc_md5` due to inadequate type check
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provi... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | diff --git a/lib/streamlit/util.py b/lib/streamlit/util.py
index 4401b8d9254f..69edc2e7d55b 100644
--- a/lib/streamlit/util.py
+++ b/lib/streamlit/util.py
@@ -21,7 +21,7 @@
import hashlib
import os
import subprocess
-from typing import Any, Dict, Iterable, List, Mapping, Set, TypeVar, Union, cast
+from typing import... |
pyro-ppl__pyro-2828 | [bug] CSIS error when parameters are not fully used
### Issue Description
For `pyro.infer.csis`
If some parameters are not used to produce the outputs, the gradients can be None. In this case, an error will be raised as following
```/usr/local/lib/python3.7/dist-packages/pyro/infer/csis.py in loss_and_grads(self, gr... | [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport itertools\n\nimport torch\n\nimport pyro\nimport pyro.poutine as poutine\nfrom pyro.infer.importance import Importance\nfrom pyro.infer.util import torch_item\nfrom pyro.poutine.util import prune_sub... | [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport itertools\n\nimport torch\n\nimport pyro\nimport pyro.poutine as poutine\nfrom pyro.infer.importance import Importance\nfrom pyro.infer.util import torch_item\nfrom pyro.poutine.util import prune_sub... | diff --git a/pyro/infer/csis.py b/pyro/infer/csis.py
index 1d392c2a2c..06db33a844 100644
--- a/pyro/infer/csis.py
+++ b/pyro/infer/csis.py
@@ -113,6 +113,8 @@ def loss_and_grads(self, grads, batch, *args, **kwargs):
for site in particle_param_capture.trace.nodes.values())
... |
Kinto__kinto-367 | kinto init should install postgresql dependencies
| [
{
"content": "from __future__ import print_function\nimport argparse\nimport os\nimport sys\nfrom six.moves import input\nfrom cliquet.scripts import cliquet\nfrom pyramid.scripts import pserve\nfrom pyramid.paster import bootstrap\n\nfrom kinto.config import init\n\nCONFIG_FILE = 'config/kinto.ini'\n\n\ndef ma... | [
{
"content": "from __future__ import print_function\nimport argparse\nimport os\nimport sys\n\nimport pip\nfrom six.moves import input\nfrom cliquet.scripts import cliquet\nfrom pyramid.scripts import pserve\nfrom pyramid.paster import bootstrap\n\nfrom kinto.config import init\n\nCONFIG_FILE = 'config/kinto.in... | diff --git a/kinto/__main__.py b/kinto/__main__.py
index 0be5ac276..00a90e241 100644
--- a/kinto/__main__.py
+++ b/kinto/__main__.py
@@ -2,6 +2,8 @@
import argparse
import os
import sys
+
+import pip
from six.moves import input
from cliquet.scripts import cliquet
from pyramid.scripts import pserve
@@ -65,6 +67,13... |
ytdl-org__youtube-dl-1204 | Encrypted sig 87 broken again
All in title encrypted sig 87 are broken again.
Thanks.
| [
{
"content": "# coding: utf-8\n\nimport json\nimport netrc\nimport re\nimport socket\nimport itertools\n\nfrom .common import InfoExtractor, SearchInfoExtractor\nfrom ..utils import (\n compat_http_client,\n compat_parse_qs,\n compat_urllib_error,\n compat_urllib_parse,\n compat_urllib_request,\n... | [
{
"content": "# coding: utf-8\n\nimport json\nimport netrc\nimport re\nimport socket\nimport itertools\n\nfrom .common import InfoExtractor, SearchInfoExtractor\nfrom ..utils import (\n compat_http_client,\n compat_parse_qs,\n compat_urllib_error,\n compat_urllib_parse,\n compat_urllib_request,\n... | diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 4d3bce879f7..ba3b12b0ec6 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -338,7 +338,7 @@ def _decrypt_signature(self, s):
elif len(s) == 88:
return s[48] + s[81:67:-1] + s[82... |
OpenMined__PySyft-237 | Implement Default select Functionality for Base Tensor Type
**User Story A:** As a Data Scientist using Syft's Base Tensor type, I want to leverage a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, select() should return a new tensor. For a reference on the operati... | [
{
"content": "# -*- coding: utf-8 -*-\nimport numpy as np\nimport syft\nimport scipy\nimport pickle\n\n__all__ = [\n 'equal', 'TensorBase',\n]\n\n\ndef _ensure_ndarray(arr):\n if not isinstance(arr, np.ndarray):\n arr = np.array(arr)\n\n return arr\n\n\ndef _ensure_tensorbase(tensor):\n if no... | [
{
"content": "# -*- coding: utf-8 -*-\nimport numpy as np\nimport syft\nimport scipy\nimport pickle\n\n__all__ = [\n 'equal', 'TensorBase',\n]\n\n\ndef _ensure_ndarray(arr):\n if not isinstance(arr, np.ndarray):\n arr = np.array(arr)\n\n return arr\n\n\ndef _ensure_tensorbase(tensor):\n if no... | diff --git a/syft/tensor.py b/syft/tensor.py
index 8ed5efad8dd..6cf00090e3c 100644
--- a/syft/tensor.py
+++ b/syft/tensor.py
@@ -1160,6 +1160,22 @@ def serialize(self):
def deserialize(b):
return pickle.loads(b)
+ def index_select(self, dim, index):
+ """
+ Returns a new Tensor which in... |
holoviz__panel-3884 | FastTemplate not working on current master branch
Running the example in https://github.com/holoviz/panel/pull/3882 on the current `master` branch, I noticed the *theme toggle button* is not white. Looking at the browser console I can see it has problems loading a js file.
 -> ResourcesType:
else:
resource_path = url_path(resource)
r... |
jazzband__pip-tools-723 | pip-sync broken on Windows
Calling pip-sync on Windows returns:
```
Could not open requirements file: [Errno 13] Permission denied: 'c:\\users\\<username>\\appdata\\local\\temp\\tmpe9jswo'
```
This was introduced in 3.3.1 by the change to using `tempfile.NamedTemporaryFile` in [sync.py](https://github.com/jazzban... | [
{
"content": "import collections\nimport os\nimport sys\nimport tempfile\nfrom subprocess import check_call\n\nfrom piptools._compat import stdlib_pkgs, DEV_PKGS\nfrom . import click\nfrom .exceptions import IncompatibleRequirements, UnsupportedConstraint\nfrom .utils import flat_map, format_requirement, key_fr... | [
{
"content": "import collections\nimport os\nimport sys\nimport tempfile\nfrom subprocess import check_call\n\nfrom piptools._compat import stdlib_pkgs, DEV_PKGS\nfrom . import click\nfrom .exceptions import IncompatibleRequirements, UnsupportedConstraint\nfrom .utils import flat_map, format_requirement, key_fr... | diff --git a/piptools/sync.py b/piptools/sync.py
index 619ada06d..614fa01fc 100644
--- a/piptools/sync.py
+++ b/piptools/sync.py
@@ -163,9 +163,13 @@ def sync(to_install, to_uninstall, verbose=False, dry_run=False, pip_flags=None,
req_lines.append(format_requirement(ireq, hashes=ireq_hashes))
... |
awslabs__gluonts-1543 | Deserialization fails for ZeroInflatedNegativeBinomialOutput
## Description
The `deserialize()` method fails when using the output `ZeroInflatedNegativeBinomialOutput`. Note that the example below runs fine with `NegativeBinomialOutput`.
Most likely this bug occurs for all MixtureDistributions as I noticed the sam... | [
{
"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/distribution/neg_binomial.py b/src/gluonts/mx/distribution/neg_binomial.py
index 722520677d..5508384e87 100644
--- a/src/gluonts/mx/distribution/neg_binomial.py
+++ b/src/gluonts/mx/distribution/neg_binomial.py
@@ -138,6 +138,7 @@ def event_shape(self) -> Tuple:
return ()
-class... |
bentoml__BentoML-4291 | bug: bento_model.info.metadata["_framework"] should be "pt"
### Describe the bug
In the frameworks/transformers.py, when init a runnable, the code use torch to detect the framwork of transformer pretrain model.
But when we prepare the bento models, the default framework name of meta data is "pt"
"torch" == ben... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport os\nimport platform\nimport shutil\nimport typing as t\nimport warnings\nfrom types import ModuleType\n\nimport attr\n\nimport bentoml\n\nfrom ...exceptions import BentoMLException\nfrom ...exceptions import MissingDependencyException\nf... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport os\nimport platform\nimport shutil\nimport typing as t\nimport warnings\nfrom types import ModuleType\n\nimport attr\n\nimport bentoml\n\nfrom ...exceptions import BentoMLException\nfrom ...exceptions import MissingDependencyException\nf... | diff --git a/src/bentoml/_internal/frameworks/transformers.py b/src/bentoml/_internal/frameworks/transformers.py
index 08f1a4dd552..cbd6daeab82 100644
--- a/src/bentoml/_internal/frameworks/transformers.py
+++ b/src/bentoml/_internal/frameworks/transformers.py
@@ -1150,7 +1150,10 @@ def __init__(self):
... |
awslabs__gluonts-768 | Cannot Run examples in a MacOs and Python3.7
## Description
Hi,
~~I just installed using `pip` command showed in the documentation and, using one of the examples in a jupyter notebook, when I do an import:
`from gluonts.dataset.repository.datasets import get_dataset, dataset_recipes`
I got an error.~~
I found th... | [
{
"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/core/component.py b/src/gluonts/core/component.py
index 55fbde6c36..cd54fe217f 100644
--- a/src/gluonts/core/component.py
+++ b/src/gluonts/core/component.py
@@ -389,15 +389,13 @@ def validator(init):
if base_model is None:
PydanticModel = create_model(
- ... |
ivy-llc__ivy-22152 | ivy.functional.frontends.paddle.tensor.tensor in std method
### Bug Explanation
there a method called std in ivy.functional.frontends.paddle.tensor.tensor is only implemented without the test function. and it has wrong implementation.
```python
@with_unsupported_dtypes({"2.4.2 and below": ("float32", "float64")}... | [
{
"content": "# local\nimport ivy\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.func_wrapper import (\n with_supported_dtypes,\n with_unsupported_dtypes,\n)\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\n\n\nclass Tensor:\n def __init__(self, array, dtyp... | [
{
"content": "# local\nimport ivy\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.func_wrapper import (\n with_supported_dtypes,\n with_unsupported_dtypes,\n)\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\n\n\nclass Tensor:\n def __init__(self, array, dtyp... | diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
index b4a110f47d363..64a141c6f74cc 100644
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -725,11 +725,9 @@ def atan(self, name=None):
de... |
Parsl__parsl-374 | Add OS to usage stats collection
| [
{
"content": "import uuid\nimport time\nimport hashlib\nimport os\nimport getpass\nimport json\nimport logging\nimport socket\nimport sys\nimport multiprocessing as mp\n\nfrom parsl.dataflow.states import States\nfrom parsl.version import VERSION as PARSL_VERSION\n\nlogger = logging.getLogger(__name__)\n\n\ndef... | [
{
"content": "import uuid\nimport time\nimport hashlib\nimport os\nimport getpass\nimport json\nimport logging\nimport socket\nimport sys\nimport platform\nimport multiprocessing as mp\n\nfrom parsl.dataflow.states import States\nfrom parsl.version import VERSION as PARSL_VERSION\n\nlogger = logging.getLogger(_... | diff --git a/parsl/dataflow/usage_tracking/usage.py b/parsl/dataflow/usage_tracking/usage.py
index 36f7b19fe0..f80b43bcfa 100644
--- a/parsl/dataflow/usage_tracking/usage.py
+++ b/parsl/dataflow/usage_tracking/usage.py
@@ -7,6 +7,7 @@
import logging
import socket
import sys
+import platform
import multiprocessing a... |
nilearn__nilearn-1174 | extra spaces in somes labels and networks of MSDL atlas
The csv file has extra-spaces
``` Python
from nilearn import datasets
msdl = datasets.fetch_atlas_msdl()
```
for instance `msdl.networks[-10]` is `' Language'` and `msdl.labels[-5])` is `' L Ins'`
| [
{
"content": "\"\"\"\nDownloading NeuroImaging datasets: atlas datasets\n\"\"\"\nimport os\nimport xml.etree.ElementTree\nimport numpy as np\n\nfrom sklearn.datasets.base import Bunch\nfrom sklearn.utils import deprecated\n\n#from . import utils\nfrom .utils import _get_dataset_dir, _fetch_files, _get_dataset_d... | [
{
"content": "\"\"\"\nDownloading NeuroImaging datasets: atlas datasets\n\"\"\"\nimport os\nimport xml.etree.ElementTree\nimport numpy as np\n\nfrom sklearn.datasets.base import Bunch\nfrom sklearn.utils import deprecated\n\n#from . import utils\nfrom .utils import _get_dataset_dir, _fetch_files, _get_dataset_d... | diff --git a/nilearn/datasets/atlas.py b/nilearn/datasets/atlas.py
index 9b6d6e84a3..8916c1b72a 100644
--- a/nilearn/datasets/atlas.py
+++ b/nilearn/datasets/atlas.py
@@ -334,9 +334,9 @@ def fetch_atlas_msdl(data_dir=None, url=None, resume=True, verbose=1):
verbose=verbose)
files =... |
facebookresearch__fairscale-975 | the main branch is not compatible with python 3.6, but setup.py only requires ">=3.6"
python 3.6 can pip install latest fairscale
https://github.com/facebookresearch/fairscale/blob/1bc96fa8c69def6d990e42bfbd75f86146ce29bd/setup.py#L67
but, some code is not compatible with python 3.6
https://github.com/facebookrese... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport os\nimport re\n\nimport setuptools\n\nthis_dir = os.path.dirn... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport os\nimport re\n\nimport setuptools\n\nthis_dir = os.path.dirn... | diff --git a/setup.py b/setup.py
index 97d26522f..b0d220953 100644
--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,7 @@ def find_version(version_file_path) -> str:
packages=setuptools.find_packages(exclude=("tests", "tests.*")),
ext_modules=extensions,
cmdclass=cmdclass,
- python_requires="... |
ocf__ocfweb-185 | libsass>0.10.0 breaks dh-virtuaenv
https://jenkins.ocf.berkeley.edu/view/ocfweb-deploy/job/ocfweb-build-deb/232/console
```
# build sass, output static files
debian/ocfweb/usr/share/python/ocfweb/bin/python setup.py build_sass
running build_sass
building 'ocfweb' sass
/opt/jenkins/slave/workspace/ocfweb-build-deb/src/... | [
{
"content": "from setuptools import find_packages\nfrom setuptools import setup\n\ntry:\n with open('.version') as f:\n VERSION = f.readline().strip()\nexcept IOError:\n VERSION = 'unknown'\n\nsetup(\n name='ocfweb',\n version=VERSION,\n packages=find_packages(exclude=['debian', 'venv']),... | [
{
"content": "from setuptools import find_packages\nfrom setuptools import setup\n\ntry:\n with open('.version') as f:\n VERSION = f.readline().strip()\nexcept IOError:\n VERSION = 'unknown'\n\nsetup(\n name='ocfweb',\n version=VERSION,\n packages=find_packages(exclude=['debian', 'venv']),... | diff --git a/Dockerfile b/Dockerfile
index 790b7c8ee..782f99898 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -28,14 +28,13 @@ RUN apt-get update \
RUN install -d --owner=nobody /opt/ocfweb /opt/ocfweb/venv /etc/ocfweb
COPY requirements.txt /opt/ocfweb/
-# TODO: We can't use libsass==0.11.1 in the Debian packaging ye... |
kovidgoyal__kitty-1921 | Support drag and drop for text
I select and drag text to and from Terminal windows all the time. kitty doesn’t seem to allow dragging text either direction.
Thanks.
| [
{
"content": "#!/usr/bin/env python3\n# vim:fileencoding=utf-8\n# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>\n\nimport atexit\nimport json\nimport os\nimport re\nfrom contextlib import suppress\nfrom functools import partial\nfrom gettext import gettext as _\nfrom weakref import Weak... | [
{
"content": "#!/usr/bin/env python3\n# vim:fileencoding=utf-8\n# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>\n\nimport atexit\nimport json\nimport os\nimport re\nfrom contextlib import suppress\nfrom functools import partial\nfrom gettext import gettext as _\nfrom weakref import Weak... | diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m
index 9ee64081ace..84700034594 100644
--- a/glfw/cocoa_window.m
+++ b/glfw/cocoa_window.m
@@ -630,7 +630,7 @@ - (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow
markedRect = NSMakeRect(0.0, 0.0, 0.0, 0.0);
[self updateTrackingAreas];
-... |
aio-libs__aiohttp-5848 | [ClientSession behavior] Authorization header dropped during HTTP redirect
🐞 **Describe the behavior**
When using `aiohttp.ClientSession` to make a GET request that carries an `Authorization` header, the header is silently dropped whenever the remote server responds with HTTP 3xx redirections to the initial request... | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport dataclasses\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n Any,\n A... | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport dataclasses\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n Any,\n A... | diff --git a/CHANGES/5783.feature b/CHANGES/5783.feature
new file mode 100644
index 00000000000..4be16c23343
--- /dev/null
+++ b/CHANGES/5783.feature
@@ -0,0 +1 @@
+Started keeping the ``Authorization`` header during http->https redirects when the host remains the same.
diff --git a/aiohttp/client.py b/aiohttp/client.p... |
Kinto__kinto-1620 | IntegrityError if you try to create two records with the same last_modified value in a batch
```
demo:
collections:
demo:
records:
abc:
data:
last_modified: 123
efg:
data:
last_modified: 123
```
```
$ kinto-wizard load -s https://kin... | [
{
"content": "import logging\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid import httpexceptions\nfrom pyramid.security import NO_PERMISSION_REQUIRED\n\nfrom kinto.core import errors\nfrom kinto.core import Service\nfrom kinto.core.errors import ErrorSchema\nfrom kinto.core... | [
{
"content": "import logging\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid import httpexceptions\nfrom pyramid.security import NO_PERMISSION_REQUIRED\n\nfrom kinto.core import errors\nfrom kinto.core import Service\nfrom kinto.core.errors import ErrorSchema\nfrom kinto.core... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 8c769c7ce..710b7c7e5 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -7,8 +7,7 @@ This document describes changes between each past release.
9.1.0 (unreleased)
------------------
-- Nothing changed yet.
-
+- Batch endpoint now checks for and aborts any parent reque... |
freedomofpress__securedrop-3549 | [admin CLI integration testing] securedrop-admin update
## Description
We should have integration tests for the `securedrop-admin update` command. This command has a lot of unit tests, but the tests do a lot of mocking out of subprocess calls, I recommend examining those first.
Parent ticket: #3341
| [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.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... | [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.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... | diff --git a/admin/Dockerfile b/admin/Dockerfile
index 3fcde9f060..fbfb435935 100644
--- a/admin/Dockerfile
+++ b/admin/Dockerfile
@@ -6,7 +6,7 @@ ARG USER_ID
ENV USER_ID ${USER_ID:-0}
RUN apt-get update
-RUN apt-get install -y python sudo lsb-release gnupg2
+RUN apt-get install -y python sudo lsb-release gnupg2 gi... |
uccser__cs-unplugged-1393 | Glossary page should list entries in alphabetical order for viewed language
For example, Māori lists these glossary entries in the following order:
- Hātepe
- Mati Tāhūrua
- Rapu ā-tāhūrua
- Waematihiko
- Mati takitaki (Check digit)
- Kōpeketanga
- ...
These should be in alphabetical for each language.
| [
{
"content": "\"\"\"Views for the topics application.\"\"\"\n\nfrom django.db.models import Q\nfrom django.shortcuts import get_object_or_404\nfrom django.views import generic\nfrom django.http import JsonResponse, Http404\nfrom config.templatetags.render_html_field import render_html_with_static\nfrom topics.u... | [
{
"content": "\"\"\"Views for the topics application.\"\"\"\n\nfrom django.db.models import Q\nfrom django.shortcuts import get_object_or_404\nfrom django.views import generic\nfrom django.http import JsonResponse, Http404\nfrom config.templatetags.render_html_field import render_html_with_static\nfrom topics.u... | diff --git a/csunplugged/topics/views.py b/csunplugged/topics/views.py
index 9289232b1..4d42f0c26 100644
--- a/csunplugged/topics/views.py
+++ b/csunplugged/topics/views.py
@@ -391,10 +391,11 @@ def get_queryset(self):
def get_context_data(self):
"""Get context data for template rendering."""
+ t... |
biolab__orange3-1533 | Filter in add-on dialogue doesn't work
If you filter the packages and select one of them, you get
```
AttributeError
Traceback (most recent call last):
File "/Users/janez/Desktop/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Orange/canvas/ap... | [
{
"content": "import sys\nimport sysconfig\nimport os\nimport re\nimport errno\nimport shlex\nimport shutil\nimport subprocess\nimport itertools\nimport concurrent.futures\n\nfrom site import USER_SITE\nfrom glob import iglob\nfrom collections import namedtuple, deque\nfrom xml.sax.saxutils import escape\nfrom ... | [
{
"content": "import sys\nimport sysconfig\nimport os\nimport re\nimport errno\nimport shlex\nimport shutil\nimport subprocess\nimport itertools\nimport concurrent.futures\n\nfrom site import USER_SITE\nfrom glob import iglob\nfrom collections import namedtuple, deque\nfrom xml.sax.saxutils import escape\nfrom ... | diff --git a/Orange/canvas/application/addons.py b/Orange/canvas/application/addons.py
index 614c1c9b945..1be626dcd4f 100644
--- a/Orange/canvas/application/addons.py
+++ b/Orange/canvas/application/addons.py
@@ -335,14 +335,10 @@ def set_install_projects(self, names):
def __data_changed(self, topleft, bottomrig... |
spack__spack-4587 | Default Editor in Non-Interactive Mode
Hi,
with the latest updates in `develop` (tested: 790b06e0c363ce1598deb3bde217c4685701b61d) spack seems to require to know my `default editor` when installing software, even in non-interactive mode.
On the first call to `spack install` it now fails if *no editor is installed... | [
{
"content": "# flake8: noqa\n##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@ll... | [
{
"content": "# flake8: noqa\n##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@ll... | diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py
index 1f583fff61ec4b..e77a0c75cdfc8a 100644
--- a/lib/spack/spack/__init__.py
+++ b/lib/spack/spack/__init__.py
@@ -223,12 +223,13 @@
else:
editor = which('vim', 'vi', 'emacs', 'nano')
+# If there is no editor, only raise an error if we actu... |
freedomofpress__securedrop-3540 | admin CLI: return 1 should eventually exit with a non-zero return code
# Description
On develop and in the 0.8.0 release branch a `return 1` does not cause the securedrop-admin CLI to eventually exit with a non-zero return code.
# Steps to reproduce
1. It's a little difficult to trigger a `return 1` but one m... | [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.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... | [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.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... | diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py
index 597114bd0d..77897b0c47 100755
--- a/admin/securedrop_admin/__init__.py
+++ b/admin/securedrop_admin/__init__.py
@@ -537,6 +537,7 @@ def setup_logger(verbose=False):
def sdconfig(args):
"""Configure SD site settings"""
... |
Lightning-AI__pytorch-lightning-1192 | multi-gpu ddp calls validation and testing loops too many times
When using ddp with multiple gpus, each validation and test loop is called with the entire validation dataset for each gpu.
Expected behavior is that the dataset is divided appropriately across the gpus.
I am using current master (cloned Mar 14), Ubu... | [
{
"content": "from abc import ABC, abstractmethod\nfrom typing import Union, List, Tuple, Callable\n\nimport torch.distributed as torch_distrib\nfrom torch.utils.data import SequentialSampler, DataLoader\nfrom torch.utils.data.distributed import DistributedSampler\n\nfrom pytorch_lightning.core import Lightning... | [
{
"content": "from abc import ABC, abstractmethod\nfrom typing import Union, List, Tuple, Callable\n\nimport torch.distributed as torch_distrib\nfrom torch.utils.data import SequentialSampler, DataLoader\nfrom torch.utils.data.distributed import DistributedSampler\n\nfrom pytorch_lightning.core import Lightning... | diff --git a/pytorch_lightning/trainer/data_loading.py b/pytorch_lightning/trainer/data_loading.py
index e848e09725e8a..0ca90e5962728 100644
--- a/pytorch_lightning/trainer/data_loading.py
+++ b/pytorch_lightning/trainer/data_loading.py
@@ -91,15 +91,12 @@ def auto_add_sampler(self, dataloader: DataLoader, train: bool)... |
coala__coala-5853 | Result.py: Add docstring regarding the case that line or column is None
The output generated by coala can have ```line``` being ```None``` or ```column``` being ```None```.
```column = None``` means there is an error with the whole line.
```line = None``` means the whole file. The reason behind it is that it's an u... | [
{
"content": "import uuid\nfrom os.path import relpath\n\nfrom coala_utils.decorators import (\n enforce_signature, generate_ordering, generate_repr, get_public_members)\nfrom coalib.bearlib.aspects import aspectbase\nfrom coalib.results.RESULT_SEVERITY import RESULT_SEVERITY\nfrom coalib.results.SourceRange... | [
{
"content": "import uuid\nfrom os.path import relpath\n\nfrom coala_utils.decorators import (\n enforce_signature, generate_ordering, generate_repr, get_public_members)\nfrom coalib.bearlib.aspects import aspectbase\nfrom coalib.results.RESULT_SEVERITY import RESULT_SEVERITY\nfrom coalib.results.SourceRange... | diff --git a/coalib/results/Result.py b/coalib/results/Result.py
index 5db2efde60..627e2cfe3c 100644
--- a/coalib/results/Result.py
+++ b/coalib/results/Result.py
@@ -177,8 +177,12 @@ def from_values(cls,
The related file.
:param line:
The first related line in the file. (First line i... |
pyodide__pyodide-2099 | 0.19 release
Opening an issue to track the 0.19 release.
I think we are fairly ready to make the 0.19.0 release. Ideally, the following would be nice to do before the 0.19 alpha release (but not critical),
- update browser versions used for testing https://github.com/pyodide/pyodide/pull/1952
- which should hop... | [
{
"content": "# When the pyodide package is imported, both the js and the pyodide_js modules\n# will be available to import from. Not all functions in pyodide_js will work\n# until after pyodide is first imported, imported functions from pyodide_js\n# should not be used at import time. It is fine to use js func... | [
{
"content": "# When the pyodide package is imported, both the js and the pyodide_js modules\n# will be available to import from. Not all functions in pyodide_js will work\n# until after pyodide is first imported, imported functions from pyodide_js\n# should not be used at import time. It is fine to use js func... | diff --git a/docs/conf.py b/docs/conf.py
index d88a110359d..6c6664ce4db 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -127,7 +127,7 @@
epub_exclude_files = ["search.html"]
if "READTHEDOCS" in os.environ:
- env = {"PYODIDE_BASE_URL": "https://cdn.jsdelivr.net/pyodide/dev/full/"}
+ env = {"PYODIDE_BASE_URL": ... |
open-telemetry__opentelemetry-python-contrib-231 | Datadog and AWS SDK extension propagator fields attributes are not a property
Datadog and AWS SDK extension propagator fields attributes are not a property. They should be. Fix this.
| [
{
"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/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py b/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py
index 792659ade7..09a46a140c 100644
--- a/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator... |
google__flax-1324 | AttributeError: module 'flax.linen' has no attribute 'merge_param'
[This guide](https://flax.readthedocs.io/en/latest/design_notes/arguments.html) suggests using `nn.merge_param` to combine arguments, but `merge_param` is only available through `nn.module.merge_param`. I believe it needs to be added to the import line ... | [
{
"content": "# Copyright 2021 The Flax 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 ap... | [
{
"content": "# Copyright 2021 The Flax 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 ap... | diff --git a/flax/linen/__init__.py b/flax/linen/__init__.py
index e87579be8..94f76a716 100644
--- a/flax/linen/__init__.py
+++ b/flax/linen/__init__.py
@@ -25,7 +25,8 @@
make_causal_mask, combine_masks)
from ..core import broadcast, DenyList
from .linear import Conv, ConvTranspose, Dense, De... |
paperless-ngx__paperless-ngx-2057 | [BUG] Tesseract checks function doesn't recognize Chinese language (and some other languages) correctly
### Description
Good morning, I am new user of paperless-ngx. I tried to start a container using the lazy installation scripts.
`bash -c "$(curl -L https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/ma... | [
{
"content": "import subprocess\n\nfrom django.conf import settings\nfrom django.core.checks import Error\nfrom django.core.checks import register\nfrom django.core.checks import Warning\n\n\ndef get_tesseract_langs():\n with subprocess.Popen([\"tesseract\", \"--list-langs\"], stdout=subprocess.PIPE) as p:\n... | [
{
"content": "import shutil\nimport subprocess\n\nfrom django.conf import settings\nfrom django.core.checks import Error\nfrom django.core.checks import register\nfrom django.core.checks import Warning\n\n\ndef get_tesseract_langs():\n proc = subprocess.run(\n [shutil.which(\"tesseract\"), \"--list-la... | diff --git a/src/paperless_tesseract/checks.py b/src/paperless_tesseract/checks.py
index 99780cad466..c63761f31fd 100644
--- a/src/paperless_tesseract/checks.py
+++ b/src/paperless_tesseract/checks.py
@@ -1,3 +1,4 @@
+import shutil
import subprocess
from django.conf import settings
@@ -7,10 +8,16 @@
def get_te... |
deepset-ai__haystack-3346 | `write_labels` crashes for `ElasticsearchDocumentStore` for labels with long context
**Describe the bug**
`write_labels` currently crashes with a `BulkIndexError` if we try to write labels whose context is longer than 32766 bytes. I suspect that this is due to the mapping that we apply in `_create_label_index`. Probab... | [
{
"content": "import logging\nfrom typing import List, Optional, Type, Union, Dict\nfrom copy import deepcopy\n\nimport numpy as np\n\ntry:\n from elasticsearch import Elasticsearch, RequestsHttpConnection, Connection, Urllib3HttpConnection\n from elasticsearch.helpers import bulk, scan\n from elastics... | [
{
"content": "import logging\nfrom typing import List, Optional, Type, Union, Dict\nfrom copy import deepcopy\n\nimport numpy as np\n\ntry:\n from elasticsearch import Elasticsearch, RequestsHttpConnection, Connection, Urllib3HttpConnection\n from elasticsearch.helpers import bulk, scan\n from elastics... | diff --git a/haystack/document_stores/elasticsearch.py b/haystack/document_stores/elasticsearch.py
index ad1bcd28c3..1b4f0807fd 100644
--- a/haystack/document_stores/elasticsearch.py
+++ b/haystack/document_stores/elasticsearch.py
@@ -521,8 +521,8 @@ def _create_label_index(self, index_name: str, headers: Optional[Dict... |
rasterio__rasterio-196 | rasterize - incorrect use of output argument
Around line 299 in features.py
if out is not None:
if np.dtype(output.dtype).name not in valid_dtypes:
^^^^^^^^^^^^
I think that output.dtype needs to be changed to out.dtype....
Thanks
| [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\nimport json\nimport logging\nimport time\nimport warnings\n\nimport numpy as np\n\nimport rasterio\nfrom rasterio._features import _shapes, _sieve, _rasterize\nfrom rasterio.transform import IDENTITY, guard_transform\nfrom ras... | [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\nimport json\nimport logging\nimport time\nimport warnings\n\nimport numpy as np\n\nimport rasterio\nfrom rasterio._features import _shapes, _sieve, _rasterize\nfrom rasterio.transform import IDENTITY, guard_transform\nfrom ras... | diff --git a/rasterio/features.py b/rasterio/features.py
index 9ea14db43..8e55cb81b 100644
--- a/rasterio/features.py
+++ b/rasterio/features.py
@@ -297,10 +297,10 @@ def can_cast_dtype(values, dtype):
stacklevel=2)
out = out if out is not None else output
if out is not None:
- if np.dtype... |
certbot__certbot-7558 | Upgrade to cryptography 2.8 in certbot-auto
As described at https://github.com/pyca/cryptography/issues/4923, cryptography is dropping support for OpenSSL 1.0.1. The major distros affected by this are CentOS 6, Debian 8, and Ubuntu 14.04.
For CentOS 6 and Debian 8, they are supported by certbot-auto and the OSes don... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nGather and consolidate the up-to-date dependencies available and required to install certbot\non various Linux distributions. It generates a requirements file contained the pinned and hashed\nversions, ready to be used by pip to install the certbot dependencies.\n\nT... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nGather and consolidate the up-to-date dependencies available and required to install certbot\non various Linux distributions. It generates a requirements file contained the pinned and hashed\nversions, ready to be used by pip to install the certbot dependencies.\n\nT... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e1eaed7baa8..a6b1685b9c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Changed
+* certbot-auto has deprecated support for systems using OpenSSL 1.0.1 that are
+ not running on x86-64.... |
napari__napari-2802 | Axes visual not updating when adding image data
## 🐛 Bug
The axes visual does not automatically stay in sync when image data is added
A similar issue was posted on the [zulip](https://napari.zulipchat.com/#narrow/stream/212875-general/topic/issues.20with.20axes) by Uwe Schmidt, it looks like there might be more ... | [
{
"content": "import numpy as np\nfrom vispy.scene.visuals import Compound, Line, Mesh, Text\nfrom vispy.visuals.transforms import STTransform\n\nfrom ..layers.shapes._shapes_utils import triangulate_ellipse\nfrom ..utils.colormaps.standardize_color import transform_color\nfrom ..utils.theme import get_theme\nf... | [
{
"content": "import numpy as np\nfrom vispy.scene.visuals import Compound, Line, Mesh, Text\nfrom vispy.visuals.transforms import STTransform\n\nfrom ..layers.shapes._shapes_utils import triangulate_ellipse\nfrom ..utils.colormaps.standardize_color import transform_color\nfrom ..utils.theme import get_theme\nf... | diff --git a/napari/_vispy/vispy_axes_visual.py b/napari/_vispy/vispy_axes_visual.py
index 52bb8b437a6..3bf6b5b3af7 100644
--- a/napari/_vispy/vispy_axes_visual.py
+++ b/napari/_vispy/vispy_axes_visual.py
@@ -221,6 +221,7 @@ def set_none():
self._viewer.axes.events.labels.connect(self._on_data_change)
... |
ansible__ansible-lint-2176 | `command-instead-of-shell` should take into account the args of the `shell` module
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and main branch are affected too -->
##### Summary
The `command` module does not support since ansible 2.4 setting the ex... | [
{
"content": "\"\"\"Implementation of command-instead-of-shell rule.\"\"\"\n# Copyright (c) 2016 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Softwar... | [
{
"content": "\"\"\"Implementation of command-instead-of-shell rule.\"\"\"\n# Copyright (c) 2016 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Softwar... | diff --git a/src/ansiblelint/rules/command_instead_of_shell.py b/src/ansiblelint/rules/command_instead_of_shell.py
index 45b0aab6af..6015b0fbc6 100644
--- a/src/ansiblelint/rules/command_instead_of_shell.py
+++ b/src/ansiblelint/rules/command_instead_of_shell.py
@@ -116,6 +116,12 @@ def matchtask(
# Use unjinj... |
ivy-llc__ivy-22412 | scan
| [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef cond(pred, true_fun, false_fun, *operands, operand=None, linear=None):\n if operand is not None:\n if operands:\n raise ivy.utils.exceptions.Ivy... | [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef cond(pred, true_fun, false_fun, *operands, operand=None, linear=None):\n if operand is not None:\n if operands:\n raise ivy.utils.exceptions.Ivy... | diff --git a/ivy/functional/frontends/jax/lax/control_flow_operators.py b/ivy/functional/frontends/jax/lax/control_flow_operators.py
index 3fb33fb590749..973f1b41d1518 100644
--- a/ivy/functional/frontends/jax/lax/control_flow_operators.py
+++ b/ivy/functional/frontends/jax/lax/control_flow_operators.py
@@ -58,3 +58,29... |
matrix-org__synapse-6793 | v1.9.0 refuses to start with `mau_limit_reserved_threepids` config set
Basically, looks to be a circular dependency during initialisation of `DataStores`, which isn't picked up normally because we cheekily do a `self.hs.get_notifier()` outside of an `__init__`
```
Jan 28 11:24:19 ip-10-1-2-181 matrix_synapse[19453]... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2018 New Vector\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# Unl... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2018 New Vector\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# Unl... | diff --git a/changelog.d/6793.bugfix b/changelog.d/6793.bugfix
new file mode 100644
index 000000000000..564d4596ea2e
--- /dev/null
+++ b/changelog.d/6793.bugfix
@@ -0,0 +1 @@
+Fix bug where setting `mau_limit_reserved_threepids` config would cause Synapse to refuse to start.
diff --git a/synapse/storage/data_stores/mai... |
PrefectHQ__prefect-8083 | `AttributeError` when flow copies a Pydantic object allowing extra fields
### First check
- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Prefect documentation for this issue.
- [X] I checked that this issue is relate... | [
{
"content": "\"\"\"\nUtilities for extensions of and operations on Python collections.\n\"\"\"\nimport io\nimport itertools\nfrom collections import OrderedDict, defaultdict\nfrom collections.abc import Iterator as IteratorABC\nfrom collections.abc import Sequence\nfrom dataclasses import fields, is_dataclass\... | [
{
"content": "\"\"\"\nUtilities for extensions of and operations on Python collections.\n\"\"\"\nimport io\nimport itertools\nfrom collections import OrderedDict, defaultdict\nfrom collections.abc import Iterator as IteratorABC\nfrom collections.abc import Sequence\nfrom dataclasses import fields, is_dataclass\... | diff --git a/src/prefect/utilities/collections.py b/src/prefect/utilities/collections.py
index 01502b984a8c..dabb19b76dac 100644
--- a/src/prefect/utilities/collections.py
+++ b/src/prefect/utilities/collections.py
@@ -327,7 +327,10 @@ def visit_expression(expr):
# NOTE: This implementation *does not* traverse... |
qutebrowser__qutebrowser-6610 | Host-based subdomain blocking breaks search functionality of AWS console
**Version info**:
```
qutebrowser v2.3.0
Git commit:
Backend: QtWebEngine 5.15.5, based on Chromium 87.0.4280.144
Qt: 5.15.2
CPython: 3.9.6
PyQt: 5.15.4
sip: 6.1.0.dev2104271705
colorama: 0.4.4
jinja2: 3.0.1
pygments: 2.9.0
yaml: ... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc
index c5206e52eba..57bcdd8e01d 100644
--- a/doc/help/settings.asciidoc
+++ b/doc/help/settings.asciidoc
@@ -142,6 +142,7 @@
|<<content.autoplay,content.autoplay>>|Automatically start playing `<video>` elements.
|<<content.blocking.adblock.lists,cont... |
numpy__numpy-9965 | discussion: updating the released wheels to VS2017
Although MSVC 2015 and MSVC 2017 are ABI compatible, numpy generated a library with link-time code generation (LTCG) enabled, which is not compatible. This means that downstream projects cannot be built against the released numpy, but they need to compile from source, ... | [
{
"content": "from __future__ import division, print_function\n\nimport os\nimport sys\nimport pickle\nimport copy\nimport sysconfig\nimport warnings\nfrom os.path import join\nfrom numpy.distutils import log\nfrom distutils.dep_util import newer\nfrom distutils.sysconfig import get_config_var\nfrom numpy._buil... | [
{
"content": "from __future__ import division, print_function\n\nimport os\nimport sys\nimport pickle\nimport copy\nimport sysconfig\nimport warnings\nfrom os.path import join\nfrom numpy.distutils import log\nfrom distutils.dep_util import newer\nfrom distutils.sysconfig import get_config_var\nfrom numpy._buil... | diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index f56e705ab81e..275fdca87023 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -688,7 +688,10 @@ def get_mathlib_info(*args):
config.add_installed_library('npymath',
sources=npymath_sources + [get_mathlib_info],
instal... |
psf__black-3696 | EncodingWarning in pgen
Relating to #3658, if PYTHONWARNDEFAULTENCODING is set, this library raises a warning at:
https://github.com/psf/black/blob/2fd9d8b339e1e2e1b93956c6d68b2b358b3fc29d/src/blib2to3/pgen2/pgen.py#L42
| [
{
"content": "# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.\n# Licensed to PSF under a Contributor Agreement.\n\n# Pgen imports\nfrom . import grammar, token, tokenize\n\nfrom typing import (\n Any,\n Dict,\n IO,\n Iterator,\n List,\n Optional,\n Text,\n Tuple,\n ... | [
{
"content": "# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.\n# Licensed to PSF under a Contributor Agreement.\n\n# Pgen imports\nfrom . import grammar, token, tokenize\n\nfrom typing import (\n Any,\n Dict,\n IO,\n Iterator,\n List,\n Optional,\n Text,\n Tuple,\n ... | diff --git a/src/blib2to3/pgen2/pgen.py b/src/blib2to3/pgen2/pgen.py
index 631682a77c9..b5ebc7b3e42 100644
--- a/src/blib2to3/pgen2/pgen.py
+++ b/src/blib2to3/pgen2/pgen.py
@@ -30,7 +30,6 @@ class PgenGrammar(grammar.Grammar):
class ParserGenerator(object):
-
filename: Path
stream: IO[Text]
generato... |
alltheplaces__alltheplaces-3341 | Spider northern_california_breweries is broken
During the global build at 2021-06-23-14-42-18, spider **northern_california_breweries** failed with **0 features** and **1 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-23-14-42-18/logs/northern_california_breweries.txt) and [the output](https://d... | [
{
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nfrom locations.items import GeojsonPointItem\nimport json\nimport re\n\nclass NorthernCaliforniaBreweriesSpider(scrapy.Spider):\n name = \"northern_california_breweries\"\n allowed_domains = [\"projects.sfchronicle.com\"]\n start_urls = (\n '... | [
{
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nfrom locations.items import GeojsonPointItem\nimport json\nimport re\n\nclass NorthernCaliforniaBreweriesSpider(scrapy.Spider):\n name = \"northern_california_breweries\"\n allowed_domains = [\"projects.sfchronicle.com\"]\n start_urls = (\n '... | diff --git a/locations/spiders/northern_california_breweries.py b/locations/spiders/northern_california_breweries.py
index 84fb6030250..25556fc93d2 100644
--- a/locations/spiders/northern_california_breweries.py
+++ b/locations/spiders/northern_california_breweries.py
@@ -18,10 +18,19 @@ def parse(self, response):
... |
pyqtgraph__pyqtgraph-1219 | CSV export broken
### Short description
Export CSV failed when the plot name has decode error characters.
### Code to reproduce
```python
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
#QtGui.QApplication.setGraphicsSystem('raster')
app = QtGui.QApplication([])
win = pg.Gr... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom ..Qt import QtGui, QtCore\nfrom .Exporter import Exporter\nfrom ..parametertree import Parameter\nfrom .. import PlotItem\n\n__all__ = ['CSVExporter']\n \n \nclass CSVExporter(Exporter):\n Name = \"CSV from plot data\"\n windows = []\n def __init__(self... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom ..Qt import QtGui, QtCore\nfrom .Exporter import Exporter\nfrom ..parametertree import Parameter\nfrom .. import PlotItem\nfrom ..python2_3 import asUnicode\n\n__all__ = ['CSVExporter']\n \n \nclass CSVExporter(Exporter):\n Name = \"CSV from plot data\"\n ... | diff --git a/pyqtgraph/exporters/CSVExporter.py b/pyqtgraph/exporters/CSVExporter.py
index c759193294..33c6ec6958 100644
--- a/pyqtgraph/exporters/CSVExporter.py
+++ b/pyqtgraph/exporters/CSVExporter.py
@@ -3,6 +3,7 @@
from .Exporter import Exporter
from ..parametertree import Parameter
from .. import PlotItem
+from... |
huggingface__diffusers-1129 | train_dreambooth_flax.py 😭
### Describe the bug
I tried CompVis/stable-diffusion-v1-4 flax and bf16 branches with train_dreambooth_flax.py but not working and I can generate images with this code in same vm
```
real_seed = random.randint(0, 2147483647)
prng_seed = jax.random.PRNGKey(real_seed)
num_... | [
{
"content": "import argparse\nimport hashlib\nimport logging\nimport math\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nimport numpy as np\nimport torch\nimport torch.utils.checkpoint\nfrom torch.utils.data import Dataset\n\nimport jax\nimport jax.numpy as jnp\nimport optax\nimport trans... | [
{
"content": "import argparse\nimport hashlib\nimport logging\nimport math\nimport os\nfrom pathlib import Path\nfrom typing import Optional\n\nimport numpy as np\nimport torch\nimport torch.utils.checkpoint\nfrom torch.utils.data import Dataset\n\nimport jax\nimport jax.numpy as jnp\nimport optax\nimport trans... | diff --git a/examples/dreambooth/train_dreambooth_flax.py b/examples/dreambooth/train_dreambooth_flax.py
index d2652606b551..84493b1d9484 100644
--- a/examples/dreambooth/train_dreambooth_flax.py
+++ b/examples/dreambooth/train_dreambooth_flax.py
@@ -361,7 +361,8 @@ def main():
logger.info(f"Number of clas... |
joke2k__faker-843 | German address postcode + city missing
Missing address with postalcode in german languages
### Steps to reproduce
fake.street_name()
'Justina-Birnbaum-Allee'
fake.building_number()
'75'
fake.city()
'Halberstadt'
fake.postcode()
'25842'
### Existing combinations:
fake.address()
'Justina-Birnbaum-... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as AddressProvider\n\n\nclass Provider(AddressProvider):\n\n city_formats = ('{{city_name}}', )\n\n street_name_formats = (\n '{{first_name}}-{{last_name}}-{{street_suffix_long}}',\n '{{last_name... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as AddressProvider\n\n\nclass Provider(AddressProvider):\n\n city_formats = ('{{city_name}}', )\n\n city_with_postcode_formats = ('{{city_name}} {{postcode}}', )\n\n street_name_formats = (\n '{{firs... | diff --git a/faker/providers/address/de_DE/__init__.py b/faker/providers/address/de_DE/__init__.py
index 2cd3ab332d..d92f6053d5 100644
--- a/faker/providers/address/de_DE/__init__.py
+++ b/faker/providers/address/de_DE/__init__.py
@@ -8,6 +8,8 @@ class Provider(AddressProvider):
city_formats = ('{{city_name}}', ... |
vaexio__vaex-404 | Failing to open arrow file format & misleading error message
Vaex fails to open arrow file format. It confusingly expects a file written not in the arrow file-format but in arrow stream-format.
If this is a non-negotiable vaex constraint, a less misleading error message might help very confused novices...
```
... | [
{
"content": "__author__ = 'maartenbreddels'\nimport logging\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\n\nimport vaex.dataset\nimport vaex.file.other\nfrom .convert import column_from_arrow_array\nlogger = logging.getLogger(\"vaex_arrow\")\n\n\nclass DatasetArrow(vaex.dataset.DatasetLocal):\n \"\... | [
{
"content": "__author__ = 'maartenbreddels'\nimport logging\n\nimport pyarrow as pa\nimport pyarrow.parquet as pq\n\nimport vaex.dataset\nimport vaex.file.other\nfrom .convert import column_from_arrow_array\nlogger = logging.getLogger(\"vaex_arrow\")\n\n\nclass DatasetArrow(vaex.dataset.DatasetLocal):\n \"\... | diff --git a/packages/vaex-arrow/vaex_arrow/dataset.py b/packages/vaex-arrow/vaex_arrow/dataset.py
index 794a060464..aad3d79a5b 100644
--- a/packages/vaex-arrow/vaex_arrow/dataset.py
+++ b/packages/vaex-arrow/vaex_arrow/dataset.py
@@ -23,8 +23,18 @@ def __init__(self, filename=None, table=None, write=False):
def... |
django-haystack__django-haystack-761 | "simple" backend doesn't filter by model
When using ModelSearchForm, it simply doesn't filter by model. It shows results from any type of model. I would be okay with this if it were just mentioned as a caveat in the "getting started" documentation, but the documentation made it seem like the simple backend was fully-fe... | [
{
"content": "\"\"\"\nA very basic, ORM-based backend for simple search during tests.\n\"\"\"\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom haystack import connections\nfrom haystack.backends import BaseEngine, BaseSearchBackend, BaseSearchQuery, SearchNode, log_query\nfrom haystack.in... | [
{
"content": "\"\"\"\nA very basic, ORM-based backend for simple search during tests.\n\"\"\"\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom haystack import connections\nfrom haystack.backends import BaseEngine, BaseSearchBackend, BaseSearchQuery, SearchNode, log_query\nfrom haystack.in... | diff --git a/AUTHORS b/AUTHORS
index 5082c8a1a..98d137454 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -68,3 +68,4 @@ Thanks to
* Martin J. Laubach (mjl) for fixing the logic used when combining querysets
* Eric Holscher (ericholscher) for a docs fix.
* Erik Rose (erikrose) for a quick pyelasticsearch-compatibi... |
pypa__setuptools-1741 | Git and Mercurial revision checkout not working under Windows
The revision checkout routines located in `setuptools/setuptools/package_index.py`, functions _download_git and _download_hg, rely on `(cd %s && <command>)` to execute `<command>` in `%s`. This does not work under Windows, as simply tested by executing `cd .... | [
{
"content": "\"\"\"PyPI and direct package downloading\"\"\"\nimport sys\nimport os\nimport re\nimport shutil\nimport socket\nimport base64\nimport hashlib\nimport itertools\nimport warnings\nfrom functools import wraps\n\nfrom setuptools.extern import six\nfrom setuptools.extern.six.moves import urllib, http_... | [
{
"content": "\"\"\"PyPI and direct package downloading\"\"\"\nimport sys\nimport os\nimport re\nimport shutil\nimport socket\nimport base64\nimport hashlib\nimport itertools\nimport warnings\nfrom functools import wraps\n\nfrom setuptools.extern import six\nfrom setuptools.extern.six.moves import urllib, http_... | diff --git a/changelog.d/1741.change.rst b/changelog.d/1741.change.rst
new file mode 100644
index 0000000000..03b2478007
--- /dev/null
+++ b/changelog.d/1741.change.rst
@@ -0,0 +1 @@
+In package_index, now honor "current directory" during a checkout of git and hg repositories under Windows
diff --git a/setuptools/packa... |
streamlink__streamlink-4355 | plugins.ard_live: Unable to parse MEDIAINFO
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently c... | [
{
"content": "import logging\nimport re\nfrom urllib.parse import urljoin\n\nfrom streamlink.plugin import Plugin, PluginError, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStream\nfrom streamlink.stream.http import HTTPStream\n\nlog = logging.getLogger(__name_... | [
{
"content": "import logging\nimport re\nfrom urllib.parse import urljoin\n\nfrom streamlink.plugin import Plugin, PluginError, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStream\nfrom streamlink.stream.http import HTTPStream\n\nlog = logging.getLogger(__name_... | diff --git a/src/streamlink/plugins/ard_live.py b/src/streamlink/plugins/ard_live.py
index 6fbce90d6b5..0eba2fd217a 100644
--- a/src/streamlink/plugins/ard_live.py
+++ b/src/streamlink/plugins/ard_live.py
@@ -14,6 +14,7 @@
r"https?://((www|live)\.)?daserste\.de/"
))
class ARDLive(Plugin):
+ _URL_DATA_BASE = "... |
mitmproxy__mitmproxy-2991 | Keybinding ‘M’ erroneously highlighted
##### Steps to reproduce the problem:
1. run `mitmproxy`
2. type `O` to open the options editor
3. move the cursor down to `default_contentview` and press Enter
4. type `4` to select `json`
5. type `q` to return to the flows list
6. the status bar now says “[M:json]” with ... | [
{
"content": "import os.path\n\nimport urwid\n\nfrom mitmproxy.tools.console import common\nfrom mitmproxy.tools.console import signals\nfrom mitmproxy.tools.console import commandexecutor\nimport mitmproxy.tools.console.master # noqa\nfrom mitmproxy.tools.console.commander import commander\n\n\nclass PromptPat... | [
{
"content": "import os.path\n\nimport urwid\n\nfrom mitmproxy.tools.console import common\nfrom mitmproxy.tools.console import signals\nfrom mitmproxy.tools.console import commandexecutor\nimport mitmproxy.tools.console.master # noqa\nfrom mitmproxy.tools.console.commander import commander\n\n\nclass PromptPat... | diff --git a/mitmproxy/tools/console/statusbar.py b/mitmproxy/tools/console/statusbar.py
index d601968eb0..34bba18d64 100644
--- a/mitmproxy/tools/console/statusbar.py
+++ b/mitmproxy/tools/console/statusbar.py
@@ -228,10 +228,8 @@ def get_status(self):
r.append("[")
r.append(("heading_key", "... |
sanic-org__sanic-1857 | Nightly build fails due to websockets version not matching setup.py
on setup.py: >=0.7.0,<0.9
on tox.ini: >=0.7.0,<0.8
| [
{
"content": "from typing import (\n Any,\n Awaitable,\n Callable,\n Dict,\n MutableMapping,\n Optional,\n Union,\n)\n\nfrom httptools import HttpParserUpgrade # type: ignore\nfrom websockets import ( # type: ignore\n ConnectionClosed,\n InvalidHandshake,\n WebSocketCommonProtoco... | [
{
"content": "from typing import (\n Any,\n Awaitable,\n Callable,\n Dict,\n MutableMapping,\n Optional,\n Union,\n)\n\nfrom httptools import HttpParserUpgrade # type: ignore\nfrom websockets import ( # type: ignore\n ConnectionClosed,\n InvalidHandshake,\n WebSocketCommonProtoco... | diff --git a/sanic/websocket.py b/sanic/websocket.py
index a2c7b81d4c..4ae83c853e 100644
--- a/sanic/websocket.py
+++ b/sanic/websocket.py
@@ -113,7 +113,7 @@ async def websocket_handshake(self, request, subprotocols=None):
# hook up the websocket protocol
self.websocket = WebSocketCommonProtocol(
-... |
googleapis__google-auth-library-python-419 | Failure with Python 3.9 due to use of deprecated collections.Mapping
#### Environment details
- OS: Linux
- Python version: 3.9 alpha 2
- pip version: 19.3.1
- `google-auth` version: 1.10.0
#### Steps to reproduce
1. Use Python 3.9
2. Attempt to decode an ID Token:
google.oauth2.id_token.v... | [
{
"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 applica... | [
{
"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 applica... | diff --git a/google/auth/jwt.py b/google/auth/jwt.py
index a30c575b2..361c4567a 100644
--- a/google/auth/jwt.py
+++ b/google/auth/jwt.py
@@ -40,7 +40,10 @@
"""
-import collections
+try:
+ from collections.abc import Mapping
+except ImportError: # Python 2.7 compatibility
+ from collections import Mapping
im... |
horovod__horovod-2596 | Horovod on Ray has all local_rank as 0
I am currently exploring using Horovod on Ray, and have a dual-gpu machine for testing purpose with RayExecutor settings as `num_hosts=1, num_slots=2, use_gpu=True`. What I noticed is that, instead of each GPU got one process to run, actually each gpu got two processes and two of... | [
{
"content": "import ray\nfrom ray import services\n\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nimport os\nimport socket\nfrom typing import Dict, Callable, Any, Optional, List\nimport logging\n\nfrom horovod.runner.common.util import secret, timeout, hosts\nfrom horovod.runner.htt... | [
{
"content": "import ray\nfrom ray import services\n\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nimport os\nimport socket\nfrom typing import Dict, Callable, Any, Optional, List\nimport logging\n\nfrom horovod.runner.common.util import secret, timeout, hosts\nfrom horovod.runner.htt... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 937732a9ed..788549ac1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added
-### Changed
+### Changed
### Deprecated
@@ -16,6 +16,8 @@ The format is based on [Keep... |
ESMCI__cime-2170 | Unexpected test results in multiinst tests if instances are not identical
I recently set up a new POP test to make sure multi-instance runs can handle different MARBL configurations, but I think the test results are misleading. I'm running an `SMS_N2` test, and the current behavior is
1. I run the test and generate ... | [
{
"content": "\"\"\"\nFunctions for actions pertaining to history files.\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.test_status import TEST_NO_BASELINES_COMMENT\n\nfrom CIME.utils import get_current_commit, get_timestamp, get_model\n\nimport logging, glob, os, shutil, re, stat, filecmp\n... | [
{
"content": "\"\"\"\nFunctions for actions pertaining to history files.\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.test_status import TEST_NO_BASELINES_COMMENT\n\nfrom CIME.utils import get_current_commit, get_timestamp, get_model\n\nimport logging, glob, os, shutil, re, stat, filecmp\n... | diff --git a/scripts/lib/CIME/hist_utils.py b/scripts/lib/CIME/hist_utils.py
index 192752ed8d9..65f3bf63017 100644
--- a/scripts/lib/CIME/hist_utils.py
+++ b/scripts/lib/CIME/hist_utils.py
@@ -403,16 +403,6 @@ def generate_baseline(case, baseline_dir=None, allow_baseline_overwrite=False):
if os.path.exists... |
Lightning-AI__torchmetrics-1028 | FrechetInceptionDistance wrong behavior for calculating two features with different batch size
## 🐛 Bug
I want to calculate FID between the real and fake images, but the batch_size of fake images is 5 times the real ones (according to the traditional setting in layout2img), and the result is wrong. Then I checked t... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 668e81bf9ea..ac725c75152 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -62,6 +62,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
+- Fixed `FID` calculation for non-equal size real and fake input ([#1028](https://github.com/PyTo... |
mindsdb__mindsdb-1597 | Add @@transaction_isolation MySQL variable
| [
{
"content": "\"\"\"\n*******************************************************\n * Copyright (C) 2017 MindsDB Inc. <copyright@mindsdb.com>\n *\n * This file is part of MindsDB Server.\n *\n * MindsDB Server can not be copied and/or distributed without the express\n * permission of MindsDB Inc\n *****************... | [
{
"content": "\"\"\"\n*******************************************************\n * Copyright (C) 2017 MindsDB Inc. <copyright@mindsdb.com>\n *\n * This file is part of MindsDB Server.\n *\n * MindsDB Server can not be copied and/or distributed without the express\n * permission of MindsDB Inc\n *****************... | diff --git a/mindsdb/api/mysql/mysql_proxy/libs/constants/mysql.py b/mindsdb/api/mysql/mysql_proxy/libs/constants/mysql.py
index fc2befa2c31..a4a9db31807 100644
--- a/mindsdb/api/mysql/mysql_proxy/libs/constants/mysql.py
+++ b/mindsdb/api/mysql/mysql_proxy/libs/constants/mysql.py
@@ -980,7 +980,10 @@ class WARN(object)... |
python-pillow__Pillow-3216 | "ResourceWarning: unclosed file" with raw data (mmap)
Images containing raw data sometimes give `ResourceWarning: unclosed file` on my Linux machine, because the file opened for `mmap` is not closed.
https://github.com/python-pillow/Pillow/blob/968c2cf3c9c1e82f074a65c8c80d0da222d42eff/src/PIL/ImageFile.py#L177-L179
... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# base class for image file handlers\n#\n# history:\n# 1995-09-09 fl Created\n# 1996-03-11 fl Fixed load mechanism.\n# 1996-04-15 fl Added pcx/xbm decoders.\n# 1996-04-30 fl Added encoders.\n# 1996-12-14 fl Added load helpers\n# 1997-01-11 fl ... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# base class for image file handlers\n#\n# history:\n# 1995-09-09 fl Created\n# 1996-03-11 fl Fixed load mechanism.\n# 1996-04-15 fl Added pcx/xbm decoders.\n# 1996-04-30 fl Added encoders.\n# 1996-12-14 fl Added load helpers\n# 1997-01-11 fl ... | diff --git a/src/PIL/ImageFile.py b/src/PIL/ImageFile.py
index 1a3c4aa942d..63a9d4ca2bd 100644
--- a/src/PIL/ImageFile.py
+++ b/src/PIL/ImageFile.py
@@ -174,9 +174,8 @@ def load(self):
else:
# use mmap, if possible
import mmap
- ... |
aws-cloudformation__cfn-lint-929 | E0001 for a validate template in latest version but not 0.21.0
*cfn-lint version: (0.21.1)*
*Description of issue.*
With this cfn template:
```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
ServerLamdaRole:
Properties:
AssumeRolePolicyDocument:
... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | diff --git a/src/cfnlint/helpers.py b/src/cfnlint/helpers.py
index ffcd0dc15e..c7581c2e3e 100644
--- a/src/cfnlint/helpers.py
+++ b/src/cfnlint/helpers.py
@@ -19,6 +19,7 @@
import json
import os
import imp
+import datetime
import logging
import re
import inspect
@@ -227,7 +228,11 @@ def initialize_specs():
def... |
holoviz__hvplot-601 | `hvplot.util.with_hv_extension` hides docstrings
#### ALL software version info
* hvplot = 0.7.0
However looking at the source code this issue should still be present in MASTER.
#### Description of expected behavior and the observed behavior
Functions wrapped with the `hvplot.util.with_hv_extension` decorat... | [
{
"content": "\"\"\"\nProvides utilities to convert data and projections\n\"\"\"\nfrom __future__ import absolute_import\n\nimport sys\n\nfrom distutils.version import LooseVersion\nfrom types import FunctionType\n\nimport pandas as pd\nimport holoviews as hv\nimport param\ntry:\n import panel as pn\n pan... | [
{
"content": "\"\"\"\nProvides utilities to convert data and projections\n\"\"\"\nfrom __future__ import absolute_import\n\nimport sys\n\nfrom distutils.version import LooseVersion\nfrom functools import wraps\nfrom types import FunctionType\n\nimport pandas as pd\nimport holoviews as hv\nimport param\ntry:\n ... | diff --git a/hvplot/util.py b/hvplot/util.py
index 040691fd0..22e710232 100644
--- a/hvplot/util.py
+++ b/hvplot/util.py
@@ -6,6 +6,7 @@
import sys
from distutils.version import LooseVersion
+from functools import wraps
from types import FunctionType
import pandas as pd
@@ -24,6 +25,7 @@
def with_hv_extensio... |
fossasia__open-event-server-9008 | API to verify password of signed in account
<img width="1437" alt="Screenshot 2023-07-13 at 2 37 01 AM" src="https://github.com/fossasia/open-event-server/assets/24926784/66b2a46e-5374-40ee-a072-30e7916948ff">
In the check-in web app, the sign-out button is locked behind a password verification modal. This is to pre... | [
{
"content": "import base64\nimport logging\nimport random\nimport string\nfrom datetime import timedelta\nfrom functools import wraps\n\nimport requests\nfrom flask import Blueprint, jsonify, make_response, request, send_file\nfrom flask_jwt_extended import (\n create_access_token,\n create_refresh_token... | [
{
"content": "import base64\nimport logging\nimport random\nimport string\nfrom datetime import timedelta\nfrom functools import wraps\n\nimport requests\nfrom flask import Blueprint, jsonify, make_response, request, send_file\nfrom flask_jwt_extended import (\n create_access_token,\n create_refresh_token... | diff --git a/app/api/auth.py b/app/api/auth.py
index 8fcd8d199e..2f6406976d 100644
--- a/app/api/auth.py
+++ b/app/api/auth.py
@@ -466,3 +466,30 @@ def decorated(*args, **kwargs):
def environment_details():
envdump = EnvironmentDump(include_config=False)
return envdump.dump_environment()
+
+
+@auth_routes.ro... |
ivy-llc__ivy-16042 | cosine_similarity
#15051
| [
{
"content": "# local\n",
"path": "ivy/functional/frontends/paddle/nn/functional/common.py"
}
] | [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.func_wrapper import with_unsupported_dtypes\n\n\n@with_unsupported_dtypes({\"2.0.1 and below\": (\"float16\", \"bfloat16\")}, \"torch\")\n@to_ivy_arrays_and_back\ndef cosine_similarity(x1... | diff --git a/ivy/functional/frontends/paddle/nn/functional/common.py b/ivy/functional/frontends/paddle/nn/functional/common.py
index 5804c29a261af..64bc9faeaf1df 100644
--- a/ivy/functional/frontends/paddle/nn/functional/common.py
+++ b/ivy/functional/frontends/paddle/nn/functional/common.py
@@ -1 +1,25 @@
# local
+im... |
ansible-collections__community.aws-1631 | aws_ssm_parameter_store update fails if no description element was defined before
### Summary
`aws_ssm_parameter_store` update fails if no description element was defined before.
If an SSM parameter has an empty description already in SSM, then the AWS API (I'm guessing `aws ssm describe-parameters`) doesn't incl... | [
{
"content": "#!/usr/bin/python\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ssm_parameter\n... | [
{
"content": "#!/usr/bin/python\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ssm_parameter\n... | diff --git a/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml b/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml
new file mode 100644
index 00000000000..98344a6ff4a
--- /dev/null
+++ b/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml
@@... |
DataDog__dd-trace-py-2760 | flask view_args doesnt support non-string arguments
flask view_args doesnt support non-string arguments even though flask allows you to create non-string url parameters.
The code here: https://github.com/DataDog/dd-trace-py/blob/master/ddtrace/contrib/flask/patch.py#L484 assumes all `view_args` will be strings.
###... | [
{
"content": "import flask\nimport werkzeug\n\nfrom ddtrace import Pin\nfrom ddtrace import config\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\nfrom .. import trace_utils\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ...constants import SPAN_MEASURED_KEY\nfrom ...ext import SpanT... | [
{
"content": "import flask\nimport werkzeug\n\nfrom ddtrace import Pin\nfrom ddtrace import config\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\nfrom .. import trace_utils\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ...constants import SPAN_MEASURED_KEY\nfrom ...ext import SpanT... | diff --git a/ddtrace/contrib/flask/patch.py b/ddtrace/contrib/flask/patch.py
index 2f7725fcba3..a510a8567b9 100644
--- a/ddtrace/contrib/flask/patch.py
+++ b/ddtrace/contrib/flask/patch.py
@@ -481,7 +481,9 @@ def _traced_request(pin, wrapped, instance, args, kwargs):
if not span.get_tag(FLASK_VIEW_ARGS) ... |
cal-itp__benefits-451 | Remove all paragraph content from the viewmodel in `core:index`
From https://github.com/cal-itp/benefits/issues/366
<img width="832" alt="image" src="https://user-images.githubusercontent.com/3673236/163299119-7b8c7696-05b5-4ade-9bc2-c5b784707a66.png">
| [
{
"content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.template import loader\nfrom django.template.response import TemplateResponse\nfrom django.urls import rever... | [
{
"content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.template import loader\nfrom django.template.response import TemplateResponse\nfrom django.urls import rever... | diff --git a/benefits/core/views.py b/benefits/core/views.py
index 3a64939e32..862102184d 100644
--- a/benefits/core/views.py
+++ b/benefits/core/views.py
@@ -20,11 +20,6 @@ def _index_content_title():
return _("core.pages.index.content_title")
-def _index_paragraphs():
- """Helper returns the content parag... |
chainer__chainer-1485 | Stop printing cuDNN warning more than once
Users do not need multiple cuDNN warnings. https://github.com/pfnet/chainer/blob/71eef3e90baea61d3140b75741520515f8882f9d/chainer/cuda.py#L86
| [
{
"content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============... | [
{
"content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============... | diff --git a/chainer/cuda.py b/chainer/cuda.py
index e09b187583d5..8fcff55e21af 100644
--- a/chainer/cuda.py
+++ b/chainer/cuda.py
@@ -82,11 +82,13 @@ def check_cuda_available():
'(see https://github.com/pfnet/chainer#installation).')
msg += str(_resolution_error)
raise RuntimeError(ms... |
jupyterhub__jupyterhub-797 | Container dying after startup leads to infinite redirection loop
We are using jupyterhub with the dockerspawner module. Once successfully logged in, we observed that if the docker container is spawned but dies a second or so later (for whatever reason), the redirection from /hub/user/username to /user/username will ent... | [
{
"content": "# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom datetime import datetime, timedelta\nfrom urllib.parse import quote, urlparse\n\nfrom tornado import gen\nfrom tornado.log import app_log\n\nfrom sqlalchemy import inspect\n\nfrom .utils i... | [
{
"content": "# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom datetime import datetime, timedelta\nfrom urllib.parse import quote, urlparse\n\nfrom tornado import gen\nfrom tornado.log import app_log\n\nfrom sqlalchemy import inspect\n\nfrom .utils i... | diff --git a/jupyterhub/user.py b/jupyterhub/user.py
index 4486974591..f168815985 100644
--- a/jupyterhub/user.py
+++ b/jupyterhub/user.py
@@ -258,7 +258,6 @@ def spawn(self, options=None):
self.state = spawner.get_state()
self.last_activity = datetime.utcnow()
db.commit()
- self.spawn... |
DataDog__dd-trace-py-5182 | Intermittent `RuntimeError: the memalloc module was not started` error
### Which version of dd-trace-py are you using?
`ddtrace==0.57.0`
### What is the result that you get?
`RuntimeError: the memalloc module was not started`
:
)
def collect(self):
- events, ... |
DataDog__dd-trace-py-2761 | flask view_args doesnt support non-string arguments
flask view_args doesnt support non-string arguments even though flask allows you to create non-string url parameters.
The code here: https://github.com/DataDog/dd-trace-py/blob/master/ddtrace/contrib/flask/patch.py#L484 assumes all `view_args` will be strings.
###... | [
{
"content": "import flask\nimport werkzeug\n\nfrom ddtrace import Pin\nfrom ddtrace import config\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\nfrom .. import trace_utils\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ...constants import SPAN_MEASURED_KEY\nfrom ...ext import SpanT... | [
{
"content": "import flask\nimport werkzeug\n\nfrom ddtrace import Pin\nfrom ddtrace import config\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\nfrom .. import trace_utils\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ...constants import SPAN_MEASURED_KEY\nfrom ...ext import SpanT... | diff --git a/ddtrace/contrib/flask/patch.py b/ddtrace/contrib/flask/patch.py
index c26f61c5afd..9d93f2772d4 100644
--- a/ddtrace/contrib/flask/patch.py
+++ b/ddtrace/contrib/flask/patch.py
@@ -481,7 +481,9 @@ def _traced_request(pin, wrapped, instance, args, kwargs):
if not span.get_tag(FLASK_VIEW_ARGS) ... |
ultrabug__py3status-775 | group cycle/click events fail
Since happy-endings we get an AttributeError L154 of events.py
| [
{
"content": "import select\nimport sys\n\nfrom threading import Thread\nfrom subprocess import Popen, PIPE\nfrom json import loads\n\nfrom py3status.profiling import profile\n\ntry:\n # Python 3\n from shlex import quote as shell_quote\nexcept ImportError:\n # Python 2\n from pipes import quote as ... | [
{
"content": "import select\nimport sys\n\nfrom threading import Thread\nfrom subprocess import Popen, PIPE\nfrom json import loads\n\nfrom py3status.profiling import profile\n\ntry:\n # Python 3\n from shlex import quote as shell_quote\nexcept ImportError:\n # Python 2\n from pipes import quote as ... | diff --git a/py3status/events.py b/py3status/events.py
index c329fc31de..06d5a24ed6 100644
--- a/py3status/events.py
+++ b/py3status/events.py
@@ -148,10 +148,15 @@ def process_event(self, module_name, event, top_level=True):
return
module = module_info['module']
+ try:
+ error... |
facebookresearch__ParlAI-3405 | BST dataset: where is 'mode' for each utterances?
Hi, I have a question about BST dataset (https://arxiv.org/pdf/2004.08449.pdf).
<img width="971" alt="스크린샷 2021-01-03 오후 9 48 39" src="https://user-images.githubusercontent.com/15323600/103478953-7afeea80-4e0d-11eb-9a1d-c5b87b237d48.png">
While the paper and... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\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# Download and build the data if it does not exist.\n\nimport json\nimport os\n\nfrom parlai.c... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\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# Download and build the data if it does not exist.\n\nimport json\nimport os\n\nfrom parlai.c... | diff --git a/parlai/tasks/blended_skill_talk/README.md b/parlai/tasks/blended_skill_talk/README.md
index 583be3b3994..ff8f24f84ca 100644
--- a/parlai/tasks/blended_skill_talk/README.md
+++ b/parlai/tasks/blended_skill_talk/README.md
@@ -25,5 +25,6 @@ The following files are downloaded when calling the BST dataset (for ... |
aio-libs__aiohttp-8022 | ClientSession timeout AttributeError
### Describe the bug
When you create a client with `client.ClientSession(timeout=500)` does not raise or warn that timeout must be implemented as `ClientTimeout` but fails when sending a get request
Code lets you implement a client as `client.ClientSession(timeout='bad_arg')`
... | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport dataclasses\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n TYPE_CHECKI... | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport dataclasses\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n TYPE_CHECKI... | diff --git a/CHANGES/8021.bugfix b/CHANGES/8021.bugfix
new file mode 100644
index 00000000000..f43843a587f
--- /dev/null
+++ b/CHANGES/8021.bugfix
@@ -0,0 +1 @@
+Add runtime type check for ``ClientSession`` ``timeout`` parameter.
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 539a8807689..37af61dc718 100644
---... |
translate__pootle-4000 | Visually differentiate disabled projects in the navigation dropdown
In the navigation dropdown, admins can see and select disabled projects (which is ok). The problem is that they have the same style as non-disabled ones.
Let's render disabled project as italic and with .5 opacity, to match their styling everywhere el... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | diff --git a/docs/releases/dev.rst b/docs/releases/dev.rst
index 83edd6bae26..f3cbe5051bc 100644
--- a/docs/releases/dev.rst
+++ b/docs/releases/dev.rst
@@ -36,6 +36,16 @@ Details of changes
is now built on the client. This requires refreshing all server stats using
the :djadmin:`refresh_stats_rq` command (:issue... |
paperless-ngx__paperless-ngx-1998 | [BUG] PDF import fails with "OverflowError: date value out of range"
### Description
I have one PDF file, that I can not import because the import step where the date is searched is failing.
The result is, that the file does **not get imported at all**.
_Suggestion:_
Catch errors in the date searching step and ... | [
{
"content": "import datetime\nimport logging\nimport mimetypes\nimport os\nimport re\nimport shutil\nimport subprocess\nimport tempfile\nfrom typing import Iterator\nfrom typing import Match\nfrom typing import Optional\nfrom typing import Set\n\nimport magic\nfrom django.conf import settings\nfrom django.util... | [
{
"content": "import datetime\nimport logging\nimport mimetypes\nimport os\nimport re\nimport shutil\nimport subprocess\nimport tempfile\nfrom typing import Iterator\nfrom typing import Match\nfrom typing import Optional\nfrom typing import Set\n\nimport magic\nfrom django.conf import settings\nfrom django.util... | diff --git a/src/documents/consumer.py b/src/documents/consumer.py
index f542a1d98ab..d8138019190 100644
--- a/src/documents/consumer.py
+++ b/src/documents/consumer.py
@@ -444,7 +444,12 @@ def progress_callback(current_progress, max_progress):
return document
- def _store(self, text, date, mime_type) -... |
voicepaw__so-vits-svc-fork-557 | PermissionError: [Errno 13] Permission denied
I'm on Windows 10 WSL2 Ubuntu and this happens when I try to run `svc pre-resample`, what's going on?
Traceback (most recent call last):
File "/home/fab/miniconda3/envs/sovits/bin/svc", line 5, in <module>
from so_vits_svc_fork.__main__ import cli
File "/home/... | [
{
"content": "import os\nimport sys\nfrom logging import (\n DEBUG,\n INFO,\n FileHandler,\n StreamHandler,\n basicConfig,\n captureWarnings,\n getLogger,\n)\nfrom pathlib import Path\n\nfrom rich.logging import RichHandler\n\nLOGGER_INIT = False\n\n\ndef init_logger() -> None:\n global ... | [
{
"content": "import os\nimport sys\nfrom logging import DEBUG, INFO, StreamHandler, basicConfig, captureWarnings, getLogger\nfrom pathlib import Path\n\nfrom rich.logging import RichHandler\n\nLOGGER_INIT = False\n\n\ndef init_logger() -> None:\n global LOGGER_INIT\n if LOGGER_INIT:\n return\n\n ... | diff --git a/src/so_vits_svc_fork/logger.py b/src/so_vits_svc_fork/logger.py
index caa9110e..d3da52cb 100644
--- a/src/so_vits_svc_fork/logger.py
+++ b/src/so_vits_svc_fork/logger.py
@@ -1,14 +1,6 @@
import os
import sys
-from logging import (
- DEBUG,
- INFO,
- FileHandler,
- StreamHandler,
- basicCon... |
microsoft__promptflow-3244 | [BUG] Fallback to DefaultAzureCredential isn't compatible with AzureDeveloperCliCredential
**Describe the bug**
PromptFlow currently falls back to using DefaultAzureCredential and fetching a token for the Oauth 1.0 audience. That is not compatible with all credentials in the chain, specifically, the AzureDeveloperCl... | [
{
"content": "import threading\nfrom abc import ABC, abstractmethod\nfrom promptflow.exceptions import UserErrorException\nfrom promptflow._utils.credential_utils import get_default_azure_credential\n\n\n# to access azure ai services, we need to get the token with this audience\nCOGNITIVE_AUDIENCE = \"https://c... | [
{
"content": "import threading\nfrom abc import ABC, abstractmethod\nfrom promptflow.exceptions import UserErrorException\nfrom promptflow._utils.credential_utils import get_default_azure_credential\n\n\n# to access azure ai services, we need to get the token with this scope\nCOGNITIVE_SCOPE = \"https://cogniti... | diff --git a/src/promptflow-core/promptflow/_core/token_provider.py b/src/promptflow-core/promptflow/_core/token_provider.py
index d45a8b41504..3e7a7bd149a 100644
--- a/src/promptflow-core/promptflow/_core/token_provider.py
+++ b/src/promptflow-core/promptflow/_core/token_provider.py
@@ -4,8 +4,8 @@
from promptflow._u... |
conda__conda-5236 | An unexpected error has occurred.
Current conda install:
platform : win-64
conda version : 4.3.11
conda is private : False
conda-env version : 4.3.11
conda-build version : 2.0.2
python version : 2.7.12.final.0
requests version : 2.13.0
root envi... | [
{
"content": "# (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\"OS-agnostic, system-level binary package manager.\"\"\"\nfrom... | [
{
"content": "# (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\"OS-agnostic, system-level binary package manager.\"\"\"\nfrom... | diff --git a/conda/__init__.py b/conda/__init__.py
index 83882f6cfad..610c686fd0d 100644
--- a/conda/__init__.py
+++ b/conda/__init__.py
@@ -44,7 +44,19 @@ def __repr__(self):
return '%s: %s' % (self.__class__.__name__, text_type(self))
def __str__(self):
- return text_type(self.message % self._k... |
jazzband__django-debug-toolbar-1582 | Issue importing settings since 3.2.3
Hello! I have a Django project in which I import the `PANELS_DEFAULTS` into the settings, modify it, and use it for `DEBUG_TOOLBAR_PANELS`. This simplifies the removal of any particular panel, as the defaults don't need to be hard-coded in our settings.
However, as of djdt 3.2.3,... | [
{
"content": "from debug_toolbar.urls import app_name\n\n__all__ = [\"VERSION\"]\n\n\n# Do not use pkg_resources to find the version but set it here directly!\n# see issue #1446\nVERSION = \"3.2.4\"\n\n# Code that discovers files or modules in INSTALLED_APPS imports this module.\n\nurls = \"debug_toolbar.urls\"... | [
{
"content": "__all__ = [\"VERSION\"]\n\n# Do not use pkg_resources to find the version but set it here directly!\n# see issue #1446\nVERSION = \"3.2.4\"\n\n# Code that discovers files or modules in INSTALLED_APPS imports this module.\nurls = \"debug_toolbar.urls\", \"djdt\" # See debug_toolbar/urls.py\n",
... | diff --git a/debug_toolbar/__init__.py b/debug_toolbar/__init__.py
index 7dbb53bd5..ed281278e 100644
--- a/debug_toolbar/__init__.py
+++ b/debug_toolbar/__init__.py
@@ -1,12 +1,8 @@
-from debug_toolbar.urls import app_name
-
__all__ = ["VERSION"]
-
# Do not use pkg_resources to find the version but set it here dire... |
huggingface__transformers-8237 | ImportError: cannot import name 'SAVE_STATE_WARNING' from 'torch.optim.lr_scheduler'
## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
Don't forget to fill out the missing fields in that output! -->
- `transformers` version:
- Platform: ubuntu 1... | [
{
"content": "# coding=utf-8\n# Copyright 2020-present the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS... | [
{
"content": "# coding=utf-8\n# Copyright 2020-present the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS... | diff --git a/src/transformers/trainer_pt_utils.py b/src/transformers/trainer_pt_utils.py
index f4cf668e427e..f19edba609ab 100644
--- a/src/transformers/trainer_pt_utils.py
+++ b/src/transformers/trainer_pt_utils.py
@@ -23,7 +23,7 @@
import numpy as np
import torch
-from torch.optim.lr_scheduler import SAVE_STATE_WA... |
ansible-collections__community.aws-1627 | aws_ssm_parameter_store update fails if no description element was defined before
### Summary
`aws_ssm_parameter_store` update fails if no description element was defined before.
If an SSM parameter has an empty description already in SSM, then the AWS API (I'm guessing `aws ssm describe-parameters`) doesn't incl... | [
{
"content": "#!/usr/bin/python\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ssm_parameter\n... | [
{
"content": "#!/usr/bin/python\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ssm_parameter\n... | diff --git a/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml b/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml
new file mode 100644
index 00000000000..98344a6ff4a
--- /dev/null
+++ b/changelogs/fragments/1627-ssm_parameter-KeyError-when-adding-description.yml
@@... |
vyperlang__vyper-2089 | Raising to a negative number raises CompilerPanic
### Version Information
vyper Version (output of `vyper --version`): 0.1.0b17
### What's your issue about?
Trying to compile this:
```python
@public
def foo() -> decimal:
return 10 ** (-3) # 0.001
```
raises this `CompilerPanic`:
```
CompilerPanic: Inv... | [
{
"content": "import ast as python_ast\nimport decimal\nimport operator\nimport sys\nfrom typing import Any, Optional, Union\n\nfrom vyper.exceptions import (\n CompilerPanic,\n InvalidLiteral,\n OverflowException,\n SyntaxException,\n TypeMismatch,\n UnfoldableNode,\n ZeroDivisionException... | [
{
"content": "import ast as python_ast\nimport decimal\nimport operator\nimport sys\nfrom typing import Any, Optional, Union\n\nfrom vyper.exceptions import (\n CompilerPanic,\n InvalidLiteral,\n InvalidOperation,\n OverflowException,\n SyntaxException,\n TypeMismatch,\n UnfoldableNode,\n ... | diff --git a/vyper/ast/nodes.py b/vyper/ast/nodes.py
index a0ae931043..6400d72141 100644
--- a/vyper/ast/nodes.py
+++ b/vyper/ast/nodes.py
@@ -7,6 +7,7 @@
from vyper.exceptions import (
CompilerPanic,
InvalidLiteral,
+ InvalidOperation,
OverflowException,
SyntaxException,
TypeMismatch,
@@ -... |
getpelican__pelican-844 | pelican-import unable to import blog entries that contain characters that you can’t put in Windows file names.
Hi there!
I’m currently trying to import my old entries from Blogger (by converting the Blogger XML export results to Wordpress, and then using `pelican-import --wpfile`, but apparently `pelican-import` stops... | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport argparse\ntry:\n # py3k import\n from html.parser import HTMLParser\nexcept ImportError:\n # py2 import\n from HTMLParser import HTMLParser # NOQA\nimport os\nimport re\ni... | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport argparse\ntry:\n # py3k import\n from html.parser import HTMLParser\nexcept ImportError:\n # py2 import\n from HTMLParser import HTMLParser # NOQA\nimport os\nimport re\ni... | diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py
index 420c3fbab..9e477c2cf 100755
--- a/pelican/tools/pelican_import.py
+++ b/pelican/tools/pelican_import.py
@@ -376,6 +376,15 @@ def fields2pelican(fields, out_markup, output_path, dircat=False, strip_raw=Fals
filename = os.path... |
aio-libs__aiohttp-7850 | [3.9] Import fails on Windows PyPy
### Describe the bug
Importing aiohttp 3.9.0 on Windows in PyPy 3.8 fails with an error about `time.gmtime`.
### To Reproduce
* Run PyPy 3.8 on Windows
* import aiohttp
### Expected behavior
No crash
### Logs/tracebacks
```python-traceback
.tox\ci-pypy3\lib\site-packages\a... | [
{
"content": "import calendar\nimport contextlib\nimport datetime\nimport os # noqa\nimport pathlib\nimport pickle\nimport re\nimport time\nimport warnings\nfrom collections import defaultdict\nfrom http.cookies import BaseCookie, Morsel, SimpleCookie\nfrom math import ceil\nfrom typing import ( # noqa\n D... | [
{
"content": "import calendar\nimport contextlib\nimport datetime\nimport os # noqa\nimport pathlib\nimport pickle\nimport re\nimport time\nimport warnings\nfrom collections import defaultdict\nfrom http.cookies import BaseCookie, Morsel, SimpleCookie\nfrom math import ceil\nfrom typing import ( # noqa\n D... | diff --git a/CHANGES/7848.bugfix b/CHANGES/7848.bugfix
new file mode 100644
index 00000000000..13a29e2a226
--- /dev/null
+++ b/CHANGES/7848.bugfix
@@ -0,0 +1 @@
+Fix importing aiohttp under PyPy 3.8 and 3.9 on Windows.
diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py
index 3d218dd31b1..6e26b029026 100644
--- a/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.