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 ⌀ |
|---|---|---|---|---|
saulpw__visidata-1556 | [sqlite] Selecting table from the CLI not working
**Small description**
Selecting a sqlite table from the CLI is not working
**Expected result**
Go directly to a sqlite table from the CLI args.
**Actual result with screenshot**
https://asciinema.org/a/oizQ0C2Wmz8D9XOrUesiU69Sq
**Steps to reproduce with ... | [
{
"content": "#\n# Usage: $0 [<options>] [<input> ...]\n# $0 [<options>] --play <cmdlog> [--batch] [-w <waitsecs>] [-o <output>] [field=value ...]\n\n__version__ = '2.11dev'\n__version_info__ = 'saul.pw/VisiData v' + __version__\n\nfrom copy import copy\nimport os\nimport io\nimport sys\nimport locale\ni... | [
{
"content": "#\n# Usage: $0 [<options>] [<input> ...]\n# $0 [<options>] --play <cmdlog> [--batch] [-w <waitsecs>] [-o <output>] [field=value ...]\n\n__version__ = '2.11dev'\n__version_info__ = 'saul.pw/VisiData v' + __version__\n\nfrom copy import copy\nimport os\nimport io\nimport sys\nimport locale\ni... | diff --git a/visidata/main.py b/visidata/main.py
index 7c818bbcc..0be58c6f6 100755
--- a/visidata/main.py
+++ b/visidata/main.py
@@ -286,7 +286,8 @@ def main_vd():
vd.warning(f'no sheet "{startsheet}"')
continue
- vd.sync(vs.ensureLoaded())
+ vs.... |
pytest-dev__pytest-django-910 | Handle transaction.atomic(durable=True)
This argument will be introduced in Django 3.2: https://docs.djangoproject.com/en/3.2/topics/db/transactions/#controlling-transactions-explicitly
It's used to make sure that atomic blocks aren't nested and naturally this fails when running the test suite. The django `TestCase`... | [
{
"content": "\"\"\"All pytest-django fixtures\"\"\"\n\n\nimport os\nfrom contextlib import contextmanager\nfrom functools import partial\n\nimport pytest\n\nfrom . import live_server_helper\nfrom .django_compat import is_django_unittest\nfrom .lazy_django import skip_if_no_django\n\n__all__ = [\n \"django_d... | [
{
"content": "\"\"\"All pytest-django fixtures\"\"\"\n\n\nimport os\nfrom contextlib import contextmanager\nfrom functools import partial\n\nimport pytest\n\nfrom . import live_server_helper\nfrom .django_compat import is_django_unittest\nfrom .lazy_django import skip_if_no_django\n\n__all__ = [\n \"django_d... | diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py
index 814dcbdf5..59a6dba0e 100644
--- a/pytest_django/fixtures.py
+++ b/pytest_django/fixtures.py
@@ -147,6 +147,12 @@ class ResetSequenceTestCase(django_case):
django_case = ResetSequenceTestCase
else:
from django.test import... |
google__osv.dev-447 | Clarify max query limit on bulk query endpoint
Looks like there's [a limit to the number of queries](https://github.com/google/osv/blob/168a6b2c593d4fac2defbc8546e634256cdfa5b0/gcp/api/server.py#L92-L94) that can be submitted at once with the bulk query endpoint, which is [set to 1000](https://github.com/google/osv/blo... | [
{
"content": "# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\n\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\nimport grpc\n\nfrom osv import vulnerability_pb2 as osv_dot_vulnerability__pb2\nimport osv_service_v1_pb2 as osv__service__v1__pb2\n\n\nclass OS... | [
{
"content": "# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\n\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\nimport grpc\n\nfrom osv import vulnerability_pb2 as osv_dot_vulnerability__pb2\nimport osv_service_v1_pb2 as osv__service__v1__pb2\n\n\nclass OS... | diff --git a/docs/osv_service_v1.swagger.json b/docs/osv_service_v1.swagger.json
index a4169dbb3e4..7e503284b09 100644
--- a/docs/osv_service_v1.swagger.json
+++ b/docs/osv_service_v1.swagger.json
@@ -53,7 +53,7 @@
},
"/v1/querybatch": {
"post": {
- "summary": "Query vulnerabilities (batched) fo... |
WordPress__openverse-api-394 | page_size for /related/ endpoint is set incorrectly and causes 400 error
Currently on the main branch, `/related/` endpoint returns a 400 error. This is caused by incorrectly setting the `page_size` to the number of search results for related. When setting the `page_size`, we also check for the number to be between 0 a... | [
{
"content": "from urllib.error import HTTPError\nfrom urllib.request import urlopen\n\nfrom catalog.api.controllers import search_controller\nfrom catalog.api.models import ContentProvider\nfrom catalog.api.serializers.provider_serializers import ProviderSerializer\nfrom catalog.api.utils.exceptions import get... | [
{
"content": "from urllib.error import HTTPError\nfrom urllib.request import urlopen\n\nfrom catalog.api.controllers import search_controller\nfrom catalog.api.models import ContentProvider\nfrom catalog.api.serializers.provider_serializers import ProviderSerializer\nfrom catalog.api.utils.exceptions import get... | diff --git a/openverse_api/catalog/api/views/media_views.py b/openverse_api/catalog/api/views/media_views.py
index e083ec8f8..63c33fdbd 100644
--- a/openverse_api/catalog/api/views/media_views.py
+++ b/openverse_api/catalog/api/views/media_views.py
@@ -105,7 +105,8 @@ def related(self, request, identifier=None, *_, **_... |
jschneier__django-storages-116 | collectstatic -c fails since django 1.9 for s3 storage
it seems that since django 1.9 specificaly this PR https://github.com/django/django/commit/87d78241a2fc85e5715fb51c554fe06e91deee58 it breaks the "collectstatic -c" since it tries to validate that the root directory exists (which is empty in out case) because the... | [
{
"content": "import os\nimport posixpath\nimport mimetypes\nfrom datetime import datetime\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.core.files.base import File\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.utils.encoding im... | [
{
"content": "import os\nimport posixpath\nimport mimetypes\nfrom datetime import datetime\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.core.files.base import File\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.utils.encoding im... | diff --git a/storages/backends/s3boto.py b/storages/backends/s3boto.py
index 6f0196d62..d5d53d0e2 100644
--- a/storages/backends/s3boto.py
+++ b/storages/backends/s3boto.py
@@ -428,6 +428,13 @@ def delete(self, name):
self.bucket.delete_key(self._encode_name(name))
def exists(self, name):
+ if no... |
matrix-org__synapse-14727 | synapse returns undocumented `device` property from `GET /_matrix/client/v3/pushrules/`
Synapse's response to a `/pushrules` query looks something like:
```json5
[
"global": {
"content": { /*... */ },
"override": { /*... */ },
"room": { /*... */ },
"sender": { /*... */ },
"underride": { ... | [
{
"content": "# Copyright 2016 OpenMarket 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://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
{
"content": "# Copyright 2016 OpenMarket 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://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | diff --git a/changelog.d/14727.bugfix b/changelog.d/14727.bugfix
new file mode 100644
index 000000000000..25079496e4f7
--- /dev/null
+++ b/changelog.d/14727.bugfix
@@ -0,0 +1 @@
+Remove the unspecced `device` field from `/pushrules` responses.
diff --git a/synapse/push/clientformat.py b/synapse/push/clientformat.py
ind... |
scikit-hep__pyhf-1993 | Fix documentation for qmu_tilde test statistic
> Looking [at the docs](https://scikit-hep.org/pyhf/_generated/pyhf.infer.test_statistics.qmu_tilde.html), it seems μ^>μ is the only time we can get q~μ=0 (whether asimov or not).
The docs don't actually match equation (16) in the paper, where the first line is $\hat{\m... | [
{
"content": "\"\"\"\nCalculators for Hypothesis Testing.\n\nThe role of the calculators is to compute test statistic and\nprovide distributions of said test statistic under various\nhypotheses.\n\nUsing the calculators hypothesis tests can then be performed.\n\"\"\"\nfrom pyhf.infer.mle import fixed_poi_fit\nf... | [
{
"content": "\"\"\"\nCalculators for Hypothesis Testing.\n\nThe role of the calculators is to compute test statistic and\nprovide distributions of said test statistic under various\nhypotheses.\n\nUsing the calculators hypothesis tests can then be performed.\n\"\"\"\nfrom pyhf.infer.mle import fixed_poi_fit\nf... | diff --git a/src/pyhf/infer/calculators.py b/src/pyhf/infer/calculators.py
index 8e06a613cb..ed9642e085 100644
--- a/src/pyhf/infer/calculators.py
+++ b/src/pyhf/infer/calculators.py
@@ -418,8 +418,9 @@ def _false_case():
teststat = (qmu - qmu_A) / (2 * self.sqrtqmuA_v)
return teststat... |
comic__grand-challenge.org-1560 | Algorithm results list AJAX view is slow
Following #1553 generating a page of results is slow, 5s for 100 results. Likely an n+1 queries resulting from `interface = ComponentInterface.objects.get(slug="results-json-file")`. Might need a similar solution as in #1477. My guess is that we need to run with the HistoryPanel... | [
{
"content": "import logging\n\nfrom dal import autocomplete\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.mixins import (\n PermissionRequiredMixin,\n UserPassesTestMixin,\n)\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom... | [
{
"content": "import logging\n\nfrom dal import autocomplete\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.mixins import (\n PermissionRequiredMixin,\n UserPassesTestMixin,\n)\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom... | diff --git a/app/grandchallenge/algorithms/templates/algorithms/job_list.html b/app/grandchallenge/algorithms/templates/algorithms/job_list.html
index 3c7a0f3de5..03e5d29630 100644
--- a/app/grandchallenge/algorithms/templates/algorithms/job_list.html
+++ b/app/grandchallenge/algorithms/templates/algorithms/job_list.ht... |
cowrie__cowrie-1054 | Bug in csirtg plugin
@wesyoung Not sure when this bug started, but just looked today at my honeypots and saw this happening all over the place in the logs.
```
2018-02-11T16:53:14-0500 [twisted.internet.defer#critical] Unhandled error in Deferred:
2018-02-11T16:53:14-0500 [twisted.internet.defer#critical]
Traceb... | [
{
"content": "from __future__ import absolute_import, division\n\nimport os\nfrom datetime import datetime\n\nfrom csirtgsdk.client import Client\nfrom csirtgsdk.indicator import Indicator\n\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.core.config import CONFIG\n\nUSERNAME = os.envi... | [
{
"content": "from __future__ import absolute_import, division\n\nimport os\nfrom datetime import datetime\n\nfrom csirtgsdk.client import Client\nfrom csirtgsdk.indicator import Indicator\n\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.core.config import CONFIG\n\nUSERNAME = os.envi... | diff --git a/src/cowrie/output/csirtg.py b/src/cowrie/output/csirtg.py
index 91d4cd6bbb..80ca58d7c6 100644
--- a/src/cowrie/output/csirtg.py
+++ b/src/cowrie/output/csirtg.py
@@ -39,9 +39,10 @@ def stop(self):
def write(self, e):
peerIP = e['src_ip']
ts = e['timestamp']
- system = e['syste... |
RedHatInsights__insights-core-2743 | Remove defunct entry_points
These scripts no longer exist. We should remove the entry_points.
* [insights.tools.generate_api_config](https://github.com/RedHatInsights/insights-core/blob/master/setup.py#L23)
* [insights.tools.perf](https://github.com/RedHatInsights/insights-core/blob/master/setup.py#L24)
| [
{
"content": "import os\nimport sys\nfrom setuptools import setup, find_packages\n\n__here__ = os.path.dirname(os.path.abspath(__file__))\n\npackage_info = dict.fromkeys([\"RELEASE\", \"COMMIT\", \"VERSION\", \"NAME\"])\n\nfor name in package_info:\n with open(os.path.join(__here__, \"insights\", name)) as f... | [
{
"content": "import os\nimport sys\nfrom setuptools import setup, find_packages\n\n__here__ = os.path.dirname(os.path.abspath(__file__))\n\npackage_info = dict.fromkeys([\"RELEASE\", \"COMMIT\", \"VERSION\", \"NAME\"])\n\nfor name in package_info:\n with open(os.path.join(__here__, \"insights\", name)) as f... | diff --git a/setup.py b/setup.py
index f93ef01328..43283af7b2 100644
--- a/setup.py
+++ b/setup.py
@@ -20,8 +20,6 @@
'insights-inspect = insights.tools.insights_inspect:main',
'insights-info = insights.tools.query:main',
'insights-ocpshell= insights.ocpshell:main',
- 'gen_api = insight... |
python-poetry__poetry-5943 | AttributeError when adding a dependency group when private repo present (Poetry 1.2.0a2)
<!-- Checked checkbox should look like this: [x] -->
- [ ] I am on the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/python-poetry/poetry/i... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\n\nfrom typing import Any\n\nfrom cleo.helpers import argument\nfrom cleo.helpers import option\nfrom poetry.core.packages.dependency_group import MAIN_GROUP\nfrom tomlkit.toml_document import TOMLDocument\n\nfrom poetry.console.commands.init... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\n\nfrom typing import Any\n\nfrom cleo.helpers import argument\nfrom cleo.helpers import option\nfrom poetry.core.packages.dependency_group import MAIN_GROUP\nfrom tomlkit.toml_document import TOMLDocument\n\nfrom poetry.console.commands.init... | diff --git a/src/poetry/console/commands/add.py b/src/poetry/console/commands/add.py
index cf1cb679565..0c816f6d202 100644
--- a/src/poetry/console/commands/add.py
+++ b/src/poetry/console/commands/add.py
@@ -126,9 +126,7 @@ def handle(self) -> int:
section = poetry_content["dependencies"]
else:
... |
Pyomo__pyomo-490 | GDP bigM enforcing deactivated disjunctions
I have an indexed disjunction, among which several elements are disabled. However, the big-M transformation created active XOR constraints for the indicator variables of these deactivated disjunctions anyways.
| [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin... | diff --git a/pyomo/gdp/plugins/bigm.py b/pyomo/gdp/plugins/bigm.py
index 220696ceb35..971aad191d6 100644
--- a/pyomo/gdp/plugins/bigm.py
+++ b/pyomo/gdp/plugins/bigm.py
@@ -314,6 +314,8 @@ def _transformDisjunction(self, obj, transBlock, bigM):
obj.deactivate()
def _transformDisjunctionData(self, obj, t... |
pallets__werkzeug-1996 | FileStorage.mode attribute should be rb+
When receiving files, `werkzeug.datastructures.FileStorage` is used. The underlying stream is determined by the default stream factory.
I assume that for most people (if not all?), [`tempfile.SpooledTemporaryFile`](https://docs.python.org/3/library/tempfile.html#tempfile.Spoo... | [
{
"content": "import codecs\nimport typing as t\nfrom functools import update_wrapper\nfrom io import BytesIO\nfrom itertools import chain\nfrom itertools import repeat\nfrom itertools import tee\n\nfrom . import exceptions\nfrom ._internal import _to_str\nfrom .datastructures import FileStorage\nfrom .datastru... | [
{
"content": "import codecs\nimport typing as t\nfrom functools import update_wrapper\nfrom io import BytesIO\nfrom itertools import chain\nfrom itertools import repeat\nfrom itertools import tee\n\nfrom . import exceptions\nfrom ._internal import _to_str\nfrom .datastructures import FileStorage\nfrom .datastru... | diff --git a/CHANGES.rst b/CHANGES.rst
index 0c0bce1c9..fb02a09ff 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -92,6 +92,9 @@ Unreleased
- Fix some word matches for user agent platform when the word can be a
substring. :issue:`1923`
- The development server logs ignored SSL errors. :pr:`1967`
+- Temporary... |
python-poetry__poetry-1707 | Poetry complains that the current Python version is incompatible, then selects it for use
<!-- Checked checkbox should look like this: [x] -->
- [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/sdispater/poetry/issues) ... | [
{
"content": "import base64\nimport hashlib\nimport json\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport sysconfig\nimport warnings\n\nfrom contextlib import contextmanager\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typi... | [
{
"content": "import base64\nimport hashlib\nimport json\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport sysconfig\nimport warnings\n\nfrom contextlib import contextmanager\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typi... | diff --git a/poetry/utils/env.py b/poetry/utils/env.py
index ff95b07bb62..99be86b9488 100644
--- a/poetry/utils/env.py
+++ b/poetry/utils/env.py
@@ -508,7 +508,7 @@ def create_venv(
)
supported_python = self._poetry.package.python_constraint
- if not supported_python.allows(Version.parse(... |
aws-cloudformation__cfn-lint-2661 | False positive E0001 for CodeUri in AWS::Serverless::Function
### CloudFormation Lint Version
cfn-lint 0.76.1
### What operating system are you using?
Mac
### Describe the bug
cfn-lint gives a false-positive error when CodeUri is an S3 URI.
```E0001 Error transforming template: Resource with id [rCustomAuthoriz... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport logging\nimport os\n\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.public.exceptions import InvalidDocumentException\nfrom samtranslator.s... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport logging\nimport os\n\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.public.exceptions import InvalidDocumentException\nfrom samtranslator.s... | diff --git a/src/cfnlint/transform.py b/src/cfnlint/transform.py
index 4e6b0d4b34..157c6f0bbf 100644
--- a/src/cfnlint/transform.py
+++ b/src/cfnlint/transform.py
@@ -218,7 +218,7 @@ def _update_to_s3_uri(
if isinstance(uri_property, dict):
if len(uri_property) == 1:
for k in uri_... |
vega__altair-3074 | Include a suggestion to update frontend (Jupyterlab, ...) in mimetype error
Follow-up that comes out of #2585. Raised by @joelostblom:
> do you think we need to communicate the minimum version of JuptyerLab that support Altair 5 somewhere? I am thinking ideally directly in the error message if possible, but otherwis... | [
{
"content": "import os\n\nfrom ...utils.mimebundle import spec_to_mimebundle\nfrom ..display import Displayable\nfrom ..display import default_renderer_base\nfrom ..display import json_renderer_base\nfrom ..display import RendererRegistry\nfrom ..display import HTMLRenderer\n\nfrom .schema import SCHEMA_VERSIO... | [
{
"content": "import os\n\nfrom ...utils.mimebundle import spec_to_mimebundle\nfrom ..display import Displayable\nfrom ..display import default_renderer_base\nfrom ..display import json_renderer_base\nfrom ..display import RendererRegistry\nfrom ..display import HTMLRenderer\n\nfrom .schema import SCHEMA_VERSIO... | diff --git a/altair/vegalite/v5/display.py b/altair/vegalite/v5/display.py
index ba69e02e0..69fa41b10 100644
--- a/altair/vegalite/v5/display.py
+++ b/altair/vegalite/v5/display.py
@@ -28,8 +28,8 @@
ENTRY_POINT_GROUP = "altair.vegalite.v5.renderer" # type: str
# The display message when rendering fails
-DEFAULT_DI... |
netbox-community__netbox-14794 | DH Group 15 (3072) not selectable in UI
### Deployment Type
Self-hosted
### NetBox Version
v3.7.0
### Python Version
3.11
### Steps to Reproduce
1. Open vpn/ike proposals in UI
2. Try to select DH group 15
### Expected Behavior
A dropdown containing group 15
### Observed Behavior
DH gr... | [
{
"content": "from django.utils.translation import gettext_lazy as _\n\nfrom utilities.choices import ChoiceSet\n\n\n#\n# Tunnels\n#\n\nclass TunnelStatusChoices(ChoiceSet):\n key = 'Tunnel.status'\n\n STATUS_PLANNED = 'planned'\n STATUS_ACTIVE = 'active'\n STATUS_DISABLED = 'disabled'\n\n CHOICE... | [
{
"content": "from django.utils.translation import gettext_lazy as _\n\nfrom utilities.choices import ChoiceSet\n\n\n#\n# Tunnels\n#\n\nclass TunnelStatusChoices(ChoiceSet):\n key = 'Tunnel.status'\n\n STATUS_PLANNED = 'planned'\n STATUS_ACTIVE = 'active'\n STATUS_DISABLED = 'disabled'\n\n CHOICE... | diff --git a/netbox/vpn/choices.py b/netbox/vpn/choices.py
index edbc1fdaf31..c4ae6761982 100644
--- a/netbox/vpn/choices.py
+++ b/netbox/vpn/choices.py
@@ -179,6 +179,7 @@ class DHGroupChoices(ChoiceSet):
(GROUP_2, _('Group {n}').format(n=2)),
(GROUP_5, _('Group {n}').format(n=5)),
(GROUP_14... |
scikit-hep__pyhf-1179 | json2xml breaks for a simple JSON
# Description
```
{
"channels": [
{
"name": "singlechannel",
"samples": [
{
"name": "signal",
"data": [
5
],
"modifiers": [
{
"name": "mu",
"type": "no... | [
{
"content": "import logging\n\nfrom pathlib import Path\nimport shutil\nimport pkg_resources\nimport xml.etree.cElementTree as ET\nimport numpy as np\nimport uproot\nfrom uproot_methods.classes import TH1\n\nfrom .mixins import _ChannelSummaryMixin\n\n_ROOT_DATA_FILE = None\n\nlog = logging.getLogger(__name__)... | [
{
"content": "import logging\n\nfrom pathlib import Path\nimport shutil\nimport pkg_resources\nimport xml.etree.cElementTree as ET\nimport numpy as np\nimport uproot\nfrom uproot_methods.classes import TH1\n\nfrom .mixins import _ChannelSummaryMixin\n\n_ROOT_DATA_FILE = None\n\nlog = logging.getLogger(__name__)... | diff --git a/src/pyhf/writexml.py b/src/pyhf/writexml.py
index eaa2de099a..e095ca0cfc 100644
--- a/src/pyhf/writexml.py
+++ b/src/pyhf/writexml.py
@@ -199,7 +199,9 @@ def build_modifier(spec, modifierspec, channelname, samplename, sampledata):
np.divide(
a, b, out=np.zeros_like(a),... |
netbox-community__netbox-6769 | Include docs in main release package
### NetBox version
v2.11
### Feature type
New functionality
### Proposed functionality
Include the HTML rendered online documentation available on https://netbox.readthedocs.io/en/stable/ within the main package of the netbox.
The goal is to adapt the URL <Docs> seen bellow ... | [
{
"content": "import importlib\nimport logging\nimport os\nimport platform\nimport re\nimport socket\nimport warnings\nfrom urllib.parse import urlsplit\n\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigured, ValidationError\nfrom django.core.valida... | [
{
"content": "import importlib\nimport logging\nimport os\nimport platform\nimport re\nimport socket\nimport warnings\nfrom urllib.parse import urlsplit\n\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigured, ValidationError\nfrom django.core.valida... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 40c32ce3e05..a8e62642eb8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -40,6 +40,9 @@ jobs:
pip install pycodestyle coverage
ln -s configuration.testing.py netbox/netbox/configuration.py
+ - name: Bui... |
pypi__warehouse-4783 | Update project name on new release if equivalent
Currently a project name is set when the project is created, and cannot be updated.
It should be possible to change the project name to something that will canonicalize to be the same name (e.g. from `CommonMark` to `commonmark`) by uploading a new release with the ne... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/forklift/test_legacy.py b/tests/unit/forklift/test_legacy.py
index de07db79e65a..577fb8473d0b 100644
--- a/tests/unit/forklift/test_legacy.py
+++ b/tests/unit/forklift/test_legacy.py
@@ -2522,6 +2522,59 @@ def test_upload_fails_with_unsupported_wheel_plat(
"400 Binary wheel .* has a... |
pyinstaller__pyinstaller-1861 | hook for cryptography 1.0 - changes in __cffi__ bindings
```
python version:3.4.3
os:windows 10(64bit)
pyinstaller installation:
1.down https://github.com/pyinstaller/pyinstaller/archive/python3.zip
2.pip install python3.zip
3.setup successful
```
I am in client.py:
from OpenSSL import SSL, crypto
import sys, os, so... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2016, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2016, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | diff --git a/PyInstaller/hooks/hook-cryptography.py b/PyInstaller/hooks/hook-cryptography.py
index 7d665a8c96..61a3c1d2ba 100644
--- a/PyInstaller/hooks/hook-cryptography.py
+++ b/PyInstaller/hooks/hook-cryptography.py
@@ -19,7 +19,7 @@
from PyInstaller.utils.hooks import collect_submodules, get_module_file_attribute
... |
DataDog__dd-trace-py-4213 | Disabling intrument_middleware via code not working in Django
### Which version of dd-trace-py are you using?
1.1.2
### Which version of pip are you using?
22.0.4
### Which version of the libraries are you using?
/
### How can we reproduce your problem?
Disable `instrument_middleware` via config co... | [
{
"content": "\"\"\"\nThe Django__ integration traces requests, views, template renderers, database\nand cache calls in a Django application.\n\n\nEnable Django tracing automatically via ``ddtrace-run``::\n\n ddtrace-run python manage.py runserver\n\n\nDjango tracing can also be enabled manually::\n\n fro... | [
{
"content": "\"\"\"\nThe Django__ integration traces requests, views, template renderers, database\nand cache calls in a Django application.\n\n\nEnable Django tracing automatically via ``ddtrace-run``::\n\n ddtrace-run python manage.py runserver\n\n\nDjango tracing can also be enabled manually::\n\n fro... | diff --git a/ddtrace/contrib/django/__init__.py b/ddtrace/contrib/django/__init__.py
index a2f1ed49ebd..38b103e10e1 100644
--- a/ddtrace/contrib/django/__init__.py
+++ b/ddtrace/contrib/django/__init__.py
@@ -29,6 +29,13 @@
Configuration
~~~~~~~~~~~~~
+
+.. important::
+
+ Note that the in-code configuration mus... |
mozmeao__snippets-service-959 | Remove MariaDB related code and references
After we complete the migration to PostgreSQL, remove MariaDB related code and references:
- Dockerfile
- requirements.txt
- python code
Update dev docs with `create_countries` and `create_locales` info
| [
{
"content": "import os\nimport platform\n\nimport dj_database_url\nimport django_cache_url\nimport product_details\nfrom decouple import Csv, config\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\nROOT = os.path.dirname(os.pat... | [
{
"content": "import os\nimport platform\n\nimport dj_database_url\nimport django_cache_url\nimport product_details\nfrom decouple import Csv, config\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\nROOT = os.path.dirname(os.pat... | diff --git a/Dockerfile b/Dockerfile
index af7108ff9..f340f7eb6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,9 +11,9 @@ RUN adduser --uid 1000 --disabled-password --gecos '' --no-create-home webdev
# https://github.com/debuerreotype/debuerreotype/issues/10#issuecomment-438342078
RUN bash -c 'for i in {1..8}; do mk... |
xonsh__xonsh-2831 | Xonsh wizard crashed
I installed xonsh onto macos using homebrew, started it, and ran the wizard. I told it I wanted to import fish as a foreign shell and accepted all the defaults for every other question.
My wizard experience ended like this:
```
Would you like to enable xontribs now, yes or no [default: no]?
... | [
{
"content": "\"\"\"The xonsh configuration (xonfig) utility.\"\"\"\nimport os\nimport re\nimport ast\nimport json\nimport shutil\nimport random\nimport pprint\nimport textwrap\nimport builtins\nimport argparse\nimport functools\nimport itertools\nimport contextlib\nimport collections\n\ntry:\n import ply\ne... | [
{
"content": "\"\"\"The xonsh configuration (xonfig) utility.\"\"\"\nimport os\nimport re\nimport ast\nimport json\nimport shutil\nimport random\nimport pprint\nimport textwrap\nimport builtins\nimport argparse\nimport functools\nimport itertools\nimport contextlib\nimport collections\n\ntry:\n import ply\ne... | diff --git a/news/fswiz.rst b/news/fswiz.rst
new file mode 100644
index 0000000000..87a91482cf
--- /dev/null
+++ b/news/fswiz.rst
@@ -0,0 +1,14 @@
+**Added:** None
+
+**Changed:** None
+
+**Deprecated:** None
+
+**Removed:** None
+
+**Fixed:**
+
+* The xonsh ``xonfig wizard`` would crash if an unknown foreign shell was... |
huggingface__accelerate-13 | Can't send the values of int to device
My training data looks like:
src_image, target_image, src_camera, target_camera, src_camera_idx, target_camera_idx
Where src_camera_idx, target_camera_idx are integers
When I try to apply accelerate I get the following error:
TypeError: Can't send the values of type <cla... | [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/accelerate/utils.py b/src/accelerate/utils.py
index 54ef3c12f7d..61a39fc9514 100644
--- a/src/accelerate/utils.py
+++ b/src/accelerate/utils.py
@@ -105,10 +105,7 @@ def send_to_device(tensor, device):
elif isinstance(tensor, dict):
return type(tensor)({k: send_to_device(v, device) for k, ... |
pre-commit__pre-commit-2866 | pre-commit autoupdate (Windows), reports: `.pre-commit-hooks.yaml is not a file`
### search you tried in the issue tracker
is:issue "not a file"
### describe your issue
#### Summary
The last version I used successfully was `2.17.0` and `pre-commit 3.2.2, installed using Python 3.11.3`
#### Additional debugging ... | [
{
"content": "from __future__ import annotations\n\nimport concurrent.futures\nimport os.path\nimport re\nimport tempfile\nfrom typing import Any\nfrom typing import NamedTuple\nfrom typing import Sequence\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_c... | [
{
"content": "from __future__ import annotations\n\nimport concurrent.futures\nimport os.path\nimport re\nimport tempfile\nfrom typing import Any\nfrom typing import NamedTuple\nfrom typing import Sequence\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_c... | diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py
index 178648108..e7725fdc4 100644
--- a/pre_commit/commands/autoupdate.py
+++ b/pre_commit/commands/autoupdate.py
@@ -67,6 +67,8 @@ def update(self, tags_only: bool, freeze: bool) -> RevInfo:
rev, frozen = exact, rev... |
aio-libs__aiohttp-649 | aiohttp filtering out "Authorization" header
Apparently aiohttp is filtering out the "Authorization" header in aiohttp.wsgi:69 in create_wsgi_environ.
This bug was found while using aiopyramid + jwtauth, you can find more details (and an example project) on https://github.com/housleyjk/aiopyramid/issues/14
| [
{
"content": "\"\"\"wsgi server.\n\nTODO:\n * proxy protocol\n * x-forward security\n * wsgi file support (os.sendfile)\n\"\"\"\n\nimport asyncio\nimport inspect\nimport io\nimport os\nimport sys\nfrom urllib.parse import urlsplit\n\nimport aiohttp\nfrom aiohttp import server, hdrs\n\n__all__ = ('WSGIServerH... | [
{
"content": "\"\"\"wsgi server.\n\nTODO:\n * proxy protocol\n * x-forward security\n * wsgi file support (os.sendfile)\n\"\"\"\n\nimport asyncio\nimport inspect\nimport io\nimport os\nimport sys\nfrom urllib.parse import urlsplit\n\nimport aiohttp\nfrom aiohttp import server, hdrs\n\n__all__ = ('WSGIServerH... | diff --git a/aiohttp/wsgi.py b/aiohttp/wsgi.py
index 7f172d32fac..841ce14dc73 100644
--- a/aiohttp/wsgi.py
+++ b/aiohttp/wsgi.py
@@ -66,9 +66,7 @@ def create_wsgi_environ(self, message, payload):
script_name = self.SCRIPT_NAME
for hdr_name, hdr_value in message.headers.items():
- if hdr_n... |
translate__pootle-5924 | Setting FORCE_SCRIPT_NAME breaks views
Seems like a number of views are not parsing path correctly when FORCE_SCRIPT_NAME is set.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport functoo... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport functoo... | diff --git a/pootle/apps/pootle_translationproject/views.py b/pootle/apps/pootle_translationproject/views.py
index 0cb4d9d7d8d..887f2d89429 100644
--- a/pootle/apps/pootle_translationproject/views.py
+++ b/pootle/apps/pootle_translationproject/views.py
@@ -291,6 +291,15 @@ class TPBrowseView(TPDirectoryMixin, TPBrowseB... |
instadeepai__Mava-1041 | [BUG]: Flasbax bug on LBF (type issue)
### Describe the bug
In the AgentID wrapper, the new_agents_view type is not enforced to be consistent, so for LBF with flashbax a dtype error emerges.
### To Reproduce
Steps to reproduce the behavior:
1. Run LBF with flashbax.
### Expected behavior
Expected the observat... | [
{
"content": "# Copyright 2022 InstaDeep Ltd. 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# Unl... | [
{
"content": "# Copyright 2022 InstaDeep Ltd. 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# Unl... | diff --git a/mava/wrappers/observation.py b/mava/wrappers/observation.py
index 2346a5b77..7aaf03db6 100644
--- a/mava/wrappers/observation.py
+++ b/mava/wrappers/observation.py
@@ -38,7 +38,11 @@ def _add_agent_ids(
"""Adds agent IDs to the observation."""
obs = timestep.observation
agent_ids... |
bokeh__bokeh-6053 | NA values correctly skipped in linear scale but not in log scale
Hi,
I have an issue with plotting "NA" values (as imported with a CSV reader on R) as lines when using a log scale. Here is the code example in a Jupyter notebook:
```
from bokeh.plotting import figure, show, output_notebook
import numpy as np
# ... | [
{
"content": "''' Renderers for various kinds of annotations that can be added to\nBokeh plots\n\n'''\nfrom __future__ import absolute_import\n\nfrom six import string_types\n\nfrom ..core.enums import (accept_left_right_center, AngleUnits, DeprecatedLegendLocation, Dimension,\n FontSty... | [
{
"content": "''' Renderers for various kinds of annotations that can be added to\nBokeh plots\n\n'''\nfrom __future__ import absolute_import\n\nfrom six import string_types\n\nfrom ..core.enums import (accept_left_right_center, AngleUnits, DeprecatedLegendLocation, Dimension,\n FontSty... | diff --git a/bokeh/models/annotations.py b/bokeh/models/annotations.py
index ec846855db4..0e1c69fef9d 100644
--- a/bokeh/models/annotations.py
+++ b/bokeh/models/annotations.py
@@ -311,7 +311,10 @@ class ColorBar(Annotation):
.. warning::
If the `low` and `high` attributes of the ColorMapper aren't set,... |
spyder-ide__spyder-16020 | Splash screen can take a lot of space in low resolution screens
When starting Spyder in my laptop screen (1366 x 768) the splash looks like this (kind of big):

However in my secondary screen (1920×108... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Utility functions for the Spyder application.\"\"\"\n\n# Standard library imports\nimport glob\nimport logging\nimport os\nimport os... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Utility functions for the Spyder application.\"\"\"\n\n# Standard library imports\nimport glob\nimport logging\nimport os\nimport os... | diff --git a/spyder/app/utils.py b/spyder/app/utils.py
index 4bbc61f9022..67d04f8a5b8 100644
--- a/spyder/app/utils.py
+++ b/spyder/app/utils.py
@@ -176,7 +176,9 @@ def qt_message_handler(msg_type, msg_log_context, msg_string):
def create_splash_screen():
"""Create splash screen."""
if not running_under_pyte... |
wemake-services__wemake-python-styleguide-677 | Incorrect error message when over-using empty string
# Bug report
<!--
Hi, thanks for submitting a bug. We appreciate that.
But, we will need some information about what's wrong to help you.
-->
## What's wrong
Right now:
> hooks/post_gen_project.py:0:1: Z226 Found string constant over-use:
## How ... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport ast\nfrom collections import Counter, defaultdict\nfrom typing import ClassVar, DefaultDict, Iterable, List, Mapping\n\nimport astor\nfrom typing_extensions import final\n\nfrom wemake_python_styleguide import constants\nfrom wemake_python_styleguide.logic.operato... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport ast\nfrom collections import Counter, defaultdict\nfrom typing import ClassVar, DefaultDict, Iterable, List, Mapping\n\nimport astor\nfrom typing_extensions import final\n\nfrom wemake_python_styleguide import constants\nfrom wemake_python_styleguide.logic.operato... | diff --git a/tests/test_visitors/test_ast/test_builtins/test_strings/test_overused_string.py b/tests/test_visitors/test_ast/test_builtins/test_strings/test_overused_string.py
index 04bf3ad16..f1fed31ff 100644
--- a/tests/test_visitors/test_ast/test_builtins/test_strings/test_overused_string.py
+++ b/tests/test_visitors... |
horovod__horovod-3050 | MetricAverageCallback() broken with TensorFlow 2.3
**Environment:**
1. Framework: TensorFlow
2. Framework version: 2.3.0
3. Horovod version: 0.20.3
4. MPI version: 4.0.3
5. ~~CUDA version:~~
6. ~~NCCL version:~~
7. Python version: 3.6.8
8. ~~Spark / PySpark version:~~
9. OS and version: Red Hat Enterprise Linu... | [
{
"content": "# Copyright 2018 Uber Technologies, 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\... | [
{
"content": "# Copyright 2018 Uber Technologies, 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\... | diff --git a/horovod/_keras/callbacks.py b/horovod/_keras/callbacks.py
index d7ecdf2b39..4279c8b1b7 100644
--- a/horovod/_keras/callbacks.py
+++ b/horovod/_keras/callbacks.py
@@ -54,7 +54,7 @@ def __init__(self, backend, device='', *args):
self.allreduce_ops = {}
self.device = device
- if Loo... |
open-mmlab__mmdetection-2093 | pad_val not used in class Pad when pad to a fixed size
in mmdet/datasets/pipelines/transforms.py **class Pad**
```python
def _pad_img(self, results):
if self.size is not None:
padded_img = mmcv.impad(results['img'], self.size)
```
self.pad_val is not pass to mmcv.impad
| [
{
"content": "import inspect\n\nimport mmcv\nimport numpy as np\nfrom numpy import random\n\nfrom mmdet.core.evaluation.bbox_overlaps import bbox_overlaps\nfrom ..registry import PIPELINES\n\ntry:\n from imagecorruptions import corrupt\nexcept ImportError:\n corrupt = None\n\ntry:\n import albumentatio... | [
{
"content": "import inspect\n\nimport mmcv\nimport numpy as np\nfrom numpy import random\n\nfrom mmdet.core.evaluation.bbox_overlaps import bbox_overlaps\nfrom ..registry import PIPELINES\n\ntry:\n from imagecorruptions import corrupt\nexcept ImportError:\n corrupt = None\n\ntry:\n import albumentatio... | diff --git a/mmdet/datasets/pipelines/transforms.py b/mmdet/datasets/pipelines/transforms.py
index 58c1c21319f..b957cee608b 100644
--- a/mmdet/datasets/pipelines/transforms.py
+++ b/mmdet/datasets/pipelines/transforms.py
@@ -284,7 +284,7 @@ def __init__(self, size=None, size_divisor=None, pad_val=0):
def _pad_im... |
OpenNMT__OpenNMT-tf-393 | AttributeError: 'int' object has no attribute 'dtype'

| [
{
"content": "\"\"\"Standard sequence-to-sequence model.\"\"\"\n\nimport tensorflow as tf\n\nfrom opennmt import constants\nfrom opennmt import inputters\nfrom opennmt import layers\n\nfrom opennmt.layers import reducer\nfrom opennmt.models.model import Model\nfrom opennmt.utils import compat\nfrom opennmt.util... | [
{
"content": "\"\"\"Standard sequence-to-sequence model.\"\"\"\n\nimport tensorflow as tf\n\nfrom opennmt import constants\nfrom opennmt import inputters\nfrom opennmt import layers\n\nfrom opennmt.layers import reducer\nfrom opennmt.models.model import Model\nfrom opennmt.utils import compat\nfrom opennmt.util... | diff --git a/opennmt/models/sequence_to_sequence.py b/opennmt/models/sequence_to_sequence.py
index bc4f37a05..295ff3351 100644
--- a/opennmt/models/sequence_to_sequence.py
+++ b/opennmt/models/sequence_to_sequence.py
@@ -161,7 +161,7 @@ def _build(self):
self.labels_inputter.vocabulary_size,
weigh... |
streamlink__streamlink-5673 | plugins.youtube: Could not find videoId on channel page but there's a live-stream available
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guideli... | [
{
"content": "\"\"\"\n$description Global live-streaming and video hosting social platform owned by Google.\n$url youtube.com\n$url youtu.be\n$type live, vod\n$metadata id\n$metadata author\n$metadata category\n$metadata title\n$notes Protected videos are not supported\n\"\"\"\n\nimport json\nimport logging\nim... | [
{
"content": "\"\"\"\n$description Global live-streaming and video hosting social platform owned by Google.\n$url youtube.com\n$url youtu.be\n$type live, vod\n$metadata id\n$metadata author\n$metadata category\n$metadata title\n$notes Protected videos are not supported\n\"\"\"\n\nimport json\nimport logging\nim... | diff --git a/src/streamlink/plugins/youtube.py b/src/streamlink/plugins/youtube.py
index a85290c5996..9824f16be74 100644
--- a/src/streamlink/plugins/youtube.py
+++ b/src/streamlink/plugins/youtube.py
@@ -335,8 +335,10 @@ def _get_data_from_api(self, res):
@staticmethod
def _data_video_id(data):
- if... |
Cog-Creators__Red-DiscordBot-1617 | [p]servers attempts to leave the wrong server [V3]
# Command bugs
<!--
Did you find a bug with a command? Fill out the following:
-->
#### Command name
servers
#### What cog is this command from?
Core
#### What were you expecting to happen?
Expected the value stated to be the actual value.
##... | [
{
"content": "import asyncio\nimport datetime\nimport importlib\nimport itertools\nimport logging\nimport os\nimport sys\nimport tarfile\nimport traceback\nfrom collections import namedtuple\nfrom pathlib import Path\nfrom random import SystemRandom\nfrom string import ascii_letters, digits\nfrom distutils.vers... | [
{
"content": "import asyncio\nimport datetime\nimport importlib\nimport itertools\nimport logging\nimport os\nimport sys\nimport tarfile\nimport traceback\nfrom collections import namedtuple\nfrom pathlib import Path\nfrom random import SystemRandom\nfrom string import ascii_letters, digits\nfrom distutils.vers... | diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py
index d1d335d1026..68098ae1758 100644
--- a/redbot/core/core_commands.py
+++ b/redbot/core/core_commands.py
@@ -298,7 +298,9 @@ def msg_check(m):
await ctx.send("I guess not.")
break
try:
- ... |
saulpw__visidata-2338 | Python error after pressing SPACE to pull up command-name input
**Small description**
The first time I press SPACE on a sheet, I often get the following Python error. It usually succeeds on the second press.
**Expected result**
Open command prompt.
**Actual result with screenshot**
, it says that it depends on `pandas==0.23.4`, but when I install `modin==0.7` and try to imp... | [
{
"content": "import pandas\n\n__pandas_version__ = \"0.25.3\"\n\nif pandas.__version__ != __pandas_version__:\n raise ImportError(\n \"The pandas version installed does not match the required pandas \"\n \"version in Modin. Please install pandas {} to use \"\n \"Modin.\".format(__pandas... | [
{
"content": "import pandas\n\n__pandas_version__ = \"0.25.3\"\n\nif pandas.__version__ != __pandas_version__:\n import warnings\n\n warnings.warn(\n \"The pandas version installed does not match the required pandas version in \"\n \"Modin. This may cause undesired side effects!\".format(__p... | diff --git a/modin/pandas/__init__.py b/modin/pandas/__init__.py
index 9c47bf0557f..5ebc6d2404d 100644
--- a/modin/pandas/__init__.py
+++ b/modin/pandas/__init__.py
@@ -3,10 +3,11 @@
__pandas_version__ = "0.25.3"
if pandas.__version__ != __pandas_version__:
- raise ImportError(
- "The pandas version insta... |
common-workflow-language__cwltool-1547 | Singularity version extraction breaks with singularity-ce
## Expected Behavior
When singularity-ce is installed following instructions at https://sylabs.io/guides/3.8/user-guide/quick_start.html#download-singularityce-from-a-release) and cwltool is ran in singularity mode, it should work.
## Actual Behavior
Wh... | [
{
"content": "\"\"\"Support for executing Docker containers using the Singularity 2.x engine.\"\"\"\n\nimport logging\nimport os\nimport os.path\nimport re\nimport shutil\nimport sys\nfrom subprocess import check_call, check_output # nosec\nfrom typing import Callable, Dict, List, MutableMapping, Optional, Tup... | [
{
"content": "\"\"\"Support for executing Docker containers using the Singularity 2.x engine.\"\"\"\n\nimport logging\nimport os\nimport os.path\nimport re\nimport shutil\nimport sys\nfrom subprocess import check_call, check_output # nosec\nfrom typing import Callable, Dict, List, MutableMapping, Optional, Tup... | diff --git a/cwltool/singularity.py b/cwltool/singularity.py
index 7642e17cc..230c3a0cd 100644
--- a/cwltool/singularity.py
+++ b/cwltool/singularity.py
@@ -31,6 +31,8 @@ def get_version() -> str:
).strip()
if _SINGULARITY_VERSION.startswith("singularity version "):
_SINGULARITY_VERSION =... |
OpenNMT__OpenNMT-tf-446 | Receiving a “ValueError: best_eval_result cannot be empty or no loss is found in it.” while training the transformer model
Hello I have an issue similar to http://forum.opennmt.net/t/receiving-a-valueerror-best-eval-result-cannot-be-empty-or-no-loss-is-found-in-it-while-training-the-transformer-model/2309.
In detai... | [
{
"content": "\"\"\"Main library entrypoint.\"\"\"\n\nimport copy\nimport io\nimport os\nimport sys\nimport random\nimport math\nimport subprocess\nimport json\nimport yaml\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom tensorflow.python.estimator.util import fn_args\n\nfrom google.protobuf import text_... | [
{
"content": "\"\"\"Main library entrypoint.\"\"\"\n\nimport copy\nimport io\nimport os\nimport sys\nimport random\nimport math\nimport subprocess\nimport json\nimport yaml\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom tensorflow.python.estimator.util import fn_args\n\nfrom google.protobuf import text_... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e3b757142..51cc4c58a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ OpenNMT-tf follows [semantic versioning 2.0.0](https://semver.org/). The API cov
* Fix crash on TensorFlow 1.14 due to an [API change](https://github.com/tensorflow/tensorflow/issues/29024... |
kartoza__prj.app-566 | We need to update the landing page
With the recent work to create project pages, the landing page now contains superfluous content. Please update it to remove the changelog entries so that it becomes a project gallery. Clicking into a project will go to the project landing page. From the project landing page the user c... | [
{
"content": "# coding=utf-8\n\"\"\"Views for projects.\"\"\"\n# noinspection PyUnresolvedReferences\nimport logging\nfrom django.core.urlresolvers import reverse\nfrom django.http import Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.views.generic import (\n ListView,\n CreateView,\... | [
{
"content": "# coding=utf-8\n\"\"\"Views for projects.\"\"\"\n# noinspection PyUnresolvedReferences\nimport logging\nfrom django.core.urlresolvers import reverse\nfrom django.http import Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.views.generic import (\n ListView,\n CreateView,\... | diff --git a/django_project/base/static/css/project-details.css b/django_project/base/static/css/project-details.css
index 20b0e9bfb..49b87fb73 100644
--- a/django_project/base/static/css/project-details.css
+++ b/django_project/base/static/css/project-details.css
@@ -106,3 +106,7 @@
border-top: 2px solid #F5F5F5;... |
scipy__scipy-18104 | BUG: matlab files with deeply lists of arrays with different sizes are no longer created
### Describe your issue.
After updating numpy to a version >=1.24 an error is thrown as the behavior of numpy asanyarry has changed from a deprecation warning to an error. For reference:
https://numpy.org/doc/stable/release/1.2... | [
{
"content": "''' Classes for read / write of matlab (TM) 5 files\n\nThe matfile specification last found here:\n\nhttps://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf\n\n(as of December 5 2008)\n\n=================================\n Note on functions and mat files\n=================... | [
{
"content": "''' Classes for read / write of matlab (TM) 5 files\n\nThe matfile specification last found here:\n\nhttps://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf\n\n(as of December 5 2008)\n\n=================================\n Note on functions and mat files\n=================... | diff --git a/scipy/io/matlab/_mio5.py b/scipy/io/matlab/_mio5.py
index 2d6173329858..36644848930e 100644
--- a/scipy/io/matlab/_mio5.py
+++ b/scipy/io/matlab/_mio5.py
@@ -490,7 +490,10 @@ def to_writeable(source):
else:
return EmptyStructMarker
# Next try and convert to an array
- narr = n... |
yt-project__yt-2241 | Runtime error when trying to access `grid_indices` for Ramses data
### Bug report
**Bug summary**
When trying to access the `grid_indices` field on some Ramses data using a sphere region, I get a RuntimeError
**Code for reproduction**
```python
import yt
ds = yt.load('output_00080/info_00080.txt')
sp =... | [
{
"content": "\"\"\"\nSubsets of octrees\n\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed wit... | [
{
"content": "\"\"\"\nSubsets of octrees\n\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed wit... | diff --git a/yt/data_objects/octree_subset.py b/yt/data_objects/octree_subset.py
index 31c1db0ddb4..f99a762b1ef 100644
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -92,8 +92,10 @@ def _reshape_vals(self, arr):
nz = self.nz
if len(arr.shape) <= 2:
n_oct ... |
hylang__hy-2423 | Misplaced tracebacks from some models created in the reader
```
$ echo ';;;;;;\na.b' >ex.hy
$ hy ex.hy
Traceback (most recent call last):
…
File "/tmp/ex.hy", line 1, in <module>
;;;;;;
NameError: name 'a' is not defined
```
The error is wrongly attributed to line 1 because the reader fails to set p... | [
{
"content": "\"Character reader for parsing Hy source.\"\n\nfrom itertools import islice\n\nimport hy\nfrom hy.models import (\n Bytes,\n Complex,\n Dict,\n Expression,\n FComponent,\n Float,\n FString,\n Integer,\n Keyword,\n List,\n Set,\n String,\n Symbol,\n Tuple,\... | [
{
"content": "\"Character reader for parsing Hy source.\"\n\nfrom itertools import islice\n\nimport hy\nfrom hy.models import (\n Bytes,\n Complex,\n Dict,\n Expression,\n FComponent,\n Float,\n FString,\n Integer,\n Keyword,\n List,\n Set,\n String,\n Symbol,\n Tuple,\... | diff --git a/NEWS.rst b/NEWS.rst
index a0b30a20c..6c8cb58f5 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -7,7 +7,7 @@ Bug Fixes
------------------------------
* Fixed an installation failure in some situations when version lookup
fails.
-* Fixed traceback pointing in scripts with shebangs.
+* Fixed some bugs with trace... |
google__flax-1262 | np.array parameters may lead to a silent failure
Passing np.array parameters (instead of jnp.array) to a linen module may lead to a silent failure, see the following example:
```
import flax.linen as nn
import jax
import jax.numpy as jnp
import numpy as np
t = jnp.zeros([2, 196], jnp.int32)
print(f'Input... | [
{
"content": "# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/flax/linen/linear.py b/flax/linen/linear.py
index f5dbfd35a..7d53f2472 100644
--- a/flax/linen/linear.py
+++ b/flax/linen/linear.py
@@ -407,7 +407,8 @@ def __call__(self, inputs):
"""
if not jnp.issubdtype(inputs.dtype, jnp.integer):
raise ValueError('Input type must be an integer or unsig... |
quantumlib__Cirq-5071 | `TaggedOperation._decompose_` should call `decompose_once` on its sub-operation instead of `decompose`.
**Description of the issue**
`TaggedOperation`s forward the `_decompose_` request to its underlying `sub_operation`. Right now, it calls `protocols.decompose` directly on the sub-operation -- which breaks `protocol... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq-core/cirq/ops/raw_types.py b/cirq-core/cirq/ops/raw_types.py
index ad2411a4b1e..dd981220a61 100644
--- a/cirq-core/cirq/ops/raw_types.py
+++ b/cirq-core/cirq/ops/raw_types.py
@@ -741,7 +741,7 @@ def _json_dict_(self) -> Dict[str, Any]:
return protocols.obj_to_dict_helper(self, ['sub_operation... |
great-expectations__great_expectations-2586 | Asset Name is not populated in Data Docs for SimpleSqlalchemy data source
**Describe the bug**
When using a SimpleSqlalchemy data source, the Asset Name column is not populated in the Validations index of the data docs. SImilarly, the Data Asset entry in the corresponding Validation result is None.
**To Reproduce*... | [
{
"content": "from typing import Dict, List, Optional\n\nfrom great_expectations.core.batch import (\n BatchDefinition,\n BatchRequest,\n PartitionDefinition,\n)\nfrom great_expectations.datasource.data_connector.data_connector import DataConnector\nfrom great_expectations.datasource.data_connector.uti... | [
{
"content": "from typing import Dict, List, Optional\n\nfrom great_expectations.core.batch import (\n BatchDefinition,\n BatchRequest,\n PartitionDefinition,\n)\nfrom great_expectations.datasource.data_connector.data_connector import DataConnector\nfrom great_expectations.datasource.data_connector.uti... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index df70dcdd0c35..06c9cdc3d417 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -10,6 +10,7 @@ develop
* [FEATURE] Added support for references to secrets stores for AWS Secrets Manager, GCP Secret Manager and Azure Key Vault in `great_expectations.yml`... |
urllib3__urllib3-540 | assert_fingerprint SHA256 support is missing
assert_fingerprint only seems to support MD5 and SHA1. Would it be possible to add SHA256 support to it?
| [
{
"content": "from binascii import hexlify, unhexlify\nfrom hashlib import md5, sha1\n\nfrom ..exceptions import SSLError\n\n\nSSLContext = None\nHAS_SNI = False\ncreate_default_context = None\n\nimport errno\nimport ssl\n\ntry: # Test for SSL features\n from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv... | [
{
"content": "from binascii import hexlify, unhexlify\nfrom hashlib import md5, sha1, sha256\n\nfrom ..exceptions import SSLError\n\n\nSSLContext = None\nHAS_SNI = False\ncreate_default_context = None\n\nimport errno\nimport ssl\n\ntry: # Test for SSL features\n from ssl import wrap_socket, CERT_NONE, PROTO... | diff --git a/test/with_dummyserver/test_https.py b/test/with_dummyserver/test_https.py
index 16ca58955d..a6845eb59f 100644
--- a/test/with_dummyserver/test_https.py
+++ b/test/with_dummyserver/test_https.py
@@ -202,6 +202,16 @@ def test_assert_fingerprint_sha1(self):
'7A:F2:8A:D... |
statsmodels__statsmodels-7875 | `gam.generalized_addtive_model.plot_partial` wrong x, y order
https://github.com/statsmodels/statsmodels/blob/718b4c5d8524d227bc170d162be80a74d07665cf/statsmodels/gam/generalized_additive_model.py#L347-L360
It seems on the line 359-360, `y_est` is the sorted version but `self.resid_working` is still the unsorted ver... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nGeneralized Additive Models\n\nAuthor: Luca Puggini\nAuthor: Josef Perktold\n\ncreated on 08/07/2015\n\"\"\"\n\nfrom collections.abc import Iterable\nimport copy # check if needed when dropping python 2.7\n\nimport numpy as np\nfrom scipy import optimize\nimport p... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nGeneralized Additive Models\n\nAuthor: Luca Puggini\nAuthor: Josef Perktold\n\ncreated on 08/07/2015\n\"\"\"\n\nfrom collections.abc import Iterable\nimport copy # check if needed when dropping python 2.7\n\nimport numpy as np\nfrom scipy import optimize\nimport p... | diff --git a/statsmodels/gam/generalized_additive_model.py b/statsmodels/gam/generalized_additive_model.py
index 18a11ab4eb9..3c22bb5ba9a 100644
--- a/statsmodels/gam/generalized_additive_model.py
+++ b/statsmodels/gam/generalized_additive_model.py
@@ -356,7 +356,8 @@ def plot_partial(self, smooth_index, plot_se=True, ... |
elastic__apm-agent-python-1068 | Traceback from agent on max spans
**Describe the bug**: ...
We are seeing the following traceback coming out of the ElasticAPM agent via Sentry frequently on many of our environments.
```
KeyError: 'TRANSACTION_MAX_SPANS'
File "elasticapm/utils/threading.py", line 80, in run
rval = self._function(*self._... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\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 c... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\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 c... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index eb5a6e5f4..94b466c34 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -49,6 +49,7 @@ endif::[]
* Fix for Starlette/FastAPI to correctly capture request bodies as strings {pull}1042[#1041]
* Fix transaction names for Starlette Mount routes {pull}103... |
ansible__ansible-modules-extras-2722 | chocolatey 0.10.0 needs to pass argument to choco.exe
<!--- Verify first that your issue/request is not already reported in GitHub -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
- Bug Report
##### COMPONENT NAME
<!--- Name of the plugin/module/task -->
win_chocolatey
##### ANSIBLE VERSION
<!--- ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2014, Trond Hindenes <trond@hindenes.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Founda... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2014, Trond Hindenes <trond@hindenes.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Founda... | diff --git a/windows/win_chocolatey.ps1 b/windows/win_chocolatey.ps1
index e725519b991..aa557c2dbe6 100644
--- a/windows/win_chocolatey.ps1
+++ b/windows/win_chocolatey.ps1
@@ -37,6 +37,8 @@ $state = Get-Attr -obj $params -name state -default "present"
$installargs = Get-Attr -obj $params -name install_args -default... |
certbot__certbot-3957 | `-n` doesn't like `force_interactive`?
Using `-n` to dodge some questions about vhosts:
```
certbot --config-dir /tmp/sample-config --agree-t --regi certonly --apache --test-cert -n -d b.encryption-example.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-stagin... | [
{
"content": "\"\"\"Certbot display.\"\"\"\nimport logging\nimport os\nimport textwrap\nimport sys\n\nimport six\nimport zope.interface\n\nfrom certbot import constants\nfrom certbot import interfaces\nfrom certbot import errors\nfrom certbot.display import completer\n\nlogger = logging.getLogger(__name__)\n\nW... | [
{
"content": "\"\"\"Certbot display.\"\"\"\nimport logging\nimport os\nimport textwrap\nimport sys\n\nimport six\nimport zope.interface\n\nfrom certbot import constants\nfrom certbot import interfaces\nfrom certbot import errors\nfrom certbot.display import completer\n\nlogger = logging.getLogger(__name__)\n\nW... | diff --git a/certbot/display/util.py b/certbot/display/util.py
index ebfce78e2ca..50242662640 100644
--- a/certbot/display/util.py
+++ b/certbot/display/util.py
@@ -438,7 +438,7 @@ def notification(self, message, pause=False, wrap=True, **unused_kwargs):
line=os.linesep, frame=side_frame, msg=message))... |
spack__spack-18478 | nn-c uses invalid self.compiler.pic_flag? (breaks nn-c build, via elmerfem build)
These lines fail, because there is no such member, and looking at other packages, it seems that flags like
```
self.compiler.cc_pic_flag
self.compiler.cxx_pic_flag
self.compiler.fc_pic_flag
#or ?
self.compiler.f77_pic_flag
```
wo... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass NnC(AutotoolsPackage):\n \"\"\"nn: Natural Neighbours interpo... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass NnC(AutotoolsPackage):\n \"\"\"nn: Natural Neighbours interpo... | diff --git a/var/spack/repos/builtin/packages/nn-c/package.py b/var/spack/repos/builtin/packages/nn-c/package.py
index 20fa95054d4adc..01f8e652b352be 100644
--- a/var/spack/repos/builtin/packages/nn-c/package.py
+++ b/var/spack/repos/builtin/packages/nn-c/package.py
@@ -26,8 +26,8 @@ def configure_args(self):
... |
helmholtz-analytics__heat-61 | ht.floor: fix docstring to properly render math
Everytime I edit edit `tensor.py` and run pytest, pytest prints a warning that the docstring of ht.floor contains an unknown escape sequence `\lfloor`. Mysteriously, this warning does not show up in the second run of pytest, which might explain why this was not caught in ... | [
{
"content": "from copy import copy as _copy\nimport operator\nimport numpy as np\nimport torch\n\nfrom .communicator import mpi, MPICommunicator, NoneCommunicator\nfrom .stride_tricks import *\nfrom . import types\nfrom . import operations\n\n\nclass tensor:\n def __init__(self, array, gshape, dtype, split,... | [
{
"content": "from copy import copy as _copy\nimport operator\nimport numpy as np\nimport torch\n\nfrom .communicator import mpi, MPICommunicator, NoneCommunicator\nfrom .stride_tricks import *\nfrom . import types\nfrom . import operations\n\n\nclass tensor:\n def __init__(self, array, gshape, dtype, split,... | diff --git a/heat/core/tensor.py b/heat/core/tensor.py
index 6bc03e2c7c..6017da033b 100644
--- a/heat/core/tensor.py
+++ b/heat/core/tensor.py
@@ -225,10 +225,10 @@ def exp(self, out=None):
return operations.exp(self, out)
def floor(self, out=None):
- """
+ r"""
Return the floor o... |
StackStorm__st2-3038 | Cache filters API response for web UI
As the number of actions, rules, etc has grown in our StackStorm cluster, the UI is becoming slower. In particular, the filters view (which we rely on heavily with this many executions) is very slow to become visible and usable. It might help to cache this `/api/v1/executions/views... | [
{
"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li... | [
{
"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 45958d2425..b33fcc3901 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -73,6 +73,8 @@ In development
schema file. (new-feature)
* Upgrade various internal Python library dependencies to the latest stable versions (gunicorn,
kombu, six, appscheduler, passlib, pyt... |
cowrie__cowrie-1576 | Unable to curl or wget URL with hostname
If you try to download anything via curl or wget and url contains hostname not ip address it crashes.
I am pretty sure it is because of https://github.com/cowrie/cowrie/pull/1557/commits/0b3b257e0ecf10b5b4d381d724cf4c3e23f0ed81 and https://github.com/cowrie/cowrie/pull/1557/c... | [
{
"content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\n\nimport random\nimport re\n\nfrom twisted.internet import defer, reactor # type: ignore\nfrom twisted.internet.defer import inlineCallbacks\n\nfrom cowrie.shell.command import HoneyPotCommand... | [
{
"content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\n\nimport random\nimport re\n\nfrom twisted.internet import defer, reactor # type: ignore\nfrom twisted.internet.defer import inlineCallbacks\n\nfrom cowrie.shell.command import HoneyPotCommand... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 884345d0c1..d872a03662 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,3 +1,4 @@
+---
version: 2
workflows:
version: 2
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 70fcc396f3..8053979b0f 100644
--- a/.github/FUNDING.y... |
pretix__pretix-687 | Documentation of order_paid-signal unclear
This might be just me not being able to english, but I think that the documentation at https://github.com/pretix/pretix/blob/a08cb3b8e4adaa300868e3f730e045bc8e6d0203/src/pretix/base/signals.py#L152-L154 is missing something.
| [
{
"content": "import warnings\nfrom typing import Any, Callable, List, Tuple\n\nimport django.dispatch\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.dispatch.dispatcher import NO_RECEIVERS\n\nfrom .models import Event\n\napp_cache = {}\n\n\ndef _populate_app_cache():\n global a... | [
{
"content": "import warnings\nfrom typing import Any, Callable, List, Tuple\n\nimport django.dispatch\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.dispatch.dispatcher import NO_RECEIVERS\n\nfrom .models import Event\n\napp_cache = {}\n\n\ndef _populate_app_cache():\n global a... | diff --git a/src/pretix/base/signals.py b/src/pretix/base/signals.py
index da654ea3d91..e1ef9539944 100644
--- a/src/pretix/base/signals.py
+++ b/src/pretix/base/signals.py
@@ -151,7 +151,7 @@ def connect(self, receiver, sender=None, weak=True, dispatch_uid=None):
"""
This signal is sent out every time an order is pa... |
meltano__meltano-7773 | bug: confusing error message when running `meltano cloud project use` with no projects
### Meltano Version
cloud branch
### Python Version
NA
### Bug scope
CLI (options, error messages, logging, etc.)
### Operating System
N/A
### Description
Current behaviour:
```
(meltano310) will ~/meltano/meltano (cloud... | [
{
"content": "\"\"\"Meltano Cloud `project` command.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport json\nimport logging\nimport platform\nimport sys\nimport typing as t\n\nimport click\nimport questionary\nimport tabulate\n\nfrom meltano.cloud.api.client import MeltanoCloudClient\nfrom m... | [
{
"content": "\"\"\"Meltano Cloud `project` command.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport json\nimport logging\nimport platform\nimport sys\nimport typing as t\n\nimport click\nimport questionary\nimport tabulate\n\nfrom meltano.cloud.api.client import MeltanoCloudClient\nfrom m... | diff --git a/src/cloud-cli/meltano/cloud/cli/project.py b/src/cloud-cli/meltano/cloud/cli/project.py
index 6c8ce793f7..972b5ecb27 100644
--- a/src/cloud-cli/meltano/cloud/cli/project.py
+++ b/src/cloud-cli/meltano/cloud/cli/project.py
@@ -242,6 +242,11 @@ def prompt_for_value(self, ctx: click.Context) -> t.Any:
... |
Parsl__parsl-3065 | `SlurmProvider` is missing a docstring for `init_blocks`
**Describe the bug**
The `SlurmProvider` is missing the docstring for its `init_blocks` keyword argument [here](https://github.com/Parsl/parsl/blob/72df44c105a294b90d1b7f9022ed24309fc41885/parsl/providers/slurm/slurm.py#L37).
| [
{
"content": "import os\nimport math\nimport time\nimport logging\nimport re\nimport typeguard\n\nfrom typing import Optional\n\nfrom parsl.channels import LocalChannel\nfrom parsl.channels.base import Channel\nfrom parsl.jobs.states import JobState, JobStatus\nfrom parsl.launchers import SingleNodeLauncher\nfr... | [
{
"content": "import os\nimport math\nimport time\nimport logging\nimport re\nimport typeguard\n\nfrom typing import Optional\n\nfrom parsl.channels import LocalChannel\nfrom parsl.channels.base import Channel\nfrom parsl.jobs.states import JobState, JobStatus\nfrom parsl.launchers import SingleNodeLauncher\nfr... | diff --git a/parsl/providers/slurm/slurm.py b/parsl/providers/slurm/slurm.py
index fd6608619e..61d8bdd2ca 100644
--- a/parsl/providers/slurm/slurm.py
+++ b/parsl/providers/slurm/slurm.py
@@ -65,6 +65,8 @@ class SlurmProvider(ClusterProvider, RepresentationMixin):
mem_per_node : int
Specify the real memory... |
sherlock-project__sherlock-1963 | --timeout error
<!--
######################################################################
WARNING!
IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE.
######################################################################
-->
## Checklist
<!--
Put x into all boxes (like this [... | [
{
"content": "#! /usr/bin/env python3\n\n\"\"\"\nSherlock: Find Usernames Across Social Networks Module\n\nThis module contains the main logic to search for usernames at social\nnetworks.\n\"\"\"\n\nimport csv\nimport signal\nimport pandas as pd\nimport os\nimport platform\nimport re\nimport sys\nfrom argparse ... | [
{
"content": "#! /usr/bin/env python3\n\n\"\"\"\nSherlock: Find Usernames Across Social Networks Module\n\nThis module contains the main logic to search for usernames at social\nnetworks.\n\"\"\"\n\nimport csv\nimport signal\nimport pandas as pd\nimport os\nimport platform\nimport re\nimport sys\nfrom argparse ... | diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py
index bf6868966..2bb5419ad 100644
--- a/sherlock/sherlock.py
+++ b/sherlock/sherlock.py
@@ -470,12 +470,14 @@ def timeout_check(value):
NOTE: Will raise an exception if the timeout in invalid.
"""
- if value <= 0:
+ float_value = float(value)
+... |
adamchainz__django-cors-headers-375 | ABCs collections DeprecationWarning under Python 3.7
Hi
With `DeprecationWarning`s enabled, under Python 3.7 I get:
```
.../site-packages/corsheaders/checks.py:4: DeprecationWarning: Using or importing the ABCs from
'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
... | [
{
"content": "from __future__ import absolute_import\n\nimport re\nfrom collections import Sequence\nfrom numbers import Integral\n\nfrom django.core import checks\nfrom django.utils import six\n\nfrom .conf import conf\n\nre_type = type(re.compile(''))\n\n\n@checks.register\ndef check_settings(app_configs, **k... | [
{
"content": "from __future__ import absolute_import\n\nimport re\nfrom numbers import Integral\n\nfrom django.core import checks\nfrom django.utils import six\n\nfrom .conf import conf\n\ntry:\n from collections.abc import Sequence # Python 3.3+\nexcept ImportError: # pragma: no cover\n from collection... | diff --git a/HISTORY.rst b/HISTORY.rst
index eb7c6517..f7956b6c 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -6,6 +6,9 @@ Pending
.. Insert new release notes below this line
+* Fix ``DeprecationWarning`` from importing ``collections.abc.Sequence`` on
+ Python 3.7.
+
2.4.0 (2018-07-18)
------------------
diff... |
huggingface__huggingface_hub-1629 | AttributeError: type object 'tqdm' has no attribute '_lock'
### Describe the bug
Getting a tqdm issue when writing a Dask dataframe to the hub.
Similar to huggingface/datasets#6066. Using latest Datasets version doesn't seem to resolve it
### Steps to reproduce the bug
This is a minimal reproducer:
```
im... | [
{
"content": "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# h... | [
{
"content": "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# h... | diff --git a/src/huggingface_hub/utils/tqdm.py b/src/huggingface_hub/utils/tqdm.py
index 81bdfb0500..cae9adb389 100644
--- a/src/huggingface_hub/utils/tqdm.py
+++ b/src/huggingface_hub/utils/tqdm.py
@@ -131,6 +131,14 @@ def __init__(self, *args, **kwargs):
kwargs["disable"] = True
super().__init__... |
Pylons__pyramid-3461 | pserve configures logging twice when using --reload
pserve invokes `loader.setup_logging()` before invoking `hupper.start_reloader` which configures logging in the monitor process **and** then later configures it again in the child/worker/app process.
We should, instead, invoke `basicConfig` if `--reload` is set and... | [
{
"content": "# (c) 2005 Ian Bicking and contributors; written for Paste\n# (http://pythonpaste.org) Licensed under the MIT license:\n# http://www.opensource.org/licenses/mit-license.php\n#\n# For discussion of daemonizing:\n# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731\n#\n# Code taken also ... | [
{
"content": "# (c) 2005 Ian Bicking and contributors; written for Paste\n# (http://pythonpaste.org) Licensed under the MIT license:\n# http://www.opensource.org/licenses/mit-license.php\n#\n# For discussion of daemonizing:\n# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731\n#\n# Code taken also ... | diff --git a/CHANGES.txt b/CHANGES.txt
index 773f4662ad..8653cbd047 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,11 @@ unreleased
not sortable on Python 3 due to differing types.
See https://github.com/Pylons/pyramid/pull/3458
+- Avoid configuring logging in the monitor process usin the logging confi... |
docker__docker-py-1150 | Client.build crashes when trying to pull a new image if HttpHeaders are set in config file
``` python
import docker
c = docker.Client()
c.build('https://github.com/docker/compose.git')
---------------------------------------------------------------------------
AttributeError Traceback (most... | [
{
"content": "import functools\n\nfrom .. import errors\nfrom . import utils\n\n\ndef check_resource(f):\n @functools.wraps(f)\n def wrapped(self, resource_id=None, *args, **kwargs):\n if resource_id is None:\n if kwargs.get('container'):\n resource_id = kwargs.pop('contai... | [
{
"content": "import functools\n\nfrom .. import errors\nfrom . import utils\n\n\ndef check_resource(f):\n @functools.wraps(f)\n def wrapped(self, resource_id=None, *args, **kwargs):\n if resource_id is None:\n if kwargs.get('container'):\n resource_id = kwargs.pop('contai... | diff --git a/docker/utils/decorators.py b/docker/utils/decorators.py
index 7c41a5f80..46c28a809 100644
--- a/docker/utils/decorators.py
+++ b/docker/utils/decorators.py
@@ -40,7 +40,7 @@ def wrapper(self, *args, **kwargs):
def update_headers(f):
def inner(self, *args, **kwargs):
if 'HttpHeaders' in self.... |
conan-io__conan-5894 | Error using lockfiles with conanfile.txt
Using: Windows and conan version 1.17.1
I get `ERROR: Unspecified reference in graph-lock, please specify` when trying to use lockfiles in a package that has `conanfile.txt` instead of `conanfile.py`
To reproduce:
```
git clone https://github.com/conan-io/examples.git
c... | [
{
"content": "import json\nimport os\n\nfrom conans.client.graph.graph import RECIPE_VIRTUAL, RECIPE_CONSUMER,\\\n BINARY_BUILD\nfrom conans.client.profile_loader import _load_profile\nfrom conans.errors import ConanException\nfrom conans.model.options import OptionsValues\nfrom conans.model.ref import Packa... | [
{
"content": "import json\nimport os\n\nfrom conans.client.graph.graph import RECIPE_VIRTUAL, RECIPE_CONSUMER,\\\n BINARY_BUILD\nfrom conans.client.profile_loader import _load_profile\nfrom conans.errors import ConanException\nfrom conans.model.options import OptionsValues\nfrom conans.model.ref import Packa... | diff --git a/conans/model/graph_lock.py b/conans/model/graph_lock.py
index e06643643e4..578d67cdd65 100644
--- a/conans/model/graph_lock.py
+++ b/conans/model/graph_lock.py
@@ -292,10 +292,10 @@ def get_node(self, ref):
"""
# None reference
if ref is None:
- try:
- r... |
open-telemetry__opentelemetry-python-contrib-797 | Increase the usage of augmented assignment statements
This issue corresponds with [this one](https://github.com/open-telemetry/opentelemetry-python/issues/2258).
| [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
index 07c21ac23f..0e1d3b7dc5 100644
--- a/instrumentation/opentelemetry-instrumentation-asgi/src/open... |
pre-commit__pre-commit-1778 | [Regression] Worktree support
Latest release 2.9.3 broke git worktrees support
### version information
```
pre-commit version: 2.9.3
sys.version:
3.6.8 (default, Apr 15 2020, 09:32:35)
[GCC 9.3.0]
sys.executable: /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/bin/python3.6
os.nam... | [
{
"content": "import logging\nimport os.path\nimport sys\nfrom typing import Dict\nfrom typing import List\nfrom typing import MutableMapping\nfrom typing import Optional\nfrom typing import Set\n\nfrom pre_commit.errors import FatalError\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util imp... | [
{
"content": "import logging\nimport os.path\nimport sys\nfrom typing import Dict\nfrom typing import List\nfrom typing import MutableMapping\nfrom typing import Optional\nfrom typing import Set\n\nfrom pre_commit.errors import FatalError\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util imp... | diff --git a/pre_commit/git.py b/pre_commit/git.py
index 50962745b..bec816c94 100644
--- a/pre_commit/git.py
+++ b/pre_commit/git.py
@@ -61,7 +61,7 @@ def get_root() -> str:
'git failed. Is it installed, and are you in a Git repository '
'directory?',
)
- if os.path.commonpath((roo... |
graspologic-org__graspologic-431 | remove * import in simulations
https://github.com/neurodata/graspy/blob/master/graspy/simulations/__init__.py
should not be using * import here
| [
{
"content": "# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nfrom .simulations import *\nfrom .simulations_corr import *\nfrom .rdpg_corr import *\n",
"path": "graspy/simulations/__init__.py"
}
] | [
{
"content": "# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nfrom .simulations import sample_edges, er_np, er_nm, sbm, rdpg, p_from_latent\nfrom .simulations_corr import sample_edges_corr, er_corr, sbm_corr\nfrom .rdpg_corr import rdpg_corr\n\n__all__ = [\n \"sa... | diff --git a/graspy/simulations/__init__.py b/graspy/simulations/__init__.py
index f9f8358c4..93370577c 100644
--- a/graspy/simulations/__init__.py
+++ b/graspy/simulations/__init__.py
@@ -1,6 +1,19 @@
# Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
-from .simulations impor... |
jupyterhub__jupyterhub-1424 | Control Panel button is slightly bigger than Logout button in notebook and terminal view
**How to reproduce the issue**
Login as admin and open a notebook or terminal window
**What you expected to happen**
All buttons in header-container have the same height.
**What actually happens**
Control Panel button is 4... | [
{
"content": "#!/usr/bin/env python\n\"\"\"Extend regular notebook server to be aware of multiuser things.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nfrom textwrap import dedent\nfrom urllib.parse import urlparse\n\nfrom jinja2 im... | [
{
"content": "#!/usr/bin/env python\n\"\"\"Extend regular notebook server to be aware of multiuser things.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nfrom textwrap import dedent\nfrom urllib.parse import urlparse\n\nfrom jinja2 im... | diff --git a/jupyterhub/singleuser.py b/jupyterhub/singleuser.py
index 1d29c970e0..d4d5d4149f 100755
--- a/jupyterhub/singleuser.py
+++ b/jupyterhub/singleuser.py
@@ -144,11 +144,13 @@ def hub_auth(self):
{% block header_buttons %}
{{super()}}
-<a href='{{hub_control_panel_url}}'
- class='btn btn-default btn-sm nav... |
deis__deis-4981 | [controller] When deleting a user, its apps are deleted from the database but keep running
When deleting a user, all the apps it owns are deleted from the controller's database. However, the apps (fleet services and docker containers) keep running. Afterwards, when re-creating an app with the same name as one of the ap... | [
{
"content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.contrib.auth.models import User\nfrom django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404\nfrom guard... | [
{
"content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.contrib.auth.models import User\nfrom django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404\nfrom guard... | diff --git a/client/cmd/auth.go b/client/cmd/auth.go
index 293b437594..dbd1801730 100644
--- a/client/cmd/auth.go
+++ b/client/cmd/auth.go
@@ -5,6 +5,7 @@ import (
"fmt"
"net/url"
"os"
+ "reflect"
"strings"
"syscall"
@@ -242,7 +243,11 @@ func Cancel(username string, password string, yes bool) error {
er... |
flairNLP__flair-566 | [BUG] A clear Exception/Error message must be thrown while trying to create a Sentence object from an empty string
**Describe the bug**
If one tries to create a `Sentence` object from an empty string, an `UnboundLocalError` of the `index` variable is thrown
**To Reproduce**
```python3
>>> from flair.data import S... | [
{
"content": "from abc import abstractmethod\nfrom typing import List, Dict, Union\n\nimport torch\nimport logging\n\nfrom collections import Counter\nfrom collections import defaultdict\n\nfrom segtok.segmenter import split_single\nfrom segtok.tokenizer import split_contractions\nfrom segtok.tokenizer import w... | [
{
"content": "from abc import abstractmethod\nfrom typing import List, Dict, Union\n\nimport torch\nimport logging\n\nfrom collections import Counter\nfrom collections import defaultdict\n\nfrom segtok.segmenter import split_single\nfrom segtok.tokenizer import split_contractions\nfrom segtok.tokenizer import w... | diff --git a/flair/data.py b/flair/data.py
index 2e5d91e054..ec944407c6 100644
--- a/flair/data.py
+++ b/flair/data.py
@@ -323,6 +323,9 @@ def __init__(self, text: str = None, use_tokenizer: bool = False, labels: Union[
# otherwise assumes whitespace tokenized text
else:
+ # c... |
encode__django-rest-framework-5149 | AuthTokenSerializer trims whitespace from passwords
## Checklist
- [x] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage question. (Those should... | [
{
"content": "from django.contrib.auth import authenticate\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom rest_framework import serializers\n\n\nclass AuthTokenSerializer(serializers.Serializer):\n username = serializers.CharField(label=_(\"Username\"))\n password = serializers.CharField... | [
{
"content": "from django.contrib.auth import authenticate\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom rest_framework import serializers\n\n\nclass AuthTokenSerializer(serializers.Serializer):\n username = serializers.CharField(label=_(\"Username\"))\n password = serializers.CharField... | diff --git a/rest_framework/authtoken/serializers.py b/rest_framework/authtoken/serializers.py
index b91a8454fc..7590fdb75d 100644
--- a/rest_framework/authtoken/serializers.py
+++ b/rest_framework/authtoken/serializers.py
@@ -6,7 +6,11 @@
class AuthTokenSerializer(serializers.Serializer):
username = serializer... |
pallets__click-1912 | version_option doesn't automatically detect version anymore with click 8.0.0
Hello, I just came across what seems to be a regression with click 8.0.0
# Bug
For a given click command `click-issue-test` installed with setuptools configured with the `click.version_option()` decorator, running `click-issue-test --ver... | [
{
"content": "import inspect\nimport types\nimport typing as t\nfrom functools import update_wrapper\nfrom gettext import gettext as _\n\nfrom .core import Argument\nfrom .core import Command\nfrom .core import Context\nfrom .core import Group\nfrom .core import Option\nfrom .core import Parameter\nfrom .global... | [
{
"content": "import inspect\nimport types\nimport typing as t\nfrom functools import update_wrapper\nfrom gettext import gettext as _\n\nfrom .core import Argument\nfrom .core import Command\nfrom .core import Context\nfrom .core import Group\nfrom .core import Option\nfrom .core import Parameter\nfrom .global... | diff --git a/CHANGES.rst b/CHANGES.rst
index 0b24de0ef..4438c1525 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -33,8 +33,10 @@ Released 2021-05-11
- Add an optional parameter to ``ProgressBar.update`` to set the
``current_item``. :issue:`1226`, :pr:`1332`
- ``version_option`` uses ``importlib.metadata`` (or... |
freedomofpress__securedrop-4496 | Expired Source Interface session causes server error on new session
## Description
Creating a new codename after a session has expired causes a server error.
## Steps to Reproduce
1. Visit the codename generation page (`/generate`) but do not press 'Submit Documents'
2. Wait for the session to expire
3. Pres... | [
{
"content": "from datetime import datetime, timedelta\nfrom flask import (Flask, render_template, flash, Markup, request, g, session,\n url_for, redirect)\nfrom flask_babel import gettext\nfrom flask_assets import Environment\nfrom flask_wtf.csrf import CSRFProtect, CSRFError\nfrom jinja2 imp... | [
{
"content": "from datetime import datetime, timedelta\nfrom flask import (Flask, render_template, flash, Markup, request, g, session,\n url_for, redirect)\nfrom flask_babel import gettext\nfrom flask_assets import Environment\nfrom flask_wtf.csrf import CSRFProtect, CSRFError\nfrom jinja2 imp... | diff --git a/securedrop/source_app/__init__.py b/securedrop/source_app/__init__.py
index d2679b737c..a411843ba6 100644
--- a/securedrop/source_app/__init__.py
+++ b/securedrop/source_app/__init__.py
@@ -145,7 +145,9 @@ def setup_g():
# clear the session after we render the message so it's localized
... |
easybuilders__easybuild-easyconfigs-9431 | Qt5/5.13.1-GCCcore-8.3.0 depends on JasPer.
I'm trying to build Qt5/5.13.1-GCCcore-8.3.0 on RHEL8 and it fails on:
```
qjp2handler.cpp:47:10: fatal error: jasper/jasper.h: No such file or directory
#include <jasper/jasper.h>
^~~~~~~~~~~~~~~~~
```
JasPer is not set as a dependency for Qt5/5.13.1-GCC... | [
{
"content": "##\n# Copyright 2012-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | [
{
"content": "##\n# Copyright 2012-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | null |
easybuilders__easybuild-easyconfigs-10390 | CVS is not included in EasyBuild releases
The whole folder https://github.com/easybuilders/easybuild-easyconfigs/tree/develop/easybuild/easyconfigs/c/CVS is removed from EasyBuild source distributions.
This happens as part of `python setup.py sdist`.
https://docs.python.org/2/distutils/sourcedist.html#principle
... | [
{
"content": "##\n# Copyright 2012-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | [
{
"content": "##\n# Copyright 2012-2020 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | null |
carltongibson__django-filter-591 | Impossible to overwrite filter attributes in child class
Maybe we are missing something, but why does this happen?
```
class FooBaseFilter(django_filters.FilterSet):
key = django_filters.CharFilter(label='code')
name = django_filters.CharFilter(label='name')
class FooFilter1(FooBaseFilter):
pass
... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport copy\nfrom collections import OrderedDict\n\nfrom django import forms\nfrom django.forms.forms import NON_FIELD_ERRORS\nfrom django.db import models\nfrom django.db.models.constants import LOOKUP_SEP\nfrom dj... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport copy\nfrom collections import OrderedDict\n\nfrom django import forms\nfrom django.forms.forms import NON_FIELD_ERRORS\nfrom django.db import models\nfrom django.db.models.constants import LOOKUP_SEP\nfrom dj... | diff --git a/django_filters/filterset.py b/django_filters/filterset.py
index 850554e92..547071de0 100644
--- a/django_filters/filterset.py
+++ b/django_filters/filterset.py
@@ -104,7 +104,11 @@ def get_declared_filters(cls, bases, attrs):
# merge declared filters from base classes
for base in reversed... |
dynaconf__dynaconf-966 | Field '_bypass_evaluation' provided as part of the value of a setting
**Describe the bug**
When a BoxList containing a dictionary is created, when looking up the value of the BoxList, the field `_bypass_evaluation` is present in the dictionary. This is unexpected.
**To Reproduce**
Steps to reproduce the behavior:... | [
{
"content": "from __future__ import annotations\n\nimport copy\nimport glob\nimport importlib\nimport inspect\nimport os\nimport warnings\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom contextlib import suppress\nfrom pathlib import Path\nfrom typing import Any\nfrom typing i... | [
{
"content": "from __future__ import annotations\n\nimport copy\nimport glob\nimport importlib\nimport inspect\nimport os\nimport warnings\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom contextlib import suppress\nfrom pathlib import Path\nfrom typing import Any\nfrom typing i... | diff --git a/dynaconf/base.py b/dynaconf/base.py
index f481f3171..c0c6c4eaa 100644
--- a/dynaconf/base.py
+++ b/dynaconf/base.py
@@ -1171,7 +1171,7 @@ def execute_loaders(
execute_module_hooks("post", self, env, silent=silent, key=key)
execute_instance_hooks(self, "post", self._post_hooks)
- ... |
ansible__awx-14489 | Tower Settings of type on/off idempotency not working
### Please confirm the following
- [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
- [X] I have checked the [current issues](https://github.com/ansible/awx/issues) for duplicates.
- [X]... | [
{
"content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n# (c) 2018, Nikhil Jain <nikjain@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_function\n\n__metaclass__ = type\n\n\nANSIBLE_METADATA = {... | [
{
"content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n# (c) 2018, Nikhil Jain <nikjain@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_function\n\n__metaclass__ = type\n\n\nANSIBLE_METADATA = {... | diff --git a/awx_collection/plugins/modules/settings.py b/awx_collection/plugins/modules/settings.py
index 56c0b94e5ad1..c911f77fcc6b 100644
--- a/awx_collection/plugins/modules/settings.py
+++ b/awx_collection/plugins/modules/settings.py
@@ -89,7 +89,7 @@ def coerce_type(module, value):
if not HAS_YAML:
... |
ansible-collections__community.aws-454 | sns_topic module always deletes and replaces SMS subscriptions
<!--- 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: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = r'''\nmodule: sns_to... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = r'''\nmodule: sns_to... | diff --git a/changelogs/fragments/454-sns_topic_fix_sms_endpoint_canonicalization.yaml b/changelogs/fragments/454-sns_topic_fix_sms_endpoint_canonicalization.yaml
new file mode 100644
index 00000000000..fd4cf415cef
--- /dev/null
+++ b/changelogs/fragments/454-sns_topic_fix_sms_endpoint_canonicalization.yaml
@@ -0,0 +1,... |
dmlc__dgl-1183 | build_graph in MovieLens class
## ❓ Questions and Help
Dear Quan (Andy) Gan,
i have a question about the method build_graph in the MovieLens class.
I see that the dataset is processed and you consider all the User and Movie features in generating the node features of the graph. In particular, you assign id of t... | [
{
"content": "import pandas as pd\nimport dgl\nimport os\nimport torch\nimport numpy as np\nimport scipy.sparse as sp\nimport time\nfrom functools import partial\nfrom .. import randomwalk\nimport stanfordnlp\nimport re\nimport tqdm\nimport string\n\nclass MovieLens(object):\n def __init__(self, directory):\... | [
{
"content": "import pandas as pd\nimport dgl\nimport os\nimport torch\nimport numpy as np\nimport scipy.sparse as sp\nimport time\nfrom functools import partial\nfrom .. import randomwalk\nimport stanfordnlp\nimport re\nimport tqdm\nimport string\n\nclass MovieLens(object):\n def __init__(self, directory):\... | diff --git a/examples/pytorch/recommendation/rec/datasets/movielens.py b/examples/pytorch/recommendation/rec/datasets/movielens.py
index 988776da1ae2..0caf1fece950 100644
--- a/examples/pytorch/recommendation/rec/datasets/movielens.py
+++ b/examples/pytorch/recommendation/rec/datasets/movielens.py
@@ -155,7 +155,7 @@ d... |
internetarchive__openlibrary-4259 | Unable to import csv generated by Goodreads
When trying to import my library with the generated .csv file from Goodreads, I receive an internal error.
```
Hmm...
Sorry. There seems to be a problem with what you were just looking at.
We've noted the error 2020-12-04/191144042614 and will look into it as soon a... | [
{
"content": "import json\n\nimport web\nimport logging\nimport simplejson\nimport re\n\nfrom infogami.utils import delegate\nfrom infogami import config\nfrom infogami.utils.view import (\n require_login, render, render_template, add_flash_message\n)\n\nfrom infogami.infobase.client import ClientException\n... | [
{
"content": "import json\n\nimport web\nimport logging\nimport simplejson\nimport re\n\nfrom infogami.utils import delegate\nfrom infogami import config\nfrom infogami.utils.view import (\n require_login, render, render_template, add_flash_message\n)\n\nfrom infogami.infobase.client import ClientException\n... | diff --git a/openlibrary/plugins/upstream/account.py b/openlibrary/plugins/upstream/account.py
index 8c422badf77..127e211f3be 100644
--- a/openlibrary/plugins/upstream/account.py
+++ b/openlibrary/plugins/upstream/account.py
@@ -864,8 +864,8 @@ class fetch_goodreads(delegate.page):
def POST(self):
import ... |
vyperlang__vyper-1552 | Nonsense struct output with inline returns
### Version Information
* vyper Version (output of `vyper --version`): 0.1.0b10
* OS: osx
* Python Version (output of `python --version`): Python 3.7.2
* Environment (output of `pip freeze`):
```
eth-tester==0.1.0b39
py-evm==0.2.0a42
pytest==5.0.1
vyper==0.1.0b10
... | [
{
"content": "import ast as python_ast\nfrom typing import (\n Any,\n List,\n Optional,\n Union,\n)\n\nfrom vyper import ast\nfrom vyper.exceptions import (\n ArrayIndexException,\n ConstancyViolationException,\n InvalidLiteralException,\n StructureException,\n TypeMismatchException,\... | [
{
"content": "import ast as python_ast\nfrom typing import (\n Any,\n List,\n Optional,\n Union,\n)\n\nfrom vyper import ast\nfrom vyper.exceptions import (\n ArrayIndexException,\n ConstancyViolationException,\n InvalidLiteralException,\n StructureException,\n TypeMismatchException,\... | diff --git a/tests/parser/features/external_contracts/test_self_call_struct.py b/tests/parser/features/external_contracts/test_self_call_struct.py
new file mode 100644
index 0000000000..f247445970
--- /dev/null
+++ b/tests/parser/features/external_contracts/test_self_call_struct.py
@@ -0,0 +1,34 @@
+from decimal import... |
ytdl-org__youtube-dl-16999 | ivysilani (ceskatelevize.cz) Problem
## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)
- Use the *Preview* tab to see what ... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n compat_urllib_parse_unquote,\n compat_urllib_parse_urlparse,\n)\nfrom ..utils import (\n ExtractorError,\n float_or_none,\n sanitized_Request,\n un... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n compat_urllib_parse_unquote,\n compat_urllib_parse_urlparse,\n)\nfrom ..utils import (\n ExtractorError,\n float_or_none,\n sanitized_Request,\n un... | diff --git a/youtube_dl/extractor/ceskatelevize.py b/youtube_dl/extractor/ceskatelevize.py
index 6bad908595e..46380430f9d 100644
--- a/youtube_dl/extractor/ceskatelevize.py
+++ b/youtube_dl/extractor/ceskatelevize.py
@@ -108,7 +108,7 @@ def _real_extract(self, url):
for user_agent in (None, USER_AGENTS['Safa... |
digitalfabrik__integreat-cms-1285 | Push notifications can be sent multiple times
### Describe the Bug
<!-- A clear and concise description of what the bug is. -->
It should not be possible to send push notifications multiple times to prevent the accidental re-sending of news.
Instead, only the "save" button should be enabled which can be used to upda... | [
{
"content": "import logging\n\nfrom datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import render, redirect\nfrom django.utils.decorators import method_decorator\nfrom django.utils.translation import ugettext as _\nfrom... | [
{
"content": "import logging\n\nfrom datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import render, redirect\nfrom django.utils.decorators import method_decorator\nfrom django.utils.translation import ugettext as _\nfrom... | diff --git a/integreat_cms/cms/templates/push_notifications/push_notification_form.html b/integreat_cms/cms/templates/push_notifications/push_notification_form.html
index 6d8389ef4c..8d1adafd06 100644
--- a/integreat_cms/cms/templates/push_notifications/push_notification_form.html
+++ b/integreat_cms/cms/templates/push... |
pre-commit__pre-commit-1299 | core.hooksPath being set makes it not possible to install
I have a laptop which has some mandaotry global settings for git, and I have not been able to enable pre-commit. I also tried doing
```
git config --global init.templateDir ~/.git-template
pre-commit init-templatedir ~/.git-template
```
But still get the m... | [
{
"content": "import itertools\nimport logging\nimport os.path\nimport shutil\nimport sys\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.repository imp... | [
{
"content": "import itertools\nimport logging\nimport os.path\nimport shutil\nimport sys\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.repository imp... | diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py
index 937217615..b2ccc5cf1 100644
--- a/pre_commit/commands/install_uninstall.py
+++ b/pre_commit/commands/install_uninstall.py
@@ -123,7 +123,7 @@ def install(
skip_on_missing_config: bool = False,
git_di... |
ivy-llc__ivy-15806 | expm1
| [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
index 6eca4285212a0..bbb4a21b15c82 100644
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -1048,6 +1048,10 @@ def count_nonzero(self, dim):
def exp(self):
retur... |
pydantic__pydantic-3551 | Field with discriminator on generic causes `AssertionError`. (1.9.0a1)
# Bug
When defining a Generic, with a `Field` that has descriminator, filling in the type variable of the generic class fails with an ``AssertionError``.
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
... | [
{
"content": "from collections import Counter as CollectionCounter, defaultdict, deque\nfrom collections.abc import Hashable as CollectionsHashable, Iterable as CollectionsIterable\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Counter,\n DefaultDict,\n Deque,\n Dict,\n FrozenSet,\n Gen... | [
{
"content": "from collections import Counter as CollectionCounter, defaultdict, deque\nfrom collections.abc import Hashable as CollectionsHashable, Iterable as CollectionsIterable\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Counter,\n DefaultDict,\n Deque,\n Dict,\n FrozenSet,\n Gen... | diff --git a/pydantic/fields.py b/pydantic/fields.py
index ff7b962f7ba..9ac1203c85d 100644
--- a/pydantic/fields.py
+++ b/pydantic/fields.py
@@ -732,6 +732,10 @@ def prepare_discriminated_union_sub_fields(self) -> None:
Note that this process can be aborted if a `ForwardRef` is encountered
"""
... |
mitmproxy__mitmproxy-2490 | Unable to use upstream proxy and proxy authentification
##### Steps to reproduce the problem:
1. git clone https://github.com/mitmproxy/mitmproxy.git
2. cd mitmproxy
3. ./dev.sh
4. . venv/bin/activate
5. mitmdump --proxyauth test:test -m upstream:http://10.7.0.225:8080/ --ssl-insecure
On 10.7.0.225, I have a... | [
{
"content": "import binascii\nimport weakref\nimport ldap3\nfrom typing import Optional\nfrom typing import MutableMapping # noqa\nfrom typing import Tuple\n\nimport passlib.apache\n\nimport mitmproxy.net.http\nfrom mitmproxy import connections # noqa\nfrom mitmproxy import exceptions\nfrom mitmproxy import ... | [
{
"content": "import binascii\nimport weakref\nimport ldap3\nfrom typing import Optional\nfrom typing import MutableMapping # noqa\nfrom typing import Tuple\n\nimport passlib.apache\n\nimport mitmproxy.net.http\nfrom mitmproxy import connections # noqa\nfrom mitmproxy import exceptions\nfrom mitmproxy import ... | diff --git a/mitmproxy/addons/proxyauth.py b/mitmproxy/addons/proxyauth.py
index 5f884b5572..64233e8865 100644
--- a/mitmproxy/addons/proxyauth.py
+++ b/mitmproxy/addons/proxyauth.py
@@ -61,7 +61,7 @@ def is_proxy_auth(self) -> bool:
- True, if authentication is done as if mitmproxy is a proxy
... |
dask__dask-9348 | Exception while providing a categorical dictionary meta
There is an exception when forcing *name* to be an unknown category instead of a string object dtype.
```python
import dask
dd = dask.datasets.timeseries()
dd = dd.map_partitions(lambda part: part, meta={'id': 'int32', 'name': 'str', 'x': 'float64', 'y': 'fl... | [
{
"content": "from __future__ import annotations\n\nimport math\nimport re\nimport sys\nimport textwrap\nimport traceback\nfrom collections.abc import Iterator, Mapping\nfrom contextlib import contextmanager\nfrom numbers import Number\nfrom typing import Callable, TypeVar, overload\n\nimport numpy as np\nimpor... | [
{
"content": "from __future__ import annotations\n\nimport math\nimport re\nimport sys\nimport textwrap\nimport traceback\nfrom collections.abc import Iterator, Mapping\nfrom contextlib import contextmanager\nfrom numbers import Number\nfrom typing import Callable, TypeVar, overload\n\nimport numpy as np\nimpor... | diff --git a/dask/dataframe/tests/test_utils_dataframe.py b/dask/dataframe/tests/test_utils_dataframe.py
index 53c455c9f21..c389448cde9 100644
--- a/dask/dataframe/tests/test_utils_dataframe.py
+++ b/dask/dataframe/tests/test_utils_dataframe.py
@@ -133,6 +133,12 @@ def __next__(self):
assert len(meta.cat.categorie... |
openstates__openstates-scrapers-2473 | DC failing since at least 2018-08-10
DC has been failing since 2018-08-10
Based on automated runs it appears that DC has not run successfully in 6 days (2018-08-10).
```
00:02:07 INFO pupa: no session specified, using 22
00:02:08 INFO pupa: save vote_event 22 - 2018-04-10 - Final Reading CC as vote_event_5cb29e20-... | [
{
"content": "import datetime\nimport json\nimport requests\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom .utils import decode_json\n\n\nclass DCBillScraper(Scraper):\n\n def scrape(self, session=None):\n if not session:\n session = self.latest_session()\n self.info... | [
{
"content": "import datetime\nimport json\nimport requests\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom .utils import decode_json\n\n\nclass DCBillScraper(Scraper):\n\n def scrape(self, session=None):\n if not session:\n session = self.latest_session()\n self.info... | diff --git a/openstates/dc/bills.py b/openstates/dc/bills.py
index 2de1a376c9..af875cc87c 100644
--- a/openstates/dc/bills.py
+++ b/openstates/dc/bills.py
@@ -296,7 +296,7 @@ def scrape(self, session=None):
start_record += per_page
params["request"]["iDisplayStart"] = start_record
... |
mlcommons__GaNDLF-250 | Default mapping to GPU device during inference
**Describe the bug**
When running on CPU, this issue occurs: RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to ma... | [
{
"content": "from .forward_pass import validate_network\nimport os\n\n# hides torchio citation request, see https://github.com/fepegar/torchio/issues/235\nos.environ[\"TORCHIO_HIDE_CITATION_PROMPT\"] = \"1\"\n\nimport pickle, argparse, torch\nimport numpy as np\nimport pandas as pd\nfrom torch.utils.data impor... | [
{
"content": "from .forward_pass import validate_network\nimport os\n\n# hides torchio citation request, see https://github.com/fepegar/torchio/issues/235\nos.environ[\"TORCHIO_HIDE_CITATION_PROMPT\"] = \"1\"\n\nimport pickle, argparse, torch\nimport numpy as np\nimport pandas as pd\nfrom torch.utils.data impor... | diff --git a/GANDLF/compute/inference_loop.py b/GANDLF/compute/inference_loop.py
index e6ae3c48c..0d510540f 100644
--- a/GANDLF/compute/inference_loop.py
+++ b/GANDLF/compute/inference_loop.py
@@ -51,7 +51,8 @@ def inference_loop(inferenceDataFromPickle, device, parameters, outputDir):
)
if not os.pat... |
napari__napari-4433 | Insert a new layer covers all the others, no matter where it is inserted
## 🐛 Bug
Insert a new layer covers all the others, no matter where it is inserted.
## To Reproduce
Steps to reproduce the behavior:
1. Insert a new layer at a given index, see that it covers all other layers
`viewer.layers.insert(i... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport traceback\nimport warnings\nfrom typing import TYPE_CHECKING, List, Optional, Sequence, Tuple\nfrom weakref import WeakSet\n\nimport numpy as np\nfrom qtpy.QtCore import QCoreApplication, QObject, Qt\nfrom qtpy.QtGui import QCursor, QGui... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport traceback\nimport warnings\nfrom typing import TYPE_CHECKING, List, Optional, Sequence, Tuple\nfrom weakref import WeakSet\n\nimport numpy as np\nfrom qtpy.QtCore import QCoreApplication, QObject, Qt\nfrom qtpy.QtGui import QCursor, QGui... | diff --git a/napari/_qt/_tests/test_qt_viewer.py b/napari/_qt/_tests/test_qt_viewer.py
index 2e7fa34e445..3447c00a054 100644
--- a/napari/_qt/_tests/test_qt_viewer.py
+++ b/napari/_qt/_tests/test_qt_viewer.py
@@ -18,6 +18,7 @@
skip_on_win_ci,
)
from napari._vispy.utils.gl import fix_data_dtype
+from napari.layer... |
kubeflow__pipelines-6703 | Upgrade cloudpickle to > 2.0.0
Hello,
One of the features of pipelines is Step Caching (https://www.kubeflow.org/docs/components/pipelines/caching/) to avoid running the costly computations again and again.
The key for caching is:
```
message CacheKey {
map<string, ArtifactNameList> inputArtifactNames = 1... | [
{
"content": "# Copyright 2018 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | [
{
"content": "# Copyright 2018 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | diff --git a/sdk/RELEASE.md b/sdk/RELEASE.md
index c6c3b5fa8a4..98efc8443d8 100644
--- a/sdk/RELEASE.md
+++ b/sdk/RELEASE.md
@@ -20,6 +20,7 @@
* Update v2 yaml format [\#6661](https://github.com/kubeflow/pipelines/pull/6661)
* Depends on `typing-extensions>=3.7.4,<4; python_version<"3.9"` [\#6683](https://github.com/... |
django-cms__django-filer-413 | A lot of file descriptors usage
I have a problem with performance on my current project.
While I started to search a problem, I sighted that uWSGI process of this project holds much more file descriptors than other projects. There's something around 1000 opened files, while even no one on the site at this time, and al... | [
{
"content": "#-*- coding: utf-8 -*-\nimport logging\n\ntry:\n from PIL import Image as PILImage\nexcept ImportError:\n try:\n import Image as PILImage\n except ImportError:\n raise ImportError(\"The Python Imaging Library was not found.\")\nfrom datetime import datetime\nimport os\n\nfro... | [
{
"content": "#-*- coding: utf-8 -*-\nimport logging\n\ntry:\n from PIL import Image as PILImage\nexcept ImportError:\n try:\n import Image as PILImage\n except ImportError:\n raise ImportError(\"The Python Imaging Library was not found.\")\nfrom datetime import datetime\nimport os\n\nfro... | diff --git a/filer/models/imagemodels.py b/filer/models/imagemodels.py
index 7f169d92a..af44c30fd 100644
--- a/filer/models/imagemodels.py
+++ b/filer/models/imagemodels.py
@@ -194,7 +194,7 @@ def thumbnails(self):
@property
def easy_thumbnails_thumbnailer(self):
tn = FilerThumbnailer(
- f... |
conan-io__conan-622 | Test package command failing when method requirements in test package's conanfile
Creating a new package with "conan new -t", and editing the example to require the package in a requirements method:
```
class MyTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
# requires = "prueba/0.1@... | [
{
"content": "from conans.client.output import ConanOutput, Color\nimport argparse\nfrom conans.errors import ConanException\nimport inspect\nfrom conans.client.remote_manager import RemoteManager\nfrom conans.client.userio import UserIO\nfrom conans.client.rest.auth_manager import ConanApiAuthManager\nfrom con... | [
{
"content": "from conans.client.output import ConanOutput, Color\nimport argparse\nfrom conans.errors import ConanException\nimport inspect\nfrom conans.client.remote_manager import RemoteManager\nfrom conans.client.userio import UserIO\nfrom conans.client.rest.auth_manager import ConanApiAuthManager\nfrom con... | diff --git a/conans/client/command.py b/conans/client/command.py
index 5eda8c1b6a8..59c02b8d714 100644
--- a/conans/client/command.py
+++ b/conans/client/command.py
@@ -252,6 +252,7 @@ def test_package(self, *args):
conanfile = loader.load_conan(test_conanfile, self._user_io.out, consumer=True)
try:
... |
elastic__apm-agent-python-1775 | capture_serverless makes lambda fail when input is not a JSON-dict
**Describe the bug**:
Hi!
I have encountered a bug when using `@capture_serverless` decorator on a lambda inside a Step Function that processes the output of a Map state.
Elastic APM Python package version: 6.14.0 (latest)
**To Reproduce**... | [
{
"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 0355fb0a3..b32686345 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -40,6 +40,7 @@ endif::[]
===== Bug fixes
* Fix spans being dropped if they don't have a name {pull}1770[#1770]
+* Fix AWS Lambda support when `event` is a list {pull}1775[#1775... |
getpelican__pelican-1959 | Support string formatted dates for DEFAULT_DATE
Currently the documentation implies that it supports various formats, but does not explain which. The most intuitive one however is not supported.
It would make sense that this option would support the format of the meta tag that it seeks to provide a default value for, ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\n\nimport docutils\nimport docutils.core\nimport docutils.io\nfrom docutils.writers.html4css1 import HTMLTranslator\n\nimport six\nfrom six.... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\n\nimport docutils\nimport docutils.core\nimport docutils.io\nfrom docutils.writers.html4css1 import HTMLTranslator\n\nimport six\nfrom six.... | diff --git a/docs/settings.rst b/docs/settings.rst
index 1de28c124..a0a4b1b2c 100644
--- a/docs/settings.rst
+++ b/docs/settings.rst
@@ -61,6 +61,8 @@ Setting name (followed by default value, if any)
If ``'fs'``, Pelican will use the file... |
getsentry__sentry-3212 | Discarded invalid value for parameter 'breadcrumbs'
With Sentry 8.4 and RavenJS 3.0.4, why might the breadcrumbs parameter be discarded?
Scenario:
- I land on a page which tries to call a nonexistant function (fooltip)
- RavenJS's window.onerror handler fires and sends two POSTs to Sentry for that error. The first ha... | [
{
"content": "\"\"\"\nsentry.coreapi\n~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n# TODO: We should make the API a class, and UDP/HTTP just inherit from it\n# This will make it so we can more easily co... | [
{
"content": "\"\"\"\nsentry.coreapi\n~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n# TODO: We should make the API a class, and UDP/HTTP just inherit from it\n# This will make it so we can more easily co... | diff --git a/src/sentry/coreapi.py b/src/sentry/coreapi.py
index 58255e254c6e01..b407c638243f7a 100644
--- a/src/sentry/coreapi.py
+++ b/src/sentry/coreapi.py
@@ -349,6 +349,12 @@ def validate_data(self, project, data):
data['errors'] = []
+ # Ignore any breadcrumbs data sent in older versions
+ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.