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 ⌀ |
|---|---|---|---|---|
aws-cloudformation__cfn-lint-2886 | E2520 raised for mutually exclusive properties when using Conditions
### CloudFormation Lint Version
cfn-lint 0.80.2
### What operating system are you using?
Windows
### Describe the bug
[E2520](https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/rules.md#E2520) is raised for mutually exclusive propertie... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport cfnlint.helpers\nfrom cfnlint.data import AdditionalSpecs\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass Exclusive(CloudFormationLintRule):\n \"\"\... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport cfnlint.helpers\nfrom cfnlint.data import AdditionalSpecs\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass Exclusive(CloudFormationLintRule):\n \"\"\... | diff --git a/src/cfnlint/rules/resources/properties/Exclusive.py b/src/cfnlint/rules/resources/properties/Exclusive.py
index 8fcf588539..f8d1062821 100644
--- a/src/cfnlint/rules/resources/properties/Exclusive.py
+++ b/src/cfnlint/rules/resources/properties/Exclusive.py
@@ -38,7 +38,7 @@ def check(self, properties, exc... |
voicepaw__so-vits-svc-fork-578 | improve the output file name options on the GUI
**The new OUTPUT is not convenient:**
The latest update demand for an OUTPUT path and file name.
The old version was much more ideal by default.
If user won't enter anything on the OUTPUT, it will not work, instead an annoying error window popups with explanations o... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport multiprocessing\nfrom copy import copy\nfrom logging import getLogger\nfrom pathlib import Path\n\nimport PySimpleGUI as sg\nimport sounddevice as sd\nimport soundfile as sf\nimport torch\nfrom pebble import ProcessFuture, ProcessPool\n\nfr... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport multiprocessing\nfrom copy import copy\nfrom logging import getLogger\nfrom pathlib import Path\n\nimport PySimpleGUI as sg\nimport sounddevice as sd\nimport soundfile as sf\nimport torch\nfrom pebble import ProcessFuture, ProcessPool\n\nfr... | diff --git a/src/so_vits_svc_fork/gui.py b/src/so_vits_svc_fork/gui.py
index 9195bd05..602a6397 100644
--- a/src/so_vits_svc_fork/gui.py
+++ b/src/so_vits_svc_fork/gui.py
@@ -615,8 +615,8 @@ def apply_preset(name: str) -> None:
update_speaker()
elif event == "input_path":
... |
Cloud-CV__EvalAI-2270 | django.setup() not required for Remote submission worker.
Currently, the remote worker doesn't use the Django app directly as the submission worker does, and only references the models through the public API.
And also the error: `django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but sett... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport contextlib\nimport django\nimport importlib\nimport json\nimport logging\nimport os\nimport requests\nimport signal\nimport shutil\nimpo... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport contextlib\nimport importlib\nimport json\nimport logging\nimport os\nimport requests\nimport signal\nimport shutil\nimport sys\nimport ... | diff --git a/scripts/workers/remote_submission_worker.py b/scripts/workers/remote_submission_worker.py
index 9bd0c51d35..c2ec074b7c 100644
--- a/scripts/workers/remote_submission_worker.py
+++ b/scripts/workers/remote_submission_worker.py
@@ -4,7 +4,6 @@
from __future__ import unicode_literals
import contextlib
-im... |
encode__django-rest-framework-491 | POSTing to framework throws: can only concatenate list (not "tuple") to list
In the method:
def get_excluded_fieldnames(self):
"""
Returns the fieldnames that should not be validated.
"""
excluded_fields = list(self.opts.exclude)
for field in self.fields.keys() + self.get_defau... | [
{
"content": "import copy\nimport datetime\nimport types\nfrom decimal import Decimal\nfrom django.db import models\nfrom django.forms import widgets\nfrom django.utils.datastructures import SortedDict\nfrom rest_framework.compat import get_concrete_model\n\n# Note: We do the following so that users of the fram... | [
{
"content": "import copy\nimport datetime\nimport types\nfrom decimal import Decimal\nfrom django.db import models\nfrom django.forms import widgets\nfrom django.utils.datastructures import SortedDict\nfrom rest_framework.compat import get_concrete_model\n\n# Note: We do the following so that users of the fram... | diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index 7eab98606e..c3f260c771 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -132,9 +132,9 @@ def get_excluded_fieldnames(self):
Returns the fieldnames that should not be validated.
"""
... |
pre-commit__pre-commit-387 | do not recommend `pre-commit autoupdate` on failure of `pre-commit autoupdate`
It would be preferable to recommend something that has chance of fixing the problem
instruction to reproduce in #385
| [
{
"content": "from __future__ import unicode_literals\n\nimport io\nimport json\nimport logging\nimport os\nimport shutil\nfrom collections import defaultdict\n\nimport pkg_resources\nfrom cached_property import cached_property\n\nfrom pre_commit import five\nfrom pre_commit import git\nfrom pre_commit.clientli... | [
{
"content": "from __future__ import unicode_literals\n\nimport io\nimport json\nimport logging\nimport os\nimport shutil\nfrom collections import defaultdict\n\nimport pkg_resources\nfrom cached_property import cached_property\n\nfrom pre_commit import five\nfrom pre_commit import git\nfrom pre_commit.clientli... | diff --git a/pre_commit/repository.py b/pre_commit/repository.py
index a0c0d01a1..2fd2d826b 100644
--- a/pre_commit/repository.py
+++ b/pre_commit/repository.py
@@ -78,7 +78,9 @@ def hooks(self):
logger.error(
'`{0}` is not present in repository {1}. '
'Typo? ... |
elastic__apm-agent-python-1021 | Remove Python 3.5 support
Python 3.5 hit EOL September 13, 2020. Support will be removed in our next major release.
| [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | diff --git a/.ci/.jenkins_exclude.yml b/.ci/.jenkins_exclude.yml
index d231158ab..0a9ebf8aa 100644
--- a/.ci/.jenkins_exclude.yml
+++ b/.ci/.jenkins_exclude.yml
@@ -1,41 +1,11 @@
exclude:
# Django
- - PYTHON_VERSION: python-2.7
- FRAMEWORK: django-2.0
- - PYTHON_VERSION: python-2.7
- FRAMEWORK: django-2.1
-... |
mesonbuild__meson-11760 | dependency('foo', static: true) not working as expected
Hi,
When using `dependency('foo', static: true)` with pkg-config backend, meson is not trying to statically link the executable against that library
| [
{
"content": "# Copyright 2013-2021 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | [
{
"content": "# Copyright 2013-2021 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | diff --git a/mesonbuild/dependencies/cmake.py b/mesonbuild/dependencies/cmake.py
index b5ddd28e211b..8827c9abdcd8 100644
--- a/mesonbuild/dependencies/cmake.py
+++ b/mesonbuild/dependencies/cmake.py
@@ -388,6 +388,7 @@ def _detect_dep(self, name: str, package_version: str, modules: T.List[T.Tuple[s
cmake_o... |
lutris__lutris-2982 | Cannot paste GoG login credentials into login helper window
Using `lutris-0.5.2.1` I cannot paste my GoG login credentials into the GoG login helper window. This is quite annoying as I have a password with 40+ characters and typing such a password is quite error-prone.
Neither Linux middle mouse button works nor CTRL+... | [
{
"content": "\"\"\"Module for handling the GOG service\"\"\"\n# Standard Library\nimport json\nimport os\nimport time\nfrom gettext import gettext as _\nfrom urllib.parse import parse_qsl, urlencode, urlparse\n\n# Lutris Modules\nfrom lutris import api, pga, settings\nfrom lutris.gui.dialogs import WebConnectD... | [
{
"content": "\"\"\"Module for handling the GOG service\"\"\"\n# Standard Library\nimport json\nimport os\nimport time\nfrom gettext import gettext as _\nfrom urllib.parse import parse_qsl, urlencode, urlparse\n\n# Lutris Modules\nfrom lutris import api, pga, settings\nfrom lutris.gui.dialogs import WebConnectD... | diff --git a/lutris/services/gog.py b/lutris/services/gog.py
index 1e154bc8ee..45b7491f2b 100644
--- a/lutris/services/gog.py
+++ b/lutris/services/gog.py
@@ -279,7 +279,8 @@ def connect(parent=None):
"""Connect to GOG"""
logger.debug("Connecting to GOG")
dialog = WebConnectDialog(SERVICE, parent)
- d... |
deepset-ai__haystack-6717 | MemoryBM25Retriever returns non relevant documents
**Describe the bug**
`MemoryBM25Retriever` currently always returns `top_k` number of `Document` even if they're not relevant.
The [`test_retriever_valid_run`](https://github.com/deepset-ai/haystack/blob/ccc9f010bbdc75e1c5f1d269a43a5f06f36acba1/test/preview/compo... | [
{
"content": "import re\nfrom typing import Literal, Any, Dict, List, Optional, Iterable\n\nimport logging\n\nimport numpy as np\nfrom haystack_bm25 import rank_bm25\nfrom tqdm.auto import tqdm\n\nfrom haystack import default_from_dict, default_to_dict\nfrom haystack.dataclasses import Document\nfrom haystack.d... | [
{
"content": "import re\nfrom typing import Literal, Any, Dict, List, Optional, Iterable\n\nimport logging\n\nimport numpy as np\nfrom haystack_bm25 import rank_bm25\nfrom tqdm.auto import tqdm\n\nfrom haystack import default_from_dict, default_to_dict\nfrom haystack.dataclasses import Document\nfrom haystack.d... | diff --git a/haystack/document_stores/in_memory/document_store.py b/haystack/document_stores/in_memory/document_store.py
index 027e9c4bd2..44b2f6d552 100644
--- a/haystack/document_stores/in_memory/document_store.py
+++ b/haystack/document_stores/in_memory/document_store.py
@@ -212,8 +212,11 @@ def bm25_retrieval(
... |
mindsdb__mindsdb-1893 | Tag Docker versions
Currently, GitHub Action will deploy a new version to dockerhub as a `latest`. We need to push the tagged version per MindsDB version e.g 2.62.5 => mindsdb/mindsdb:2.62.5
| [
{
"content": "import os\nimport sys\nimport requests\nimport subprocess\n\ninstaller_version_url = 'https://public.api.mindsdb.com/installer/@@beta_or_release/docker___success___None'\n\napi_response = requests.get(\n installer_version_url.replace('@@beta_or_release', sys.argv[1]))\n\nif api_response.status_... | [
{
"content": "import os\nimport sys\nimport requests\nimport subprocess\n\ninstaller_version_url = 'https://public.api.mindsdb.com/installer/@@beta_or_release/docker___success___None'\n\napi_response = requests.get(\n installer_version_url.replace('@@beta_or_release', sys.argv[1]))\n\nif api_response.status_... | diff --git a/docker/build.py b/docker/build.py
index fe199742899..81c301a3136 100644
--- a/docker/build.py
+++ b/docker/build.py
@@ -31,13 +31,11 @@
with open('dist/Dockerfile', 'w') as fp:
fp.write(content)
+print(installer_version)
command = (f"""
cd dist &&
- docker build -t {container_name}... |
abey79__vpype-440 | Replace cKDTree by KDTree
see note here: https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.cKDTree.html#scipy.spatial.cKDTree
| [
{
"content": "from __future__ import annotations\n\nimport logging\nfrom typing import Iterable\n\nimport numpy as np\nfrom scipy.spatial import cKDTree as KDTree\n\n# REMINDER: anything added here must be added to docs/api.rst\n__all__ = [\"LineIndex\"]\n\n\nclass LineIndex:\n \"\"\"Wrapper to scipy.spatial... | [
{
"content": "from __future__ import annotations\n\nimport logging\nfrom typing import Iterable\n\nimport numpy as np\nfrom scipy.spatial import KDTree\n\n# REMINDER: anything added here must be added to docs/api.rst\n__all__ = [\"LineIndex\"]\n\n\nclass LineIndex:\n \"\"\"Wrapper to scipy.spatial.KDTree to ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b975f7b..b1910291 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,7 @@ Release date: UNRELEASED
### Other changes
* Added support for Python 3.10 and dropped support for Python 3.7 (#417)
+* Miscellaneous code cleaning and fixes (#440, 906087b)
* Updated in... |
scverse__scanpy-1856 | Increase visibility of ecosystem page
As discussed at last meeting
- [ ] Document process for adding entries (note this on top of ecosystem page)
- [ ] Link from external
- [ ] Clarify goals/ differences b/w ecosystem and external
| [
{
"content": "from . import tl\nfrom . import pl\nfrom . import pp\nfrom . import exporting\n\nimport sys\nfrom .. import _utils\n\n_utils.annotate_doc_types(sys.modules[__name__], 'scanpy')\ndel sys, _utils\n\n\n__doc__ = \"\"\"\\\nExternal API\n============\n\n\nImport Scanpy's wrappers to external tools as::... | [
{
"content": "from . import tl\nfrom . import pl\nfrom . import pp\nfrom . import exporting\n\nimport sys\nfrom .. import _utils\n\n_utils.annotate_doc_types(sys.modules[__name__], 'scanpy')\ndel sys, _utils\n\n\n__doc__ = \"\"\"\\\nExternal API\n============\n\n.. note::\n More tools that integrate well with... | diff --git a/docs/api/index.rst b/docs/api/index.rst
index fc58983bd1..8e92eb3a5d 100644
--- a/docs/api/index.rst
+++ b/docs/api/index.rst
@@ -11,7 +11,7 @@ Import Scanpy as::
import scanpy as sc
.. note::
- Wrappers to external functionality are found in :mod:`scanpy.external`.
+ Additional functionality is... |
ytdl-org__youtube-dl-1239 | Updated Vevo Signature Length
Decryption function:
```
function lj(a) {
a = a.split("");
a = mj(a, 52);
a = a.reverse();
a = mj(a, 18);
a = a.reverse();
a = a.slice(1);
a = mj(a, 44);
a = mj(a, 51);
a = a.reverse();
a = a.slice(1);
return a.join("")
}
function mj(a, b) {
... | [
{
"content": "# coding: utf-8\n\nimport json\nimport netrc\nimport re\nimport socket\nimport itertools\n\nfrom .common import InfoExtractor, SearchInfoExtractor\nfrom ..utils import (\n compat_http_client,\n compat_parse_qs,\n compat_urllib_error,\n compat_urllib_parse,\n compat_urllib_request,\n... | [
{
"content": "# coding: utf-8\n\nimport json\nimport netrc\nimport re\nimport socket\nimport itertools\n\nfrom .common import InfoExtractor, SearchInfoExtractor\nfrom ..utils import (\n compat_http_client,\n compat_parse_qs,\n compat_urllib_error,\n compat_urllib_parse,\n compat_urllib_request,\n... | diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 3a8edbdc249..64a3e39c194 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -348,7 +348,7 @@ def _decrypt_signature(self, s):
elif len(s) == 84:
return s[83:27:-1] + s[0] + s[26:... |
Parsl__parsl-1002 | bash_apps fail due to missing dir paths
I'm running into bash_app errors when I'm using `stdout=parsl.AUTO_LOGNAME`.
Here's the traceback:
```
2019-05-31 11:22:06 parsl.dataflow.dflow:251 [ERROR] Task 0 failed
Traceback (most recent call last):
File "/home/yadu/miniconda3/envs/mpi_executor/lib/python3.6/site-pa... | [
{
"content": "import logging\nfrom functools import update_wrapper\nfrom inspect import signature, Parameter\n\nfrom parsl.app.errors import wrap_error\nfrom parsl.app.futures import DataFuture\nfrom parsl.app.app import AppBase\nfrom parsl.dataflow.dflow import DataFlowKernelLoader\n\nlogger = logging.getLogge... | [
{
"content": "import logging\nfrom functools import update_wrapper\nfrom inspect import signature, Parameter\n\nfrom parsl.app.errors import wrap_error\nfrom parsl.app.futures import DataFuture\nfrom parsl.app.app import AppBase\nfrom parsl.dataflow.dflow import DataFlowKernelLoader\n\nlogger = logging.getLogge... | diff --git a/parsl/app/bash.py b/parsl/app/bash.py
index 7172307a8d..c153dec371 100644
--- a/parsl/app/bash.py
+++ b/parsl/app/bash.py
@@ -69,9 +69,9 @@ def open_std_fd(fdname):
raise pe.BadStdStreamFile("std descriptor %s has unexpected type %s" % (fdname, str(type(stdfspec))), TypeError('Bad Tuple Type')... |
aws-cloudformation__cfn-lint-1852 | Ignoring ${} parameters from Fn::Sub checks
*cfn-lint version: 0.44.1*
*Description of issue.*
I using the `AWS::ApiGatewayV2::Api` clause and referencing the [`RouteSelectionExpression`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-routesel... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nfrom functools import reduce # pylint: disable=redefined-builtin\nimport re\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nc... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nfrom functools import reduce # pylint: disable=redefined-builtin\nimport re\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nc... | diff --git a/src/cfnlint/rules/functions/SubNeeded.py b/src/cfnlint/rules/functions/SubNeeded.py
index 132a5f135c..f4237c63bd 100644
--- a/src/cfnlint/rules/functions/SubNeeded.py
+++ b/src/cfnlint/rules/functions/SubNeeded.py
@@ -20,7 +20,8 @@ class SubNeeded(CloudFormationLintRule):
# Free-form text properties t... |
encode__starlette-867 | [bug] Invalid cookie name leads to exception
When handling a request with an invalid cookie name (does not conform to RFC2109) starlette raises an exception. i.e iam/cookiename
This is because Starlette uses Python's stdlib cookie library, which is very strict.
I do understand the strictness, but in real life scenari... | [
{
"content": "import asyncio\nimport http.cookies\nimport json\nimport typing\nfrom collections.abc import Mapping\n\nfrom starlette.datastructures import URL, Address, FormData, Headers, QueryParams, State\nfrom starlette.formparsers import FormParser, MultiPartParser\nfrom starlette.types import Message, Rece... | [
{
"content": "import asyncio\nimport http.cookies\nimport json\nimport typing\nfrom collections.abc import Mapping\n\nfrom starlette.datastructures import URL, Address, FormData, Headers, QueryParams, State\nfrom starlette.formparsers import FormParser, MultiPartParser\nfrom starlette.types import Message, Rece... | diff --git a/docs/requests.md b/docs/requests.md
index f0ffc66bf..a72cb75dc 100644
--- a/docs/requests.md
+++ b/docs/requests.md
@@ -73,6 +73,8 @@ Cookies are exposed as a regular dictionary interface.
For example: `request.cookies.get('mycookie')`
+Cookies are ignored in case of an invalid cookie. (RFC2109)
+
##... |
getpelican__pelican-1354 | Empty alt attribute for image warning includes HTML
When using reStructuredText image tags with width and height without an alt tag, the warning will include the raw HTML. See the result below.
``` rst
.. image:: /images/versioning-with-xcode.png
:width: 671px
:height: 563px
:align: center
```
### Actual r... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\n\nimport docutils\nimport docutils.core\nimport docutils.io\nfrom docutils.writers.html4css1 import HTMLTranslator\n\nimport six\nfrom six.... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\n\nimport docutils\nimport docutils.core\nimport docutils.io\nfrom docutils.writers.html4css1 import HTMLTranslator\n\nimport six\nfrom six.... | diff --git a/pelican/readers.py b/pelican/readers.py
index 4542e608e..e899838aa 100644
--- a/pelican/readers.py
+++ b/pelican/readers.py
@@ -584,7 +584,7 @@ def find_empty_alt(content, path):
# src before alt
<img
[^\>]*
- src=(['"])(.*)\1
+ src=(['"])(.*?)\1... |
django-cms__django-cms-2847 | toolbar add page on same level
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models import User\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models import User\nfro... | diff --git a/cms/cms_toolbar.py b/cms/cms_toolbar.py
index eb0097fe690..758c3e78901 100644
--- a/cms/cms_toolbar.py
+++ b/cms/cms_toolbar.py
@@ -294,9 +294,10 @@ def add_page_menu(self):
add_page_menu = current_page_menu.get_or_create_menu('add_page', _("Add Page"))
add_page_menu.add_sideframe_item(
... |
google__flax-910 | Improve Documentation: Jitting init()
In some of our examples we `jax.jit` the `init()`, for instance in the [WMT example](https://github.com/google/flax/blob/master/linen_examples/wmt/train.py#L472), and in other examples we don't.
@Marvin182 mentioned in a chat: "Jitting the model.init() of the PixelCNN example ta... | [
{
"content": "# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/flax/linen/module.py b/flax/linen/module.py
index a1e88b9d9..b7bbc13f4 100644
--- a/flax/linen/module.py
+++ b/flax/linen/module.py
@@ -725,6 +725,13 @@ def init(self, rngs: Union[PRNGKey, RNGSequences], *args,
**kwargs) -> VariableDict:
"""Initializes a module method with variables and re... |
DjangoGirls__djangogirls-983 | JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Sentry Issue: [DJANGO-GIRLS-WEBSITE-6K](https://django-girls.sentry.io/issues/5093987191/?referrer=github_integration)
```
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
File "requests/models.py", line 971, in json
return complexjson.loads(se... | [
{
"content": "from datetime import date, datetime, timedelta\n\nimport requests\nfrom django.utils import timezone\nfrom django_date_extensions.fields import ApproximateDate\n\nfrom .models import Event\n\nNOMINATIM_URL = \"https://nominatim.openstreetmap.org/search\"\n\n\ndef get_coordinates_for_city(city, cou... | [
{
"content": "from datetime import date, datetime, timedelta\nfrom json import JSONDecodeError\n\nimport requests\nfrom django.utils import timezone\nfrom django_date_extensions.fields import ApproximateDate\n\nfrom .models import Event\n\nNOMINATIM_URL = \"https://nominatim.openstreetmap.org/search\"\n\n\ndef ... | diff --git a/core/utils.py b/core/utils.py
index 328a32954..1a8925459 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -1,4 +1,5 @@
from datetime import date, datetime, timedelta
+from json import JSONDecodeError
import requests
from django.utils import timezone
@@ -18,7 +19,7 @@ def get_coordinates_for_city(city... |
mesonbuild__meson-11583 | Computation of PACKAGE_PREFIX_DIR in Config.cmake file on Windows uses \..\.. instead of ../../
**Describe the bug**
Generating a CMake Config file on Windows results in @PACKAGE_INIT@ macro generating the wrong cmake code, which prevents correct computation of the PACKAGE_PREFIX_DIR variable.
**To Reproduce**
mes... | [
{
"content": "# Copyright 2018 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required... | [
{
"content": "# Copyright 2018 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required... | diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index d37c832abecb..c6048f92502b 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -391,7 +391,8 @@ def configure_package_config_file(self, state: ModuleState, args: TYPE_var, kwar
if not os.path.isabs(abs_instal... |
aws__aws-cli-1012 | Downloading S3 object encrypted using KMS keys fails with error: "Requests specifying Server Side Encryption with AWS KMS managed keys require AWS Signature Version 4"
I uploaded an object to S3 encrypted with a KMS managed key using the S3 Console.
I am using:
```
$ aws --version
aws-cli/1.6.2 Python/2.7.6 Darwin/13... | [
{
"content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | [
{
"content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | diff --git a/awscli/customizations/streamingoutputarg.py b/awscli/customizations/streamingoutputarg.py
index 536e640e64c2..d7a386f689e3 100644
--- a/awscli/customizations/streamingoutputarg.py
+++ b/awscli/customizations/streamingoutputarg.py
@@ -89,6 +89,12 @@ def add_to_params(self, parameters, value):
s... |
encode__django-rest-framework-8598 | Seems `Viewset`s `get_extra_action_url_map` method does not recognize namespaces
Seems `Viewset`s `get_extra_action_url_map` method does not recognize namespaces. I'm using different apps via Django URL namespaces ("<namespace>:<url name>") but the DRF action pull down menu will not provide it. My quick fix looks like:... | [
{
"content": "\"\"\"\nViewSets are essentially just a type of class based view, that doesn't provide\nany method handlers, such as `get()`, `post()`, etc... but instead has actions,\nsuch as `list()`, `retrieve()`, `create()`, etc...\n\nActions are only bound to methods at the point of instantiating the views.\... | [
{
"content": "\"\"\"\nViewSets are essentially just a type of class based view, that doesn't provide\nany method handlers, such as `get()`, `post()`, etc... but instead has actions,\nsuch as `list()`, `retrieve()`, `create()`, etc...\n\nActions are only bound to methods at the point of instantiating the views.\... | diff --git a/rest_framework/viewsets.py b/rest_framework/viewsets.py
index 5a1f8acf5b..1c56f61e86 100644
--- a/rest_framework/viewsets.py
+++ b/rest_framework/viewsets.py
@@ -198,6 +198,10 @@ def get_extra_action_url_map(self):
for action in actions:
try:
url_name = '%s-%s' % (sel... |
Parsl__parsl-544 | Do not CD to engine_dir
Currently in the IPP submit script we CD to the `engine_dir`. This breaks staging stuff. We should just send engine-related files there rather than changing the PWD.
| [
{
"content": "import logging\nimport os\nimport pathlib\nimport uuid\n\nfrom ipyparallel import Client\nfrom parsl.providers import LocalProvider\nfrom parsl.utils import RepresentationMixin\n\nfrom parsl.dataflow.error import ConfigurationError\nfrom parsl.executors.base import ParslExecutor\nfrom parsl.execut... | [
{
"content": "import logging\nimport os\nimport pathlib\nimport uuid\n\nfrom ipyparallel import Client\nfrom parsl.providers import LocalProvider\nfrom parsl.utils import RepresentationMixin\n\nfrom parsl.dataflow.error import ConfigurationError\nfrom parsl.executors.base import ParslExecutor\nfrom parsl.execut... | diff --git a/parsl/executors/ipp.py b/parsl/executors/ipp.py
index e4b5462db2..b0e1793978 100644
--- a/parsl/executors/ipp.py
+++ b/parsl/executors/ipp.py
@@ -155,13 +155,12 @@ def compose_launch_cmd(self, filepath, engine_dir, container_image):
raise e
return """mkdir -p {0}
-cd {0}
-cat <<EOF ... |
microsoft__botbuilder-python-1919 | Bug in set_value of StateManager
## Version
Latest
## Describe the bug
When I try to set the state value via the state manager I get the following error:
```
File "/home/robin/dev/ask-waldo/ask-waldo-teams-chatbot/.venv/lib/python3.8/site-packages/botbuilder/dialogs/memory/dialog_state_manager.py", line 293,... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\nimport builtins\n\nfrom inspect import isawaitable\nfrom traceback import print_tb\nfrom typing import (\n Callable,\n Dict,\n Iterable,\n Iterator,\n List,\n Tuple,\n Type,\n Ty... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\nimport builtins\n\nfrom inspect import isawaitable\nfrom traceback import print_tb\nfrom typing import (\n Callable,\n Dict,\n Iterable,\n Iterator,\n List,\n Tuple,\n Type,\n Ty... | diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/dialog_state_manager.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/dialog_state_manager.py
index 0610f3ac5..c123f2cce 100644
--- a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/dialog_state_manager.py
+++ b/libraries/botbuilder-d... |
huggingface__text-generation-inference-252 | Concurrent issue - batch size can not be greater than 1
1. when I use ab tool to test with c=2:
```
ab -n 10 -c 2 -p post_data.json -T application/json -H 'accept: application/json' http://localhost:8080/generate
```
a runtime error has been rasied when batch_size > 1?
```
data:{"error":"Request failed during gen... | [
{
"content": "import torch\n\nfrom dataclasses import dataclass\nfrom opentelemetry import trace\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, PreTrainedTokenizerBase\nfrom typing import Optional, Tuple, List, Type, Dict\n\nfrom text_generation_server.models import Model\nfrom text_generation_s... | [
{
"content": "import torch\n\nfrom dataclasses import dataclass\nfrom opentelemetry import trace\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, PreTrainedTokenizerBase\nfrom typing import Optional, Tuple, List, Type, Dict\n\nfrom text_generation_server.models import Model\nfrom text_generation_s... | diff --git a/server/text_generation_server/models/causal_lm.py b/server/text_generation_server/models/causal_lm.py
index 336c98239a5..ca8fccfad86 100644
--- a/server/text_generation_server/models/causal_lm.py
+++ b/server/text_generation_server/models/causal_lm.py
@@ -335,7 +335,7 @@ def concatenate(cls, batches: List[... |
optuna__optuna-889 | Use OrderedDict to keep the order of intermediate values.
This PR addresses #886.
I think it has two issues.
1. `dict` does not keep the order of keys
The current implementation of `FrozenTrial.intermediate_values` employs `dict`. The order of keys is not ensured if the users use Python 3.6 or older. This PR ... | [
{
"content": "from optuna.logging import get_logger\nfrom optuna.structs import TrialState\nfrom optuna import type_checking\nfrom optuna.visualization.utils import _check_plotly_availability\nfrom optuna.visualization.utils import is_available\n\nif type_checking.TYPE_CHECKING:\n from optuna.study import St... | [
{
"content": "from optuna.logging import get_logger\nfrom optuna.structs import TrialState\nfrom optuna import type_checking\nfrom optuna.visualization.utils import _check_plotly_availability\nfrom optuna.visualization.utils import is_available\n\nif type_checking.TYPE_CHECKING:\n from optuna.study import St... | diff --git a/optuna/visualization/intermediate_values.py b/optuna/visualization/intermediate_values.py
index 26fe3871d0..bec87ab22f 100644
--- a/optuna/visualization/intermediate_values.py
+++ b/optuna/visualization/intermediate_values.py
@@ -67,9 +67,10 @@ def _get_intermediate_plot(study):
traces = []
for t... |
keras-team__keras-15943 | tf.keras.layers.Conv2D seems to accept 0 as the value of filters by mistake.
**System information**.
- Have I written custom code (as opposed to using a stock example script provided in Keras): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- TensorFlow installed from (source or binary): 2.... | [
{
"content": "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/keras/layers/convolutional/base_conv.py b/keras/layers/convolutional/base_conv.py
index bcab3847d2ba..17823064157f 100644
--- a/keras/layers/convolutional/base_conv.py
+++ b/keras/layers/convolutional/base_conv.py
@@ -118,9 +118,10 @@ def __init__(self,
if isinstance(filters, float):
filters ... |
jupyterhub__zero-to-jupyterhub-k8s-398 | Allow multiple extraConfig
Binder relies on `hub.extraConfig` to configure the Spawner. If we want to customize a given Binder *deployment* via `hub.extraConfig`, we have to copy/paste the hub.extraConfig from the binderhub chart and add to it.
It would be handy if extraConfig were something that could be added to w... | [
{
"content": "import os\nimport sys\nimport yaml\nfrom tornado.httpclient import AsyncHTTPClient\n\ndef get_config(key, default=None):\n \"\"\"\n Find a config item of a given name & return it\n\n Parses everything as YAML, so lists and dicts are available too\n \"\"\"\n path = os.path.join('/etc... | [
{
"content": "import os\nimport glob\nimport sys\nimport yaml\nfrom tornado.httpclient import AsyncHTTPClient\n\ndef get_config(key, default=None):\n \"\"\"\n Find a config item of a given name & return it\n\n Parses everything as YAML, so lists and dicts are available too\n \"\"\"\n path = os.pa... | diff --git a/doc/source/advanced.md b/doc/source/advanced.md
index 6275e4546f..c07ef1c61f 100644
--- a/doc/source/advanced.md
+++ b/doc/source/advanced.md
@@ -92,8 +92,10 @@ Code. Some examples of things you can do:
supported in the helm chart
Unfortunately, you have to write your python *in* your YAML file. The... |
plotly__plotly.py-4036 | IFrame renderer throws exception on plots in the first cell
Symptom: when running the following conversion on a notebook that produces a plot in the first cell:
```
PLOTLY_RENDERER=iframe_connected jupyter nbconvert --execute --to html --no-input my_notebook.ipynb
```
the following error is received:
```
File ~/.... | [
{
"content": "from __future__ import absolute_import\nimport base64\nimport json\nimport webbrowser\nimport inspect\nimport os\nfrom os.path import isdir\n\nfrom plotly import utils, optional_imports\nfrom plotly.io import to_json, to_image, write_image, write_html\nfrom plotly.io._orca import ensure_server\nfr... | [
{
"content": "from __future__ import absolute_import\nimport base64\nimport json\nimport webbrowser\nimport inspect\nimport os\nfrom os.path import isdir\n\nfrom plotly import utils, optional_imports\nfrom plotly.io import to_json, to_image, write_image, write_html\nfrom plotly.io._orca import ensure_server\nfr... | diff --git a/packages/python/plotly/plotly/io/_base_renderers.py b/packages/python/plotly/plotly/io/_base_renderers.py
index 5f42b2d01fc..f6cc4f9c1d3 100644
--- a/packages/python/plotly/plotly/io/_base_renderers.py
+++ b/packages/python/plotly/plotly/io/_base_renderers.py
@@ -609,11 +609,10 @@ def to_mimebundle(self, f... |
great-expectations__great_expectations-1701 | Mising importlib-metadata dependency in verson 0.11.6
**Describe the bug**
When installing version 0.11.6 (latest right now) I cannot use the library because I get an error `ModuleNotFoundError: No module named 'importlib_metadata' `
**To Reproduce**
Steps to reproduce the behavior:
1. Create an empty folder
2.... | [
{
"content": "import importlib\nimport json\nimport logging\nimport os\nimport time\nfrom functools import wraps\nfrom inspect import getcallargs\nfrom pathlib import Path\nfrom types import ModuleType\nfrom typing import Callable, Union\n\nimport black\nimport importlib_metadata\nfrom pkg_resources import Dist... | [
{
"content": "import importlib\nimport json\nimport logging\nimport os\nimport time\nfrom functools import wraps\nfrom inspect import getcallargs\nfrom pathlib import Path\nfrom types import ModuleType\nfrom typing import Callable, Union\n\nimport black\nfrom pkg_resources import Distribution\n\nfrom great_expe... | diff --git a/docs/reference/changelog.rst b/docs/reference/changelog.rst
index f448491ba604..8b24b65add98 100644
--- a/docs/reference/changelog.rst
+++ b/docs/reference/changelog.rst
@@ -16,6 +16,7 @@ Develop
* [BUGFIX] Fix issue where GlobReaderBatchKwargsGenerator failed with relative base_directory
* [BUGFIX] Addi... |
pyqtgraph__pyqtgraph-1800 | GLMeshItem memory leak in drawing of faces
### Short description
When rendering faces, there appears to be a memory leak relating to line 199 and 200 of GLMeshItem.py
### Code to reproduce
This can be reproduced using the GLMeshItem example script. Using top to check memory usage, the amount used by the process sl... | [
{
"content": "from OpenGL.GL import *\nfrom .. GLGraphicsItem import GLGraphicsItem\nfrom .. MeshData import MeshData\nfrom ...Qt import QtGui\nfrom .. import shaders\nfrom ... import functions as fn\nimport numpy as np\n\n\n\n__all__ = ['GLMeshItem']\n\nclass GLMeshItem(GLGraphicsItem):\n \"\"\"\n **Base... | [
{
"content": "from OpenGL.GL import *\nfrom .. GLGraphicsItem import GLGraphicsItem\nfrom .. MeshData import MeshData\nfrom ...Qt import QtGui\nfrom .. import shaders\nfrom ... import functions as fn\nimport numpy as np\n\n\n\n__all__ = ['GLMeshItem']\n\nclass GLMeshItem(GLGraphicsItem):\n \"\"\"\n **Base... | diff --git a/pyqtgraph/opengl/items/GLMeshItem.py b/pyqtgraph/opengl/items/GLMeshItem.py
index 55e75942b1..e5379ae2b7 100644
--- a/pyqtgraph/opengl/items/GLMeshItem.py
+++ b/pyqtgraph/opengl/items/GLMeshItem.py
@@ -196,7 +196,7 @@ def paint(self):
if faces is None:
glDrawAr... |
freqtrade__freqtrade-2858 | bug in qtpylib max<->min
a very simple bug.. the functions rolling_min/rolling_max are copies..
```
diff --git a/freqtrade/vendor/qtpylib/indicators.py b/freqtrade/vendor/qtpylib/indicators.py
index b3b2ac53..bef14039 100644
--- a/freqtrade/vendor/qtpylib/indicators.py
+++ b/freqtrade/vendor/qtpylib/indicators.p... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# QTPyLib: Quantitative Trading Python Library\n# https://github.com/ranaroussi/qtpylib\n#\n# Copyright 2016-2018 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# QTPyLib: Quantitative Trading Python Library\n# https://github.com/ranaroussi/qtpylib\n#\n# Copyright 2016-2018 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance... | diff --git a/freqtrade/vendor/qtpylib/indicators.py b/freqtrade/vendor/qtpylib/indicators.py
index b3b2ac533da..bef1403969c 100644
--- a/freqtrade/vendor/qtpylib/indicators.py
+++ b/freqtrade/vendor/qtpylib/indicators.py
@@ -288,9 +288,9 @@ def rolling_min(series, window=14, min_periods=None):
def rolling_max(series, ... |
huggingface__optimum-341 | MT5 Support
Big Thanks for the awesome Optimum library,
MT5 is a Massive Transformers And Supports Many Languages, but it has a slow inference time
for speedup MT5 inference time, We need some post-training methods, and Optimum will help more!
Please Add MT5 Support for Optimum! Thanks
| [
{
"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... | [
{
"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... | diff --git a/optimum/onnxruntime/utils.py b/optimum/onnxruntime/utils.py
index 586f55bf3e..34a46b44d1 100644
--- a/optimum/onnxruntime/utils.py
+++ b/optimum/onnxruntime/utils.py
@@ -69,6 +69,7 @@ class ORTConfigManager:
"electra": ("num_attention_heads", "hidden_size", "bert"),
"gpt2": ("n_head", "n_... |
pypa__setuptools-1986 | Deprecated distutils bdist_wininst is going to be removed
I proposed to remove the bdist_winstinst command from distutils in Python 3.9:
* https://bugs.python.org/issue39541
* https://discuss.python.org/t/remove-distutils-bdist-wininst-command/3115
* https://github.com/python/cpython/pull/18329
Problem: setupto... | [
{
"content": "from distutils import log\nimport distutils.command.install_scripts as orig\nimport os\nimport sys\n\nfrom pkg_resources import Distribution, PathMetadata, ensure_directory\n\n\nclass install_scripts(orig.install_scripts):\n \"\"\"Do normal script install, plus any egg_info wrapper scripts\"\"\... | [
{
"content": "from distutils import log\nimport distutils.command.install_scripts as orig\nimport os\nimport sys\n\nfrom pkg_resources import Distribution, PathMetadata, ensure_directory\n\n\nclass install_scripts(orig.install_scripts):\n \"\"\"Do normal script install, plus any egg_info wrapper scripts\"\"\... | diff --git a/changelog.d/1985.change.rst b/changelog.d/1985.change.rst
new file mode 100644
index 0000000000..33698b8874
--- /dev/null
+++ b/changelog.d/1985.change.rst
@@ -0,0 +1 @@
+Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9).
diff --git a/setuptools/command/ins... |
geopandas__geopandas-2127 | BUG: path_effects not working in geopandas.plot with multiple entities
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
#### ... | [
{
"content": "import warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.plotting import PlotAccessor\n\nimport geopandas\n\nfrom distutils.version import LooseVersion\n\nfrom ._decorator import doc\n\n\ndef deprecated(new):\n \"\"\"Helper to provide deprecation warning.\"\"\"\n\n def old(*ar... | [
{
"content": "import warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.plotting import PlotAccessor\n\nimport geopandas\n\nfrom distutils.version import LooseVersion\n\nfrom ._decorator import doc\n\n\ndef deprecated(new):\n \"\"\"Helper to provide deprecation warning.\"\"\"\n\n def old(*ar... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index d460e0050b..d705b911ab 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -73,9 +73,9 @@ def _expand_kwargs(kwargs, multiindex):
mpl = matplotlib.__version__
if mpl >= LooseVersion("3.4") or (mpl > LooseVersion("3.3.2") and "+" in... |
qtile__qtile-2915 | Wayland: mouseclicks not received by Internal windows when `bring_front_click` set to `"floating_only"`
# Issue description
Mouse clicks are not received by Internal windows. e.g. clicking on widgets in the bar does not trigger mouse callback events.
# Qtile version
Latest master: 76b3962d
# Stack traces
... | [
{
"content": "# Copyright (c) 2021 Matt Colligan\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, ... | [
{
"content": "# Copyright (c) 2021 Matt Colligan\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, ... | diff --git a/libqtile/backend/wayland/core.py b/libqtile/backend/wayland/core.py
index 04fff91867..42a061945c 100644
--- a/libqtile/backend/wayland/core.py
+++ b/libqtile/backend/wayland/core.py
@@ -671,11 +671,10 @@ def _focus_by_click(self) -> None:
if found:
win, surface, _, _ = found
- ... |
python-discord__bot-1089 | API lag may lead to more than 2 available help channels
`on_message` uses a lock to ensure messages sent in available channels are processed sequentially. After it acquires the lock, it checks if the channel has already been moved out of available. If it has, then it aborts further processing. The problem is that this ... | [
{
"content": "import asyncio\nimport json\nimport logging\nimport random\nimport typing as t\nfrom collections import deque\nfrom datetime import datetime, timedelta, timezone\nfrom pathlib import Path\n\nimport discord\nimport discord.abc\nfrom discord.ext import commands\n\nfrom bot import constants\nfrom bot... | [
{
"content": "import asyncio\nimport json\nimport logging\nimport random\nimport typing as t\nfrom collections import deque\nfrom datetime import datetime, timedelta, timezone\nfrom pathlib import Path\n\nimport discord\nimport discord.abc\nfrom discord.ext import commands\n\nfrom bot import constants\nfrom bot... | diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 1be980472a..975043df94 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -694,7 +694,7 @@ async def on_message(self, message: discord.Message) -> None:
async with self.on_message_lock:
log.trace(f"on_m... |
comic__grand-challenge.org-1450 | Add example code for overlay segment configuration for workstation
| [
{
"content": "from django.forms import ModelForm\n\nfrom grandchallenge.core.forms import SaveFormInitMixin\nfrom grandchallenge.core.widgets import JSONEditorWidget\nfrom grandchallenge.workstation_configs.models import (\n OVERLAY_SEGMENTS_SCHEMA,\n WorkstationConfig,\n)\n\n\nclass WorkstationConfigForm... | [
{
"content": "from django.forms import ModelForm\n\nfrom grandchallenge.core.forms import SaveFormInitMixin\nfrom grandchallenge.core.widgets import JSONEditorWidget\nfrom grandchallenge.workstation_configs.models import (\n OVERLAY_SEGMENTS_SCHEMA,\n WorkstationConfig,\n)\n\n\nclass WorkstationConfigForm... | diff --git a/app/grandchallenge/reader_studies/templates/reader_studies/readerstudy_detail.html b/app/grandchallenge/reader_studies/templates/reader_studies/readerstudy_detail.html
index c412df5ac9..8c8bbfdd8d 100644
--- a/app/grandchallenge/reader_studies/templates/reader_studies/readerstudy_detail.html
+++ b/app/gran... |
pallets__werkzeug-679 | management script utilities is broken in 0.10
In 46ff5e9, the `run_simple` function in `werkzeug/serving.py` adds a new parameter `reloader_type`, which breaks management script utilities.
```
Traceback (most recent call last):
File "manage.py", line 27, in <module>
manager.run()
File "/Users/leemars/.virtual... | [
{
"content": "# -*- coding: utf-8 -*-\nr'''\n werkzeug.script\n ~~~~~~~~~~~~~~~\n\n .. admonition:: Deprecated Functionality\n\n ``werkzeug.script`` is deprecated without replacement functionality.\n Python's command line support improved greatly with :mod:`argparse`\n and a bunch of ... | [
{
"content": "# -*- coding: utf-8 -*-\nr'''\n werkzeug.script\n ~~~~~~~~~~~~~~~\n\n .. admonition:: Deprecated Functionality\n\n ``werkzeug.script`` is deprecated without replacement functionality.\n Python's command line support improved greatly with :mod:`argparse`\n and a bunch of ... | diff --git a/werkzeug/script.py b/werkzeug/script.py
index 11425f54f..622943c30 100644
--- a/werkzeug/script.py
+++ b/werkzeug/script.py
@@ -309,7 +309,9 @@ def action(hostname=('h', hostname), port=('p', port),
"""Start a new development server."""
from werkzeug.serving import run_simple
app... |
pallets__werkzeug-681 | management script utilities is broken in 0.10
In 46ff5e9, the `run_simple` function in `werkzeug/serving.py` adds a new parameter `reloader_type`, which breaks management script utilities.
```
Traceback (most recent call last):
File "manage.py", line 27, in <module>
manager.run()
File "/Users/leemars/.virtual... | [
{
"content": "# -*- coding: utf-8 -*-\nr'''\n werkzeug.script\n ~~~~~~~~~~~~~~~\n\n .. admonition:: Deprecated Functionality\n\n ``werkzeug.script`` is deprecated without replacement functionality.\n Python's command line support improved greatly with :mod:`argparse`\n and a bunch of ... | [
{
"content": "# -*- coding: utf-8 -*-\nr'''\n werkzeug.script\n ~~~~~~~~~~~~~~~\n\n .. admonition:: Deprecated Functionality\n\n ``werkzeug.script`` is deprecated without replacement functionality.\n Python's command line support improved greatly with :mod:`argparse`\n and a bunch of ... | diff --git a/werkzeug/script.py b/werkzeug/script.py
index 11425f54f..622943c30 100644
--- a/werkzeug/script.py
+++ b/werkzeug/script.py
@@ -309,7 +309,9 @@ def action(hostname=('h', hostname), port=('p', port),
"""Start a new development server."""
from werkzeug.serving import run_simple
app... |
ivy-llc__ivy-15802 | asin
| [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_unsupported_dtypes({\"2.4.2 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef sin(x, ... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_unsupported_dtypes({\"2.4.2 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_array... | diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
index 0bac9b1fa2e66..66f96ec019fa8 100644
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -1,6 +1,6 @@
# global
import ivy
-from ivy.func_wrapper im... |
scrapy__scrapy-2418 | inspect_response(response) yields incorrect response in IPython shell
Example case (requires registration at example site, and even then would be hard to use as a use-case; modify to suit your needs): http://pastebin.com/GT8N893q
In the above example, the response.meta printout in after_submit callback does not match ... | [
{
"content": "from functools import wraps\nfrom collections import OrderedDict\n\ndef _embed_ipython_shell(namespace={}, banner=''):\n \"\"\"Start an IPython Shell\"\"\"\n try:\n from IPython.terminal.embed import InteractiveShellEmbed\n from IPython.terminal.ipapp import load_default_config... | [
{
"content": "from functools import wraps\nfrom collections import OrderedDict\n\ndef _embed_ipython_shell(namespace={}, banner=''):\n \"\"\"Start an IPython Shell\"\"\"\n try:\n from IPython.terminal.embed import InteractiveShellEmbed\n from IPython.terminal.ipapp import load_default_config... | diff --git a/scrapy/utils/console.py b/scrapy/utils/console.py
index 567fd51bc21..1888d95997e 100644
--- a/scrapy/utils/console.py
+++ b/scrapy/utils/console.py
@@ -15,6 +15,9 @@ def wrapper(namespace=namespace, banner=''):
config = load_default_config()
# Always use .instace() to ensure _instance pro... |
bokeh__bokeh-4521 | It's possible to extend the lasso tool outside the bounds of a plot
For reference, this is version '**0.9.0rc-8f3c806-18-g08c81cb**'

| [
{
"content": "\"\"\" Bokeh comes with a number of interactive tools.\n\nThere are five types of tool interactions:\n\n.. hlist::\n :columns: 5\n\n * Pan/Drag\n * Click/Tap\n * Scroll/Pinch\n * Actions\n * Inspectors\n\nFor the first three comprise the category of gesture tools, and only\none t... | [
{
"content": "\"\"\" Bokeh comes with a number of interactive tools.\n\nThere are five types of tool interactions:\n\n.. hlist::\n :columns: 5\n\n * Pan/Drag\n * Click/Tap\n * Scroll/Pinch\n * Actions\n * Inspectors\n\nFor the first three comprise the category of gesture tools, and only\none t... | diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
index a76ca62a208..6615093f855 100644
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -450,6 +450,14 @@ class LassoSelectTool(Tool):
event, or only once, when the selection region is completed. Default: True
""")
+ callback = Instance(... |
kubeflow__pipelines-8002 | [SDK] AttributeError: 'ComponentStore' object has no attribute 'uri_search_template'
Hi, I am trying to load some prebuit gcp kubeflow components using `kfp.components.ComponentStore`. However I am getting this error:
```
line 180, in _load_component_spec_in_component_ref
if self.uri_search_template:
Attribut... | [
{
"content": "__all__ = [\n 'ComponentStore',\n]\n\nfrom pathlib import Path\nimport copy\nimport hashlib\nimport json\nimport logging\nimport requests\nimport tempfile\nfrom typing import Callable, Iterable\nfrom uritemplate import URITemplate\nfrom . import _components as comp\nfrom .structures import Comp... | [
{
"content": "__all__ = [\n 'ComponentStore',\n]\n\nfrom pathlib import Path\nimport copy\nimport hashlib\nimport json\nimport logging\nimport requests\nimport tempfile\nfrom typing import Callable, Iterable\nfrom uritemplate import URITemplate\nfrom . import _components as comp\nfrom .structures import Comp... | diff --git a/sdk/python/kfp/components/_component_store.py b/sdk/python/kfp/components/_component_store.py
index 2409a8eeb39..1977faed9dc 100644
--- a/sdk/python/kfp/components/_component_store.py
+++ b/sdk/python/kfp/components/_component_store.py
@@ -45,8 +45,7 @@ def __init__(self,
uri_search_template: ... |
oppia__oppia-8673 | "Invalid Date" Shown for Feedback in Learner Dashboard
**Describe the bug**
When opening a feedback thread in the learner dashboard, "Invalid Date" is shown in place of the date.
**To Reproduce**
Steps to reproduce the behavior:
1. Leave feedback on an exploration suggesting a change
2. Open the learner dashbo... | [
{
"content": "# Copyright 2017 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "# Copyright 2017 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/core/controllers/learner_dashboard.py b/core/controllers/learner_dashboard.py
index 0e8fb4b994054..e29cb5a94e207 100644
--- a/core/controllers/learner_dashboard.py
+++ b/core/controllers/learner_dashboard.py
@@ -175,7 +175,9 @@ def get(self, thread_id):
'description': suggestion_thread.sub... |
buildbot__buildbot-7066 | buildbot.tac - use an 0o prefix for octal integers
After fresh installation of buildbot workers on Rocky9 with python 3.9 we found the following problem starting the workers:
```
worker not running
Unhandled Error
Traceback (most recent call last):
File "/home/bb-slave/lib/python3.9/site-packages/twisted/appli... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/newsfragments/create-worker-options-check.bugfix b/newsfragments/create-worker-options-check.bugfix
new file mode 100644
index 000000000000..cdb81b2e539a
--- /dev/null
+++ b/newsfragments/create-worker-options-check.bugfix
@@ -0,0 +1 @@
+Options for `create-worker` that are converted to numbers are now als... |
fossasia__open-event-server-4804 | Admin Access required for accessing Order endpoint
**Describe the bug**
Admin access is required for endpoints related to Order.
**To Reproduce**
GET/POST request to Order endpoints.
**Expected behavior**
The organizer should be able to query the Order endpoints as it was before.
**Stacktrace**
`{
"e... | [
{
"content": "from datetime import datetime\n\nfrom flask import request, render_template\nfrom flask_jwt import current_identity as current_user\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Sche... | [
{
"content": "from datetime import datetime\n\nfrom flask import request, render_template\nfrom flask_jwt import current_identity as current_user\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Sche... | diff --git a/app/api/orders.py b/app/api/orders.py
index 961e83ff83..a2d0646ee4 100644
--- a/app/api/orders.py
+++ b/app/api/orders.py
@@ -127,11 +127,8 @@ def before_get(self, args, kwargs):
:param kwargs:
:return:
"""
- if kwargs.get('event_id') is None:
- if 'GET' in requ... |
wandb__wandb-735 | Initialising error
`wandb --version && python --version && uname`
* Weights and Biases version: Latest
* Python version: 3
* Operating System:Linux
### Description
Not initialising
### What I Did
```
`wandb.init(project="matting-disEntangleRes34DIM") `gives me error :
```
Traceback (most recent c... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Three possible modes:\n# 'cli': running from \"wandb\" command\n# 'run': we're a script launched by \"wandb run\"\n# 'dryrun': we're a script not launched by \"wandb run\"\n\nfrom __future__ import absolute_import, print_function\n\n__author__ = \"\"\"Chris... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Three possible modes:\n# 'cli': running from \"wandb\" command\n# 'run': we're a script launched by \"wandb run\"\n# 'dryrun': we're a script not launched by \"wandb run\"\n\nfrom __future__ import absolute_import, print_function\n\n__author__ = \"\"\"Chris... | diff --git a/wandb/__init__.py b/wandb/__init__.py
index 6b0b7a492ff..e8085ef26f5 100644
--- a/wandb/__init__.py
+++ b/wandb/__init__.py
@@ -305,7 +305,7 @@ def _init_headless(run, cloud=True):
try:
stdout_redirector = io_wrap.FileRedirector(sys.stdout, stdout_slave)
stderr_redirector... |
urllib3__urllib3-1166 | urllib3==1.21: TypeError: unhashable type: 'list'
There seems to be a regression from `1.20` to `1.21`.
```
2017-04-28T04:26:10.152544966Z File "/usr/local/lib/python3.5/site-packages/steembase/http_client.py", line 146, in exec
2017-04-28T04:26:10.152552486Z response = self.request(body=body)
2017-04-28T04... | [
{
"content": "from __future__ import absolute_import\nimport collections\nimport functools\nimport logging\n\nfrom ._collections import RecentlyUsedContainer\nfrom .connectionpool import HTTPConnectionPool, HTTPSConnectionPool\nfrom .connectionpool import port_by_scheme\nfrom .exceptions import LocationValueErr... | [
{
"content": "from __future__ import absolute_import\nimport collections\nimport functools\nimport logging\n\nfrom ._collections import RecentlyUsedContainer\nfrom .connectionpool import HTTPConnectionPool, HTTPSConnectionPool\nfrom .connectionpool import port_by_scheme\nfrom .exceptions import LocationValueErr... | diff --git a/CHANGES.rst b/CHANGES.rst
index c5467220f2..d3448a90ed 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -7,6 +7,9 @@ dev (master)
* Fixed SecureTransport issue that would cause long delays in response body
delivery. (Pull #1154)
+* Fixed regression in 1.21 that threw exceptions when users passed the
+ ... |
imAsparky__django-cookiecutter-38 | [DOCS]: Add a Django project License option.
**Describe alternatives you've considered**
Would you please share your clear and concise description of any alternative/similar documentation you've considered.
**Additional context**
Would you please share any other context or screenshots about the documentation r... | [
{
"content": "#!/usr/bin/env python\n\"\"\"django-cookiecutter post project generation jobs.\"\"\"\nimport os\nimport subprocess # nosec\n\nPROJECT_DIRECTORY = os.path.realpath(os.path.curdir)\n\n# REMOTE_REPO = \"git@github.com:{{cookiecutter.github_username}}/\\\n# {{cookiecutter.git_project_name}}.git\"\n\n... | [
{
"content": "#!/usr/bin/env python\n\"\"\"django-cookiecutter post project generation jobs.\"\"\"\nimport os\nimport subprocess # nosec\n\nPROJECT_DIRECTORY = os.path.realpath(os.path.curdir)\n\n# REMOTE_REPO = \"git@github.com:{{cookiecutter.github_username}}/\\\n# {{cookiecutter.git_project_name}}.git\"\n\n... | diff --git a/LICENSE b/LICENSE.rst
similarity index 96%
rename from LICENSE
rename to LICENSE.rst
index f4f6340a..66bcbe01 100644
--- a/LICENSE
+++ b/LICENSE.rst
@@ -1,4 +1,7 @@
+.. cookie_license::
+====================
BSD 3-Clause License
+====================
Copyright (c) 2021, mark sevelj
All rights reserved... |
ray-project__ray-10721 | [autoscaler] Rsync breaks when `target` or `source` is None
<!--Please include [tune], [rllib], [autoscaler] etc. in the issue title if relevant-->
### What is the problem?
When `rsync` is run with `source` and `target` set to `None` and `file_mounts` are included in the YAML, ray fails with
```
None type is not ... | [
{
"content": "import colorful as cf\nimport copy\nimport hashlib\nimport json\nimport logging\nimport os\nimport random\nimport sys\nimport subprocess\nimport tempfile\nimport time\nfrom typing import Any, Dict, Optional\n\nimport click\nimport yaml\ntry: # py3\n from shlex import quote\nexcept ImportError:... | [
{
"content": "import colorful as cf\nimport copy\nimport hashlib\nimport json\nimport logging\nimport os\nimport random\nimport sys\nimport subprocess\nimport tempfile\nimport time\nfrom typing import Any, Dict, Optional\n\nimport click\nimport yaml\ntry: # py3\n from shlex import quote\nexcept ImportError:... | diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py
index 18327847ba98b..94af7ad5ed2a4 100644
--- a/python/ray/autoscaler/commands.py
+++ b/python/ray/autoscaler/commands.py
@@ -959,10 +959,11 @@ def rsync(config_file: str,
config = _bootstrap_config(config, no_config_cache=no_config... |
encode__starlette-1356 | WebSocketRoute does not work with functools.partial
### Checklist
- [x] The bug is reproducible against the latest release and/or `master`.
- [x] There are no similar issues or pull requests to fix it yet.
### Describe the bug
Accessing a WebSocketRoute with async function wrapped in functools.partial raises Type... | [
{
"content": "import asyncio\nimport contextlib\nimport functools\nimport inspect\nimport re\nimport sys\nimport traceback\nimport types\nimport typing\nimport warnings\nfrom enum import Enum\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.convertors import CONVERTOR_TYPES, Convertor\nfro... | [
{
"content": "import asyncio\nimport contextlib\nimport functools\nimport inspect\nimport re\nimport sys\nimport traceback\nimport types\nimport typing\nimport warnings\nfrom enum import Enum\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.convertors import CONVERTOR_TYPES, Convertor\nfro... | diff --git a/starlette/routing.py b/starlette/routing.py
index 3c11c1b0c..982980c3c 100644
--- a/starlette/routing.py
+++ b/starlette/routing.py
@@ -276,7 +276,10 @@ def __init__(
self.endpoint = endpoint
self.name = get_name(endpoint) if name is None else name
- if inspect.isfunction(endpoin... |
bridgecrewio__checkov-3542 | CKV2_AWS_38/39 produce empty `helpUri` in sarif output
**Describe the issue**
We're producing sarif output from checkov in a github action. This started failing now because the sarif contains `helpUri: null` fields, which aren't valid (https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc343178... | [
{
"content": "from __future__ import annotations\n\nimport argparse\nimport json\nimport logging\nimport os\nfrom collections.abc import Iterable\n\nfrom typing import List, Dict, Union, Any, Optional, TYPE_CHECKING, cast\nfrom colorama import init\nfrom junit_xml import TestCase, TestSuite, to_xml_report_strin... | [
{
"content": "from __future__ import annotations\n\nimport argparse\nimport json\nimport logging\nimport os\nfrom collections.abc import Iterable\n\nfrom typing import List, Dict, Union, Any, Optional, TYPE_CHECKING, cast\nfrom colorama import init\nfrom junit_xml import TestCase, TestSuite, to_xml_report_strin... | diff --git a/checkov/common/output/report.py b/checkov/common/output/report.py
index cec56a3b13..f646dbeecd 100644
--- a/checkov/common/output/report.py
+++ b/checkov/common/output/report.py
@@ -263,9 +263,11 @@ def get_sarif_json(self, tool: str) -> Dict[str, Any]:
"help": {
"text... |
piskvorky__gensim-2392 | Off-by-one counting error in TFIDF
Building a TFIDF model outputs this in the log:
```
INFO - 2019-02-06 16:09:54,670 - resulting dictionary: Dictionary(10000 unique tokens: [u'writings', u'foul', u'prefix', u'woods', u'hanging']...)
INFO - 2019-02-06 16:10:01,718 - collecting document frequencies
INFO - 2019-02-... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2012 Radim Rehurek <radimrehurek@seznam.cz>\n# Copyright (C) 2017 Mohit Rathore <mrmohitrathoremr@gmail.com>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"This module implements functionality ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2012 Radim Rehurek <radimrehurek@seznam.cz>\n# Copyright (C) 2017 Mohit Rathore <mrmohitrathoremr@gmail.com>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"This module implements functionality ... | diff --git a/gensim/models/tfidfmodel.py b/gensim/models/tfidfmodel.py
index a4cbedcd22..b45d1652a1 100644
--- a/gensim/models/tfidfmodel.py
+++ b/gensim/models/tfidfmodel.py
@@ -390,10 +390,9 @@ def initialize(self, corpus):
self.num_nnz = numnnz
self.dfs = dfs
# and finally compute the idf ... |
geopandas__geopandas-1673 | BUG: warning on total_bounds / repr of all-empty GeoSeries
When your GeoSeries is all-empty (or the subset that is shown in the repr), you get a warning in the repr that is coming from the bounds calculation:
```
In [11]: s = geopandas.GeoSeries([shapely.geometry.Point()]*3)
In [12]: s
Out[12]: /home/joris/scip... | [
{
"content": "from collections.abc import Iterable\nimport numbers\nimport operator\nimport warnings\nimport inspect\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import (\n ExtensionArray,\n ExtensionDtype,\n register_extension_dtype,\n)\n\nimport shapely\nimport shapely.affin... | [
{
"content": "from collections.abc import Iterable\nimport numbers\nimport operator\nimport warnings\nimport inspect\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import (\n ExtensionArray,\n ExtensionDtype,\n register_extension_dtype,\n)\n\nimport shapely\nimport shapely.affin... | diff --git a/geopandas/array.py b/geopandas/array.py
index fe7fce21f2..315dd66e64 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -981,7 +981,9 @@ def _formatter(self, boxed=False):
if precision is None:
# dummy heuristic based on 10 first geometries that should
... |
Kinto__kinto-963 | Don't use /tmp but os.gettempdir
```
>> Issue: [B108:hardcoded_tmp_directory] Probable insecure usage of temp file/directory.
Severity: Medium Confidence: Medium
Location: kinto/core/__init__.py:66
```
Don't use /tmp but os.gettempdir
```
>> Issue: [B108:hardcoded_tmp_directory] Probable insecure usage of ... | [
{
"content": "\"\"\"Main entry point\n\"\"\"\nimport pkg_resources\n\nfrom cornice import Service as CorniceService\nfrom pyramid.settings import aslist\n\nfrom kinto.core import errors\nfrom kinto.core import events\nfrom kinto.core.initialization import ( # NOQA\n initialize, install_middlewares,\n loa... | [
{
"content": "\"\"\"Main entry point\n\"\"\"\nimport pkg_resources\nimport tempfile\n\nfrom cornice import Service as CorniceService\nfrom pyramid.settings import aslist\n\nfrom kinto.core import errors\nfrom kinto.core import events\nfrom kinto.core.initialization import ( # NOQA\n initialize, install_midd... | diff --git a/kinto/core/__init__.py b/kinto/core/__init__.py
index e99dcd9c9..78edaa02c 100644
--- a/kinto/core/__init__.py
+++ b/kinto/core/__init__.py
@@ -1,6 +1,7 @@
"""Main entry point
"""
import pkg_resources
+import tempfile
from cornice import Service as CorniceService
from pyramid.settings import aslist
... |
interlegis__sapl-1350 | Migração: SQL não é executada por conter dados inválidos
A SQL que ajusta campos inexistentes nas tabelas legadas não é executada caso haja algum valor que o Django não aceita.
O seguinte erro apareceu na tela:
```Args: '(1292, "Incorrect datetime value: '0000-00-00 00:00:00' for column 'dat_envio' at row 1")'```
... | [
{
"content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom... | [
{
"content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom... | diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py
index b5e16e282..183b22dbd 100644
--- a/sapl/legacy/migration.py
+++ b/sapl/legacy/migration.py
@@ -750,8 +750,8 @@ def adjust_proposicao_antes_salvar(new, old):
def adjust_proposicao_depois_salvar(new, old):
if not hasattr(old.dat_envio, 'year') ... |
keras-team__keras-19201 | Typo in keras.distribution.initialize()
Hi,
There is a typo when calling `keras.distribution.initialize` due to a typo in the jax backend. The function pass the `corrdinator_address` argument instead of `coordinator_address` to `jax.distributed.initialize`
```log
---> 13 keras.distribution.initialize()
File /... | [
{
"content": "\"\"\"!!!DO NOT USE!!!\n\nDistribution related class for JAX backend.\n\nThis is just a prototype and we might want to unify it\nwith other backends in the future.\n\"\"\"\n\nimport jax\nimport numpy as np\n\nfrom keras.utils import jax_utils\n\n\ndef list_devices(device_type=None):\n \"\"\"Ret... | [
{
"content": "\"\"\"!!!DO NOT USE!!!\n\nDistribution related class for JAX backend.\n\nThis is just a prototype and we might want to unify it\nwith other backends in the future.\n\"\"\"\n\nimport jax\nimport numpy as np\n\nfrom keras.utils import jax_utils\n\n\ndef list_devices(device_type=None):\n \"\"\"Ret... | diff --git a/keras/backend/jax/distribution_lib.py b/keras/backend/jax/distribution_lib.py
index 704b13a48d45..8e15e3c96fb0 100644
--- a/keras/backend/jax/distribution_lib.py
+++ b/keras/backend/jax/distribution_lib.py
@@ -200,12 +200,12 @@ def initialize(job_addresses, num_processes, process_id):
f"{l... |
spack__spack-5006 | Issue while building mpiP
Trying to build this on ubuntu desktop gives (config.log):
```
configure:4289: /home/guest/workarena/softwares/sources/spack/lib/spack/env/gcc/gcc -c conftest.c >&5
conftest.c:11:17: fatal error: mpi.h: No such file or directory
compilation terminated.
configure:4289: $? = 1
configur... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py
index f75df37278dc58..4bc4b01ef064f6 100644
--- a/var/spack/repos/builtin/packages/mpip/package.py
+++ b/var/spack/repos/builtin/packages/mpip/package.py
@@ -33,10 +33,14 @@ class Mpip(AutotoolsPackage):
... |
getredash__redash-4359 | Password Auth enabling itself when using LDAP
### Issue Summary
When using LDAP for auth, the checkbox for "Password Login Enabled" in settings becomes greyed out. However, when changing any other setting on that page and clicking save, the "Password Login Enabled" gets enabled. I can't find any way to them disable ... | [
{
"content": "import logging\n\nfrom flask import abort, flash, redirect, render_template, request, url_for\n\nfrom flask_login import current_user, login_required, login_user, logout_user\nfrom redash import __version__, limiter, models, settings\nfrom redash.authentication import current_org, get_login_url, g... | [
{
"content": "import logging\n\nfrom flask import abort, flash, redirect, render_template, request, url_for\n\nfrom flask_login import current_user, login_required, login_user, logout_user\nfrom redash import __version__, limiter, models, settings\nfrom redash.authentication import current_org, get_login_url, g... | diff --git a/client/app/pages/settings/OrganizationSettings.jsx b/client/app/pages/settings/OrganizationSettings.jsx
index fe8e27283a..d852fdab3a 100644
--- a/client/app/pages/settings/OrganizationSettings.jsx
+++ b/client/app/pages/settings/OrganizationSettings.jsx
@@ -49,7 +49,8 @@ class OrganizationSettings extends ... |
tobymao__sqlglot-2443 | Erroneous handling of redshift's JSON_PARSE
**sqlglot version: 18.16.1**
**Fully reproducible code snippet**
```python
import sqlglot
sql = "SELECT JSON_PARSE('[10001,10002,\"abc\"]');"
parsed = sqlglot.parse_one(sql,dialect="redshift")
parsed.sql(dialect="redshift")
#'SELECT PARSE_JSON(\'[10001,10002,"abc"]\'... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n concat_to_dpipe_sql,\n concat_ws_to_dpipe_sql,\n generatedasidentitycolumnconstraint_sql,\n rename_func,\n ts_or_ds_to_date_sql,\n)\nfrom sqlglot... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n concat_to_dpipe_sql,\n concat_ws_to_dpipe_sql,\n generatedasidentitycolumnconstraint_sql,\n rename_func,\n ts_or_ds_to_date_sql,\n)\nfrom sqlglot... | diff --git a/sqlglot/dialects/redshift.py b/sqlglot/dialects/redshift.py
index 51b91150aa..df70aa773b 100644
--- a/sqlglot/dialects/redshift.py
+++ b/sqlglot/dialects/redshift.py
@@ -175,6 +175,7 @@ class Generator(Postgres.Generator):
exp.GeneratedAsIdentityColumnConstraint: generatedasidentitycolumnconst... |
cloud-custodian__cloud-custodian-9504 | Add support for backup in timestream backup
### Describe the feature
This will use AWS backup service to take time-stream backup.
### Extra information or context
_No response_
| [
{
"content": "from c7n.manager import resources\nfrom c7n.actions import Action\nfrom c7n.filters.kms import KmsRelatedFilter\nfrom c7n.query import DescribeSource, QueryResourceManager, TypeInfo\nfrom c7n.utils import local_session, type_schema\nfrom c7n.tags import (\n TagDelayedAction,\n TagActionFilte... | [
{
"content": "from c7n.manager import resources\nfrom c7n.actions import Action\nfrom c7n.filters.kms import KmsRelatedFilter\nfrom c7n.query import DescribeSource, QueryResourceManager, TypeInfo\nfrom c7n.utils import local_session, type_schema\nfrom c7n.tags import (\n TagDelayedAction,\n TagActionFilte... | diff --git a/c7n/resources/timestream.py b/c7n/resources/timestream.py
index cd68f3d60bf..2db76a9235f 100644
--- a/c7n/resources/timestream.py
+++ b/c7n/resources/timestream.py
@@ -9,6 +9,7 @@
Tag as TagAction,
RemoveTag as RemoveTagAction
)
+from c7n.filters.backup import ConsecutiveAwsBackupsFilter
cl... |
rasterio__rasterio-1417 | reproject() loses _reproject()'s dst_alpha keyword argument
See `dst_alpa` at https://github.com/mapbox/rasterio/blob/master/rasterio/warp.py#L294.
| [
{
"content": "\"\"\"Raster warping and reprojection.\"\"\"\n\n\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nfrom math import ceil, floor\n\nfrom affine import Affine\nimport numpy as np\n\nimport rasterio\nfrom rasterio._base import _transform\nfrom rasterio._warp import (\n _t... | [
{
"content": "\"\"\"Raster warping and reprojection.\"\"\"\n\n\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nfrom math import ceil, floor\n\nfrom affine import Affine\nimport numpy as np\n\nimport rasterio\nfrom rasterio._base import _transform\nfrom rasterio._warp import (\n _t... | diff --git a/rasterio/_warp.pyx b/rasterio/_warp.pyx
index b3ec5aa11..ab34e1ae6 100644
--- a/rasterio/_warp.pyx
+++ b/rasterio/_warp.pyx
@@ -437,9 +437,6 @@ def _reproject(
else:
dst_bidx = src_bidx
- if destination.shape[0] != src_count:
- raise ValueError("Destination's shape... |
conan-io__conan-center-index-4675 | [package] odbc/2.3.7: sysconfdir is in Conan local cache
<!--
Please don't forget to update the issue title.
Include all applicable information to help us reproduce your problem.
-->
### Package and Environment Details (include every applicable attribute)
* Package Name/Version: **odbc/2.3.7**
### Step... | [
{
"content": "import glob\nimport os\nfrom conans import ConanFile, AutoToolsBuildEnvironment, tools\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass OdbcConan(ConanFile):\n name = \"odbc\"\n description = \"Package providing unixODBC\"\n topics = (\"odbc\", \"database\", \"dbms\", \"dat... | [
{
"content": "import glob\nimport os\nfrom conans import ConanFile, AutoToolsBuildEnvironment, tools\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass OdbcConan(ConanFile):\n name = \"odbc\"\n description = \"Package providing unixODBC\"\n topics = (\"odbc\", \"database\", \"dbms\", \"dat... | diff --git a/recipes/odbc/all/conanfile.py b/recipes/odbc/all/conanfile.py
index 60ac41833bcbf..c339dc1549be9 100644
--- a/recipes/odbc/all/conanfile.py
+++ b/recipes/odbc/all/conanfile.py
@@ -57,7 +57,8 @@ def _configure_autotools(self):
args = ["--enable-static=%s" % static_flag,
"--enable-s... |
encode__httpx-826 | Too many open files if keep changing proxy
Here is the codes:
```python
import os,httpx,asyncio
async def main():
proxies_list=[
{'all':'http://4.3.2.1:8080'},
{'all':'http://1.2.3.4:8080'},
]
for i in range(10):
proxies=proxies_list[i%2]
async with httpx.AsyncClien... | [
{
"content": "import functools\nimport typing\nfrom types import TracebackType\n\nimport hstspreload\n\nfrom ._auth import Auth, AuthTypes, BasicAuth, FunctionAuth\nfrom ._backends.base import ConcurrencyBackend\nfrom ._config import (\n DEFAULT_MAX_REDIRECTS,\n DEFAULT_POOL_LIMITS,\n DEFAULT_TIMEOUT_C... | [
{
"content": "import functools\nimport typing\nfrom types import TracebackType\n\nimport hstspreload\n\nfrom ._auth import Auth, AuthTypes, BasicAuth, FunctionAuth\nfrom ._backends.base import ConcurrencyBackend\nfrom ._config import (\n DEFAULT_MAX_REDIRECTS,\n DEFAULT_POOL_LIMITS,\n DEFAULT_TIMEOUT_C... | diff --git a/httpx/_client.py b/httpx/_client.py
index 472d455953..7401a36fff 100644
--- a/httpx/_client.py
+++ b/httpx/_client.py
@@ -862,6 +862,8 @@ def delete(
def close(self) -> None:
self.dispatch.close()
+ for proxy in self.proxies.values():
+ proxy.close()
def __enter__(s... |
fossasia__open-event-server-8547 | Attendee does not see ticket under "my tickets" if another user bought the ticket
If one user (ticket buyer) buys a ticket for another user (attendee) the order should show up for both people under "my tickets". Only one thing should not show for the "attendee" which is "Cancel Order".
The attendee should then also ... | [
{
"content": "import json\nimport logging\nimport time\n\nimport omise\nimport requests\nfrom flask import Blueprint, current_app, jsonify, redirect, request, url_for\nfrom flask_jwt_extended import current_user\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom marshmallow... | [
{
"content": "import json\nimport logging\nimport time\n\nimport omise\nimport requests\nfrom flask import Blueprint, current_app, jsonify, redirect, request, url_for\nfrom flask_jwt_extended import current_user\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom marshmallow... | diff --git a/app/api/orders.py b/app/api/orders.py
index 19d28a69ac..853a754b89 100644
--- a/app/api/orders.py
+++ b/app/api/orders.py
@@ -242,7 +242,7 @@ def query(self, view_kwargs):
user = safe_query_kwargs(User, view_kwargs, 'user_id')
if not has_access('is_user_itself', user_id=user.id):
... |
certbot__certbot-5383 | Apache SSL cipher settings are old, no ChaCha20
The Nginx plugin's `options-ssl-nginx.conf` file uses Mozilla's current intermediate SSL cipher configuration.
The Apache plugin probably did too... except it hasn't been updated since 2014: 2faacc1b43786edd5386305f9cffec376b5a5d26
Should Certbot's Apache settings b... | [
{
"content": "\"\"\"Apache plugin constants.\"\"\"\nimport pkg_resources\n\n\nMOD_SSL_CONF_DEST = \"options-ssl-apache.conf\"\n\"\"\"Name of the mod_ssl config file as saved in `IConfig.config_dir`.\"\"\"\n\n\nUPDATED_MOD_SSL_CONF_DIGEST = \".updated-options-ssl-apache-conf-digest.txt\"\n\"\"\"Name of the hash ... | [
{
"content": "\"\"\"Apache plugin constants.\"\"\"\nimport pkg_resources\n\n\nMOD_SSL_CONF_DEST = \"options-ssl-apache.conf\"\n\"\"\"Name of the mod_ssl config file as saved in `IConfig.config_dir`.\"\"\"\n\n\nUPDATED_MOD_SSL_CONF_DIGEST = \".updated-options-ssl-apache-conf-digest.txt\"\n\"\"\"Name of the hash ... | diff --git a/certbot-apache/certbot_apache/centos-options-ssl-apache.conf b/certbot-apache/certbot_apache/centos-options-ssl-apache.conf
index 17ae1be767e..56c946a4e21 100644
--- a/certbot-apache/certbot_apache/centos-options-ssl-apache.conf
+++ b/certbot-apache/certbot_apache/centos-options-ssl-apache.conf
@@ -8,7 +8,... |
searx__searx-3479 | Using single apostrophe causes a "search error"
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
**Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx**
1.1.0-27-bf0a583f
<!-- If you are running on master branch using git execute this comma... | [
{
"content": "import shlex\nimport string\n\nfrom flask_babel import gettext\n\nname = gettext(\"Search operators\")\ndescription = gettext(\"\"\"Filter results using hyphen, site: and -site:.\nPlease note that you might get less results with the additional filtering.\"\"\")\ndefault_on = False\n\n\ndef on_resu... | [
{
"content": "import shlex\nimport string\n\nfrom flask_babel import gettext\n\nname = gettext(\"Search operators\")\ndescription = gettext(\"\"\"Filter results using hyphen, site: and -site:.\nPlease note that you might get less results with the additional filtering.\"\"\")\ndefault_on = False\n\n\ndef on_resu... | diff --git a/searx/plugins/search_operators.py b/searx/plugins/search_operators.py
index 59125daf7d..3dd2da8c27 100644
--- a/searx/plugins/search_operators.py
+++ b/searx/plugins/search_operators.py
@@ -11,7 +11,11 @@
def on_result(request, search, result):
q = search.search_query.query
- qs = shlex.split(q)... |
chainer__chainer-737 | Use `numpy.uintp` for `size_t`
`numpy.intp` is `ssize_t`, and is not `size_t`. When value of `ptr` allocated by `malloc` method is larger than the maximum value of `ssize_t`, `numpy.intp(ptr)` causes an error, because it checks actual value of `ptr`.
We need to use `numpy.uintp` in this case.
Note that `numpy.uintp` i... | [
{
"content": "import numpy\nimport six\n\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\ndef _mat_ptrs(a):\n \"\"\"Creates an array of pointers to matrices\n\n Args:\n a: A batch of matrices on GPU\n Returns:\n GPU array of pointers to ma... | [
{
"content": "import numpy\nimport six\n\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\ndef _mat_ptrs(a):\n \"\"\"Creates an array of pointers to matrices\n\n Args:\n a: A batch of matrices on GPU\n Returns:\n GPU array of pointers to ma... | diff --git a/chainer/functions/math/matmul.py b/chainer/functions/math/matmul.py
index 3ca6fd7fd0b0..b89635fc7659 100644
--- a/chainer/functions/math/matmul.py
+++ b/chainer/functions/math/matmul.py
@@ -15,14 +15,14 @@ def _mat_ptrs(a):
GPU array of pointers to matrices
"""
if a.shape[0] == 1:
- ... |
bokeh__bokeh-3955 | missing bokeh entry point (otherwise bokeh.bat) for Windows
hi,
on my windows, I have a "bokeh" file instead of a "bokeh.exe".
Wouldn't it be normal to get an entry point ? something like (but I guess slightly different)
```
entry_points={
'console_scripts': [
'bokeh = bokeh.command.bootstrap... | [
{
"content": "import sys\n\nfrom bokeh.command.bootstrap import main\n\nmain(sys.argv)",
"path": "bokeh/__main__.py"
},
{
"content": "\"\"\"Setup script for Bokeh.\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2014, Continuum Analytic... | [
{
"content": "import sys\n\nfrom bokeh.command.bootstrap import main as _main\n\ndef main():\n # Main entry point (see setup.py)\n _main(sys.argv)\n\nif __name__ == \"__main__\":\n main()\n",
"path": "bokeh/__main__.py"
},
{
"content": "\"\"\"Setup script for Bokeh.\"\"\"\n\n#--------------... | diff --git a/.binstar.yml b/.binstar.yml
deleted file mode 100644
index bd96108b856..00000000000
--- a/.binstar.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-package: bokeh
-
-platform:
- - linux-64
-
-engine:
- - python=2
- - python=3
-
-before_script:
- - python -V
-
-script: |
- export c_env=/opt/anaconda/conda-bld/
- ... |
stephenmcd__mezzanine-1677 | Incorrectly saving content_model when moving a subclassed Page instance in Pages Change List
The new `set_content_models()` that is being called in a `Page`'s `save()` method is causing all subclassed `Page`s to have `content_model` set to `None`. (link to [commit](https://github.com/stephenmcd/mezzanine/commit/bede76b... | [
{
"content": "from __future__ import unicode_literals\nfrom future.builtins import str\nfrom future.utils import with_metaclass\n\nfrom json import loads\ntry:\n from urllib.request import urlopen\n from urllib.parse import urlencode\nexcept ImportError:\n from urllib import urlopen, urlencode\n\nfrom ... | [
{
"content": "from __future__ import unicode_literals\nfrom future.builtins import str\nfrom future.utils import with_metaclass\n\nfrom json import loads\ntry:\n from urllib.request import urlopen\n from urllib.parse import urlencode\nexcept ImportError:\n from urllib import urlopen, urlencode\n\nfrom ... | diff --git a/mezzanine/core/models.py b/mezzanine/core/models.py
index e6e2d18a77..b964d1e810 100644
--- a/mezzanine/core/models.py
+++ b/mezzanine/core/models.py
@@ -534,10 +534,11 @@ def set_content_model(self):
Set content_model to the child class's related name, or None if this is
the base class.
... |
numba__numba-3402 | Negative indexing unsupported in `tuple` type.
- [x] I am using the latest released version of Numba (most recent is visible in
the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
- [x] I have included below a minimal working reproducer (if you are unsure how
to write one see http://matthewrock... | [
{
"content": "\"\"\"\nImplementation of tuple objects\n\"\"\"\n\nfrom llvmlite import ir\nimport llvmlite.llvmpy.core as lc\nimport operator\n\nfrom .imputils import (lower_builtin, lower_getattr_generic, lower_cast,\n lower_constant,\n iternext_impl, impl_ret_borrowe... | [
{
"content": "\"\"\"\nImplementation of tuple objects\n\"\"\"\n\nfrom llvmlite import ir\nimport llvmlite.llvmpy.core as lc\nimport operator\n\nfrom .imputils import (lower_builtin, lower_getattr_generic, lower_cast,\n lower_constant,\n iternext_impl, impl_ret_borrowe... | diff --git a/numba/targets/tupleobj.py b/numba/targets/tupleobj.py
index b64dc782134..a30adca661e 100644
--- a/numba/targets/tupleobj.py
+++ b/numba/targets/tupleobj.py
@@ -231,6 +231,10 @@ def getitem_unituple(context, builder, sig, args):
ki = context.get_constant(types.intp, i)
bbi = builde... |
lutris__lutris-2683 | Commit 9102071 Breaks Gentoo compatibility
Using a relative path breaks Gentoo compatibility.
Due to Gentoo's ability to have multiple versions of python installed simutaneously, they do some symlink resolution magic that determines which python interpreter should be used for a package based on the constraining flag... | [
{
"content": "\"\"\"Threading module, used to launch games while monitoring them.\"\"\"\n\nimport io\nimport os\nimport sys\nimport fcntl\nimport shlex\nimport subprocess\nimport contextlib\nfrom textwrap import dedent\n\nfrom gi.repository import GLib\n\nfrom lutris import settings\nfrom lutris import runtime\... | [
{
"content": "\"\"\"Threading module, used to launch games while monitoring them.\"\"\"\n\nimport io\nimport os\nimport sys\nimport fcntl\nimport shlex\nimport subprocess\nimport contextlib\nfrom textwrap import dedent\n\nfrom gi.repository import GLib\n\nfrom lutris import settings\nfrom lutris import runtime\... | diff --git a/lutris/command.py b/lutris/command.py
index 2789b1fe0d..a75d87f32a 100644
--- a/lutris/command.py
+++ b/lutris/command.py
@@ -17,6 +17,15 @@
from lutris.util import system
WRAPPER_SCRIPT = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "../share/lutris/bin/lutris-wrapper"))... |
bridgecrewio__checkov-5679 | Terraform azurerm_windows_function_app resource - CKV_SECRET_6 false positive for active_directory_v2 setting
**Describe the issue**
When adding azure function app with identity provider active directory v2, checkov reports false positive
secret is not exposed but checkov reports :
| 0 | CKV_SECRET_6 | xxxxxxxxx... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport re\nfrom re import Pattern\nfrom typing import Any, TYPE_CHECKING, Optional\n\nfrom detect_secrets.util.filetype import FileType\nfrom detect_secrets.plugins.keyword import DENYLIST\nfrom detect_secrets.plugins.keyword import AFFIX_REGEX\nf... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport re\nfrom re import Pattern\nfrom typing import Any, TYPE_CHECKING, Optional\n\nfrom detect_secrets.util.filetype import FileType\nfrom detect_secrets.plugins.keyword import DENYLIST\nfrom detect_secrets.plugins.keyword import AFFIX_REGEX\nf... | diff --git a/checkov/secrets/plugins/detector_utils.py b/checkov/secrets/plugins/detector_utils.py
index 3ca1feb714..0c63286944 100644
--- a/checkov/secrets/plugins/detector_utils.py
+++ b/checkov/secrets/plugins/detector_utils.py
@@ -108,7 +108,13 @@
flags=re.IGNORECASE,
)
-ALLOW_LIST = ('secretsmanager', "sec... |
mkdocs__mkdocs-219 | The google_analytics config doesn't work
I try to use google analytics and I add a config in mkdocs.yml:
```
google_analytics: ['UA-xxxxxxxx-x', 'hostname']
```
However, it seems not work. So I find the config in source code and there are two places [config.py](https://github.com/tomchristie/mkdocs/blob/master/mkdocs... | [
{
"content": "# coding: utf-8\n\nfrom mkdocs import utils\nfrom mkdocs.compat import urlparse\nfrom mkdocs.exceptions import ConfigurationError\n\nimport os\nimport yaml\n\nDEFAULT_CONFIG = {\n 'site_name': None,\n 'pages': None,\n\n 'site_url': None,\n 'site_description': None,\n 'site_author': ... | [
{
"content": "# coding: utf-8\n\nfrom mkdocs import utils\nfrom mkdocs.compat import urlparse\nfrom mkdocs.exceptions import ConfigurationError\n\nimport os\nimport yaml\n\nDEFAULT_CONFIG = {\n 'site_name': None,\n 'pages': None,\n\n 'site_url': None,\n 'site_description': None,\n 'site_author': ... | diff --git a/mkdocs/build.py b/mkdocs/build.py
index a878af4112..54f1f25c43 100644
--- a/mkdocs/build.py
+++ b/mkdocs/build.py
@@ -131,7 +131,7 @@ def get_global_context(nav, config):
'include_search': config['include_search'],
'copyright': config['copyright'],
- 'google-analytics': config['g... |
LMFDB__lmfdb-5629 | Dirichlet character server error
The page https://www.lmfdb.org/Character/Dirichlet/68800/66667 is throwing a server error
| [
{
"content": "from sage.all import (gcd, Mod, Integer, Integers, Rational, pari,\n DirichletGroup, CyclotomicField, euler_phi, lcm)\nfrom sage.misc.cachefunc import cached_method\nfrom sage.modular.dirichlet import DirichletCharacter\nfrom lmfdb.logger import make_logger\nlogger = make_logg... | [
{
"content": "from sage.all import (gcd, Mod, Integer, Integers, Rational, pari,\n DirichletGroup, CyclotomicField, euler_phi, lcm)\nfrom sage.misc.cachefunc import cached_method\nfrom sage.modular.dirichlet import DirichletCharacter\nfrom lmfdb.logger import make_logger\nlogger = make_logg... | diff --git a/lmfdb/characters/TinyConrey.py b/lmfdb/characters/TinyConrey.py
index 0d8530f9af..71c241163a 100644
--- a/lmfdb/characters/TinyConrey.py
+++ b/lmfdb/characters/TinyConrey.py
@@ -213,7 +213,7 @@ def galois_orbit(self, limit=31):
elif order < limit or order * order < limit * self.modulus:
... |
pulp__pulpcore-5182 | Aioredis is no longer supported, replace the dependency with redis-py (which we are already using)
**Version**
3.16+
**Describe the bug**
pulpcore depends on aioredis, which is no longer supported, and has been subsumed by the standard redis library which we are already using in synchronous contexts
https:/... | [
{
"content": "from redis import Redis\nfrom aioredis import Redis as aRedis\n\nfrom pulpcore.app.settings import settings\n\n_conn = None\n_a_conn = None\n\n\ndef _get_connection_from_class(redis_class):\n if not settings.get(\"CACHE_ENABLED\"):\n return None\n redis_url = settings.get(\"REDIS_URL\... | [
{
"content": "from redis import Redis\nfrom redis.asyncio import Redis as aRedis\n\nfrom pulpcore.app.settings import settings\n\n_conn = None\n_a_conn = None\n\n\ndef _get_connection_from_class(redis_class):\n if not settings.get(\"CACHE_ENABLED\"):\n return None\n redis_url = settings.get(\"REDIS... | diff --git a/CHANGES/3574.misc b/CHANGES/3574.misc
new file mode 100644
index 0000000000..5265634d18
--- /dev/null
+++ b/CHANGES/3574.misc
@@ -0,0 +1 @@
+Replaced now-unmaintained aioredis dependency with the functionality built into redis-py (which we are already using).
\ No newline at end of file
diff --git a/pulpco... |
python-pillow__Pillow-6582 | EXIF prefix saved in WebP
### What did you do?
I saved 2 copies of a webp file, one with exif=exif_bytes as shown, one without, then added the exif data by piexif.insert
### What did you expect to happen?
exif data to be the same
### What actually happened?
winmerge binary comparison reveals "Exif" is qu... | [
{
"content": "from io import BytesIO\n\nfrom . import Image, ImageFile\n\ntry:\n from . import _webp\n\n SUPPORTED = True\nexcept ImportError:\n SUPPORTED = False\n\n\n_VALID_WEBP_MODES = {\"RGBX\": True, \"RGBA\": True, \"RGB\": True}\n\n_VALID_WEBP_LEGACY_MODES = {\"RGB\": True, \"RGBA\": True}\n\n_V... | [
{
"content": "from io import BytesIO\n\nfrom . import Image, ImageFile\n\ntry:\n from . import _webp\n\n SUPPORTED = True\nexcept ImportError:\n SUPPORTED = False\n\n\n_VALID_WEBP_MODES = {\"RGBX\": True, \"RGBA\": True, \"RGB\": True}\n\n_VALID_WEBP_LEGACY_MODES = {\"RGB\": True, \"RGBA\": True}\n\n_V... | diff --git a/Tests/test_file_webp_metadata.py b/Tests/test_file_webp_metadata.py
index e6d6fc63fc4..f77a245c035 100644
--- a/Tests/test_file_webp_metadata.py
+++ b/Tests/test_file_webp_metadata.py
@@ -55,9 +55,7 @@ def test_write_exif_metadata():
test_buffer.seek(0)
with Image.open(test_buffer) as webp_image:... |
dmlc__dgl-1794 | [BatchedHeteroGraph] Attributes Missing After Batching with num_workers > 1
## 🐛 Bug
When we set `num_workers` to be greater than 1 in batching DGLHeteroGraphs, attributes `_batch_size`, `_batch_num_nodes` and `_batch_num_edges` are lost.
## To Reproduce
```python
import dgl
from torch.utils.data import Dat... | [
{
"content": "\"\"\"Classes and functions for batching multiple heterographs together.\"\"\"\nfrom collections.abc import Iterable\n\nfrom . import backend as F\nfrom . import heterograph_index\nfrom .base import ALL, is_all\nfrom .frame import FrameRef, Frame\nfrom .heterograph import DGLHeteroGraph\n\n__all__... | [
{
"content": "\"\"\"Classes and functions for batching multiple heterographs together.\"\"\"\nfrom collections.abc import Iterable\n\nfrom . import backend as F\nfrom . import heterograph_index\nfrom .base import ALL, is_all\nfrom .frame import FrameRef, Frame\nfrom .heterograph import DGLHeteroGraph\n\n__all__... | diff --git a/python/dgl/batched_heterograph.py b/python/dgl/batched_heterograph.py
index d4a736f3ec6f..bad7eba1f38a 100644
--- a/python/dgl/batched_heterograph.py
+++ b/python/dgl/batched_heterograph.py
@@ -302,6 +302,14 @@ def to(self, ctx, **kwargs): # pylint: disable=invalid-name
... |
geopandas__geopandas-3328 | BUG: to_postgis method raises exception on append
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
#### Code Sample
```pyt... | [
{
"content": "import warnings\nfrom contextlib import contextmanager\n\nimport pandas as pd\n\nimport shapely\nimport shapely.wkb\n\nfrom geopandas import GeoDataFrame\n\n\n@contextmanager\ndef _get_conn(conn_or_engine):\n \"\"\"\n Yield a connection within a transaction context.\n\n Engine.begin() ret... | [
{
"content": "import warnings\nfrom contextlib import contextmanager\n\nimport pandas as pd\n\nimport shapely\nimport shapely.wkb\n\nfrom geopandas import GeoDataFrame\n\n\n@contextmanager\ndef _get_conn(conn_or_engine):\n \"\"\"\n Yield a connection within a transaction context.\n\n Engine.begin() ret... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9375b6288b..d725c97cb1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -146,6 +146,7 @@ Bug fixes:
pyogrio 0.8.1.
- Fix `to_parquet` to write correct metadata in case of 3D geometries (#2824).
- Fixes for compatibility with psycopg (#3167).
+- Fix to allow appending d... |
Lightning-AI__pytorch-lightning-1670 | test_dataloader called during check_testing_model_configuration
## 🐛 Bug
When testing a model that has been loaded using the `resume_from_checkpoint` Trainer flag (note: `.fit()` has **not** been called yet in this case), the `check_testing_model_configuration` method [calls](https://github.com/PyTorchLightning/pyt... | [
{
"content": "import inspect\nimport os\nfrom argparse import ArgumentParser\nfrom typing import Union, Optional, List, Dict, Tuple, Iterable, Any\n\nimport torch\nimport torch.distributed as torch_distrib\nimport torch.multiprocessing as mp\nfrom torch.utils.data import DataLoader\n\nfrom pytorch_lightning imp... | [
{
"content": "import inspect\nimport os\nfrom argparse import ArgumentParser\nfrom typing import Union, Optional, List, Dict, Tuple, Iterable, Any\n\nimport torch\nimport torch.distributed as torch_distrib\nimport torch.multiprocessing as mp\nfrom torch.utils.data import DataLoader\n\nfrom pytorch_lightning imp... | diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py
index aa0565d9d83a2..f34aa48832c85 100644
--- a/pytorch_lightning/trainer/trainer.py
+++ b/pytorch_lightning/trainer/trainer.py
@@ -1054,7 +1054,7 @@ def check_testing_model_configuration(self, model: LightningModule):
h... |
googleapis__python-spanner-django-152 | django-test-suite: raw_query failure due to reference `book_id` a ForeignKey field that claims a non-existent column
Coming here from
```shell
GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/appdev-soda-spanner-staging-b842e628aa41-orijtech.json
DJANGO_TEST_SUITE=raw_query ./django_test_suite.sh
```
we get a failure
`... | [
{
"content": "from django.db.backends.base.schema import BaseDatabaseSchemaEditor\n\n\nclass DatabaseSchemaEditor(BaseDatabaseSchemaEditor):\n sql_create_table = \"CREATE TABLE %(table)s (%(definition)s) PRIMARY KEY(%(primary_key)s)\"\n sql_create_unique = \"CREATE UNIQUE INDEX %(name)s ON %(table)s (%(co... | [
{
"content": "from django.db.backends.base.schema import BaseDatabaseSchemaEditor\n\n\nclass DatabaseSchemaEditor(BaseDatabaseSchemaEditor):\n sql_create_table = \"CREATE TABLE %(table)s (%(definition)s) PRIMARY KEY(%(primary_key)s)\"\n sql_create_unique = \"CREATE UNIQUE INDEX %(name)s ON %(table)s (%(co... | diff --git a/spanner/django/schema.py b/spanner/django/schema.py
index c2c35c5046..140be20340 100644
--- a/spanner/django/schema.py
+++ b/spanner/django/schema.py
@@ -63,7 +63,7 @@ def create_model(self, model):
sql = self.sql_create_table % {
"table": self.quote_name(model._meta.db_table),
... |
plotly__dash-999 | [BUG] + in version string breaks fingerprint system
**Describe your context**
- replace the result of `pip list | grep dash` below
```
dash 1.5.1
dash-core-components 1.4.0
dash-daq ... | [
{
"content": "import re\n\ncache_regex = re.compile(r\"^v[\\w-]+m[0-9a-fA-F]+$\")\n\n\ndef build_fingerprint(path, version, hash_value):\n path_parts = path.split(\"/\")\n filename, extension = path_parts[-1].split(\".\", 1)\n\n return \"{}.v{}m{}.{}\".format(\n \"/\".join(path_parts[:-1] + [fil... | [
{
"content": "import re\n\ncache_regex = re.compile(r\"^v[\\w-]+m[0-9a-fA-F]+$\")\nversion_clean = re.compile(r\"[^\\w-]\")\n\ndef build_fingerprint(path, version, hash_value):\n path_parts = path.split(\"/\")\n filename, extension = path_parts[-1].split(\".\", 1)\n\n return \"{}.v{}m{}.{}\".format(\n ... | diff --git a/@plotly/webpack-dash-dynamic-import/src/index.js b/@plotly/webpack-dash-dynamic-import/src/index.js
index b02a7edc70..6071c0a97b 100644
--- a/@plotly/webpack-dash-dynamic-import/src/index.js
+++ b/@plotly/webpack-dash-dynamic-import/src/index.js
@@ -5,7 +5,7 @@ function getFingerprint() {
const packag... |
Pyomo__pyomo-2567 | Using relational Expression in Objective
The following model is sent to a solver without any warning or error:
from pyomo.environ import *
m = ConcreteModel()
m.v = Var()
m.e = Expression(expr=m.v**2 + 2 >= 10)
m.obj = Objective(expr=m.e)
While the user should be able to construct this mod... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | diff --git a/pyomo/core/base/expression.py b/pyomo/core/base/expression.py
index 5535910f161..cc46a8be7d1 100644
--- a/pyomo/core/base/expression.py
+++ b/pyomo/core/base/expression.py
@@ -187,6 +187,11 @@ def set_value(self, expr):
self._expr = None
return
expr = as_numeric(expr)
+ ... |
OpenMined__PySyft-3256 | Fix parameter serialization
In some situations, parameters are not serialized properly. I suspect this is due to our implementation of parameter.data
Here is one example:
```python
class Net(sy.Plan):
def __init__(self):
super(Net, self).__init__()
self.fc1 = nn.Linear(1, 1)
def forwa... | [
{
"content": "import syft\nfrom syft.generic.frameworks.hook import hook_args\nfrom syft.execution.placeholder_id import PlaceholderId\nfrom syft.generic.tensor import AbstractTensor\nfrom syft.workers.abstract import AbstractWorker\nfrom syft_proto.execution.v1.placeholder_pb2 import Placeholder as Placeholder... | [
{
"content": "import syft\nfrom syft.generic.frameworks.hook import hook_args\nfrom syft.execution.placeholder_id import PlaceholderId\nfrom syft.generic.tensor import AbstractTensor\nfrom syft.workers.abstract import AbstractWorker\nfrom syft_proto.execution.v1.placeholder_pb2 import Placeholder as Placeholder... | diff --git a/syft/execution/placeholder.py b/syft/execution/placeholder.py
index 7986dc508fe..964b6e4600f 100644
--- a/syft/execution/placeholder.py
+++ b/syft/execution/placeholder.py
@@ -30,12 +30,10 @@ def instantiate(self, tensor):
Add a tensor as a child attribute. All operations on the placeholder will b... |
redis__redis-py-3115 | Add support for JSON commands in Async Cluster
It seems that the .json() ability [is supported in the Cluster client](https://github.com/redis/redis-py/pull/2032
) but not in Async Cluster client.
```python
from redis.asyncio.cluster import RedisCluster
client = RedisCluster()
await client.json().get("test")
``... | [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n AsyncIterator,\n Dict,\n Iterable,\n Iterator,\n List,\n Literal,\n Mapping,\n NoReturn,\n Optional,\n Union,\n)\n\nfrom redis.crc import key_slot\nfrom redis.exceptions import RedisClusterException,... | [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n AsyncIterator,\n Dict,\n Iterable,\n Iterator,\n List,\n Literal,\n Mapping,\n NoReturn,\n Optional,\n Union,\n)\n\nfrom redis.crc import key_slot\nfrom redis.exceptions import RedisClusterException,... | diff --git a/redis/commands/cluster.py b/redis/commands/cluster.py
index 8dd463ed18..f31b88bc4e 100644
--- a/redis/commands/cluster.py
+++ b/redis/commands/cluster.py
@@ -44,7 +44,7 @@
ScriptCommands,
)
from .helpers import list_or_args
-from .redismodules import RedisModuleCommands
+from .redismodules import As... |
interlegis__sapl-2256 | Erro Server Error (500) ao criar Frente Parlamentar
<!--- Forneça um resumo geral da _issue_ no título acima -->
## Comportamento Esperado
<!--- Se você está descrevendo um _bug_, conte-nos o que deveria acontecer. -->
<!--- Se você está sugerindo uma mudança/melhoria, conte-nos como deve funcionar. -->
Ao tent... | [
{
"content": "from datetime import timedelta\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.contenttypes.models impo... | [
{
"content": "from datetime import timedelta\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.contenttypes.models impo... | diff --git a/sapl/parlamentares/forms.py b/sapl/parlamentares/forms.py
index 94ab7b169..207bc2bc7 100644
--- a/sapl/parlamentares/forms.py
+++ b/sapl/parlamentares/forms.py
@@ -348,12 +348,12 @@ class Meta:
fields = '__all__'
def clean(self):
- frente = super(FrenteForm, self).clean()
+ su... |
netket__netket-1487 | Error in fermi-hubbard example
Hello, there.
It seems that the definition of create and annihilation operators are defined reversely in fermi-hubbard model, and results are wrong. [link](https://github.com/netket/netket/blob/26372e3527ae12861cc7953c24654614e8679d87/Examples/Fermions/fermi_hubbard.py#L25C1-L26)
| [
{
"content": "import netket as nk\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport json\n\nfrom netket import experimental as nkx\n\nL = 2 # take a 2x2 lattice\nD = 2\nt = 1 # tunneling/hopping\nU = 0.01 # coulomb\n\n# create the graph our fermions can hop on\ng = nk.graph.Hypercube(length=L, n_d... | [
{
"content": "import netket as nk\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport json\n\nfrom netket import experimental as nkx\n\nL = 2 # take a 2x2 lattice\nD = 2\nt = 1 # tunneling/hopping\nU = 0.01 # coulomb\n\n# create the graph our fermions can hop on\ng = nk.graph.Hypercube(length=L, n_d... | diff --git a/Examples/Fermions/fermi_hubbard.py b/Examples/Fermions/fermi_hubbard.py
index 4ea95daf89..632a3f0890 100644
--- a/Examples/Fermions/fermi_hubbard.py
+++ b/Examples/Fermions/fermi_hubbard.py
@@ -23,11 +23,11 @@
# we will create a helper function to abbreviate the creation, destruction and number operators
... |
iterative__dvc-951 | Testing against Python 3.6 and 3.7
https://github.com/pyinstaller/pyinstaller#main-advantages says that pyinstaller supports these versions of Python but https://github.com/iterative/dvc/blob/master/.travis.yml#L9 says the opposite.
| [
{
"content": "import os\nimport re\n\nfrom dvc.config import Config\nfrom dvc.logger import Logger\nfrom dvc.exceptions import DvcException\n\n\nSTATUS_OK = 1\nSTATUS_NEW = 3\nSTATUS_DELETED = 4\n\n\nSTATUS_MAP = {\n # (local_exists, remote_exists)\n (True, True): STATUS_OK,\n (False, False): STATUS_OK... | [
{
"content": "import os\nimport re\nimport errno\n\nfrom dvc.config import Config\nfrom dvc.logger import Logger\nfrom dvc.exceptions import DvcException\n\n\nSTATUS_OK = 1\nSTATUS_NEW = 3\nSTATUS_DELETED = 4\n\n\nSTATUS_MAP = {\n # (local_exists, remote_exists)\n (True, True): STATUS_OK,\n (False, Fal... | diff --git a/.travis.yml b/.travis.yml
index c0ecf47e4a..33de22eec3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ python:
- "2.7"
- "3.4"
- "3.5"
-# - "3.6" Not supported by pyinstaller yet
+ - "3.6"
# Travis doesn't support testing python on Mac yet, so we need
# to workaround it by installin... |
getnikola__nikola-2523 | Nikola generates invalid html5 when markdown footnote extension is used
The [default output type](http://pythonhosted.org/Markdown/reference.html#markdown) of the python markdown library is xhtml1. The 4 templates that ship with Nikola have <!DOCTYPE html> which defines them as html5, so I'm assuming that we're intendi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | diff --git a/nikola/plugins/compile/markdown/__init__.py b/nikola/plugins/compile/markdown/__init__.py
index d950bdc7a9..2e4234cf76 100644
--- a/nikola/plugins/compile/markdown/__init__.py
+++ b/nikola/plugins/compile/markdown/__init__.py
@@ -78,7 +78,7 @@ def compile_html(self, source, dest, is_two_file=True):
... |
quantumlib__Cirq-2554 | ParamResolver does not have evaluatable repr
The reason is that values can be resolved into instances of sympy.Basic. For instance, `repr(cirq.ParamResolver({'a': sympy.Symbol('b') + 1}))` evaluates to `"cirq.ParamResolver({'a': b + 1})"` where the `b` is not a defined expression.
This is currently blocking JSON ser... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq/study/resolver.py b/cirq/study/resolver.py
index c3f2c7b5319..95c750543da 100644
--- a/cirq/study/resolver.py
+++ b/cirq/study/resolver.py
@@ -16,6 +16,7 @@
from typing import Dict, Union, TYPE_CHECKING, cast
import sympy
+from cirq._compat import proper_repr
from cirq._doc import document
if ... |
Cog-Creators__Red-DiscordBot-3689 | [Streams] YouTube Alert Suggestion/Option
Since this alert is very bland and link to the livestream is already used in the preview, why not have the bot just post the link to the stream instead of the bot's own preview. Then you get a large image (like Twitch or just posting a video) which is better visually, plus a lo... | [
{
"content": "import json\nimport logging\nfrom random import choice\nfrom string import ascii_letters\nimport xml.etree.ElementTree as ET\nfrom typing import ClassVar, Optional, List\n\nimport aiohttp\nimport discord\n\nfrom .errors import (\n APIError,\n OfflineStream,\n InvalidTwitchCredentials,\n ... | [
{
"content": "import json\nimport logging\nfrom random import choice\nfrom string import ascii_letters\nimport xml.etree.ElementTree as ET\nfrom typing import ClassVar, Optional, List\n\nimport aiohttp\nimport discord\n\nfrom .errors import (\n APIError,\n OfflineStream,\n InvalidTwitchCredentials,\n ... | diff --git a/redbot/cogs/streams/streamtypes.py b/redbot/cogs/streams/streamtypes.py
index da5b0a48118..0d0d591c165 100644
--- a/redbot/cogs/streams/streamtypes.py
+++ b/redbot/cogs/streams/streamtypes.py
@@ -153,7 +153,7 @@ def make_embed(self, data):
vid_data = data["items"][0]
video_url = "https://... |
borgbackup__borg-1237 | 1.0.x LoggedIO.write_commit should do a double-fsync commit
We do this already in master, and 1.0.x should do it as well.
``` py
def write_commit(self):
fd = self.get_write_fd(no_new=True)
header = self.header_no_crc_fmt.pack(self.header_fmt.size, TAG_COMMIT)
crc = self.crc_fmt.pack(crc32(h... | [
{
"content": "from configparser import ConfigParser\nfrom binascii import hexlify, unhexlify\nfrom datetime import datetime\nfrom itertools import islice\nimport errno\nimport logging\nlogger = logging.getLogger(__name__)\n\nimport os\nimport shutil\nimport struct\nfrom zlib import crc32\n\nimport msgpack\nfrom... | [
{
"content": "from configparser import ConfigParser\nfrom binascii import hexlify, unhexlify\nfrom datetime import datetime\nfrom itertools import islice\nimport errno\nimport logging\nlogger = logging.getLogger(__name__)\n\nimport os\nimport shutil\nimport struct\nfrom zlib import crc32\n\nimport msgpack\nfrom... | diff --git a/borg/repository.py b/borg/repository.py
index 239fd19650..67e4b1f271 100644
--- a/borg/repository.py
+++ b/borg/repository.py
@@ -727,8 +727,11 @@ def write_commit(self):
fd = self.get_write_fd(no_new=True)
header = self.header_no_crc_fmt.pack(self.header_fmt.size, TAG_COMMIT)
cr... |
HypothesisWorks__hypothesis-1754 | st.integers(min_value=0, max_value=1e100) almost only returns large numbers
```
hypothesis.__version__
Out[70]: '3.66.0'
a = [st.integers(min_value=0, max_value=1e100).example() for x in range(999)]
len([x for x in a if x >= 1e97])
Out[72]: 997
len([x for x in a if x < 1e97])
Out[73]: 2
len([x for x in a if x <... | [
{
"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2019 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full li... | [
{
"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2019 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full li... | diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst
new file mode 100644
index 0000000000..fe5a28b9c9
--- /dev/null
+++ b/hypothesis-python/RELEASE.rst
@@ -0,0 +1,6 @@
+RELEASE_TYPE: patch
+
+This patch fixes :issue:`1387`, where bounded :func:`~hypothesis.strategies.integers`
+with a very large ... |
statsmodels__statsmodels-5945 | Reference for OLSInfluence Cook's distance
Could you please provide a more detailed reference for this formula? I'm assuming the Eubank is Randall L. Eubank, but can't figure out what book/paper this is from.
https://github.com/statsmodels/statsmodels/blob/7634b409c2d65d9f9fcd77d0d3a047136c8d2dfe/statsmodels/stats/o... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Influence and Outlier Measures\n\nCreated on Sun Jan 29 11:16:09 2012\n\nAuthor: Josef Perktold\nLicense: BSD-3\n\"\"\"\nfrom collections import defaultdict\n\nimport numpy as np\n\nfrom statsmodels.compat.python import lzip\nfrom statsmodels.graphics._regressionplot... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Influence and Outlier Measures\n\nCreated on Sun Jan 29 11:16:09 2012\n\nAuthor: Josef Perktold\nLicense: BSD-3\n\"\"\"\nfrom collections import defaultdict\n\nimport numpy as np\n\nfrom statsmodels.compat.python import lzip\nfrom statsmodels.graphics._regressionplot... | diff --git a/statsmodels/stats/outliers_influence.py b/statsmodels/stats/outliers_influence.py
index 088cc0361cf..31b2aa83253 100644
--- a/statsmodels/stats/outliers_influence.py
+++ b/statsmodels/stats/outliers_influence.py
@@ -697,10 +697,17 @@ def get_resid_studentized_external(self, sigma=None):
# same computa... |
napari__napari-2787 | Uninstallation feedback
## 🐛 Bug
#### Description
I was surprised that "Removing" a plugin from napari uninstalled it from my environment.
#### Steps/Code to Reproduce
* Start napari
* open "Plugins" > "Install/Uninstall Packages"
* find ome-zarr under "Installed Plugins"
* click on "remove"
#### E... | [
{
"content": "import os\nimport sys\nfrom pathlib import Path\nfrom typing import Sequence\n\nfrom napari_plugin_engine.dist import standard_metadata\nfrom napari_plugin_engine.exceptions import PluginError\nfrom qtpy.QtCore import QEvent, QProcess, QProcessEnvironment, QSize, Qt, Slot\nfrom qtpy.QtGui import Q... | [
{
"content": "import os\nimport sys\nfrom pathlib import Path\nfrom typing import Sequence\n\nfrom napari_plugin_engine.dist import standard_metadata\nfrom napari_plugin_engine.exceptions import PluginError\nfrom qtpy.QtCore import QEvent, QProcess, QProcessEnvironment, QSize, Qt, Slot\nfrom qtpy.QtGui import Q... | diff --git a/napari/_qt/dialogs/qt_plugin_dialog.py b/napari/_qt/dialogs/qt_plugin_dialog.py
index a352d0f43ac..2d0725a1b7e 100644
--- a/napari/_qt/dialogs/qt_plugin_dialog.py
+++ b/napari/_qt/dialogs/qt_plugin_dialog.py
@@ -121,7 +121,7 @@ def __init__(
self.package_name.setText(f"{package_name} {version}... |
nvaccess__nvda-9726 | Tests/Python 3: update unittest syntax
Hi,
In order to test this, one must be using threshold_py3_staging branch.
### Steps to reproduce:
1. Checkout latest threshold_py3_staging work.
2. Perform scons tests.
### Actual behavior:
Errors related to syntax in unittest test cases are thrown.
### Expected be... | [
{
"content": "#util.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#Copyright (C) 2017 NV Access Limited\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n\r\n\"\"\"Utilities used withing the extension points framework. Generally it is expected that t... | [
{
"content": "#util.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#Copyright (C) 2017 NV Access Limited\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n\r\n\"\"\"Utilities used withing the extension points framework. Generally it is expected that t... | diff --git a/source/extensionPoints/util.py b/source/extensionPoints/util.py
index b3bfda11287..c07f180d3c4 100644
--- a/source/extensionPoints/util.py
+++ b/source/extensionPoints/util.py
@@ -82,6 +82,7 @@ def register(self, handler):
However, the callable must be kept alive by your code otherwise it will be de-reg... |
google-deepmind__dm-haiku-540 | Constant folding on `hk.avg_pool` with `padding='SAME'` on large arrays
Hi, lately my model has increased its compilation time due to constant folding and I discovered that the issue comes from using `padding='SAME'` in `hk.avg_pool`.
I tried to create a dummy code to showcase the issue (at the bottom), but the main... | [
{
"content": "# Copyright 2019 DeepMind Technologies Limited. 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/LICEN... | [
{
"content": "# Copyright 2019 DeepMind Technologies Limited. 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/LICEN... | diff --git a/haiku/_src/pool.py b/haiku/_src/pool.py
index ffcd8b820..b9a19fb2d 100644
--- a/haiku/_src/pool.py
+++ b/haiku/_src/pool.py
@@ -140,9 +140,9 @@ def avg_pool(
else:
# Count the number of valid entries at each input point, then use that for
# computing average. Assumes that any two arrays of sam... |
Cog-Creators__Red-DiscordBot-1221 | [V3 Context] Handle DMs properly during send_interactive
(*forwarded from @palmtree5*)
### Type:
- Bug
### Brief description of the problem
When a user in DM types `more` during a case of `ctx.send_interactive` (for example, a long response to `[p]debug`), an error occurs.
### Expected behavior
When a use... | [
{
"content": "\"\"\"\nThe purpose of this module is to allow for Red to further customise the command\ninvocation context provided by discord.py.\n\"\"\"\nimport asyncio\nfrom typing import Iterable, List\n\nimport discord\nfrom discord.ext import commands\n\nfrom redbot.core.utils.chat_formatting import box\n\... | [
{
"content": "\"\"\"\nThe purpose of this module is to allow for Red to further customise the command\ninvocation context provided by discord.py.\n\"\"\"\nimport asyncio\nfrom typing import Iterable, List\n\nimport discord\nfrom discord.ext import commands\n\nfrom redbot.core.utils.chat_formatting import box\n\... | diff --git a/redbot/core/context.py b/redbot/core/context.py
index d702c8b8861..026f998a41c 100644
--- a/redbot/core/context.py
+++ b/redbot/core/context.py
@@ -118,8 +118,9 @@ async def send_interactive(self,
else:
try:
await self.channel.delete_messages((... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.