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 ⌀ |
|---|---|---|---|---|
pypa__pipenv-1041 | Pipenv cannot create virtualenv
When I try to create a new env using `pipenv --two` or `pipenv --three`, pipenv enters an infinite loop repeatedly printing
```
Virtualenv already exists!
Removing existing virtualenv…
```
If I try `pipenv install`, pipenv tries to install the packages to `/usr/lib/python3.6` ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt... | diff --git a/pipenv/project.py b/pipenv/project.py
index 027da5422d..a2c7c59315 100644
--- a/pipenv/project.py
+++ b/pipenv/project.py
@@ -103,7 +103,7 @@ def requirements_exists(self):
@property
def virtualenv_exists(self):
# TODO: Decouple project from existence of Pipfile.
- if self.pipfile... |
google__timesketch-1775 | Change default search operator (OR --> AND)
The default search operator for string queries is OR. This is somewhat unintuitive, as the defactor standard for search is to have AND as default operator.
| [
{
"content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/timesketch/lib/datastores/elastic.py b/timesketch/lib/datastores/elastic.py
index 1f61505cb4..d035506f7c 100644
--- a/timesketch/lib/datastores/elastic.py
+++ b/timesketch/lib/datastores/elastic.py
@@ -338,7 +338,10 @@ def build_query(self, sketch_id, query_string, query_filter, query_dsl=None,
... |
spotify__luigi-1447 | Scheduler only hosts on unix socket when run in the background
Support for hosting the central scheduler on a unix socket was added, which is nice, but the scheduler ignores the `--unix-socket` argument from the command line when `--background` is not also supplied.
This will work properly, and the scheduler will li... | [
{
"content": "import os\nimport argparse\nimport logging\nimport sys\n\nfrom luigi.retcodes import run_with_retcodes\n\n\ndef luigi_run(argv=sys.argv[1:]):\n run_with_retcodes(argv)\n\n\ndef luigid(argv=sys.argv[1:]):\n import luigi.server\n import luigi.process\n import luigi.configuration\n par... | [
{
"content": "import os\nimport argparse\nimport logging\nimport sys\n\nfrom luigi.retcodes import run_with_retcodes\n\n\ndef luigi_run(argv=sys.argv[1:]):\n run_with_retcodes(argv)\n\n\ndef luigid(argv=sys.argv[1:]):\n import luigi.server\n import luigi.process\n import luigi.configuration\n par... | diff --git a/luigi/cmdline.py b/luigi/cmdline.py
index 2184c06895..898c70cbcd 100644
--- a/luigi/cmdline.py
+++ b/luigi/cmdline.py
@@ -41,4 +41,4 @@ def luigid(argv=sys.argv[1:]):
filename=os.path.join(opts.logdir, "luigi-server.log"))
else:
logging.basicConfig(lev... |
psychopy__psychopy-4447 | Pavlovia online experiment only recording final audio trial
It looks like the boilerplate might need tweaking to better support multiple audio clips, [forum thread →](https://discourse.psychopy.org/t/26265)
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\n# Author: Jeremy R. Gray, 2012\nfrom pathlib import Path\n\nf... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\n# Author: Jeremy R. Gray, 2012\nfrom pathlib import Path\n\nf... | diff --git a/psychopy/experiment/components/microphone/__init__.py b/psychopy/experiment/components/microphone/__init__.py
index f485197a27..78dce37040 100644
--- a/psychopy/experiment/components/microphone/__init__.py
+++ b/psychopy/experiment/components/microphone/__init__.py
@@ -422,7 +422,7 @@ def writeRoutineEndCo... |
urllib3__urllib3-1033 | Unexpected HostChangedError due to downcasing of hostname
On version 1.19
```urllib3.exceptions.HostChangedError``` is thrown when a pool is created for a host with uppercase letters, and then a request is made with url containing this hostname.
```python
from urllib3 import HTTPConnectionPool
pool = HTTPConnec... | [
{
"content": "from __future__ import absolute_import\nimport errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\n\nfrom .exceptions import (\n ClosedPoolError,\n ProtocolError,\n EmptyPoolError,\n HeaderParsingErro... | [
{
"content": "from __future__ import absolute_import\nimport errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\n\nfrom .exceptions import (\n ClosedPoolError,\n ProtocolError,\n EmptyPoolError,\n HeaderParsingErro... | diff --git a/test/test_connectionpool.py b/test/test_connectionpool.py
index 2fab0c6b21..caf36f7f55 100644
--- a/test/test_connectionpool.py
+++ b/test/test_connectionpool.py
@@ -275,6 +275,11 @@ def test_contextmanager(self):
self.assertRaises(ClosedPoolError, pool._get_conn)
self.assertRaises(Empty,... |
readthedocs__readthedocs.org-5450 | BackendUnavailable while building the documentation
## Details
* Read the Docs project URL: https://readthedocs.org/projects/burp-ui
* Build URL (if applicable): https://readthedocs.org/projects/burp-ui/builds/8509365/
* Read the Docs username (if applicable): ziirish
## Expected Result
The documentation use... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"An abstraction over virtualenv and Conda environments.\"\"\"\n\nimport copy\nimport itertools\nimport json\nimport logging\nimport os\nimport shutil\n\nfrom django.conf import settings\n\nfrom readthedocs.config import PIP, SETUPTOOLS\nfrom readthedocs.config.model... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"An abstraction over virtualenv and Conda environments.\"\"\"\n\nimport copy\nimport itertools\nimport json\nimport logging\nimport os\nimport shutil\n\nfrom django.conf import settings\n\nfrom readthedocs.config import PIP, SETUPTOOLS\nfrom readthedocs.config.model... | diff --git a/readthedocs/doc_builder/python_environments.py b/readthedocs/doc_builder/python_environments.py
index 6a9bc8ca144..a7017a94476 100644
--- a/readthedocs/doc_builder/python_environments.py
+++ b/readthedocs/doc_builder/python_environments.py
@@ -284,7 +284,7 @@ def install_core_requirements(self):
... |
mozilla__bugbug-476 | defect_enhancement_task Taskcluster task is missing the artifact
From the task () logs:
```
[taskcluster 2019-05-21 08:37:51.436Z] === Task Finished ===
[taskcluster 2019-05-21 08:37:51.519Z] Artifact "public/defectenhancementtaskmodel.xz" not found at "/defectenhancementtaskmodel.xz"
[taskcluster 2019-05-21 08:37:... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport argparse\nimport lzma\nimport os\nimport shutil\nfrom logging import INFO, basicConfig, getLogger\nfrom urllib.request import urlretrieve\n\nfrom bugbug.models import get_model_class\n\nbasicConfig(level=INFO)\nlogger = getLogger(__name__)\n\nBASE_URL = \"https://... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport argparse\nimport lzma\nimport os\nimport shutil\nfrom logging import INFO, basicConfig, getLogger\nfrom urllib.request import urlretrieve\n\nfrom bugbug.models import get_model_class\n\nbasicConfig(level=INFO)\nlogger = getLogger(__name__)\n\nBASE_URL = \"https://... | diff --git a/infra/dockerfile.train_defectenhancementtask b/infra/dockerfile.train_defectenhancementtask
index c6cc7b3bf6..8a641f26ec 100644
--- a/infra/dockerfile.train_defectenhancementtask
+++ b/infra/dockerfile.train_defectenhancementtask
@@ -1,3 +1,3 @@
FROM mozilla/bugbug-base:latest
-CMD bugbug-train defect
+... |
cowrie__cowrie-1002 | ftpget on python2
```
File "/home/cowrie/cowrie/src/cowrie/commands/ftpget.py", line 200, in ftp_download
ftp = FTP(source_address=out_addr)
File "/home/cowrie/cowrie/src/cowrie/commands/ftpget.py", line 24, in __init__
super(FTP, self).__init__(*args, **kwargs)
... | [
{
"content": "# -*- coding: utf-8 -*-\n# Author: Claud Xiao\n\nfrom __future__ import absolute_import, division\n\nimport ftplib\nimport getopt\nimport os\nimport socket\n\nfrom twisted.python import log\n\nfrom cowrie.core.artifact import Artifact\nfrom cowrie.core.config import CONFIG\nfrom cowrie.shell.comma... | [
{
"content": "# -*- coding: utf-8 -*-\n# Author: Claud Xiao\n\nfrom __future__ import absolute_import, division\n\nimport ftplib\nimport getopt\nimport os\nimport socket\n\nfrom twisted.python import log\n\nfrom cowrie.core.artifact import Artifact\nfrom cowrie.core.config import CONFIG\nfrom cowrie.shell.comma... | diff --git a/src/cowrie/commands/ftpget.py b/src/cowrie/commands/ftpget.py
index d25fb02c9f..8061ed3cff 100644
--- a/src/cowrie/commands/ftpget.py
+++ b/src/cowrie/commands/ftpget.py
@@ -21,7 +21,7 @@ class FTP(ftplib.FTP):
def __init__(self, *args, **kwargs):
self.source_address = kwargs.pop("source_ad... |
nilearn__nilearn-1949 | line_width param in view_connectome has no effect
The parameter `line_width` in `html_connectome.view_connectome()` is not associated with any functionality.
Should we remove it or is there a reason for it to be there?
| [
{
"content": "import functools\nimport json\nimport warnings\n\nimport numpy as np\nfrom scipy import sparse\n\nfrom nilearn._utils import replace_parameters\nfrom .. import datasets\nfrom . import cm\n\nfrom .js_plotting_utils import (add_js_lib, HTMLDocument, mesh_to_plotly,\n e... | [
{
"content": "import functools\nimport json\nimport warnings\n\nimport numpy as np\nfrom scipy import sparse\nfrom .. import datasets\nfrom . import cm\n\nfrom .js_plotting_utils import (add_js_lib, HTMLDocument, mesh_to_plotly,\n encode, colorscale, get_html_template,\n ... | diff --git a/nilearn/plotting/html_connectome.py b/nilearn/plotting/html_connectome.py
index d81c92b058..eb08d9149b 100644
--- a/nilearn/plotting/html_connectome.py
+++ b/nilearn/plotting/html_connectome.py
@@ -159,6 +159,7 @@ def view_connectome(adjacency_matrix, node_coords, edge_threshold=None,
connectome_info ... |
ivy-llc__ivy-15754 | copysign
| [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
index 58a340ed1d605..c5777f8061984 100644
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -1188,6 +1188,10 @@ def logdet(self):
return 2 * torch_frontend.sum(
... |
fidals__shopelectro-665 | 500 ошибка в админке
https://www.shopelectro.ru/admin/shopelectro/productpage/?has_category=no
| [
{
"content": "import logging\nimport typing\nfrom collections import defaultdict\nfrom copy import deepcopy\nfrom functools import reduce\nfrom itertools import chain\nfrom typing import Dict, Iterator, List\nfrom xml.etree.ElementTree import Element\n\nfrom django.conf import settings\nfrom django.contrib.auth... | [
{
"content": "import logging\nimport typing\nfrom collections import defaultdict\nfrom copy import deepcopy\nfrom functools import reduce\nfrom itertools import chain\nfrom typing import Dict, Iterator, List\nfrom xml.etree.ElementTree import Element\n\nfrom django.conf import settings\nfrom django.contrib.auth... | diff --git a/.coafile b/.coafile
index 47c09a69..c50842e1 100644
--- a/.coafile
+++ b/.coafile
@@ -1,7 +1,10 @@
# https://github.com/coala/bear-docs/blob/master/README.rst#python
[all]
-bears = InvalidLinkBear,SpaceConsistencyBear
+# @todo #665:30m Resurrect InvalidLinkBear.
+# Now it failed on CI.
+# https://ci.... |
pypa__setuptools-2800 | Please restore --owner= and --group= options to setuptools' sdist command
Tar archives record the Unix ownership (user and group) of each file they contain. This can cause undesirable variation between source tarballs generated from the same VCS checkout but in different build environments, so `distutils.command.sdist... | [
{
"content": "from distutils import log\nimport distutils.command.sdist as orig\nimport os\nimport sys\nimport io\nimport contextlib\n\nfrom .py36compat import sdist_add_defaults\n\nimport pkg_resources\n\n_default_revctrl = list\n\n\ndef walk_revctrl(dirname=''):\n \"\"\"Find all files under revision contro... | [
{
"content": "from distutils import log\nimport distutils.command.sdist as orig\nimport os\nimport sys\nimport io\nimport contextlib\n\nfrom .py36compat import sdist_add_defaults\n\nimport pkg_resources\n\n_default_revctrl = list\n\n\ndef walk_revctrl(dirname=''):\n \"\"\"Find all files under revision contro... | diff --git a/changelog.d/2800.change.rst b/changelog.d/2800.change.rst
new file mode 100644
index 0000000000..cbb201e70a
--- /dev/null
+++ b/changelog.d/2800.change.rst
@@ -0,0 +1,3 @@
+Added ``--owner`` and ``--group`` options to the ``sdist`` command,
+for specifying file ownership within the produced tarball (simila... |
zestedesavoir__zds-site-4960 | Insertion du smiley >_<
On obtient `>_<`
Solution 1 : Modifier le code ici : https://github.com/zestedesavoir/zds-site/blob/4ae0431bbf199e318dd6f2b1301ac7b6adc40198/assets/js/editor.js#L132 Vérifier qu'il n'y a pas un bug/fail avec ">" et "<".
Solution 2 : On peut ajouter l'alias `X/` pour ce smiley et rem... | [
{
"content": "import os\nfrom django.conf import settings\n\nSMILEYS_BASE_PATH = os.path.join(settings.BASE_DIR, 'dist/smileys')\nLICENSES_BASE_PATH = os.path.join(settings.BASE_DIR, 'dist/licenses')\nSMILEYS_BASE_URL = os.path.join(settings.STATIC_URL, 'smileys')\n\nSMILEYS_BASE = {\n 'smile.png': (':)', ':... | [
{
"content": "import os\nfrom django.conf import settings\n\nSMILEYS_BASE_PATH = os.path.join(settings.BASE_DIR, 'dist/smileys')\nLICENSES_BASE_PATH = os.path.join(settings.BASE_DIR, 'dist/licenses')\nSMILEYS_BASE_URL = os.path.join(settings.STATIC_URL, 'smileys')\n\nSMILEYS_BASE = {\n 'smile.png': (':)', ':... | diff --git a/assets/js/editor.js b/assets/js/editor.js
index cdd878144c..054b2a7bb6 100644
--- a/assets/js/editor.js
+++ b/assets/js/editor.js
@@ -129,7 +129,7 @@
},
2: {
smiley_ni: { title: ":ninja:", start: ":ninja:", end: "", image: "/static/smileys/ninja.gif" },
- ... |
HypothesisWorks__hypothesis-1951 | Support `slice` in `st.from_type()`
The `slice` builtin is actually a type - so it would be nice to support it in `st.from_type()`.
This would involve adding it to the mapping in `hypothesis.searchstrategy.types`, as `slice: builds(slice, none() | integers(), none() | integers(), none() | integers())`, and adding a ... | [
{
"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/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 82185ed54b..f1a59c3613 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -207,6 +207,7 @@ their individual contributions.
* `Derek Gustafson <https://www.github.com/degustaf>`_
* `Dion Misic <https://www.github.com/kingdion>`_ (dion.misic@gmail.com)
* `Edu... |
pypa__pip-4450 | --force-reinstall assumes default git branch is 'master'
* Pip version: 9.0.1 (reproduced on 8.0.2)
* Python version: 3.5 (reproduced on 2.7.11)
* Operating system: OS X (reproduced on Ubuntu)
* Git version: 2.11.0 (Apple Git-81) (reproduced on 1.9.1 non-Apple)
### Description:
**Installing from git via a re... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport os.path\n\nfrom pip._vendor.packaging.version import parse as parse_version\nfrom pip._vendor.six.moves.urllib import parse as urllib_parse\nfrom pip._vendor.six.moves.urllib import request as urllib_request\n\nfrom pip._internal.com... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport os.path\n\nfrom pip._vendor.packaging.version import parse as parse_version\nfrom pip._vendor.six.moves.urllib import parse as urllib_parse\nfrom pip._vendor.six.moves.urllib import request as urllib_request\n\nfrom pip._internal.com... | diff --git a/news/4448.bugfix b/news/4448.bugfix
new file mode 100644
index 00000000000..28088dd6301
--- /dev/null
+++ b/news/4448.bugfix
@@ -0,0 +1,2 @@
+Reinstalling an editable package from Git no longer assumes that the ``master``
+branch exists.
diff --git a/src/pip/_internal/vcs/git.py b/src/pip/_internal/vcs/git... |
ESMCI__cime-812 | Write NOC test using SystemTestsCompareTwo infrastructure
We want to convert the various system tests that compare two runs to use the SystemTestsCompareTwo infrastructure, where possible. I am opening separate issues for each such system test, so that we can check them off as we do this conversion.
Currently it looks... | [
{
"content": "\"\"\"\nCIME NOC? test This class inherits from SystemTestsCommon\n\"\"\"\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.SystemTests.system_tests_common import SystemTestsCommon\n\nlogger = logging.getLogger(__name__)\n\nclass NOC(SystemTestsCommon):\n\n def __init__(self, case):\n ... | [
{
"content": null,
"path": "utils/python/CIME/SystemTests/noc.py"
}
] | diff --git a/cime_config/config_tests.xml b/cime_config/config_tests.xml
index dad5e6e2eb7..45934489b7e 100644
--- a/cime_config/config_tests.xml
+++ b/cime_config/config_tests.xml
@@ -415,12 +415,6 @@ LII CLM initial condition interpolation test
<DOUT_S>FALSE</DOUT_S>
</test>
- <test NAME="NOC">
- <DE... |
scikit-image__scikit-image-3280 | label2rgb index error when using average and background color
When using averaged label2rgb with bg_label the out image indexing fails with error:
```
Traceback (most recent call last):
File "file.py", line 222, in generate
overlay = color.label2rgb(domain, image=img, bg_label=0, bg_color=1.0, kind="avg")
... | [
{
"content": "import itertools\n\nimport numpy as np\n\nfrom .._shared.utils import warn\nfrom ..util import img_as_float\nfrom . import rgb_colors\nfrom .colorconv import rgb2gray, gray2rgb\n\n\n__all__ = ['color_dict', 'label2rgb', 'DEFAULT_COLORS']\n\n\nDEFAULT_COLORS = ('red', 'blue', 'yellow', 'magenta', '... | [
{
"content": "import itertools\n\nimport numpy as np\n\nfrom .._shared.utils import warn\nfrom ..util import img_as_float\nfrom . import rgb_colors\nfrom .colorconv import rgb2gray, gray2rgb\n\n\n__all__ = ['color_dict', 'label2rgb', 'DEFAULT_COLORS']\n\n\nDEFAULT_COLORS = ('red', 'blue', 'yellow', 'magenta', '... | diff --git a/skimage/color/colorlabel.py b/skimage/color/colorlabel.py
index 667aecec197..9e37bde2d93 100644
--- a/skimage/color/colorlabel.py
+++ b/skimage/color/colorlabel.py
@@ -219,7 +219,8 @@ def _label2rgb_avg(label_field, image, bg_label=0, bg_color=(0, 0, 0)):
bg = (labels == bg_label)
if bg.any():
... |
jazzband__django-axes-385 | Django 2.1 LTS support
At the moment Django 2.1 tests don't work. As it is the LTS version it would be very valuable to investigate why the tests fail against the admin views and how they could be fixed.
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nimport codecs\nfrom setuptools import setup, find_packages\n\nfrom axes import get_version\n\nsetup(\n name='django-axes',\n version=get_version(),\n description='Keep track of failed login attemp... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nimport codecs\nfrom setuptools import setup, find_packages\n\nfrom axes import get_version\n\nsetup(\n name='django-axes',\n version=get_version(),\n description='Keep track of failed login attemp... | diff --git a/axes/tests/test_access_attempt.py b/axes/tests/test_access_attempt.py
index 84a01733..5cdcc44a 100644
--- a/axes/tests/test_access_attempt.py
+++ b/axes/tests/test_access_attempt.py
@@ -89,7 +89,7 @@ def test_failure_limit_once(self):
for _ in range(1, settings.AXES_FAILURE_LIMIT):
re... |
PaddlePaddle__PaddleSeg-134 | 评估时模型路径不存在直接报load op的错
| [
{
"content": "# coding: utf8\n# copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\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/licen... | [
{
"content": "# coding: utf8\n# copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\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/licen... | diff --git a/pdseg/eval.py b/pdseg/eval.py
index 54ff853c82..b842431fb8 100644
--- a/pdseg/eval.py
+++ b/pdseg/eval.py
@@ -111,6 +111,9 @@ def data_generator():
ckpt_dir = cfg.TEST.TEST_MODEL if not ckpt_dir else ckpt_dir
+ if not os.path.exists(ckpt_dir):
+ raise ValueError('The TEST.TEST_MODEL {} i... |
python-pillow__Pillow-7791 | Showing an image opens a console
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/question... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# im.show() drivers\n#\n# History:\n# 2008-04-06 fl Created\n#\n# Copyright (c) Secret Labs AB 2008.\n#\n# See the README file for information on usage and redistribution.\n#\nfrom __future__ import annotations\n\nimport abc\nimport os\nimport shutil\... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# im.show() drivers\n#\n# History:\n# 2008-04-06 fl Created\n#\n# Copyright (c) Secret Labs AB 2008.\n#\n# See the README file for information on usage and redistribution.\n#\nfrom __future__ import annotations\n\nimport abc\nimport os\nimport shutil\... | diff --git a/src/PIL/ImageShow.py b/src/PIL/ImageShow.py
index c03122c11aa..4a801e5b0fb 100644
--- a/src/PIL/ImageShow.py
+++ b/src/PIL/ImageShow.py
@@ -138,6 +138,17 @@ def get_command(self, file: str, **options: Any) -> str:
f'&& del /f "{file}"'
)
+ def show_file(self, path: str, **options... |
jazzband__pip-tools-314 | pip-compile looses `via` with pip 8
```
$ echo jinja2 > req
$ pip-compile --version
pip-compile, version 1.5
$ pip --version
pip 7.1.2 from <snip>lib/python2.7/site-packages (python 2.7)
pip-compile req
#
# This file is autogenerated by pip-compile
# Make changes in req, then run this to update:
#
# pip-compile req... | [
{
"content": "import os\nfrom os.path import basename\n\nfrom ._compat import ExitStack\nfrom .click import unstyle\nfrom .io import AtomicSaver\nfrom .logging import log\nfrom .utils import comment, format_requirement\n\n\nclass OutputWriter(object):\n def __init__(self, src_file, dst_file, dry_run, emit_he... | [
{
"content": "import os\nfrom os.path import basename\n\nfrom ._compat import ExitStack\nfrom .click import unstyle\nfrom .io import AtomicSaver\nfrom .logging import log\nfrom .utils import comment, format_requirement\n\n\nclass OutputWriter(object):\n def __init__(self, src_file, dst_file, dry_run, emit_he... | diff --git a/piptools/writer.py b/piptools/writer.py
index 1d6cbc2fd..8b2b38abf 100644
--- a/piptools/writer.py
+++ b/piptools/writer.py
@@ -95,7 +95,7 @@ def _format_requirement(self, ireq, reverse_dependencies, primary_packages, incl
return line
# Annotate what packages this package is require... |
privacyidea__privacyidea-1533 | Update ldap3 dependency
The dependency for ldap3 should be updated to 2.6.
It fixes the bug with the failing objectGUID.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nimport os\nimport stat\nimport sys\n\n#VERSION=\"2.1dev4\"\nVERSION=\"3.0dev3\"\n\n# Taken from kennethreitz/requests/setup.py\npackage_directory = os.path.realpath(os.path.dirname(__file__))\n\n\ndef get_file_contents(file_path... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nimport os\nimport stat\nimport sys\n\n#VERSION=\"2.1dev4\"\nVERSION=\"3.0dev3\"\n\n# Taken from kennethreitz/requests/setup.py\npackage_directory = os.path.realpath(os.path.dirname(__file__))\n\n\ndef get_file_contents(file_path... | diff --git a/requirements.txt b/requirements.txt
index f96c1e4d01..f463e16c29 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -27,7 +27,7 @@ imagesize==1.0.0
ipaddress==1.0.22
itsdangerous==0.24
Jinja2==2.10
-ldap3==2.5
+ldap3==2.6
lxml==4.2.1
Mako==1.0.7
MarkupSafe==1.0
diff --git a/setup.py b/setup.py
i... |
interactions-py__interactions.py-444 | [BUG] Leftover debug prints in synchronize()
**Describe the bug**
Starting the bot always print out the internal list of commands. This is presumably prints used during debugging that should have been removed or changed to proper logging. These lists can be very long if there are many registered commands with many p... | [
{
"content": "import sys\nfrom asyncio import get_event_loop\nfrom importlib import import_module\nfrom importlib.util import resolve_name\nfrom logging import Logger, getLogger\nfrom typing import Any, Callable, Coroutine, Dict, List, Optional, Union\n\nfrom interactions.api.dispatch import Listener\nfrom inte... | [
{
"content": "import sys\nfrom asyncio import get_event_loop\nfrom importlib import import_module\nfrom importlib.util import resolve_name\nfrom logging import Logger, getLogger\nfrom typing import Any, Callable, Coroutine, Dict, List, Optional, Union\n\nfrom interactions.api.dispatch import Listener\nfrom inte... | diff --git a/interactions/client.py b/interactions/client.py
index 043f9f0c8..fbfbffcec 100644
--- a/interactions/client.py
+++ b/interactions/client.py
@@ -269,8 +269,8 @@ async def create(data: ApplicationCommand) -> None:
command.get("name") for command in cached_commands if command.get("name")
... |
ytdl-org__youtube-dl-12512 | [senate.gov] Support request for senate.gov website
## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x])
- Use *Preview* tab to s... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\nfrom .common import InfoExtractor\nfrom ..utils import (\n ExtractorError,\n unsmuggle_url,\n)\nfrom ..compat import (\n compat_parse_qs,\n compat_urlparse,\n)\n\n\nclass SenateISVPIE(InfoExtractor):\n _COMM_MAP ... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\nfrom .common import InfoExtractor\nfrom ..utils import (\n ExtractorError,\n unsmuggle_url,\n)\nfrom ..compat import (\n compat_parse_qs,\n compat_urlparse,\n)\n\n\nclass SenateISVPIE(InfoExtractor):\n _COMM_MAP ... | diff --git a/youtube_dl/extractor/senateisvp.py b/youtube_dl/extractor/senateisvp.py
index 387a4f7f695..db5ef8b57bb 100644
--- a/youtube_dl/extractor/senateisvp.py
+++ b/youtube_dl/extractor/senateisvp.py
@@ -89,7 +89,7 @@ class SenateISVPIE(InfoExtractor):
@staticmethod
def _search_iframe_url(webpage):
... |
gratipay__gratipay.com-3040 | show total ever given
Suggested [via Twitter](https://twitter.com/tripflex/status/532597015210131456):
> is there no way for me to see the total I have donated? I know I can see it weekly, but what about overall total?
| [
{
"content": "def iter_payday_events(db, participant):\n \"\"\"Yields payday events for the given participant.\n \"\"\"\n username = participant.username\n exchanges = db.all(\"\"\"\n SELECT *\n FROM exchanges\n WHERE participant=%s\n \"\"\", (username,), back_as=dict)\n ... | [
{
"content": "def iter_payday_events(db, participant):\n \"\"\"Yields payday events for the given participant.\n \"\"\"\n username = participant.username\n exchanges = db.all(\"\"\"\n SELECT *\n FROM exchanges\n WHERE participant=%s\n \"\"\", (username,), back_as=dict)\n ... | diff --git a/branch.sql b/branch.sql
new file mode 100644
index 0000000000..1b9ceee18d
--- /dev/null
+++ b/branch.sql
@@ -0,0 +1,8 @@
+BEGIN;
+
+DROP INDEX transfers_tipper_tippee_timestamp_idx;
+CREATE INDEX transfers_timestamp_idx ON transfers (timestamp);
+CREATE INDEX transfers_tipper_idx ON transfers (tipper);
+CR... |
nvaccess__nvda-9866 | threshold_py3_staging: Say all isn't working in controls using DisplayModelEditableText
### Steps to reproduce:
1. Focus an edit box using DisplayModelEditableText (I was using Becky! Internet Mail as an example).
2. Press NVDA+down arrow to start say all.
### Actual behavior:
The first line is spoken, say all stop... | [
{
"content": "#displayModel.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2006-2017 NV Access Limited, Babbage B.V.\r\n\r\nfrom ctypes import *\r\nfrom ctypes.wintypes import RECT\r\nfrom ... | [
{
"content": "#displayModel.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2006-2017 NV Access Limited, Babbage B.V.\r\n\r\nfrom ctypes import *\r\nfrom ctypes.wintypes import RECT\r\nfrom ... | diff --git a/source/displayModel.py b/source/displayModel.py
index 68c5764976e..7a32b0b3c6c 100644
--- a/source/displayModel.py
+++ b/source/displayModel.py
@@ -575,7 +575,7 @@ def _setCaretOffset(self,offset):
if offset>=len(rects):
raise RuntimeError("offset %d out of range")
rect = rects[offset]
- x = ... |
pyro-ppl__pyro-3131 | Memory leak using TraceEnum_ELBO
I noticed a major memory leak when training SVI using `TraceEnum_ELBO`.
I initially noticed this in a custom model we are developing but then I found it seems a more general bug.
For example, it affects even the Pyro tutorials GMM example [here](https://pyro.ai/examples/gmm.html). W... | [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport torch\n\nfrom pyro.ops.einsum.util import Tensordot\nfrom pyro.ops.special import safe_log\n\n\ndef transpose(a, axes):\n return a.permute(axes)\n\n\ndef einsum(equation, *operands):\n \"\"\"\n... | [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport torch\n\nfrom pyro.ops.einsum.util import Tensordot\nfrom pyro.ops.special import safe_log\n\n\ndef transpose(a, axes):\n return a.permute(axes)\n\n\ndef einsum(equation, *operands):\n \"\"\"\n... | diff --git a/pyro/ops/einsum/torch_log.py b/pyro/ops/einsum/torch_log.py
index 01ff601433..0b0da1ecb9 100644
--- a/pyro/ops/einsum/torch_log.py
+++ b/pyro/ops/einsum/torch_log.py
@@ -23,7 +23,10 @@ def einsum(equation, *operands):
inputs, output = equation.split("->")
if inputs == output:
- return op... |
iterative__dvc-6688 | http: allow reading proxies from the current environment
This was something enabled as default by the requests, but not on aiohttp. We have to explicitly enable it to keep the current behavior. https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support. Discord context: https://discord.com/channels/485586884... | [
{
"content": "import threading\n\nfrom funcy import cached_property, memoize, wrap_with\n\nfrom dvc import prompt\nfrom dvc.path_info import HTTPURLInfo\nfrom dvc.scheme import Schemes\n\nfrom .fsspec_wrapper import FSSpecWrapper, NoDirectoriesMixin\n\n\n@wrap_with(threading.Lock())\n@memoize\ndef ask_password(... | [
{
"content": "import threading\n\nfrom funcy import cached_property, memoize, wrap_with\n\nfrom dvc import prompt\nfrom dvc.path_info import HTTPURLInfo\nfrom dvc.scheme import Schemes\n\nfrom .fsspec_wrapper import FSSpecWrapper, NoDirectoriesMixin\n\n\n@wrap_with(threading.Lock())\n@memoize\ndef ask_password(... | diff --git a/dvc/fs/http.py b/dvc/fs/http.py
index 0f533bcf0f..ccfe4b326b 100644
--- a/dvc/fs/http.py
+++ b/dvc/fs/http.py
@@ -87,6 +87,9 @@ def _prepare_credentials(self, **config):
ssl=make_context(config["ssl_verify"])
)
+ # Allow reading proxy configurations from the e... |
Rapptz__discord.py-4016 | Reading or saving PartialEmoji from message reaction fails
### Summary
Message reactions' emojis may be PartialEmoji if the bot is not in the guild the emoji belongs to. In this case, `await reaction.emoji.url.read()` or `await reaction.emoji.url.save("foo.png")` fails.
### Reproduction Steps
1. Fetch a message wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin... | diff --git a/discord/state.py b/discord/state.py
index 046b548d7165..8ad6c01e617f 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -992,7 +992,7 @@ def get_reaction_emoji(self, data):
try:
return self._emojis[emoji_id]
except KeyError:
- return PartialEmoji(animated=data... |
netket__netket-211 | Get rid of netket::Qubits class
`netket::Qubits` is really just a `CustomHilbert` with `localstates = {0.0, 1.0}`. No need for code duplication.
| [
{
"content": "from ._C_netket.hilbert import *\n",
"path": "netket/hilbert.py"
}
] | [
{
"content": "from ._C_netket.hilbert import *\n\n\ndef Qubit(graph):\n \"\"\"\n Constructs a new ``Qubit`` given a graph.\n\n Args:\n graph: Graph representation of sites.\n\n Examples:\n Simple qubit hilbert space.\n\n ```python\n >>> from netket.graph import Hypercube\... | diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3e7168f77..2e13776db7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,7 +216,7 @@ add_library(netket MODULE Sources/pynetket.cc Sources/Dynamics/py_dynamics.cpp
Sources/Graph/hypercube.cc Sources/Graph/lattice.cc
Sources/Graph/custom_graph.cc Source... |
saleor__saleor-2791 | menuCreateItem input issue
Why `menuCreateItem` does not require `menu` argument on the schema level, but returns an error if not given? It doesn't look right.
Besides, do we really need to specify `menu` argument, if `parent` is given? It's not like child could be pinned to different menu than its parent.
| [
{
"content": "import graphene\nfrom graphql_jwt.decorators import permission_required\n\nfrom ...menu import models\nfrom ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation\nfrom ..product.types import Category, Collection\nfrom ..page.types import Page\nfrom .types import Menu\n\n\nclass ... | [
{
"content": "import graphene\nfrom graphql_jwt.decorators import permission_required\n\nfrom ...menu import models\nfrom ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation\nfrom ..product.types import Category, Collection\nfrom ..page.types import Page\nfrom .types import Menu\n\n\nclass ... | diff --git a/saleor/graphql/menu/mutations.py b/saleor/graphql/menu/mutations.py
index 7f58e2d4d8c..8d6a9d04671 100644
--- a/saleor/graphql/menu/mutations.py
+++ b/saleor/graphql/menu/mutations.py
@@ -21,7 +21,8 @@ class MenuItemInput(graphene.InputObjectType):
class MenuItemCreateInput(MenuItemInput):
menu = g... |
cocotb__cocotb-562 | VHDL/Questa: Failed to execute callback
When trying the examples (e.g. `examples/dff/tests`) in VHDL mode with Questa as simulator by calling
`make SIM=questa TOPLEVEL_LANG=vhdl`, the test is executed, but finishes with an error:
~~~~
# Loading std.standard
# Loading std.textio(body)
# Loading ieee.std_logic_1164(... | [
{
"content": "#!/usr/bin/env python\n\n''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * R... | [
{
"content": "#!/usr/bin/env python\n\n''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * R... | diff --git a/cocotb/scheduler.py b/cocotb/scheduler.py
index 43c39e24b3..101476889e 100644
--- a/cocotb/scheduler.py
+++ b/cocotb/scheduler.py
@@ -542,7 +542,7 @@ def cleanup(self):
Unprime all pending triggers and kill off any coroutines
"""
- for trigger, waiting in self._trigger2coros.item... |
pytorch__vision-2793 | The ASPP layer has a hard-coded value that only works if the atrous_rates param is of length 3
## 🐛 Bug
The ASPP layer has a hard-coded value that only works if the list of atrous rates provided is of length 3. The hard-coded value in question is the `5` on line 83 here:
https://github.com/pytorch/vision/blob/mast... | [
{
"content": "import torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom ._utils import _SimpleSegmentationModel\n\n\n__all__ = [\"DeepLabV3\"]\n\n\nclass DeepLabV3(_SimpleSegmentationModel):\n \"\"\"\n Implements DeepLabV3 model from\n `\"Rethinking Atrous Convolution for Semanti... | [
{
"content": "import torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom ._utils import _SimpleSegmentationModel\n\n\n__all__ = [\"DeepLabV3\"]\n\n\nclass DeepLabV3(_SimpleSegmentationModel):\n \"\"\"\n Implements DeepLabV3 model from\n `\"Rethinking Atrous Convolution for Semanti... | diff --git a/torchvision/models/segmentation/deeplabv3.py b/torchvision/models/segmentation/deeplabv3.py
index ee5c0c7fe64..3624170a235 100644
--- a/torchvision/models/segmentation/deeplabv3.py
+++ b/torchvision/models/segmentation/deeplabv3.py
@@ -80,7 +80,7 @@ def __init__(self, in_channels, atrous_rates, out_channel... |
quantumlib__Cirq-4319 | JSON backwards compatibility has been flushed
https://github.com/quantumlib/Cirq/pull/4099 cleared some deprecated classes. Serialized files have a much longer lifespan than code. It was always the intent to keep much longer-term backwards compatibility for data files, especially experimental results which likely have ... | [
{
"content": "# Copyright 2020 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 2020 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq-core/cirq/json_resolver_cache.py b/cirq-core/cirq/json_resolver_cache.py
index 33a6848ed65..88b721cf361 100644
--- a/cirq-core/cirq/json_resolver_cache.py
+++ b/cirq-core/cirq/json_resolver_cache.py
@@ -128,6 +128,7 @@ def two_qubit_matrix_gate(matrix):
'SwapPowGate': cirq.SwapPowGate,
... |
wagtail__wagtail-10248 | Adopt `w-status` BEM classes in shared Status template tag
### Is your proposal related to a problem?
As a follow up from #9721 & #8656 & 10129 adopt BEM classes for the status template tag now that most classes are in one place.
<img width="865" alt="Status tag examples" src="https://user-images.githubuserconten... | [
{
"content": "import json\nfrom datetime import datetime\nfrom urllib.parse import urljoin\nfrom warnings import warn\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.admin.utils import quote\nfrom django.contrib.humanize.templatetags.humanize import intcomma, naturaltime\nf... | [
{
"content": "import json\nfrom datetime import datetime\nfrom urllib.parse import urljoin\nfrom warnings import warn\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.admin.utils import quote\nfrom django.contrib.humanize.templatetags.humanize import intcomma, naturaltime\nf... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 3518202fbdef..ee6942f9ea93 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -93,6 +93,7 @@ Changelog
* Maintenance: Remove unused snippets delete-multiple view (Sage Abdullah)
* Maintenance: Improve performance of determining live page URLs across the admin interfac... |
wemake-services__wemake-python-styleguide-786 | False positive for `WPS345 Found meaningless number operation`
# Bug report
<!--
Hi, thanks for submitting a bug. We appreciate that.
But, we will need some information about what's wrong to help you.
-->
## What's wrong
False positive for `1 / some`:
```
13:12 WPS345 Found meaningless number ope... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport ast\nfrom typing import ClassVar, Mapping, Optional, Tuple, Type\n\nfrom typing_extensions import final\n\nfrom wemake_python_styleguide.logic import walk\nfrom wemake_python_styleguide.logic.operators import (\n count_unary_operator,\n unwrap_unary_node,\n)... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport ast\nfrom typing import ClassVar, Mapping, Optional, Tuple, Type\n\nfrom typing_extensions import final\n\nfrom wemake_python_styleguide.logic import walk\nfrom wemake_python_styleguide.logic.operators import (\n count_unary_operator,\n unwrap_unary_node,\n)... | diff --git a/tests/test_visitors/test_ast/test_operators/test_useless_math.py b/tests/test_visitors/test_ast/test_operators/test_useless_math.py
index 822b08ab2..5235fdfe2 100644
--- a/tests/test_visitors/test_ast/test_operators/test_useless_math.py
+++ b/tests/test_visitors/test_ast/test_operators/test_useless_math.py... |
geopandas__geopandas-1694 | BUG: plotting MultiPoints with values-based coloring not working correctly
Example from the tests:
```
from shapely.affinity import rotate
from shapely.geometry import Point, MultiPoint
N = 10
points = GeoSeries(Point(i, i) for i in range(N))
multipoint1 = MultiPoint(points)
multipoint2 = rotate(multipoint1,... | [
{
"content": "import warnings\n\nimport numpy as np\nimport pandas as pd\n\nimport geopandas\n\nfrom distutils.version import LooseVersion\n\n\ndef deprecated(new):\n \"\"\"Helper to provide deprecation warning.\"\"\"\n\n def old(*args, **kwargs):\n warnings.warn(\n \"{} is intended for ... | [
{
"content": "import warnings\n\nimport numpy as np\nimport pandas as pd\n\nimport geopandas\n\nfrom distutils.version import LooseVersion\n\n\ndef deprecated(new):\n \"\"\"Helper to provide deprecation warning.\"\"\"\n\n def old(*args, **kwargs):\n warnings.warn(\n \"{} is intended for ... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index ddf6d2e756..c1765695c3 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -281,8 +281,7 @@ def _plot_point_collection(
raise ValueError("Can only specify one of 'values' and 'color' kwargs")
geoms, multiindex = _flatten_mult... |
yt-project__yt-2067 | Density projections use the wrong smoothing lengths with particle filters
### Bug report
**Bug summary**
Off-axis density projections use the wrong smoothing lengths when a particle filter is applied.
**Code for reproduction**
```python
import yt
import numpy as np
import matplotlib
matplotlib.use("Agg"... | [
{
"content": "\"\"\"\nVolume rendering\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2014, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this s... | [
{
"content": "\"\"\"\nVolume rendering\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2014, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this s... | diff --git a/yt/visualization/volume_rendering/off_axis_projection.py b/yt/visualization/volume_rendering/off_axis_projection.py
index 1965f742336..17763673930 100644
--- a/yt/visualization/volume_rendering/off_axis_projection.py
+++ b/yt/visualization/volume_rendering/off_axis_projection.py
@@ -144,6 +144,8 @@ def off... |
deis__deis-3056 | Remove scheduler timeouts / Taking too long to pull a run container fails with 'failed to create container'
Debugging Deis on Azure led us to initially suspect an Azure-specific issue, but we have seen this on other platforms. Any time a `deis run` takes longer than 60 seconds to complete the `docker pull`, the client ... | [
{
"content": "import cStringIO\nimport base64\nimport copy\nimport json\nimport httplib\nimport paramiko\nimport socket\nimport re\nimport time\nfrom django.conf import settings\n\n\nMATCH = re.compile(\n '(?P<app>[a-z0-9-]+)_?(?P<version>v[0-9]+)?\\.?(?P<c_type>[a-z-_]+)?.(?P<c_num>[0-9]+)')\nRETRIES = 3\n\... | [
{
"content": "import cStringIO\nimport base64\nimport copy\nimport json\nimport httplib\nimport paramiko\nimport socket\nimport re\nimport time\nfrom django.conf import settings\n\n\nMATCH = re.compile(\n '(?P<app>[a-z0-9-]+)_?(?P<version>v[0-9]+)?\\.?(?P<c_type>[a-z-_]+)?.(?P<c_num>[0-9]+)')\nRETRIES = 3\n\... | diff --git a/controller/scheduler/fleet.py b/controller/scheduler/fleet.py
index dfcfd26c4e..180ca137f6 100644
--- a/controller/scheduler/fleet.py
+++ b/controller/scheduler/fleet.py
@@ -257,7 +257,8 @@ def _do_ssh(cmd):
return rc, output
# wait for container to launch
- for _ in range(60... |
statsmodels__statsmodels-680 | Test Baxter King band-pass filter fails with scipy 0.12 beta1
current git head 1b12824f53b1 and 0.4.3, python2.7 tested on ubuntu 13.04 amd64, haven't tried scipy 0.11 but it the test seems to work with the 0.10.1 package
```
======================================================================
ERROR: Test Baxter Kin... | [
{
"content": "import numpy as np\nfrom scipy.signal import fftconvolve\n\ndef bkfilter(X, low=6, high=32, K=12):\n \"\"\"\n Baxter-King bandpass filter\n\n Parameters\n ----------\n X : array-like\n A 1 or 2d ndarray. If 2d, variables are assumed to be in columns.\n low : float\n ... | [
{
"content": "import numpy as np\nfrom scipy.signal import fftconvolve\n\ndef bkfilter(X, low=6, high=32, K=12):\n \"\"\"\n Baxter-King bandpass filter\n\n Parameters\n ----------\n X : array-like\n A 1 or 2d ndarray. If 2d, variables are assumed to be in columns.\n low : float\n ... | diff --git a/statsmodels/tsa/filters/bk_filter.py b/statsmodels/tsa/filters/bk_filter.py
index bd1595bba65..d08b6710bbe 100644
--- a/statsmodels/tsa/filters/bk_filter.py
+++ b/statsmodels/tsa/filters/bk_filter.py
@@ -69,5 +69,5 @@ def bkfilter(X, low=6, high=32, K=12):
bweights -= bweights.mean() # make sure weigh... |
ESMCI__cime-1778 | scripts_regression_tests smoke test error
On the new master on Hobart (919aee366a64d9e169ffc9755107bd8f9568d943)
` /scratch/cluster/goldy/scripts_regression_test.20170731_182937/SMS_D_Ln9.f19_g16_rx1.A.hobart_intel.fake_testing_only_20170731_190827/TestStatus.log`
```
Invalid PIO rearranger comm max pend req (comp2... | [
{
"content": "\"\"\"\nInterface to the env_batch.xml file. This class inherits from EnvBase\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import format_time\nfrom CIME.XML.env_base import EnvBase\nfrom CIME.utils import transform_vars, get_cime_root, convert_to_seconds\n\nfrom copy i... | [
{
"content": "\"\"\"\nInterface to the env_batch.xml file. This class inherits from EnvBase\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import format_time\nfrom CIME.XML.env_base import EnvBase\nfrom CIME.utils import transform_vars, get_cime_root, convert_to_seconds\n\nfrom copy i... | diff --git a/scripts/Tools/case.qstatus b/scripts/Tools/case.qstatus
index 9c8ccc745eb..9d64209e14e 100755
--- a/scripts/Tools/case.qstatus
+++ b/scripts/Tools/case.qstatus
@@ -7,9 +7,6 @@ Show the batch status of all jobs associated with this case.
from standard_script_setup import *
from CIME.case impo... |
bridgecrewio__checkov-5045 | Update CKV_AZURE_43 `each.`
**Describe the issue**
CKV_AZURE_43 StorageAccountName.py VARIABLE_REFS list does not include the `each.` used with for_each meta argument to return UNKNOWN and currently returns FAILED check which is incorrect.
**Examples**
```
module "bootstrap" {
source = "../../modules/bootstr... | [
{
"content": "import re\nfrom typing import List, Dict, Any\n\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\nfrom checkov.common.models.enums import CheckResult, CheckCategories\n\nSTO_NAME_REGEX = re.compile(r\"^[a-z0-9]{3,24}$\")\nVARIABLE_REFS = (\"local.\", \"module.\"... | [
{
"content": "import re\nfrom typing import List, Dict, Any\n\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\nfrom checkov.common.models.enums import CheckResult, CheckCategories\n\nSTO_NAME_REGEX = re.compile(r\"^[a-z0-9]{3,24}$\")\nVARIABLE_REFS = (\"local.\", \"module.\"... | diff --git a/checkov/terraform/checks/resource/azure/StorageAccountName.py b/checkov/terraform/checks/resource/azure/StorageAccountName.py
index f64bf43bf9..a58e41d1a0 100644
--- a/checkov/terraform/checks/resource/azure/StorageAccountName.py
+++ b/checkov/terraform/checks/resource/azure/StorageAccountName.py
@@ -6,7 +... |
buildbot__buildbot-5301 | Cache-control header is filled incorrectly
When a cache-control header is formed a ';' character is used as a delimiter:
https://github.com/buildbot/buildbot/blob/144eb7e82dc261e6506f1f68493446bcb24d77a0/master/buildbot/www/config.py#L120
This is not allowed by [RFC 7234](https://tools.ietf.org/html/rfc7234). The... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/newsfragments/cache_control.bugfix b/master/buildbot/newsfragments/cache_control.bugfix
new file mode 100644
index 000000000000..719ab89c412e
--- /dev/null
+++ b/master/buildbot/newsfragments/cache_control.bugfix
@@ -0,0 +1 @@
+Fix Cache-control header to be compliant with RFC 7234 (:issue:... |
getredash__redash-3563 | Issues with Query Based Dropdown when the value is numeric
When the values the query returns for the dropdown are numeric, we have two issues:
1. We don’t load the correct value because the value from the URL passed as string, while the actual value is a number.
2. We don’t load results at all, because they fail pa... | [
{
"content": "import pystache\nfrom functools import partial\nfrom flask_login import current_user\nfrom numbers import Number\nfrom redash.utils import mustache_render, json_loads\nfrom redash.permissions import require_access, view_only\nfrom funcy import distinct\nfrom dateutil.parser import parse\n\n\ndef _... | [
{
"content": "import pystache\nfrom functools import partial\nfrom flask_login import current_user\nfrom numbers import Number\nfrom redash.utils import mustache_render, json_loads\nfrom redash.permissions import require_access, view_only\nfrom funcy import distinct\nfrom dateutil.parser import parse\n\n\ndef _... | diff --git a/client/app/components/QueryBasedParameterInput.jsx b/client/app/components/QueryBasedParameterInput.jsx
index b0743d6198..668cacab6e 100644
--- a/client/app/components/QueryBasedParameterInput.jsx
+++ b/client/app/components/QueryBasedParameterInput.jsx
@@ -66,7 +66,7 @@ export class QueryBasedParameterInp... |
holoviz__holoviews-3875 | Decimate not updating/resampling
I experienced a problem using the holoviews decimate function: When zooming into a large set of datapoints, the resampling of the decimated points is only done, when the total number points in the displayed area is below the decimate sample threshold. This means, on a distinct zoom leve... | [
{
"content": "\"\"\"\nCollection of either extremely generic or simple Operation\nexamples.\n\"\"\"\nfrom __future__ import division\n\nimport numpy as np\n\nimport param\nfrom param import _is_number\n\nfrom ..core import (Operation, NdOverlay, Overlay, GridMatrix,\n HoloMap, Dataset, Elemen... | [
{
"content": "\"\"\"\nCollection of either extremely generic or simple Operation\nexamples.\n\"\"\"\nfrom __future__ import division\n\nimport numpy as np\n\nimport param\nfrom param import _is_number\n\nfrom ..core import (Operation, NdOverlay, Overlay, GridMatrix,\n HoloMap, Dataset, Elemen... | diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py
index 4d5e49672a..f13427beb4 100644
--- a/holoviews/operation/element.py
+++ b/holoviews/operation/element.py
@@ -709,7 +709,7 @@ def _process_layer(self, element, key=None):
if len(sliced) > self.p.max_samples:
prng = ... |
pytorch__text-254 | Use getattr rather than __dict__ in Batch (adds support for __slots__ in Example subclasses)
This is a proposal to change [one line of code](https://github.com/pytorch/text/blob/c839a7934930819be7e240ea972e4d600966afdc/torchtext/data/batch.py#L27) in Batch.py
I suggest `[x.__dict__[name] for x in data]` should becom... | [
{
"content": "from torch import typename\nfrom torch.tensor import _TensorBase\n\n\nclass Batch(object):\n \"\"\"Defines a batch of examples along with its Fields.\n\n Attributes:\n batch_size: Number of examples in the batch.\n dataset: A reference to the dataset object the examples come fr... | [
{
"content": "from torch import typename\nfrom torch.tensor import _TensorBase\n\n\nclass Batch(object):\n \"\"\"Defines a batch of examples along with its Fields.\n\n Attributes:\n batch_size: Number of examples in the batch.\n dataset: A reference to the dataset object the examples come fr... | diff --git a/torchtext/data/batch.py b/torchtext/data/batch.py
index 41ac950272..a87ac51a0a 100644
--- a/torchtext/data/batch.py
+++ b/torchtext/data/batch.py
@@ -24,7 +24,7 @@ def __init__(self, data=None, dataset=None, device=None, train=True):
for (name, field) in dataset.fields.items():
... |
borgbackup__borg-7251 | test_size_on_disk_accurate on 1.2.3 breaks when run on ZFS
<!--
Thank you for reporting an issue.
*IMPORTANT* - *before* creating a new issue please look around:
- Borgbackup documentation: http://borgbackup.readthedocs.io/en/stable/index.html
- FAQ: https://borgbackup.readthedocs.io/en/stable/faq.html
and
... | [
{
"content": "# Note: these tests are part of the self test, do not use or import pytest functionality here.\n# See borg.selftest for details. If you add/remove test methods, update SELFTEST_COUNT\n\nimport base64\nimport hashlib\nimport io\nimport os\nimport tempfile\nimport zlib\n\nfrom ..hashindex impo... | [
{
"content": "# Note: these tests are part of the self test, do not use or import pytest functionality here.\n# See borg.selftest for details. If you add/remove test methods, update SELFTEST_COUNT\n\nimport base64\nimport hashlib\nimport io\nimport os\nimport tempfile\nimport zlib\n\nfrom ..hashindex impo... | diff --git a/src/borg/testsuite/hashindex.py b/src/borg/testsuite/hashindex.py
index d5b6149ce5..ce285bcd3e 100644
--- a/src/borg/testsuite/hashindex.py
+++ b/src/borg/testsuite/hashindex.py
@@ -258,9 +258,9 @@ def test_size_on_disk_accurate(self):
idx = ChunkIndex()
for i in range(1234):
... |
deis__deis-450 | `deis releases:info --version=X` always returns latest version
We seem to be ignoring the version flag. Need to fix this in the viewset class.
| [
{
"content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nimport json\n\nfrom Crypto.PublicKey import RSA\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models import Us... | [
{
"content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nimport json\n\nfrom Crypto.PublicKey import RSA\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models import Us... | diff --git a/api/tests/test_release.py b/api/tests/test_release.py
index 74b3e38a2a..9bcaf8b7da 100644
--- a/api/tests/test_release.py
+++ b/api/tests/test_release.py
@@ -120,6 +120,14 @@ def test_release(self):
self.assertIn('PATH', config3_values)
self.assertEqual(
config3_values['PATH'... |
liqd__a4-opin-1966 | DTS - Do this. Do that.
**URL:** https://opin-stage.liqd.net/de/blueprints/liquid-democracy-ev/
**user:** *initiator*
**expected behaviour:** *An explaining help text in english. Do this: Start a discussion and moderate it. Do that: Participants can upload documents to deepen the exchange and share information.*
**... | [
{
"content": "from collections import namedtuple\nfrom enum import Enum, unique\n\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.polls import phases as poll_phases\nfrom euth.communitydebate import phases as communitydebate_phases\nfrom euth.documents import phases as documents_phas... | [
{
"content": "from collections import namedtuple\nfrom enum import Enum, unique\n\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.polls import phases as poll_phases\nfrom euth.communitydebate import phases as communitydebate_phases\nfrom euth.documents import phases as documents_phas... | diff --git a/euth/blueprints/blueprints.py b/euth/blueprints/blueprints.py
index cbecd0518..a8e272f89 100644
--- a/euth/blueprints/blueprints.py
+++ b/euth/blueprints/blueprints.py
@@ -74,8 +74,9 @@ class Aim(Enum):
communitydebate = (
'communitydebate',
_('Find and debate topics and questions.')... |
StackStorm__st2-3998 | Reverse workflow failed in Stackstorm
Hi there,
I've created a reverse workflow in stackstorm and get error as below:
"error": "Invalid task name [wf_spec=ReverseWorkflowSpec {'input': ['test1', 'test2'], 'tasks': {'testa': {'action': 'st2.action', 'input': {'ref': 'core.noop'}, 'version': '2.0', 'type': 'rever... | [
{
"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li... | [
{
"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li... | diff --git a/contrib/examples/actions/mistral-reverse-basic.yaml b/contrib/examples/actions/mistral-reverse-basic.yaml
new file mode 100644
index 0000000000..f1f8fec3f8
--- /dev/null
+++ b/contrib/examples/actions/mistral-reverse-basic.yaml
@@ -0,0 +1,18 @@
+---
+description: Run a local linux command
+enabled: true
+r... |
networkx__networkx-1862 | Current-flow betweenness for directed graphs Exception ?
Hi guys
Did networkx provides algorithms for calculating the node (or edge) current-flow betweenness for _**directed graphs**_?
I have try to call the function `edge_current_flow_betweenness_centrality`, but it raises a Exception saying "not working for direct... | [
{
"content": "\"\"\"\nCurrent-flow betweenness centrality measures.\n\"\"\"\n# Copyright (C) 2010-2012 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\nimport random\nimport networkx as nx\nfrom ... | [
{
"content": "\"\"\"\nCurrent-flow betweenness centrality measures.\n\"\"\"\n# Copyright (C) 2010-2012 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\nimport random\nimport networkx as nx\nfrom ... | diff --git a/networkx/algorithms/centrality/current_flow_betweenness.py b/networkx/algorithms/centrality/current_flow_betweenness.py
index 82ae1336b7c..a653f5428c4 100644
--- a/networkx/algorithms/centrality/current_flow_betweenness.py
+++ b/networkx/algorithms/centrality/current_flow_betweenness.py
@@ -283,6 +283,13 @... |
celery__celery-4403 | Possible DST issue?
I just noticed a crontab task setup to run at 12:00 today for some reason ran at at
both 11:00 and then again at 12:00. I've checked the server date and time and it does seem to have made the switch to winter time last night so i'm not sure if this was a fluke or really related to the DST but i don... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities related to dates, times, intervals, and timezones.\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport numbers\nimport os\nimport random\nimport sys\nimport time as _time\nfrom calendar import monthrange\nfrom datetime ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities related to dates, times, intervals, and timezones.\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport numbers\nimport os\nimport random\nimport sys\nimport time as _time\nfrom calendar import monthrange\nfrom datetime ... | diff --git a/celery/utils/time.py b/celery/utils/time.py
index 3db0a166e7a..f664604d9d2 100644
--- a/celery/utils/time.py
+++ b/celery/utils/time.py
@@ -209,6 +209,9 @@ def remaining(start, ends_in, now=None, relative=False):
~datetime.timedelta: Remaining time.
"""
now = now or datetime.utcnow()
+ ... |
localstack__localstack-332 | Regression: S3 error when attempting to delete using C# Amazon S3 SDK
This regression was only introduced recently... perhaps related to 5507eea779ed6400763cfbfc9f320533f9f6bac4?
When attempting to delete files using the AWS C# S3 SDK, the following error is logged to the console:
```
2017-09-11T04:24:30:ERROR:loc... | [
{
"content": "import re\nimport logging\nimport json\nimport uuid\nimport xmltodict\nimport cgi\nimport email.parser\nimport collections\nimport six\nfrom six import iteritems\nfrom six.moves.urllib import parse as urlparse\nfrom requests.models import Response, Request\nfrom localstack.constants import DEFAULT... | [
{
"content": "import re\nimport logging\nimport json\nimport uuid\nimport xmltodict\nimport cgi\nimport email.parser\nimport collections\nimport six\nfrom six import iteritems\nfrom six.moves.urllib import parse as urlparse\nfrom requests.models import Response, Request\nfrom localstack.constants import DEFAULT... | diff --git a/localstack/services/s3/s3_listener.py b/localstack/services/s3/s3_listener.py
index c7734b4424d89..0e9ebe9334da1 100644
--- a/localstack/services/s3/s3_listener.py
+++ b/localstack/services/s3/s3_listener.py
@@ -258,6 +258,10 @@ def expand_multipart_filename(data, headers):
http://docs.aws.amazon.... |
pyqtgraph__pyqtgraph-1249 | Remove ScatterPlotItem's SpotItems during addItem call
After addItem is called and a new data array is constructed, any previously created SpotItems will have obsolete references to the old data array. This clears these SpotItems so that new ones can be created with up-to-date array references.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom itertools import starmap, repeat\ntry:\n from itertools import imap\nexcept ImportError:\n imap = map\nimport numpy as np\nimport weakref\nfrom ..Qt import QtGui, QtCore, QT_LIB\nfrom ..Point import Point\nfrom .. import functions as fn\nfrom .GraphicsItem impor... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom itertools import starmap, repeat\ntry:\n from itertools import imap\nexcept ImportError:\n imap = map\nimport numpy as np\nimport weakref\nfrom ..Qt import QtGui, QtCore, QT_LIB\nfrom ..Point import Point\nfrom .. import functions as fn\nfrom .GraphicsItem impor... | diff --git a/pyqtgraph/graphicsItems/ScatterPlotItem.py b/pyqtgraph/graphicsItems/ScatterPlotItem.py
index 5bbdffe733..63dc61cb38 100644
--- a/pyqtgraph/graphicsItems/ScatterPlotItem.py
+++ b/pyqtgraph/graphicsItems/ScatterPlotItem.py
@@ -379,6 +379,9 @@ def addPoints(self, *args, **kargs):
kargs['y'] = []... |
ivy-llc__ivy-28045 | Wrong key-word argument `name` in `ivy.remainder()` function call
In the following line, the name argument is passed,
https://github.com/unifyai/ivy/blob/bec4752711c314f01298abc3845f02c24a99acab/ivy/functional/frontends/tensorflow/variable.py#L191
From the actual function definition, there is no such argument
https:... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.tensorflow as tf_frontend\n\n\nclass Variable:\n def __init__(self, array, trainable=True, name=None, dtype=None):\n self._ivy_array = (\n ivy.array(array) if not isinstance(array, ivy.Array) else array\n ... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.tensorflow as tf_frontend\n\n\nclass Variable:\n def __init__(self, array, trainable=True, name=None, dtype=None):\n self._ivy_array = (\n ivy.array(array) if not isinstance(array, ivy.Array) else array\n ... | diff --git a/ivy/functional/frontends/tensorflow/variable.py b/ivy/functional/frontends/tensorflow/variable.py
index bf6feeedde71d..e97034e4559f1 100644
--- a/ivy/functional/frontends/tensorflow/variable.py
+++ b/ivy/functional/frontends/tensorflow/variable.py
@@ -188,7 +188,7 @@ def __mul__(self, x, name="mul"):
... |
numpy__numpy-13306 | Indicate attempted allocation size when constructing an array gives a MemoryError
I've seen multiple questions now of the form "why does this give a MemoryError" when the reason is the user ended up allocating a bigger array than expected.
It would be helpful to include the shape and dtype in the error message.
| [
{
"content": "\"\"\"\nVarious richly-typed exceptions, that also help us deal with string formatting\nin python where it's easier.\n\nBy putting the formatting in `__str__`, we also avoid paying the cost for\nusers who silence the exceptions.\n\"\"\"\nfrom numpy.core.overrides import set_module\n\ndef _unpack_t... | [
{
"content": "\"\"\"\nVarious richly-typed exceptions, that also help us deal with string formatting\nin python where it's easier.\n\nBy putting the formatting in `__str__`, we also avoid paying the cost for\nusers who silence the exceptions.\n\"\"\"\nfrom numpy.core.overrides import set_module\n\ndef _unpack_t... | diff --git a/doc/release/1.17.0-notes.rst b/doc/release/1.17.0-notes.rst
index 893ec9b459fa..c2ea2aab2a80 100644
--- a/doc/release/1.17.0-notes.rst
+++ b/doc/release/1.17.0-notes.rst
@@ -198,15 +198,21 @@ returns an appropriate infinity.
Specialized ``np.isnan``, ``np.isinf``, and ``np.isfinite`` ufuncs for bool and... |
beetbox__beets-3029 | fetchart: Catch PIL file type exception (KeyError) when resizing art
### Problem
(Describe your problem, feature request, or discussion topic here. If you're reporting a bug, please fill out this and the "Setup" section below. Otherwise, you can delete them.)
Running this command in verbose (`-vv`) mode:
```sh... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Fabrice Laporte\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Fabrice Laporte\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | diff --git a/beets/util/artresizer.py b/beets/util/artresizer.py
index e5117a6afb..e58b356bef 100644
--- a/beets/util/artresizer.py
+++ b/beets/util/artresizer.py
@@ -72,7 +72,7 @@ def pil_resize(maxwidth, path_in, path_out=None):
im = Image.open(util.syspath(path_in))
size = maxwidth, maxwidth
... |
pex-tool__pex-2007 | Overwriting sys.argv[0] leaves no remaining methods to identify the actual sys.argv[0]
As of the 2.1.91 release, sys.argv[0] is no longer a reliable option for identifying the executed script as called.
For example, creating a symlink to a pex, then calling that symlink yields a sys.argv[0] that does not point to t... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nimport hashlib\nimport logging\nimport os\nimport shutil\n\nfrom pex import pex_warnings\nfrom pex.atomic_directory impor... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nimport hashlib\nimport logging\nimport os\nimport shutil\n\nfrom pex import pex_warnings\nfrom pex.atomic_directory impor... | diff --git a/pex/pex_builder.py b/pex/pex_builder.py
index 2ee6ca3ea..036758aa3 100644
--- a/pex/pex_builder.py
+++ b/pex/pex_builder.py
@@ -127,7 +127,7 @@ def __entry_point_from_filename__(filename):
sys.exit(2)
__installed_from__ = os.environ.pop(__INSTALLED_FROM__, None)
-sys.argv[0] = os.path.realpath(__inst... |
plotly__dash-346 | Assets don't work for Dash apps created with an existing Flask server
This is because the `name` param is taken to be the default value from the constructor (namely `__main__`), even if a Flask instance is provided. In this case, the `name` used to locate the base path of the package should be updated to be the `name` ... | [
{
"content": "from __future__ import print_function\n\nimport os\nimport sys\nimport collections\nimport importlib\nimport json\nimport pkgutil\nimport warnings\nimport re\n\nfrom functools import wraps\n\nimport plotly\nimport dash_renderer\nimport flask\nfrom flask import Flask, Response\nfrom flask_compress ... | [
{
"content": "from __future__ import print_function\n\nimport os\nimport sys\nimport collections\nimport importlib\nimport json\nimport pkgutil\nimport warnings\nimport re\n\nfrom functools import wraps\n\nimport plotly\nimport dash_renderer\nimport flask\nfrom flask import Flask, Response\nfrom flask_compress ... | diff --git a/dash/dash.py b/dash/dash.py
index fb14dbee03..4c78af5825 100644
--- a/dash/dash.py
+++ b/dash/dash.py
@@ -96,6 +96,7 @@ def __init__(
See https://github.com/plotly/dash/issues/141 for details.
''', DeprecationWarning)
+ name = name if server is None else server.na... |
frappe__frappe-6083 | [Bug] Empty rows in select fields..
After update to v10.1.46 I noted appearing of empty rows in some of select fields in custom doctypes
... even after I deleted these empty fields from field Option, they back automatically.
 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals\n\nimport six\n\nimport re, copy, os\nimport frappe\nfrom frappe import _\n\nfrom frappe.utils import now, cint\nfrom frappe.model import no_value_fields,... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals\n\nimport six\n\nimport re, copy, os\nimport frappe\nfrom frappe import _\n\nfrom frappe.utils import now, cint\nfrom frappe.model import no_value_fields,... | diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py
index 1fa9f751563b..3efbab247061 100644
--- a/frappe/core/doctype/doctype/doctype.py
+++ b/frappe/core/doctype/doctype/doctype.py
@@ -186,7 +186,7 @@ def scrub_options_in_select(self):
for option in field.options.split("\n... |
MongoEngine__mongoengine-2393 | _changed_fields does not detect changes to first item of ListField properly
Just figured out the following. This is harmless but it means that mongoengine will save the whole list field every time the first item is updated
```
class Doc(Document):
listfield = ListField(StringField())
doc = Doc(listfield=['a... | [
{
"content": "import weakref\n\nfrom bson import DBRef\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\n \"BaseDict\",\n \"StrictDict\",\n \"BaseList\",\n \"EmbeddedDocumentList\",\n \"LazyReference\",\n)\n\n\nde... | [
{
"content": "import weakref\n\nfrom bson import DBRef\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\n \"BaseDict\",\n \"StrictDict\",\n \"BaseList\",\n \"EmbeddedDocumentList\",\n \"LazyReference\",\n)\n\n\nde... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 14dfb8d08..f616f4a64 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -11,6 +11,8 @@ Development
This should have a negative impact on performance of count see Issue #2219
- Fix a bug that made the queryset drop the read_preference after clone(... |
liqd__a4-opin-1971 | Next Button in DTS is not working
**URL:** https://opin-stage.liqd.net/de/blueprints/liquid-democracy-ev/
**user:** * initiator*
**expected behaviour:** *If I click on next(weiter) then I come to the next page*
**behaviour:** *I can click on it, but nothing happens*
**important screensize:** * desktop?*
**device &... | [
{
"content": "from collections import namedtuple\nfrom enum import Enum, unique\n\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.polls import phases as poll_phases\nfrom euth.communitydebate import phases as communitydebate_phases\nfrom euth.documents import phases as documents_phas... | [
{
"content": "from collections import namedtuple\nfrom enum import Enum, unique\n\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.polls import phases as poll_phases\nfrom euth.communitydebate import phases as communitydebate_phases\nfrom euth.documents import phases as documents_phas... | diff --git a/euth/blueprints/blueprints.py b/euth/blueprints/blueprints.py
index cbecd0518..a8e272f89 100644
--- a/euth/blueprints/blueprints.py
+++ b/euth/blueprints/blueprints.py
@@ -74,8 +74,9 @@ class Aim(Enum):
communitydebate = (
'communitydebate',
_('Find and debate topics and questions.')... |
hylang__hy-2078 | Run REPL using `python -m hy`
Figuring out how to get a REPL is not trivial. What do you think about making `python -m hy` do it?
| [
{
"content": "import hy # NOQA\nimport sys\n\n# This just mocks the normalish behavior of the Python interp. Helpful to aid\n# with shimming existing apps that don't really \"work\" with Hy.\n#\n# You could say this script helps Hyjack a file.\n#\n\n\nif len(sys.argv) > 1:\n sys.argv.pop(0)\n hy.importer... | [
{
"content": "import sys\n\nfrom hy.cmdline import hy_main\n\n# Running hy as a module (e.g. `python -m hy`)\n# is equivalent to running the main `hy` command.\n\nsys.exit(hy_main())\n",
"path": "hy/__main__.py"
}
] | diff --git a/NEWS.rst b/NEWS.rst
index cb8e9a2af..ba0a5a39d 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -48,6 +48,8 @@ Other Breaking Changes
New Features
------------------------------
* `hy-repr` is now the default REPL output function.
+* Running the module a la `python -m hy` is now equivalent to running
+ the `hy`... |
archlinux__archinstall-2178 | Reset in locales menu causes crash
Using reset in the _Locales_ menu will cause a crash.
```
Traceback (most recent call last):
File "/home/scripttest/archinstall/.venv/bin/archinstall", line 8, in <module>
sys.exit(run_as_a_module())
^^^^^^^^^^^^^^^^^
File "/home/scripttest/archinstall/arc... | [
{
"content": "from dataclasses import dataclass\nfrom typing import Dict, Any, TYPE_CHECKING, Optional\n\nfrom .utils import list_keyboard_languages, list_locales, set_kb_layout\nfrom ..menu import Selector, AbstractSubMenu, MenuSelectionType, Menu\n\nif TYPE_CHECKING:\n\t_: Any\n\n\n@dataclass\nclass LocaleCon... | [
{
"content": "from dataclasses import dataclass\nfrom typing import Dict, Any, TYPE_CHECKING, Optional\n\nfrom .utils import list_keyboard_languages, list_locales, set_kb_layout\nfrom ..menu import Selector, AbstractSubMenu, MenuSelectionType, Menu\n\nif TYPE_CHECKING:\n\t_: Any\n\n\n@dataclass\nclass LocaleCon... | diff --git a/archinstall/lib/locale/locale_menu.py b/archinstall/lib/locale/locale_menu.py
index 75cc133280..db119f2055 100644
--- a/archinstall/lib/locale/locale_menu.py
+++ b/archinstall/lib/locale/locale_menu.py
@@ -80,6 +80,9 @@ def setup_selection_menu_options(self):
def run(self, allow_reset: bool = True) -> Lo... |
kedro-org__kedro-3362 | Better handle the case when using both `--starter` and `--addons`
## Description
It shouldn't be possible to use both `--starter` and `--addons` when doing `kedro new`. Currently you get a weird error:
```
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Use... | [
{
"content": "\"\"\"kedro is a CLI for managing Kedro projects.\n\nThis module implements commands available from the kedro CLI for creating\nprojects.\n\"\"\"\nfrom __future__ import annotations\n\nimport os\nimport re\nimport shutil\nimport stat\nimport sys\nimport tempfile\nfrom collections import OrderedDic... | [
{
"content": "\"\"\"kedro is a CLI for managing Kedro projects.\n\nThis module implements commands available from the kedro CLI for creating\nprojects.\n\"\"\"\nfrom __future__ import annotations\n\nimport os\nimport re\nimport shutil\nimport stat\nimport sys\nimport tempfile\nfrom collections import OrderedDic... | diff --git a/kedro/framework/cli/starters.py b/kedro/framework/cli/starters.py
index f0de8f51eb..638616c9a5 100644
--- a/kedro/framework/cli/starters.py
+++ b/kedro/framework/cli/starters.py
@@ -192,6 +192,11 @@ def new( # noqa: PLR0913
"Cannot use the --directory flag without a --starter value."
... |
statsmodels__statsmodels-2786 | BUG: Non-ASCII character in KPSS docstring
The hyphen in the page numbers (159-178) is a non-ASCII character. This doesn't break on Python 2.x on Travis, but it does on my machine.
```
File "/Users/fulton/projects/statsmodels/statsmodels/tsa/stattools.py", line 1114
`Journal of Econometrics` 54, 159–178.
... | [
{
"content": "\"\"\"\nStatistical tools for time series analysis\n\"\"\"\nfrom statsmodels.compat.python import (iteritems, range, lrange, string_types, lzip,\n zip, map)\nimport numpy as np\nfrom numpy.linalg import LinAlgError\nfrom scipy import stats\nfrom statsmodels.regressio... | [
{
"content": "\"\"\"\nStatistical tools for time series analysis\n\"\"\"\nfrom statsmodels.compat.python import (iteritems, range, lrange, string_types, lzip,\n zip, map)\nimport numpy as np\nfrom numpy.linalg import LinAlgError\nfrom scipy import stats\nfrom statsmodels.regressio... | diff --git a/statsmodels/tsa/stattools.py b/statsmodels/tsa/stattools.py
index c528f098b2a..83e059d33d2 100644
--- a/statsmodels/tsa/stattools.py
+++ b/statsmodels/tsa/stattools.py
@@ -1111,7 +1111,7 @@ def kpss(x, regression='c', lags=None, store=False):
----------
D. Kwiatkowski, P. C. B. Phillips, P. Schmi... |
PlasmaPy__PlasmaPy-664 | Bring back parallel testing in tox.ini
I forgot a flag in there while debugging.
| [
{
"content": "import numpy as np\nimport astropy.units as u\ntry:\n import h5py\nexcept (ImportError, ModuleNotFoundError) as e:\n from plasmapy.optional_deps import h5py_import_error\n raise ImportError(h5py_import_error) from e\n\nfrom plasmapy.classes import GenericPlasma\nfrom plasmapy.classes.exce... | [
{
"content": "import numpy as np\nimport astropy.units as u\ntry:\n import h5py\nexcept (ImportError, ModuleNotFoundError) as e:\n from plasmapy.optional_deps import h5py_import_error\n raise ImportError(h5py_import_error) from e\n\nfrom plasmapy.classes import GenericPlasma\nfrom plasmapy.classes.exce... | diff --git a/.travis.yml b/.travis.yml
index dcc2b83b36..8fe7dcb9c3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,12 +22,12 @@ matrix:
fast_finish: true
include:
- name: "3.7"
- env: TOX_ENV='py37-offline'
+ env: TOX_ENV='py37'
python: "3.7"
stage: Generic ... |
Theano__Theano-146 | Get rid of warning when using Scipy 0.10.x
WARNING: scipy version = 0.10.0b2. We request version >=0.7.0 for the sparse code as it has bugs fixed in the sparse matrix code.
| [
{
"content": "import sys\ntry:\n import scipy\n enable_sparse = scipy.__version__ >= '0.7'\n if not enable_sparse:\n sys.stderr.write(\"WARNING: scipy version = %s.\"\n \" We request version >=0.7.0 for the sparse code as it has\"\n \" bugs fixed in the sparse matri... | [
{
"content": "from pkg_resources import parse_version as V\nimport sys\n\ntry:\n import scipy\n enable_sparse = V(scipy.__version__) >= V('0.7')\n\n if not enable_sparse:\n sys.stderr.write(\"WARNING: scipy version = %s.\"\n \" We request version >=0.7.0 for the sparse code as it ... | diff --git a/theano/sandbox/linalg/tests/test_linalg.py b/theano/sandbox/linalg/tests/test_linalg.py
index 1ef5103c30a..3d2b154316e 100644
--- a/theano/sandbox/linalg/tests/test_linalg.py
+++ b/theano/sandbox/linalg/tests/test_linalg.py
@@ -1,3 +1,5 @@
+from pkg_resources import parse_version as V
+
import numpy
im... |
opensearch-project__opensearch-build-724 | [Bug]: Broken UTs on `main` branch
### Describe the bug
Seeing failures in these 2 UTs on main branch
```
Run pipenv run coverage run -m pytest --cov=./src --cov-report=xml
F....................................................................... [ 25%]
............................................................ | [
{
"content": "#!/usr/bin/env python\n\n# SPDX-License-Identifier: Apache-2.0\n#\n# The OpenSearch Contributors require contributions made to\n# this file be licensed under the Apache-2.0 license or a\n# compatible open source license.\n\nimport argparse\nimport logging\nimport os\nimport shutil\nimport sys\nimp... | [
{
"content": "#!/usr/bin/env python\n\n# SPDX-License-Identifier: Apache-2.0\n#\n# The OpenSearch Contributors require contributions made to\n# this file be licensed under the Apache-2.0 license or a\n# compatible open source license.\n\nimport argparse\nimport logging\nimport os\nimport shutil\nimport sys\nimp... | diff --git a/.github/workflows/bundle-workflow.yml b/.github/workflows/tests.yml
similarity index 98%
rename from .github/workflows/bundle-workflow.yml
rename to .github/workflows/tests.yml
index e5715c1643..ed59a9c86b 100644
--- a/.github/workflows/bundle-workflow.yml
+++ b/.github/workflows/tests.yml
@@ -1,4 +1,4 @@
... |
Qiskit__qiskit-2909 | QuantumCircuit needs a .n_qubits method
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
Since in general `width` is not the number of qubits, circuits s... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licen... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licen... | diff --git a/qiskit/circuit/quantumcircuit.py b/qiskit/circuit/quantumcircuit.py
index 3791682ef339..5a000435fedc 100644
--- a/qiskit/circuit/quantumcircuit.py
+++ b/qiskit/circuit/quantumcircuit.py
@@ -668,6 +668,16 @@ def width(self):
"""
return sum(reg.size for reg in self.qregs + self.cregs)
+ ... |
comic__grand-challenge.org-2511 | Update reader study question gives error
**Describe the bug**
It is not possible to update a reader study question.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to any reader study that has answers
2. Click on questions
3. Click on Edit for a question
4. Update the question (for example Order)
5. C... | [
{
"content": "import csv\nimport io\nimport logging\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import (\n HTML,\n ButtonHolder,\n Div,\n Field,\n Fieldset,\n Layout,\n Submit,\n)\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import... | [
{
"content": "import csv\nimport io\nimport logging\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import (\n HTML,\n ButtonHolder,\n Div,\n Field,\n Fieldset,\n Layout,\n Submit,\n)\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import... | diff --git a/app/grandchallenge/reader_studies/forms.py b/app/grandchallenge/reader_studies/forms.py
index 5423a1eb87..b1dc28e69c 100644
--- a/app/grandchallenge/reader_studies/forms.py
+++ b/app/grandchallenge/reader_studies/forms.py
@@ -283,6 +283,8 @@ def __init__(self, *args, **kwargs):
def interface_choices... |
kivy__python-for-android-2800 | Python 3.10 cffi build fails
<!--
The issue tracker is a tool to address bugs NOT a support platform.
Please use the Discord community or Stack Overflow for support questions,
more information at https://github.com/kivy/python-for-android#support
-->
### Checklist
- [ x] the issue is indeed a bug and not a su... | [
{
"content": "import os\nfrom pythonforandroid.recipe import CompiledComponentsPythonRecipe\n\n\nclass CffiRecipe(CompiledComponentsPythonRecipe):\n \"\"\"\n Extra system dependencies: autoconf, automake and libtool.\n \"\"\"\n name = 'cffi'\n version = '1.13.2'\n url = 'https://pypi.python.or... | [
{
"content": "import os\nfrom pythonforandroid.recipe import CompiledComponentsPythonRecipe\n\n\nclass CffiRecipe(CompiledComponentsPythonRecipe):\n \"\"\"\n Extra system dependencies: autoconf, automake and libtool.\n \"\"\"\n name = 'cffi'\n version = '1.15.1'\n url = 'https://pypi.python.or... | diff --git a/pythonforandroid/recipes/cffi/__init__.py b/pythonforandroid/recipes/cffi/__init__.py
index a198a3db0d..f0c25a92c9 100644
--- a/pythonforandroid/recipes/cffi/__init__.py
+++ b/pythonforandroid/recipes/cffi/__init__.py
@@ -7,7 +7,7 @@ class CffiRecipe(CompiledComponentsPythonRecipe):
Extra system depen... |
translate__pootle-4371 | Accessing the timeline provokes a server error
Accessing the timeline currently provokes a server error:
``` python
FieldError: Invalid field name(s) given in select_related: 'user'. Choices are: evernote_account
File "django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | diff --git a/pootle/apps/pootle_store/views.py b/pootle/apps/pootle_store/views.py
index cee956c3452..17cd4eff137 100644
--- a/pootle/apps/pootle_store/views.py
+++ b/pootle/apps/pootle_store/views.py
@@ -590,7 +590,7 @@ def timeline(request, unit):
field=SubmissionFields.COMMENT,
creation_time=unit.c... |
getsentry__sentry-python-261 | Half installed AioHttpIntegration causes aiohttp to crash
If I call:
```python
sentry_sdk.integrations.setup_integrations(
[sentry_sdk.integrations.aiohttp.AioHttpIntegration()])
```
after `sentry_sdk.init()` the `_handle` method of `aiohttp.web.Application` gets replaced but the integration does not get r... | [
{
"content": "import sys\nimport weakref\n\nfrom sentry_sdk._compat import reraise\nfrom sentry_sdk.hub import Hub\nfrom sentry_sdk.integrations import Integration\nfrom sentry_sdk.integrations.logging import ignore_logger\nfrom sentry_sdk.integrations._wsgi_common import _filter_headers\nfrom sentry_sdk.utils ... | [
{
"content": "import sys\nimport weakref\n\nfrom sentry_sdk._compat import reraise\nfrom sentry_sdk.hub import Hub\nfrom sentry_sdk.integrations import Integration\nfrom sentry_sdk.integrations.logging import ignore_logger\nfrom sentry_sdk.integrations._wsgi_common import _filter_headers\nfrom sentry_sdk.utils ... | diff --git a/sentry_sdk/integrations/aiohttp.py b/sentry_sdk/integrations/aiohttp.py
index 490be078ce..3224f2e0eb 100644
--- a/sentry_sdk/integrations/aiohttp.py
+++ b/sentry_sdk/integrations/aiohttp.py
@@ -32,7 +32,7 @@ async def sentry_app_handle(self, request, *args, **kwargs):
async def inner():
... |
vega__altair-1192 | Incorrect description of an example
https://altair-viz.github.io/gallery/scatter_linked_brush.html
The title of the page says "Faceted Scatter Plot with Linked Brushing".
But the example is a concatenated view, not a faceted view.
(The data points are shown twice in the visualization, not split by a category.)
| [
{
"content": "\"\"\"\nFaceted Scatter Plot with Linked Brushing\n-----------------------------------------\nThis is an example of using an interval selection to control the color of\npoints across multiple facets.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom vega_datasets import data\n\nc... | [
{
"content": "\"\"\"\nMulti-panel Scatter Plot with Linked Brushing\n---------------------------------------------\nThis is an example of using an interval selection to control the color of\npoints across multiple panels.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom vega_datasets import d... | diff --git a/altair/vegalite/v2/examples/scatter_linked_brush.py b/altair/vegalite/v2/examples/scatter_linked_brush.py
index 55123e414..a8e236a52 100644
--- a/altair/vegalite/v2/examples/scatter_linked_brush.py
+++ b/altair/vegalite/v2/examples/scatter_linked_brush.py
@@ -1,8 +1,8 @@
"""
-Faceted Scatter Plot with Lin... |
streamlink__streamlink-5844 | session.plugins: No longer logs when plugin is overridden
### Checklist
- [X] This is a bug report and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#cont... | [
{
"content": "import base64\nimport hashlib\nimport importlib.metadata\nimport json\nimport logging\nimport pkgutil\nimport re\nfrom contextlib import suppress\nfrom importlib.abc import PathEntryFinder\nfrom pathlib import Path\nfrom types import ModuleType\nfrom typing import Dict, Iterator, List, Literal, Op... | [
{
"content": "import base64\nimport hashlib\nimport importlib.metadata\nimport json\nimport logging\nimport pkgutil\nimport re\nfrom contextlib import suppress\nfrom importlib.abc import PathEntryFinder\nfrom pathlib import Path\nfrom types import ModuleType\nfrom typing import Dict, Iterator, List, Literal, Op... | diff --git a/src/streamlink/session/plugins.py b/src/streamlink/session/plugins.py
index 4526081a769..5ef32d6a97d 100644
--- a/src/streamlink/session/plugins.py
+++ b/src/streamlink/session/plugins.py
@@ -179,7 +179,7 @@ def _load_plugins_from_path(self, path: Union[Path, str]) -> Dict[str, Type[Plug
if lo... |
plone__Products.CMFPlone-3972 | TypeError thrown when during groups lookup
The offending code is [here](https://github.com/plone/Products.CMFPlone/blob/308aa4d03ee6c0ce9d8119ce4c37955153f0bc6f/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py#L66). The traceback looks like this:
```
Traceback (innermost last):
Module ZPublisher... | [
{
"content": "from plone.base import PloneMessageFactory as _\nfrom Products.CMFCore.utils import getToolByName\nfrom Products.CMFPlone.controlpanel.browser.usergroups import (\n UsersGroupsControlPanelView,\n)\nfrom Products.CMFPlone.utils import normalizeString\nfrom zExceptions import Forbidden\n\n\nclass... | [
{
"content": "from plone.base import PloneMessageFactory as _\nfrom Products.CMFCore.utils import getToolByName\nfrom Products.CMFPlone.controlpanel.browser.usergroups import (\n UsersGroupsControlPanelView,\n)\nfrom Products.CMFPlone.utils import normalizeString\nfrom zExceptions import Forbidden\n\n\nclass... | diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py
index 57ea21eeed..755c807856 100644
--- a/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py
+++ b/Products/CMFPlone/controlpanel/browser/usergroups_use... |
ethereum__consensus-specs-2926 | Add diagnostics to spec test output
We collect some diagnostics about the spec test generation in this function: https://github.com/ethereum/consensus-specs/blob/dev/tests/core/pyspec/eth2spec/gen_helpers/gen_base/gen_runner.py#L41
This information is logged to STDOUT but is generally not persisted anywhere.
It w... | [
{
"content": "from setuptools import setup, find_packages, Command\nfrom setuptools.command.build_py import build_py\nfrom distutils import dir_util\nfrom distutils.util import convert_path\nfrom pathlib import Path\nimport os\nimport re\nimport string\nimport textwrap\nfrom typing import Dict, NamedTuple, List... | [
{
"content": "from setuptools import setup, find_packages, Command\nfrom setuptools.command.build_py import build_py\nfrom distutils import dir_util\nfrom distutils.util import convert_path\nfrom pathlib import Path\nimport os\nimport re\nimport string\nimport textwrap\nfrom typing import Dict, NamedTuple, List... | diff --git a/setup.py b/setup.py
index 57d8d8fe12..e02759bfcf 100644
--- a/setup.py
+++ b/setup.py
@@ -1041,7 +1041,7 @@ def run(self):
extras_require={
"test": ["pytest>=4.4", "pytest-cov", "pytest-xdist"],
"lint": ["flake8==3.7.7", "mypy==0.812", "pylint==2.12.2"],
- "generator": ["pytho... |
twisted__twisted-11722 | .hypothesis should be in .gitignore
**Describe the incorrect behavior you saw**
`git diff` shows me an untracked `.hypothesis` directory.
**Describe how to cause this behavior**
I ran the tests.
**Describe the correct behavior you'd like to see**
`.hypothesis` [shouldn't be checked in](https://hypothesis... | [
{
"content": "#\n# This script is designed to be called by the GHA workflow.\n#\n# It is designed to check that the PR text complies to our dev standards.\n#\n# The input is received via the environmet variables:\n# * PR_TITLE - title of the PR\n# * PR_BODY - the description of the PR\n#\n# To test it run\n#\n#... | [
{
"content": "#\n# This script is designed to be called by the GHA workflow.\n#\n# It is designed to check that the PR text complies to our dev standards.\n#\n# The input is received via the environmet variables:\n# * PR_TITLE - title of the PR\n# * PR_BODY - the description of the PR\n#\n# To test it run\n#\n#... | diff --git a/.github/scripts/check-pr-text.py b/.github/scripts/check-pr-text.py
index 18b2c8ccbb0..58c8058a9ac 100644
--- a/.github/scripts/check-pr-text.py
+++ b/.github/scripts/check-pr-text.py
@@ -41,7 +41,7 @@ def fail(message):
if not pr_body:
fail("Body for the PR not found. " "Maybe missing PR_BODY env va... |
google__mobly-903 | Add abilty to run 'adb reverse' via Mobly
We have the ability to run `adb forward` (for TCP port forwarding) but not `adb reverse` via mobly for TCP port reversing. This feature request is to add this ability in Mobly framework.
| [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/mobly/controllers/android_device_lib/adb.py b/mobly/controllers/android_device_lib/adb.py
index d8132450..721dcc7e 100644
--- a/mobly/controllers/android_device_lib/adb.py
+++ b/mobly/controllers/android_device_lib/adb.py
@@ -459,6 +459,12 @@ def forward(self, args=None, shell=False) -> bytes:
'... |
carpentries__amy-438 | Event's start date must be earlier than it's end date
We should enforce that the start date is early that the end date.
| [
{
"content": "from django import forms\nfrom django.forms import HiddenInput, CheckboxSelectMultiple\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Layout, Div, HTML, Submit, Field\nfrom crispy_forms.bootstrap import FormActions\nfrom django_countries.fields import CountryField\n... | [
{
"content": "from django import forms\nfrom django.forms import HiddenInput, CheckboxSelectMultiple\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Layout, Div, HTML, Submit, Field\nfrom crispy_forms.bootstrap import FormActions\nfrom django_countries.fields import CountryField\n... | diff --git a/workshops/forms.py b/workshops/forms.py
index 179ad7fad..40dc47785 100644
--- a/workshops/forms.py
+++ b/workshops/forms.py
@@ -206,6 +206,15 @@ def clean_slug(self):
return data
+ def clean_end(self):
+ """Ensure end >= start."""
+ start = self.cleaned_data['start']
+ ... |
getnikola__nikola-1406 | Cannot copy file .php in files folder.
Using nikola 7.1.0, I couldn't copy a file contact.php in the default files folder.
This are the error massage:
$ nikola build
Scanning posts............done!
. copy_files:output/contact.php
######
TaskError - taskid:copy_files:output/contact.php
PythonAction Error
Traceback (... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2014 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-2014 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/CHANGES.txt b/CHANGES.txt
index 10608319d2..87a323f606 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ Features
Bugfixes
--------
+* Fix files/\*.php (skip post/story-specific filters) (Issue #1403)
* Warn about missing / in BASE_URL differently (explicit request to
fix the config file)
... |
django-json-api__django-rest-framework-json-api-221 | The get_resource_type_from_serializer bug
django-rest-framework-json-api v2.0.0-beta.2
I have defined `resource_name` attribute into Meta class of my serializer:
``` python
class MySerializer(serializers.Serializer):
email = serializers.EmailField(required=True)
class Meta:
resource_name = 'user'
```
... | [
{
"content": "\"\"\"\nUtils.\n\"\"\"\nimport copy\nfrom collections import OrderedDict\n\nimport inflection\nfrom django.conf import settings\nfrom django.utils import six\nfrom django.utils.module_loading import import_string as import_class_from_dotted_path\nfrom django.utils.translation import ugettext_lazy ... | [
{
"content": "\"\"\"\nUtils.\n\"\"\"\nimport copy\nfrom collections import OrderedDict\n\nimport inflection\nfrom django.conf import settings\nfrom django.utils import six\nfrom django.utils.module_loading import import_string as import_class_from_dotted_path\nfrom django.utils.translation import ugettext_lazy ... | diff --git a/example/tests/unit/test_utils.py b/example/tests/unit/test_utils.py
index 14ebd202..39d57428 100644
--- a/example/tests/unit/test_utils.py
+++ b/example/tests/unit/test_utils.py
@@ -15,6 +15,11 @@
pytestmark = pytest.mark.django_db
+class NonModelResourceSerializer(serializers.Serializer):
+ class ... |
enthought__chaco-728 | TypeError when running stock prices examples
This error was discovered when running the `examples/demo/financial/stock_prices.py` example.
In order to reproduce, simply load the example and start zooming out. This was observed on python 3.6 with wx toolkit.
```
>python stock_prices.py
c:\users\rporuri\work\gith... | [
{
"content": "\"\"\"\nImplementation of a standard financial plot visualization using Chaco\nrenderers and scales.\n\nIn the main price plot area, mouse wheel zooms and mouse drag pans (if\nthe plot is not at the edge of the time series data). In the bottom\noverview plot area, right-click-drag selects a range... | [
{
"content": "\"\"\"\nImplementation of a standard financial plot visualization using Chaco\nrenderers and scales.\n\nIn the main price plot area, mouse wheel zooms and mouse drag pans (if\nthe plot is not at the edge of the time series data). In the bottom\noverview plot area, right-click-drag selects a range... | diff --git a/examples/demo/financial/stock_prices.py b/examples/demo/financial/stock_prices.py
index 77351ef67..16f91dec0 100644
--- a/examples/demo/financial/stock_prices.py
+++ b/examples/demo/financial/stock_prices.py
@@ -144,7 +144,7 @@ def _range_selection_handler(self, event):
def _plot_range_handler(self, e... |
scverse__scanpy-1417 | Docs for `scanpy.tl.rank_genes_groups` are displayed incorrectly
The docs for `scanpy.tl.rank_genes_groups` are displayed incorrectly [here](https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.rank_genes_groups.html#scanpy.tl.rank_genes_groups). The problem is the empty line [here](https://github.com/theislab/scanpy/... | [
{
"content": "\"\"\"Rank genes according to differential expression.\n\"\"\"\nfrom math import floor\nfrom typing import Iterable, Union, Optional\n\nimport numpy as np\nimport pandas as pd\nfrom anndata import AnnData\nfrom scipy.sparse import issparse, vstack\n\nfrom .. import _utils\nfrom .. import logging a... | [
{
"content": "\"\"\"Rank genes according to differential expression.\n\"\"\"\nfrom math import floor\nfrom typing import Iterable, Union, Optional\n\nimport numpy as np\nimport pandas as pd\nfrom anndata import AnnData\nfrom scipy.sparse import issparse, vstack\n\nfrom .. import _utils\nfrom .. import logging a... | diff --git a/scanpy/tools/_rank_genes_groups.py b/scanpy/tools/_rank_genes_groups.py
index 08efe8f5df..360997e52b 100644
--- a/scanpy/tools/_rank_genes_groups.py
+++ b/scanpy/tools/_rank_genes_groups.py
@@ -515,8 +515,7 @@ def rank_genes_groups(
>>> import scanpy as sc
>>> adata = sc.datasets.pbmc68k_reduced(... |
python__python-docs-es-1000 | Translate `library/signal.po`
This needs to reach 100% translated.
Current stats for `library/signal.po`:
- Fuzzy: 0
- Percent translated: 0%
- Entries: 0 / 119
- Untranslated: 119
Please, comment here if you want this file to be assigned to you and an member will assign it to you as soon as possible, so you can sta... | [
{
"content": "# Sphinx configuration file.\n#\n# - import original configurations from cpython/Doc/conf.py\n# - append the path considering the cpython submodule is at ./cpython\n# - create the symbolic links under ./cpython/locale/es/LC_MESSAGES\n# - make the build to work under Read the Docs\n#\n# The git... | [
{
"content": "# Sphinx configuration file.\n#\n# - import original configurations from cpython/Doc/conf.py\n# - append the path considering the cpython submodule is at ./cpython\n# - create the symbolic links under ./cpython/locale/es/LC_MESSAGES\n# - make the build to work under Read the Docs\n#\n# The git... | diff --git a/TRANSLATORS b/TRANSLATORS
index 46f1e73140..dc8c53b40a 100644
--- a/TRANSLATORS
+++ b/TRANSLATORS
@@ -101,6 +101,7 @@ Rishabh Mishra (@rishabhmishra25)
Carlos Martel Lamas (@Letram)
Jonathan Aguilar (@drawsoek)
David Lorenzo (@David-Lor)
+Juan Antonio Lagos (@alochimpasplum)
Antonio González Fernández ... |
mesonbuild__meson-4414 | If Meson fails to find boost, it crashes with error "TypeError: get_library_dirs() takes 0 positional arguments but 1 was given"
Tested with meson 0.48.1
Full stack trace
```
Traceback (most recent call last):
File "mesonbuild/mesonmain.py", line 364, in run
app.generate()
File "mesonbuild/mesonmain.p... | [
{
"content": "# Copyright 2013-2017 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-2017 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/boost.py b/mesonbuild/dependencies/boost.py
index b06f62d0c396..17f92400f02f 100644
--- a/mesonbuild/dependencies/boost.py
+++ b/mesonbuild/dependencies/boost.py
@@ -443,7 +443,7 @@ def detect_lib_modules_nix(self):
if self.libdir:
libdirs = [self.libdir]
... |
carpentries__amy-1675 | Remove "Lessons Covered" from Self Organized Submission accept view
Currently when "Mix and Match" is selected on the self organized workshop form, a list of lessons is also displayed when the submission is being accepted:
\nfrom django.core.exceptions im... | [
{
"content": "import csv\nimport datetime\nimport io\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import permission_required\nfrom django.contrib.auth.mixins import (\n PermissionRequiredMixin,\n)\nfrom django.core.exceptions im... | diff --git a/amy/extrequests/tests/test_selforganised_submissions.py b/amy/extrequests/tests/test_selforganised_submissions.py
index 8b67456fa..432a33a66 100644
--- a/amy/extrequests/tests/test_selforganised_submissions.py
+++ b/amy/extrequests/tests/test_selforganised_submissions.py
@@ -478,19 +478,18 @@ def test_host... |
google__flax-3886 | Improve SEO for docs pages
When I Google a Flax module to pull up its API documentation, I get broken or irrelevant pages. Examples:
- [flax dense](https://www.google.com/search?q=flax%20dense) | [top result](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.Dense.html) | [desire... | [
{
"content": "# Copyright 2024 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 2024 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/docs/conf.py b/docs/conf.py
index 74ee9e8ba..2ee6faca2 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -108,6 +108,8 @@
# so a file named 'default.css' will overwrite the builtin 'default.css'.
html_static_path = ['_static']
+html_extra_path = ['robots.txt']
+
html_theme_options = {
'repository_url... |
python-poetry__poetry-2305 | Save canonical PyPi names in pyproject.toml
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill these first.
-->
<!-- Checked check... | [
{
"content": "import logging\nimport os\n\nfrom collections import defaultdict\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nfrom cachecontrol import CacheControl\nfrom cachecontrol.caches.file_cache import FileCache\nfrom cachecontrol.controller import logger as cache_control_l... | [
{
"content": "import logging\nimport os\n\nfrom collections import defaultdict\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nfrom cachecontrol import CacheControl\nfrom cachecontrol.caches.file_cache import FileCache\nfrom cachecontrol.controller import logger as cache_control_l... | diff --git a/poetry/repositories/pypi_repository.py b/poetry/repositories/pypi_repository.py
index 767a7353b3c..b47b2710e4e 100644
--- a/poetry/repositories/pypi_repository.py
+++ b/poetry/repositories/pypi_repository.py
@@ -123,7 +123,7 @@ def find_packages(
continue
try:
- ... |
mlflow__mlflow-7659 | get_metric_history does not work
This calling code https://github.com/mlflow/mlflow/blob/aef0936a4bbc3e56519e3c64bb60701f0114095c/mlflow/tracking/_tracking_service/client.py#L88 expects a dict of the token and the list while the called function just gives the pure list, so line 94 will always fail.
| [
{
"content": "import json\nimport logging\nimport time\nimport os\nimport sys\nimport shutil\n\nimport uuid\n\nfrom mlflow.entities import (\n Experiment,\n Metric,\n Param,\n Run,\n RunData,\n RunInfo,\n RunStatus,\n RunTag,\n ViewType,\n SourceType,\n ExperimentTag,\n)\nfrom m... | [
{
"content": "import json\nimport logging\nimport time\nimport os\nimport sys\nimport shutil\n\nimport uuid\n\nfrom mlflow.entities import (\n Experiment,\n Metric,\n Param,\n Run,\n RunData,\n RunInfo,\n RunStatus,\n RunTag,\n ViewType,\n SourceType,\n ExperimentTag,\n)\nfrom m... | diff --git a/mlflow/store/tracking/file_store.py b/mlflow/store/tracking/file_store.py
index a3009b073a867..b41ba62300c2b 100644
--- a/mlflow/store/tracking/file_store.py
+++ b/mlflow/store/tracking/file_store.py
@@ -773,7 +773,7 @@ def get_metric_history(self, run_id, metric_key, max_results=None, page_token=No
... |
dynaconf__dynaconf-810 | [RFC] Recursive merge should allow unique flag in nested lists
I tried adding an additional config file to a Dynaconf instance with global merge set to `True` and found that a nested list was normally merged when I needed it to be unique or not merged at all as the old value was contained in the new value so the result... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport warnings\nfrom collections import defaultdict\nfrom json import JSONDecoder\nfrom typing import Any\nfrom typing import Iterator\nfrom typing import TYPE_CHECKING\n\n\nif TYPE_CHECKING: # pragma: no cover\n from dynaconf.utils.boxing impo... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport warnings\nfrom collections import defaultdict\nfrom json import JSONDecoder\nfrom typing import Any\nfrom typing import Iterator\nfrom typing import TYPE_CHECKING\n\n\nif TYPE_CHECKING: # pragma: no cover\n from dynaconf.utils.boxing impo... | diff --git a/dynaconf/utils/__init__.py b/dynaconf/utils/__init__.py
index 8515fee14..146062017 100644
--- a/dynaconf/utils/__init__.py
+++ b/dynaconf/utils/__init__.py
@@ -46,6 +46,12 @@ def object_merge(
return new
if isinstance(old, list) and isinstance(new, list):
+
+ # 726: allow local_merge... |
getpelican__pelican-2714 | Markdown Summary metadata is parsed for additional metadata
The Markdown parser forces the "meta" extension for parsing metadata headers. This parser object is reused when formatting header values for any header listed in the `FORMATTED_FIELDS` setting.
Because header values like Summary are parsed for metadata, any m... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport datetime\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\nfrom html import escape\nfrom html.parser import HTMLParser\nfrom io import StringIO\n\nimport docutils\nimport docutils.core\nimport docutils.io\nfrom docutils.parsers.rst.langua... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport datetime\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\nfrom html import escape\nfrom html.parser import HTMLParser\nfrom io import StringIO\n\nimport docutils\nimport docutils.core\nimport docutils.io\nfrom docutils.parsers.rst.langua... | diff --git a/pelican/readers.py b/pelican/readers.py
index 673b637e0..6d9923f2c 100644
--- a/pelican/readers.py
+++ b/pelican/readers.py
@@ -302,6 +302,9 @@ def _parse_metadata(self, meta):
"""Return the dict containing document metadata"""
formatted_fields = self.settings['FORMATTED_FIELDS']
+ ... |
Gallopsled__pwntools-752 | 3.0.3 Release Broken
It appears that the archive uploaded to PyPI does not include README.md, which is referred to by setup.py.
@Idolf can you update the release to include the README?
| [
{
"content": "#!/usr/bin/env python2\nimport glob\nimport os\nimport platform\nimport sys\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n# Get... | [
{
"content": "#!/usr/bin/env python2\nimport glob\nimport os\nimport platform\nimport sys\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n# Get... | diff --git a/MANIFEST.in b/MANIFEST.in
index ab30e9ace..1ec0fb56c 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1,7 @@
-include *.txt
+graft examples
+graft extra
+include *.md *.txt *.sh *.yml MANIFEST.in
+recursive-include docs *.rst *.png Makefile *.py *.txt
+recursive-include pwnlib *.py *.asm *.rst *.md *.tx... |
RedHatInsights__insights-core-3252 | Insights core skips rules if test is in the package name
Review the fix made in [Core PR 3209](https://github.com/RedHatInsights/insights-core/pull/3209) to exclude insights core tests. The fix now causes rules to be skipped that contain 'test' anywhere in the package name. The check should only look for 'test' in the ... | [
{
"content": "\"\"\"\nThis module implements an inversion of control framework. It allows\ndependencies among functions and classes to be declared with decorators and the\nresulting dependency graphs to be executed.\n\nA decorator used to declare dependencies is called a :class:`ComponentType`, a\ndecorated fun... | [
{
"content": "\"\"\"\nThis module implements an inversion of control framework. It allows\ndependencies among functions and classes to be declared with decorators and the\nresulting dependency graphs to be executed.\n\nA decorator used to declare dependencies is called a :class:`ComponentType`, a\ndecorated fun... | diff --git a/insights/core/dr.py b/insights/core/dr.py
index 62b12daed5..54eda7055e 100644
--- a/insights/core/dr.py
+++ b/insights/core/dr.py
@@ -393,7 +393,7 @@ def _import(path, continue_on_error):
raise
-def _load_components(path, include=".*", exclude="test", continue_on_error=True):
+def _load_co... |
ultrabug__py3status-1960 | Sysdata module crash (red Sysdata: 'SReclaimable:' ) on raspberry Pi4 (using rasbian)
Problem: py3status shows red Sysdata: 'SReclaimable:' instead of requested info.
When running module directly I captured traceback:
> 'SReclaimable:' (KeyError) module.py line 940.
> Traceback
> KeyError: 'SReclaimable:'
>... | [
{
"content": "r\"\"\"\nDisplay system RAM, SWAP and CPU utilization.\n\nConfiguration parameters:\n cache_timeout: how often we refresh this module in seconds (default 10)\n cpu_freq_unit: the unit of CPU frequency to use in report, case insensitive.\n ['kHz', 'MHz', 'GHz'] (default 'GHz')\n cpu... | [
{
"content": "r\"\"\"\nDisplay system RAM, SWAP and CPU utilization.\n\nConfiguration parameters:\n cache_timeout: how often we refresh this module in seconds (default 10)\n cpu_freq_unit: the unit of CPU frequency to use in report, case insensitive.\n ['kHz', 'MHz', 'GHz'] (default 'GHz')\n cpu... | diff --git a/py3status/modules/sysdata.py b/py3status/modules/sysdata.py
index f8b8f4ab30..32693d7f79 100644
--- a/py3status/modules/sysdata.py
+++ b/py3status/modules/sysdata.py
@@ -375,7 +375,7 @@ def _calc_mem_info(self, unit, meminfo, memory):
free_percent,
)
- def _get_meminfo(self, head... |
zestedesavoir__zds-site-1098 | La liste des topics par tag envoie une 500
aller sur une url du type http://zestedesavoir.com/forums/sujets/tag/9/regression/ envoie une 500. C'est une régression par rapport à la béta privée.
| [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\nimport json\nimport re\n\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models imp... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\nimport json\nimport re\n\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models imp... | diff --git a/zds/forum/views.py b/zds/forum/views.py
index 148795486f..e05c52d418 100644
--- a/zds/forum/views.py
+++ b/zds/forum/views.py
@@ -876,6 +876,7 @@ def find_topic_by_tag(request, tag_pk, tag_slug):
tag = Tag.objects.filter(pk=tag_pk, slug=tag_slug).first()
if tag is None:
return redirect(r... |
pre-commit__pre-commit-420 | Not working on macOS Sierra?
Attempting to utilize a collection of hooks from the default repo, I get the following:
```
An unexpected error has occurred: CalledProcessError: Command: ('/Users/amcgregor/Projects/marrow/.venv/bin/python3', '-m', 'virtualenv', '/Users/amcgregor/.pre-commit/repofu57ylaa/py_env-default')
... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport distutils.spawn\nimport os\nimport sys\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import UNSET\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.uti... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport distutils.spawn\nimport os\nimport sys\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import UNSET\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.uti... | diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py
index b763c26b1..7eadb8df4 100644
--- a/pre_commit/languages/python.py
+++ b/pre_commit/languages/python.py
@@ -71,6 +71,8 @@ def install_environment(
]
if version != 'default':
venv_cmd.extend(['-p', norm_versio... |
digitalfabrik__integreat-cms-1210 | PDF Export URL pattern
### Describe the Bug
The web app calls `/REGION/LANG/wp-json/ig-mpdf/v1/pdf` to export a PDF which returns a 404. Our API currently uses `REGION/LANG/pdf`.
The normal mapping does not work, as we
### Steps to Reproduce
```shell
curl 'https://malte-test.tuerantuer.org/joerdenstorf/de/wp... | [
{
"content": "\"\"\"\nExpansion of API-Endpoints for the CMS\n\"\"\"\nfrom django.urls import include, path, re_path\n\nfrom .v3.events import events\nfrom .v3.feedback import (\n page_feedback,\n search_result_feedback,\n region_feedback,\n offer_feedback,\n offer_list_feedback,\n event_list_... | [
{
"content": "\"\"\"\nExpansion of API-Endpoints for the CMS\n\"\"\"\nfrom django.urls import include, path, re_path\n\nfrom .v3.events import events\nfrom .v3.feedback import (\n page_feedback,\n search_result_feedback,\n region_feedback,\n offer_feedback,\n offer_list_feedback,\n event_list_... | diff --git a/integreat_cms/api/urls.py b/integreat_cms/api/urls.py
index 0244538a51..6f4a30225b 100644
--- a/integreat_cms/api/urls.py
+++ b/integreat_cms/api/urls.py
@@ -136,6 +136,11 @@
"<slug:language_slug>/wp-json/extensions/v3/",
include(content_api_urlpatterns),
... |
ansible__ansible-23919 | Facts returned by docker_network module are removed by ansible >= 2.3.0
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
docker_network
##### ANSIBLE VERSION
```
ansible 2.4.0 (devel e0a7105c2d) last updated 2017/04/24 16:32:33 (GMT +100)
config file = /etc/ansible/ansible.cfg
configured module searc... | [
{
"content": "#!/usr/bin/python\n#\n# Copyright 2016 Red Hat | Ansible\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License... | [
{
"content": "#!/usr/bin/python\n#\n# Copyright 2016 Red Hat | Ansible\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License... | diff --git a/lib/ansible/modules/cloud/docker/docker_network.py b/lib/ansible/modules/cloud/docker/docker_network.py
index c7a15cc98bcab8..5bbd97276622cc 100644
--- a/lib/ansible/modules/cloud/docker/docker_network.py
+++ b/lib/ansible/modules/cloud/docker/docker_network.py
@@ -358,7 +358,7 @@ def present(self):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.