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 ⌀ |
|---|---|---|---|---|
uclapi__uclapi-953 | OAuth: Useless Error With No Callback URL
1) Create an app
2) Attach an integration via OAuth
3) Attempt to Authenticate
4) Error about invalid signed data. Instead, we should put an error on screen that says a callback URL is required. In fact, authentication shouldn't even begin without a valid callback URL.
| [
{
"content": "import json\nimport os\n\nimport redis\nfrom django.core import signing\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django.core.signing import TimestampSigner\nfrom django.shortcuts import redirect, render\nfrom django.utils.http import quote\nfrom django.views.decorators.csr... | [
{
"content": "import json\nimport os\n\nimport redis\nfrom django.core import signing\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django.core.signing import TimestampSigner\nfrom django.shortcuts import redirect, render\nfrom django.utils.http import quote\nfrom django.views.decorators.csr... | diff --git a/backend/uclapi/oauth/tests.py b/backend/uclapi/oauth/tests.py
index 0e0a724bd..8b484ff4d 100644
--- a/backend/uclapi/oauth/tests.py
+++ b/backend/uclapi/oauth/tests.py
@@ -12,7 +12,7 @@
from .app_helpers import generate_random_verification_code
from .models import OAuthScope, OAuthToken
from .scoping im... |
cisagov__manage.get.gov-1302 | Unable to access Manage Domain for a transition domain
### Current Behavior
Logged in as a full access user I manually created a domain that just had domain and domain info, but no application. When going to its Manage Domain page via the django admin domain object I got a 500 error and the logs showed an Exception wa... | [
{
"content": "\"\"\"Permissions-related mixin classes.\"\"\"\n\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\n\nfrom registrar.models import (\n DomainApplication,\n DomainInvitation,\n DomainInformation,\n UserDomainRole,\n)\nimport logging\n\n\nlogger = logging.getLogger(__name__... | [
{
"content": "\"\"\"Permissions-related mixin classes.\"\"\"\n\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\n\nfrom registrar.models import (\n DomainApplication,\n DomainInvitation,\n DomainInformation,\n UserDomainRole,\n)\nimport logging\n\n\nlogger = logging.getLogger(__name__... | diff --git a/src/registrar/templates/domain_base.html b/src/registrar/templates/domain_base.html
index d2870a82c..b5f70d341 100644
--- a/src/registrar/templates/domain_base.html
+++ b/src/registrar/templates/domain_base.html
@@ -16,49 +16,60 @@
</div>
<div class="grid-row grid-gap">
<div class="tablet:grid-c... |
freedomofpress__securedrop-4365 | GPG PINENTRY_LAUNCHED error when sources are deleted
## Description
Deleting a source raises this error.
```pytb
Exception in thread Thread-39:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom distutils.version import StrictVersion\nimport pretty_bad_protocol as gnupg\nimport os\nimport io\nimport six\nimport scrypt\nimport subprocess\nfrom random import SystemRandom\n\nfrom base64 import b32encode\nfrom datetime import date\nfrom f... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom distutils.version import StrictVersion\nimport pretty_bad_protocol as gnupg\nimport os\nimport io\nimport six\nimport scrypt\nimport subprocess\nfrom random import SystemRandom\n\nfrom base64 import b32encode\nfrom datetime import date\nfrom f... | diff --git a/securedrop/crypto_util.py b/securedrop/crypto_util.py
index a91c385c67..5ba67a359b 100644
--- a/securedrop/crypto_util.py
+++ b/securedrop/crypto_util.py
@@ -37,6 +37,23 @@
'BCDEFGHIJKLMNOPQRSTUVWXYZ')
+def monkey_patch_delete_handle_status(self, key, value):
+ """Parse a... |
conan-io__conan-center-index-2250 | [package] m4/1.4.18 won't build on x86
I'm indirectly using m4 because I'm trying to upgrade from `bison_installer/3.3.2@bincrafters/stable` (which doesn't use m4) to `bison/3.5.3`. The build fails on win32
### Package and Environment Details (include every applicable attribute)
* Package Name/Version: **m4/1... | [
{
"content": "from conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom contextlib import contextmanager\nimport os\n\n\nclass M4Conan(ConanFile):\n name = \"m4\"\n description = \"GNU M4 is an implementation of the traditional Unix macro processor\"\n topics = (\"conan\", \"m4\", \"macro\",... | [
{
"content": "from conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom contextlib import contextmanager\nimport os\n\n\nclass M4Conan(ConanFile):\n name = \"m4\"\n description = \"GNU M4 is an implementation of the traditional Unix macro processor\"\n topics = (\"conan\", \"m4\", \"macro\",... | diff --git a/recipes/m4/all/conanfile.py b/recipes/m4/all/conanfile.py
index 6f592ab02a745..f7ff154ee539d 100644
--- a/recipes/m4/all/conanfile.py
+++ b/recipes/m4/all/conanfile.py
@@ -39,7 +39,13 @@ def _configure_autotools(self):
return self._autotools
conf_args = []
self._autotools = A... |
LMFDB__lmfdb-4040 | Downloading new space
```
Exception on /ModularForm/GL2/Q/holomorphic/download_full_space/1369.2 [GET]
Traceback (most recent call last):
File "/home/sage/sage-9.1/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/sage/sage-9.1/local... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom ast import literal_eval\nfrom flask import url_for, redirect, abort\nfrom lmfdb import db\nfrom lmfdb.backend.encoding import Json\nfrom lmfdb.utils import Downloader, flash_error\nfrom lmfdb.classical_modular_forms.web_newform import WebNewform, encode_hecke_orbit\n... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom ast import literal_eval\nfrom flask import url_for, redirect, abort\nfrom lmfdb import db\nfrom lmfdb.backend.encoding import Json\nfrom lmfdb.utils import Downloader, flash_error\nfrom lmfdb.classical_modular_forms.web_newform import WebNewform, encode_hecke_orbit\n... | diff --git a/lmfdb/classical_modular_forms/download.py b/lmfdb/classical_modular_forms/download.py
index 1d8f6a2c3e..66ee11b153 100644
--- a/lmfdb/classical_modular_forms/download.py
+++ b/lmfdb/classical_modular_forms/download.py
@@ -332,7 +332,9 @@ def download_full_space(self, label, lang='text'):
for attr ... |
pfnet__pytorch-pfn-extras-372 | Typing: ManualScheduleTrigger `points` should accept `int`
| [
{
"content": "# mypy: ignore-errors\n\nfrom typing import List, Union, TYPE_CHECKING\n\nfrom pytorch_pfn_extras.training import trigger\n\n\nif TYPE_CHECKING:\n from pytorch_pfn_extras.training.manager import _BaseExtensionsManager\n from pytorch_pfn_extras.training._trigger_util import UnitLiteral\n\n\nc... | [
{
"content": "# mypy: ignore-errors\n\nfrom typing import Sequence, Union, TYPE_CHECKING\n\nfrom pytorch_pfn_extras.training import trigger\n\n\nif TYPE_CHECKING:\n from pytorch_pfn_extras.training.manager import _BaseExtensionsManager\n from pytorch_pfn_extras.training._trigger_util import UnitLiteral\n\... | diff --git a/pytorch_pfn_extras/training/triggers/manual_schedule_trigger.py b/pytorch_pfn_extras/training/triggers/manual_schedule_trigger.py
index 4ff81f5e4..556b78b0d 100644
--- a/pytorch_pfn_extras/training/triggers/manual_schedule_trigger.py
+++ b/pytorch_pfn_extras/training/triggers/manual_schedule_trigger.py
@@ ... |
conda__conda-5239 | condo update --all
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : osx-64
conda version : 4.3.15
conda is private : False
conda-env version : 4.3.15
... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import defaultdict\nfrom logging import getLogger\nimport os\nfrom os.path import dirname, join\nfrom subprocess import CalledProcessError\nimport sys\nfrom traceback imp... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import defaultdict\nfrom logging import getLogger\nimport os\nfrom os.path import dirname, join\nfrom subprocess import CalledProcessError\nimport sys\nfrom traceback imp... | diff --git a/conda/core/link.py b/conda/core/link.py
index f6cacacfb8a..f26a6c4dd99 100644
--- a/conda/core/link.py
+++ b/conda/core/link.py
@@ -104,8 +104,9 @@ class UnlinkLinkTransaction(object):
@classmethod
def create_from_dists(cls, index, target_prefix, unlink_dists, link_dists):
# This constru... |
Textualize__textual-3699 | `Button.update` method?
I'm often caught out by `Button.update` not updating the label (or doing anything!)
I thought about overriding the method to simply assign `Button.label`, but the argument type for the `Static` base class is `RenderableType` whereas the button label is `TextType` (I'm afraid I don't fully und... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom typing import cast\n\nimport rich.repr\nfrom rich.console import ConsoleRenderable, RenderableType\nfrom rich.text import Text, TextType\nfrom typing_extensions import Literal, Self\n\nfrom .. import events\nfrom ..binding i... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom typing import cast\n\nimport rich.repr\nfrom rich.console import ConsoleRenderable, RenderableType\nfrom rich.text import Text, TextType\nfrom typing_extensions import Literal, Self\n\nfrom .. import events\nfrom ..binding i... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d269fc123..bdf9208f36 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- CSS error reporting will no longer provide links to the files in question https://github.com/Textualize/textual/p... |
microsoft__ptvsd-1929 | Ensure that the `ptvsd_attach` event sets the right name for child processes
Currently we use the same name as the parent config for the child process config.
The name for child process should probably be `Process #<id>` or something similar.
| [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport os\nimport sys\n\nimport ptvsd\nfrom ptvsd.comm... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport os\nimport platform\nimport sys\n\nimport ptvsd... | diff --git a/src/ptvsd/adapter/ide.py b/src/ptvsd/adapter/ide.py
index 7a8586c9d..610107001 100644
--- a/src/ptvsd/adapter/ide.py
+++ b/src/ptvsd/adapter/ide.py
@@ -9,7 +9,7 @@
import sys
import ptvsd
-from ptvsd.common import json, log, messaging, sockets
+from ptvsd.common import fmt, json, log, messaging, socket... |
plotly__dash-2491 | [BUG] Inline clientside_callback scripts not found in Dash 2.9.2
**Environment**
```
dash 2.9.2
```
**Describe the bug**
In Dash 2.9.2, the clientside callbacks defined inline get a random function name which seems to break. Note: the issue solves itslef when refreshing the page, however every ... | [
{
"content": "import collections\nimport uuid\nfrom functools import wraps\n\nimport flask\n\nfrom .dependencies import (\n handle_callback_args,\n handle_grouped_callback_args,\n Output,\n)\nfrom .exceptions import (\n PreventUpdate,\n WildcardInLongCallback,\n DuplicateCallback,\n Missing... | [
{
"content": "import collections\nimport hashlib\nfrom functools import wraps\n\nimport flask\n\nfrom .dependencies import (\n handle_callback_args,\n handle_grouped_callback_args,\n Output,\n)\nfrom .exceptions import (\n PreventUpdate,\n WildcardInLongCallback,\n DuplicateCallback,\n Miss... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d883464f6d..791b88c910 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
All notable changes to `dash` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
+## [UNRELEASED]
+
+## Fixed
+
+- [#2491](https://git... |
opendatacube__datacube-core-1086 | Handle correctly `nodata=NaN` case of the product
### Expected behaviour
```python
assert np.isnan(dc.index.products.get_by_name('gm_s2_annual').measurements['SMAD'].nodata)
```
### Actual behaviour
`nodata` attribute is a string containng `"NaN"`.
This happens due to conversion to json from yaml, json do... | [
{
"content": "# This file is part of the Open Data Cube, see https://opendatacube.org for more information\n#\n# Copyright (c) 2015-2020 ODC Contributors\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"\nCore classes used across modules.\n\"\"\"\nimport logging\nimport math\nimport warnings\nfrom collections impo... | [
{
"content": "# This file is part of the Open Data Cube, see https://opendatacube.org for more information\n#\n# Copyright (c) 2015-2020 ODC Contributors\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"\nCore classes used across modules.\n\"\"\"\nimport logging\nimport math\nimport warnings\nfrom collections impo... | diff --git a/.github/workflows/docker-test-runner.yml b/.github/workflows/docker-test-runner.yml
index 96f8218982..9835ea7eb3 100644
--- a/.github/workflows/docker-test-runner.yml
+++ b/.github/workflows/docker-test-runner.yml
@@ -84,8 +84,16 @@ jobs:
- name: Verify Docker Image
run: |
+ # Make sur... |
lutris__lutris-2674 | Problem with user directories when sandboxing is disabled
Hi, i have strange problem in recent version. I have disabled wineprefix sandboxing, so my user directories were configured as symlinks. But in recent version programs (or even wine config) do not start with error:
Traceback (most recent call last):
File "... | [
{
"content": "\"\"\"Wine prefix management\"\"\"\nimport os\nfrom lutris.util.wine.registry import WineRegistry\nfrom lutris.util.log import logger\nfrom lutris.util import joypad, system, xdgshortcuts\nfrom lutris.util.display import DISPLAY_MANAGER\n\nDESKTOP_KEYS = [\"Desktop\", \"Personal\", \"My Music\", \... | [
{
"content": "\"\"\"Wine prefix management\"\"\"\nimport os\nfrom lutris.util.wine.registry import WineRegistry\nfrom lutris.util.log import logger\nfrom lutris.util import joypad, system, xdgshortcuts\nfrom lutris.util.display import DISPLAY_MANAGER\n\nDESKTOP_KEYS = [\"Desktop\", \"Personal\", \"My Music\", \... | diff --git a/lutris/util/wine/prefix.py b/lutris/util/wine/prefix.py
index 3d6a0f0364..97a0b490f0 100644
--- a/lutris/util/wine/prefix.py
+++ b/lutris/util/wine/prefix.py
@@ -117,7 +117,11 @@ def desktop_integration(self, desktop_dir=None, restore=False):
except OSError:
os... |
getmoto__moto-1501 | ELBv2.create_listener should associate TargetGroup with LB
If you create a TargetGroup, associate it with a LB via create_listener, and then call describe_target_groups specifying BOTH the load balancer ARN and the target group name, no target group is returned.
```python
response = conn.create_target_group(
... | [
{
"content": "from __future__ import unicode_literals\n\nimport datetime\nimport re\nfrom moto.compat import OrderedDict\nfrom moto.core.exceptions import RESTError\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.ec2.models import ec2_backends\nfrom moto.acm.models import acm_backends\nfrom .utils impo... | [
{
"content": "from __future__ import unicode_literals\n\nimport datetime\nimport re\nfrom moto.compat import OrderedDict\nfrom moto.core.exceptions import RESTError\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.ec2.models import ec2_backends\nfrom moto.acm.models import acm_backends\nfrom .utils impo... | diff --git a/moto/elbv2/models.py b/moto/elbv2/models.py
index 726b1a164212..8921581d377f 100644
--- a/moto/elbv2/models.py
+++ b/moto/elbv2/models.py
@@ -486,6 +486,10 @@ def create_listener(self, load_balancer_arn, protocol, port, ssl_policy, certifi
arn = load_balancer_arn.replace(':loadbalancer/', ':listen... |
deis__deis-379 | Environment variables are not consistently available to deployed apps
Found the issue with a Django App that did not respect database env vars. However they seem to work with our existing example apps.
```
$ deis config
=== <appName> Config
POWERED_BY: Gabe
$ deis run 'echo $POWERED_BY'
<returns blank>
```
Django Tr... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n# pylint: disable=R0903,W0232\n\nfrom __future__ import unicode_literals\nimport importlib\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.co... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n# pylint: disable=R0903,W0232\n\nfrom __future__ import unicode_literals\nimport importlib\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.co... | diff --git a/api/models.py b/api/models.py
index fe122ed7d0..9d72d08388 100644
--- a/api/models.py
+++ b/api/models.py
@@ -541,10 +541,12 @@ def run(self, command):
# prepare ssh command
version = release.version
docker_args = ' '.join(
- ['-a', 'stdout', '-a', 'stderr',
+ ... |
getsentry__sentry-15470 | Switch license to Apache 2
Let's do it.
| [
{
"content": "#!/usr/bin/env python\n\"\"\"\nSentry\n======\n\nSentry is a realtime event logging and aggregation platform. It specializes\nin monitoring errors and extracting all the information needed to do a proper\npost-mortem without any of the hassle of the standard user feedback loop.\n\nSentry is a Serv... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nSentry\n======\n\nSentry is a realtime event logging and aggregation platform. It specializes\nin monitoring errors and extracting all the information needed to do a proper\npost-mortem without any of the hassle of the standard user feedback loop.\n\nSentry is a Serv... | diff --git a/LICENSE b/LICENSE
index 43e4b1fa6fd977..7adada950ac650 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,12 +1,104 @@
-Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors.
-All rights reserved.
+Business Source License 1.1
-Redistribution and use in source and binary forms, with or without m... |
mozmeao__snippets-service-864 | Filter by release channel on ASRSnippets raises an error
| [
{
"content": "from datetime import datetime, timedelta\n\nfrom django.contrib import admin\nfrom django.utils.encoding import force_text\n\n\nclass ModifiedFilter(admin.SimpleListFilter):\n title = 'Last modified'\n parameter_name = 'last_modified'\n\n def lookups(self, request, model_admin):\n ... | [
{
"content": "from datetime import datetime, timedelta\n\nfrom django.contrib import admin\nfrom django.utils.encoding import force_text\n\nfrom snippets.base.managers import SnippetQuerySet\n\n\nclass ModifiedFilter(admin.SimpleListFilter):\n title = 'Last modified'\n parameter_name = 'last_modified'\n\n... | diff --git a/snippets/base/admin/filters.py b/snippets/base/admin/filters.py
index beab92a77..424c0debb 100644
--- a/snippets/base/admin/filters.py
+++ b/snippets/base/admin/filters.py
@@ -3,6 +3,8 @@
from django.contrib import admin
from django.utils.encoding import force_text
+from snippets.base.managers import S... |
Qiskit__qiskit-5334 | Sabre swap mapper dominated by data copy
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Information
- **Qiskit Terra version**: master
- **Python version**:
- **Operating system**:
### What is the current behavior?... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n... | diff --git a/qiskit/transpiler/passes/routing/sabre_swap.py b/qiskit/transpiler/passes/routing/sabre_swap.py
index 59954b86bf88..74feece5c84e 100644
--- a/qiskit/transpiler/passes/routing/sabre_swap.py
+++ b/qiskit/transpiler/passes/routing/sabre_swap.py
@@ -13,7 +13,7 @@
"""Routing via SWAP insertion using the SABRE ... |
airctic__icevision-189 | helper function for COCO parser
## 🚀 Feature
**Is your feature request related to a problem? Please describe.**
As described in #79, it's currently very verbose to create a COCO parser, the steps should be ideally be reduced to a single function call.
**Dream API**
```python
parser = datasets.coco.parser(
... | [
{
"content": "__all__ = [\"COCOImageInfoParser\", \"COCOAnnotationParser\"]\n\nfrom mantisshrimp.imports import *\nfrom mantisshrimp.core import *\nfrom mantisshrimp.parsers.defaults import *\nfrom mantisshrimp.parsers.mixins import *\n\n\nclass COCOImageInfoParser(DefaultImageInfoParser):\n def __init__(sel... | [
{
"content": "__all__ = [\"parser\", \"COCOImageInfoParser\", \"COCOAnnotationParser\"]\n\nfrom mantisshrimp.imports import *\nfrom mantisshrimp.core import *\nfrom mantisshrimp.parsers import *\n\n\ndef parser(\n annotations_file: Union[str, Path], img_dir: Union[str, Path]\n) -> ParserInterface:\n annot... | diff --git a/mantisshrimp/datasets/coco/parsers.py b/mantisshrimp/datasets/coco/parsers.py
index 38141f6da..870f4ae04 100644
--- a/mantisshrimp/datasets/coco/parsers.py
+++ b/mantisshrimp/datasets/coco/parsers.py
@@ -1,9 +1,23 @@
-__all__ = ["COCOImageInfoParser", "COCOAnnotationParser"]
+__all__ = ["parser", "COCOImag... |
cloudtools__troposphere-1589 | Add support for DataLocationResource & TableWithColumnsResource in AWS::LakeFormation::Permissions (2020, Jan 16 update)
waiting for the doc to be updated
| [
{
"content": "# Copyright (c) 2012-2019, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n#\n# *** Do not modify - this file is autogenerated ***\n# Resource specification version: 5.3.0\n\n\nfrom . import AWSObject\nfrom . import AWSProperty\n\n\nclass Admins(AWSPrope... | [
{
"content": "# Copyright (c) 2012-2019, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n#\n# *** Do not modify - this file is autogenerated ***\n# Resource specification version: 5.3.0\n\n\nfrom . import AWSObject\nfrom . import AWSProperty\n\n\nclass Admins(AWSPrope... | diff --git a/troposphere/lakeformation.py b/troposphere/lakeformation.py
index 7588df3f0..fb97f637b 100644
--- a/troposphere/lakeformation.py
+++ b/troposphere/lakeformation.py
@@ -43,10 +43,33 @@ class TableResource(AWSProperty):
}
+class DataLocationResource(AWSProperty):
+ props = {
+ 'S3Resource'... |
ckan__ckan-6088 | Allow uploaders to only override asset / resource uploading
**CKAN version**
2.8.7, 2.9.2
**Describe the bug**
Currently, CKAN allows handling both image / asset uploading and resource uploading via the `IUploader` plugin interface. That interface allows plugins to return `None` from `get_uploader()` / `get_resour... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport cgi\nimport datetime\nimport logging\nimport magic\nimport mimetypes\nfrom six.moves.urllib.parse import urlparse\n\nfrom werkzeug.datastructures import FileStorage as FlaskFileStorage\n\nimport ckan.lib.munge as munge\nimport ckan.logic as logic\nimport ckan... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport cgi\nimport datetime\nimport logging\nimport magic\nimport mimetypes\nfrom six.moves.urllib.parse import urlparse\n\nfrom werkzeug.datastructures import FileStorage as FlaskFileStorage\n\nimport ckan.lib.munge as munge\nimport ckan.logic as logic\nimport ckan... | diff --git a/ckan/lib/uploader.py b/ckan/lib/uploader.py
index 246f1817bc0..146e1fe28aa 100644
--- a/ckan/lib/uploader.py
+++ b/ckan/lib/uploader.py
@@ -52,6 +52,8 @@ def get_uploader(upload_to, old_filename=None):
upload = None
for plugin in plugins.PluginImplementations(plugins.IUploader):
upload =... |
pyinstaller__pyinstaller-5006 | Impossible to build with matplotlib 3.3 on Python 3.7 and 3.8
## Description of the issue
Trying a simple program main.py
```python
import matplotlib.pyplot as plt
plt.plot([0,1,2], [0,1,1])
```
Running the application created with pyinstaller --hiddenimport='pkg_resources.py2_warn' main.py
I get:
``... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | diff --git a/PyInstaller/hooks/hook-matplotlib.py b/PyInstaller/hooks/hook-matplotlib.py
index 4b09756ab1..e13209bcc3 100644
--- a/PyInstaller/hooks/hook-matplotlib.py
+++ b/PyInstaller/hooks/hook-matplotlib.py
@@ -16,5 +16,5 @@
"import matplotlib; print(matplotlib._get_data_path())")
datas = [
- (mpl_data_d... |
frappe__frappe-25085 | No `before_rename` and `after_rename` server scripts / hooks
There are no listeners for rename events
The `after_rename` seems to be used only to push notifications
The only way to check for this I have found, is to keep an "old_id" field updated on insert/saves, and use a cron job to check for changes regularly ... | [
{
"content": "import frappe\n\n# this is a separate file since it is imported in frappe.model.document\n# to avoid circular imports\n\nEVENT_MAP = {\n\t\"before_insert\": \"Before Insert\",\n\t\"after_insert\": \"After Insert\",\n\t\"before_validate\": \"Before Validate\",\n\t\"validate\": \"Before Save\",\n\t\... | [
{
"content": "import frappe\n\n# this is a separate file since it is imported in frappe.model.document\n# to avoid circular imports\n\nEVENT_MAP = {\n\t\"before_insert\": \"Before Insert\",\n\t\"after_insert\": \"After Insert\",\n\t\"before_validate\": \"Before Validate\",\n\t\"validate\": \"Before Save\",\n\t\... | diff --git a/frappe/core/doctype/server_script/server_script.json b/frappe/core/doctype/server_script/server_script.json
index 295289184a87..f081b846f3f1 100644
--- a/frappe/core/doctype/server_script/server_script.json
+++ b/frappe/core/doctype/server_script/server_script.json
@@ -49,14 +49,15 @@
"in_list_view": 1... |
hylang__hy-2015 | `require` with relative path crashes the compiler
I wrote the following scripts where file_b.hy tries to get macro do-twice in file_a.hy via "require" with relative paths.
[relative_test.zip](https://github.com/hylang/hy/files/4742639/relative_test.zip)
* directories & files
relative_test
├── dir1
│ ├── di... | [
{
"content": "# Copyright 2021 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\nimport sys\nimport builtins\nimport importlib\nimport inspect\nimport pkgutil\nimport traceback\n\nfrom contextlib import contextmanager\n\nfrom hy._compat import... | [
{
"content": "# Copyright 2021 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\nimport sys\nimport builtins\nimport importlib\nimport inspect\nimport pkgutil\nimport traceback\n\nfrom contextlib import contextmanager\n\nfrom hy._compat import... | diff --git a/NEWS.rst b/NEWS.rst
index c1814d79d..513bdc41e 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -61,6 +61,7 @@ Bug Fixes
* Fixed namespace pollution caused by automatic imports of Hy builtins and macros.
* Fixed Hy model objects sometimes not being in scope.
* Fixed `doc` sometimes failing to find builtin macros... |
mlflow__mlflow-3410 | [BUG] - `mlruns` directory automatically created without doing anything
### Willingness to contribute
The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the MLflow code base?
- [ ] Yes. I can contribute a fix for thi... | [
{
"content": "\"\"\"\nThe ``mlflow.tensorflow`` module provides an API for logging and loading TensorFlow models.\nThis module exports TensorFlow models with the following flavors:\n\nTensorFlow (native) format\n This is the main flavor that can be loaded back into TensorFlow.\n:py:mod:`mlflow.pyfunc`\n P... | [
{
"content": "\"\"\"\nThe ``mlflow.tensorflow`` module provides an API for logging and loading TensorFlow models.\nThis module exports TensorFlow models with the following flavors:\n\nTensorFlow (native) format\n This is the main flavor that can be loaded back into TensorFlow.\n:py:mod:`mlflow.pyfunc`\n P... | diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index e89bd6af64211..c6a0f5c808303 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -197,6 +197,12 @@ jobs:
run: |
python -c "import mlflow"
+ # Just importing mlflow should not create ... |
cookiecutter__cookiecutter-django-448 | Error pages need an exception parameter on django 1.9
The test exception pages are no longer working on django 1.9.
Affected pages:
- 400
- 403
- 404
Traceback (404):
```
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exce... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\nfrom django.views.generic import TemplateView\nfrom django.views import def... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\nfrom django.views.generic import TemplateView\nfrom django.views import def... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2dd80111d5..73318e7683 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
All enhancements and patches to cookiecutter-django will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
+## [2015-12-16]
+- Update previe... |
sql-machine-learning__elasticdl-332 | Failed generating cifar10 dataset when building dev image
| [
{
"content": "from recordio import File\nfrom elasticdl.recordio_ds_gen.mnist import record\nimport sys\nimport argparse\n\n# TODO: share code with MNIST dataset.\ndef main(argv):\n print(argv)\n parser = argparse.ArgumentParser(\n description=\"Show same data from CIFAR10 recordio\"\n )\n pa... | [
{
"content": "from recordio import File\nfrom elasticdl.recordio_ds_gen.cifar10 import record\nimport sys\nimport argparse\n\n# TODO: share code with MNIST dataset.\ndef main(argv):\n print(argv)\n parser = argparse.ArgumentParser(\n description=\"Show same data from CIFAR10 recordio\"\n )\n ... | diff --git a/elasticdl/recordio_ds_gen/cifar10/gen_data.py b/elasticdl/recordio_ds_gen/cifar10/gen_data.py
index 463efc3fa..5bcf31a8f 100755
--- a/elasticdl/recordio_ds_gen/cifar10/gen_data.py
+++ b/elasticdl/recordio_ds_gen/cifar10/gen_data.py
@@ -11,7 +11,7 @@
from recordio import File
from tensorflow.python.keras ... |
hedyorg__hedy-927 | Log "read aloud"
When a program is ran with sound on, log this so we can see how often this is used
| [
{
"content": "import sys\nif (sys.version_info.major < 3 or sys.version_info.minor < 6):\n print ('Hedy requires Python 3.6 or newer to run. However, your version of Python is', '.'.join ([str (sys.version_info.major), str (sys.version_info.minor), str (sys.version_info.micro)]))\n quit ()\n\n# coding=utf... | [
{
"content": "import sys\nif (sys.version_info.major < 3 or sys.version_info.minor < 6):\n print ('Hedy requires Python 3.6 or newer to run. However, your version of Python is', '.'.join ([str (sys.version_info.major), str (sys.version_info.minor), str (sys.version_info.micro)]))\n quit ()\n\n# coding=utf... | diff --git a/app.py b/app.py
index a8cbddb2004..9d0a98e0d9c 100644
--- a/app.py
+++ b/app.py
@@ -272,6 +272,9 @@ def parse():
# reason.
lang = body.get('lang', requested_lang())
+ # true if kid enabled the read aloud option
+ read_aloud = body.read_aloud
+
response = {}
username = current_us... |
inducer__relate-548 | After pretend-facility, impersonate disappears from menu
| [
{
"content": "# -*- coding: utf-8 -*-\n\n__copyright__ = \"Copyright (C) 2016 Dong Zhuang, Andreas Kloeckner\"\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software w... | [
{
"content": "# -*- coding: utf-8 -*-\n\n__copyright__ = \"Copyright (C) 2016 Dong Zhuang, Andreas Kloeckner\"\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software w... | diff --git a/course/templatetags/coursetags.py b/course/templatetags/coursetags.py
index 19b416ba4..641a8d048 100644
--- a/course/templatetags/coursetags.py
+++ b/course/templatetags/coursetags.py
@@ -115,6 +115,28 @@ def has_permission(participation, arg):
# }}}
+@register.filter(name='may_set_fake_time')
+def ma... |
zestedesavoir__zds-site-5261 | Ajouter les unités temporelles sur les graphs des stats
Cete amélioration est demandée par un auteur :
> Ce serait bien, aussi, de mettre les unités à côté du temps. Parce que là, j’ai 03:51, mais je ne sais pas si c’est min:sec ou sec:mil
| [
{
"content": "from django import template\nimport datetime\n\nregister = template.Library()\n\n\n# TODO add unit test\n@register.filter('seconds_to_duration')\ndef seconds_to_duration(value):\n \"\"\"\n Display a human-readable reading-time (or any other duration)\n from a duration in seconds.\n \"\... | [
{
"content": "from django import template\nimport datetime\n\nregister = template.Library()\n\n\n# https://stackoverflow.com/a/8907269/2226755\ndef strfdelta(tdelta, fmt):\n d = {'days': tdelta.days}\n d['hours'], rem = divmod(tdelta.seconds, 3600)\n d['minutes'], d['seconds'] = divmod(rem, 60)\n re... | diff --git a/zds/utils/templatetags/seconds_to_duration.py b/zds/utils/templatetags/seconds_to_duration.py
index 58ca7eabc8..dd0ec71e4a 100644
--- a/zds/utils/templatetags/seconds_to_duration.py
+++ b/zds/utils/templatetags/seconds_to_duration.py
@@ -4,6 +4,14 @@
register = template.Library()
+# https://stackoverf... |
dynaconf__dynaconf-401 | Documentation link on CLI is outdated
The documentation link on CLI help points to http://dynaconf.readthedocs.io/ instead of https://www.dynaconf.com/
| [
{
"content": "import importlib\nimport io\nimport os\nimport pprint\nimport sys\nimport warnings\nimport webbrowser\nfrom contextlib import suppress\nfrom pathlib import Path\n\nfrom dynaconf import constants\nfrom dynaconf import default_settings\nfrom dynaconf import LazySettings\nfrom dynaconf import loaders... | [
{
"content": "import importlib\nimport io\nimport os\nimport pprint\nimport sys\nimport warnings\nimport webbrowser\nfrom contextlib import suppress\nfrom pathlib import Path\n\nfrom dynaconf import constants\nfrom dynaconf import default_settings\nfrom dynaconf import LazySettings\nfrom dynaconf import loaders... | diff --git a/dynaconf/cli.py b/dynaconf/cli.py
index 06f7b9582..15fd8bec2 100644
--- a/dynaconf/cli.py
+++ b/dynaconf/cli.py
@@ -146,7 +146,7 @@ def print_version(ctx, param, value):
def open_docs(ctx, param, value): # pragma: no cover
if not value or ctx.resilient_parsing:
return
- url = "http://dyn... |
PokemonGoF__PokemonGo-Bot-6125 | Dev branch: sudden break when arrived at Gym ...
Hi,
Not sure what happened.
My bot is "dev branch" that is cloned at 7/24 16:00 (TimeZone: +8)
It just breaks and restart to login ...
[2017-07-24 17:47:02] [GymPokemon] [INFO] Moving towards open Gym 春長鶴松 - 0.06km
[2017-07-24 17:47:05] [GymPokemon] [INFO] Movin... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom sys import stdout\n\nfrom datetime import datetime, timedelta\nimport time\nimport json\nimport os\n\n\nfrom pokemongo_bot.base_dir import _base_dir\n\n\nclass FileIOException(Exception):\... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom sys import stdout\n\nfrom datetime import datetime, timedelta\nimport time\nimport json\nimport os\n\n\nfrom pokemongo_bot.base_dir import _base_dir\n\n\nclass FileIOException(Exception):\... | diff --git a/pokemongo_bot/event_manager.py b/pokemongo_bot/event_manager.py
index 42863855ec..c6ddf6cb3a 100644
--- a/pokemongo_bot/event_manager.py
+++ b/pokemongo_bot/event_manager.py
@@ -52,8 +52,11 @@ def __init__(self, event, sender=None, level='info', formatted='', data={}):
self.sender = str(sender... |
plone__Products.CMFPlone-871 | bundle with more than one resource break compiling TTW and in filesystem
I get the following error if i try to add more than one resource to a bundle.
I tested with beta4 and coredev buildout.
It fails on compiling the less files.
```
2015-09-01 14:10:19 ERROR Zope.SiteErrorLog 1441109419.190.013584610872 http://local... | [
{
"content": "# -*- coding:utf-8\nfrom datetime import datetime\nimport json\nimport re\nfrom urlparse import urlparse\n\nfrom Products.CMFPlone.interfaces import IBundleRegistry\nfrom Products.CMFPlone.interfaces import IResourceRegistry\nfrom Products.CMFPlone.interfaces.resources import OVERRIDE_RESOURCE_DIR... | [
{
"content": "# -*- coding:utf-8\nfrom datetime import datetime\nimport json\nimport re\nfrom urlparse import urlparse\n\nfrom Products.CMFPlone.interfaces import IBundleRegistry\nfrom Products.CMFPlone.interfaces import IResourceRegistry\nfrom Products.CMFPlone.interfaces.resources import OVERRIDE_RESOURCE_DIR... | diff --git a/Products/CMFPlone/controlpanel/browser/resourceregistry.py b/Products/CMFPlone/controlpanel/browser/resourceregistry.py
index de24d68167..8c225dee34 100644
--- a/Products/CMFPlone/controlpanel/browser/resourceregistry.py
+++ b/Products/CMFPlone/controlpanel/browser/resourceregistry.py
@@ -331,8 +331,13 @@ ... |
librosa__librosa-1577 | Update historical documentation builds
Note: this should be among the last issues implemented in 0.10 because of how our doc build CI works.
When we release 0.10, we should drop the historical build of 0.7.2 and only keep the latest releases from the 0.8 and 0.9 series. (0.8.1, 0.9.2).
Dropping the 0.7 series fro... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# librosa documentation build configuration file, created by\n# sphinx-quickstart on Tue Jun 25 13:12:33 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# librosa documentation build configuration file, created by\n# sphinx-quickstart on Tue Jun 25 13:12:33 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\... | diff --git a/.github/environment-ci.yml b/.github/environment-ci.yml
index 6679894b31..382b43caf5 100644
--- a/.github/environment-ci.yml
+++ b/.github/environment-ci.yml
@@ -6,25 +6,25 @@ dependencies:
# required
- pip
- audioread>=2.1.9
- - numpy>=1.17.0
+ - numpy>=1.20.3
- scipy>=1.2.0
- - scikit-lear... |
pfnet__pytorch-pfn-extras-780 | `snapshot_on_error` in `DistributedSnapshot`
https://github.com/pfnet/pytorch-pfn-extras/blob/c5b4d58c16667d60e980ca96c5839416d63d50f2/pytorch_pfn_extras/training/extensions/_snapshot.py#L419-L428
If `snapshot_on_error` is specified in the snapshot extension, the `on_error()` method is called in case of an error, bu... | [
{
"content": "import os\nimport types\nfrom typing import Any, Generator, List, Optional, Tuple\n\nimport torch\nimport torch.distributed\nfrom pytorch_pfn_extras import logging, writing\nfrom pytorch_pfn_extras.training import extension\nfrom pytorch_pfn_extras.training._manager_protocol import (\n Extensio... | [
{
"content": "import os\nimport types\nfrom typing import Any, Generator, List, Optional, Tuple\n\nimport torch\nimport torch.distributed\nfrom pytorch_pfn_extras import logging, writing\nfrom pytorch_pfn_extras.training import extension\nfrom pytorch_pfn_extras.training._manager_protocol import (\n Extensio... | diff --git a/pytorch_pfn_extras/training/extensions/_snapshot.py b/pytorch_pfn_extras/training/extensions/_snapshot.py
index fdc218b2..c4c2e7a7 100644
--- a/pytorch_pfn_extras/training/extensions/_snapshot.py
+++ b/pytorch_pfn_extras/training/extensions/_snapshot.py
@@ -513,11 +513,10 @@ def _add_cleanup_hook(self, wri... |
mdn__kuma-6807 | Drop 'timezone' from whoami
**Summary**
In [`api/v1/whoami`](https://github.com/mdn/kuma/blob/d29cd36431459030afc9145b906dcfad88b398ac/kuma/api/v1/views.py#L216) we're including a `timezone` value.
No code appears to use it for anything. It's mention in `user-provider.jsx` but only to build up the `userData` conte... | [
{
"content": "import json\n\nfrom django.conf import settings\nfrom django.http import (\n Http404,\n HttpResponse,\n HttpResponseBadRequest,\n HttpResponsePermanentRedirect,\n JsonResponse,\n)\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import activate, gettext... | [
{
"content": "import json\n\nfrom django.conf import settings\nfrom django.http import (\n Http404,\n HttpResponse,\n HttpResponseBadRequest,\n HttpResponsePermanentRedirect,\n JsonResponse,\n)\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import activate, gettext... | diff --git a/kuma/api/v1/tests/test_views.py b/kuma/api/v1/tests/test_views.py
index cd802569796..c9a5f3d7339 100644
--- a/kuma/api/v1/tests/test_views.py
+++ b/kuma/api/v1/tests/test_views.py
@@ -194,8 +194,7 @@ def test_whoami_disallowed_methods(client, http_method):
@pytest.mark.django_db
-@pytest.mark.parametr... |
inventree__InvenTree-1446 | Error exporting BOM in YAML format
The error is:

| [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib import admin\n\nfrom import_export.admin import ImportExportModelAdmin\nfrom import_export.resources import ModelResource\nfrom import_export.fields import Field\nimport import_export.widgets as widgets\n\nfrom... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib import admin\n\nfrom import_export.admin import ImportExportModelAdmin\nfrom import_export.resources import ModelResource\nfrom import_export.fields import Field\nimport import_export.widgets as widgets\n\nfrom... | diff --git a/InvenTree/part/admin.py b/InvenTree/part/admin.py
index 4681404ba1b5..af2f61580386 100644
--- a/InvenTree/part/admin.py
+++ b/InvenTree/part/admin.py
@@ -16,8 +16,6 @@
from .models import PartTestTemplate
from .models import PartSellPriceBreak
-from InvenTree.helpers import normalize
-
from stock.mode... |
hedyorg__hedy-173 | Include button to go back to previous level
Thanks for the great project! While trying the website I wished I could go back one level, but there is only a button to go to the next level.
| [
{
"content": "import collections\nimport attr\nimport glob\nfrom os import path\n\nfrom flask import jsonify, render_template, abort, redirect\nimport courses\nfrom auth import current_user\n\nclass Translations:\n def __init__(self):\n self.data = {}\n translations = glob.glob('coursedata/texts/*.yaml')... | [
{
"content": "import collections\nimport attr\nimport glob\nfrom os import path\n\nfrom flask import jsonify, render_template, abort, redirect\nimport courses\nfrom auth import current_user\n\nclass Translations:\n def __init__(self):\n self.data = {}\n translations = glob.glob('coursedata/texts/*.yaml')... | diff --git a/coursedata/texts/en.yaml b/coursedata/texts/en.yaml
index 91bd3121f90..637c3e4f799 100644
--- a/coursedata/texts/en.yaml
+++ b/coursedata/texts/en.yaml
@@ -9,6 +9,7 @@ ui:
run_code_button: "Run code"
save_code_button: "Save code"
untitled: "Untitled"
+ regress_button: "Go back to level"
advanc... |
Qiskit__qiskit-10532 | Scientific notation in QASM output causes export to other platform to fail
### Environment
- **Qiskit version**: {'qiskit-terra': '0.24.0', 'qiskit-aer': '0.12.0', 'qiskit-ignis': '0.7.1', 'qiskit-ibmq-provider': '0.20.2', 'qiskit': '0.43.0', 'qiskit-nature': None, 'qiskit-finance': None, 'qiskit-optimization': None, ... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n... | diff --git a/qiskit/circuit/tools/pi_check.py b/qiskit/circuit/tools/pi_check.py
index a55249d7d181..d3614b747824 100644
--- a/qiskit/circuit/tools/pi_check.py
+++ b/qiskit/circuit/tools/pi_check.py
@@ -167,12 +167,11 @@ def normalize(single_inpt):
str_out = f"{neg_str}{numer}/{denom}{pi}"
... |
sagemath__sage-35118 | sage.env.sage_include_directories: Don't use distutils and SAGE_LIB
<div id="comment:0"></div>
- `src/sage/env.py` uses `distutils.sysconfig.get_python_inc()` which is deprecated, it has no replacement in sysconfig.
Suggestion from fbissey: "we could use sysconfig.get_config_var('INCLUDEPY') which should give th... | [
{
"content": "r\"\"\"\nSage Runtime Environment\n\nAUTHORS:\n\n- \\R. Andrew Ohana (2012): Initial version.\n\nVerify that importing ``sage.all`` works in Sage's Python without any ``SAGE_``\nenvironment variables, and has the same ``SAGE_ROOT`` and ``SAGE_LOCAL``\n(see also :trac:`29446`)::\n\n sage: env = ... | [
{
"content": "r\"\"\"\nSage Runtime Environment\n\nAUTHORS:\n\n- \\R. Andrew Ohana (2012): Initial version.\n\nVerify that importing ``sage.all`` works in Sage's Python without any ``SAGE_``\nenvironment variables, and has the same ``SAGE_ROOT`` and ``SAGE_LOCAL``\n(see also :trac:`29446`)::\n\n sage: env = ... | diff --git a/src/sage/env.py b/src/sage/env.py
index ac279ed5da3..d4708e61f16 100644
--- a/src/sage/env.py
+++ b/src/sage/env.py
@@ -384,17 +384,20 @@ def sage_include_directories(use_sources=False):
sage: any(os.path.isfile(os.path.join(d, file)) for d in dirs)
True
"""
- import distutils.sys... |
Mailu__Mailu-891 | Fetchmail sslproto configuration (typo?)
The fetchmail container repeatedly fires the following warning
`fetchmail: Invalid SSL protocol 'AUTO' specified, using default (SSLv23).`
From the fetchmail manpage, this appears to relate to the `--sslproto` switch.
IMHO the default should be an all lowercase `auto`.... | [
{
"content": "#!/usr/bin/python3\n\nimport time\nimport os\nimport tempfile\nimport shlex\nimport subprocess\nimport re\nimport requests\n\n\nFETCHMAIL = \"\"\"\nfetchmail -N \\\n --sslcertck --sslcertpath /etc/ssl/certs \\\n -f {}\n\"\"\"\n\n\nRC_LINE = \"\"\"\npoll \"{host}\" proto {protocol} port {por... | [
{
"content": "#!/usr/bin/python3\n\nimport time\nimport os\nimport tempfile\nimport shlex\nimport subprocess\nimport re\nimport requests\n\n\nFETCHMAIL = \"\"\"\nfetchmail -N \\\n --sslcertck --sslcertpath /etc/ssl/certs \\\n -f {}\n\"\"\"\n\n\nRC_LINE = \"\"\"\npoll \"{host}\" proto {protocol} port {por... | diff --git a/services/fetchmail/Dockerfile b/services/fetchmail/Dockerfile
index 8e4d5db0f..4004706dc 100644
--- a/services/fetchmail/Dockerfile
+++ b/services/fetchmail/Dockerfile
@@ -1,13 +1,30 @@
+# First stage: Build
+FROM alpine:3.8 as builder
+
+# build dependencies
+RUN apk add --no-cache curl tar xz autoconf gi... |
python-trio__trio-1527 | trio.open_signal_receiver should give an error if no arguments are passed
User confusion spotted in the wild: https://gitter.im/python-trio/general?at=5ebfa9d613878c30b581b9fe
| [
{
"content": "import signal\nfrom contextlib import contextmanager\nfrom collections import OrderedDict\n\nimport trio\nfrom ._util import signal_raise, is_main_thread, ConflictDetector\n\n# Discussion of signal handling strategies:\n#\n# - On Windows signals barely exist. There are no options; signal handlers ... | [
{
"content": "import signal\nfrom contextlib import contextmanager\nfrom collections import OrderedDict\n\nimport trio\nfrom ._util import signal_raise, is_main_thread, ConflictDetector\n\n# Discussion of signal handling strategies:\n#\n# - On Windows signals barely exist. There are no options; signal handlers ... | diff --git a/newsfragments/1526.bugfix.rst b/newsfragments/1526.bugfix.rst
new file mode 100644
index 000000000..02e1d37c4
--- /dev/null
+++ b/newsfragments/1526.bugfix.rst
@@ -0,0 +1 @@
+Calling `open_signal_receiver` with no arguments used to succeed without listening for any signals. This was confusing, so now it ra... |
meltano__meltano-6276 | Address warning in Airflow plugin version check
> not super urgent, but as we move into supporting newer Python versions
> (https://github.com/meltano/meltano/pull/6135) and bumping Meltano's dependencies (https://github.com/meltano/meltano/issues/6264), we might break Airflow support.
>
> It's also probably a ver... | [
{
"content": "\"\"\"Plugin glue code for Airflow.\"\"\"\nimport configparser\nimport logging\nimport os\nimport subprocess\nfrom distutils.version import StrictVersion\n\nfrom meltano.core.behavior.hookable import hook\nfrom meltano.core.error import AsyncSubprocessError\nfrom meltano.core.plugin_invoker import... | [
{
"content": "\"\"\"Plugin glue code for Airflow.\"\"\"\nimport configparser\nimport logging\nimport os\nimport subprocess\n\nfrom packaging.version import Version\n\nfrom meltano.core.behavior.hookable import hook\nfrom meltano.core.error import AsyncSubprocessError\nfrom meltano.core.plugin_invoker import Plu... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60568854fb..e4e5ba775f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,8 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Ch
### Fixes
+- [#5985](https://github.com/meltano/meltano/issues/5985) - Address warning in Airflow plu... |
python-telegram-bot__python-telegram-bot-1475 | Error KeyError: 'age' - case insensitive in persistentconversationbot.py
There is an error in this:
https://github.com/python-telegram-bot/python-telegram-bot/blob/2cde878d1e5e0bb552aaf41d5ab5df695ec4addb/examples/persistentconversationbot.py#L69
we extract the category using the function "lower", despite the fac... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# This program is dedicated to the public domain under the CC0 license.\n#\n# THIS EXAMPLE HAS BEEN UPDATED TO WORK WITH THE BETA VERSION 12 OF PYTHON-TELEGRAM-BOT.\n# If you're still using version 11.1.0, please see the examples at\n# https://github... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# This program is dedicated to the public domain under the CC0 license.\n#\n# THIS EXAMPLE HAS BEEN UPDATED TO WORK WITH THE BETA VERSION 12 OF PYTHON-TELEGRAM-BOT.\n# If you're still using version 11.1.0, please see the examples at\n# https://github... | diff --git a/examples/persistentconversationbot.py b/examples/persistentconversationbot.py
index 8a3175ec7d1..637ae7e8d6a 100644
--- a/examples/persistentconversationbot.py
+++ b/examples/persistentconversationbot.py
@@ -62,13 +62,13 @@ def start(update, context):
def regular_choice(update, context):
- text = u... |
mne-tools__mne-bids-180 | handle_kind not considering seeg
Hi, I've seen that the function _handle_kind (line 82) in utils.py does not consider the case of _seeg_ data:
```python
def _handle_kind(raw):
"""Get kind."""
if 'eeg' in raw and 'ecog' in raw:
raise ValueError('Both EEG and iEEG channels found in data.'
... | [
{
"content": "\"\"\"Utility and helper functions for MNE-BIDS.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@berkeley.edu>\n# S... | [
{
"content": "\"\"\"Utility and helper functions for MNE-BIDS.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@berkeley.edu>\n# S... | diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index a5d67585b..ef0801136 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -27,6 +27,7 @@ Bug
- Allow files with no stim channel, which could be the case for example in resting state data, by `Mainak Jas`_ (`#167 <https://github.com/mne-tools/mne-bids/pull/1... |
WordPress__openverse-api-477 | Distinguish between staging & prod when sending data refresh slack updates
## Problem
<!-- Describe a problem solved by this feature; or delete the section entirely. -->
It's not easy to tell based on the slack messages produced by the ingestion server whether a given ingestion is being run in production or staging.
... | [
{
"content": "import logging\nimport os\n\nimport requests\n\n\nlog = logging.getLogger(__name__)\nSLACK_WEBHOOK = \"SLACK_WEBHOOK\"\n\n\ndef message(text: str, summary: str = None) -> None:\n \"\"\"\n Send a Slack message to a channel specified by a Slack webhook variable.\n\n A message is only sent i... | [
{
"content": "import logging\nimport os\n\nimport requests\nfrom decouple import config\n\n\nlog = logging.getLogger(__name__)\nSLACK_WEBHOOK = \"SLACK_WEBHOOK\"\n\n\ndef message(text: str, summary: str = None) -> None:\n \"\"\"\n Send a Slack message to a channel specified by a Slack webhook variable.\n\... | diff --git a/ingestion_server/ingestion_server/slack.py b/ingestion_server/ingestion_server/slack.py
index d03470f72..8789e24a7 100644
--- a/ingestion_server/ingestion_server/slack.py
+++ b/ingestion_server/ingestion_server/slack.py
@@ -2,6 +2,7 @@
import os
import requests
+from decouple import config
log = l... |
goauthentik__authentik-6062 | webauthn MFA not working with TOTP. 'dict' object is not callable
**Describe the bug**
I was able to setup the TOTP setup stage correctly, but as soon as I add Webauthn and select both TOTP and Webauthn, I start receiving a general system exception saying `'dict' object is not callable` [as you can see in the logs bel... | [
{
"content": "\"\"\"Authenticator Validation\"\"\"\nfrom datetime import datetime\nfrom hashlib import sha256\nfrom typing import Optional\n\nfrom django.conf import settings\nfrom django.http import HttpRequest, HttpResponse\nfrom django_otp import devices_for_user\nfrom django_otp.models import Device\nfrom j... | [
{
"content": "\"\"\"Authenticator Validation\"\"\"\nfrom datetime import datetime\nfrom hashlib import sha256\nfrom typing import Optional\n\nfrom django.conf import settings\nfrom django.http import HttpRequest, HttpResponse\nfrom django_otp import devices_for_user\nfrom django_otp.models import Device\nfrom j... | diff --git a/authentik/stages/authenticator_validate/stage.py b/authentik/stages/authenticator_validate/stage.py
index 1e53cab6cf95..ff9a1dac6d09 100644
--- a/authentik/stages/authenticator_validate/stage.py
+++ b/authentik/stages/authenticator_validate/stage.py
@@ -282,7 +282,7 @@ def post(self, request: HttpRequest, ... |
kornia__kornia-1472 | DataKey Typo BBOX_XYHW
### Describe the bug
`AugmentationSequential` doesnt accept the `bbox_xywh` data key
### Reproduction steps
```bash
1.Initialize `AugmentationSequential` with said data key
```
### Expected behavior
Initialize just fine like mentioned in the docs.
### Environment
```shell
wget https://raw... | [
{
"content": "from abc import ABCMeta, abstractmethod\nfrom functools import partial\nfrom typing import Callable, cast, Dict, Iterator, List, Optional, Tuple, Type, Union\n\nimport torch\nimport torch.nn as nn\n\nimport kornia # lazy loading for circular dependencies\nfrom kornia.augmentation.base import (\n ... | [
{
"content": "from abc import ABCMeta, abstractmethod\nfrom functools import partial\nfrom typing import Callable, cast, Dict, Iterator, List, Optional, Tuple, Type, Union\n\nimport torch\nimport torch.nn as nn\n\nimport kornia # lazy loading for circular dependencies\nfrom kornia.augmentation.base import (\n ... | diff --git a/kornia/augmentation/container/utils.py b/kornia/augmentation/container/utils.py
index deeeb0a94d..a79420edaf 100644
--- a/kornia/augmentation/container/utils.py
+++ b/kornia/augmentation/container/utils.py
@@ -313,7 +313,7 @@ def _get_func_by_key(cls, dcate: Union[str, int, DataKey]) -> Type[ApplyInverseI
... |
spacetelescope__jwql-1224 | Dark monitor page failing to load
The dark monitor page for all instruments currently crashes with the traceback:
name 'xdim' is not defined
monitor_dark_bokeh.py, line 241, in create_plot
| [
{
"content": "\"\"\"This module contains code for the dark current monitor Bokeh plots.\n\nAuthor\n------\n\n - Bryan Hilbert\n - Gray Kanarek\n - Lauren Chambers\n\nUse\n---\n\n This module can be used from the command line as such:\n\n ::\n\n from jwql.website.apps.jwql import monitor_pa... | [
{
"content": "\"\"\"This module contains code for the dark current monitor Bokeh plots.\n\nAuthor\n------\n\n - Bryan Hilbert\n - Gray Kanarek\n - Lauren Chambers\n\nUse\n---\n\n This module can be used from the command line as such:\n\n ::\n\n from jwql.website.apps.jwql import monitor_pa... | diff --git a/jwql/website/apps/jwql/monitor_pages/monitor_dark_bokeh.py b/jwql/website/apps/jwql/monitor_pages/monitor_dark_bokeh.py
index 893b64936..47a2ef26d 100755
--- a/jwql/website/apps/jwql/monitor_pages/monitor_dark_bokeh.py
+++ b/jwql/website/apps/jwql/monitor_pages/monitor_dark_bokeh.py
@@ -238,9 +238,10 @@ de... |
pypa__pipenv-4510 | Virtualenv name gets botched when PIPENV_PYTHON is a full path and WORKON_HOME is set
Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the [diagnose documentation](https://pipenv.pypa.io/en/latest/diagnose/) for common issues before posti... | [
{
"content": "# -*- coding: utf-8 -*-\nimport base64\nimport fnmatch\nimport glob\nimport hashlib\nimport io\nimport json\nimport operator\nimport os\nimport re\nimport sys\n\nimport six\nimport toml\nimport tomlkit\nimport vistir\n\nimport pipfile\nimport pipfile.api\n\nfrom .vendor.cached_property import cach... | [
{
"content": "# -*- coding: utf-8 -*-\nimport base64\nimport fnmatch\nimport glob\nimport hashlib\nimport io\nimport json\nimport operator\nimport os\nimport re\nimport sys\n\nimport six\nimport toml\nimport tomlkit\nimport vistir\n\nimport pipfile\nimport pipfile.api\n\nfrom .vendor.cached_property import cach... | diff --git a/news/4225.bugfix.rst b/news/4225.bugfix.rst
new file mode 100644
index 0000000000..39e335a7e7
--- /dev/null
+++ b/news/4225.bugfix.rst
@@ -0,0 +1 @@
+Fix a bug where setting PIPENV_PYTHON to file path breaks environment name
\ No newline at end of file
diff --git a/pipenv/project.py b/pipenv/project.py
ind... |
freqtrade__freqtrade-2790 | UserWarning: Boolean Series key will be reindexed to match DataFrame index.
## Step 1: Have you search for this issue before posting it?
Yes
## Step 2: Describe your environment
* Operating system: MacOS
* Python Version: Python 3.7.5 (`python -V`)
* CCXT version: 1.21.76 (`pip freeze | grep ccxt`)
... | [
{
"content": "from datetime import timedelta\nfrom typing import Dict\n\nfrom pandas import DataFrame\nfrom tabulate import tabulate\n\n\ndef generate_text_table(data: Dict[str, Dict], stake_currency: str, max_open_trades: int,\n results: DataFrame, skip_nan: bool = False) -> str:\n \"... | [
{
"content": "from datetime import timedelta\nfrom typing import Dict\n\nfrom pandas import DataFrame\nfrom tabulate import tabulate\n\n\ndef generate_text_table(data: Dict[str, Dict], stake_currency: str, max_open_trades: int,\n results: DataFrame, skip_nan: bool = False) -> str:\n \"... | diff --git a/freqtrade/optimize/optimize_reports.py b/freqtrade/optimize/optimize_reports.py
index 3801546b1cb..67056eaa90b 100644
--- a/freqtrade/optimize/optimize_reports.py
+++ b/freqtrade/optimize/optimize_reports.py
@@ -70,7 +70,7 @@ def generate_text_table_sell_reason(data: Dict[str, Dict], results: DataFrame) -
... |
freedomofpress__securedrop-2491 | localization: various problems
# Bug
## Description
This issue is to collect the various localization problems found before the 0.4.4 release and after the **string freeze**
They should be fixed in a pull request right after the 0.4.4 release.
| [
{
"content": "from flask_babel import gettext\nfrom flask_wtf import FlaskForm\nfrom wtforms import PasswordField\nfrom wtforms.validators import InputRequired, Regexp, Length\n\nfrom db import Source\n\n\nclass LoginForm(FlaskForm):\n codename = PasswordField('codename', validators=[\n InputRequired(... | [
{
"content": "from flask_babel import gettext\nfrom flask_wtf import FlaskForm\nfrom wtforms import PasswordField\nfrom wtforms.validators import InputRequired, Regexp, Length\n\nfrom db import Source\n\n\nclass LoginForm(FlaskForm):\n codename = PasswordField('codename', validators=[\n InputRequired(... | diff --git a/securedrop/journalist_templates/delete.html b/securedrop/journalist_templates/delete.html
index 45ad238bf3..f5fc11882e 100644
--- a/securedrop/journalist_templates/delete.html
+++ b/securedrop/journalist_templates/delete.html
@@ -20,5 +20,5 @@
<p><button class="sd-button" type="submit" name="action" val... |
wagtail__wagtail-1811 | wagtailsearch.views.frontend needs updating to use non-deprecated search method
Currently using Page.search, which is deprecated in Wagtail 1.2 - should be updated to use the QuerySet-based mechanism instead.
https://github.com/torchbox/wagtail/blob/master/wagtail/wagtailsearch/views/frontend.py#L41
| [
{
"content": "from django.conf import settings\nfrom django.shortcuts import render\nfrom django.http import JsonResponse\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\n\nfrom wagtail.wagtailcore import models\nfrom wagtail.wagtailsearch.models import Query\n\n\ndef search(\n ... | [
{
"content": "from django.conf import settings\nfrom django.shortcuts import render\nfrom django.http import JsonResponse\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\n\nfrom wagtail.wagtailcore import models\nfrom wagtail.wagtailsearch.models import Query\n\n\ndef search(\n ... | diff --git a/wagtail/wagtailsearch/views/frontend.py b/wagtail/wagtailsearch/views/frontend.py
index d551863e4594..f2a4c6557db8 100644
--- a/wagtail/wagtailsearch/views/frontend.py
+++ b/wagtail/wagtailsearch/views/frontend.py
@@ -38,13 +38,18 @@ def search(
# Search
if query_string != '':
- search_r... |
huggingface__accelerate-374 | AttributeErrorAttributeError: : 'DeepSpeedEngineWrapper' object has no attribute '_zero3_consolidated_fp16_state_dict'
Accelerator with Deepspeed stage 3 when saving the model giving following error
Code I used:
import torch
import torch.nn.functional as F
from datasets import load_dataset
... | [
{
"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/accelerator.py b/src/accelerate/accelerator.py
index 6fd24c32191..cb904a9b5dc 100644
--- a/src/accelerate/accelerator.py
+++ b/src/accelerate/accelerator.py
@@ -881,14 +881,15 @@ def get_state_dict(self, model):
is_zero_3 = self.state.deepspeed_plugin.zero_stage == 3
... |
ethereum__web3.py-996 | Add python 3.7 to CI tests
### What was wrong?
python 3.7 is out, and we should include it in our testing.
### How can it be fixed?
add python 3.7 to our tox.ini & circleci config
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import (\n find_packages,\n setup,\n)\n\n\nsetup(\n name='web3',\n # *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.\n version='4.5.0',\n description=\"\"\"Web3.py\"\"\",\n long... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import (\n find_packages,\n setup,\n)\n\n\nsetup(\n name='web3',\n # *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.\n version='4.5.0',\n description=\"\"\"Web3.py\"\"\",\n long... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 3f682eed9d..add7b2f924 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -336,6 +336,113 @@ jobs:
environment:
TOXENV: py36-integration-ethtester
ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend
+ #
+ # Pyth... |
common-workflow-language__cwltool-1511 | CWL tools with SchemaDefRequirement fail to run in workflows
`test_workflow.cwl`:
```cwl
cwlVersion: v1.0
class: Workflow
inputs:
- id: hello
type: Any
outputs: []
steps:
step:
id: step
run: ../common-workflow-language/v1.0/v1.0/schemadef-tool.cwl
in:
hello: hello
out: []... | [
{
"content": "import copy\nimport datetime\nimport functools\nimport logging\nimport random\nfrom typing import (\n Callable,\n Dict,\n List,\n Mapping,\n MutableMapping,\n MutableSequence,\n Optional,\n cast,\n)\nfrom uuid import UUID\n\nfrom ruamel.yaml.comments import CommentedMap\nfr... | [
{
"content": "import copy\nimport datetime\nimport functools\nimport logging\nimport random\nfrom typing import (\n Callable,\n Dict,\n List,\n Mapping,\n MutableMapping,\n MutableSequence,\n Optional,\n cast,\n)\nfrom uuid import UUID\n\nfrom ruamel.yaml.comments import CommentedMap\nfr... | diff --git a/cwltool/workflow.py b/cwltool/workflow.py
index 1ed31ac7d..f4297502d 100644
--- a/cwltool/workflow.py
+++ b/cwltool/workflow.py
@@ -243,6 +243,14 @@ def __init__(
validation_errors = []
self.tool = toolpath_object = copy.deepcopy(toolpath_object)
bound = set()
+
+ if self.... |
scikit-image__scikit-image-2790 | Swirl center coordinates are reversed
```py
from skimage import data, transform, io
swirled = transform.swirl(
image=data.text(),
center=(224, 86),
strength=5,
mode='reflect',
)
io.imshow(swirled)
io.show()
```
This gives the correct result:
\nfrom ._warps_cy import _warp_fast\nfrom ..measure import block_reduce\n\nfrom .._shared.utils import ... | [
{
"content": "import six\nimport numpy as np\nfrom scipy import ndimage as ndi\n\nfrom ._geometric import (SimilarityTransform, AffineTransform,\n ProjectiveTransform, _to_ndimage_mode)\nfrom ._warps_cy import _warp_fast\nfrom ..measure import block_reduce\n\nfrom .._shared.utils import ... | diff --git a/skimage/transform/_warps.py b/skimage/transform/_warps.py
index 152c37aefe3..2e03d9c78fb 100644
--- a/skimage/transform/_warps.py
+++ b/skimage/transform/_warps.py
@@ -394,7 +394,7 @@ def swirl(image, center=None, strength=1, radius=100, rotation=0,
----------
image : ndarray
Input image... |
aws__aws-sam-cli-5016 | Bug: build error using podman
<!-- Make sure we don't have an existing Issue that reports the bug you are seeing (both open and closed).
If you do find an existing Issue, re-open or add a comment to that Issue instead of creating a new one. -->
### Description:
<!-- Briefly describe the bug you are facing.-->
Er... | [
{
"content": "\"\"\"\nProvides classes that interface with Docker to create, execute and manage containers.\n\"\"\"\n\nimport logging\nimport sys\nimport threading\n\nimport docker\n\nfrom samcli.lib.utils.stream_writer import StreamWriter\nfrom samcli.local.docker import utils\nfrom samcli.local.docker.contain... | [
{
"content": "\"\"\"\nProvides classes that interface with Docker to create, execute and manage containers.\n\"\"\"\n\nimport logging\nimport sys\nimport threading\n\nimport docker\n\nfrom samcli.lib.utils.stream_writer import StreamWriter\nfrom samcli.local.docker import utils\nfrom samcli.local.docker.contain... | diff --git a/samcli/local/docker/manager.py b/samcli/local/docker/manager.py
index 5780852d02..873f5b1325 100644
--- a/samcli/local/docker/manager.py
+++ b/samcli/local/docker/manager.py
@@ -142,7 +142,12 @@ def pull_image(self, image_name, tag=None, stream=None):
If the Docker image was not available in t... |
urllib3__urllib3-2289 | Deprecate NTLMConnectionPool in 1.26.x
As was mentioned in https://github.com/urllib3/urllib3/pull/2278#issuecomment-864414599 and https://github.com/urllib3/urllib3/pull/2278#issuecomment-864450016 we're moving to remove `NTLMConnectionPool` and the `urllib3.contrib.nltmpool` module from urllib3 in v2.0 if we don't fi... | [
{
"content": "\"\"\"\nNTLM authenticating pool, contributed by erikcederstran\n\nIssue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom logging import getLogger\n\nfrom ntlm import ntlm\n\nfrom .. import HTTPSConnectionPool\nfrom ..packages.s... | [
{
"content": "\"\"\"\nNTLM authenticating pool, contributed by erikcederstran\n\nIssue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10\n\"\"\"\nfrom __future__ import absolute_import\n\nimport warnings\nfrom logging import getLogger\n\nfrom ntlm import ntlm\n\nfrom .. import HTTPSConnectionPool\n... | diff --git a/src/urllib3/contrib/ntlmpool.py b/src/urllib3/contrib/ntlmpool.py
index b2df45dcf6..41a8fd174c 100644
--- a/src/urllib3/contrib/ntlmpool.py
+++ b/src/urllib3/contrib/ntlmpool.py
@@ -5,6 +5,7 @@
"""
from __future__ import absolute_import
+import warnings
from logging import getLogger
from ntlm impor... |
vllm-project__vllm-2151 | torch.distributed.all_reduce does not free memory
I've visualized the memory usage:
* llama 7B, TP=1
<img width="3346" alt="Screenshot 2023-12-16 at 11 14 03 PM" src="https://github.com/vllm-project/vllm/assets/46394894/e6ed7069-2190-4823-8f25-8e27bd94fe35">
The activation memory is reused after every layer.
... | [
{
"content": "\"\"\"A GPU worker class.\"\"\"\nimport os\nfrom typing import Dict, List, Optional, Tuple\n\nimport torch\nimport torch.distributed\n\nfrom vllm.config import (CacheConfig, ModelConfig, ParallelConfig,\n SchedulerConfig)\nfrom vllm.model_executor import set_random_seed\nfr... | [
{
"content": "\"\"\"A GPU worker class.\"\"\"\nimport os\nfrom typing import Dict, List, Optional, Tuple\n\nimport torch\nimport torch.distributed\n\nfrom vllm.config import (CacheConfig, ModelConfig, ParallelConfig,\n SchedulerConfig)\nfrom vllm.model_executor import set_random_seed\nfr... | diff --git a/vllm/worker/worker.py b/vllm/worker/worker.py
index e3babdc022a..3e31737f210 100644
--- a/vllm/worker/worker.py
+++ b/vllm/worker/worker.py
@@ -48,6 +48,14 @@ def __init__(
self.gpu_cache = None
def init_model(self, cupy_port: Optional[int] = None):
+ # torch.distributed.all_reduce d... |
boto__boto-1543 | Support addtional regions in CloudSearch
It appears that boto currently only supports two regions. It would be nice to support the more recently added ones.
Current list of CloudSearch regions is here: http://aws.amazon.com/cloudsearch/faqs/#Which_AWS_regions_is_CloudSearch_available_in?
I think it just needs to be... | [
{
"content": "# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.\n# All Rights Reserved\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), t... | [
{
"content": "# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.\n# All Rights Reserved\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), t... | diff --git a/boto/cloudsearch/__init__.py b/boto/cloudsearch/__init__.py
index 5ba1060e23..01fa41df3d 100644
--- a/boto/cloudsearch/__init__.py
+++ b/boto/cloudsearch/__init__.py
@@ -38,6 +38,16 @@ def regions():
RegionInfo(name='eu-west-1',
endpoint='cloudsearch.eu-west-1.amazonaws... |
pydantic__pydantic-2512 | Validation Error on HttpUrl and AnyHttpUrl on parsing valid url starting with 4 numbers
# Validation Error on HttpUrl and AnyHttpUrl on parsing valid url starting with 4 numbers
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.5.1
... | [
{
"content": "import re\nfrom ipaddress import (\n IPv4Address,\n IPv4Interface,\n IPv4Network,\n IPv6Address,\n IPv6Interface,\n IPv6Network,\n _BaseAddress,\n _BaseNetwork,\n)\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n FrozenSet,\n Generator,\n Optional,\... | [
{
"content": "import re\nfrom ipaddress import (\n IPv4Address,\n IPv4Interface,\n IPv4Network,\n IPv6Address,\n IPv6Interface,\n IPv6Network,\n _BaseAddress,\n _BaseNetwork,\n)\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n FrozenSet,\n Generator,\n Optional,\... | diff --git a/changes/2512-sbv-csis.md b/changes/2512-sbv-csis.md
new file mode 100644
index 00000000000..944b15ef709
--- /dev/null
+++ b/changes/2512-sbv-csis.md
@@ -0,0 +1,2 @@
+Add lookahead to ip regexes for `AnyUrl` hosts. This allows urls with DNS labels
+looking like IPs to validate as they are perfectly valid ho... |
jazzband__django-debug-toolbar-708 | Unable to disable TemplatesPanel and SQLPanel using DISABLE_PANELS
Actually, the title is slightly misleading, because I did manage to disable them, but the documentation was misleading and I had to debug the app in order to find what was failing.
The problem is that the documentation says that these panels names are ... | [
{
"content": "from __future__ import absolute_import, unicode_literals\n\nimport warnings\n\nfrom django.template.loader import render_to_string\n\nfrom debug_toolbar import settings as dt_settings\nfrom debug_toolbar.utils import get_name_from_obj\n\n\nclass Panel(object):\n \"\"\"\n Base class for panel... | [
{
"content": "from __future__ import absolute_import, unicode_literals\n\nimport warnings\n\nfrom django.template.loader import render_to_string\n\nfrom debug_toolbar import settings as dt_settings\nfrom debug_toolbar.utils import get_name_from_obj\n\n\nclass Panel(object):\n \"\"\"\n Base class for panel... | diff --git a/debug_toolbar/panels/__init__.py b/debug_toolbar/panels/__init__.py
index 74b07346b..76febd2ff 100644
--- a/debug_toolbar/panels/__init__.py
+++ b/debug_toolbar/panels/__init__.py
@@ -24,7 +24,16 @@ def panel_id(self):
@property
def enabled(self):
# Check to see if settings has a default... |
Rapptz__discord.py-7048 | Bot crashes with ValueError (integrations)
### Summary
Bot crashes (i don't know the whole context)
### Reproduction Steps
```
Traceback (most recent call last):
File "bot.py", line 2754, in <module>
csatlakoz()
File "bot.py", line 2700, in csatlakoz
loop.run_until_complete(client.start("token... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nth... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nth... | diff --git a/discord/integrations.py b/discord/integrations.py
index 4f1a9f66402a..1072be3e2a8b 100644
--- a/discord/integrations.py
+++ b/discord/integrations.py
@@ -59,7 +59,7 @@ class IntegrationAccount:
Attributes
-----------
- id: :class:`int`
+ id: :class:`str`
The account ID.
name... |
liqd__a4-product-139 | Translations incomplete
- partner page
| [
{
"content": "from os import path\n\nfrom django.conf import settings\nfrom django.core.management.commands import makemessages\n\n\ndef get_module_dir(name):\n module = __import__(name)\n return path.dirname(module.__file__)\n\n\nclass Command(makemessages.Command):\n msgmerge_options = (\n mak... | [
{
"content": "from os import path\n\nfrom django.conf import settings\nfrom django.core.management.commands import makemessages\n\n\ndef get_module_dir(name):\n module = __import__(name)\n return path.dirname(module.__file__)\n\n\nclass Command(makemessages.Command):\n msgmerge_options = (\n mak... | diff --git a/Makefile b/Makefile
index dcdb69336..8424ce588 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,7 @@ makemessages:
$(VIRTUAL_ENV)/bin/python manage.py makemessages -d django
$(VIRTUAL_ENV)/bin/python manage.py makemessages -d djangojs
sed -i 's%#: .*/adhocracy4%#: adhocracy4%' locale/*/LC_MESSAGES/d... |
django-compressor__django-compressor-672 | Broken url in exception
Attempting to update django-compressor to be Django 1.9 compatible and ran into this error:
```
compressor.exceptions.OfflineGenerationError: No template paths found. None of the configured template loaders provided template paths. See http://django.me/template-loaders for more information on t... | [
{
"content": "# flake8: noqa\nimport os\nimport sys\n\nfrom fnmatch import fnmatch\nfrom optparse import make_option\n\nimport django\nfrom django.core.management.base import NoArgsCommand, CommandError\nimport django.template\nfrom django.template import Context\nfrom django.utils import six\nfrom django.utils... | [
{
"content": "# flake8: noqa\nimport os\nimport sys\n\nfrom fnmatch import fnmatch\nfrom optparse import make_option\n\nimport django\nfrom django.core.management.base import NoArgsCommand, CommandError\nimport django.template\nfrom django.template import Context\nfrom django.utils import six\nfrom django.utils... | diff --git a/compressor/management/commands/compress.py b/compressor/management/commands/compress.py
index f2061d17b..03bb2ef65 100644
--- a/compressor/management/commands/compress.py
+++ b/compressor/management/commands/compress.py
@@ -148,7 +148,7 @@ def compress(self, log=None, **options):
raise Offline... |
django-json-api__django-rest-framework-json-api-160 | ReadOnly fields are not rendered if their value is None
This is caused by a workaround added for the Browsable API https://github.com/django-json-api/django-rest-framework-json-api/commit/771ac1045826a55736f99934129b8b7ae8163e0f#commitcomment-14529488
| [
{
"content": "\"\"\"\nUtils.\n\"\"\"\nimport copy\nfrom collections import OrderedDict\n\nimport inflection\nfrom django.conf import settings\nfrom django.utils import six, encoding\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework.serializers import BaseSerializer, ListSerializer, M... | [
{
"content": "\"\"\"\nUtils.\n\"\"\"\nimport copy\nfrom collections import OrderedDict\n\nimport inflection\nfrom django.conf import settings\nfrom django.utils import six, encoding\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework.serializers import BaseSerializer, ListSerializer, M... | diff --git a/example/tests/unit/test_utils.py b/example/tests/unit/test_utils.py
index 19d4340f..2473281a 100644
--- a/example/tests/unit/test_utils.py
+++ b/example/tests/unit/test_utils.py
@@ -111,6 +111,20 @@ def test_build_json_resource_obj():
assert utils.build_json_resource_obj(
serializer.fields, r... |
scrapy__scrapy-5891 | Scrapy does not decode base64 MD5 checksum from GCS
<!--
Thanks for taking an interest in Scrapy!
If you have a question that starts with "How to...", please see the Scrapy Community page: https://scrapy.org/community/.
The GitHub issue tracker's purpose is to deal with bug reports and feature requests for the p... | [
{
"content": "\"\"\"\nFiles Pipeline\n\nSee documentation in topics/media-pipeline.rst\n\"\"\"\nimport functools\nimport hashlib\nimport logging\nimport mimetypes\nimport os\nimport time\nfrom collections import defaultdict\nfrom contextlib import suppress\nfrom ftplib import FTP\nfrom io import BytesIO\nfrom o... | [
{
"content": "\"\"\"\nFiles Pipeline\n\nSee documentation in topics/media-pipeline.rst\n\"\"\"\nimport base64\nimport functools\nimport hashlib\nimport logging\nimport mimetypes\nimport os\nimport time\nfrom collections import defaultdict\nfrom contextlib import suppress\nfrom ftplib import FTP\nfrom io import ... | diff --git a/scrapy/pipelines/files.py b/scrapy/pipelines/files.py
index 6e9f661e5a9..4b594ccb76c 100644
--- a/scrapy/pipelines/files.py
+++ b/scrapy/pipelines/files.py
@@ -3,6 +3,7 @@
See documentation in topics/media-pipeline.rst
"""
+import base64
import functools
import hashlib
import logging
@@ -228,7 +229,... |
netbox-community__netbox-14526 | Poor performances on create/edit tenant field with high number of tenants
### Deployment Type
Self-hosted
### NetBox Version
v3.6.6
### Python Version
3.11
### Steps to Reproduce
* Create around 85k tenant in a single tenant group
* Create around 150k prefixes linked with differents tenants
* Cr... | [
{
"content": "import logging\n\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import transaction\nfrom django.http import Http404\nfrom rest_framework import status\nfrom rest_framework.response import Response\n\nfrom extras.mo... | [
{
"content": "import logging\n\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import transaction\nfrom django.http import Http404\nfrom rest_framework import status\nfrom rest_framework.response import Response\n\nfrom extras.mo... | diff --git a/netbox/netbox/api/viewsets/mixins.py b/netbox/netbox/api/viewsets/mixins.py
index fde486fe967..315563e1a5c 100644
--- a/netbox/netbox/api/viewsets/mixins.py
+++ b/netbox/netbox/api/viewsets/mixins.py
@@ -56,8 +56,15 @@ def get_serializer_class(self):
def get_queryset(self):
qs = super().get_q... |
jupyterhub__jupyterhub-4722 | Cannot perform a global sort by 'Running' status in the admin panel
<!-- Thank you for contributing. These HTML comments will not render in the issue, but you can delete them once you've read them if you prefer! -->
### Bug description
The /hub/admin#/ endpoint shows a table of users and their servers. However, i... | [
{
"content": "\"\"\"Base API handlers\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport json\nimport warnings\nfrom functools import lru_cache\nfrom http.client import responses\nfrom urllib.parse import parse_qs, urlencode, urlparse, urlunpar... | [
{
"content": "\"\"\"Base API handlers\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport json\nimport warnings\nfrom functools import lru_cache\nfrom http.client import responses\nfrom urllib.parse import parse_qs, urlencode, urlparse, urlunpar... | diff --git a/jsx/package-lock.json b/jsx/package-lock.json
index e4d7575529..ff70759a74 100644
--- a/jsx/package-lock.json
+++ b/jsx/package-lock.json
@@ -14,7 +14,7 @@
"lodash": "^4.17.21",
"prop-types": "^15.8.1",
"react": "^17.0.2",
- "react-bootstrap": "^2.7.4",
+ "react-boo... |
pex-tool__pex-1219 | PexInfo.pex_hash does not include metadata
Generally a PEX file is uniqued by a combination of its user code and dependencies. Currently, this is what the `pex_hash` is comprised of:
https://github.com/pantsbuild/pex/blob/d205e2db713ce30d70cd2df9704468f8a3b3f9e0/pex/pex_builder.py#L508-L512
This scheme is foiled by... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nimport hashlib\nimport logging\nimport os\n\nfrom pex import pex_warnings\nfrom pex.common import Chroot, chmod_plus_x, o... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nimport hashlib\nimport logging\nimport os\n\nfrom pex import pex_warnings\nfrom pex.common import Chroot, chmod_plus_x, o... | diff --git a/pex/pex_builder.py b/pex/pex_builder.py
index fe8a83059..ef031ed0a 100644
--- a/pex/pex_builder.py
+++ b/pex/pex_builder.py
@@ -504,13 +504,7 @@ def _precompile_source(self):
def _prepare_code(self):
self._pex_info.code_hash = CacheHelper.pex_code_hash(self._chroot.path())
-
- hasher... |
tobymao__sqlglot-2956 | Table incorrectly parsed as column
# Description
Table of format `<schema>.<table>` in a join gets mis-parsed as a column. In the attached example, the table `"usage"."company_names"` gets misparsed as a column.
### Version details
- Dialect is 'redshift'
- The issue exists on the latest pip version of sqlglot (... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n NormalizationStrategy,\n concat_to_dpipe_sql,\n concat_ws_to_dpipe_sql,\n date_delta_sql,\n generatedasidentitycolumnconstraint_sql,\n json_ex... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n NormalizationStrategy,\n concat_to_dpipe_sql,\n concat_ws_to_dpipe_sql,\n date_delta_sql,\n generatedasidentitycolumnconstraint_sql,\n json_ex... | diff --git a/sqlglot/dialects/redshift.py b/sqlglot/dialects/redshift.py
index a64c1d40fe..2ad9ac3407 100644
--- a/sqlglot/dialects/redshift.py
+++ b/sqlglot/dialects/redshift.py
@@ -136,11 +136,11 @@ def _parse_query_modifiers(
refs.add(
(
this... |
koxudaxi__datamodel-code-generator-767 | `update_forward_refs()` is not created for all necessary models
**Describe the bug**
`update_forward_refs()` is not called for all necessary models if I use inheritance in the models.
**To Reproduce**
Example schema:
```json
{
"title": "PersonsBestFriend",
"description": "This is the main model.",
... | [
{
"content": "import re\nfrom abc import ABC, abstractmethod\nfrom collections import OrderedDict, defaultdict\nfrom itertools import groupby\nfrom pathlib import Path\nfrom typing import (\n Any,\n Callable,\n DefaultDict,\n Dict,\n Iterable,\n Iterator,\n List,\n Mapping,\n Optional... | [
{
"content": "import re\nfrom abc import ABC, abstractmethod\nfrom collections import OrderedDict, defaultdict\nfrom itertools import groupby\nfrom pathlib import Path\nfrom typing import (\n Any,\n Callable,\n DefaultDict,\n Dict,\n Iterable,\n Iterator,\n List,\n Mapping,\n Optional... | diff --git a/datamodel_code_generator/parser/base.py b/datamodel_code_generator/parser/base.py
index 9d0b3f324..692c67b77 100644
--- a/datamodel_code_generator/parser/base.py
+++ b/datamodel_code_generator/parser/base.py
@@ -159,6 +159,16 @@ def sort_data_models(
unresolved_model = (
model... |
scrapy__scrapy-3379 | Cannot use contracts with inherited callbacks
### Description
If you want to `scrapy check` a spider that has inherited methods, these methods' contracts will be ignored.
### Reproduce
```python
class BaseSpider(Spider):
def returns_request(self, response):
""" method which returns request
... | [
{
"content": "import sys\nimport re\nfrom functools import wraps\nfrom unittest import TestCase\n\nfrom scrapy.http import Request\nfrom scrapy.utils.spider import iterate_spider_output\nfrom scrapy.utils.python import get_spec\n\n\nclass ContractsManager(object):\n contracts = {}\n\n def __init__(self, c... | [
{
"content": "import sys\nimport re\nfrom functools import wraps\nfrom inspect import getmembers\nfrom unittest import TestCase\n\nfrom scrapy.http import Request\nfrom scrapy.utils.spider import iterate_spider_output\nfrom scrapy.utils.python import get_spec\n\n\nclass ContractsManager(object):\n contracts ... | diff --git a/scrapy/contracts/__init__.py b/scrapy/contracts/__init__.py
index 8315d21d2ef..de7ac45034d 100644
--- a/scrapy/contracts/__init__.py
+++ b/scrapy/contracts/__init__.py
@@ -1,6 +1,7 @@
import sys
import re
from functools import wraps
+from inspect import getmembers
from unittest import TestCase
from ... |
cupy__cupy-5214 | [RFC] [v10] Dropping Support for CUDA 9.2 & NCCL 2.4
In CuPy v10, we are thinking of dropping support for CUDA 9.2 and NCCL 2.4. Please leave a comment if you have any concerns.
This does not affect CuPy v9.x releases.
| [
{
"content": "import contextlib\nimport distutils.util\nimport importlib\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\n\n# This is done because pip is installed in no editable mode in\n# windows CI so the kernel cache gets always a deterministic path.\ndef _from_install... | [
{
"content": "import contextlib\nimport distutils.util\nimport importlib\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\n\n# This is done because pip is installed in no editable mode in\n# windows CI so the kernel cache gets always a deterministic path.\ndef _from_install... | diff --git a/README.md b/README.md
index 28e4d3c690c..6915fe08a4e 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,6 @@ Choose the right package for your platform.
| Platform | Command |
| --------- | ------------------------------ |
-| CUDA 9.2 | `pip install cupy-cuda92` |
| CUDA... |
mathesar-foundation__mathesar-144 | Function to order table by set of columns
**Problem**
<!-- Please provide a clear and concise description of the problem that this feature request is designed to solve.-->
We should be able to get the records of a table in an ordering by any set of its columns. The records should be paginated.
**Proposed soluti... | [
{
"content": "from sqlalchemy import delete, select\nfrom sqlalchemy.inspection import inspect\n\n\ndef _get_primary_key_column(table):\n primary_key_list = list(inspect(table).primary_key)\n # We do not support getting by composite primary keys\n assert len(primary_key_list) == 1\n return primary_k... | [
{
"content": "from sqlalchemy import delete, select\nfrom sqlalchemy.inspection import inspect\n\n\ndef _get_primary_key_column(table):\n primary_key_list = list(inspect(table).primary_key)\n # We do not support getting by composite primary keys\n assert len(primary_key_list) == 1\n return primary_k... | diff --git a/db/records.py b/db/records.py
index 73071dc261..bdf7388818 100644
--- a/db/records.py
+++ b/db/records.py
@@ -18,8 +18,20 @@ def get_record(table, engine, id_value):
return result[0] if result else None
-def get_records(table, engine, limit=None, offset=None):
- query = select(table).limit(... |
holoviz__hvplot-313 | specifying crs as proj4 string
I can specify the crs as EPSG code, but with my current software configuration crs as proj4 string is failing. Is this a bug or user error?
When I feed `+init=epsg:26911` as the `crs` parameter, I get:
```
AttributeError: 'Proj' object has no attribute 'is_latlong'
ValueError: Cou... | [
{
"content": "\"\"\"\nProvides utilities to convert data and projections\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom distutils.version import LooseVersion\n\nimport pandas as pd\nimport holoviews as hv\n\nfrom holoviews.core.util import basestring\n\nhv_version = LooseVersion(hv.__version__)\n\n\nde... | [
{
"content": "\"\"\"\nProvides utilities to convert data and projections\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom distutils.version import LooseVersion\n\nimport pandas as pd\nimport holoviews as hv\n\nfrom holoviews.core.util import basestring\n\nhv_version = LooseVersion(hv.__version__)\n\n\nde... | diff --git a/hvplot/tests/testutil.py b/hvplot/tests/testutil.py
index df5f3ddaf..f8014e40c 100644
--- a/hvplot/tests/testutil.py
+++ b/hvplot/tests/testutil.py
@@ -190,3 +190,20 @@ def test_process_xarray_dataset_with_x_as_derived_datetime(self):
assert y == 'air'
assert not by
assert not gr... |
PlasmaPy__PlasmaPy-703 | Create classes to represent ionization state distributions
My plan for this PR is to create classes to represent the ionization state distributions of one or more elements. I am going to add in a bunch of dunder methods like `__getitem__` and maybe `__call__` to help making access to the ionization states more straigh... | [
{
"content": "\"\"\"\nDefines the core Plasma class used by PlasmaPy to represent plasma properties.\n\"\"\"\n\nimport numpy as np\nimport astropy.units as u\nimport itertools\n\nfrom plasmapy.formulary.magnetostatics import MagnetoStatics\n\nfrom astropy.constants import mu0\n\nfrom plasmapy.classes import Gen... | [
{
"content": "\"\"\"\nDefines the core Plasma class used by PlasmaPy to represent plasma properties.\n\"\"\"\n\nimport numpy as np\nimport astropy.units as u\nimport itertools\n\nfrom plasmapy.formulary.magnetostatics import MagnetoStatics\n\nfrom astropy.constants import mu0\n\nfrom plasmapy.classes import Gen... | diff --git a/changelog/703.feature.rst b/changelog/703.feature.rst
new file mode 100644
index 0000000000..9cc5736d90
--- /dev/null
+++ b/changelog/703.feature.rst
@@ -0,0 +1 @@
+Optimized `add__magnetostatics` for a 16x speedup in tests!
diff --git a/docs/about/credits.rst b/docs/about/credits.rst
index 48654c0f25..b1f... |
graphql-python__graphene-django-1275 | Django v4.0 support
Hello!
Django 4.0 is due out next week and I was attempting to test the release candidate with my project. Have there been any efforts to check/fix compatibility with the new version?
| [
{
"content": "import inspect\n\nimport six\nfrom django.db import connection, models, transaction\nfrom django.db.models.manager import Manager\nfrom django.utils.encoding import force_text\nfrom django.utils.functional import Promise\n\nfrom graphene.utils.str_converters import to_camel_case\n\ntry:\n impor... | [
{
"content": "import inspect\n\nimport six\nfrom django.db import connection, models, transaction\nfrom django.db.models.manager import Manager\nfrom django.utils.encoding import force_str\nfrom django.utils.functional import Promise\n\nfrom graphene.utils.str_converters import to_camel_case\n\ntry:\n import... | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index b9e57b519..b4f023f3f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -8,12 +8,29 @@ jobs:
strategy:
max-parallel: 4
matrix:
- django: ["1.11", "2.2", "3.0", "3.1"]
- python-version... |
microsoft__Qcodes-54 | version requirement of dependencies
When I try installing Qcodes with `python setup.py develop` I get an error:
```
Traceback (most recent call last):
File ".\setup.py", line 81, in <module>
if StrictVersion(module.__version__) < StrictVersion(min_version):
File "C:\anaconda\lib\distutils\version.py", line 40,... | [
{
"content": "from setuptools import setup, find_packages\nfrom distutils.version import StrictVersion\nfrom importlib import import_module\n\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\nextras = {\n 'MatPlot': ('matplotlib', '1.5'),\n 'QtPlot': ('pyqtgraph', '0.9.10'),\n... | [
{
"content": "from setuptools import setup, find_packages\nfrom distutils.version import StrictVersion\nfrom importlib import import_module\n\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\nextras = {\n 'MatPlot': ('matplotlib', '1.5'),\n 'QtPlot': ('pyqtgraph', '0.9.10'),\n... | diff --git a/setup.py b/setup.py
index 37668ea9ec7..0079a6e9e3c 100644
--- a/setup.py
+++ b/setup.py
@@ -73,6 +73,15 @@ def readme():
*****
'''
+valueerror_template = '''
+*****
+***** package {0} version not understood
+***** Please make sure the installed version ({1})
+***** is compatible with the minimum requir... |
keras-team__keras-19331 | Error "Can only concatenate list (not "tuple") to list" when passing Embedding layer to Bidirectional LSTM layer in Keras 3
**TensorFlow version**: 2.16.1
**Keras version**: 3.1.0
I was playing with encoder-decoder architectures and encountered the "_can only concatenate list (not "tuple") to list_" error when pass... | [
{
"content": "import copy\n\nfrom keras import ops\nfrom keras import utils\nfrom keras.api_export import keras_export\nfrom keras.layers.core.wrapper import Wrapper\nfrom keras.layers.layer import Layer\nfrom keras.saving import serialization_lib\n\n\n@keras_export(\"keras.layers.Bidirectional\")\nclass Bidire... | [
{
"content": "import copy\n\nfrom keras import ops\nfrom keras import utils\nfrom keras.api_export import keras_export\nfrom keras.layers.core.wrapper import Wrapper\nfrom keras.layers.layer import Layer\nfrom keras.saving import serialization_lib\n\n\n@keras_export(\"keras.layers.Bidirectional\")\nclass Bidire... | diff --git a/keras/layers/rnn/bidirectional.py b/keras/layers/rnn/bidirectional.py
index 6c996d55d8be..9a2569fa1591 100644
--- a/keras/layers/rnn/bidirectional.py
+++ b/keras/layers/rnn/bidirectional.py
@@ -182,13 +182,13 @@ def compute_output_shape(self, sequences_shape, initial_state_shape=None):
output_... |
pallets__werkzeug-2686 | Authorization.from_header with "Token" scheme cannot handle base64 padding on tokens
# Steps to reproduce
```
import base64
from werkzeug.datastructures.auth import Authorization
token = base64.encodebytes(b"This has base64 padding").decode("utf-8").strip()
a = Authorization.from_header(f"Token {token}")
a.toke... | [
{
"content": "from __future__ import annotations\n\nimport base64\nimport typing as t\nimport warnings\nfrom functools import wraps\n\nfrom ..http import dump_header\nfrom ..http import parse_dict_header\nfrom ..http import parse_set_header\nfrom ..http import quote_header_value\nfrom .structures import Callbac... | [
{
"content": "from __future__ import annotations\n\nimport base64\nimport typing as t\nimport warnings\nfrom functools import wraps\n\nfrom ..http import dump_header\nfrom ..http import parse_dict_header\nfrom ..http import parse_set_header\nfrom ..http import quote_header_value\nfrom .structures import Callbac... | diff --git a/CHANGES.rst b/CHANGES.rst
index 402d3bbae..0a37fd896 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -5,6 +5,9 @@ Version 2.3.4
Unreleased
+- ``Authorization.from_header`` detects tokens that end with base64 padding (``=``).
+ :issue:`2685`
+
Version 2.3.3
-------------
diff --git a/src/werkzeu... |
Parsl__parsl-3242 | SimpleLauncher should help the user understand why they are not getting multiple nodes
**Is your feature request related to a problem? Please describe.**
When Parsl runs workers inside a batch system, each block of workers can contain multiple compute nodes.
In order to run across all of the compute nodes inside ... | [
{
"content": "import logging\n\nfrom parsl.launchers.base import Launcher\n\nlogger = logging.getLogger(__name__)\n\n\nclass SimpleLauncher(Launcher):\n \"\"\" Does no wrapping. Just returns the command as-is\n \"\"\"\n def __init__(self, debug: bool = True) -> None:\n super().__init__(debug=deb... | [
{
"content": "import logging\n\nfrom parsl.launchers.base import Launcher\n\nlogger = logging.getLogger(__name__)\n\n\nclass SimpleLauncher(Launcher):\n \"\"\" Does no wrapping. Just returns the command as-is\n \"\"\"\n def __init__(self, debug: bool = True) -> None:\n super().__init__(debug=deb... | diff --git a/parsl/launchers/launchers.py b/parsl/launchers/launchers.py
index 4845284376..021357b56c 100644
--- a/parsl/launchers/launchers.py
+++ b/parsl/launchers/launchers.py
@@ -11,11 +11,13 @@ class SimpleLauncher(Launcher):
def __init__(self, debug: bool = True) -> None:
super().__init__(debug=debu... |
sunpy__sunpy-3076 | Add list of constants to docs
Currently if one wants to know what constants `sunpy.sun` has built in you have to run `sunpy.sun.constants.print_all()`, but it would be nice to have a table that lists the constants here: https://docs.sunpy.org/en/latest/code_ref/sun.html#module-sunpy.sun.constants (like AstroPy: http://... | [
{
"content": "\"\"\"\nThis module provides fundamental solar physical constants.\n\"\"\"\nfrom astropy.table import Table\n\nfrom sunpy.sun import _constants as _con\n\n__all__ = [\n 'get', 'find', 'print_all', 'spectral_classification', 'au', 'mass', 'equatorial_radius',\n 'volume', 'surface_area', 'aver... | [
{
"content": "\"\"\"\nThis module provides fundamental solar physical constants.\n\"\"\"\nfrom astropy.table import Table\n\nfrom sunpy.sun import _constants as _con\n\n__all__ = [\n 'get', 'find', 'print_all', 'spectral_classification', 'au', 'mass', 'equatorial_radius',\n 'volume', 'surface_area', 'aver... | diff --git a/sunpy/sun/constants.py b/sunpy/sun/constants.py
index 289e00f43f6..2bfe9302b8b 100644
--- a/sunpy/sun/constants.py
+++ b/sunpy/sun/constants.py
@@ -89,6 +89,20 @@ def print_all():
return t
+# Add a list of constants to the docs
+_lines = [
+ 'The following constants are available:\n',
+ '===... |
mathesar-foundation__mathesar-2939 | Integrate DRF Spectacular with Mathesar's backend codebase
## Why DRF Spectacular
-DRF Spectacular automatically generates comprehensive documentation based on OpenAPI specification for Mathesar's API.
-It is compatible with Mathesar's Django REST Framework
## Proposed solution
-Add the "drf-spectacular" package t... | [
{
"content": "\"\"\"\nBase settings to build other settings files upon.\n\nGenerated by 'django-admin startproject' using Django 3.1.7.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/3.1/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangopro... | [
{
"content": "\"\"\"\nBase settings to build other settings files upon.\n\nGenerated by 'django-admin startproject' using Django 3.1.7.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/3.1/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangopro... | diff --git a/config/settings/common_settings.py b/config/settings/common_settings.py
index 2a473aa7ae..372b2d09c1 100644
--- a/config/settings/common_settings.py
+++ b/config/settings/common_settings.py
@@ -42,6 +42,7 @@ def pipe_delim(pipe_string):
"rest_framework",
"django_filters",
"django_property_fi... |
graphql-python__graphene-django-1083 | Convert DecimalField to String rather than Float
DecimalField entries are currently being converted to Float (https://github.com/graphql-python/graphene-django/blob/8f5a425859ea380d0640c441c5c7f3b1acae17b4/graphene_django/form_converter.py#L56-L59)
Full support for Decimal would be great, but in the meantime I propo... | [
{
"content": "from collections import OrderedDict\nfrom django.db import models\nfrom django.utils.encoding import force_str\nfrom django.utils.module_loading import import_string\n\nfrom graphene import (\n ID,\n Boolean,\n Dynamic,\n Enum,\n Field,\n Float,\n Int,\n List,\n NonNull,... | [
{
"content": "from collections import OrderedDict\nfrom django.db import models\nfrom django.utils.encoding import force_str\nfrom django.utils.module_loading import import_string\n\nfrom graphene import (\n ID,\n Boolean,\n Dynamic,\n Enum,\n Field,\n Float,\n Int,\n List,\n NonNull,... | diff --git a/graphene_django/converter.py b/graphene_django/converter.py
index 0de6964e3..63cc35db3 100644
--- a/graphene_django/converter.py
+++ b/graphene_django/converter.py
@@ -18,6 +18,7 @@
DateTime,
Date,
Time,
+ Decimal,
)
from graphene.types.json import JSONString
from graphene.utils.str_co... |
ipython__ipython-10277 | typing should not be a dependency for python>=3.5
https://github.com/ipython/ipython/commit/3ff1be2ea8ef180a6f17a6a03a3f8452303b9abe added `typing` as an `install_requires`. This package is builtin for python>=3.5, so it should be protected by an environment marker (just like `pathlib2`) in setup.py.
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Setup script for IPython.\n\nUnder Posix environments it works like a typical setup.py script.\nUnder Windows, the command sdist is not supported, since IPython\nrequires utilities which are not available under Windows.\"\"\"\n\n#--------------... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Setup script for IPython.\n\nUnder Posix environments it works like a typical setup.py script.\nUnder Windows, the command sdist is not supported, since IPython\nrequires utilities which are not available under Windows.\"\"\"\n\n#--------------... | diff --git a/setup.py b/setup.py
index b3b4b395abe..642b2a489c0 100755
--- a/setup.py
+++ b/setup.py
@@ -202,7 +202,6 @@ def run(self):
install_requires = [
'setuptools>=18.5',
'jedi>=0.10',
- 'typing',
'decorator',
'pickleshare',
'simplegeneric>0.8',
@@ -218,6 +217,7 @@ def run(self):
ext... |
spectrochempy__spectrochempy-614 | [Bug]: The documentation does not correctly indicate the last release information
### What happened?
should show `whatsnew` correctly
### What did you expect to happen?
_No response_
### Minimal Complete Verifiable Example
_No response_
### Relevant log output
_No response_
### Anything else we need to know?
_... | [
{
"content": "import json\nimport re\nimport sys\nfrom datetime import date\nfrom pathlib import Path\n\nimport yaml\nfrom cffconvert.cli.create_citation import create_citation\nfrom setuptools_scm import get_version\n\nCI = Path(__file__).parent\nPROJECT = CI.parent\nCITATION = PROJECT / \"CITATION.cff\"\nZENO... | [
{
"content": "import json\nimport re\nimport sys\nfrom datetime import date\nfrom pathlib import Path\n\nimport yaml\nfrom cffconvert.cli.create_citation import create_citation\nfrom setuptools_scm import get_version\n\nCI = Path(__file__).parent\nPROJECT = CI.parent\nCITATION = PROJECT / \"CITATION.cff\"\nZENO... | diff --git a/.ci/update_version_and_release_notes.py b/.ci/update_version_and_release_notes.py
index 44c1be24845..aea1a1d42d3 100644
--- a/.ci/update_version_and_release_notes.py
+++ b/.ci/update_version_and_release_notes.py
@@ -165,7 +165,7 @@ def make_zenodo(version):
def make_release_note_index(revision):
- ... |
akvo__akvo-rsr-3173 | Error in disaggregation view
The PGView for disaggregation is incorrect. It includes data from all updates rather than just approved updates.
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo Reporting is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo Reporting is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom... | diff --git a/akvo/rsr/models/result/indicator_period_aggregation.py b/akvo/rsr/models/result/indicator_period_aggregation.py
index 463e3d7661..a7e697fb90 100644
--- a/akvo/rsr/models/result/indicator_period_aggregation.py
+++ b/akvo/rsr/models/result/indicator_period_aggregation.py
@@ -52,12 +52,16 @@ class Meta:
DISA... |
cloud-custodian__cloud-custodian-7494 | c7n-org crashing when it hits an account not authorized
### Describe the bug
Running thru a large organizations yaml. Some accounts aren't not authorized to assume (yet). Normally c7n-org warns and moves on but with c7n-org 0.6.14 on (amazon linux 2) ARM64
Python 3.7.10 (default, Jun 3 2021, 00:01:07)
[GCC 7.3.... | [
{
"content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"Run a custodian policy across an organization's accounts\n\"\"\"\n\nimport csv\nfrom collections import Counter\nimport logging\nimport os\nimport time\nimport subprocess # nosec\nimport sys\nfrom datetime impo... | [
{
"content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"Run a custodian policy across an organization's accounts\n\"\"\"\n\nimport csv\nfrom collections import Counter\nimport logging\nimport os\nimport time\nimport subprocess # nosec\nimport sys\nfrom datetime impo... | diff --git a/tools/c7n_org/c7n_org/cli.py b/tools/c7n_org/c7n_org/cli.py
index 8e482521117..78034f02a15 100644
--- a/tools/c7n_org/c7n_org/cli.py
+++ b/tools/c7n_org/c7n_org/cli.py
@@ -198,9 +198,16 @@ def init(config, use, debug, verbose, accounts, tags, policies, resource=None, p
def resolve_regions(regions, accou... |
bookwyrm-social__bookwyrm-1778 | Receive '403: forbidden' when registering new account
**Describe the bug**
When attempting to register a new account I receive a `403` status from the `/register` endpoint.
*Full message:*
>
> CSRF verification failed. Request aborted.
>
> You are seeing this message because this site requires a CSRF cookie ... | [
{
"content": "\"\"\" non-interactive pages \"\"\"\nfrom django.template.response import TemplateResponse\nfrom django.views import View\nfrom django.utils.decorators import method_decorator\nfrom django.views.decorators.cache import cache_page\n\nfrom bookwyrm import forms\nfrom bookwyrm.views import helpers\nf... | [
{
"content": "\"\"\" non-interactive pages \"\"\"\nfrom django.template.response import TemplateResponse\nfrom django.views import View\n\nfrom bookwyrm import forms\nfrom bookwyrm.views import helpers\nfrom bookwyrm.views.feed import Feed\n\n\n# pylint: disable= no-self-use\nclass About(View):\n \"\"\"creat... | diff --git a/bookwyrm/templates/landing/landing.html b/bookwyrm/templates/landing/landing.html
index d13cd582a9..759e8c619b 100644
--- a/bookwyrm/templates/landing/landing.html
+++ b/bookwyrm/templates/landing/landing.html
@@ -1,11 +1,13 @@
{% extends 'landing/layout.html' %}
{% load i18n %}
+{% load cache %}
{% blo... |
Mailu__Mailu-2444 | Deprecate (and remove) POD_ADDRESS_RANGE
As discussed in #1209, POD_ADDRESS_RANGE should be removed and SUBNET should be used instead.
Tasks:
- remove all occurences of POD_ADDRESS_RANGE from containers
- update the docs
- write a changelog (breaking change!)
| [
{
"content": "from mailu import models\nfrom mailu.internal import internal\nfrom flask import current_app as app\n\nimport flask\nimport socket\nimport os\n\n@internal.route(\"/dovecot/passdb/<path:user_email>\")\ndef dovecot_passdb_dict(user_email):\n user = models.User.query.get(user_email) or flask.abort... | [
{
"content": "from mailu import models\nfrom mailu.internal import internal\nfrom flask import current_app as app\n\nimport flask\nimport socket\nimport os\n\n@internal.route(\"/dovecot/passdb/<path:user_email>\")\ndef dovecot_passdb_dict(user_email):\n user = models.User.query.get(user_email) or flask.abort... | diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py
index 1ad9c6552..0ba64c840 100644
--- a/core/admin/mailu/configuration.py
+++ b/core/admin/mailu/configuration.py
@@ -87,8 +87,7 @@
'HOST_REDIS': 'redis',
'HOST_FRONT': 'front',
'SUBNET': '192.168.203.0/24',
- 'SUBNET6'... |
zestedesavoir__zds-site-5301 | La comparaison des versions a perdu sa sidebar
## Étapes pour reproduire
- prenez un tuto avec plusieurs éditions
- cliquer sur "comparer les versions"
- sélectionner deux versions
**Comportement observé**
la sidebar n'apparaît pas dans la page de comparaison des versions
**Comportement désiré**
La si... | [
{
"content": "from difflib import HtmlDiff\nfrom django import template\nfrom django.utils.html import format_html\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation import ugettext_lazy as _\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef htmldiff(string1, string2):... | [
{
"content": "from difflib import HtmlDiff\nfrom django import template\nfrom django.utils.html import format_html\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation import ugettext_lazy as _\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef htmldiff(string1, string2):... | diff --git a/templates/tutorialv2/view/diff.html b/templates/tutorialv2/view/diff.html
index 735524f432..eaddb93f30 100644
--- a/templates/tutorialv2/view/diff.html
+++ b/templates/tutorialv2/view/diff.html
@@ -34,11 +34,9 @@ <h1 {% if content.image %}class="illu"{% endif %}>
</h1>
{% include 'tutorialv2/in... |
openshift__openshift-ansible-2710 | Flannel vars renamed in flannel 0.5.5
It seems that the upcoming flannel-0.5.5 uses different variable names in /etc/sysconfig/flannel.
##### Version
rhel 7.3
flannel-0.5.5-1.el7.x86_64
openshift-ansible commit 553ce409a40305a984894a980fc3969c11f41aba
##### Steps To Reproduce
deploy with flannel on rhel 7.3
##### Cur... | [
{
"content": "# pylint: disable=missing-docstring,no-self-use,no-value-for-parameter,too-many-lines\n\nimport logging\nimport os\nimport sys\n\nimport click\nfrom pkg_resources import parse_version\nfrom ooinstall import openshift_ansible, utils\nfrom ooinstall.oo_config import Host, OOConfig, OOConfigInvalidHo... | [
{
"content": "# pylint: disable=missing-docstring,no-self-use,no-value-for-parameter,too-many-lines\n\nimport logging\nimport os\nimport sys\n\nimport click\nfrom pkg_resources import parse_version\nfrom ooinstall import openshift_ansible, utils\nfrom ooinstall.oo_config import Host, OOConfig, OOConfigInvalidHo... | diff --git a/roles/flannel/tasks/main.yml b/roles/flannel/tasks/main.yml
index 6b6dfb4231e..d41eb0de84f 100644
--- a/roles/flannel/tasks/main.yml
+++ b/roles/flannel/tasks/main.yml
@@ -4,21 +4,18 @@
action: "{{ ansible_pkg_mgr }} name=flannel state=present"
when: not openshift.common.is_containerized | bool
-- ... |
PyGithub__PyGithub-1506 | Deprecating API authentication through query parameters
I'm using `g = Github("access_token")` on PyGithub-1.50 (latest) and got the below message from github. I am I doing something wrong?
```
On May 1st, 2020 at 16:31 (UTC) your personal access token using python-requests/2.22.0 was used as part of a query parame... | [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2013 AKFish <akfish@gmail.com> #\n# Copyright 2013 Ed Jacks... | [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2013 AKFish <akfish@gmail.com> #\n# Copyright 2013 Ed Jacks... | diff --git a/github/MainClass.py b/github/MainClass.py
index 4602ce7a8e..b117a97fa4 100644
--- a/github/MainClass.py
+++ b/github/MainClass.py
@@ -51,6 +51,7 @@
import datetime
import pickle
import time
+import warnings
import jwt
import requests
@@ -132,6 +133,12 @@ def __init__(
or isinstance(retr... |
mitmproxy__mitmproxy-2361 | Cyrillic domains https problem
##### Steps to reproduce the problem:
1. Start http proxy
2. Go to https://фонд-достоинство.рф
3. See the problem Certificate Verification Error for фонд-достоинство.рф: hostname 'фонд-достоинство.рф' doesn't match 'xn----dtbebu0aecead5adket.xn--p1ai'
##### Any other comments? Wha... | [
{
"content": "import os\nimport select\nimport socket\nimport sys\nimport threading\nimport time\nimport traceback\nimport binascii\nfrom ssl import match_hostname\nfrom ssl import CertificateError\n\nfrom typing import Optional # noqa\n\nfrom mitmproxy.utils import strutils\n\nimport certifi\nimport OpenSSL\n... | [
{
"content": "import os\nimport select\nimport socket\nimport sys\nimport threading\nimport time\nimport traceback\nimport binascii\nfrom ssl import match_hostname\nfrom ssl import CertificateError\n\nfrom typing import Optional # noqa\n\nfrom mitmproxy.utils import strutils\n\nimport certifi\nimport OpenSSL\n... | diff --git a/mitmproxy/net/tcp.py b/mitmproxy/net/tcp.py
index 12cf733708..fce0b74478 100644
--- a/mitmproxy/net/tcp.py
+++ b/mitmproxy/net/tcp.py
@@ -634,7 +634,12 @@ def convert_to_ssl(self, sni=None, alpn_protos=None, **sslctx_kwargs):
if self.cert.cn:
crt["subject"] = [[["commonName", ... |
fedora-infra__bodhi-1484 | bodhi-backend02 is unable to lookup updates by alias
Message
-------
[2017-04-25 02:43:33][ fedmsg ERROR]
```python
{'body': {u'username': u'bodhi', u'certificate': u'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVUakNDQTdlZ0F3SUJBZ0lDQWdnd0RRWUpL\nb1pJaHZjTkFRRUZCUUF3Z2FBeEN6QUpCZ05WQkFZVEFsVlQKTVFzd0NRWURWUVFJRX... | [
{
"content": "# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope t... | [
{
"content": "# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope t... | diff --git a/bodhi/server/__init__.py b/bodhi/server/__init__.py
index 74366491ee..43ca58d189 100644
--- a/bodhi/server/__init__.py
+++ b/bodhi/server/__init__.py
@@ -188,13 +188,14 @@ def main(global_config, testing=None, session=None, **settings):
# Initialize the database scoped session
initialize_db(set... |
python-poetry__poetry-6843 | poetry lock --no-update does not reflect directory packages changes
- [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/issues) of this repo and believe that this is not a duplicate.
- [x] If an ... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom cleo.io.null_io import NullIO\nfrom packaging.utils import canonicalize_name\n\nfrom poetry.installation.executor import Executor\nfrom poetry.installation.operations import Install\nfrom poetry.installation.operations ... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom cleo.io.null_io import NullIO\nfrom packaging.utils import canonicalize_name\n\nfrom poetry.installation.executor import Executor\nfrom poetry.installation.operations import Install\nfrom poetry.installation.operations ... | diff --git a/src/poetry/installation/installer.py b/src/poetry/installation/installer.py
index 83082020d21..e3cdcb9e0ed 100644
--- a/src/poetry/installation/installer.py
+++ b/src/poetry/installation/installer.py
@@ -201,10 +201,16 @@ def _do_refresh(self) -> int:
self._io,
)
+ # Always r... |
astronomer__astro-sdk-1265 | dataframe operator is now appending to it's output table instead of replacing.
**Describe the bug**
the dataframe operator is now appending to it's output table instead of replacing.
refer to https://astronomer.slack.com/archives/C02B8SPT93K/p1668643987896139
**Version**
* Astro: [e.g. 0.6.0]
* OS: [eg. Debian]... | [
{
"content": "\"\"\"Snowflake database implementation.\"\"\"\nfrom __future__ import annotations\n\nimport logging\nimport os\nimport random\nimport string\nfrom dataclasses import dataclass, field\nfrom typing import Any, Sequence\n\nimport pandas as pd\nfrom airflow.providers.snowflake.hooks.snowflake import ... | [
{
"content": "\"\"\"Snowflake database implementation.\"\"\"\nfrom __future__ import annotations\n\nimport logging\nimport os\nimport random\nimport string\nfrom dataclasses import dataclass, field\nfrom typing import Any, Sequence\n\nimport pandas as pd\nfrom airflow.providers.snowflake.hooks.snowflake import ... | diff --git a/python-sdk/src/astro/databases/snowflake.py b/python-sdk/src/astro/databases/snowflake.py
index 0f51dfa9fd..823d8ff391 100644
--- a/python-sdk/src/astro/databases/snowflake.py
+++ b/python-sdk/src/astro/databases/snowflake.py
@@ -648,8 +648,10 @@ def load_pandas_dataframe_to_table(
self._assert_no... |
ansible__ansible-21059 | Error message about conflicting issue should list the conflicting issues
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
Error Message
##### ANSIBLE VERSION
```
ansible 2.2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
```
##### CONFIGURATIO... | [
{
"content": "# (c) 2014 Michael DeHaan, <michael@ansible.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# ... | [
{
"content": "# (c) 2014 Michael DeHaan, <michael@ansible.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# ... | diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py
index 6c47d28aa6f4ae..2266d9e3359c38 100644
--- a/lib/ansible/parsing/mod_args.py
+++ b/lib/ansible/parsing/mod_args.py
@@ -287,7 +287,7 @@ def parse(self):
if item in module_loader or item in ['meta', 'include', 'include_role']... |
getsentry__sentry-55729 | Linking issue to JIRA server failing
### Environment
SaaS (https://sentry.io/)
### Steps to Reproduce
> This only happens with certain projects. The Jira integration is definitely working since many work fine and can create issues.
I noticed that some of the Jira projects in the configuration section were blank. Th... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport re\nfrom typing import Any, Mapping, Optional, Sequence\nfrom urllib.parse import urlparse\n\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazmat.primitives.serialization import load_pem_private_key\nfrom d... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport re\nfrom typing import Any, Mapping, Optional, Sequence\nfrom urllib.parse import urlparse\n\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazmat.primitives.serialization import load_pem_private_key\nfrom d... | diff --git a/src/sentry/integrations/jira_server/integration.py b/src/sentry/integrations/jira_server/integration.py
index ace14f1be85b9b..7678738872ddcd 100644
--- a/src/sentry/integrations/jira_server/integration.py
+++ b/src/sentry/integrations/jira_server/integration.py
@@ -705,11 +705,12 @@ def get_create_issue_co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.