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 ⌀ |
|---|---|---|---|---|
beeware__toga-1617 | WHEN TYPING "-" IN THE NUMBERINPUT, WIDGET FAILS.
"""
TESTE
"""
import toga
from toga.style import Pack
from toga.style.pack import COLUMN, ROW
class TESTE(toga.App):
def startup(self):
"""
Construct and show the Toga application.
Usually, you would add your application to ... | [
{
"content": "from decimal import Decimal\n\nfrom travertino.size import at_least\n\nfrom ..libs.android.text import InputType, TextWatcher\nfrom ..libs.android.util import TypedValue\nfrom ..libs.android.view import Gravity, View__MeasureSpec\nfrom ..libs.android.widget import EditText\nfrom .base import Widge... | [
{
"content": "from decimal import Decimal, InvalidOperation\n\nfrom travertino.size import at_least\n\nfrom ..libs.android.text import InputType, TextWatcher\nfrom ..libs.android.util import TypedValue\nfrom ..libs.android.view import Gravity, View__MeasureSpec\nfrom ..libs.android.widget import EditText\nfrom ... | diff --git a/src/android/toga_android/widgets/numberinput.py b/src/android/toga_android/widgets/numberinput.py
index 93051aaaf0..a275aa1e18 100644
--- a/src/android/toga_android/widgets/numberinput.py
+++ b/src/android/toga_android/widgets/numberinput.py
@@ -1,4 +1,4 @@
-from decimal import Decimal
+from decimal import... |
lnbits__lnbits-1832 | Wallet not handling LNURLp redirects
I have configure the LNURL https://btc.us/.well-known/lnurlp/bilall to redirect to https://getalby.com/lnurlp/bilall with the status code 301.
This means that is bilall@btc.us is added as recipient in the wallet, the wallet should send the payment to bilall@getalby.com.
However,... | [
{
"content": "import asyncio\nimport hashlib\nimport json\nimport uuid\nfrom http import HTTPStatus\nfrom io import BytesIO\nfrom typing import Dict, List, Optional, Tuple, Union\nfrom urllib.parse import ParseResult, parse_qs, urlencode, urlparse, urlunparse\n\nimport async_timeout\nimport httpx\nimport pyqrco... | [
{
"content": "import asyncio\nimport hashlib\nimport json\nimport uuid\nfrom http import HTTPStatus\nfrom io import BytesIO\nfrom typing import Dict, List, Optional, Tuple, Union\nfrom urllib.parse import ParseResult, parse_qs, urlencode, urlparse, urlunparse\n\nimport async_timeout\nimport httpx\nimport pyqrco... | diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py
index c6bea82415..11d47da939 100644
--- a/lnbits/core/views/api.py
+++ b/lnbits/core/views/api.py
@@ -541,8 +541,9 @@ async def api_lnurlscan(code: str, wallet: WalletTypeInfo = Depends(get_key_type
assert lnurlauth_key.verifying_key
par... |
GeotrekCE__Geotrek-admin-1334 | SEARCH_PATH for Geotrek DB user
Since Geotrek 0.28, tables and functions have be moved to different schemas, which is a very good point (https://github.com/makinacorpus/Geotrek/releases/tag/v0.28.0).
Schemas are not mentionned in triggers which is OK too, as Django is doing it in his connexions so it is not a problem ... | [
{
"content": "import re\nimport os\nimport logging\nimport traceback\nfrom functools import wraps\n\nfrom django.db import connection, models\nfrom django.conf import settings\nfrom django.db.models import get_app, get_models\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef debug_pg_notices(f):\n\n @wraps(... | [
{
"content": "import re\nimport os\nimport logging\nimport traceback\nfrom functools import wraps\n\nfrom django.db import connection, models\nfrom django.conf import settings\nfrom django.db.models import get_app, get_models\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef debug_pg_notices(f):\n\n @wraps(... | diff --git a/.travis.yml b/.travis.yml
index 4c37c7fdda..7b30c5c03a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,9 @@ before_install:
- sudo /etc/init.d/postgresql restart
- psql -c "CREATE DATABASE geotrekdb ENCODING 'UTF8' TEMPLATE template0;" -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U p... |
aws__aws-sdk-pandas-1254 | EMR Job with Docker image always use the deploy mode as cluster
### Describe the bug
Calling the submit_emr_job function
```python
wr.emr.submit_spark_step(
cluster_id,
s3_path,
deploy_mode="client",
docker_image=image_path
)
```
Always yield deploy_mode as cluster despite explicitly mention... | [
{
"content": "\"\"\"EMR (Elastic Map Reduce) module.\"\"\"\n# pylint: disable=line-too-long\n\nimport logging\nimport pprint\nfrom typing import Any, Dict, List, Optional, Union, cast\n\nimport boto3\n\nfrom awswrangler import _utils, exceptions, sts\n\n_logger: logging.Logger = logging.getLogger(__name__)\n\n\... | [
{
"content": "\"\"\"EMR (Elastic Map Reduce) module.\"\"\"\n# pylint: disable=line-too-long\n\nimport logging\nimport pprint\nfrom typing import Any, Dict, List, Optional, Union, cast\n\nimport boto3\n\nfrom awswrangler import _utils, exceptions, sts\n\n_logger: logging.Logger = logging.getLogger(__name__)\n\n\... | diff --git a/awswrangler/emr.py b/awswrangler/emr.py
index 18d81139c..6998d8774 100644
--- a/awswrangler/emr.py
+++ b/awswrangler/emr.py
@@ -1022,7 +1022,7 @@ def build_spark_step(
else:
config: str = "hdfs:///user/hadoop/config.json"
cmd = (
- f"spark-submit --deploy-mode cluster "
+ ... |
psychopy__psychopy-1840 | IDE Mirrored for Right-to-Left Locales
Reproduction:
Search in windows for "locale" and click "date, time, and number format" (May be different if not on Windows 7).
Change the format to any RTL language (ex. Hebrew).
Open Psychopy IDE
Text and buttons are on the wrong side of the window. Input is backward as well.... | [
{
"content": "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\n\"\"\"Language localization for PsychoPy.\n\nSets the locale value as a wx languageID (int) and initializes gettext\ntranslation _translate():\n from psychopy.app import localization\n\"\"\"\n\n# Part of the PsychoPy library\n# Copyright (C) 20... | [
{
"content": "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\n\"\"\"Language localization for PsychoPy.\n\nSets the locale value as a wx languageID (int) and initializes gettext\ntranslation _translate():\n from psychopy.app import localization\n\"\"\"\n\n# Part of the PsychoPy library\n# Copyright (C) 20... | diff --git a/psychopy/localization/__init__.py b/psychopy/localization/__init__.py
index b342a8be18..faee815419 100644
--- a/psychopy/localization/__init__.py
+++ b/psychopy/localization/__init__.py
@@ -35,6 +35,9 @@ def setLocaleWX():
wxlocale = wx.Locale(languageID)
else:
wxlocale = wx.Locale(w... |
nautobot__nautobot-5370 | Custom Fields Association with Git Repositories
<!--
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
discussion instead: htt... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ValidationError\nfrom django.db.models.fields import TextField\nfrom django.forms import ModelM... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ValidationError\nfrom django.db.models.fields import TextField\nfrom django.forms import ModelM... | diff --git a/changes/5307.fixed b/changes/5307.fixed
new file mode 100644
index 00000000000..e2aa842fa3a
--- /dev/null
+++ b/changes/5307.fixed
@@ -0,0 +1 @@
+Fixed Custom Field form field(s) missing from git repository edit form.
diff --git a/nautobot/extras/forms/forms.py b/nautobot/extras/forms/forms.py
index 80a8ba... |
modoboa__modoboa-2495 | Robots.txt is missing from urls.py
# Impacted versions
* Modoboa: 1.12.2 and older
* installer used: Yes, but some modifications made
* Webserver: Nginx
# Steps to reproduce
Install modoboa and enable webinterface.
# Current behavior
No robots.txt is defined. Search engines do not now how to index the webs... | [
{
"content": "\"\"\"Core urls.\"\"\"\n\nfrom django.urls import path\n\nfrom . import views\n\napp_name = \"core\"\n\nurlpatterns = [\n path('', views.RootDispatchView.as_view(), name=\"root\"),\n path('dashboard/', views.DashboardView.as_view(), name=\"dashboard\"),\n\n path('accounts/login/', views.d... | [
{
"content": "\"\"\"Core urls.\"\"\"\n\nfrom django.urls import path\nfrom django.views.generic.base import TemplateView\n\nfrom . import views\n\napp_name = \"core\"\n\nurlpatterns = [\n path('', views.RootDispatchView.as_view(), name=\"root\"),\n path('dashboard/', views.DashboardView.as_view(), name=\"... | diff --git a/modoboa/core/templates/core/robots.txt b/modoboa/core/templates/core/robots.txt
new file mode 100644
index 000000000..c6742d8a8
--- /dev/null
+++ b/modoboa/core/templates/core/robots.txt
@@ -0,0 +1,2 @@
+User-Agent: *
+Disallow: /
diff --git a/modoboa/core/urls.py b/modoboa/core/urls.py
index 51b142f8c..c6... |
RocketMap__RocketMap-2308 | Need to better handle flask 'broken pipe' errors
<!--
ISSUES ARE NOT FOR SUPPORT!!!
ISSUES ARE NOT FOR SUPPORT!!!
ISSUES ARE NOT FOR SUPPORT!!!
ISSUES ARE NOT FOR SUPPORT!!!
ISSUES ARE NOT FOR SUPPORT!!!
ISSUES ARE NOT FOR SUPPORT!!!
ISSUES ARE NOT FOR SUPPORT!!!
ISSUES ARE NOT FOR SUPPORT!!!
... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport logging\nimport time\nimport re\nimport ssl\nimport json\n\nfrom distutils.version import StrictVersion\n\nfrom threading import Thread, Event\nfrom queue import Queue\nfrom flask_cors import CORS\nfrom flask_cache_bus... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport logging\nimport time\nimport re\nimport ssl\nimport json\n\nfrom distutils.version import StrictVersion\n\nfrom threading import Thread, Event\nfrom queue import Queue\nfrom flask_cors import CORS\nfrom flask_cache_bus... | diff --git a/runserver.py b/runserver.py
index e53f57417f..3ab07bb80f 100755
--- a/runserver.py
+++ b/runserver.py
@@ -90,9 +90,15 @@ def run(*args, **kwargs):
raise
except:
exc_type, exc_value, exc_trace = sys.exc_info()
- log.critical('Unhandled patched exception (%s): "%... |
sublimelsp__LSP-772 | Completion inputs label instead of textEdit newText
scalameta/metals#1031 was recently merged which adds an "implement all members" completion option. However, in Sublime it seems to not show up in the same order in the completions as the other editors. It seems to be triggered by e for some reason. Apart from that, if... | [
{
"content": "from .protocol import CompletionItemKind, Range\nfrom .types import Settings\nfrom .logging import debug\ntry:\n from typing import Tuple, Optional, Dict, List, Union\n assert Tuple and Optional and Dict and List and Union and Settings\nexcept ImportError:\n pass\n\n\ncompletion_item_kind... | [
{
"content": "from .protocol import CompletionItemKind, Range\nfrom .types import Settings\nfrom .logging import debug\ntry:\n from typing import Tuple, Optional, Dict, List, Union\n assert Tuple and Optional and Dict and List and Union and Settings\nexcept ImportError:\n pass\n\n\ncompletion_item_kind... | diff --git a/plugin/core/completion.py b/plugin/core/completion.py
index 6198e0b70..e9e7ee259 100644
--- a/plugin/core/completion.py
+++ b/plugin/core/completion.py
@@ -54,8 +54,7 @@ def format_completion(item: dict, word_col: int, settings: 'Settings') -> 'Tuple
elif trigger[0] == ' ' or trigger[0] == '•':
... |
mindsdb__mindsdb-1652 | Add new method to return the columns for PostgreSQL datasources :electric_plug: :1234:
When MindsDB creates a new PostgreSQL datasource we get information for columns by fetching all datasources. The problem here is that if datasource is big it takes a lot of time. We need a new get_columns method to return the column... | [
{
"content": "from contextlib import closing\nimport pg8000\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass PostgreSQLConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get('host')\n sel... | [
{
"content": "from contextlib import closing\nimport pg8000\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass PostgreSQLConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get('host')\n sel... | diff --git a/mindsdb/integrations/postgres/postgres.py b/mindsdb/integrations/postgres/postgres.py
index e5aad1931d9..7fc4936a326 100644
--- a/mindsdb/integrations/postgres/postgres.py
+++ b/mindsdb/integrations/postgres/postgres.py
@@ -208,4 +208,13 @@ def get_tables_list(self):
ORDER BY table_s... |
mitmproxy__mitmproxy-2663 | command "console.bodyview" crashes when given an invalid argument
Triggered by entering a command like:
console.bodyview @focus foo
command "console.bodyview" crashes when given an invalid argument
Triggered by entering a command like:
console.bodyview @focus foo
| [
{
"content": "import typing\n\nfrom mitmproxy import ctx\nfrom mitmproxy import command\nfrom mitmproxy import exceptions\nfrom mitmproxy import flow\nfrom mitmproxy import contentviews\nfrom mitmproxy.utils import strutils\n\nfrom mitmproxy.tools.console import overlay\nfrom mitmproxy.tools.console import sign... | [
{
"content": "import typing\n\nfrom mitmproxy import ctx\nfrom mitmproxy import command\nfrom mitmproxy import exceptions\nfrom mitmproxy import flow\nfrom mitmproxy import contentviews\nfrom mitmproxy.utils import strutils\n\nfrom mitmproxy.tools.console import overlay\nfrom mitmproxy.tools.console import sign... | diff --git a/mitmproxy/tools/console/consoleaddons.py b/mitmproxy/tools/console/consoleaddons.py
index 49934e4de6..1bda219f35 100644
--- a/mitmproxy/tools/console/consoleaddons.py
+++ b/mitmproxy/tools/console/consoleaddons.py
@@ -329,9 +329,9 @@ def bodyview(self, f: flow.Flow, part: str) -> None:
correct... |
ipython__ipython-7960 | Cache-Control being set twice for no_cache_paths
Whether browsers pick the first or last instance of a repeat header is ill defined. Some will pick the first (Firefox) and wind up caching custom.js practically forever (or until notebook server restart) and others will pick the latter and behave as intended.

When I execute the Pusher for 2nd time, it fails on the follo... | [
{
"content": "# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/RELEASE.md b/RELEASE.md
index 2459ca685e..dd35836b97 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -48,6 +48,7 @@
`component.outputs.output_name`).
* Updated Iris example to skip transform and use Keras model.
* Fixes the check for input artifact existence in base driver.
+* Fixed bug in AI Plat... |
scoutapp__scout_apm_python-523 | Error with the scout add-on in Heroku
With version 2.14.1 of this package, I encounter the following error:
` File "/code/nluproxy/__init__.py", line 3, in <module>
from .celery import app as celery_app
File "/code/nluproxy/celery.py", line 12, in <module>
scout_apm.celery.install(app)
File "/... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport datetime as dt\nimport sys\nfrom os import getpid\n\nfrom scout_apm.core.commands import ApplicationEvent\nfrom scout_apm.core.config import scout_config\nfrom scout_apm.core.socket import ... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport datetime as dt\nimport sys\nfrom os import getpid\n\nfrom scout_apm.core.commands import ApplicationEvent\nfrom scout_apm.core.config import scout_config\nfrom scout_apm.core.socket import ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b2838507..3995556a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,16 +1,23 @@
# Changelog
+## Pending
+
+### Fixed
+
+- Fix crash when scanning packages that have a Name or Version that is
+ `None`.
+ ([Issue #522](https://github.com/scoutapp/scout_apm_python/issu... |
getredash__redash-4582 | TreasureData getSchema fails when setting non-default region
<!--
#####################################################################
#
# Need support? USE THE FORUM! https://discuss.redash.io/c/support.
#
# Don't have steps to reproduce and actually not sure it's a bug?
# Use the forum! https://discuss.redash.... | [
{
"content": "import logging\n\nfrom redash.query_runner import *\nfrom redash.utils import json_dumps\n\nlogger = logging.getLogger(__name__)\n\ntry:\n import tdclient\n from tdclient import errors\n\n enabled = True\n\nexcept ImportError:\n enabled = False\n\nTD_TYPES_MAPPING = {\n \"bigint\": ... | [
{
"content": "import logging\n\nfrom redash.query_runner import *\nfrom redash.utils import json_dumps\n\nlogger = logging.getLogger(__name__)\n\ntry:\n import tdclient\n from tdclient import errors\n\n enabled = True\n\nexcept ImportError:\n enabled = False\n\nTD_TYPES_MAPPING = {\n \"bigint\": ... | diff --git a/redash/query_runner/treasuredata.py b/redash/query_runner/treasuredata.py
index a2bc7d482c..763b3e3c4a 100644
--- a/redash/query_runner/treasuredata.py
+++ b/redash/query_runner/treasuredata.py
@@ -68,7 +68,7 @@ def get_schema(self, get_stats=False):
schema = {}
if self.configuration.get(... |
ESMCI__cime-381 | Tests fail to report errors if comparison between the two cases fails
In my testing with cime5.0.7, I discovered that tests fail to report errors even if the comparison between the two cases shows differences.
Specifically, I ran the ERS test in https://github.com/ESMCI/cime/issues/295 out of the cesm2 alpha01 sandbox... | [
{
"content": "\"\"\"\nInterface to the env_mach_specific.xml file. This class inherits from EnvBase\n\"\"\"\nfrom CIME.XML.standard_module_setup import *\n\nfrom CIME.XML.env_base import EnvBase\n\nimport string\n\nlogger = logging.getLogger(__name__)\n\n# Is not of type EntryID but can use functions from Entr... | [
{
"content": "\"\"\"\nInterface to the env_mach_specific.xml file. This class inherits from EnvBase\n\"\"\"\nfrom CIME.XML.standard_module_setup import *\n\nfrom CIME.XML.env_base import EnvBase\n\nimport string\n\nlogger = logging.getLogger(__name__)\n\n# Is not of type EntryID but can use functions from Entr... | diff --git a/scripts/Tools/component_compare_test.sh b/scripts/Tools/component_compare_test.sh
index b63da04d491..1412fc3a49b 100755
--- a/scripts/Tools/component_compare_test.sh
+++ b/scripts/Tools/component_compare_test.sh
@@ -394,4 +394,18 @@ else
print_status "$overall_status" "$compare_info: test functionalit... |
opendatacube__datacube-core-1024 | Names appear as None in Datacube.list_products()
### Expected behaviour
Names appear properly as defined by product.yml.
### Actual behaviour
The names appear as None in list_products()
### Steps to reproduce the behaviour
```python
import datacube
dc = datacube.Datacube(env='acube')
dc.list_product... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore classes used across modules.\n\"\"\"\nimport logging\nimport math\nimport warnings\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom pathlib import Path\nfrom uuid import UUID\n\nfrom affine import Affine\nfrom typing import Optional, List, Mapp... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore classes used across modules.\n\"\"\"\nimport logging\nimport math\nimport warnings\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom pathlib import Path\nfrom uuid import UUID\n\nfrom affine import Affine\nfrom typing import Optional, List, Mapp... | diff --git a/datacube/model/__init__.py b/datacube/model/__init__.py
index b117bd2828..af969a592e 100644
--- a/datacube/model/__init__.py
+++ b/datacube/model/__init__.py
@@ -587,12 +587,11 @@ def to_dict(self) -> Mapping[str, Any]:
"""
Convert to a dictionary representation of the available fields
... |
scikit-image__scikit-image-5497 | Wrong threshold value in threshold_otsu when passing a precomputed histogram
## Description
When the histogram has bins with zero counts at the beginning, it returns zero as threshold.
## Way to reproduce
```python
import numpy as np
from skimage.filters import threshold_otsu
x = np.array([1, 2])
>>> thr... | [
{
"content": "import itertools\nimport math\nimport inspect\nfrom collections import OrderedDict\nfrom collections.abc import Iterable\n\nimport numpy as np\nfrom scipy import ndimage as ndi\n\nfrom .._shared.utils import check_nD, deprecate_kwarg, warn\nfrom ..exposure import histogram\nfrom ..filters._multiot... | [
{
"content": "import itertools\nimport math\nimport inspect\nfrom collections import OrderedDict\nfrom collections.abc import Iterable\n\nimport numpy as np\nfrom scipy import ndimage as ndi\n\nfrom .._shared.utils import check_nD, deprecate_kwarg, warn\nfrom ..exposure import histogram\nfrom ..filters._multiot... | diff --git a/skimage/filters/tests/test_thresholding.py b/skimage/filters/tests/test_thresholding.py
index 03170717ded..6b85dc94813 100644
--- a/skimage/filters/tests/test_thresholding.py
+++ b/skimage/filters/tests/test_thresholding.py
@@ -268,6 +268,19 @@ def test_otsu_camera_image_counts():
camera = util.img_as... |
google__trax-1138 | Optimizer tree_init returns a slots list, but tree_update returns a slots tuple
### Description
`tree_init` and `tree_update` are not consistent. One returns a list for the slots, the other a tuple.
It is a super minor detail but I was trying to conditionally run a `tree_update` with `jax.cond`, and this minor di... | [
{
"content": "# coding=utf-8\n# Copyright 2020 The Trax 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# Unles... | [
{
"content": "# coding=utf-8\n# Copyright 2020 The Trax 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# Unles... | diff --git a/trax/optimizers/base.py b/trax/optimizers/base.py
index 3a86d84c2..c433f6399 100644
--- a/trax/optimizers/base.py
+++ b/trax/optimizers/base.py
@@ -154,7 +154,7 @@ def tree_update(self, step, grad_tree, weight_tree, slots, opt_params):
self._update_and_check(step, grad, weight, slot, opt_params)
... |
jupyterhub__jupyterhub-3477 | [rbac] Group roles in user model role list
<!-- Thank you for contributing. These HTML comments will not render in the issue, but you can delete them once you've read them if you prefer! -->
### Bug description
<!-- Use this section to clearly and concisely describe the bug. -->
Occurs when a user is a member of a... | [
{
"content": "\"\"\"Roles utils\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport re\nfrom itertools import chain\n\nfrom sqlalchemy import func\nfrom tornado.log import app_log\n\nfrom . import orm\n\n\ndef get_default_roles():\n \"\"\"Retur... | [
{
"content": "\"\"\"Roles utils\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport re\nfrom itertools import chain\n\nfrom sqlalchemy import func\nfrom tornado.log import app_log\n\nfrom . import orm\n\n\ndef get_default_roles():\n \"\"\"Retur... | diff --git a/jupyterhub/roles.py b/jupyterhub/roles.py
index dbd2e75ac3..b51bb84d3f 100644
--- a/jupyterhub/roles.py
+++ b/jupyterhub/roles.py
@@ -164,13 +164,12 @@ def expand_roles_to_scopes(orm_object):
if not isinstance(orm_object, orm.Base):
raise TypeError(f"Only orm objects allowed, got {orm_object}... |
buildbot__buildbot-7314 | Wrong error message when buildbot uses React web frontend and it is not installed
Buildbot shows incorrect error message when using React frontend and it's not installed.
```
buildtins.RuntimeError: could not find buildbot-www; is it installed;
```
The correct package is buildbot-www-react. This is especially c... | [
{
"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/service.py b/master/buildbot/www/service.py
index 1036b81a1537..33b825085113 100644
--- a/master/buildbot/www/service.py
+++ b/master/buildbot/www/service.py
@@ -306,8 +306,10 @@ def setupSite(self, new_config):
self.reconfigurableResources = []
- # we're going to ne... |
huggingface__transformers-4477 | ❓ Warning : This overload of addcdiv_ is deprecated
# ❓ Questions & Help
When running the [official Colab example of GLUE](https://colab.research.google.com/github/huggingface/blog/blob/master/notebooks/trainer/01_text_classification.ipynb), during training I receive a `UserWarning` :
```
/pytorch/torch/csrc/uti... | [
{
"content": "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http:... | [
{
"content": "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http:... | diff --git a/src/transformers/optimization.py b/src/transformers/optimization.py
index 5af1120c818e..aaabd1c47004 100644
--- a/src/transformers/optimization.py
+++ b/src/transformers/optimization.py
@@ -162,7 +162,7 @@ def step(self, closure=None):
bias_correction2 = 1.0 - beta2 ** state["step"]
... |
psf__black-3257 | (🐞) Windows line endings not preserved with blackd
<!--
Please make sure that the bug is not already fixed either in newer versions or the
current development version. To confirm this, you have three options:
1. Update Black's version if a newer release exists: `pip install -U black`
2. Use the online formatter ... | [
{
"content": "import asyncio\nimport logging\nfrom concurrent.futures import Executor, ProcessPoolExecutor\nfrom datetime import datetime\nfrom functools import partial\nfrom multiprocessing import freeze_support\nfrom typing import Set, Tuple\n\ntry:\n from aiohttp import web\n\n from .middlewares import... | [
{
"content": "import asyncio\nimport logging\nfrom concurrent.futures import Executor, ProcessPoolExecutor\nfrom datetime import datetime\nfrom functools import partial\nfrom multiprocessing import freeze_support\nfrom typing import Set, Tuple\n\ntry:\n from aiohttp import web\n\n from .middlewares import... | diff --git a/CHANGES.md b/CHANGES.md
index 25c3d4889a0..8a2674eb90c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -36,7 +36,7 @@
### _Blackd_
-<!-- Changes to blackd -->
+- Windows style (CRLF) newlines will be preserved (#3257).
### Integrations
diff --git a/docs/the_black_code_style/current_style.md b/docs/th... |
archlinux__archinstall-1205 | Swedish language causes menu system to break
This happens when you click `Select disk layout (Välj hårddisk-layout)` -> `Wipe all (Töm alla)` -> `btrfs` -> `yes (Ja)` -> `yes (Ja)`

99.9% of all Swedes... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport sys\nfrom typing import Callable, Any, List, Iterator, Tuple, Optional, Dict, TYPE_CHECKING\n\nfrom .menu import Menu, MenuSelectionType\nfrom ..locale_helpers import set_keyboard_language\nfrom ..output import log\nfrom ..translation im... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport sys\nfrom typing import Callable, Any, List, Iterator, Tuple, Optional, Dict, TYPE_CHECKING\n\nfrom .menu import Menu, MenuSelectionType\nfrom ..locale_helpers import set_keyboard_language\nfrom ..output import log\nfrom ..translation im... | diff --git a/archinstall/lib/menu/selection_menu.py b/archinstall/lib/menu/selection_menu.py
index 73ba1148f3..35057e9cdd 100644
--- a/archinstall/lib/menu/selection_menu.py
+++ b/archinstall/lib/menu/selection_menu.py
@@ -272,7 +272,8 @@ def _get_menu_text_padding(self, entries: List[Selector]):
return max([len(str... |
vllm-project__vllm-1727 | llm.generate hangs for long prompt
I'm using the latest vllm (0.2.1.post1) and `TheBloke/vicuna-13B-v1.5-16K-AWQ` model and it seems that llm.generate will hang when the length of prompt token ids >= 5985.
```
from vllm import LLM, SamplingParams
llm = LLM(model="TheBloke/vicuna-13B-v1.5-16K-AWQ", quantization="... | [
{
"content": "import enum\nimport time\nfrom typing import Dict, Iterable, List, Optional, Tuple, Union\n\nfrom vllm.config import CacheConfig, SchedulerConfig\nfrom vllm.core.block_manager import AllocStatus, BlockSpaceManager\nfrom vllm.core.policy import PolicyFactory\nfrom vllm.logger import init_logger\nfr... | [
{
"content": "import enum\nimport time\nfrom typing import Dict, Iterable, List, Optional, Tuple, Union\n\nfrom vllm.config import CacheConfig, SchedulerConfig\nfrom vllm.core.block_manager import AllocStatus, BlockSpaceManager\nfrom vllm.core.policy import PolicyFactory\nfrom vllm.logger import init_logger\nfr... | diff --git a/vllm/core/scheduler.py b/vllm/core/scheduler.py
index 60a4a90bb3e..ca28bbdc2fb 100644
--- a/vllm/core/scheduler.py
+++ b/vllm/core/scheduler.py
@@ -196,7 +196,8 @@ def _schedule(self) -> SchedulerOutputs:
scheduler_outputs = SchedulerOutputs(
scheduled_seq_groups=sched... |
open-mmlab__mmocr-421 | For dbnet textdect,how to produce a polygonal prediction
I used the default dbnet with ResNet50 to do text detection,it works pretty good,but the prediction region is always a quadrangle, I would like to change the prediction format to polygon.
I changed the default model config file ‘dbnet_r50dcnv2_fpnc_1200e_icd... | [
{
"content": "import functools\nimport operator\n\nimport cv2\nimport numpy as np\nimport pyclipper\nimport torch\nfrom mmcv.ops import contour_expand, pixel_group\nfrom numpy.fft import ifft\nfrom numpy.linalg import norm\nfrom shapely.geometry import Polygon\nfrom skimage.morphology import skeletonize\n\nfrom... | [
{
"content": "import functools\nimport operator\n\nimport cv2\nimport numpy as np\nimport pyclipper\nimport torch\nfrom mmcv.ops import contour_expand, pixel_group\nfrom numpy.fft import ifft\nfrom numpy.linalg import norm\nfrom shapely.geometry import Polygon\nfrom skimage.morphology import skeletonize\n\nfrom... | diff --git a/mmocr/models/textdet/postprocess/wrapper.py b/mmocr/models/textdet/postprocess/wrapper.py
index 5a2d1519a..ff4c7ae89 100644
--- a/mmocr/models/textdet/postprocess/wrapper.py
+++ b/mmocr/models/textdet/postprocess/wrapper.py
@@ -223,7 +223,14 @@ def db_decode(preds,
if len(poly) == 0 or isinstance(... |
DataDog__dd-agent-3346 | sudo service datadog-agent info throwing CertificateError despite agent reporting just fine
We run all our Datadog agents behind an internal proxy. This appears to be working normally as they are reporting data just fine.
However, when I run:
sudo service datadog-agent info
I get the following exception:
... | [
{
"content": "# (C) Datadog, Inc. 2010-2016\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n\"\"\"\nThis module contains classes which are used to occasionally persist the status\nof checks.\n\"\"\"\n# stdlib\nfrom collections import defaultdict\nimport cPickle as pickle\nimport... | [
{
"content": "# (C) Datadog, Inc. 2010-2016\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n\"\"\"\nThis module contains classes which are used to occasionally persist the status\nof checks.\n\"\"\"\n# stdlib\nfrom collections import defaultdict\nimport cPickle as pickle\nimport... | diff --git a/checks/check_status.py b/checks/check_status.py
index 20c68d5183..60de272715 100644
--- a/checks/check_status.py
+++ b/checks/check_status.py
@@ -127,7 +127,8 @@ def validate_api_key(config):
if proxy:
request_proxy = {'https': "http://{user}:{password}@{host}:{port}".format(**proxy)}... |
google__TensorNetwork-829 | Latest JAX breaks build
Looks like it's mainly problems related to using `jnp` for shape calculations.
| [
{
"content": "import functools\nfrom typing import List, Any, Tuple, Callable, Sequence\nimport collections\nimport types\nimport numpy as np\nTensor = Any\n\n\ndef _generate_jitted_eigsh_lanczos(jax: types.ModuleType) -> Callable:\n \"\"\"\n Helper function to generate jitted lanczos function used\n in JaxB... | [
{
"content": "import functools\nfrom typing import List, Any, Tuple, Callable, Sequence\nimport collections\nimport types\nimport numpy as np\nTensor = Any\n\n\ndef _generate_jitted_eigsh_lanczos(jax: types.ModuleType) -> Callable:\n \"\"\"\n Helper function to generate jitted lanczos function used\n in JaxB... | diff --git a/tensornetwork/backends/jax/jitted_functions.py b/tensornetwork/backends/jax/jitted_functions.py
index 7287714e8..10ae438f4 100644
--- a/tensornetwork/backends/jax/jitted_functions.py
+++ b/tensornetwork/backends/jax/jitted_functions.py
@@ -108,8 +108,8 @@ def check_thresh(check_vals):
return jax.l... |
scoutapp__scout_apm_python-228 | Capture details of Celery Chains and Chords
Celery has some more advanced features to join multiple jobs into one. The agent needs testing and investigation into how they can be best instrumented.
| [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport datetime as dt\n\nfrom celery.signals import before_task_publish, task_postrun, task_prerun\n\nimport scout_apm.core\nfrom scout_apm.compat import datetime_to_timestamp\nfrom scout_apm.core... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport datetime as dt\n\nfrom celery.signals import before_task_publish, task_postrun, task_prerun\n\nimport scout_apm.core\nfrom scout_apm.compat import datetime_to_timestamp\nfrom scout_apm.core... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a54203f6..a589d219 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,9 @@
([PR #205](https://github.com/scoutapp/scout_apm_python/pull/205)).
- Track Celery task time in queue with context tag `queue_time`
([PR #206](https://github.com/scoutapp/scout_apm_pyt... |
translate__translate-3960 | setup.py fails with py2exe
I've got this error from setup.py:
```
Traceback (most recent call last):
File "setup.py", line 526, in <module>
standardsetup("translate-toolkit", translateversion)
File "setup.py", line 486, in standardsetup
translatebashscripts)
File "setup.py", line 490, in dosetup
... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2006-2013 Zuza Software Foundation\n#\n# This file is part of Translate.\n#\n# Translate is free software; you can redistribute it and/or modify it under\n# the terms of the GNU General Public License as published by the Free Software\... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2006-2013 Zuza Software Foundation\n#\n# This file is part of Translate.\n#\n# Translate is free software; you can redistribute it and/or modify it under\n# the terms of the GNU General Public License as published by the Free Software\... | diff --git a/setup.py b/setup.py
index 228ab8a60a..7cfb07eb16 100755
--- a/setup.py
+++ b/setup.py
@@ -22,6 +22,7 @@
import sys
from distutils.sysconfig import get_python_lib
from os.path import dirname, isfile, join
+from setuptools import setup
try:
from sphinx.setup_command import BuildDoc
@@ -487,7 +488,... |
lightly-ai__lightly-1536 | Tutorial 3: small typo "strcture" -> "structure"
In [this section](https://docs.lightly.ai/self-supervised-learning/tutorials/package/tutorial_simclr_clothing.html#setup-data-augmentations-and-loaders), the first paragraph has the following typo:
"strcture" -> "structure"
| [
{
"content": "\"\"\"\n.. _lightly-simclr-tutorial-3:\n\nTutorial 3: Train SimCLR on Clothing\n==============================================\n\nIn this tutorial, we will train a SimCLR model using lightly. The model,\naugmentations and training procedure is from \n`A Simple Framework for Contrastive Learning of... | [
{
"content": "\"\"\"\n.. _lightly-simclr-tutorial-3:\n\nTutorial 3: Train SimCLR on Clothing\n==============================================\n\nIn this tutorial, we will train a SimCLR model using lightly. The model,\naugmentations and training procedure is from \n`A Simple Framework for Contrastive Learning of... | diff --git a/docs/source/tutorials_source/package/tutorial_simclr_clothing.py b/docs/source/tutorials_source/package/tutorial_simclr_clothing.py
index e2a778f61..a20640f62 100644
--- a/docs/source/tutorials_source/package/tutorial_simclr_clothing.py
+++ b/docs/source/tutorials_source/package/tutorial_simclr_clothing.py... |
MongoEngine__mongoengine-1501 | error while using "db_field" parameter in multi-level embedded documents
The following code is an example to reconstruct what's going wrong. The main problem seems to be the use of `db_field` in the second level of the embedded document (In the example this is `class B`)
``` python
data = {'b': {'c': [{'x': 1.0, 'y': ... | [
{
"content": "import copy\nimport numbers\nfrom collections import Hashable\nfrom functools import partial\n\nfrom bson import ObjectId, json_util\nfrom bson.dbref import DBRef\nfrom bson.son import SON\nimport pymongo\nimport six\n\nfrom mongoengine import signals\nfrom mongoengine.base.common import get_docum... | [
{
"content": "import copy\nimport numbers\nfrom collections import Hashable\nfrom functools import partial\n\nfrom bson import ObjectId, json_util\nfrom bson.dbref import DBRef\nfrom bson.son import SON\nimport pymongo\nimport six\n\nfrom mongoengine import signals\nfrom mongoengine.base.common import get_docum... | diff --git a/mongoengine/base/document.py b/mongoengine/base/document.py
index 9d3667068..ce96837aa 100644
--- a/mongoengine/base/document.py
+++ b/mongoengine/base/document.py
@@ -684,8 +684,13 @@ def _from_son(cls, son, _auto_dereference=True, only_fields=None, created=False)
# class if unavailable
... |
pyqtgraph__pyqtgraph-655 | "Koch Fractal" example is missing an import [develop branch]
The "Koch Fractal" example is missing the import for the `reduce()` function.
```
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\pyqtgraph\examples\fractal.py", line 106, in <module>
update()
File "C:\Anaconda3\lib\site... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplays an interactive Koch fractal\n\"\"\"\nimport initExample ## Add path to library (just for examples; you do not need this)\n\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtCore, QtGui\nimport numpy as np\n\napp = QtGui.QApplication([])\n\n# Set up UI wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplays an interactive Koch fractal\n\"\"\"\nimport initExample ## Add path to library (just for examples; you do not need this)\n\nfrom functools import reduce\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtCore, QtGui\nimport numpy as np\n\napp = QtGui.QApp... | diff --git a/examples/fractal.py b/examples/fractal.py
index eeb1bdb081..d91133a527 100644
--- a/examples/fractal.py
+++ b/examples/fractal.py
@@ -4,6 +4,7 @@
"""
import initExample ## Add path to library (just for examples; you do not need this)
+from functools import reduce
import pyqtgraph as pg
from pyqtgraph... |
facebookresearch__nevergrad-712 | Optimizer always trying the same points
## Steps to reproduce
1. Set up an optimizer with a parametrization
2. Run optimizer.minimize()
3. Print values being tested
## Observed Results
* What happened? This could be a description, log output, etc.
The argument of the objective function are always ... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Optional, Any\nimport numpy as np\nfrom ..common.typetools import ArrayLike... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Optional, Any\nimport numpy as np\nfrom ..common.typetools import ArrayLike... | diff --git a/nevergrad/optimization/mutations.py b/nevergrad/optimization/mutations.py
index 25035ba95..65022f7eb 100644
--- a/nevergrad/optimization/mutations.py
+++ b/nevergrad/optimization/mutations.py
@@ -52,6 +52,8 @@ def portfolio_discrete_mutation(self, parent: ArrayLike, u: Optional[int] = None
dimensi... |
pytorch__vision-355 | utils.save_image fails when passing list of images
utils.save_image fails when passing in a list of images, as the code tries to call .cpu on the list.
Passing in a list should be possible according to the function's documentation.
| [
{
"content": "import torch\nimport math\nirange = range\n\n\ndef make_grid(tensor, nrow=8, padding=2,\n normalize=False, range=None, scale_each=False, pad_value=0):\n \"\"\"Make a grid of images.\n\n Args:\n tensor (Tensor or list): 4D mini-batch Tensor of shape (B x C x H x W)\n ... | [
{
"content": "import torch\nimport math\nirange = range\n\n\ndef make_grid(tensor, nrow=8, padding=2,\n normalize=False, range=None, scale_each=False, pad_value=0):\n \"\"\"Make a grid of images.\n\n Args:\n tensor (Tensor or list): 4D mini-batch Tensor of shape (B x C x H x W)\n ... | diff --git a/torchvision/utils.py b/torchvision/utils.py
index 1f3440d1843..96f790ebf91 100644
--- a/torchvision/utils.py
+++ b/torchvision/utils.py
@@ -93,9 +93,8 @@ def save_image(tensor, filename, nrow=8, padding=2,
**kwargs: Other arguments are documented in ``make_grid``.
"""
from PIL import Ima... |
ansible__awx-4277 | Ability to add AWX Inventory name as a variable in playbook
##### ISSUE TYPE
- Feature Idea
##### SUMMARY
<!-- Briefly describe the problem or desired enhancement. -->
Per a customer's request, they would like to query the name of the Inventory utilized as a variable and use that variable in a playbook.
~~~
... | [
{
"content": "# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\n# Python\nfrom io import StringIO\nimport codecs\nimport json\nimport logging\nimport os\nimport re\nimport socket\nimport subprocess\nimport tempfile\nfrom collections import OrderedDict\n\n# Django\nfrom django.conf import settings\nf... | [
{
"content": "# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\n# Python\nfrom io import StringIO\nimport codecs\nimport json\nimport logging\nimport os\nimport re\nimport socket\nimport subprocess\nimport tempfile\nfrom collections import OrderedDict\n\n# Django\nfrom django.conf import settings\nf... | diff --git a/awx/main/models/unified_jobs.py b/awx/main/models/unified_jobs.py
index 2d5fe8e3cf56..438cc5f51348 100644
--- a/awx/main/models/unified_jobs.py
+++ b/awx/main/models/unified_jobs.py
@@ -1397,6 +1397,13 @@ def awx_meta_vars(self):
r['{}_user_email'.format(name)] = created_by.email
... |
nilearn__nilearn-1312 | Dataset Error with Nilearn Tutorial: 8.1.3. 3D and 4D niimgs: handling and visualizing
Hi Nilearn Experts,
Working through the Tutorials currently on: 8.1.3. 3D and 4D niimgs: handling and visualizing. Seems like the line:
rsn = datasets.fetch_atlas_smith_2009()['rsn10']
Is not downloading the correct file- this do... | [
{
"content": "\"\"\"\nDownloading NeuroImaging datasets: atlas datasets\n\"\"\"\nimport os\nimport xml.etree.ElementTree\nimport numpy as np\n\nfrom sklearn.datasets.base import Bunch\nfrom sklearn.utils import deprecated\n\n#from . import utils\nfrom .utils import _get_dataset_dir, _fetch_files, _get_dataset_d... | [
{
"content": "\"\"\"\nDownloading NeuroImaging datasets: atlas datasets\n\"\"\"\nimport os\nimport xml.etree.ElementTree\nimport numpy as np\n\nfrom sklearn.datasets.base import Bunch\nfrom sklearn.utils import deprecated\n\n#from . import utils\nfrom .utils import _get_dataset_dir, _fetch_files, _get_dataset_d... | diff --git a/nilearn/datasets/atlas.py b/nilearn/datasets/atlas.py
index 8a66498d64..dfda074461 100644
--- a/nilearn/datasets/atlas.py
+++ b/nilearn/datasets/atlas.py
@@ -418,11 +418,11 @@ def fetch_atlas_smith_2009(data_dir=None, mirror='origin', url=None,
Notes
-----
For more information about this dat... |
scikit-hep__pyhf-444 | pyhf commandline tools requires uproot extra
# Description
just issuing `pyhf --help` requires the uproot extra since `commandline.py` imports `writexml`.
# Expected Behavior
I don't need uproot if I don't want to use json2xml or xml2json
# Actual Behavior
I can't use `pyhf` without installing uproot.
... | [
{
"content": "import logging\n\nimport click\nimport json\nimport os\n\nfrom . import writexml\nfrom .utils import hypotest\nfrom .pdf import Workspace\nfrom .version import __version__\n\nlogging.basicConfig()\nlog = logging.getLogger(__name__)\n\n# This is only needed for Python 2/3 compatibility\ndef ensure_... | [
{
"content": "import logging\n\nimport click\nimport json\nimport os\n\nfrom .utils import hypotest\nfrom .pdf import Workspace\nfrom .version import __version__\n\nlogging.basicConfig()\nlog = logging.getLogger(__name__)\n\n# This is only needed for Python 2/3 compatibility\ndef ensure_dirs(path):\n try:\n ... | diff --git a/pyhf/commandline.py b/pyhf/commandline.py
index 9d0e1436b1..1d151db68c 100644
--- a/pyhf/commandline.py
+++ b/pyhf/commandline.py
@@ -4,7 +4,6 @@
import json
import os
-from . import writexml
from .utils import hypotest
from .pdf import Workspace
from .version import __version__
@@ -81,6 +80,7 @@ de... |
cobbler__cobbler-3607 | [Backport] SafeConfigParser removal
### Original feature issue
Issue #3551 PR #3552
### Target release
- [x] release33
- [ ] release32
- [ ] release30
### Reason
This is needed for Fedora
| [
{
"content": "\"\"\"\nAuthorization module that allow users listed in\n/etc/cobbler/users.conf to be permitted to access resources.\nFor instance, when using authz_ldap, you want to use authn_configfile,\nnot authz_allowall, which will most likely NOT do what you want.\n\"\"\"\n# SPDX-License-Identifier: GPL-2.... | [
{
"content": "\"\"\"\nAuthorization module that allow users listed in\n/etc/cobbler/users.conf to be permitted to access resources.\nFor instance, when using authz_ldap, you want to use authn_configfile,\nnot authz_allowall, which will most likely NOT do what you want.\n\"\"\"\n# SPDX-License-Identifier: GPL-2.... | diff --git a/changelog.d/3606.fixed b/changelog.d/3606.fixed
new file mode 100644
index 0000000000..801fbfbaf6
--- /dev/null
+++ b/changelog.d/3606.fixed
@@ -0,0 +1 @@
+Removed from Python 3.12 SafeConfigParser replaced with ConfigParser
diff --git a/cobbler/modules/authorization/configfile.py b/cobbler/modules/authori... |
aws__aws-sam-cli-4360 | Bug: sam build omits Dockerfile suffix from build.toml when aws:asset:property == "Code.ImageUri"
### Description:
Hi all! I was unable to find an open or closed issue describing this exact problem.
The problem is very specific: when your SAM template specifies a Dockerfile containing a suffix in its name (e.g., ... | [
{
"content": "\"\"\"\nClass that Normalizes a Template based on Resource Metadata\n\"\"\"\n\nimport logging\nfrom pathlib import Path\nimport json\nimport re\nfrom typing import Dict\n\nfrom samcli.lib.iac.cdk.utils import is_cdk_project\n\nfrom samcli.lib.utils.resources import AWS_CLOUDFORMATION_STACK\n\nCDK_... | [
{
"content": "\"\"\"\nClass that Normalizes a Template based on Resource Metadata\n\"\"\"\n\nimport logging\nfrom pathlib import Path\nimport json\nimport re\nfrom typing import Dict\n\nfrom samcli.lib.iac.cdk.utils import is_cdk_project\n\nfrom samcli.lib.utils.resources import AWS_CLOUDFORMATION_STACK\n\nCDK_... | diff --git a/samcli/lib/samlib/resource_metadata_normalizer.py b/samcli/lib/samlib/resource_metadata_normalizer.py
index 1ed5a43be1..995d67306e 100644
--- a/samcli/lib/samlib/resource_metadata_normalizer.py
+++ b/samcli/lib/samlib/resource_metadata_normalizer.py
@@ -186,7 +186,7 @@ def _extract_image_asset_metadata(met... |
litestar-org__litestar-610 | Bug: Picologging not behaving correctly
**Describe the bug**
i reported an earlier issue to @peterschutt about logging configuration not visible in the console output.
that was fixed in https://github.com/starlite-api/starlite/pull/594
i now wanted to test this out with picologging but it seems to override the Lo... | [
{
"content": "import atexit\nfrom logging import StreamHandler\nfrom queue import Queue\nfrom typing import Any, List, Optional\n\nfrom starlite.exceptions import MissingDependencyException\nfrom starlite.logging.utils import resolve_handlers\n\ntry:\n from picologging.handlers import QueueHandler, QueueList... | [
{
"content": "import atexit\nfrom queue import Queue\nfrom typing import Any, List, Optional\n\nfrom starlite.exceptions import MissingDependencyException\nfrom starlite.logging.utils import resolve_handlers\n\ntry:\n from picologging import StreamHandler\n from picologging.handlers import QueueHandler, Q... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f180dea2fd..d6b2a862da 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog
+[1.28.1]
+
+- fix `QueueListenerHandler` using stdlib `QueueListenerHandler`.
+- update `pydantic-factories` to `v1.11.1`.
+
[1.28.0]
- add `csrf_input` template contex... |
django-import-export__django-import-export-1314 | (xls/xlsx) Time fields rejected on import even though they are valid
**Describe the bug**
When importing xls or xlsx files, receive "Enter a valid time" errors for seemingly valid time fields.
This seems to happen because tablib is already converting these into datetime.time fields, then the TimeWidget.clean() method... | [
{
"content": "import json\nfrom datetime import date, datetime\nfrom decimal import Decimal\n\nimport django\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.dateparse import parse_duration\nfrom django.utils.encoding ... | [
{
"content": "import json\nfrom datetime import date, datetime, time\nfrom decimal import Decimal\n\nimport django\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.dateparse import parse_duration\nfrom django.utils.enc... | diff --git a/AUTHORS b/AUTHORS
index 50a638d5a..5082d91fe 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -117,3 +117,4 @@ The following is a list of much appreciated contributors:
* jinmay (jinmyeong Cho)
* DonQueso89 (Kees van Ekeren)
* yazdanRa (Yazdan Ranjbar)
+* Gabriel Warkentin
diff --git a/import_export/widgets.py b/i... |
aio-libs__aiohttp-2640 | Raise an exception if trying to write into closed response
See https://stackoverflow.com/questions/47175297/handling-premature-client-disconnection-in-aiohttp
The problem is: `await drain()` does nothing because the buffer is not overflown, the buffer is not overflown because sent data are ignored and not accumulate... | [
{
"content": "\"\"\"Http related parsers and protocol.\"\"\"\n\nimport collections\nimport socket\nimport zlib\nfrom contextlib import suppress\n\nfrom .abc import AbstractPayloadWriter\nfrom .helpers import noop\n\n\n__all__ = ('PayloadWriter', 'HttpVersion', 'HttpVersion10', 'HttpVersion11',\n 'Stre... | [
{
"content": "\"\"\"Http related parsers and protocol.\"\"\"\n\nimport asyncio\nimport collections\nimport socket\nimport zlib\nfrom contextlib import suppress\n\nfrom .abc import AbstractPayloadWriter\nfrom .helpers import noop\n\n\n__all__ = ('PayloadWriter', 'HttpVersion', 'HttpVersion10', 'HttpVersion11',\n... | diff --git a/CHANGES/2499.bugfix b/CHANGES/2499.bugfix
new file mode 100644
index 00000000000..c8f280ef815
--- /dev/null
+++ b/CHANGES/2499.bugfix
@@ -0,0 +1 @@
+Fix writing to closed transport by raising `asyncio.CancelledError`
\ No newline at end of file
diff --git a/aiohttp/http_writer.py b/aiohttp/http_writer.py
i... |
saleor__saleor-9498 | Setting external methods should throw errors when the method does not exist
### What I'm trying to achieve
I'm setting an external method that does not exist
### Steps to reproduce the problem
I base64 encoded `app:1234:some-id` that was never a real id external method id:
<img width="1440" alt="image" src="htt... | [
{
"content": "from typing import Optional\n\nimport graphene\nfrom django.core.exceptions import ValidationError\n\nfrom ....checkout.error_codes import CheckoutErrorCode\nfrom ....checkout.fetch import fetch_checkout_info, fetch_checkout_lines\nfrom ....checkout.utils import (\n delete_external_shipping_id,... | [
{
"content": "from typing import Optional\n\nimport graphene\nfrom django.core.exceptions import ValidationError\n\nfrom ....checkout.error_codes import CheckoutErrorCode\nfrom ....checkout.fetch import fetch_checkout_info, fetch_checkout_lines\nfrom ....checkout.utils import (\n delete_external_shipping_id,... | diff --git a/saleor/graphql/checkout/mutations/checkout_delivery_method_update.py b/saleor/graphql/checkout/mutations/checkout_delivery_method_update.py
index 8b027083129..a3cf5ff640d 100644
--- a/saleor/graphql/checkout/mutations/checkout_delivery_method_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_deliv... |
geopandas__geopandas-1933 | CI: ERROR at setup of TestCasting.test_astype_string with pandas master
We have a failure with pandas master caused by https://github.com/pandas-dev/pandas/pull/40998. See the [CI log](https://github.com/geopandas/geopandas/runs/2484443872?check_suite_focus=true#step:6:2962).
It is one of the pandas extension tests ... | [
{
"content": "from collections.abc import Iterable\nimport numbers\nimport operator\nimport warnings\nimport inspect\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import (\n ExtensionArray,\n ExtensionDtype,\n register_extension_dtype,\n)\n\nimport shapely\nimport shapely.affin... | [
{
"content": "from collections.abc import Iterable\nimport numbers\nimport operator\nimport warnings\nimport inspect\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import (\n ExtensionArray,\n ExtensionDtype,\n register_extension_dtype,\n)\n\nimport shapely\nimport shapely.affin... | diff --git a/geopandas/array.py b/geopandas/array.py
index d2b1ea2a8e..8686879d0f 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -1030,7 +1030,7 @@ def astype(self, dtype, copy=True):
pd_dtype = pd.api.types.pandas_dtype(dtype)
if isinstance(pd_dtype, pd.StringDtype):
... |
pymedusa__Medusa-10764 | testRename times out on HUGE tv-shows
**Describe the bug**
When renaming HUGE tv-shows (like simpsons) then testRename makes a timeout.
**To Reproduce**
Steps to reproduce the behavior:
1: go to simpsons
2: pres preview
3: pres rename selected
**Expected behavior**
i expected that it did not make a timeoou... | [
{
"content": "# coding=utf-8\n\"\"\"Request handler for series operations.\"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom medusa import app, db, notifiers, ui\nfrom medusa.helper.exceptions import ShowDirectoryNotFoundException\nfrom medusa.logger.adapters.style import BraceAdapter\nfr... | [
{
"content": "# coding=utf-8\n\"\"\"Request handler for series operations.\"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom medusa import app, db, notifiers, ui\nfrom medusa.helper.exceptions import ShowDirectoryNotFoundException\nfrom medusa.logger.adapters.style import BraceAdapter\nfr... | diff --git a/medusa/server/api/v2/series_operation.py b/medusa/server/api/v2/series_operation.py
index 7a063ce4bb..ae1a717605 100644
--- a/medusa/server/api/v2/series_operation.py
+++ b/medusa/server/api/v2/series_operation.py
@@ -62,7 +62,9 @@ def post(self, series_slug):
except ShowDirectoryNotFoundExcep... |
pypa__cibuildwheel-926 | Move the default for PyPy to manylinux2014
@mattip suggested moving to manylinux2014, since pypy is looking at dropping manylinux2010 in the future. cibuildwheel 2.3 (which will add pypy3.8) might be a good place to do it.
| [
{
"content": "import os\nimport sys\nimport traceback\nfrom configparser import ConfigParser\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom typing import (\n Any,\n Dict,\n Iterator,\n List,\n Mapping,\n NamedTuple,\n Optional,\n Set,\n Tuple,\n Union,\n)\n\... | [
{
"content": "import os\nimport sys\nimport traceback\nfrom configparser import ConfigParser\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom typing import (\n Any,\n Dict,\n Iterator,\n List,\n Mapping,\n NamedTuple,\n Optional,\n Set,\n Tuple,\n Union,\n)\n\... | diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py
index 9a207e9e0..c683ec3b1 100644
--- a/cibuildwheel/options.py
+++ b/cibuildwheel/options.py
@@ -469,10 +469,8 @@ def build_options(self, identifier: Optional[str]) -> BuildOptions:
)
if not config_value:
- ... |
openstates__openstates-scrapers-3132 | NM-scrape failing since at least 2020-01-27
NM-scrape has failed 5 times since 2020-01-27
Logs:
```
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/**BACKUPS/PGUSER**-vRcYrsYN-py3.7/bin/pupa", line 11, in <module>
load_entry_point('pupa==0.10.0', 'console_scripts', 'pupa')()
File "/r... | [
{
"content": "import os\nimport re\nimport csv\nimport zipfile\nimport subprocess\nfrom datetime import datetime\n\nimport lxml.html\nimport lxml.etree\n\nfrom pupa.scrape import Scraper, Bill\n\n\ndef session_slug(session):\n session_type = \"Special\" if session.endswith(\"S\") else \"Regular\"\n return... | [
{
"content": "import os\nimport re\nimport csv\nimport zipfile\nimport subprocess\nfrom datetime import datetime\n\nimport lxml.html\nimport lxml.etree\n\nfrom pupa.scrape import Scraper, Bill\n\n\ndef session_slug(session):\n session_type = \"Special\" if session.endswith(\"S\") else \"Regular\"\n return... | diff --git a/openstates/nm/bills.py b/openstates/nm/bills.py
index 384aeac008..759e6390dd 100644
--- a/openstates/nm/bills.py
+++ b/openstates/nm/bills.py
@@ -328,6 +328,7 @@ def scrape_actions(self, chamber_letter, bills):
"7645": ("motion to reconsider adopted", None),
"7649": ("printed", No... |
Cog-Creators__Red-DiscordBot-5120 | `[p]warn` accepts non-positive int points values
### What Red version are you using?
3.4.9
### Cog name
Warnings
### Command name
warn
### What did you expect to happen?
An error when trying to run `[p]warn` with a negative or 0 number of points for a custom reason.
### What actually happened?
It blindly accep... | [
{
"content": "import asyncio\nimport contextlib\nfrom datetime import timezone\nfrom collections import namedtuple\nfrom copy import copy\nfrom typing import Union, Optional, Literal\n\nimport discord\n\nfrom redbot.cogs.warnings.helpers import (\n warning_points_add_check,\n get_command_for_exceeded_poin... | [
{
"content": "import asyncio\nimport contextlib\nfrom datetime import timezone\nfrom collections import namedtuple\nfrom copy import copy\nfrom typing import Union, Optional, Literal\n\nimport discord\n\nfrom redbot.cogs.warnings.helpers import (\n warning_points_add_check,\n get_command_for_exceeded_poin... | diff --git a/redbot/cogs/warnings/warnings.py b/redbot/cogs/warnings/warnings.py
index c990d4af761..ea1f488af02 100644
--- a/redbot/cogs/warnings/warnings.py
+++ b/redbot/cogs/warnings/warnings.py
@@ -395,6 +395,8 @@ async def warn(
if (reason_type := registered_reasons.get(reason.lower())) is None:
... |
DataDog__dd-trace-py-524 | Configuring tracer endpoint
The current tracer implementation relies on a global variable that gets initialised with the default Tracer() values. Once this is done, traces and spans can be created and published.
Now, we want to have the tracer send traces to a different endpoint. The use-case for this is that the tr... | [
{
"content": "import functools\nimport logging\nfrom os import getpid\n\nfrom .ext import system\nfrom .provider import DefaultContextProvider\nfrom .context import Context\nfrom .sampler import AllSampler, RateSampler, RateByServiceSampler\nfrom .writer import AgentWriter\nfrom .span import Span\nfrom .constan... | [
{
"content": "import functools\nimport logging\nfrom os import environ, getpid\n\nfrom .ext import system\nfrom .provider import DefaultContextProvider\nfrom .context import Context\nfrom .sampler import AllSampler, RateSampler, RateByServiceSampler\nfrom .writer import AgentWriter\nfrom .span import Span\nfrom... | diff --git a/ddtrace/tracer.py b/ddtrace/tracer.py
index df53378704a..a882393445e 100644
--- a/ddtrace/tracer.py
+++ b/ddtrace/tracer.py
@@ -1,6 +1,6 @@
import functools
import logging
-from os import getpid
+from os import environ, getpid
from .ext import system
from .provider import DefaultContextProvider
@@ -2... |
wagtail__wagtail-339 | DOM ordering of child objects in page editor is lost on validation error
If child objects within the page editor are reordered, and then a validation error occurs when the page is saved, the form is reshown with inline objects rendered in their original (saved) ordering.
| [
{
"content": "import copy\nimport re\nimport datetime\n\nfrom taggit.forms import TagWidget\nfrom modelcluster.forms import ClusterForm, ClusterFormMetaclass\n\nfrom django.template.loader import render_to_string\nfrom django.template.defaultfilters import addslashes\nfrom django.utils.safestring import mark_sa... | [
{
"content": "import copy\nimport re\nimport datetime\n\nfrom taggit.forms import TagWidget\nfrom modelcluster.forms import ClusterForm, ClusterFormMetaclass\n\nfrom django.template.loader import render_to_string\nfrom django.template.defaultfilters import addslashes\nfrom django.utils.safestring import mark_sa... | diff --git a/wagtail/wagtailadmin/edit_handlers.py b/wagtail/wagtailadmin/edit_handlers.py
index a15440016ce9..d7a5726c3b63 100644
--- a/wagtail/wagtailadmin/edit_handlers.py
+++ b/wagtail/wagtailadmin/edit_handlers.py
@@ -562,6 +562,11 @@ def __init__(self, instance=None, form=None):
child_edit_handle... |
alltheplaces__alltheplaces-3347 | Spider subway is broken
During the global build at 2021-09-15-14-42-44, spider **subway** failed with **31396 features** and **22 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-09-15-14-42-44/logs/subway.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-09-15-14-42-44/output/subway.geoj... | [
{
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\nfrom urllib.parse import urlparse\nimport json\n\n\nDAY_MAPPING = {\n \"MONDAY\": \"Mo\",\n \"TUESDAY\": \"Tu\",\n \"WEDNESDAY\": \"We\",\n \"THURSDAY\": \"... | [
{
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\nfrom urllib.parse import urlparse\nimport json\n\n\nDAY_MAPPING = {\n \"MONDAY\": \"Mo\",\n \"TUESDAY\": \"Tu\",\n \"WEDNESDAY\": \"We\",\n \"THURSDAY\": \"... | diff --git a/locations/spiders/subway.py b/locations/spiders/subway.py
index 14e392f8bf0..547b1e469e0 100644
--- a/locations/spiders/subway.py
+++ b/locations/spiders/subway.py
@@ -39,7 +39,9 @@ def parse(self, response):
def parse_restaurant(self, js):
# Note: Of the five different coordinate fields, thi... |
Parsl__parsl-1129 | Interchange KeyError due to too many heartbeat missed
Running this code snipset on Theta always fails.
```
import parsl
from parsl.providers import LocalProvider, CobaltProvider
from parsl.channels import LocalChannel
from parsl.launchers import SingleNodeLauncher, AprunLauncher
from parsl.config import Config
f... | [
{
"content": "#!/usr/bin/env python\nimport argparse\nimport zmq\nimport os\nimport sys\nimport platform\nimport random\nimport time\nimport datetime\nimport pickle\nimport logging\nimport queue\nimport threading\nimport json\n\nfrom parsl.version import VERSION as PARSL_VERSION\nfrom ipyparallel.serialize impo... | [
{
"content": "#!/usr/bin/env python\nimport argparse\nimport zmq\nimport os\nimport sys\nimport platform\nimport random\nimport time\nimport datetime\nimport pickle\nimport logging\nimport queue\nimport threading\nimport json\n\nfrom parsl.version import VERSION as PARSL_VERSION\nfrom ipyparallel.serialize impo... | diff --git a/parsl/executors/high_throughput/interchange.py b/parsl/executors/high_throughput/interchange.py
index 059c1a5841..0d4439abba 100644
--- a/parsl/executors/high_throughput/interchange.py
+++ b/parsl/executors/high_throughput/interchange.py
@@ -512,6 +512,8 @@ def start(self, poll_period=None):
... |
beetbox__beets-3169 | Errors when installed munkres is > 1.0.x
### Problem
When invoking beets, beets errors out on munkres versions newer than 1.0.x. This was introduced by https://github.com/beetbox/beets/pull/3146.
Running this command in verbose (`-vv`) mode:
```python-traceback
> beet -vv import .
Traceback (most recent call... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Softwar... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Softwar... | diff --git a/setup.py b/setup.py
index 648e6d4d47..ae8f76ff88 100755
--- a/setup.py
+++ b/setup.py
@@ -88,10 +88,14 @@ def build_manpages():
install_requires=[
'six>=1.9',
'mutagen>=1.33',
- 'munkres~=1.0.0',
'unidecode',
'musicbrainzngs>=0.4',
'pyyaml',
+ ] +... |
obspy__obspy-2294 | ZeroDivisionError reading sc3ml with zero sampling rate
obspy read_inventory does not handle the case when reading sc3ml that the sampleRateNumerator and sampleRateDenominator are *both* zero. This occasionally crops up in real world data, in which case the channel sample_rate should be set to zero.
Add a test case ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nObsPy implementation for parsing the sc3ml format to an Inventory object.\n\nThis is a modified version of obspy.io.stationxml.\n\n:author:\n Mathijs Koymans (koymans@knmi.nl), 11.2015 - [Jollyfant@GitHub]\n:copyright:\n The ObsPy Devel... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nObsPy implementation for parsing the sc3ml format to an Inventory object.\n\nThis is a modified version of obspy.io.stationxml.\n\n:author:\n Mathijs Koymans (koymans@knmi.nl), 11.2015 - [Jollyfant@GitHub]\n:copyright:\n The ObsPy Devel... | diff --git a/obspy/CONTRIBUTORS.txt b/obspy/CONTRIBUTORS.txt
index 3d5406c1eee..51591b7973e 100644
--- a/obspy/CONTRIBUTORS.txt
+++ b/obspy/CONTRIBUTORS.txt
@@ -53,6 +53,7 @@ Lopes, Rui L.
MacCarthy, Jonathan
Maggi, Alessia
Martin, Henri
+Medlin, Andrew
Megies, Tobias
Meschede, Matthias
Michelini, Alberto
diff --... |
encode__uvicorn-271 | Fix: extra chunk when body is empty
Close: #267
| [
{
"content": "import asyncio\nfrom email.utils import formatdate\nimport http\nimport logging\nimport time\nimport urllib\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\nimport httptools\n\n\ndef _get_default_headers():\n current_time = time.time()\n current_date = formatda... | [
{
"content": "import asyncio\nfrom email.utils import formatdate\nimport http\nimport logging\nimport time\nimport urllib\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\nimport httptools\n\n\ndef _get_default_headers():\n current_time = time.time()\n current_date = formatda... | diff --git a/.travis.yml b/.travis.yml
index 60f9f9b86..43be62eac 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ python:
- "3.7-dev"
install:
- - pip install -r requirements.txt
+ - pip install -U -r requirements.txt
script:
- scripts/test
diff --git a/tests/protocols/test_http.py b/te... |
scalableminds__webknossos-libs-59 | elementClass is missing in datasource-properties.json when no mag1 resolution is available
| [
{
"content": "import json\nimport re\nimport wkw\nimport logging\nimport numpy as np\n\nfrom argparse import ArgumentParser\nfrom glob import iglob\nfrom os import path, listdir\nfrom typing import Optional\nfrom .mag import Mag\nfrom typing import List\n\n\ndef create_parser():\n parser = ArgumentParser()\n... | [
{
"content": "import json\nimport re\nimport wkw\nimport logging\nimport numpy as np\n\nfrom argparse import ArgumentParser\nfrom glob import iglob\nfrom os import path, listdir\nfrom typing import Optional\nfrom .mag import Mag\nfrom typing import List\n\n\ndef create_parser():\n parser = ArgumentParser()\n... | diff --git a/wkcuber/metadata.py b/wkcuber/metadata.py
index 7e5235a80..800fd5b41 100644
--- a/wkcuber/metadata.py
+++ b/wkcuber/metadata.py
@@ -151,8 +151,6 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
else:
bbox = exact_bounding_box
- dtype = detect_dtype(dataset... |
googleapis__google-api-python-client-550 | googleapiclient/channel.py has no license header
There is no license header at all in channel.py
googleapiclient/channel.py has no license header
There is no license header at all in channel.py
| [
{
"content": "\"\"\"Channel notifications support.\n\nClasses and functions to support channel subscriptions and notifications\non those channels.\n\nNotes:\n - This code is based on experimental APIs and is subject to change.\n - Notification does not do deduplication of notification ids, that's up to\n t... | [
{
"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | diff --git a/googleapiclient/channel.py b/googleapiclient/channel.py
index 0fdb080fe72..8153fe778da 100644
--- a/googleapiclient/channel.py
+++ b/googleapiclient/channel.py
@@ -1,3 +1,17 @@
+# Copyright 2014 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you ma... |
microsoft__botbuilder-python-307 | Minor differences in what's displayed after user response 45.state-management bot
## Version
v4.50b4
## Describe the bug
There's a minor difference in what's displayed after the user responds to the bot. The javascript_nodejs bot exhibits the same behavior (see [issue 1718](https://github.com/microsoft/BotBuilder-... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport time\nimport pytz\nfrom datetime import datetime\n\nfrom botbuilder.core import ActivityHandler, ConversationState, TurnContext, UserState\nfrom botbuilder.schema import ChannelAccount\n\nfrom ... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport time\nimport pytz\nfrom datetime import datetime\n\nfrom botbuilder.core import ActivityHandler, ConversationState, TurnContext, UserState\nfrom botbuilder.schema import ChannelAccount\n\nfrom ... | diff --git a/samples/45.state-management/bots/state_management_bot.py b/samples/45.state-management/bots/state_management_bot.py
index b7bca385d..40e2640ee 100644
--- a/samples/45.state-management/bots/state_management_bot.py
+++ b/samples/45.state-management/bots/state_management_bot.py
@@ -59,7 +59,9 @@ async def on_... |
carpentries__amy-1125 | Better format to select tags
Can we have a better format to select tags? The current scrolling list makes it difficult to see which tags are selected when in 'edit' mode.
| [
{
"content": "import re\n\nfrom captcha.fields import ReCaptchaField\nfrom crispy_forms.bootstrap import FormActions\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Layout, Div, HTML, Submit, Button, Field\nfrom crispy_forms.bootstrap import AccordionGroup, Accordion\nfrom django im... | [
{
"content": "import re\n\nfrom captcha.fields import ReCaptchaField\nfrom crispy_forms.bootstrap import FormActions\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Layout, Div, HTML, Submit, Button, Field\nfrom crispy_forms.bootstrap import AccordionGroup, Accordion\nfrom django im... | diff --git a/workshops/forms.py b/workshops/forms.py
index 3aabf15ef..b62841c6c 100644
--- a/workshops/forms.py
+++ b/workshops/forms.py
@@ -10,6 +10,7 @@
from django.core.validators import RegexValidator
from django.forms import (
HiddenInput,
+ SelectMultiple,
CheckboxSelectMultiple,
TextInput,
... |
microsoft__nni-5135 | Error: Dispatcher stream error, tuner may have crashed. When using PolicyBasedRL to do nas and set concurrency>1
**Hello guys, i am using PolicyBasedRL strategy to do multi trial NAS experiments, when I set concurrency=2, the tuner crased, and concurrency=1 works just fine. Here is the error message**:
```
[2022-09-0... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\n# This file might cause import error for those who didn't install RL-related dependencies\n\nimport logging\nimport threading\nfrom multiprocessing.pool import ThreadPool\nfrom typing import Tuple\n\nimport gym\nimport nu... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\n# This file might cause import error for those who didn't install RL-related dependencies\n\nimport logging\nimport threading\nfrom multiprocessing.pool import ThreadPool\nfrom typing import Tuple\n\nimport gym\nimport nu... | diff --git a/nni/nas/strategy/_rl_impl.py b/nni/nas/strategy/_rl_impl.py
index 63c422712a..52fca7ee40 100644
--- a/nni/nas/strategy/_rl_impl.py
+++ b/nni/nas/strategy/_rl_impl.py
@@ -136,8 +136,8 @@ def step(self, action: int) -> Tuple[ObservationType, float, bool, dict]:
if self.cur_step == self.num_steps:
... |
plone__Products.CMFPlone-2915 | The TinyMCE pattern loads HTML as CSS and slows edit forms
## The TinyMCE pattern loads HTML as CSS and slows edit forms
### What I did:
Open an `@@edit` form with the browser's network inspector open.
### What I expect to happen:
It should load quickly and with the correct resources.
### What actually h... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom lxml import html\nfrom plone.app.layout.navigation.root import getNavigationRootObject\nfrom plone.app.theming.utils import theming_policy\nfrom plone.registry.interfaces import IRegistry\nfrom Products.CMFCore.utils import getToolByName\nfrom Products.CMFPlone.interf... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom lxml import html\nfrom plone.app.layout.navigation.root import getNavigationRootObject\nfrom plone.app.theming.utils import theming_policy\nfrom plone.registry.interfaces import IRegistry\nfrom Products.CMFCore.utils import getToolByName\nfrom Products.CMFPlone.interf... | diff --git a/Products/CMFPlone/patterns/tinymce.py b/Products/CMFPlone/patterns/tinymce.py
index c7bdab7ba7..53f81f41c6 100644
--- a/Products/CMFPlone/patterns/tinymce.py
+++ b/Products/CMFPlone/patterns/tinymce.py
@@ -48,7 +48,7 @@ def get_content_css(self, style_css=''):
files.append('/'.join([self.n... |
opendatacube__datacube-core-337 | Inconsistent command line option spelling
Command line option to `datacube` app to specify configuration file is using underscore `_` case while two other multi-word options use dashes `-`
- `--log-file`
- `--log-queries`
- `--config_file` <-- Odd one out
Most other subcommands also use `-` case for multi-word ... | [
{
"content": "# coding=utf-8\n\"\"\"\nCommon functions for click-based cli scripts.\n\"\"\"\nfrom __future__ import absolute_import\n\nimport functools\nimport logging\nimport os\nimport copy\nimport sys\n\nimport click\n\nfrom datacube import config, __version__\nfrom datacube.api.core import Datacube\nfrom da... | [
{
"content": "# coding=utf-8\n\"\"\"\nCommon functions for click-based cli scripts.\n\"\"\"\nfrom __future__ import absolute_import\n\nimport functools\nimport logging\nimport os\nimport copy\nimport sys\n\nimport click\n\nfrom datacube import config, __version__\nfrom datacube.api.core import Datacube\nfrom da... | diff --git a/datacube/ui/click.py b/datacube/ui/click.py
index 78d3f85d4c..370d2d9582 100644
--- a/datacube/ui/click.py
+++ b/datacube/ui/click.py
@@ -150,7 +150,7 @@ def _set_environment(ctx, param, value):
logfile_option = click.option('--log-file', multiple=True, callback=_add_logfile,
... |
mars-project__mars-2104 | [BUG] Ray storage case failed for Ray 1.3.0
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe the bug**
Ray storage case failed for Ray 1.3.0 .
Error message:
```
__________________________ test... | [
{
"content": "from typing import Any, Dict, List, Tuple\nfrom ..lib import sparse\nfrom ..utils import lazy_import, implements, register_ray_serializer\nfrom .base import StorageBackend, StorageLevel, ObjectInfo, register_storage_backend\nfrom .core import BufferWrappedFileObject, StorageFileObject\n\nray = laz... | [
{
"content": "from typing import Any, Dict, List, Tuple\nfrom ..lib import sparse\nfrom ..utils import lazy_import, implements, register_ray_serializer\nfrom .base import StorageBackend, StorageLevel, ObjectInfo, register_storage_backend\nfrom .core import BufferWrappedFileObject, StorageFileObject\n\nray = laz... | diff --git a/mars/storage/ray.py b/mars/storage/ray.py
index 8cfdcb4afc..1e48980740 100644
--- a/mars/storage/ray.py
+++ b/mars/storage/ray.py
@@ -73,8 +73,12 @@ def write(self, content: bytes):
def _write_close(self):
worker = ray.worker.global_worker
metadata = ray.ray_constants.OBJECT_METADATA... |
elastic__apm-agent-python-1510 | KeyError: 'otel_attributes'
elastic-apm: 6.9.0
```
KeyError: 'otel_attributes'
File "elasticapm/contrib/starlette/__init__.py", line 185, in __call__
self.client.end_transaction()
File "elasticapm/base.py", line 313, in end_transaction
transaction = self.tracer.end_transaction(result, name, duratio... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 85cf3af45..462fd2e4f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -29,6 +29,19 @@ endif::[]
//===== Bug fixes
//
+
+=== Unreleased
+
+// Unreleased changes go here
+// When the next release happens, nest these changes under the "Python Agent ... |
PrefectHQ__prefect-6105 | Local file system should only be exposed as anonymous block and should not be configurable from the UI
## Problem
When building a local deployment using an implicitly created local-file-system block as here:
https://github.com/anna-geller/prefect-deployment-patterns/blob/2530e57cc1769f4cdf8476ee795b762068fafb94/a_p... | [
{
"content": "import abc\nimport glob\nimport json\nimport shutil\nimport sys\nimport urllib.parse\nfrom pathlib import Path\nfrom typing import Optional\n\nimport anyio\nimport fsspec\nfrom pydantic import Field, SecretStr, validator\n\nfrom prefect.blocks.core import Block\nfrom prefect.utilities.asyncutils i... | [
{
"content": "import abc\nimport glob\nimport json\nimport shutil\nimport sys\nimport urllib.parse\nfrom pathlib import Path\nfrom typing import Optional\n\nimport anyio\nimport fsspec\nfrom pydantic import Field, SecretStr, validator\n\nfrom prefect.blocks.core import Block\nfrom prefect.utilities.asyncutils i... | diff --git a/src/prefect/filesystems.py b/src/prefect/filesystems.py
index 83b7c7f89379..0c7cfaf1adb8 100644
--- a/src/prefect/filesystems.py
+++ b/src/prefect/filesystems.py
@@ -108,10 +108,13 @@ async def put_directory(self, local_path: str = None, to_path: str = None) -> No
if local_path is None:
... |
OpenNMT__OpenNMT-py-1117 | Bug introduced by #1114
@bpopeters
Last PR #1114 introduced a bug in the vocab preprocess.
I did not dig but it leads to an issue where when you translate, each generated sentence ends with a <unk>
I think there might be a mismatch wih EOS.
Can you look into it please ?
Thanks.
| [
{
"content": "# -*- coding: utf-8 -*-\nimport glob\nimport os\nimport codecs\n\nfrom collections import Counter, defaultdict, OrderedDict\nfrom itertools import count\nfrom functools import partial\n\nimport torch\nimport torchtext.data\nfrom torchtext.data import Field\nfrom torchtext.vocab import Vocab\n\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\nimport glob\nimport os\nimport codecs\n\nfrom collections import Counter, defaultdict, OrderedDict\nfrom itertools import count\nfrom functools import partial\n\nimport torch\nimport torchtext.data\nfrom torchtext.data import Field\nfrom torchtext.vocab import Vocab\n\nfro... | diff --git a/onmt/inputters/inputter.py b/onmt/inputters/inputter.py
index 06bfd47541..1d379a67a4 100644
--- a/onmt/inputters/inputter.py
+++ b/onmt/inputters/inputter.py
@@ -387,8 +387,8 @@ def build_vocab(train_dataset_files, fields, data_type, share_vocab,
def _merge_field_vocabs(src_field, tgt_field, vocab_size, m... |
gratipay__gratipay.com-2999 | Font problem in production
> Font from origin 'https://assets.gratipay.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://gratipay.com' is therefore not allowed access.
| [
{
"content": "\"\"\"\nHandles caching of static resources.\n\"\"\"\nfrom base64 import b64encode\nfrom hashlib import md5\n\nfrom aspen import Response\n\n\nETAGS = {}\n\n\ndef asset_etag(path):\n if path.endswith('.spt'):\n return ''\n if path in ETAGS:\n h = ETAGS[path]\n else:\n ... | [
{
"content": "\"\"\"\nHandles caching of static resources.\n\"\"\"\nfrom base64 import b64encode\nfrom hashlib import md5\n\nfrom aspen import Response\n\n\nETAGS = {}\n\n\ndef asset_etag(path):\n if path.endswith('.spt'):\n return ''\n if path in ETAGS:\n h = ETAGS[path]\n else:\n ... | diff --git a/gratipay/utils/cache_static.py b/gratipay/utils/cache_static.py
index c1bdace40b..38feb6b587 100644
--- a/gratipay/utils/cache_static.py
+++ b/gratipay/utils/cache_static.py
@@ -68,6 +68,9 @@ def add_caching_to_response(website, response, request=None, etag=None):
# https://developers.google.com/speed... |
browniebroke__django-codemod-579 | ImportError on an Apple M1 Mac related to libcst
**Describe the bug**
A clear and concise description of what the bug is.
ImportError on an Apple M1 Mac.
`libcst` seems to be installed for `x86_64`, not the required `arm64e`.
**To Reproduce**
Steps to reproduce the behavior:
% `pipx --version`
```
1.0.0
... | [
{
"content": "import inspect\nimport os\nfrom collections import defaultdict\nfrom operator import attrgetter\nfrom pathlib import Path\nfrom typing import Callable, Dict, Generator, List, Optional, Tuple, Type\n\nimport rich_click as click\nfrom libcst.codemod import CodemodContext, parallel_exec_transform_wit... | [
{
"content": "import inspect\nfrom collections import defaultdict\nfrom operator import attrgetter\nfrom pathlib import Path\nfrom typing import Callable, Dict, Generator, List, Optional, Tuple, Type\n\nimport rich_click as click\nfrom libcst.codemod import CodemodContext, parallel_exec_transform_with_prettypri... | diff --git a/src/django_codemod/cli.py b/src/django_codemod/cli.py
index a35fc51b..9648432a 100644
--- a/src/django_codemod/cli.py
+++ b/src/django_codemod/cli.py
@@ -1,5 +1,4 @@
import inspect
-import os
from collections import defaultdict
from operator import attrgetter
from pathlib import Path
@@ -16,8 +15,6 @@
... |
svthalia__concrexit-1204 | Events presence registration in app creates payment
### Describe the bug
Events presence registration in app creates payment
### How to reproduce
Steps to reproduce the behaviour:
1. Create an event with registrations
2. Register
3. Mark the registration as present _in the app_
You can simulate this by going... | [
{
"content": "from collections import OrderedDict\n\nfrom django.utils import timezone\nfrom django.utils.datetime_safe import date\nfrom django.utils.translation import gettext_lazy as _, get_language\n\nfrom events import emails\nfrom events.exceptions import RegistrationError\nfrom events.models import Event... | [
{
"content": "from collections import OrderedDict\n\nfrom django.utils import timezone\nfrom django.utils.datetime_safe import date\nfrom django.utils.translation import gettext_lazy as _, get_language\n\nfrom events import emails\nfrom events.exceptions import RegistrationError\nfrom events.models import Event... | diff --git a/website/events/services.py b/website/events/services.py
index 63773a93d..bc3c5019c 100644
--- a/website/events/services.py
+++ b/website/events/services.py
@@ -293,11 +293,9 @@ def update_registration_by_organiser(registration, member, data):
raise RegistrationError(_("You are not allowed to updat... |
elastic__apm-agent-python-1012 | occasionally raise Exception: too many values to unpack (expected 2) and 'NoneType' object is not iterable
**Describe the bug**:
occasionally raise Exception: too many values to unpack (expected 2) and 'NoneType' object is not iterable
 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 43b70096c..78178f51c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -42,6 +42,7 @@ endif::[]
===== Bug fixes
* Fix for potential `capture_body: error` hang in Starlette/FastAPI {pull}1038[#1038]
+* Fix a rare error around processing stack frame... |
freedomofpress__securedrop-1684 | Add linting for docs changes to CI
When building the project documentation locally via `make clean && sphinx-autobuild . _build/html`, as specified in the [developer docs](https://docs.securedrop.org/en/stable/development/documentation.html), nearly two dozen warnings are displayed, generating more than a full screen o... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in... | diff --git a/.travis.yml b/.travis.yml
index e16bb9e127..691561d8e2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,6 +35,10 @@ script:
- sudo chown root:root securedrop/config.py
- sudo sh -c "export DISPLAY=:1; cd securedrop/ && pytest tests/"
- ./testinfra/test.py
+ # Docs linting. Performing this step *after*... |
Cog-Creators__Red-DiscordBot-1374 | [V3/Config] Clearing a registered data group when no data has been set results in a KeyError.
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
been suggested/reported
### Type:
- [ ] Suggestion
- [x] Bug
### Brief description of the problem
W... | [
{
"content": "from pathlib import Path\nfrom typing import Tuple\n\nfrom ..json_io import JsonIO\n\nfrom .red_base import BaseDriver\n\n__all__ = [\"JSON\"]\n\n\nclass JSON(BaseDriver):\n \"\"\"\n Subclass of :py:class:`.red_base.BaseDriver`.\n\n .. py:attribute:: file_name\n\n The name of the f... | [
{
"content": "from pathlib import Path\nfrom typing import Tuple\n\nfrom ..json_io import JsonIO\n\nfrom .red_base import BaseDriver\n\n__all__ = [\"JSON\"]\n\n\nclass JSON(BaseDriver):\n \"\"\"\n Subclass of :py:class:`.red_base.BaseDriver`.\n\n .. py:attribute:: file_name\n\n The name of the f... | diff --git a/redbot/core/drivers/red_json.py b/redbot/core/drivers/red_json.py
index dec2a5f5879..5471d4246e7 100644
--- a/redbot/core/drivers/red_json.py
+++ b/redbot/core/drivers/red_json.py
@@ -62,10 +62,11 @@ async def set(self, *identifiers: str, value=None):
async def clear(self, *identifiers: str):
... |
sanic-org__sanic-1716 | When calling abort() in a stream=True handler, error occurs
**Describe the bug**
When calling abort() inside a request handler with stream=True, this exception occurs in the logs:
```
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<HttpProtocol.body_append() done, defined at /usr/loc... | [
{
"content": "import asyncio\nimport os\nimport traceback\n\nfrom collections import deque\nfrom functools import partial\nfrom inspect import isawaitable\nfrom multiprocessing import Process\nfrom signal import SIG_IGN, SIGINT, SIGTERM, Signals\nfrom signal import signal as signal_func\nfrom socket import SO_R... | [
{
"content": "import asyncio\nimport os\nimport traceback\n\nfrom collections import deque\nfrom functools import partial\nfrom inspect import isawaitable\nfrom multiprocessing import Process\nfrom signal import SIG_IGN, SIGINT, SIGTERM, Signals\nfrom signal import signal as signal_func\nfrom socket import SO_R... | diff --git a/sanic/server.py b/sanic/server.py
index 41af81c0fc..bde6def7fa 100644
--- a/sanic/server.py
+++ b/sanic/server.py
@@ -364,6 +364,21 @@ def on_body(self, body):
else:
self.request.body_push(body)
+ async def body_append(self, body):
+ if (
+ self.request is None
... |
boto__boto-1771 | Exception triggered by TerminateInstances against wrong API implementation
While working with boto against an OpenStack Essex cloud, we discovered that TerminateInstances would fail with:
```
Traceback (most recent call last):
File "./terminate_one_instance.py", line 25, in <module>
conn.terminate_instances([sys... | [
{
"content": "# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and asso... | [
{
"content": "# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010, Eucalyptus Systems, Inc.\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and asso... | diff --git a/boto/ec2/instance.py b/boto/ec2/instance.py
index 254fe23075..430647e80f 100644
--- a/boto/ec2/instance.py
+++ b/boto/ec2/instance.py
@@ -340,14 +340,6 @@ def endElement(self, name, value, connection):
self.ami_launch_index = value
elif name == 'previousState':
self.previ... |
mitmproxy__mitmproxy-3675 | removing ":authority" pseudo header, then executing request crashes mitmproxy
##### Steps to reproduce the problem:
1. Run mitmproxy
2. Visit some http2 website, e.g. google.com
3. Edit the request (enter + e + 7) and remove the :authority header (d + q).
4. Replay the request (r).
5. mitmproxy crashes
Stackt... | [
{
"content": "import queue\nimport threading\nimport typing\nimport time\n\nfrom mitmproxy import log\nfrom mitmproxy import controller\nfrom mitmproxy import exceptions\nfrom mitmproxy import http\nfrom mitmproxy import flow\nfrom mitmproxy import options\nfrom mitmproxy import connections\nfrom mitmproxy.net ... | [
{
"content": "import queue\nimport threading\nimport typing\nimport time\n\nfrom mitmproxy import log\nfrom mitmproxy import controller\nfrom mitmproxy import exceptions\nfrom mitmproxy import http\nfrom mitmproxy import flow\nfrom mitmproxy import options\nfrom mitmproxy import connections\nfrom mitmproxy.net ... | diff --git a/mitmproxy/addons/clientplayback.py b/mitmproxy/addons/clientplayback.py
index c56c0e74a5..7bdaeb33b1 100644
--- a/mitmproxy/addons/clientplayback.py
+++ b/mitmproxy/addons/clientplayback.py
@@ -203,8 +203,9 @@ def start_replay(self, flows: typing.Sequence[flow.Flow]) -> None:
# https://github.... |
mlcommons__GaNDLF-590 | PyTorch security vulnerability
See https://github.com/advisories/GHSA-47fc-vmwq-366v
Need to upgrade to PyTorch 1.13.1
| [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"README.... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"README.... | diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index 3c5803184..482f017db 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -25,14 +25,12 @@ jobs:
fail-fast: false # So that remaining jobs don't instantly quit if one fails (e.g, CPU/... |
ansible__ansible-modules-core-2527 | Nonexistent exception in ec2_asg.py
##### ISSUE TYPE
Bug Report
##### COMPONENT NAME
ec2_elb
##### ANSIBLE VERSION
N/A
##### SUMMARY
The EC2 autoscaling module tries to catch a nonexist exception `boto.exception.InvalidInstance` at https://github.com/ansible/ansible-modules-core/commit/b2df875e78d6be12409bf7a3926c0... | [
{
"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/ec2_asg.py b/cloud/amazon/ec2_asg.py
index 6dacfb45140..66261fdbbd7 100644
--- a/cloud/amazon/ec2_asg.py
+++ b/cloud/amazon/ec2_asg.py
@@ -334,8 +334,12 @@ def elb_healthy(asg_connection, elb_connection, module, group_name):
# but has not yet show up in the ELB
try:
... |
dmlc__dgl-3841 | I can't run dgl/examples/pytorch/han/train_sampling.py with cuda
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
## To Reproduce
Steps to reproduce the behavior:
1. I just run dgl/examples/pytorch/han/train_sampling.py with cuda, it has an error
<!-- If you have a code sample, erro... | [
{
"content": "\"\"\"Checking and logging utilities.\"\"\"\n# pylint: disable=invalid-name\nfrom __future__ import absolute_import, division\nfrom collections.abc import Mapping\n\nfrom ..base import DGLError\nfrom .._ffi.function import _init_api\nfrom .. import backend as F\n\ndef prepare_tensor(g, data, name)... | [
{
"content": "\"\"\"Checking and logging utilities.\"\"\"\n# pylint: disable=invalid-name\nfrom __future__ import absolute_import, division\nfrom collections.abc import Mapping\n\nfrom ..base import DGLError\nfrom .._ffi.function import _init_api\nfrom .. import backend as F\n\ndef prepare_tensor(g, data, name)... | diff --git a/include/dgl/aten/coo.h b/include/dgl/aten/coo.h
index f9e187f9d38e..86359a4a84c8 100644
--- a/include/dgl/aten/coo.h
+++ b/include/dgl/aten/coo.h
@@ -47,6 +47,8 @@ struct COOMatrix {
bool row_sorted = false;
/*! \brief whether the column indices per row are sorted */
bool col_sorted = false;
+ /*... |
sanic-org__sanic-2659 | FALLBACK_ERROR_FORMAT does not work with empty()
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
Today I tested a handler which always returns `empty()` (see example below).
I was quite confused by the format of the errors, as they were all in HTML form... | [
{
"content": "\"\"\"\nSanic `provides a pattern\n<https://sanicframework.org/guide/best-practices/exceptions.html#using-sanic-exceptions>`_\nfor providing a response when an exception occurs. However, if you do no handle\nan exception, it will provide a fallback. There are three fallback types:\n\n- HTML - *def... | [
{
"content": "\"\"\"\nSanic `provides a pattern\n<https://sanicframework.org/guide/best-practices/exceptions.html#using-sanic-exceptions>`_\nfor providing a response when an exception occurs. However, if you do no handle\nan exception, it will provide a fallback. There are three fallback types:\n\n- HTML - *def... | diff --git a/sanic/errorpages.py b/sanic/errorpages.py
index a2d02bf0c7..6354210a32 100644
--- a/sanic/errorpages.py
+++ b/sanic/errorpages.py
@@ -406,16 +406,13 @@ def escape(text):
v: k for k, v in RENDERERS_BY_CONTENT_TYPE.items()
}
+# Handler source code is checked for which response types it returns with t... |
statsmodels__statsmodels-7703 | BUG: Remove reset of seeding in the ML EM `fit` method of `Factor`
- [x] closes #7357
- [x] tests added / passed.
- [x] code/documentation is well formatted.
- [x] properly formatted commit message. See
[NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-t... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport warnings\n\nimport numpy as np\nfrom numpy.linalg import eigh, inv, norm, matrix_rank\nimport pandas as pd\nfrom scipy.optimize import minimize\n\nfrom statsmodels.tools.decorators import cache_readonly\nfrom statsmodels.base.model import Model\nfrom statsmodels.i... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport warnings\n\nimport numpy as np\nfrom numpy.linalg import eigh, inv, norm, matrix_rank\nimport pandas as pd\nfrom scipy.optimize import minimize\n\nfrom statsmodels.tools.decorators import cache_readonly\nfrom statsmodels.base.model import Model\nfrom statsmodels.i... | diff --git a/statsmodels/multivariate/factor.py b/statsmodels/multivariate/factor.py
index 1fd2e35854d..cbb4462a468 100644
--- a/statsmodels/multivariate/factor.py
+++ b/statsmodels/multivariate/factor.py
@@ -433,12 +433,13 @@ def nscore(par):
return FactorResults(self)
- def _fit_ml_em(self, iter):
+ ... |
liberapay__liberapay.com-1734 | "Your request has been rejected by our software"
On login, I keep getting this error:
```
URL: https://liberapay.com/~1609406/giving/
Method: POST
Referer: b'https://liberapay.com/~1609406/giving/'
Response code: 403
Response message: 'A security check has failed. Please make sure your browser is configured to ... | [
{
"content": "# https://github.com/liberapay/liberapay.com/issues/1451\nimport sys\n_init_modules = globals().get('_init_modules')\nif _init_modules:\n for name in list(sys.modules):\n if name not in _init_modules:\n sys.modules.pop(name, None)\nelse:\n _init_modules = set(sys.modules.ke... | [
{
"content": "# https://github.com/liberapay/liberapay.com/issues/1451\nimport sys\n_init_modules = globals().get('_init_modules')\nif _init_modules:\n for name in list(sys.modules):\n if name not in _init_modules:\n sys.modules.pop(name, None)\nelse:\n _init_modules = set(sys.modules.ke... | diff --git a/liberapay/main.py b/liberapay/main.py
index 92db294f43..9869240be8 100644
--- a/liberapay/main.py
+++ b/liberapay/main.py
@@ -210,17 +210,16 @@ def _assert(x):
turn_socket_error_into_50X,
algorithm['get_response_for_exception'],
+ delegate_error_to_simplate,
+ tell_sentry,
+
bypass_c... |
joke2k__faker-535 | Not possible to seed .binary()
It is not possible to seed the method ``binary`` (see also issue #484)
```
>>> from faker import Faker
>>> f1 = Faker()
>>> f1.seed(4321)
>>> print(f1.binary()[0:100])
b'm\x17 ;\xca\x88\xb6\xb1\x8c/6Qmo\x02\xfa\xc3g\xf9R\xc5\xc6\x84\n\xac\xa3\x99\xb9Xs\xc3D\xa5g\xbb\xe5YU)\x95\tt\... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nimport hashlib\nimport string\nimport uuid\nimport os\n\nfrom faker.generator import random\nfrom faker.providers.date_time import Provider as DatetimeProvider\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n # Locale... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nimport hashlib\nimport string\nimport uuid\nimport os\nimport sys\n\nfrom faker.generator import random\nfrom faker.providers.date_time import Provider as DatetimeProvider\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n... | diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index d219e0c508..679f84b925 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -5,6 +5,7 @@
import string
import uuid
import os
+import sys
from faker.generator import random
from faker.provider... |
Qiskit__qiskit-5613 | Avoid dependencies duplicity
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
Currently, when you want to add or update a dependency, you need to do that... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ... | diff --git a/MANIFEST.in b/MANIFEST.in
index 47fe2fa2830a..6621b8282988 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,5 @@
include LICENSE.txt
+include requirements.txt
include qiskit/qasm/libs/*.inc
include qiskit/schemas/*.json
include qiskit/VERSION.txt
diff --git a/setup.py b/setup.py
index c770d889c69e... |
Pylons__pyramid-2278 | pyobject truncates code at comment
See https://github.com/sphinx-doc/sphinx/issues/2253
Example rendered docs:
http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tour.html#handling-web-requests-and-responses
rst syntax:
https://github.com/Pylons/pyramid/blame/master/docs/quick_tour.rst#L119-L120
Source c... | [
{
"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt. A copy of ... | [
{
"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt. A copy of ... | diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index b5e90f684e..7fc45ddd23 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -435,7 +435,7 @@ commenting out a line. For example, instead of:
:linenos:
[app:main]
- ...
+ # ... elided configuration
pyramid.includes =
... |
coala__coala-5845 | require_setting docstring contains strange " and following"
In require_setting we see
```
:param arr: A list containing a description in [0] and the name
of the bears who need this setting in [1] and
following.
```
"and following" should be remove... | [
{
"content": "import copy\nimport logging\nimport platform\nimport os\nfrom collections import OrderedDict\n\nfrom termcolor import colored\n\ntry:\n # This import has side effects and is needed to make input() behave nicely\n import readline # pylint: disable=unused-import\nexcept ImportError: # pragma... | [
{
"content": "import copy\nimport logging\nimport platform\nimport os\nfrom collections import OrderedDict\n\nfrom termcolor import colored\n\ntry:\n # This import has side effects and is needed to make input() behave nicely\n import readline # pylint: disable=unused-import\nexcept ImportError: # pragma... | diff --git a/coalib/output/ConsoleInteraction.py b/coalib/output/ConsoleInteraction.py
index 188af06809..3bf1a74008 100644
--- a/coalib/output/ConsoleInteraction.py
+++ b/coalib/output/ConsoleInteraction.py
@@ -547,8 +547,7 @@ def require_setting(setting_name, arr, section):
:param setting_name: Name of the sett... |
Pylons__pyramid-2279 | pyobject truncates code at comment
See https://github.com/sphinx-doc/sphinx/issues/2253
Example rendered docs:
http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tour.html#handling-web-requests-and-responses
rst syntax:
https://github.com/Pylons/pyramid/blame/master/docs/quick_tour.rst#L119-L120
Source c... | [
{
"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt. A copy of ... | [
{
"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt. A copy of ... | diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 99a939b11c..281b252e25 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -435,7 +435,7 @@ commenting out a line. For example, instead of:
:linenos:
[app:main]
- ...
+ # ... elided configuration
pyramid.includes =
... |
Pylons__pyramid-2277 | pyobject truncates code at comment
See https://github.com/sphinx-doc/sphinx/issues/2253
Example rendered docs:
http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tour.html#handling-web-requests-and-responses
rst syntax:
https://github.com/Pylons/pyramid/blame/master/docs/quick_tour.rst#L119-L120
Source c... | [
{
"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt. A copy of ... | [
{
"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt. A copy of ... | diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 5103bb6b82..923fde4363 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -447,7 +447,7 @@ commenting out a line. For example, instead of:
:linenos:
[app:main]
- ...
+ # ... elided configuration
pyramid.includes =
... |
plotly__dash-1493 | [BUG] dash doesn't get imported when a file named "org.py", "dash.py", or "test.py" with specific content is present in the current directory // "AttributeError: module 'dash' has no attribute 'Dash'"
**Describe your context**
```
dash (1.9.1)
dash-core-components (1.8.1)
dash-html-components (1.0.2)
dash-render... | [
{
"content": "from .dash import Dash, no_update # noqa: F401\nfrom . import dependencies # noqa: F401\nfrom . import development # noqa: F401\nfrom . import exceptions # noqa: F401\nfrom . import resources # noqa: F401\nfrom .version import __version__ # noqa: F401\nfrom ._callback_context import callback... | [
{
"content": "# pylint: disable=C0413\n# __plotly_dash is for the \"make sure you don't have a dash.py\" check\n# must come before any other imports.\n__plotly_dash = True\nfrom .dash import Dash, no_update # noqa: F401,E402\nfrom . import dependencies # noqa: F401,E402\nfrom . import development # noqa: F40... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed58be33f6..64f31badd2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
All notable changes to `dash` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
+## [UNRELEASED]
+### Fixed
+- [#1493](https://github... |
Kinto__kinto-555 | 500 error when json validation fails with additional properties
`<ValidationError: "Additional properties are not allowed ('blockID', 'id' were unexpected)">`
```
File "/home/mathieu/Code/Mozilla/cliquet/cliquet/resource/__init__.py", line 395, in put
new_record = self.process_record(post_record, old=existing)
... | [
{
"content": "import copy\n\nimport jsonschema\nfrom cliquet import resource\nfrom cliquet.errors import raise_invalid\nfrom jsonschema import exceptions as jsonschema_exceptions\nfrom pyramid.security import Authenticated\nfrom pyramid.settings import asbool\n\nfrom kinto.views import object_exists_or_404\n\n\... | [
{
"content": "import copy\n\nimport jsonschema\nfrom cliquet import resource\nfrom cliquet.errors import raise_invalid\nfrom jsonschema import exceptions as jsonschema_exceptions\nfrom pyramid.security import Authenticated\nfrom pyramid.settings import asbool\n\nfrom kinto.views import object_exists_or_404\n\n\... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index ae2b8ad55..64ff64336 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -8,6 +8,7 @@ This document describes changes between each past release.
**Bug fixes**
+- Fix crash in JSON schema validation when additional properties are provided (fixes #548)
- Strip internal... |
open-mmlab__mmdetection-1404 | assert len(indices) == self.total_size error during multiple GPU training
I am trying to train my dataset on 8 GPU's. However, after calling `./dist_train.sh` this error assertion appeares:
Traceback (most recent call last):
File "./tools/train.py", line 113, in <module>
main() ... | [
{
"content": "from __future__ import division\nimport math\n\nimport numpy as np\nimport torch\nfrom mmcv.runner.utils import get_dist_info\nfrom torch.utils.data import DistributedSampler as _DistributedSampler\nfrom torch.utils.data import Sampler\n\n\nclass DistributedSampler(_DistributedSampler):\n\n def... | [
{
"content": "from __future__ import division\nimport math\n\nimport numpy as np\nimport torch\nfrom mmcv.runner.utils import get_dist_info\nfrom torch.utils.data import DistributedSampler as _DistributedSampler\nfrom torch.utils.data import Sampler\n\n\nclass DistributedSampler(_DistributedSampler):\n\n def... | diff --git a/mmdet/datasets/loader/sampler.py b/mmdet/datasets/loader/sampler.py
index 6c529008249..c6109388d13 100644
--- a/mmdet/datasets/loader/sampler.py
+++ b/mmdet/datasets/loader/sampler.py
@@ -132,8 +132,12 @@ def __iter__(self):
math.ceil(
size * 1.0 / self.samples... |
mars-project__mars-1507 | [BUG]some bugs about `mt.split`
## Describe the bug
I find `mt.split` does not work well when i try to use `mt.unique` and `mt.split` to group a sorted array.
I find two bugs:
- `mt.split` does not support tuple and array as the first argument. Could you consider supporting this for convenience of usage? See below... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | diff --git a/mars/tensor/base/split.py b/mars/tensor/base/split.py
index 3de9acdce9..290929b95f 100644
--- a/mars/tensor/base/split.py
+++ b/mars/tensor/base/split.py
@@ -21,6 +21,7 @@
from ...lib.sparse.core import get_array_module
from ...core import ExecutableTuple
from ..core import Tensor
+from ..datasource imp... |
Lightning-AI__pytorch-lightning-1477 | Learning rate scheduler should step after each optimizer step
## 🐛 Bug
I'm not sure that this is a bug or if it is a deliberate design decision, but right now the learning rate schedule gets updated at every "step" which actually corresponds to every forward pass. I think a more standard implementation would have t... | [
{
"content": "\"\"\"\nThe lightning training loop handles everything except the actual computations of your model.\n To decide what will happen in your training loop, define the `training_step` function.\n\nBelow are all the things lightning automates for you in the training loop.\n\nAccumulated gradients\n----... | [
{
"content": "\"\"\"\nThe lightning training loop handles everything except the actual computations of your model.\n To decide what will happen in your training loop, define the `training_step` function.\n\nBelow are all the things lightning automates for you in the training loop.\n\nAccumulated gradients\n----... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0d8bdfc84c67..e3d6110c523ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,20 +24,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Changed the default behaviour to no longer include a NaN check with each training iteration. (... |
lisa-lab__pylearn2-1300 | test_video.test_spatiotemporal_cubes is randomly failing
The test `utils.tests.test_video.test_spatiotemporal_cubes` seems to be randomly failing on some Travis builds. Both @jych and @daemonmaker have experienced this. From [comments in the code](https://github.com/lisa-lab/pylearn2/blob/master/pylearn2/utils/tests/te... | [
{
"content": "\"\"\"\nUtilities for working with videos, pulling out patches, etc.\n\"\"\"\nimport numpy\n\nfrom pylearn2.compat import OrderedDict\nfrom pylearn2.utils.rng import make_np_rng\n\n__author__ = \"David Warde-Farley\"\n__copyright__ = \"Copyright 2011, David Warde-Farley / Universite de Montreal\"\... | [
{
"content": "\"\"\"\nUtilities for working with videos, pulling out patches, etc.\n\"\"\"\nimport numpy\n\nfrom pylearn2.compat import OrderedDict\nfrom pylearn2.utils.rng import make_np_rng\n\n__author__ = \"David Warde-Farley\"\n__copyright__ = \"Copyright 2011, David Warde-Farley / Universite de Montreal\"\... | diff --git a/pylearn2/utils/video.py b/pylearn2/utils/video.py
index f00707793e..e5d77739ee 100644
--- a/pylearn2/utils/video.py
+++ b/pylearn2/utils/video.py
@@ -131,8 +131,8 @@ def spatiotemporal_cubes(file_tuples, shape, n_patches=numpy.inf, rng=None):
# fall within frame.
last_row = video_height -... |
dask__dask-10765 | Exception from `validate_key` is misleading for composite keys
When validating a key tuple with an invalid component, the exception is currently not helpful for identifying the problem and might even be misleading:
```python
import numpy as np
from dask.core import validate_key
validate_key((1, np.int64(2), 3))
... | [
{
"content": "from __future__ import annotations\n\nfrom collections import defaultdict\nfrom collections.abc import Collection, Iterable, Mapping\nfrom typing import Any, Literal, TypeVar, cast, overload\n\nfrom dask.typing import Graph, Key, NoDefault, no_default\n\n\ndef ishashable(x):\n \"\"\"Is x hashab... | [
{
"content": "from __future__ import annotations\n\nfrom collections import defaultdict\nfrom collections.abc import Collection, Iterable, Mapping\nfrom typing import Any, Literal, TypeVar, cast, overload\n\nfrom dask.typing import Graph, Key, NoDefault, no_default\n\n\ndef ishashable(x):\n \"\"\"Is x hashab... | diff --git a/dask/core.py b/dask/core.py
index ef75ca563cd..e00e4fb8afc 100644
--- a/dask/core.py
+++ b/dask/core.py
@@ -218,9 +218,26 @@ def iskey(key: object) -> bool:
def validate_key(key: object) -> None:
- """Validate the format of a dask key."""
- if not iskey(key):
- raise TypeError(f"Unexpecte... |
dbt-labs__dbt-core-1120 | Issue with caching when views outside of dbt schemas select from dbt-managed schemas
## Issue
### Issue description
dbt's caching will fail hard on PG/Redshift if there exists a view _outside_ of a dbt-controlled schema that depends on a relation _inside_ of a dbt controlled schema.
### Results
```
InternalExc... | [
{
"content": "import psycopg2\n\nfrom contextlib import contextmanager\n\nimport dbt.adapters.default\nimport dbt.compat\nimport dbt.exceptions\nimport agate\n\nfrom dbt.logger import GLOBAL_LOGGER as logger\n\n\nGET_RELATIONS_OPERATION_NAME = 'get_relations_data'\n\n\nclass PostgresAdapter(dbt.adapters.default... | [
{
"content": "import psycopg2\n\nfrom contextlib import contextmanager\n\nimport dbt.adapters.default\nimport dbt.compat\nimport dbt.exceptions\nimport agate\n\nfrom dbt.logger import GLOBAL_LOGGER as logger\n\n\nGET_RELATIONS_OPERATION_NAME = 'get_relations_data'\n\n\nclass PostgresAdapter(dbt.adapters.default... | diff --git a/dbt/adapters/postgres/impl.py b/dbt/adapters/postgres/impl.py
index a0a03967931..804531a5c88 100644
--- a/dbt/adapters/postgres/impl.py
+++ b/dbt/adapters/postgres/impl.py
@@ -158,7 +158,10 @@ def _link_cached_relations(self, manifest, schemas):
identifier=ref... |
bramstroker__homeassistant-powercalc-1183 | Measurement - Crash when nudging on first iteration
The App crashes when trying to nudge on the first iteration of the measurement loop.
When fixing this issue, I also realised that the new power value returned from the nudge_and_remeasure method is ignored and the power value of the last iteration saved.
Error m... | [
{
"content": "from __future__ import annotations\n\nimport csv\nimport gzip\nimport json\nimport logging\nimport os\nimport re\nimport shutil\nimport sys\nimport time\nfrom dataclasses import asdict, dataclass\nfrom datetime import datetime as dt\nfrom io import TextIOWrapper\nfrom pathlib import Path\nfrom typ... | [
{
"content": "from __future__ import annotations\n\nimport csv\nimport gzip\nimport json\nimport logging\nimport os\nimport re\nimport shutil\nimport sys\nimport time\nfrom dataclasses import asdict, dataclass\nfrom datetime import datetime as dt\nfrom io import TextIOWrapper\nfrom pathlib import Path\nfrom typ... | diff --git a/utils/measure/measure.py b/utils/measure/measure.py
index 0fdfe8321..2ca53d3c3 100644
--- a/utils/measure/measure.py
+++ b/utils/measure/measure.py
@@ -322,7 +322,7 @@ def start(self) -> None:
try:
power = self.take_power_measurement(variation_start_time)
... |
ansible-collections__community.vmware-806 | vmware_cluster_info returns enabled_vsan as a list and not string
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print... | diff --git a/changelogs/fragments/805-vmware_cluster_info.yml b/changelogs/fragments/805-vmware_cluster_info.yml
new file mode 100644
index 0000000000..f9d4b0f304
--- /dev/null
+++ b/changelogs/fragments/805-vmware_cluster_info.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - vmware_cluster_info - Fix a bug that returned enabled_vs... |
beetbox__beets-4147 | Import is slow with inline field in aunique
<!--
Describe your problem, feature request, or discussion topic here.
Please fill out this and the "Setup" section below and remember to include
enough detail so that other people can reproduce the problem.
-->
### Problem
Running this command in verbose (`-vv`) ... | [
{
"content": "# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | [
{
"content": "# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | diff --git a/beets/dbcore/query.py b/beets/dbcore/query.py
index e8e3d1f4a4..96476a5b16 100644
--- a/beets/dbcore/query.py
+++ b/beets/dbcore/query.py
@@ -443,7 +443,7 @@ def clause(self):
return self.clause_with_joiner('and')
def match(self, item):
- return all([q.match(item) for q in self.subqu... |
blakeblackshear__frigate-8661 | [Support]: When restarting Frigate, it raises AttributeError: 'Rknn' object has no attribute 'rknn'
### Describe the problem you are having
Hi, something for the dev branch again with an orange pi 5 plus.
I noticed that when saving the config and restarting frigate or even just triggering the restart frigate c... | [
{
"content": "import logging\nimport os.path\nimport urllib.request\nfrom typing import Literal\n\nimport numpy as np\n\ntry:\n from hide_warnings import hide_warnings\nexcept: # noqa: E722\n\n def hide_warnings(func):\n pass\n\n\nfrom pydantic import Field\n\nfrom frigate.detectors.detection_api ... | [
{
"content": "import logging\nimport os.path\nimport urllib.request\nfrom typing import Literal\n\nimport numpy as np\n\ntry:\n from hide_warnings import hide_warnings\nexcept: # noqa: E722\n\n def hide_warnings(func):\n pass\n\n\nfrom pydantic import Field\n\nfrom frigate.detectors.detection_api ... | diff --git a/frigate/detectors/plugins/rknn.py b/frigate/detectors/plugins/rknn.py
index a35721cedb..38beec3b24 100644
--- a/frigate/detectors/plugins/rknn.py
+++ b/frigate/detectors/plugins/rknn.py
@@ -62,10 +62,11 @@ def __init__(self, config: RknnDetectorConfig):
)
)
- if "rk35... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.