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 ⌀ |
|---|---|---|---|---|
mathesar-foundation__mathesar-493 | New CSV imports use autogenerated column names.
## Description
<!-- A clear and concise description of what the bug is. -->
According to #459, newly imported CSVs are supposed to use the first row as headers by default. However, newly uploaded CSVs are showing autogenerated column names.
## Expected behavior
<!--... | [
{
"content": "from django.urls import reverse\nfrom rest_framework import serializers\n\nfrom mathesar.models import Table, Schema, DataFile, Database\n\n\nclass NestedTableSerializer(serializers.HyperlinkedModelSerializer):\n url = serializers.SerializerMethodField()\n\n class Meta:\n model = Tabl... | [
{
"content": "from django.urls import reverse\nfrom rest_framework import serializers\n\nfrom mathesar.models import Table, Schema, DataFile, Database\n\n\nclass NestedTableSerializer(serializers.HyperlinkedModelSerializer):\n url = serializers.SerializerMethodField()\n\n class Meta:\n model = Tabl... | diff --git a/mathesar/serializers.py b/mathesar/serializers.py
index 1f9fc230c1..06193883ad 100644
--- a/mathesar/serializers.py
+++ b/mathesar/serializers.py
@@ -100,7 +100,8 @@ class Meta:
]
extra_kwargs = {'delimiter': {'trim_whitespace': False},
'escapechar': {'trim_whites... |
archlinux__archinstall-1070 | Crash when password is or has a quotation mark.
Hi,
Hopefully this bug is easy to reproduce. You just have to set a quotation mark (") as password.
| [
{
"content": "import time\nimport logging\nimport os\nimport re\nimport shutil\nimport shlex\nimport pathlib\nimport subprocess\nimport glob\nfrom types import ModuleType\nfrom typing import Union, Dict, Any, List, Optional, Iterator, Mapping, TYPE_CHECKING\nfrom .disk import get_partitions_in_use, Partition\nf... | [
{
"content": "import time\nimport logging\nimport os\nimport re\nimport shutil\nimport shlex\nimport pathlib\nimport subprocess\nimport glob\nfrom types import ModuleType\nfrom typing import Union, Dict, Any, List, Optional, Iterator, Mapping, TYPE_CHECKING\nfrom .disk import get_partitions_in_use, Partition\nf... | diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index f10b40648d..9959b0a848 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -1028,7 +1028,12 @@ def user_set_pw(self, user :str, password :str) -> bool:
# This means the root account isn't locked/disabled with ... |
internetarchive__openlibrary-7420 | Reading log export fails if Work ID in `bookshelves_books` table is a redirect
<!-- What problem are we solving? What does the experience look like today? What are the symptoms? -->
If a patron has added a work to their reading log, and the work later becomes a `/type/redirect`, the patron will not be able to download... | [
{
"content": "from datetime import datetime\nimport json\nimport logging\nimport re\nfrom typing import Any, Callable\nfrom collections.abc import Iterable, Mapping\n\nimport web\n\nfrom infogami.utils import delegate\nfrom infogami import config\nfrom infogami.utils.view import (\n require_login,\n rende... | [
{
"content": "from datetime import datetime\nimport json\nimport logging\nimport re\nfrom typing import Any, Callable\nfrom collections.abc import Iterable, Mapping\n\nimport web\n\nfrom infogami.utils import delegate\nfrom infogami import config\nfrom infogami.utils.view import (\n require_login,\n rende... | diff --git a/openlibrary/plugins/upstream/account.py b/openlibrary/plugins/upstream/account.py
index cae601ac4d7..b2534ffdb75 100644
--- a/openlibrary/plugins/upstream/account.py
+++ b/openlibrary/plugins/upstream/account.py
@@ -901,6 +901,10 @@ def format_reading_log(book: dict) -> dict:
work: Work = web.... |
Flexget__Flexget-1985 | Incompatibility with Libtorrent version 1.1.3 and above
### Actual behaviour:
flexget crashes when converting magnet URI to a torrent file with libtorrent versions 1.1.3 and higher
### Steps to reproduce:
upgrade libtorrent to 1.1.3 or higher (I'm using 1.1.4 but the change occurred in 1.1.3)
download torrent wit... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nimport os\nimport time\nimport logging\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom flexget.utils.tools import parse_timedelt... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nimport os\nimport time\nimport logging\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom flexget.utils.tools import parse_timedelt... | diff --git a/flexget/plugins/modify/convert_magnet.py b/flexget/plugins/modify/convert_magnet.py
index f454c3fd8e..5418e209dd 100644
--- a/flexget/plugins/modify/convert_magnet.py
+++ b/flexget/plugins/modify/convert_magnet.py
@@ -35,7 +35,7 @@ def magnet_to_torrent(self, magnet_uri, destination_folder, timeout):
... |
bookwyrm-social__bookwyrm-513 | Shelf privacy is not persisted
**Describe the bug**
The "Shelf privacy" form on the "Your Shelves" page doesn't seem to do anything.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to "Your Shelves" ( /user/.../shelves )
2. Click the pencil icon next to any shelf (eg. "To Read")
3. Change the "Shelf pri... | [
{
"content": "''' views for actions you can take in the application '''\nfrom io import BytesIO, TextIOWrapper\nfrom uuid import uuid4\nfrom PIL import Image\n\nimport dateutil.parser\nfrom dateutil.parser import ParserError\n\nfrom django.contrib.auth import authenticate, login, logout\nfrom django.contrib.aut... | [
{
"content": "''' views for actions you can take in the application '''\nfrom io import BytesIO, TextIOWrapper\nfrom uuid import uuid4\nfrom PIL import Image\n\nimport dateutil.parser\nfrom dateutil.parser import ParserError\n\nfrom django.contrib.auth import authenticate, login, logout\nfrom django.contrib.aut... | diff --git a/bookwyrm/templates/shelf.html b/bookwyrm/templates/shelf.html
index 4b27e3a49a..99e0c678b0 100644
--- a/bookwyrm/templates/shelf.html
+++ b/bookwyrm/templates/shelf.html
@@ -106,6 +106,8 @@ <h2 class="title is-4">Edit shelf</h2>
<label class="label" for="id_name">Name:</label>
... |
kubeflow__pipelines-1459 | cmle training component should output job_dir.txt
It should output the file regardless user provides jodDir or not, otherwise argo will fail.
| [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/component_sdk/python/kfp_component/google/ml_engine/_create_job.py b/component_sdk/python/kfp_component/google/ml_engine/_create_job.py
index 3533aac7e00..f34ff9f9008 100644
--- a/component_sdk/python/kfp_component/google/ml_engine/_create_job.py
+++ b/component_sdk/python/kfp_component/google/ml_engine/_c... |
ansible-collections__amazon.aws-1641 | ec2_vpc_nat_gateway connectivity_type:private still allocates uneeded elastic IP
### Summary
When setting connectivity_type: private no elastic IP should be provisioned since it is not used by the private nat gateway,
### Issue Type
Bug Report
### Component Name
ec2_vpc_nat_gateway
### Ansible Version... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: ec2_vpc_nat_gateway\nversion_added: 1.0.0\nshort_description: Manage AWS VPC NAT Gateway... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: ec2_vpc_nat_gateway\nversion_added: 1.0.0\nshort_description: Manage AWS VPC NAT Gateway... | diff --git a/changelogs/fragments/1632-changes-to-no-allocate-eip-when-connectivity_type=private.yml b/changelogs/fragments/1632-changes-to-no-allocate-eip-when-connectivity_type=private.yml
new file mode 100644
index 00000000000..4b820a3498f
--- /dev/null
+++ b/changelogs/fragments/1632-changes-to-no-allocate-eip-when... |
ansible-collections__amazon.aws-1632 | ec2_vpc_nat_gateway connectivity_type:private still allocates uneeded elastic IP
### Summary
When setting connectivity_type: private no elastic IP should be provisioned since it is not used by the private nat gateway,
### Issue Type
Bug Report
### Component Name
ec2_vpc_nat_gateway
### Ansible Version... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: ec2_vpc_nat_gateway\nversion_added: 1.0.0\nshort_description: Manage AWS VPC NAT Gateway... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: ec2_vpc_nat_gateway\nversion_added: 1.0.0\nshort_description: Manage AWS VPC NAT Gateway... | diff --git a/changelogs/fragments/1632-changes-to-no-allocate-eip-when-connectivity_type=private.yml b/changelogs/fragments/1632-changes-to-no-allocate-eip-when-connectivity_type=private.yml
new file mode 100644
index 00000000000..4b820a3498f
--- /dev/null
+++ b/changelogs/fragments/1632-changes-to-no-allocate-eip-when... |
aws-cloudformation__cfn-lint-2272 | AWS Application Insights Tier and Log values aren't accepting any valid values
*cfn-lint version: v0.58.4*
*Description of issue.*
AWS::ApplicationInsights::Application.ComponentMonitoringSetting.Tier
AWS::ApplicationInsights::Application.Log.LogType
These 2 property types are not accepting any valid values defi... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport fnmatch\nimport json\nimport logging\nimport multiprocessing\nimport os\nimport subprocess\nimport zipfile\nimport re\nfrom io import BytesIO\nimport jsonpatch\ntry:\n from... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport fnmatch\nimport json\nimport logging\nimport multiprocessing\nimport os\nimport subprocess\nimport zipfile\nimport re\nfrom io import BytesIO\nimport warnings\nimport jsonpatc... | diff --git a/src/cfnlint/data/CloudSpecs/af-south-1.json b/src/cfnlint/data/CloudSpecs/af-south-1.json
index 582dcfc1fd..7bffc280f5 100644
--- a/src/cfnlint/data/CloudSpecs/af-south-1.json
+++ b/src/cfnlint/data/CloudSpecs/af-south-1.json
@@ -5254,10 +5254,7 @@
"Documentation": "http://docs.aws.amazon.com/AW... |
PennyLaneAI__pennylane-3278 | [BUG] Issue with expval of SparseH not building correct sized matrix
### Expected behavior
The following example should run to completion:
```python
import pennylane as qml
dev = qml.device("default.qubit", wires=4)
@qml.qnode(dev, diff_method="parameter-shift")
def circuit(p):
qml.PauliX(0)
return qm... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies 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# Unle... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies 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# Unle... | diff --git a/doc/releases/changelog-0.27.0.md b/doc/releases/changelog-0.27.0.md
index e7f2db58119..853c0da7a42 100644
--- a/doc/releases/changelog-0.27.0.md
+++ b/doc/releases/changelog-0.27.0.md
@@ -592,6 +592,9 @@
<h3>Bug fixes</h3>
+* `qml.SparseHamiltonian` now validates the size of the input matrix.
+ [(#32... |
meltano__meltano-6779 | bug: exit code null on snowplow telemetry
In investigating https://github.com/meltano/internal-data/issues/26 I saw a large increase in bad events. Looks like all of the ones from 2.6.0 and 2.5.0 are from:
`$.exit_code: null found, integer expected`
And I dove in on each one and it's from `add` and `discover` eve... | [
{
"content": "\"\"\"Meltano Iglu schemas metadata & utilities.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\n\nDEFAULT_VENDOR = \"com.meltano\"\n\n\n@dataclass\nclass IgluSchema:\n \"\"\"Dataclass to store the name, version, vendor, and URL for an Iglu schema.\"\"\"\n\n ... | [
{
"content": "\"\"\"Meltano Iglu schemas metadata & utilities.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\n\nDEFAULT_VENDOR = \"com.meltano\"\n\n\n@dataclass\nclass IgluSchema:\n \"\"\"Dataclass to store the name, version, vendor, and URL for an Iglu schema.\"\"\"\n\n ... | diff --git a/src/meltano/core/tracking/schemas.py b/src/meltano/core/tracking/schemas.py
index df06456b89..65d725f8a5 100644
--- a/src/meltano/core/tracking/schemas.py
+++ b/src/meltano/core/tracking/schemas.py
@@ -30,7 +30,7 @@ def url(self) -> str:
BlockEventSchema = IgluSchema("block_event", "1-0-0")
EnvironmentCo... |
DataDog__dd-trace-py-2717 | UnicodeDecodeError for invalid headers in ASGI middleware
When the ASGI middleware receives headers with invalid encoding, for example as the result of somebody fuzzing an endpoint as is the case here, it introduces a Unicode decode error into the HTTP pipeline. It shouldn't be doing this.
### Which version of dd-tr... | [
{
"content": "import sys\n\nimport ddtrace\nfrom ddtrace import config\nfrom ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ddtrace.ext import SpanTypes\nfrom ddtrace.ext import http\n\nfrom .. import trace_utils\nfrom ...internal.compat import reraise\nfrom ...internal.logger import get_logger\nfrom ... | [
{
"content": "import sys\n\nimport ddtrace\nfrom ddtrace import config\nfrom ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ddtrace.ext import SpanTypes\nfrom ddtrace.ext import http\n\nfrom .. import trace_utils\nfrom ...internal.compat import reraise\nfrom ...internal.logger import get_logger\nfrom ... | diff --git a/ddtrace/contrib/asgi/middleware.py b/ddtrace/contrib/asgi/middleware.py
index 036bb9459f8..40268a85793 100644
--- a/ddtrace/contrib/asgi/middleware.py
+++ b/ddtrace/contrib/asgi/middleware.py
@@ -85,11 +85,15 @@ async def __call__(self, scope, receive, send):
if scope["type"] != "http":
... |
ManimCommunity__manim-3423 | Only the first parts of an equation are rendered with `Write`.
## Description of bug / unexpected behavior
Only the first parts of an equation are rendered with `Write`.
## Expected behavior
The entire equation to be displayed
## How to reproduce the issue
Manim Community v0.11.0
```py
class TestWrite... | [
{
"content": "r\"\"\"Mobjects representing text rendered using LaTeX.\n\n.. important::\n\n See the corresponding tutorial :ref:`rendering-with-latex`\n\n.. note::\n\n Just as you can use :class:`~.Text` (from the module :mod:`~.text_mobject`) to add text to your videos, you can use :class:`~.Tex` and :clas... | [
{
"content": "r\"\"\"Mobjects representing text rendered using LaTeX.\n\n.. important::\n\n See the corresponding tutorial :ref:`rendering-with-latex`\n\n.. note::\n\n Just as you can use :class:`~.Text` (from the module :mod:`~.text_mobject`) to add text to your videos, you can use :class:`~.Tex` and :clas... | diff --git a/manim/mobject/text/tex_mobject.py b/manim/mobject/text/tex_mobject.py
index 71a31a72c4..dbdf6e3a50 100644
--- a/manim/mobject/text/tex_mobject.py
+++ b/manim/mobject/text/tex_mobject.py
@@ -344,10 +344,6 @@ def _break_up_by_substrings(self):
curr_index + num_submobs + len("".join(self.arg_... |
pulp__pulpcore-2408 | Migration 0040_set_admin_is_staff.py is missing dependency on user model
| [
{
"content": "# Generated by Django 2.2.13 on 2020-07-01 21:29\n\nfrom django.contrib.auth import get_user_model\nfrom django.db import migrations\n\n\ndef allow_admin_as_staff(apps, schema_editor):\n user_model = get_user_model()\n try:\n admin_user = user_model.objects.get(username='admin')\n ... | [
{
"content": "# Generated by Django 2.2.13 on 2020-07-01 21:29\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.db import migrations\n\n\ndef allow_admin_as_staff(apps, schema_editor):\n user_model = get_user_model()\n try:\n admin_user = user_model.o... | diff --git a/CHANGES/2403.bugfix b/CHANGES/2403.bugfix
new file mode 100644
index 0000000000..4e30669eaa
--- /dev/null
+++ b/CHANGES/2403.bugfix
@@ -0,0 +1 @@
+Declared proper dependency on user model in migration 0040.
diff --git a/pulpcore/app/migrations/0040_set_admin_is_staff.py b/pulpcore/app/migrations/0040_set_a... |
aws__aws-sdk-pandas-2351 | Copying to Redshift fails if one of the primary key columns includes a hyphen
### Describe the bug
Copying to Redshift (`awswrangler.redshift.copy`) fails if one of the primary key columns (`primary_keys`) in the table has a hyphen in its name. The `CREATE TABLE` statement will then fail with the following error mes... | [
{
"content": "# mypy: disable-error-code=name-defined\n\"\"\"Amazon Redshift Utils Module (PRIVATE).\"\"\"\nimport json\nimport logging\nimport uuid\nfrom typing import Dict, List, Optional, Tuple, Union\n\nimport boto3\nimport botocore\nimport pandas as pd\n\nfrom awswrangler import _data_types, _utils, except... | [
{
"content": "# mypy: disable-error-code=name-defined\n\"\"\"Amazon Redshift Utils Module (PRIVATE).\"\"\"\nimport json\nimport logging\nimport uuid\nfrom typing import Dict, List, Optional, Tuple, Union\n\nimport boto3\nimport botocore\nimport pandas as pd\n\nfrom awswrangler import _data_types, _utils, except... | diff --git a/awswrangler/redshift/_utils.py b/awswrangler/redshift/_utils.py
index 0c6c39ad5..9d38f18d0 100644
--- a/awswrangler/redshift/_utils.py
+++ b/awswrangler/redshift/_utils.py
@@ -349,7 +349,9 @@ def _create_table( # pylint: disable=too-many-locals,too-many-arguments,too-man
primary_keys=primary_keys... |
Azure__azure-cli-extensions-2181 | "az network firewall network-rule delete" note
Hi,
If there is only one rule in the collection then this command won't let you delete the rule... because then the collection will have no rules, which seems to be a requirement.
**az network firewall network-rule delete**
`az : AzureFirewallRuleCollection /subs... | [
{
"content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------... | [
{
"content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------... | diff --git a/src/azure-firewall/HISTORY.rst b/src/azure-firewall/HISTORY.rst
index 50cdcab2f00..3d0dd029e25 100644
--- a/src/azure-firewall/HISTORY.rst
+++ b/src/azure-firewall/HISTORY.rst
@@ -2,6 +2,10 @@
Release History
===============
+0.5.1
+++++++
+* `az network firewall create/update`: support new `--allow-ac... |
easybuilders__easybuild-framework-3136 | singularity build error issue with pip wheel and upgrade pip
@boegel
I was able to confirm that the generated singularity definition file is not working.
I ran the following `eb Anaconda3-5.3.0.eb -C --container-config bootstrap=yum,osversion=7 --experimental` to build a definition file and then building this ... | [
{
"content": "# Copyright 2017-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemi... | [
{
"content": "# Copyright 2017-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemi... | diff --git a/easybuild/tools/containers/singularity.py b/easybuild/tools/containers/singularity.py
index 206b27aba3..ee8817eb7e 100644
--- a/easybuild/tools/containers/singularity.py
+++ b/easybuild/tools/containers/singularity.py
@@ -311,6 +311,9 @@ def resolve_template_data(self):
if 'install_eb' not in temp... |
sanic-org__sanic-2919 | (websockets 12.0) DeprecationWarning: websockets.connection was renamed to websockets.protocol and Connection was renamed to Protocol
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
The DeprecationWarning is thrown here:
https://github.com/sanic-org/sanic/bl... | [
{
"content": "from typing import Optional, Sequence, cast\n\n\ntry: # websockets < 11.0\n from websockets.connection import State\n from websockets.server import ServerConnection as ServerProtocol\nexcept ImportError: # websockets >= 11.0\n from websockets.protocol import State # type: ignore\n f... | [
{
"content": "from typing import Optional, Sequence, cast\n\n\ntry: # websockets >= 11.0\n from websockets.protocol import State # type: ignore\n from websockets.server import ServerProtocol # type: ignore\nexcept ImportError: # websockets < 11.0\n from websockets.connection import State\n from ... | diff --git a/sanic/server/protocols/websocket_protocol.py b/sanic/server/protocols/websocket_protocol.py
index 7e026d8d15..dc0a60d50a 100644
--- a/sanic/server/protocols/websocket_protocol.py
+++ b/sanic/server/protocols/websocket_protocol.py
@@ -1,12 +1,12 @@
from typing import Optional, Sequence, cast
-try: # w... |
holoviz__holoviews-6269 | Empty output in Colab
#### ALL software version info
Google Colab
```
sys.version_info: sys.version_info(major=3, minor=10, micro=12, releaselevel='final', serial=0)
ipywidgets.__version__: 8.1.1
bokeh.__version__: 3.3.2
jupyter_bokeh.__version__: 3.0.7
holoviews.__version__: 1.17.1
```
#### Description... | [
{
"content": "\"\"\"\nPublic API for all plotting renderers supported by HoloViews,\nregardless of plotting package or backend.\n\"\"\"\nimport base64\nimport os\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom io import BytesIO, StringIO\n\nimport panel as pn\nimport param\nfrom boke... | [
{
"content": "\"\"\"\nPublic API for all plotting renderers supported by HoloViews,\nregardless of plotting package or backend.\n\"\"\"\nimport base64\nimport os\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom io import BytesIO, StringIO\n\nimport panel as pn\nimport param\nfrom boke... | diff --git a/holoviews/plotting/renderer.py b/holoviews/plotting/renderer.py
index 7d8fcb97f0..361de8193b 100644
--- a/holoviews/plotting/renderer.py
+++ b/holoviews/plotting/renderer.py
@@ -389,8 +389,9 @@ def components(self, obj, fmt=None, comm=True, **kwargs):
src is source or (src._plot_id is not ... |
gammapy__gammapy-4918 | Miswritten if condition in pointing.py
**Gammapy version**
gammapy 1.1
**Bug description**
Miswritten if condition (never enter the elif) in gammapy/data/pointing.py
```
if self.mode is PointingMode.POINTING:
header["OBS_MODE"] = "POINTING"
header["RA_PNT"] = self.fixed_icrs.ra.deg, u... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport html\nimport logging\nimport warnings\nfrom enum import Enum, auto\nimport numpy as np\nimport scipy.interpolate\nimport astropy.units as u\nfrom astropy.coordinates import (\n ICRS,\n AltAz,\n BaseCoordinateFrame,\n ... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport html\nimport logging\nimport warnings\nfrom enum import Enum, auto\nimport numpy as np\nimport scipy.interpolate\nimport astropy.units as u\nfrom astropy.coordinates import (\n ICRS,\n AltAz,\n BaseCoordinateFrame,\n ... | diff --git a/gammapy/data/pointing.py b/gammapy/data/pointing.py
index 0dca770058..66b528943c 100644
--- a/gammapy/data/pointing.py
+++ b/gammapy/data/pointing.py
@@ -304,7 +304,7 @@ def to_fits_header(self, format="gadf", version="0.3", time_ref=None):
header["OBS_MODE"] = "POINTING"
header["... |
DataDog__dd-trace-py-2753 | UnicodeDecodeError for invalid headers in ASGI middleware
When the ASGI middleware receives headers with invalid encoding, for example as the result of somebody fuzzing an endpoint as is the case here, it introduces a Unicode decode error into the HTTP pipeline. It shouldn't be doing this.
### Which version of dd-tr... | [
{
"content": "import sys\n\nimport ddtrace\nfrom ddtrace import config\nfrom ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ddtrace.ext import SpanTypes\nfrom ddtrace.ext import http\n\nfrom .. import trace_utils\nfrom ...internal.compat import reraise\nfrom ...internal.logger import get_logger\nfrom ... | [
{
"content": "import sys\n\nimport ddtrace\nfrom ddtrace import config\nfrom ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ddtrace.ext import SpanTypes\nfrom ddtrace.ext import http\n\nfrom .. import trace_utils\nfrom ...internal.compat import reraise\nfrom ...internal.logger import get_logger\nfrom ... | diff --git a/ddtrace/contrib/asgi/middleware.py b/ddtrace/contrib/asgi/middleware.py
index 036bb9459f8..40268a85793 100644
--- a/ddtrace/contrib/asgi/middleware.py
+++ b/ddtrace/contrib/asgi/middleware.py
@@ -85,11 +85,15 @@ async def __call__(self, scope, receive, send):
if scope["type"] != "http":
... |
freqtrade__freqtrade-2565 | Freqtrade bot cannot run - Error - cannot find pairlist
## Step 1: Have you search for this issue before posting it?
Yes
## Step 2: Describe your environment
* Operating system: Ubuntu 18.04.3 (LTS) x64
* Python Version: Python 2.7.15 (`python -V`)
* CCXT version: _____ (`pip freeze | grep ccxt`)
* Br... | [
{
"content": "\"\"\"\nFunctions to handle deprecated settings\n\"\"\"\n\nimport logging\nfrom typing import Any, Dict\n\nfrom freqtrade import OperationalException\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef check_conflicting_settings(config: Dict[str, Any],\n section1: str,... | [
{
"content": "\"\"\"\nFunctions to handle deprecated settings\n\"\"\"\n\nimport logging\nfrom typing import Any, Dict\n\nfrom freqtrade import OperationalException\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef check_conflicting_settings(config: Dict[str, Any],\n section1: str,... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 99f3b3eecc8..ea5f9c39555 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,9 +73,9 @@ jobs:
# Allow failure for coveralls
# Fake travis environment to get coveralls working correctly
export TRAVIS... |
geopandas__geopandas-1448 | Handle the new pd.NA value as missing value
From https://github.com/geopandas/geopandas/pull/1154/files#r392596021, we have a custom `_isna` function to recognize missing value scalars. We should update this function to also deal with the new `pd.NA` scalar.
| [
{
"content": "from collections.abc import Iterable\nimport numbers\nimport operator\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import ExtensionArray, ExtensionDtype\n\nimport shapely\nimport shapely.affinity\nimport shapely.geometry\nfrom shapely.geometry.base import... | [
{
"content": "from collections.abc import Iterable\nimport numbers\nimport operator\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import ExtensionArray, ExtensionDtype\n\nimport shapely\nimport shapely.affinity\nimport shapely.geometry\nfrom shapely.geometry.base import... | diff --git a/geopandas/array.py b/geopandas/array.py
index 1e4813884e..c9decb2006 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -55,7 +55,7 @@ def construct_array_type(cls):
def _isna(value):
"""
- Check if scalar value is NA-like (None or np.nan).
+ Check if scalar value is NA-like (None, n... |
django-extensions__django-extensions-332 | UUIDField and multi-table inheritance
It seems that with Django 1.5, the UUIDField doesn't work well when used as a primary key with multi-table inheritance.
My models:
``` python
from django.db import models
from django_extensions.db.fields import UUIDField
class ParentModel(models.Model):
uid = UUIDField(ma... | [
{
"content": "\"\"\"\nDjango Extensions additional model fields\n\"\"\"\nimport re\nimport six\ntry:\n import uuid\n HAS_UUID = True\nexcept ImportError:\n HAS_UUID = False\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.template.defaultfilters import slugify\nfrom django.db.mod... | [
{
"content": "\"\"\"\nDjango Extensions additional model fields\n\"\"\"\nimport re\nimport six\ntry:\n import uuid\n HAS_UUID = True\nexcept ImportError:\n HAS_UUID = False\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.template.defaultfilters import slugify\nfrom django.db.mod... | diff --git a/django_extensions/db/fields/__init__.py b/django_extensions/db/fields/__init__.py
index d4139f22d..9cde3d0fd 100644
--- a/django_extensions/db/fields/__init__.py
+++ b/django_extensions/db/fields/__init__.py
@@ -246,17 +246,6 @@ def __init__(self, verbose_name=None, name=None, auto=True, version=1, node=No... |
cobbler__cobbler-3649 | SELinux issue when service is restarted
This issue was initially reported at
https://bugzilla.redhat.com/show_bug.cgi?id=1754430
There is a SELinux denial when the cobblerd service is restarted because of the permissions of the web.ss and others webui_sessions files.
I'm not sure to understand if this is 3.0.x o... | [
{
"content": "\"\"\"\nCobbler daemon for logging remote syslog traffic during automatic installation\n\nCopyright 2007-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public Lic... | [
{
"content": "\"\"\"\nCobbler daemon for logging remote syslog traffic during automatic installation\n\nCopyright 2007-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public Lic... | diff --git a/cobbler.spec b/cobbler.spec
index 5ab8cdf059..c8dcb3400e 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -337,7 +337,7 @@ rm %{buildroot}%{_sysconfdir}/cobbler/cobbler_web.conf
# ghosted files
touch %{buildroot}%{_sharedstatedir}/cobbler/web.ss
-chmod 0600 %{buildroot}%{_sharedstatedir}/cobbler/web.ss
... |
vispy__vispy-2092 | memory surge after minimizing the vispy window
Hi, thank you very much for working on vispy. Recently, I found a bug related to memory consumption. It appears after minimizing the vispy window, with a memory surge rate of about 50 MB/second. This surge doesn't exist even if you bring other programs to the top level. Th... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# vispy: gallery 2\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nMultiple real-time digital signals with GLSL-based clipping.\n\"\"\"\n\nfrom vispy ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# vispy: gallery 2\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nMultiple real-time digital signals with GLSL-based clipping.\n\"\"\"\n\nfrom vispy ... | diff --git a/examples/demo/gloo/realtime_signals.py b/examples/demo/gloo/realtime_signals.py
index a292f0b383..504f8a59af 100644
--- a/examples/demo/gloo/realtime_signals.py
+++ b/examples/demo/gloo/realtime_signals.py
@@ -155,6 +155,7 @@ def on_timer(self, event):
self.program['a_position'].set_data(y.ravel... |
Pycord-Development__pycord-2061 | 'Embed.author.name' positional argument
### Summary
Trying to retrieve the `embed.author.name` returns missing positional argument.
### Reproduction Steps
1. Create an embed
2. Send and capture the embed
3. Try to access the `embed.author.name`
4. See `Missing 1 required positional argument: 'name'` error
... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 92b81b419b..2fd8cdc961 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -106,6 +106,9 @@ These changes are available on the `master` branch, but have not yet been releas
listeners. ([#2044](https://github.com/Pycord-Development/pycord/pull/2044))
- Fixed unloading of co... |
conan-io__conan-2592 | conan search gives AttributeError: 'UserIO' object has no attribute 'warn'
Version: 1.1.1
OS: Linux Ubuntu 14.04
conda: v4.2.7
Repro steps:
* `conda create -n conan python=2.7`
* `source activate conan`
* `pip install conan`
* `conan search zlib/1.2.11@conan/stable -r=conan-center`
Gives the following pyth... | [
{
"content": "from conans.search.search import DiskSearchManager, filter_outdated\nfrom collections import OrderedDict\nfrom conans.client.remote_registry import RemoteRegistry\n\n\nclass Search(object):\n def __init__(self, client_cache, remote_manager, user_io):\n self._client_cache = client_cache\n... | [
{
"content": "from conans.search.search import DiskSearchManager, filter_outdated\nfrom collections import OrderedDict\nfrom conans.client.remote_registry import RemoteRegistry\n\n\nclass Search(object):\n def __init__(self, client_cache, remote_manager, user_io):\n self._client_cache = client_cache\n... | diff --git a/conans/client/cmd/search.py b/conans/client/cmd/search.py
index be3e55e6db9..73023ad8285 100644
--- a/conans/client/cmd/search.py
+++ b/conans/client/cmd/search.py
@@ -41,7 +41,7 @@ def search_packages(self, reference=None, remote=None, query=None, outdated=Fals
packages... |
mne-tools__mne-python-5042 | problem with mne.decoding.Scaler
I am trying to standardize my epochs:
from mne.decoding import Scaler
epochs_data = epochs.get_data()
epochs_sc = Scaler().fit_transform(epochs_data)
And I get this error:
\n\nimport numpy as np\n\nfrom .mixin import TransformerMixin\nfrom .base impor... | [
{
"content": "# -*- coding: utf-8 -*-\n# Authors: Mainak Jas <mainak@neuro.hut.fi>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Romain Trachel <trachelr@gmail.com>\n#\n# License: BSD (3-clause)\n\nimport numpy as np\n\nfrom .mixin import TransformerMixin\nfrom .base impor... | diff --git a/mne/decoding/tests/test_transformer.py b/mne/decoding/tests/test_transformer.py
index 0de90045685..1c65cec7fac 100644
--- a/mne/decoding/tests/test_transformer.py
+++ b/mne/decoding/tests/test_transformer.py
@@ -80,6 +80,7 @@ def test_scaler():
assert_array_almost_equal(epochs_data, Xi)
# T... |
pre-commit__pre-commit-2187 | doesn't work in visual studio 2019 on Windows
### describe your issue
When I try to commit from visual studio 2019, I get the following message:
```
/usr/bin/env: ‘bash’: No such file or directory
```
I have confirmed that it works from vscode and command prompt.
I rewrote the `.git/hooks/pre-commit` to below a... | [
{
"content": "import logging\nimport os.path\nimport shlex\nimport shutil\nimport sys\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.repository import ... | [
{
"content": "import logging\nimport os.path\nimport shlex\nimport shutil\nimport sys\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.repository import ... | diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py
index fad6c6421..50c644320 100644
--- a/pre_commit/commands/install_uninstall.py
+++ b/pre_commit/commands/install_uninstall.py
@@ -82,6 +82,13 @@ def _install_hook_script(
before, rest = contents.split(TEMPLATE_ST... |
pyca__cryptography-1992 | 1.0 release
http://semver.org
> Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
Should we bump our version number all the way to 1.0 for the next release?
| [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\n__all__ = [\n \"__title__\", \"__summary__... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\n__all__ = [\n \"__title__\", \"__summary__... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 07d903c1a917..88ff19622f0e 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,7 +1,7 @@
Changelog
=========
-0.10 - `master`_
+1.0 - `master`_
~~~~~~~~~~~~~~~~
.. note:: This version is not yet released and is under active development.
diff --git a/docs/x509.rs... |
gratipay__gratipay.com-1390 | When I am logged in, everyone else's communities are the same
They have the same communities. For example, cookiecutter has 3 people in it, (me, audreyr, and sloria), but if I visit kennethreitz or mitsuhiko they also claim to be in it. So do the gittip project maintainers.
| [
{
"content": "import re\n\nimport gittip\nfrom postgres.orm import Model\n\n\nname_pattern = re.compile(r'^[A-Za-z0-9,._ -]+$')\n\ndef slugize(slug):\n \"\"\"Convert a string to a string for an URL.\n \"\"\"\n assert name_pattern.match(slug) is not None\n slug = slug.lower()\n for c in (' ', ',',... | [
{
"content": "import re\n\nimport gittip\nfrom postgres.orm import Model\n\n\nname_pattern = re.compile(r'^[A-Za-z0-9,._ -]+$')\n\ndef slugize(slug):\n \"\"\"Convert a string to a string for an URL.\n \"\"\"\n assert name_pattern.match(slug) is not None\n slug = slug.lower()\n for c in (' ', ',',... | diff --git a/gittip/models/community.py b/gittip/models/community.py
index 4c85a8ee2b..bca9d73248 100644
--- a/gittip/models/community.py
+++ b/gittip/models/community.py
@@ -29,20 +29,20 @@ def slug_to_name(slug):
return gittip.db.one(SQL, (slug,))
-def get_list_for(user):
+def get_list_for(username):
""... |
django-oscar__django-oscar-2152 | TypeError in the dashboard reports
When date range in dashboard reports does not have both start and end date, report form throws and exception:
```python
TypeError at /ru/dashboard/reports/
unorderable types: NoneType() > datetime.date()
```
| [
{
"content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom oscar.core.loading import get_class\nfrom oscar.forms.widgets import DatePickerInput\n\nGeneratorRepository = get_class('dashboard.reports.utils',\n 'GeneratorRepository')\n\n\n... | [
{
"content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom oscar.core.loading import get_class\nfrom oscar.forms.widgets import DatePickerInput\n\nGeneratorRepository = get_class('dashboard.reports.utils',\n 'GeneratorRepository')\n\n\n... | diff --git a/src/oscar/apps/dashboard/reports/forms.py b/src/oscar/apps/dashboard/reports/forms.py
index 086ad075952..a1f32957883 100644
--- a/src/oscar/apps/dashboard/reports/forms.py
+++ b/src/oscar/apps/dashboard/reports/forms.py
@@ -31,8 +31,9 @@ class ReportForm(forms.Form):
download = forms.BooleanField(labe... |
open-telemetry__opentelemetry-python-2796 | Metric units should be treated as opaque strings
**Describe your environment**
OpenTelemetry Python API and SDK versions 1.12.0rc1 running under Python 3.10.
**Steps to reproduce**
Create an instrument with a unit containing characters that are not alphanumeric.
```py
from opentelemetry import metrics
meter... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51135293b7f..22b479fc49c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,8 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.12.0rc1-0.31b0...HEA... |
projectmesa__mesa-373 | Allow fixed seed for replication
Figure out how to best handle running a model with a fixed seed, to ensure that it will produce the same result. and implement that.
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nThe model class for Mesa framework.\n\nCore Objects: Model\n\n\"\"\"\nimport datetime as dt\nimport random\n\n\nclass Model:\n \"\"\" Base class for models. \"\"\"\n def __init__(self, seed=None):\n \"\"\" Create a new model. Overload this method with ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nThe model class for Mesa framework.\n\nCore Objects: Model\n\n\"\"\"\nimport datetime as dt\nimport random\nimport numpy\n\n\nclass Model:\n \"\"\" Base class for models. \"\"\"\n def __init__(self, seed=None):\n \"\"\" Create a new model. Overload thi... | diff --git a/docs/best-practices.rst b/docs/best-practices.rst
index 34ade0cdb3b..205f375b010 100644
--- a/docs/best-practices.rst
+++ b/docs/best-practices.rst
@@ -32,3 +32,29 @@ an ``images`` directory.
The `Schelling
<https://github.com/projectmesa/mesa/tree/master/examples/Schelling>`_ model is
a good example of... |
enthought__chaco-634 | Dont use traitsui.api as tui
https://github.com/enthought/chaco/blob/3de7780561fa29e79c887432d3ce408ea82d1614/chaco/plugin/plot_editor.py makes use of the odd `import traitsui.api as tui` alias which needs to be updated and removed.
| [
{
"content": "from chaco.shell.scaly_plot import ScalyPlot\nfrom enable.component_editor import ComponentEditor\nfrom pyface.workbench.api import TraitsUIEditor\nfrom traits.api import Any, Enum, HasTraits, Property, Str\nfrom traitsui import api as tui\n\n\nclass PlotUI(HasTraits):\n \"\"\"Simple Traits UI ... | [
{
"content": "from chaco.shell.scaly_plot import ScalyPlot\nfrom enable.component_editor import ComponentEditor\nfrom pyface.workbench.api import TraitsUIEditor\nfrom traits.api import Any, Enum, HasTraits, Property, Str\nfrom traitsui.api import Item, View\n\n\nclass PlotUI(HasTraits):\n \"\"\"Simple Traits... | diff --git a/chaco/plugin/plot_editor.py b/chaco/plugin/plot_editor.py
index 727ab2030..71c3836c0 100644
--- a/chaco/plugin/plot_editor.py
+++ b/chaco/plugin/plot_editor.py
@@ -2,7 +2,7 @@
from enable.component_editor import ComponentEditor
from pyface.workbench.api import TraitsUIEditor
from traits.api import Any, ... |
litestar-org__litestar-1857 | StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/using.html#). But because ``directories`` is defined as ``DirectoryPath``, pydantic checks if the given directories ... | [
{
"content": "from __future__ import annotations\n\nimport pdb # noqa: T100\nfrom dataclasses import asdict, dataclass, field\nfrom inspect import getmro\nfrom sys import exc_info\nfrom traceback import format_exception\nfrom typing import TYPE_CHECKING, Any, Type, cast\n\nfrom litestar.connection import Reque... | [
{
"content": "from __future__ import annotations\n\nimport pdb # noqa: T100\nfrom dataclasses import asdict, dataclass, field\nfrom inspect import getmro\nfrom sys import exc_info\nfrom traceback import format_exception\nfrom typing import TYPE_CHECKING, Any, Type, cast\n\nfrom litestar.connection import Reque... | diff --git a/litestar/middleware/exceptions/middleware.py b/litestar/middleware/exceptions/middleware.py
index 3f1ca7b659..06560eed9b 100644
--- a/litestar/middleware/exceptions/middleware.py
+++ b/litestar/middleware/exceptions/middleware.py
@@ -109,9 +109,15 @@ def create_exception_response(exc: Exception) -> Respons... |
google__osv.dev-538 | Debian: overlapping versions
e.g. on https://osv.dev/vulnerability/DSA-5087-1
"2.1.27+dfsg-1+deb10u2" is the fixed version for Debian 10. However, Debian 11 includes "2.1.27+dfsg-1+deb10u2" in the list of affected versions.
We may need to do some filtering based on the +debXXuX" string here while enumerating for... | [
{
"content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/osv/ecosystems.py b/osv/ecosystems.py
index 1ea5a6a0785..68241d21fbd 100644
--- a/osv/ecosystems.py
+++ b/osv/ecosystems.py
@@ -342,10 +342,16 @@ def enumerate_versions(self, package, introduced, fixed, limits=None):
) from ex
response = json.loads(text_response)
- versions = [x['version']... |
nautobot__nautobot-176 | Editing an existing user token shows "create" buttons instead of "update"
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please start a
... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth import (\n login as auth_login,\n logout as auth_logout,\n update_session_auth_hash,\n)\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.contrib.auth.mo... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth import (\n login as auth_login,\n logout as auth_logout,\n update_session_auth_hash,\n)\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.contrib.auth.mo... | diff --git a/nautobot/users/views.py b/nautobot/users/views.py
index 7dd4c30f2a9..64cb7d44eb8 100644
--- a/nautobot/users/views.py
+++ b/nautobot/users/views.py
@@ -250,6 +250,7 @@ def get(self, request, pk=None):
"obj_type": token._meta.verbose_name,
"form": form,
"re... |
Mailu__Mailu-3100 | Webmail is not exempt from rate limiting
## Environment & Version
- `docker compose version`: _Docker Compose version 2.23.3_
- Version: mailu `2.0.34`
## Description
Trying to open my webmail (roundcube) the browser just showed an error due to _too many redirects_ - which were to `sso.php` of the webmailer.
... | [
{
"content": "from mailu import models, utils\nfrom mailu.internal import internal, nginx\nfrom flask import current_app as app\n\nimport flask\nimport flask_login\nimport base64\nimport sqlalchemy.exc\nimport urllib\n\n@internal.route(\"/auth/email\")\ndef nginx_authentication():\n \"\"\" Main authenticatio... | [
{
"content": "from mailu import models, utils\nfrom mailu.internal import internal, nginx\nfrom flask import current_app as app\n\nimport flask\nimport flask_login\nimport base64\nimport sqlalchemy.exc\nimport urllib\n\n@internal.route(\"/auth/email\")\ndef nginx_authentication():\n \"\"\" Main authenticatio... | diff --git a/core/admin/mailu/internal/views/auth.py b/core/admin/mailu/internal/views/auth.py
index 7de885b87..4aa314077 100644
--- a/core/admin/mailu/internal/views/auth.py
+++ b/core/admin/mailu/internal/views/auth.py
@@ -37,7 +37,7 @@ def nginx_authentication():
is_valid_user = False
username = response.h... |
ResonantGeoData__ResonantGeoData-706 | Celery Docker service runs in privileged mode
See https://github.com/ResonantGeoData/ResonantGeoData/blob/72b3d4085cc5700d0ad5556f31b7eb96ed2d3b8a/docker-compose.override.yml#L33
Can we use libfuse without running in a privileged mode?
| [
{
"content": "import contextlib\nfrom contextlib import contextmanager\nfrom functools import wraps\nimport hashlib\nimport io\nimport logging\nimport os\nfrom pathlib import Path\nimport shutil\nimport tempfile\nfrom typing import Any\nfrom urllib.error import HTTPError\nfrom urllib.parse import urlparse\nfrom... | [
{
"content": "import contextlib\nfrom contextlib import contextmanager\nfrom functools import wraps\nimport hashlib\nimport io\nimport logging\nimport os\nfrom pathlib import Path\nimport shutil\nimport tempfile\nfrom typing import Any\nfrom urllib.error import HTTPError\nfrom urllib.parse import urlparse\nfrom... | diff --git a/dev/fuse.sh b/dev/fuse.sh
index 3634f398b..5aa3b1846 100755
--- a/dev/fuse.sh
+++ b/dev/fuse.sh
@@ -1,6 +1,4 @@
#!/bin/sh
-mkdir -p /tmp/rgd/https
-python -m simple_httpfs /tmp/rgd/https
mkdir -p /tmp/rgd/http
python -m simple_httpfs /tmp/rgd/http
exec "$@"
diff --git a/django-rgd/rgd/utility.py b/djan... |
Pyomo__pyomo-2879 | Bug in `logical_to_disjunctive` transformation of `land`!
## Summary
Our transformation of logical and is incorrect--calling the auxiliary variable we introduce $z$, we only formulate $z \implies a \land b$, but the reverse implication is not enforced.
### Steps to reproduce the issue
<!-- Please include the c... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | diff --git a/pyomo/contrib/cp/tests/test_logical_to_disjunctive.py b/pyomo/contrib/cp/tests/test_logical_to_disjunctive.py
index b9c5b20ea48..9cd5b2556ca 100755
--- a/pyomo/contrib/cp/tests/test_logical_to_disjunctive.py
+++ b/pyomo/contrib/cp/tests/test_logical_to_disjunctive.py
@@ -18,6 +18,10 @@
LogicalToDisjun... |
ansible__ansible-39563 | Handlers from roles included with include_role module is not found if the playbook including the role also has handlers
<!---
Please do not report issues/requests related to Ansible modules here !!
Report them to the appropriate modules-core or modules-extras project:
- https://github.com/ansible/ansible-modules-cor... | [
{
"content": "# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible 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 Licen... | [
{
"content": "# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible 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 Licen... | diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py
index 1f8b67b617775a..9bc05c6b501c89 100644
--- a/lib/ansible/playbook/play.py
+++ b/lib/ansible/playbook/play.py
@@ -169,7 +169,11 @@ def _load_handlers(self, attr, ds):
Bare handlers outside of a block are given an implicit block.
... |
apache__airflow-16414 | Unable to use nested lists in DAG markdown documentation
**Apache Airflow version**: 2.0.2
**What happened**:
Tried to use the following markdown as a `doc_md` string passed to a DAG
```markdown
- Example
- Nested List
```
It was rendered in the web UI as a single list with no nesting or indentation... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | diff --git a/airflow/www/utils.py b/airflow/www/utils.py
index 9af91cc2da63f..4d549ce060105 100644
--- a/airflow/www/utils.py
+++ b/airflow/www/utils.py
@@ -16,6 +16,7 @@
# specific language governing permissions and limitations
# under the License.
import json
+import textwrap
import time
from urllib.parse import... |
angr__angr-3210 | stdin dependent symbolic execution is broken by gcc 11.2
<!--
*Disclaimer:
The angr suite is maintained by a small team of volunteers.
While we cannot guarantee any timeliness for fixes and enhancements, we will do our best.
For more real-time help with angr, from us and the community, join our [Slack.](https://ang... | [
{
"content": "\nimport logging\n\nimport angr\n\nl = logging.getLogger(name=__name__)\n\n######################################\n# __libc_start_main\n######################################\nclass __libc_start_main(angr.SimProcedure):\n #pylint:disable=arguments-differ,unused-argument,attribute-defined-outsid... | [
{
"content": "\nimport logging\n\nimport angr\n\nl = logging.getLogger(name=__name__)\n\n######################################\n# __libc_start_main\n######################################\nclass __libc_start_main(angr.SimProcedure):\n #pylint:disable=arguments-differ,unused-argument,attribute-defined-outsid... | diff --git a/angr/procedures/glibc/__libc_start_main.py b/angr/procedures/glibc/__libc_start_main.py
index d6f4403dd61..6fc2b3e2e25 100644
--- a/angr/procedures/glibc/__libc_start_main.py
+++ b/angr/procedures/glibc/__libc_start_main.py
@@ -134,8 +134,11 @@ def run(self, main, argc, argv, init, fini):
# TODO... |
encode__httpx-758 | DecodingError with zlib-compressed responses
Using the following minimal WSGI app:
```python
import zlib
def app(environ, start_response):
start_response("200 OK", [("Content-Encoding", "deflate")])
return [zlib.compress(b"hello world")]
```
This works fine in a web browser.
Requests is quite ha... | [
{
"content": "\"\"\"\nHandlers for Content-Encoding.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n\"\"\"\nimport codecs\nimport typing\nimport zlib\n\nimport chardet\n\nfrom .exceptions import DecodingError\n\ntry:\n import brotli\nexcept ImportError: # pragma: nocover... | [
{
"content": "\"\"\"\nHandlers for Content-Encoding.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n\"\"\"\nimport codecs\nimport typing\nimport zlib\n\nimport chardet\n\nfrom .exceptions import DecodingError\n\ntry:\n import brotli\nexcept ImportError: # pragma: nocover... | diff --git a/httpx/decoders.py b/httpx/decoders.py
index 75d980d3fa..454ec4a11a 100644
--- a/httpx/decoders.py
+++ b/httpx/decoders.py
@@ -45,12 +45,18 @@ class DeflateDecoder(Decoder):
"""
def __init__(self) -> None:
- self.decompressor = zlib.decompressobj(-zlib.MAX_WBITS)
+ self.first_attem... |
buildbot__buildbot-4096 | GitHubAuth: 'NoneType' object has no attribute '__getitem__'
Config:
```
c['www']['auth'] = util.GitHubAuth(os.environ['BUILDMASTER_CLIENT_ID'],
os.environ['BUILDMASTER_CLIENT_SECRET'],
apiVersion=4, getTeamsMembership=Tru... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/www/oauth2.py b/master/buildbot/www/oauth2.py
index 18078f597eb2..ec5963a48ee8 100644
--- a/master/buildbot/www/oauth2.py
+++ b/master/buildbot/www/oauth2.py
@@ -337,7 +337,8 @@ def getUserInfoFromOAuthClient_v4(self, c):
# identical with the inclusion of the organi... |
bokeh__bokeh-8492 | Typo in range_tool example
There is a small typo "range_rool" in the range_tool.py example. I would like to use this issue to create my first pull request and see how the process works.
| [
{
"content": "import numpy as np\n\nfrom bokeh.io import show\nfrom bokeh.layouts import column\nfrom bokeh.models import ColumnDataSource, RangeTool\nfrom bokeh.plotting import figure\nfrom bokeh.sampledata.stocks import AAPL\n\ndates = np.array(AAPL['date'], dtype=np.datetime64)\nsource = ColumnDataSource(dat... | [
{
"content": "import numpy as np\n\nfrom bokeh.io import show\nfrom bokeh.layouts import column\nfrom bokeh.models import ColumnDataSource, RangeTool\nfrom bokeh.plotting import figure\nfrom bokeh.sampledata.stocks import AAPL\n\ndates = np.array(AAPL['date'], dtype=np.datetime64)\nsource = ColumnDataSource(dat... | diff --git a/examples/plotting/file/range_tool.py b/examples/plotting/file/range_tool.py
index f4fbe439c4f..cfbe9564075 100644
--- a/examples/plotting/file/range_tool.py
+++ b/examples/plotting/file/range_tool.py
@@ -21,13 +21,13 @@
x_axis_type="datetime", y_axis_type=None,
tools="", t... |
oppia__oppia-4687 | Search input filter in collection editor might be catching valid names.
In the search bar in the collection editor, currently the regex allows "A-Za-z0-9-_ ". But when an exploration is selected from the dropdown it is displayed as "Name (explorationID)". On trying to make further edits to the search bar the bar is hig... | [
{
"content": "# coding: utf-8\n\n# Copyright 2015 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licens... | [
{
"content": "# coding: utf-8\n\n# Copyright 2015 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licens... | diff --git a/core/controllers/collection_editor.py b/core/controllers/collection_editor.py
index 396311f66db47..d2212c6a3e90e 100644
--- a/core/controllers/collection_editor.py
+++ b/core/controllers/collection_editor.py
@@ -16,6 +16,8 @@
"""Controllers for the collections editor."""
+import base64
+
from core.co... |
openfun__marsha-2238 | Properly clause websocket connection on video/webinar deletion
## Bug Report
**Problematic Behavior**
When a video/webinar is deleted, a websocket connection is still open. The dashboard is unmounted by react so it tries to close it but an error is thrown because on closing the connection, the weboscket tries to ... | [
{
"content": "\"\"\"Video consumer module\"\"\"\nfrom urllib.parse import parse_qs\n\nfrom django.db.models import Q\n\nfrom channels.db import database_sync_to_async\nfrom channels.generic.websocket import AsyncJsonWebsocketConsumer\n\nfrom marsha.core.models import (\n ADMINISTRATOR,\n INSTRUCTOR,\n ... | [
{
"content": "\"\"\"Video consumer module\"\"\"\nfrom urllib.parse import parse_qs\n\nfrom django.db.models import Q\n\nfrom channels.db import database_sync_to_async\nfrom channels.generic.websocket import AsyncJsonWebsocketConsumer\n\nfrom marsha.core.models import (\n ADMINISTRATOR,\n INSTRUCTOR,\n ... | diff --git a/src/backend/marsha/websocket/consumers/video.py b/src/backend/marsha/websocket/consumers/video.py
index 55dc219598..12f3aabe74 100644
--- a/src/backend/marsha/websocket/consumers/video.py
+++ b/src/backend/marsha/websocket/consumers/video.py
@@ -175,8 +175,12 @@ async def disconnect(self, code):
#... |
modin-project__modin-1146 | Update pandas version to 1.0.3
| [
{
"content": "from setuptools import setup, find_packages\nimport versioneer\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\ndask_deps = [\"dask>=2.1.0\", \"distributed>=2.3.2\"]\nray_deps = [\"ray==0.8.0\"]\n\nsetup(\n name=\"modin\",\n version=versioneer.get_version(),\n ... | [
{
"content": "from setuptools import setup, find_packages\nimport versioneer\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\ndask_deps = [\"dask>=2.1.0\", \"distributed>=2.3.2\"]\nray_deps = [\"ray==0.8.0\"]\n\nsetup(\n name=\"modin\",\n version=versioneer.get_version(),\n ... | diff --git a/df_test_requires.txt b/df_test_requires.txt
index 2e1143f1e3a..9edc1eeda39 100644
--- a/df_test_requires.txt
+++ b/df_test_requires.txt
@@ -1,4 +1,4 @@
-pandas==1.0.1
+pandas==1.0.3
numpy
psutil==5.6.6
pytest
diff --git a/modin/pandas/__init__.py b/modin/pandas/__init__.py
index 2684a9a0a2c..99dec6... |
chainer__chainer-1312 | `split_axis` doesn't support empty sections
This code causes a TypeError.
`functions.split_axis(x, [], 0)`
| [
{
"content": "import collections\n\nimport six\n\nimport chainer\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\nclass SplitAxis(function.Function):\n\n \"\"\"Function that splits multiple arrays along the specified axis.\"\"\"\n\n def __init__(self, indi... | [
{
"content": "import collections\n\nimport six\n\nimport chainer\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\nclass SplitAxis(function.Function):\n\n \"\"\"Function that splits multiple arrays along the specified axis.\"\"\"\n\n def __init__(self, indi... | diff --git a/chainer/functions/array/split_axis.py b/chainer/functions/array/split_axis.py
index d66fcd6d15a0..3b7c59e62127 100644
--- a/chainer/functions/array/split_axis.py
+++ b/chainer/functions/array/split_axis.py
@@ -23,9 +23,10 @@ def check_type_forward(self, in_types):
type_check.expect(in_types[0].ndi... |
qutebrowser__qutebrowser-1952 | No default is enforced for keyword-only arguments
With this:
``` python
@cmdutils.register(instance='command-dispatcher', scope='window',
hide=True)
@cmdutils.argument('filter_', choices=['id'])
def click_element(self, filter_: str, value, *,
target: usertypes.C... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/command.py
index ea1d0d46b91..ff4b2768a64 100644
--- a/qutebrowser/commands/command.py
+++ b/qutebrowser/commands/command.py
@@ -246,6 +246,11 @@ def _inspect_func(self):
continue
if self._inspect_special_param(par... |
qtile__qtile-2731 | Python help broken on instance of InteractiveCommandClient
```python
from libqtile.ipc import find_sockfile, Client
from libqtile.command_client import InteractiveCommandClient
from libqtile.command_interface import IPCCommandInterface
client =... | [
{
"content": "# Copyright (c) 2019 Sean Vig\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \\\"Software\\\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m... | [
{
"content": "# Copyright (c) 2019 Sean Vig\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \\\"Software\\\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m... | diff --git a/libqtile/command/client.py b/libqtile/command/client.py
index b54972c798..c260862527 100644
--- a/libqtile/command/client.py
+++ b/libqtile/command/client.py
@@ -206,6 +206,13 @@ def __getattr__(self, name: str) -> InteractiveCommandClient:
a command graph node (if the name is a valid child) o... |
explosion__spaCy-3267 | Unable to pickle a Token
I'm unable to serialize `Token`s. I think this used to work in an earlier version, since I get this exception from a friend's code that used to work fine. I suspect issue #2819 is a manifestation of the same problem, but with Spark wrapping the error message.
## How to reproduce the behavior... | [
{
"content": "# coding: utf8\nfrom __future__ import unicode_literals\n\nimport os\nimport warnings\nimport inspect\n\n\ndef add_codes(err_cls):\n \"\"\"Add error codes to string messages via class attribute names.\"\"\"\n\n class ErrorsWithCodes(object):\n def __getattribute__(self, code):\n ... | [
{
"content": "# coding: utf8\nfrom __future__ import unicode_literals\n\nimport os\nimport warnings\nimport inspect\n\n\ndef add_codes(err_cls):\n \"\"\"Add error codes to string messages via class attribute names.\"\"\"\n\n class ErrorsWithCodes(object):\n def __getattribute__(self, code):\n ... | diff --git a/spacy/errors.py b/spacy/errors.py
index 2b63b6cda1f..567e29cd07f 100644
--- a/spacy/errors.py
+++ b/spacy/errors.py
@@ -303,7 +303,11 @@ class Errors(object):
E109 = ("Model for component '{name}' not initialized. Did you forget to load "
"a model, or forget to call begin_training()?")
... |
facebookresearch__ParlAI-340 | Return type ambiguous when extracting image features
The return type of the extracted image features (if the features file is present or not) is different. If the file is present then it returns a numpy.ndarray type object otherwise it returns a torch.autograd.variable.Variable object.
( https://github.com/facebookres... | [
{
"content": "# All rights reserved.\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS file in the same directory.\n\nimport parlai.core.build_data as build_data\... | [
{
"content": "# All rights reserved.\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS file in the same directory.\n\nimport parlai.core.build_data as build_data\... | diff --git a/parlai/core/image_featurizers.py b/parlai/core/image_featurizers.py
index 2e0c92d08a1..acb4cb2e1c8 100644
--- a/parlai/core/image_featurizers.py
+++ b/parlai/core/image_featurizers.py
@@ -74,7 +74,6 @@ def cuda(self):
self.netCNN.cuda()
def save(self, feature, path):
- feature = feat... |
psf__black-4109 | Avoid removing whitespace for parenthesized walrus in subscripts
**Describe the bug**
Related to the new [`walrus_subscript`](https://github.com/psf/black/pull/3823) preview style and has previously been mentioned in [this comment](https://github.com/psf/black/pull/3823#issuecomment-1656883294)
Black removes whit... | [
{
"content": "import itertools\nimport math\nfrom dataclasses import dataclass, field\nfrom typing import (\n Callable,\n Dict,\n Iterator,\n List,\n Optional,\n Sequence,\n Tuple,\n TypeVar,\n Union,\n cast,\n)\n\nfrom black.brackets import COMMA_PRIORITY, DOT_PRIORITY, BracketTra... | [
{
"content": "import itertools\nimport math\nfrom dataclasses import dataclass, field\nfrom typing import (\n Callable,\n Dict,\n Iterator,\n List,\n Optional,\n Sequence,\n Tuple,\n TypeVar,\n Union,\n cast,\n)\n\nfrom black.brackets import COMMA_PRIORITY, DOT_PRIORITY, BracketTra... | diff --git a/CHANGES.md b/CHANGES.md
index 69fe34a5052..1c898622ff0 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -14,6 +14,9 @@
<!-- Changes that affect Black's preview style -->
+- Fix bug where spaces were not added around parenthesized walruses in subscripts,
+ unlike other binary operators (#4109)
+
### Confi... |
benoitc__gunicorn-865 | 'I/O operation on closed file' on SIGHUP
```
2014-08-25 13:51:42 [16744] [INFO] Handling signal: hup
2014-08-25 13:51:42 [16744] [INFO] Hang up: Master
2014-08-25 13:51:42 [7683] [INFO] Booting worker with pid: 7683
2014-08-25 13:51:42 [7684] [INFO] Booting worker with pid: 7684
2014-08-25 13:51:42 [7685] [INFO] Bootin... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport errno\nimport os\nimport random\nimport select\nimport signal\nimport sys\nimport time\nimport traceback\n\nfrom gunicorn.errors import HaltServer, AppImportE... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport errno\nimport os\nimport random\nimport select\nimport signal\nimport sys\nimport time\nimport traceback\n\nfrom gunicorn.errors import HaltServer, AppImportE... | diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py
index df2616f36..d8ce46398 100644
--- a/gunicorn/arbiter.py
+++ b/gunicorn/arbiter.py
@@ -305,7 +305,16 @@ def sleep(self):
"""
if self.WORKERS:
worker_values = list(self.WORKERS.values())
- oldest = min(w.tmp.last_update()... |
projectmesa__mesa-1115 | Fixing batch_run bug
There may be a more elegant fix but this just checks to make sure there are agent variables being collected. If not, it just stores the model data.
Fixes #1112
Apologies for not knowing how to just include the correct commit. :)
| [
{
"content": "\"\"\"\nBatchrunner\n===========\n\nA single class to manage a batch run or parameter sweep of a given model.\n\n\"\"\"\nimport copy\nimport itertools\nimport random\nfrom collections import OrderedDict\nfrom functools import partial\nfrom itertools import count, product\nfrom multiprocessing impo... | [
{
"content": "\"\"\"\nBatchrunner\n===========\n\nA single class to manage a batch run or parameter sweep of a given model.\n\n\"\"\"\nimport copy\nimport itertools\nimport random\nfrom collections import OrderedDict\nfrom functools import partial\nfrom itertools import count, product\nfrom multiprocessing impo... | diff --git a/mesa/batchrunner.py b/mesa/batchrunner.py
index e81e1321d98..c6293ea5fd1 100644
--- a/mesa/batchrunner.py
+++ b/mesa/batchrunner.py
@@ -172,10 +172,15 @@ def _model_run_func(
for step in steps:
model_data, all_agents_data = _collect_data(model, step)
- stepdata = [
- {**{"... |
easybuilders__easybuild-easyblocks-2055 | Incorrect download path for test data in wps.py
Hi,
As bugs this is pretty minor but in wps.py, the download path for geog_complete data set is currently
http://www2.mmm.ucar.edu/wrf/src/wps_files/geog_complete.tar.bz2
and it should be
https://www2.mmm.ucar.edu/wrf/src/wps_files/geog_complete.tar.gz
Tha... | [
{
"content": "##\n# Copyright 2009-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | [
{
"content": "##\n# Copyright 2009-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py
index da020b28e67..bb03be5c52d 100644
--- a/easybuild/easyblocks/w/wps.py
+++ b/easybuild/easyblocks/w/wps.py
@@ -68,7 +68,7 @@ def __init__(self, *args, **kwargs):
testdata_urls.append("http://www2.mmm.ucar.edu/wrf/src/wps_files/ge... |
mdn__kuma-6226 | SSR Sentry error reporting
At the time of writing, 7 times this has happened:
```
HTTPError: 500 Server Error: Internal Server Error for url: http://ssr/ssr/SPA
File "django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "django/core/handlers/base.py", line 187, in _ge... | [
{
"content": "\n\nimport json\nimport os\nfrom functools import lru_cache\n\nimport requests\nimport requests.exceptions\nfrom django.conf import settings\nfrom django_jinja import library\n\n\n@lru_cache()\ndef get_localization_data(locale):\n \"\"\"\n Read the frontend string catalog for the specified l... | [
{
"content": "\n\nimport json\nimport os\nfrom functools import lru_cache\n\nimport requests\nimport requests.exceptions\nfrom django.conf import settings\nfrom django_jinja import library\n\n\n@lru_cache()\ndef get_localization_data(locale):\n \"\"\"\n Read the frontend string catalog for the specified l... | diff --git a/kuma/javascript/ssr-server.js b/kuma/javascript/ssr-server.js
index 9b753962bc4..7f2be5e7381 100644
--- a/kuma/javascript/ssr-server.js
+++ b/kuma/javascript/ssr-server.js
@@ -15,25 +15,10 @@ if (process.env.NEW_RELIC_LICENSE_KEY && process.env.NEW_RELIC_APP_NAME) {
const express = require('express'); /... |
open-telemetry__opentelemetry-python-contrib-935 | Support for pymemcache 2.x and 3.x
The `pymemcache` integration is currently locked to version 1.x. Current version is ~=3.5.
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/0b9e96dae0bfcafa1e0b28dc695e3697fbcf2864/instrumentation/opentelemetry-instrumentation-pymemcache/src/opentelemetry/instrum... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b10bcdda47..6cd943faab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-kafka-python` Fix topic extraction
([#949](https://github.com/open-t... |
easybuilders__easybuild-easyblocks-1464 | CUDA stubs path missing
In order for the NVML and other libraries to be found, one needs to add
$CUDA_ROOT/lib64/stubs to $LIBRARY_PATH (not $LD_LIBRARY_PATH)
| [
{
"content": "##\n# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild\n#\n# Copyright:: Copyright 2012-2018 Cyprus Institute / CaSToRC, Uni.Lu, NTUA, Ghent University, Forschungszentrum Juelich GmbH\n# Authors:: George Tsouloupas <g.tsouloupas@cyi.ac.cy>, Fotis Georgatos <fotis... | [
{
"content": "##\n# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild\n#\n# Copyright:: Copyright 2012-2018 Cyprus Institute / CaSToRC, Uni.Lu, NTUA, Ghent University, Forschungszentrum Juelich GmbH\n# Authors:: George Tsouloupas <g.tsouloupas@cyi.ac.cy>, Fotis Georgatos <fotis... | diff --git a/easybuild/easyblocks/c/cuda.py b/easybuild/easyblocks/c/cuda.py
index 821c018a6dd..1a25369b41a 100644
--- a/easybuild/easyblocks/c/cuda.py
+++ b/easybuild/easyblocks/c/cuda.py
@@ -160,10 +160,14 @@ def make_module_req_guess(self):
if LooseVersion(self.version) >= LooseVersion('7'):
li... |
PlasmaPy__PlasmaPy-1465 | Drop support for Python 3.7
[NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html) suggests a community schedule for dropping support old versions of Python & NumPy. If we follow that schedule, we would drop support for Python 3.7 in PlasmaPy 0.8.0 which will likely be released in early 2022. Python 3.10 i... | [
{
"content": "\"\"\"\nWelcome to the `plasmapy` package, an open source community-developed Python\npackage for the plasma community. Documentation is available in the docstrings\nand online at https://docs.plasmapy.org (accessible also using the\n:func:`~plasmapy.online_help` function).\n\"\"\"\n__all__ = [\n... | [
{
"content": "\"\"\"\nWelcome to the `plasmapy` package, an open source community-developed Python\npackage for the plasma community. Documentation is available in the docstrings\nand online at https://docs.plasmapy.org (accessible also using the\n:func:`~plasmapy.online_help` function).\n\"\"\"\n__all__ = [\n... | diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index f972224b41..1205189ec9 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -52,15 +52,10 @@ jobs:
matrix:
include:
- - name: Python 3.7 with minimal dependencies
+ - name: Pytho... |
boto__boto-1812 | setup.py and cheeseshop releases do not list dependencies
The boto release packages do not enumerate dependencies in setup.py, so they are not installed if you easy_install or pip install boto. As it is, the cloudsearch module is not functional out-of-the-box due to missing dependencies after install (requires reque... | [
{
"content": "# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.\n# All Rights Reserved\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), t... | [
{
"content": "# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.\n# All Rights Reserved\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), t... | diff --git a/boto/cloudsearch/document.py b/boto/cloudsearch/document.py
index c799d70787..1f17026fbb 100644
--- a/boto/cloudsearch/document.py
+++ b/boto/cloudsearch/document.py
@@ -191,12 +191,9 @@ def commit(self):
session = requests.Session()
adapter = requests.adapters.HTTPAdapter(
p... |
ycm-core__ycmd-551 | ycmd should return valid JSON instead of empty HTML for 2 requests
/load_extra_conf_file and /ignore_extra_conf_file requests currently return an empty body
in case of success, which is not valid JSON. Instead, ycmd should return valid JSON body, for example just "true".
| [
{
"content": "# Copyright (C) 2013 Google Inc.\n#\n# This file is part of ycmd.\n#\n# ycmd 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, or\n# (at your option) any ... | [
{
"content": "# Copyright (C) 2013 Google Inc.\n#\n# This file is part of ycmd.\n#\n# ycmd 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, or\n# (at your option) any ... | diff --git a/ycmd/handlers.py b/ycmd/handlers.py
index 5b44285d76..ea5f67c892 100644
--- a/ycmd/handlers.py
+++ b/ycmd/handlers.py
@@ -188,6 +188,8 @@ def LoadExtraConfFile():
request_data = RequestWrap( request.json, validate = False )
extra_conf_store.Load( request_data[ 'filepath' ], force = True )
+ return... |
certbot__certbot-3011 | --dry-run on renew didn't work
Hello,
I just try to test the renew like this:
./letsencrypt-auto renew -v --dry-run
and the log says:
```
2016-05-12 21:03:20,463:DEBUG:certbot.main:Root logging level set at 20
2016-05-12 21:03:20,464:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2016-05-1... | [
{
"content": "\"\"\"Functionality for autorenewal and associated juggling of configurations\"\"\"\nfrom __future__ import print_function\nimport copy\nimport glob\nimport logging\nimport os\nimport traceback\n\nimport six\nimport zope.component\n\nimport OpenSSL\n\nfrom certbot import configuration\nfrom certbo... | [
{
"content": "\"\"\"Functionality for autorenewal and associated juggling of configurations\"\"\"\nfrom __future__ import print_function\nimport copy\nimport glob\nimport logging\nimport os\nimport traceback\n\nimport six\nimport zope.component\n\nimport OpenSSL\n\nfrom certbot import configuration\nfrom certbo... | diff --git a/certbot/renewal.py b/certbot/renewal.py
index 3682c50d5a0..b5b982972ad 100644
--- a/certbot/renewal.py
+++ b/certbot/renewal.py
@@ -301,7 +301,10 @@ def _renew_describe_results(config, renew_successes, renew_failures,
def renew_all_lineages(config):
"""Examine each lineage; renew if due and report re... |
beetbox__beets-1073 | Problem with non-ascii characters when using the discogs plugin and oauth
Just found this bug: when trying to import with the awesome discogs plugin I get the following error:
```
beet -v import /Volumes/Speicher/Music/iTunes/iTunes\ Media/Music/Nikolai\ Lugansky/Rachmaninov_\ Préludes,\ Moments\ Musicaux
user configu... | [
{
"content": "# This file is part of beets.\n# Copyright 2013, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | [
{
"content": "# This file is part of beets.\n# Copyright 2013, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py
index cea7a9b0ca..aaf9442a28 100644
--- a/beetsplug/discogs.py
+++ b/beetsplug/discogs.py
@@ -149,7 +149,7 @@ def get_albums(self, query):
# cause a query to return no results, even if they match the artist or
# album title. Use `re.UNICODE` fla... |
aws-cloudformation__cfn-lint-2765 | Invalid Property Resources/SESConfigurationSetDestination/Properties/EventDestination/SnsDestination
### CloudFormation Lint Version
0.77.8
### What operating system are you using?
Mac/Ubuntu
### Describe the bug
cfn-lint outputs:
Invalid Property Resources/SESConfigurationSetDestination/Properties/Ev... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport json\nimport logging\n\nimport boto3\n\nfrom cfnlint.helpers import REGIONS, get_url_content\nfrom cfnlint.maintenance import SPEC_REGIONS\n\n\"\"\"\n ... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport json\nimport logging\n\nimport boto3\n\nfrom cfnlint.helpers import REGIONS, get_url_content\nfrom cfnlint.maintenance import SPEC_REGIONS\n\n\"\"\"\n ... | diff --git a/scripts/update_specs_services_from_ssm.py b/scripts/update_specs_services_from_ssm.py
index 97a1038a0e..67476cda64 100755
--- a/scripts/update_specs_services_from_ssm.py
+++ b/scripts/update_specs_services_from_ssm.py
@@ -204,12 +204,12 @@ def add_spec_missing_services_patch(region, services):
... |
sunpy__sunpy-6786 | Add documentation explaining why/how to switch the Astropy ephemeris
Astropy's built-in ephemeris is not as accurate as a JPL ephemeris (e.g., DE430), although the discrepancies are appreciable only when querying non-Earth planets. Our documentation should explain how to switch the Astropy ephemeris (via `astropy.coor... | [
{
"content": "\"\"\"\nEphemeris calculations using SunPy coordinate frames\n\"\"\"\nimport numpy as np\nfrom packaging import version\n\nimport astropy.units as u\nfrom astropy.constants import c as speed_of_light\nfrom astropy.coordinates import (\n ICRS,\n HeliocentricEclipticIAU76,\n SkyCoord,\n ... | [
{
"content": "\"\"\"\nEphemeris calculations using SunPy coordinate frames\n\"\"\"\nimport numpy as np\nfrom packaging import version\n\nimport astropy.units as u\nfrom astropy.constants import c as speed_of_light\nfrom astropy.coordinates import (\n ICRS,\n HeliocentricEclipticIAU76,\n SkyCoord,\n ... | diff --git a/sunpy/coordinates/ephemeris.py b/sunpy/coordinates/ephemeris.py
index bb5c1f2f080..a539904b741 100644
--- a/sunpy/coordinates/ephemeris.py
+++ b/sunpy/coordinates/ephemeris.py
@@ -63,6 +63,11 @@ def get_body_heliographic_stonyhurst(body, time='now', observer=None, *, include
angular direction relative... |
readthedocs__readthedocs.org-4801 | Locally hosted RTD instance doesn't allow git file:/// URLs
## Details
I installed a local RTD instance according to the Installation guide and imported test project. Now, I want to import my git project manually,
## Expected Result
I expected that the instance should accept all valid Git URLs.
## Actual Resul... | [
{
"content": "\"\"\"Validators for projects app.\"\"\"\n\n# From https://github.com/django/django/pull/3477/files\nfrom __future__ import absolute_import\nimport re\n\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.utils.deconstruct import deconstructible\nfrom... | [
{
"content": "\"\"\"Validators for projects app.\"\"\"\n\n# From https://github.com/django/django/pull/3477/files\nfrom __future__ import absolute_import\nimport re\n\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.utils.deconstruct import deconstructible\nfrom... | diff --git a/.coveragerc b/.coveragerc
index fcb3640e491..b934a606cd2 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -17,3 +17,4 @@ exclude_lines =
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
+ if getattr(settings, 'DEBUG'):
diff --git a/readthedocs/projects/validators.py b/re... |
pytorch__pytorch-3113 | print(torch.DoubleTensor(1)) # ZeroDivisionError: float division by zero
on print(torch.DoubleTensor(1)) I got ZeroDivisionError: float division by zero
but torch.DoubleTensor(0)) or torch.DoubleTensor(2)) work just fine.
I work in Jupyter notebook pytorch 0.1.12
| [
{
"content": "import math\nimport torch\nfrom functools import reduce\nfrom ._utils import _range\n\n\nclass __PrinterOptions(object):\n precision = 4\n threshold = 1000\n edgeitems = 3\n linewidth = 80\n\n\nPRINT_OPTS = __PrinterOptions()\nSCALE_FORMAT = '{:.5e} *\\n'\n\n\n# We could use **kwargs, ... | [
{
"content": "import math\nimport torch\nfrom functools import reduce\nfrom ._utils import _range\nfrom sys import float_info\n\n\n__MIN_LOG_SCALE = math.ceil(math.log(float_info.min * float_info.epsilon, 10))\n\n\nclass __PrinterOptions(object):\n precision = 4\n threshold = 1000\n edgeitems = 3\n ... | diff --git a/test/test_torch.py b/test/test_torch.py
index 5297e8543c7de9..e62a4c5d72b85d 100644
--- a/test/test_torch.py
+++ b/test/test_torch.py
@@ -4049,6 +4049,10 @@ def test_print(self):
x.__repr__()
str(x)
+ x = torch.DoubleTensor([1e-324, 1e-323, 1e-322, 1e307, 1e308, 1e309])
+ ... |
PennyLaneAI__pennylane-5407 | [Bug] `PauliSentence.to_mat(wire_order)` cannot handle Identities with wires
```python
PauliSentence({PauliWord({}): 1.}).to_mat([0, 1])
```
```pycon
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[4]... | [
{
"content": "# Copyright 2018-2022 Xanadu Quantum Technologies 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# Unle... | [
{
"content": "# Copyright 2018-2022 Xanadu Quantum Technologies 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# Unle... | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index 0759bc717b7..2012081bbcb 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -264,9 +264,13 @@
* We no longer perform unwanted dtype promotion in the `pauli_rep` of `SProd` instances when using tensorflow.
... |
Kinto__kinto-944 | History entry fields consistency
We reached a situation where we have `record_id` different than `data.target.id`. This should not be possible oO
```json
{
"action": "update",
"collection_id": "gfx",
"date": "2016-11-21T10:09:00.225241",
"id": "ae7e6831-11... | [
{
"content": "from kinto.core.utils import instance_uri\nfrom datetime import datetime\n\n\ndef on_resource_changed(event):\n \"\"\"\n Everytime an object is created/changed/deleted, we create an entry in the\n ``history`` resource. The entries are served as read-only in the\n :mod:`kinto.plugins.hi... | [
{
"content": "from kinto.core.utils import instance_uri\nfrom datetime import datetime\n\n\ndef on_resource_changed(event):\n \"\"\"\n Everytime an object is created/changed/deleted, we create an entry in the\n ``history`` resource. The entries are served as read-only in the\n :mod:`kinto.plugins.hi... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index fdef59c7a..9592589b6 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -14,6 +14,8 @@ This document describes changes between each past release.
- Permissions are now correctly removed from permission backend when a parent
object is deleted (fixes #898)
+- Fix ``re... |
pantsbuild__pants-20253 | Shading throws `NoSuchFileException` given a `deploy_jar` in a subdirectory
**Describe the bug**
Given a `deploy_jar` target in a subdirectory shading process throws an exception `NoSuchFileException`
**Pants version**
2.18.0
**OS**
Ubuntu 22.04
**Additional info**
`helloworld/HelloWorld.java`:
```java
... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nimport logging\nfrom dataclasses import dataclass\nfrom pathlib import PurePath\n\nfrom pants.core.goals.package import (\n BuiltPackage,\n BuiltPackageArtif... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nimport logging\nfrom dataclasses import dataclass\nfrom pathlib import PurePath\n\nfrom pants.core.goals.package import (\n BuiltPackage,\n BuiltPackageArtif... | diff --git a/src/python/pants/jvm/package/deploy_jar.py b/src/python/pants/jvm/package/deploy_jar.py
index 9574bc25246..4dfbe6ef56e 100644
--- a/src/python/pants/jvm/package/deploy_jar.py
+++ b/src/python/pants/jvm/package/deploy_jar.py
@@ -155,6 +155,8 @@ async def package_deploy_jar(
),
)
+ ... |
internetarchive__openlibrary-4681 | Internal Server Error attempting to merge authors with Unicode names
Attempting to merge the more than one dozen duplicate records for Martín de Riquer, conde de Casa Dávalos results in an Internal Server Error and the merge doesn't happen.
### Evidence / Screenshot (if possible)
, `self.toolbar.get_or_create_menu('page')` can result in the menu's `verbose_name` being `None` if that call is invoked before a call that includes the menu... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom cms.constants import LEFT, REFRESH_PAGE\nfrom cms.models import UserSettings, Placeholder\nfrom cms.toolbar.items import Menu, ToolbarAPIMixin, ButtonList\nfrom cms.toolbar_pool import toolbar_pool\nfrom cms.utils import get_language_from_request\nfrom cms.utils.i18n ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom cms.constants import LEFT, REFRESH_PAGE\nfrom cms.models import UserSettings, Placeholder\nfrom cms.toolbar.items import Menu, ToolbarAPIMixin, ButtonList\nfrom cms.toolbar_pool import toolbar_pool\nfrom cms.utils import get_language_from_request\nfrom cms.utils.i18n ... | diff --git a/cms/tests/toolbar.py b/cms/tests/toolbar.py
index 4868c0a0bd2..54702780d27 100644
--- a/cms/tests/toolbar.py
+++ b/cms/tests/toolbar.py
@@ -290,6 +290,18 @@ def test_get_alphabetical_insert_position(self):
beta_position = admin_menu.get_alphabetical_insert_position('menu-beta', SubMenu)
s... |
apache__airflow-1224 | Warning e-mails are sent without the Date header
The warning e-mails don't have the "Date" header.
| [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport sys\nfrom builtins import str, input, object\nfrom past.builtins import basestring\nfrom copy import copy\nfrom datetime import datetime... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport sys\nfrom builtins import str, input, object\nfrom past.builtins import basestring\nfrom copy import copy\nfrom datetime import datetime... | diff --git a/airflow/utils.py b/airflow/utils.py
index 6e42a044cc047..bdbb7ba072d4c 100644
--- a/airflow/utils.py
+++ b/airflow/utils.py
@@ -12,6 +12,7 @@
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
+from email.Utils import fo... |
mitmproxy__mitmproxy-605 | Got an error when using 'P' to copy
```
Traceback (most recent call last):?
File "/home/yujie/envwanhuijie/local/lib/python2.7/site-packages/libmproxy/console/__init__.py", line 457, in run
self.loop.run(... | [
{
"content": "from __future__ import absolute_import\n\nimport urwid\nimport urwid.util\nimport os\n\nfrom .. import utils\nfrom ..protocol.http import CONTENT_MISSING, decoded\nfrom . import signals\nimport netlib.utils\n\ntry:\n import pyperclip\nexcept:\n pyperclip = False\n\n\nVIEW_FLOW_REQUEST = 0\nV... | [
{
"content": "from __future__ import absolute_import\n\nimport urwid\nimport urwid.util\nimport os\n\nfrom .. import utils\nfrom ..protocol.http import CONTENT_MISSING, decoded\nfrom . import signals\nimport netlib.utils\n\ntry:\n import pyperclip\nexcept:\n pyperclip = False\n\n\nVIEW_FLOW_REQUEST = 0\nV... | diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py
index 3180170d5b..683faf8e81 100644
--- a/libmproxy/console/common.py
+++ b/libmproxy/console/common.py
@@ -287,12 +287,12 @@ def copy_flow(part, scope, flow, master, state):
try:
master.add_event(str(len(data)))
pyperclip.cop... |
TOMToolkit__tom_base-580 | not having a LASAIR token in Settings.py breaks
Fail more gracefully if no LASAIR token in settings.py
| [
{
"content": "import requests\nfrom urllib.parse import urlencode\n\nfrom crispy_forms.layout import HTML, Layout, Div, Fieldset, Row, Column\nfrom django import forms\nfrom django.conf import settings\n\nfrom tom_alerts.alerts import GenericQueryForm, GenericAlert, GenericBroker\nfrom tom_targets.models import... | [
{
"content": "import requests\nfrom urllib.parse import urlencode\n\nfrom crispy_forms.layout import HTML, Layout, Div, Fieldset, Row, Column\nfrom django import forms\nfrom django.conf import settings\n\nfrom tom_alerts.alerts import GenericQueryForm, GenericAlert, GenericBroker\nfrom tom_targets.models import... | diff --git a/tom_alerts/brokers/lasair.py b/tom_alerts/brokers/lasair.py
index 5404086f6..239c03205 100644
--- a/tom_alerts/brokers/lasair.py
+++ b/tom_alerts/brokers/lasair.py
@@ -90,10 +90,15 @@ class LasairBroker(GenericBroker):
form = LasairBrokerForm
def fetch_alerts(self, parameters):
- token =... |
crytic__slither-161 | Error when parsing type which refers to an aliased import
The following contracts will cause slither to error:
Main.sol:
```
import {Dependency as x} from "./Dependency.sol";
contract Main {
x y;
}
```
Dependency.sol:
```
contract Dependency {
uint y;
}
```
Error:
```
ERROR:TypeParsing:T... | [
{
"content": "import logging\n\nfrom slither.core.solidity_types.elementary_type import ElementaryType, ElementaryTypeName\nfrom slither.core.solidity_types.user_defined_type import UserDefinedType\nfrom slither.core.solidity_types.array_type import ArrayType\nfrom slither.core.solidity_types.mapping_type impor... | [
{
"content": "import logging\n\nfrom slither.core.solidity_types.elementary_type import ElementaryType, ElementaryTypeName\nfrom slither.core.solidity_types.user_defined_type import UserDefinedType\nfrom slither.core.solidity_types.array_type import ArrayType\nfrom slither.core.solidity_types.mapping_type impor... | diff --git a/slither/solc_parsing/solidity_types/type_parsing.py b/slither/solc_parsing/solidity_types/type_parsing.py
index 1a26612ddf..2b5057dda9 100644
--- a/slither/solc_parsing/solidity_types/type_parsing.py
+++ b/slither/solc_parsing/solidity_types/type_parsing.py
@@ -160,7 +160,10 @@ def parse_type(t, caller_con... |
encode__django-rest-framework-5878 | docs: JSON input to JSONField is not parsed correctly
## Checklist
- [x] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage question. (Those shou... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\ninspectors.py # Per-endpoint view introspection\n\nSee schemas.__init__.py for package overview.\n\"\"\"\nimport re\nimport warnings\nfrom collections import OrderedDict\n\nfrom django.db import models\nfrom django.utils.encoding import force_text, smart_text\nfr... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\ninspectors.py # Per-endpoint view introspection\n\nSee schemas.__init__.py for package overview.\n\"\"\"\nimport re\nimport warnings\nfrom collections import OrderedDict\n\nfrom django.db import models\nfrom django.utils.encoding import force_text, smart_text\nfr... | diff --git a/rest_framework/schemas/inspectors.py b/rest_framework/schemas/inspectors.py
index 171b88b0b3..89a1fc93a5 100644
--- a/rest_framework/schemas/inspectors.py
+++ b/rest_framework/schemas/inspectors.py
@@ -95,6 +95,8 @@ def field_to_schema(field):
description=description,
format='date... |
scalableminds__webknossos-libs-450 | BoundingBox.contains should allow float arguments
In a recent PR `BoundingBox.contains` was changed to only accept `Vec3IntLike`. However, it makes total sense to ask whether a float position is contained in a bounding box, so the method should be reverted to accept float positions again.
For further context, see in... | [
{
"content": "import json\nimport re\nfrom typing import (\n Dict,\n Generator,\n Iterable,\n List,\n NamedTuple,\n Optional,\n Tuple,\n Union,\n cast,\n)\n\nimport attr\nimport numpy as np\n\nfrom .mag import Mag\nfrom .vec3_int import Vec3Int, Vec3IntLike\n\n\nclass BoundingBoxNamed... | [
{
"content": "import json\nimport re\nfrom typing import (\n Dict,\n Generator,\n Iterable,\n List,\n NamedTuple,\n Optional,\n Tuple,\n Union,\n cast,\n)\n\nimport attr\nimport numpy as np\n\nfrom .mag import Mag\nfrom .vec3_int import Vec3Int, Vec3IntLike\n\n\nclass BoundingBoxNamed... | diff --git a/webknossos/Changelog.md b/webknossos/Changelog.md
index cd167ac31..e97f7ede1 100644
--- a/webknossos/Changelog.md
+++ b/webknossos/Changelog.md
@@ -15,6 +15,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
### Changed
- The `Vec3Int` constructor now asserts that its c... |
nipy__nipype-2511 | TraitError: The 'file_name' trait of a PolyDataWriter instance must be a unicode string ...
### Summary
trying to update debian package for 1.0.1-97-g803982c21 . not yet sure if that is nohow specifics of my system (will try now in a clean chroot etc) with python-traits 4.6.0-1+b1. Note that issue subject reflect... | [
{
"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\nfrom __future__ import (print_function, division, unicode_lite... | [
{
"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\nfrom __future__ import (print_function, division, unicode_lite... | diff --git a/.zenodo.json b/.zenodo.json
index 29e7f047ac..da7c45dbda 100644
--- a/.zenodo.json
+++ b/.zenodo.json
@@ -20,16 +20,16 @@
"name": "Ellis, David Gage",
"orcid": "0000-0002-3718-6836"
},
- {
- "affiliation": "The Laboratory for Investigative Neurophysiology (The LINE), Department o... |
saleor__saleor-1471 | Refactor displaying success messages in the dashboard
The code responsible for displaying success messages in the dashboard lives in [_messages.html](https://github.com/mirumee/saleor/blob/master/templates/dashboard/includes/_messages.html) template and mixes Django's templating language with JS which isn't very elegan... | [
{
"content": "from urllib.parse import urlencode\n\nfrom django import forms\nfrom django.template import Library\nfrom django_filters.fields import RangeField\nfrom versatileimagefield.widgets import VersatileImagePPOIClickWidget\n\nfrom ...product.utils import get_margin_for_variant, get_variant_costs_data\nf... | [
{
"content": "from __future__ import unicode_literals\nfrom json import dumps\nfrom urllib.parse import urlencode\n\nfrom django import forms\nfrom django.template import Library\nfrom django_filters.fields import RangeField\nfrom versatileimagefield.widgets import VersatileImagePPOIClickWidget\n\nfrom ...produ... | diff --git a/saleor/dashboard/templatetags/utils.py b/saleor/dashboard/templatetags/utils.py
index f9ab1c1583c..d717d0b3b1a 100644
--- a/saleor/dashboard/templatetags/utils.py
+++ b/saleor/dashboard/templatetags/utils.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+from json import dumps
from urllib.parse... |
rasterio__rasterio-1105 | Remove dataset's ul method
It's been deprecated since June 2016 (0.36).
| [
{
"content": "\"\"\"Classes capable of reading and writing datasets\n\nInstances of these classes are called dataset objects.\n\"\"\"\n\n\nimport logging\nimport math\nimport warnings\n\nfrom rasterio._base import (\n get_dataset_driver, driver_can_create, driver_can_create_copy)\nfrom rasterio._io import (\... | [
{
"content": "\"\"\"Classes capable of reading and writing datasets\n\nInstances of these classes are called dataset objects.\n\"\"\"\n\n\nimport logging\nimport math\nimport warnings\n\nfrom rasterio._base import (\n get_dataset_driver, driver_can_create, driver_can_create_copy)\nfrom rasterio._io import (\... | diff --git a/CHANGES.txt b/CHANGES.txt
index e0841e28c..179798461 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,7 +18,8 @@ Breaking changes:
Window entirely to the left and above the dataset's row and column origin.
Passing a ``boundless`` keyword argument to this function will result in a
warning.
-
+- T... |
django-cms__django-cms-3036 | language_fallback in placeholder conf can make plugins disappear (edit and live mode)
when having a placeholder with "language_fallback", no more plugins at all are shown in draft mode (neither in "edit" nor in "structure", and neither for plugins with no fallback). simply removing the fallback (as below) makes things ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom collections import defaultdict\nfrom itertools import groupby\nimport operator\nimport warnings\n\nfrom django.contrib.sites.models import Site, SITE_CACHE\nfrom django.shortcuts import get_object_or_404\nfrom django.template import NodeList, VariableNode, TemplateSyn... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom collections import defaultdict\nfrom itertools import groupby\nimport operator\nimport warnings\n\nfrom django.contrib.sites.models import Site, SITE_CACHE\nfrom django.shortcuts import get_object_or_404\nfrom django.template import NodeList, VariableNode, TemplateSyn... | diff --git a/cms/tests/placeholder.py b/cms/tests/placeholder.py
index 857f99d1e87..b8f8e396891 100644
--- a/cms/tests/placeholder.py
+++ b/cms/tests/placeholder.py
@@ -44,7 +44,7 @@
from cms.test_utils.util.mock import AttributeObject
from cms.utils.compat.dj import force_unicode
from cms.utils.placeholder import P... |
DataDog__dd-trace-py-2412 | Lost visibility into bulk Elasticsearch operations with 0.48.0
With upgrade to ddtrace 0.48.0, we appear to have lost visibility into Elasticsearch bulk operations.
Here's the view in APM for our indexer application that writes to ES. We seem to have lost all visibility. The first screenshot shows that APM istelf is... | [
{
"content": "\"\"\"Patch libraries to be automatically instrumented.\n\nIt can monkey patch supported standard libraries and third party modules.\nA patched module will automatically report spans with its default configuration.\n\nA library instrumentation can be configured (for instance, to report as another ... | [
{
"content": "\"\"\"Patch libraries to be automatically instrumented.\n\nIt can monkey patch supported standard libraries and third party modules.\nA patched module will automatically report spans with its default configuration.\n\nA library instrumentation can be configured (for instance, to report as another ... | diff --git a/ddtrace/monkey.py b/ddtrace/monkey.py
index c0bc91b4684..fb906de58d0 100644
--- a/ddtrace/monkey.py
+++ b/ddtrace/monkey.py
@@ -178,7 +178,8 @@ def patch(raise_errors=True, **patch_modules):
for m in modules_to_poi:
# If the module has already been imported then patch immediat... |
biopython__biopython-1468 | SeqIO docstring lists "abif" as possible format
Biopython v1.71.dev0
The docstring for SeqIO.parse lists `abif` as a possible format, but it really means to say `abi` and `abi-trim`.
| [
{
"content": "# Copyright 2006-2017 by Peter Cock. All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n#\n# Nice link:\n# http://www.ebi.ac.uk/help/formats_frame.html\n\n... | [
{
"content": "# Copyright 2006-2017 by Peter Cock. All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n#\n# Nice link:\n# http://www.ebi.ac.uk/help/formats_frame.html\n\n... | diff --git a/Bio/SeqIO/__init__.py b/Bio/SeqIO/__init__.py
index 7db2e08835c..03469219053 100644
--- a/Bio/SeqIO/__init__.py
+++ b/Bio/SeqIO/__init__.py
@@ -269,7 +269,8 @@
When specifying the file format, use lowercase strings. The same format
names are also used in Bio.AlignIO and include the following:
- - a... |
ansible__ansible-modules-core-5552 | cloudformation zero length field name in format when creating a stack
<!--- Verify first that your issue/request is not already reported in GitHub -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
- Bug Report
##### COMPONENT NAME
<!--- Name of the plugin/module/task -->
cloudformation
#... | [
{
"content": "#!/usr/bin/python\n# This file is part of Ansible\n#\n# Ansible 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, or\n# (at your option) any later version... | [
{
"content": "#!/usr/bin/python\n# This file is part of Ansible\n#\n# Ansible 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, or\n# (at your option) any later version... | diff --git a/cloud/amazon/cloudformation.py b/cloud/amazon/cloudformation.py
index 0d02ad70cb3..724bf391d70 100644
--- a/cloud/amazon/cloudformation.py
+++ b/cloud/amazon/cloudformation.py
@@ -257,11 +257,11 @@ def get_stack_events(cfn, stack_name):
return ret
for e in events.get('StackEvents', []):
- ... |
learningequality__kolibri-7770 | Exit link at Select Content Page should be different if arriving from the New Channel Version Page
In #7387, we redirect users to the Select Content (from Studio) Page (SCP) after the user confirms they want to update a channel.
With this new navigation, the immersive toolbar's back button at the SCP (possibly unexp... | [
{
"content": "import logging\nimport ntpath\nimport os\nimport shutil\nfrom functools import partial\nfrom tempfile import NamedTemporaryFile\n\nimport requests\nfrom django.apps.registry import AppRegistryNotReady\nfrom django.core.files.uploadedfile import InMemoryUploadedFile\nfrom django.core.files.uploaded... | [
{
"content": "import logging\nimport ntpath\nimport os\nimport shutil\nfrom functools import partial\nfrom tempfile import NamedTemporaryFile\n\nimport requests\nfrom django.apps.registry import AppRegistryNotReady\nfrom django.core.files.uploadedfile import InMemoryUploadedFile\nfrom django.core.files.uploaded... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09297014420..c41565ca3ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
List of the most important changes for each release.
+## 0.14.6
+
+### Fixed
+
+* #7725 On Firefox, text in Khmer, Hindi, Marathi, and other languages did not render properly.
+* #7... |
DistrictDataLabs__yellowbrick-1181 | please specify the same number of colors as labels!
**Describe the bug**
Dear Yellowbrick team,
When I am trying to repeat a code from examples for Stacked Feature Importances (https://www.scikit-yb.org/en/latest/api/model_selection/importances.html?highlight=feature_importance#yellowbrick.model_selection.importanc... | [
{
"content": "# yellowbrick.model_selection.importances\n# Feature importance visualizer\n#\n# Author: Benjamin Bengfort\n# Author: Rebecca Bilbro\n# Created: Fri Mar 02 15:21:36 2018 -0500\n#\n# Copyright (C) 2018 The scikit-yb developers\n# For license information, see LICENSE.txt\n#\n# ID: importances.py [... | [
{
"content": "# yellowbrick.model_selection.importances\n# Feature importance visualizer\n#\n# Author: Benjamin Bengfort\n# Author: Rebecca Bilbro\n# Created: Fri Mar 02 15:21:36 2018 -0500\n#\n# Copyright (C) 2018 The scikit-yb developers\n# For license information, see LICENSE.txt\n#\n# ID: importances.py [... | diff --git a/tests/test_model_selection/test_importances.py b/tests/test_model_selection/test_importances.py
index 8db2d7a5a..c0521aac7 100644
--- a/tests/test_model_selection/test_importances.py
+++ b/tests/test_model_selection/test_importances.py
@@ -240,6 +240,22 @@ def test_multi_coefs_stacked(self):
# App... |
pyjanitor-devs__pyjanitor-1014 | [BUG] Extend `fill_empty`'s `column_names` type range
# Brief Description
<!-- Please provide a brief description of your bug. Do NOT paste the stack trace here. -->
https://github.com/pyjanitor-devs/pyjanitor/blob/3fab49e8c89f1a5e4ca7a6e4fdbbe8e2f7b89c66/janitor/functions/fill.py#L148-L152
Quickly fix this, c... | [
{
"content": "from enum import Enum\nfrom operator import methodcaller\nfrom typing import Hashable, Iterable, Union\n\nimport pandas as pd\nimport pandas_flavor as pf\nfrom janitor.utils import check, check_column, deprecated_alias\nfrom multipledispatch import dispatch\n\n\n@pf.register_dataframe_method\ndef ... | [
{
"content": "from collections.abc import Iterable as abcIterable\nfrom enum import Enum\nfrom operator import methodcaller\nfrom typing import Hashable, Iterable, Union\n\nimport pandas as pd\nimport pandas_flavor as pf\nfrom janitor.utils import check, check_column, deprecated_alias\nfrom multipledispatch imp... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb3e1ee63..64b570710 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
- [ENH] Add `xlsx_table`, for reading tables from an Excel sheet. @samukweku
- [ENH] minor improvements for conditional_join; equality only joins are no longer supported; there has to... |
AUTOMATIC1111__stable-diffusion-webui-13797 | [Bug]: Prompt Scheduling Code Comment is Wrong
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/5ef669de080814067961f28357256e8fe27544f4/modules/prompt_parser.py#L8
... | [
{
"content": "from __future__ import annotations\r\n\r\nimport re\r\nfrom collections import namedtuple\r\nimport lark\r\n\r\n# a prompt like this: \"fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]\"\r\n# will be r... | [
{
"content": "from __future__ import annotations\r\n\r\nimport re\r\nfrom collections import namedtuple\r\nfrom typing import List\r\nimport lark\r\n\r\n# a prompt like this: \"fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][: in background:0.25] [shoddy:mas... | diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py
index 334efeef317..86b7acb50a8 100644
--- a/modules/prompt_parser.py
+++ b/modules/prompt_parser.py
@@ -5,7 +5,7 @@
from typing import List
import lark
-# a prompt like this: "fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tr... |
huggingface__diffusers-942 | MPS crash when using LMSDiscreteScheduler
### Describe the bug
If you run the following code using `LMSDiscreteScheduler` a crash occurs under Apple Silicon/MPS:
```
import torch
from diffusers import AutoencoderKL, UNet2DConditionModel, LMSDiscreteScheduler
from PIL import Image
from torchvision import transfo... | [
{
"content": "# Copyright 2022 Katherine Crowson and The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/l... | [
{
"content": "# Copyright 2022 Katherine Crowson and The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/l... | diff --git a/src/diffusers/schedulers/scheduling_lms_discrete.py b/src/diffusers/schedulers/scheduling_lms_discrete.py
index 768413e9e6a3..8b371703ec84 100644
--- a/src/diffusers/schedulers/scheduling_lms_discrete.py
+++ b/src/diffusers/schedulers/scheduling_lms_discrete.py
@@ -252,7 +252,8 @@ def add_noise(
) -> ... |
statsmodels__statsmodels-5397 | 'medcouple' function in stats.stattools may calculate a wrong answer?
The 'medcouple' function at stats.stattools.
I refered to this paper to calculate the medcouple value:
> [1] Brys, G, M Hubert, and A Struyf 2004.A Robust Measure of Skewness. Journal of Computational and Graphical Statistics 13(4): 996–1017.
... | [
{
"content": "\"\"\"\nStatistical tests to be used in conjunction with the models\n\nNotes\n-----\nThese functions haven't been formally tested.\n\"\"\"\n\nfrom scipy import stats\nimport numpy as np\nfrom statsmodels.tools.sm_exceptions import ValueWarning\n\n\n# TODO: these are pretty straightforward but they... | [
{
"content": "\"\"\"\nStatistical tests to be used in conjunction with the models\n\nNotes\n-----\nThese functions haven't been formally tested.\n\"\"\"\n\nfrom scipy import stats\nimport numpy as np\nfrom statsmodels.tools.sm_exceptions import ValueWarning\n\n\n# TODO: these are pretty straightforward but they... | diff --git a/statsmodels/stats/stattools.py b/statsmodels/stats/stattools.py
index 000ab282f3d..9123704e8b6 100644
--- a/statsmodels/stats/stattools.py
+++ b/statsmodels/stats/stattools.py
@@ -415,7 +415,20 @@ def _medcouple_1d(y):
is_zero = np.logical_and(lower == 0.0, upper == 0.0)
standardization[is_zero] ... |
tobymao__sqlglot-1841 | Parsing Snowflake Table Name Identifiers Throws Errors
**Issue**
- Dialect: snowflake
When parsing create or drop table statements which build a table name literal using SQL variables, the parser throws a parsing error. This should be valid snowflake code.
```
sqlglot.errors.ParseError: Expecting ). Line 2, Col... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n date_trunc_to_time,\n datestrtodate_sql,\n format_time_lambda,\n inline_array_sql,\n max_or_greatest,\n ... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n date_trunc_to_time,\n datestrtodate_sql,\n format_time_lambda,\n inline_array_sql,\n max_or_greatest,\n ... | diff --git a/sqlglot/dialects/snowflake.py b/sqlglot/dialects/snowflake.py
index a902f5030d..a2dbfd9a8f 100644
--- a/sqlglot/dialects/snowflake.py
+++ b/sqlglot/dialects/snowflake.py
@@ -267,6 +267,21 @@ class Parser(parser.Parser):
),
}
+ def _parse_id_var(
+ self,
+ ... |
Pycord-Development__pycord-1165 | `interaction.response.edit_message` Does Not Work in the `discord.ui.Modal` Class
### Summary
`interaction.response.edit_message` does not work in the callback function for the `discord.ui.Modal` class.
### Reproduction Steps
1. Clone the latest version of Pycord from GitHub.
2. Use the code below.
### Min... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto dea... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto dea... | diff --git a/discord/interactions.py b/discord/interactions.py
index 97868df210..88a0345547 100644
--- a/discord/interactions.py
+++ b/discord/interactions.py
@@ -677,7 +677,7 @@ async def edit_message(
"""|coro|
Responds to this interaction by editing the original message of
- a component in... |
cupy__cupy-7456 | cupy + pytest seem to leave orphaned files
### Description
i know this is likely a conda(-forge) issue but I figured maybe i could help help from all of you as well since the maintainers likely overlap.
Basically, running pytest + cupy seems to generate some pyc files, but for only one of the python files that seem... | [
{
"content": "import functools as _functools\nimport sys as _sys\n\nimport numpy as _numpy\n\nfrom cupy import _environment\nfrom cupy import _version\n\n\n_environment._detect_duplicate_installation() # NOQA\n_environment._setup_win32_dll_directory() # NOQA\n_environment._preload_library('cutensor') # NOQA\... | [
{
"content": "import functools as _functools\nimport sys as _sys\n\nimport numpy as _numpy\n\nfrom cupy import _environment\nfrom cupy import _version\n\n\n_environment._detect_duplicate_installation() # NOQA\n_environment._setup_win32_dll_directory() # NOQA\n_environment._preload_library('cutensor') # NOQA\... | diff --git a/cupy/__init__.py b/cupy/__init__.py
index aa66f777381..1758915a263 100644
--- a/cupy/__init__.py
+++ b/cupy/__init__.py
@@ -493,11 +493,11 @@ def base_repr(number, base=2, padding=0): # NOQA (needed to avoid redefinition
from cupy._logic.truth import in1d # NOQA
from cupy._logic.truth import isin # NO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.