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 ⌀ |
|---|---|---|---|---|
rasterio__rasterio-2666 | DOC: Documentation inconsistency in rasterio.features.rasterize
The `out` parameter of `rasterio.features.rasterize`'s documentation mentions a `source` but there is no parameter called source it is not clear what size it needs to be in this case, or if it matters.
https://github.com/rasterio/rasterio/blob/main/rast... | [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\nimport logging\nimport math\nimport os\nimport warnings\n\nimport numpy as np\n\nimport rasterio\nfrom rasterio.dtypes import (\n validate_dtype,\n can_cast_dtype,\n get_minimum_dtype,\n _getnpdtype,\n)\nfrom raste... | [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\nimport logging\nimport math\nimport os\nimport warnings\n\nimport numpy as np\n\nimport rasterio\nfrom rasterio.dtypes import (\n validate_dtype,\n can_cast_dtype,\n get_minimum_dtype,\n _getnpdtype,\n)\nfrom raste... | diff --git a/rasterio/features.py b/rasterio/features.py
index fff3e7486..7a565d581 100644
--- a/rasterio/features.py
+++ b/rasterio/features.py
@@ -206,8 +206,8 @@ def rasterize(
Used as fill value for all areas not covered by input
geometries.
out : numpy.ndarray, optional
- Array of sam... |
carpentries__amy-1652 | Select2 Tag widget error when using on empty event form
Perhaps a related issue - I also got a 500 Server Error when trying to accept a workshop request (e.g. https://amy.carpentries.org/requests/selforganised_submission/552/) but then on repeated attempts accepting some of the problematic requests worked so not sure w... | [
{
"content": "from django_select2.forms import (\n Select2Widget as DS2_Select2Widget,\n Select2MultipleWidget as DS2_Select2MultipleWidget,\n ModelSelect2Widget as DS2_ModelSelect2Widget,\n ModelSelect2MultipleWidget as DS2_ModelSelect2MultipleWidget,\n Select2TagWidget as DS2_Select2TagWidget,\... | [
{
"content": "from django_select2.forms import (\n Select2Widget as DS2_Select2Widget,\n Select2MultipleWidget as DS2_Select2MultipleWidget,\n ModelSelect2Widget as DS2_ModelSelect2Widget,\n ModelSelect2MultipleWidget as DS2_ModelSelect2MultipleWidget,\n Select2TagWidget as DS2_Select2TagWidget,\... | diff --git a/amy/workshops/fields.py b/amy/workshops/fields.py
index e5ef0cb4c..aa765f118 100644
--- a/amy/workshops/fields.py
+++ b/amy/workshops/fields.py
@@ -190,7 +190,11 @@ def value_from_datadict(self, data, files, name):
def optgroups(self, name, value, attrs=None):
"""Example from
https:/... |
elastic__apm-agent-python-1740 | [GRPC] Handle the null span case
**Describe the bug**: ...
**To Reproduce**
1. Setup ElasticAPM in Django
2. Integrate with Google PubSub client
3. Try to publish message from your script
4. Stacktrace:
```
Exception in thread Thread-CommitBatchPublisher:
Traceback (most recent call last):
File "/usr/loc... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2022, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2022, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a01ce4e2a..33745c2a6 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -43,7 +43,7 @@ endif::[]
* Small fix to underlying Starlette logic to prevent duplicate Client objects {pull}1735[#1735]
* Change `server_url` default to `http://127.0.0.1:8200... |
pypa__setuptools-753 | Setuptools doesn't play nice with Numpy
See: https://github.com/numpy/numpy/blob/master/numpy/distutils/extension.py#L42-L52
That functionality was broken by:
https://github.com/pypa/setuptools/blob/master/setuptools/extension.py#L39-L41
In this pr: https://github.com/pypa/setuptools/pull/718
Here's the the pdb sess... | [
{
"content": "import sys\nimport re\nimport functools\nimport distutils.core\nimport distutils.errors\nimport distutils.extension\n\nfrom setuptools.extern.six.moves import map\n\nfrom .dist import _get_unpatched\nfrom . import msvc\n\n_Extension = _get_unpatched(distutils.core.Extension)\n\nmsvc.patch_for_spec... | [
{
"content": "import sys\nimport re\nimport functools\nimport distutils.core\nimport distutils.errors\nimport distutils.extension\n\nfrom setuptools.extern.six.moves import map\n\nfrom .dist import _get_unpatched\nfrom . import msvc\n\n_Extension = _get_unpatched(distutils.core.Extension)\n\nmsvc.patch_for_spec... | diff --git a/setuptools/extension.py b/setuptools/extension.py
index da94c3fa6c..f8058b729f 100644
--- a/setuptools/extension.py
+++ b/setuptools/extension.py
@@ -36,9 +36,11 @@ def _have_cython():
class Extension(_Extension):
"""Extension that uses '.c' files in place of '.pyx' files"""
- def __init__(self,... |
zestedesavoir__zds-site-6174 | Doublon pour les logs en couleur dans l'env de dev
Sur mon environnement de dev, les logs en couleur apparaissent en double : dans leur version couleur et puis dans leur version standard.

OS : Ubuntu Bud... | [
{
"content": "from colorlog import ColoredFormatter\n\nfrom .abstract_base import *\n\nDEBUG = True\n\n# NOTE: Can be removed once Django 3 is used\nALLOWED_HOSTS = [\".localhost\", \"127.0.0.1\", \"[::1]\"]\n\nINSTALLED_APPS += (\n \"debug_toolbar\",\n \"django_extensions\",\n)\n\nMIDDLEWARE = (\n \"d... | [
{
"content": "from colorlog import ColoredFormatter\n\nfrom .abstract_base import *\n\nDEBUG = True\n\n# NOTE: Can be removed once Django 3 is used\nALLOWED_HOSTS = [\".localhost\", \"127.0.0.1\", \"[::1]\"]\n\nINSTALLED_APPS += (\n \"debug_toolbar\",\n \"django_extensions\",\n)\n\nMIDDLEWARE = (\n \"d... | diff --git a/zds/settings/dev.py b/zds/settings/dev.py
index ef9a3f237a..ddc63a6e1d 100644
--- a/zds/settings/dev.py
+++ b/zds/settings/dev.py
@@ -55,10 +55,12 @@
"formatter": "django.server",
},
},
+ "root": {
+ "handlers": ["console"],
+ },
"loggers": {
"django": ... |
OpenMined__PySyft-1321 | Implement the Unfold function for IntTensor on the CPU
As a Data Scientist using PySyft's IntTensor type, I want to leverage a wide range of methods which use our new Unity backend. For this ticket to be complete, the unfold() should be added to our IntTensor class with the appropriate functionality, returning a new te... | [
{
"content": "import numpy as np\nimport syft.controller\nfrom .base_tensor import BaseTensor\nfrom .float_tensor import FloatTensor\n\nclass IntTensor(BaseTensor):\n def __init__(self, data, data_is_pointer=False):\n self.controller = syft.controller\n\n if (data is not None and not data_is_po... | [
{
"content": "import numpy as np\nimport syft.controller\nfrom .base_tensor import BaseTensor\nfrom .float_tensor import FloatTensor\n\nclass IntTensor(BaseTensor):\n def __init__(self, data, data_is_pointer=False):\n self.controller = syft.controller\n\n if (data is not None and not data_is_po... | diff --git a/syft/tensor/int_tensor.py b/syft/tensor/int_tensor.py
index 5094aa95ea8..9520dc9a6b7 100644
--- a/syft/tensor/int_tensor.py
+++ b/syft/tensor/int_tensor.py
@@ -404,3 +404,19 @@ def view_(self, *args):
assert type(new_dim[0]) == int
self.params_func("view_", new_dim, return_response=False)... |
web2py__web2py-1803 | parameter of ajax put request is empty in Python 3
I tested the latest version 2.15.2 and I've got a problem when accessing ajax post parameters with web2py under Python 3.
The client sends a PUT request using jquery like this:
`$.ajax('<url>', {
data: JSON.stringify({
outputFormat: 'pdf'
}),
... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n\nContains the classes for the global used variables:\n\n- Request\n- ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n\nContains the classes for the global used variables:\n\n- Request\n- ... | diff --git a/gluon/globals.py b/gluon/globals.py
index cb52d3314..b4344f0f0 100644
--- a/gluon/globals.py
+++ b/gluon/globals.py
@@ -220,7 +220,12 @@ def parse_post_vars(self):
if is_json:
try:
- json_vars = json_parser.load(body)
+ # In Python 3 versions prior to 3... |
pyro-ppl__numpyro-904 | OOM error when using "sequential" chain method on a GPU
As reported by @PaoloRanzi81 in https://github.com/pyro-ppl/numpyro/issues/539, RAM might not free its resources after a chain finished its run, which leads to OOM for complicated models trained in hours.
Some observations so far:
+ This seems to not happen on... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom abc import ABC, abstractmethod\nfrom functools import partial\nfrom operator import attrgetter\nimport os\nimport warnings\n\nfrom jax import jit, lax, local_device_count, pmap, random, vmap\nfrom jax.core... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom abc import ABC, abstractmethod\nfrom functools import partial\nfrom operator import attrgetter\nimport os\nimport warnings\n\nfrom jax import jit, lax, local_device_count, pmap, random, vmap\nfrom jax.core... | diff --git a/numpyro/infer/mcmc.py b/numpyro/infer/mcmc.py
index 836b1c6d4..f8ab76fb0 100644
--- a/numpyro/infer/mcmc.py
+++ b/numpyro/infer/mcmc.py
@@ -200,7 +200,8 @@ class MCMC(object):
.. note:: `chain_method` is an experimental arg, which might be removed in a future version.
- .. note:: Setting `progr... |
cloud-custodian__cloud-custodian-4282 | Azure - Docs missing for VM Images
| [
{
"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | [
{
"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | diff --git a/tools/c7n_azure/c7n_azure/resources/image.py b/tools/c7n_azure/c7n_azure/resources/image.py
index f05b893dc41..2042ab93ff3 100644
--- a/tools/c7n_azure/c7n_azure/resources/image.py
+++ b/tools/c7n_azure/c7n_azure/resources/image.py
@@ -18,6 +18,23 @@
@resources.register('image')
class Image(ArmResource... |
iterative__dvc-3675 | Secsh channel 10 open FAILED: open failed: Connect failed
**Please provide information about your setup**
DVC version(i.e. `dvc --version`), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))
version 0.88.0
installed via pip on Linux and Mac.
Syncing to a Ubuntu ho... | [
{
"content": "import errno\nimport logging\nimport os\nimport posixpath\nimport stat\nfrom contextlib import suppress\n\nfrom funcy import cached_property\n\ntry:\n import paramiko\nexcept ImportError:\n paramiko = None\n\nfrom dvc.utils import tmp_fname\nfrom dvc.progress import Tqdm\nfrom dvc.exceptions... | [
{
"content": "import errno\nimport logging\nimport os\nimport posixpath\nimport stat\nfrom contextlib import suppress\n\nfrom funcy import cached_property\n\ntry:\n import paramiko\nexcept ImportError:\n paramiko = None\n\nfrom dvc.utils import tmp_fname\nfrom dvc.progress import Tqdm\nfrom dvc.exceptions... | diff --git a/dvc/remote/ssh/connection.py b/dvc/remote/ssh/connection.py
index ccfa5d7366..5a5669c351 100644
--- a/dvc/remote/ssh/connection.py
+++ b/dvc/remote/ssh/connection.py
@@ -41,6 +41,14 @@ def __init__(self, host, *args, **kwargs):
self.timeout = kwargs.get("timeout", 1800)
self._ssh = para... |
optuna__optuna-1627 | Fix docstrings
`Sphinx>=3.1.0` doesn't build our documentation for some reason (I guess our `experimental` and `deprecated` decorators are the devils, not sure though).
At first, as https://github.com/optuna/optuna/issues/1368 said, we were optimistic about this, i.e., we thought the next stable would work. However,... | [
{
"content": "import os\nimport sys\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\n\n\ndef get_version() -> str:\n\n version_filepath = os.path.join(os.path.dirname(__file__), \"optu... | [
{
"content": "import os\nimport sys\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\n\n\ndef get_version() -> str:\n\n version_filepath = os.path.join(os.path.dirname(__file__), \"optu... | diff --git a/setup.py b/setup.py
index 74d8dc2cfc..5d56d9d000 100644
--- a/setup.py
+++ b/setup.py
@@ -63,8 +63,8 @@ def get_extras_require() -> Dict[str, List[str]]:
],
"document": [
# TODO(hvy): Unpin `sphinx` version after:
- # https://github.com/sphinx-doc/sphinx/issues/780... |
huggingface__accelerate-1268 | Question/Bug about `accelerator.reduce` on single GPU
### System Info
```Shell
- `Accelerate` version: 0.18.0
- Platform: Linux-4.15.0-45-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.13
- Numpy version: 1.21.5
- PyTorch version (GPU?): 1.13.0 (True)
- `Accelerate` default config:
Not foun... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/accelerate/utils/operations.py b/src/accelerate/utils/operations.py
index a65ff898ec1..64de7d913ef 100644
--- a/src/accelerate/utils/operations.py
+++ b/src/accelerate/utils/operations.py
@@ -434,10 +434,7 @@ def _reduce_across_processes(tensor, reduction="mean"):
state = PartialState()
... |
scipy__scipy-10559 | linprog: Differents solution with scipy 0.19.1 vs 1.2.1
<!--
Thank you for taking the time to report a SciPy issue.
Please describe the issue in detail, and for bug reports
fill in the fields below. You can delete the sections that
don't apply to your issue. You can view the final output
by clicking the preview ... | [
{
"content": "\"\"\"\nRoutines for removing redundant (linearly dependent) equations from linear\nprogramming equality constraints.\n\"\"\"\n# Author: Matt Haberland\n\nfrom __future__ import division, print_function, absolute_import\nimport numpy as np\nfrom scipy.linalg import svd\nimport scipy\n\n\ndef _row_... | [
{
"content": "\"\"\"\nRoutines for removing redundant (linearly dependent) equations from linear\nprogramming equality constraints.\n\"\"\"\n# Author: Matt Haberland\n\nfrom __future__ import division, print_function, absolute_import\nimport numpy as np\nfrom scipy.linalg import svd\nimport scipy\n\n\ndef _row_... | diff --git a/scipy/optimize/_remove_redundancy.py b/scipy/optimize/_remove_redundancy.py
index 9212ddaeab12..c5aa574498d6 100644
--- a/scipy/optimize/_remove_redundancy.py
+++ b/scipy/optimize/_remove_redundancy.py
@@ -432,7 +432,7 @@ def _remove_redundancy(A, b):
"off redundancy removal, or try... |
ipython__ipython-9833 | AttributeError: 'StreamLogger' object has no attribute 'isatty'
OS: macOS 10.11.6
Python version: Python 2.7.10
ipython version: IPython 5.0.0
Scrapy project with settings:
`LOG_STDOUT = True`
which redirects stdout to log
```
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/scrapy/utils/d... | [
{
"content": "\"\"\"IPython terminal interface using prompt_toolkit\"\"\"\nfrom __future__ import print_function\n\nimport os\nimport sys\nimport warnings\nfrom warnings import warn\n\nfrom IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC\nfrom IPython.utils import io\nfrom IPython.uti... | [
{
"content": "\"\"\"IPython terminal interface using prompt_toolkit\"\"\"\nfrom __future__ import print_function\n\nimport os\nimport sys\nimport warnings\nfrom warnings import warn\n\nfrom IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC\nfrom IPython.utils import io\nfrom IPython.uti... | diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py
index 6ce7709ab94..077d92c9c42 100644
--- a/IPython/terminal/interactiveshell.py
+++ b/IPython/terminal/interactiveshell.py
@@ -74,11 +74,17 @@ def get_default_editor():
else:
return 'notepad' # same in Windows!
-
-... |
DDMAL__CantusDB-759 | Hide "Edit chants (Fulltext & Volpiano editor)" link from my sources sidebar on flatpages
To prevent encountering a 404 error, we should hide the link from the "My Sources" sidebar on flatpages when the corresponding source has no chants.
| [
{
"content": "import calendar\nfrom typing import Union, Optional\nfrom django import template\nfrom main_app.models import Source\nfrom articles.models import Article\nfrom django.utils.safestring import mark_safe\nfrom django.urls import reverse\nfrom django.core.paginator import Paginator\n\n\nregister = tem... | [
{
"content": "import calendar\nfrom typing import Union, Optional\nfrom django import template\nfrom main_app.models import Source\nfrom articles.models import Article\nfrom django.utils.safestring import mark_safe\nfrom django.urls import reverse\nfrom django.core.paginator import Paginator\n\n\nregister = tem... | diff --git a/django/cantusdb_project/main_app/templatetags/helper_tags.py b/django/cantusdb_project/main_app/templatetags/helper_tags.py
index 9e0c335e3..99618864f 100644
--- a/django/cantusdb_project/main_app/templatetags/helper_tags.py
+++ b/django/cantusdb_project/main_app/templatetags/helper_tags.py
@@ -73,7 +73,10... |
huggingface__diffusers-8271 | AttributeError: 'NoneType' object has no attribute 'flush'
### Describe the bug
I have a python program that I have converted into an exe file using PyInstaller. I have the latest versions of Diffusers and Transformers library which are 0.16.1 and 4.28.1 respectively. When I run the exe file, I get this error: Attribu... | [
{
"content": "# coding=utf-8\n# Copyright 2024 Optuna, Hugging Face\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# Un... | [
{
"content": "# coding=utf-8\n# Copyright 2024 Optuna, Hugging Face\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# Un... | diff --git a/src/diffusers/utils/logging.py b/src/diffusers/utils/logging.py
index 2e80d30f1311..6f93450c410c 100644
--- a/src/diffusers/utils/logging.py
+++ b/src/diffusers/utils/logging.py
@@ -82,7 +82,9 @@ def _configure_library_root_logger() -> None:
# This library has already configured the library ro... |
pandas-dev__pandas-27300 | ENH: maybe_convert_objects seen NaT speed-up
I believe after `seen.object_ = 1` here:
https://github.com/pandas-dev/pandas/blob/c64c9cb44222a42f7b02d4d6007919cd0645f1be/pandas/_libs/lib.pyx#L1956-L1958
should go `break` as well.
Test:
```python
size = 10**7
arr = list(range(size))
arr[0] = pd.NaT
arr = np.arr... | [
{
"content": "from importlib import import_module\n\nimport numpy as np\n\nimport pandas as pd\nfrom pandas.util import testing as tm\n\nfor imp in [\"pandas.util\", \"pandas.tools.hashing\"]:\n try:\n hashing = import_module(imp)\n break\n except (ImportError, TypeError, ValueError):\n ... | [
{
"content": "from importlib import import_module\n\nimport numpy as np\n\nfrom pandas._libs import lib\n\nimport pandas as pd\nfrom pandas.util import testing as tm\n\nfor imp in [\"pandas.util\", \"pandas.tools.hashing\"]:\n try:\n hashing = import_module(imp)\n break\n except (ImportError... | diff --git a/asv_bench/benchmarks/algorithms.py b/asv_bench/benchmarks/algorithms.py
index 436093ef195ef..7d97f2c740acb 100644
--- a/asv_bench/benchmarks/algorithms.py
+++ b/asv_bench/benchmarks/algorithms.py
@@ -2,6 +2,8 @@
import numpy as np
+from pandas._libs import lib
+
import pandas as pd
from pandas.util ... |
cornellius-gp__gpytorch-1368 | [Bug] Resize error thrown when using Batch Independent Multi Output
# 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
Essentially I tried to take a crack at implementing the `from_batch_mvn` style for Batch Independent Multi Output GP based on the tutorial: https://docs.gpytorch.ai/en/v1.2.1/exa... | [
{
"content": "#!/usr/bin/env python3\n\nimport functools\nimport string\n\nimport torch\n\nfrom .. import settings\nfrom ..lazy import (\n BatchRepeatLazyTensor,\n ConstantMulLazyTensor,\n InterpolatedLazyTensor,\n LazyEvaluatedKernelTensor,\n MatmulLazyTensor,\n NonLazyTensor,\n RootLazyTe... | [
{
"content": "#!/usr/bin/env python3\n\nimport functools\nimport string\n\nimport torch\n\nfrom .. import settings\nfrom ..lazy import (\n BatchRepeatLazyTensor,\n ConstantMulLazyTensor,\n InterpolatedLazyTensor,\n LazyEvaluatedKernelTensor,\n MatmulLazyTensor,\n NonLazyTensor,\n RootLazyTe... | diff --git a/gpytorch/models/exact_prediction_strategies.py b/gpytorch/models/exact_prediction_strategies.py
index 2dd751157..5fb5c25cf 100644
--- a/gpytorch/models/exact_prediction_strategies.py
+++ b/gpytorch/models/exact_prediction_strategies.py
@@ -37,7 +37,7 @@ class DefaultPredictionStrategy(object):
def __i... |
ietf-tools__datatracker-6589 | Disclaimer banner for unadopted I-Ds
### Description
(The design and text of this enhancement has the consensus of the IESG, and concurrence of the IETF, IAB, IRTF and ISE stream managers)
Create a banner in the datatracker with the following text when the draft is active and the "RFC Stream" field = "None":
==[... | [
{
"content": "# Copyright The IETF Trust 2007-2023, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport datetime\nimport re\nfrom urllib.parse import urljoin\nfrom zoneinfo import ZoneInfo\n\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.html import escape\nfrom django.te... | [
{
"content": "# Copyright The IETF Trust 2007-2023, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport datetime\nimport re\nfrom urllib.parse import urljoin\nfrom zoneinfo import ZoneInfo\n\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.html import escape\nfrom django.te... | diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py
index 8d9336b536..053aaf0f69 100644
--- a/ietf/doc/templatetags/ietf_filters.py
+++ b/ietf/doc/templatetags/ietf_filters.py
@@ -877,3 +877,28 @@ def badgeify(blob):
)
return text
+
+
+@register.filter
+def is_... |
microsoft__hi-ml-78 | Make the package tag-line on PyPi more concrete
Javier pointed out that our tagline, _Microsoft Health Intelligence AzureML helpers_, on https://pypi.org/manage/project/hi-ml/releases/ is too generic.
| [
{
"content": "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# ------------------------------------------... | [
{
"content": "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# ------------------------------------------... | diff --git a/setup.py b/setup.py
index 9ca82a60c..529df87fe 100644
--- a/setup.py
+++ b/setup.py
@@ -59,10 +59,12 @@
# Remove any whitespace and blank lines
install_requires = [line.strip() for line in install_requires if line.strip()]
+description = 'Microsoft Health Intelligence package to elevate and monitor scr... |
scverse__scanpy-2686 | PCA color fails when return_fig = True and annotate_var_explained = True
### Please make sure these conditions are met
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of scanpy.
- [X] (optional) I have confirmed this bug exists on the... | [
{
"content": "import collections.abc as cabc\nfrom copy import copy\nfrom numbers import Integral\nfrom itertools import combinations, product\nfrom typing import (\n Collection,\n Union,\n Optional,\n Sequence,\n Any,\n Mapping,\n List,\n Tuple,\n Literal,\n)\nfrom warnings import wa... | [
{
"content": "import collections.abc as cabc\nfrom copy import copy\nfrom numbers import Integral\nfrom itertools import combinations, product\nfrom typing import (\n Collection,\n Union,\n Optional,\n Sequence,\n Any,\n Mapping,\n List,\n Tuple,\n Literal,\n)\nfrom warnings import wa... | diff --git a/scanpy/plotting/_tools/scatterplots.py b/scanpy/plotting/_tools/scatterplots.py
index 592683b7d5..65155817b3 100644
--- a/scanpy/plotting/_tools/scatterplots.py
+++ b/scanpy/plotting/_tools/scatterplots.py
@@ -886,8 +886,10 @@ def pca(
# edit axis labels in returned figure
fig = e... |
getnikola__nikola-1133 | utils.get_root_dir() should not be run for import_* and init
Here’s a fun thing you can try at home:
``` console
$ cd /tmp
$ nikola init site_1
[2014-03-14T15:39:05Z] INFO: init: Created empty site at site_1.
$ cd site_1
$ mkdir subdir
$ cd subdir
$ nikola init site_2
[2014-03-14T15:39:41Z] INFO: init: Created empty s... | [
{
"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 30b11b37ec..4006b8ee52 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -40,6 +40,10 @@ Features
Bugfixes
--------
+* The ``init`` command and the importers now always output to the CWD.
+ Previously, if you had a ``conf.py`` file higher in the directory structure,
+ Niko... |
sunpy__sunpy-5293 | Provide an example of splitting sections of an attr query out of the Fido.search method.
@Cadair's had this snippet of code
``` python
import datetime
from sunpy.net import vso
from sunpy.time import parse_time
# Start time and end time for the AIA search
start = parse_time('2014/07/17T10:01:30')
stop = star... | [
{
"content": "\"\"\"\n======================================\nSearching and downloading from the VSO\n======================================\n\nHow to download data from the VSO with Fido.\n\"\"\"\nimport astropy.units as u\n\nfrom sunpy.net import Fido\nfrom sunpy.net import attrs as a\n\n#####################... | [
{
"content": "\"\"\"\n======================================\nSearching and downloading from the VSO\n======================================\n\nHow to download data from the VSO with Fido.\n\"\"\"\nimport astropy.units as u\n\nfrom sunpy.net import Fido\nfrom sunpy.net import attrs as a\n\n#####################... | diff --git a/examples/acquiring_data/searching_vso.py b/examples/acquiring_data/searching_vso.py
index a5ef03a1e2e..002925c245e 100644
--- a/examples/acquiring_data/searching_vso.py
+++ b/examples/acquiring_data/searching_vso.py
@@ -41,3 +41,15 @@
a.Instrument.aia,
a.Waveleng... |
django-cms__django-cms-3012 | Page is not reloaded on template change
Changing template from the toolbar does not reload the page. Template is changed correctly
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse, NoReverseMatch\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse, NoReverseMatch\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models ... | diff --git a/cms/cms_toolbar.py b/cms/cms_toolbar.py
index 0d26e3a6c13..2d5eb090f75 100644
--- a/cms/cms_toolbar.py
+++ b/cms/cms_toolbar.py
@@ -345,7 +345,8 @@ def add_page_menu(self):
active = self.page.template == path
if path == TEMPLATE_INHERITANCE_MAGIC:
temp... |
mindsdb__lightwood-968 | Improve runtime of `LightGBMArray` for long-horizon forecasting
Two main approaches:
- Disable optuna hyperparam search past some threshold.
- Opt for a recursive strategy instead of direct (i.e. same regressor trained for all timesteps v/s one for each step).
| [
{
"content": "from copy import deepcopy\nfrom typing import Dict, List, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom lightwood.helpers.log import log\nfrom lightwood.mixer.helpers.ts import _apply_stl_on_training, _stl_transform, _stl_inverse_transform\nfrom lightwood.encoder.base import BaseEncoder... | [
{
"content": "from copy import deepcopy\nfrom typing import Dict, List, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom lightwood.helpers.log import log\nfrom lightwood.mixer.helpers.ts import _apply_stl_on_training, _stl_transform, _stl_inverse_transform\nfrom lightwood.encoder.base import BaseEncoder... | diff --git a/lightwood/mixer/lightgbm_array.py b/lightwood/mixer/lightgbm_array.py
index 56f27781e..ae8439836 100644
--- a/lightwood/mixer/lightgbm_array.py
+++ b/lightwood/mixer/lightgbm_array.py
@@ -49,7 +49,7 @@ def __init__(
dtype_dict,
input_cols,
... |
cisagov__manage.get.gov-509 | Miscellaneous Design Tweaks to Registrar
- [ ] Style fine tuning on the form
- [ ] Fixing up some odd spacing and position
| [
{
"content": "import logging\nimport random\nfrom faker import Faker\n\nfrom registrar.models import (\n User,\n DomainApplication,\n Domain,\n Contact,\n Website,\n)\n\nfake = Faker()\nlogger = logging.getLogger(__name__)\n\n\nclass UserFixture:\n \"\"\"\n Load users into the database.\n\n... | [
{
"content": "import logging\nimport random\nfrom faker import Faker\n\nfrom registrar.models import (\n User,\n DomainApplication,\n Domain,\n Contact,\n Website,\n)\n\nfake = Faker()\nlogger = logging.getLogger(__name__)\n\n\nclass UserFixture:\n \"\"\"\n Load users into the database.\n\n... | diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 02bd94e1f..13f9a48c0 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -33,7 +33,7 @@ jobs:
run: docker compose run app python manage.py test
pa11y-scan:
- runs-on: ubuntu-latest
+ runs-on: ubunt... |
python-pillow__Pillow-6718 | Failed to build Windows ARM64 dependencies
<!--
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.co... | [
{
"content": "import os\nimport platform\nimport re\nimport shutil\nimport struct\nimport subprocess\nimport sys\n\n\ndef cmd_cd(path):\n return f\"cd /D {path}\"\n\n\ndef cmd_set(name, value):\n return f\"set {name}={value}\"\n\n\ndef cmd_append(name, value):\n op = \"path \" if name == \"PATH\" else ... | [
{
"content": "import os\nimport platform\nimport re\nimport shutil\nimport struct\nimport subprocess\nimport sys\n\n\ndef cmd_cd(path):\n return f\"cd /D {path}\"\n\n\ndef cmd_set(name, value):\n return f\"set {name}={value}\"\n\n\ndef cmd_append(name, value):\n op = \"path \" if name == \"PATH\" else ... | diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py
index 5277b84f81c..9f1e74e530f 100644
--- a/winbuild/build_prepare.py
+++ b/winbuild/build_prepare.py
@@ -323,6 +323,11 @@ def cmd_msbuild(
"filename": "openjpeg-2.5.0.tar.gz",
"dir": "openjpeg-2.5.0",
"license": "LICENSE",
+ ... |
coala__coala-5093 | ConfigurationGathering.py: Fix docstring of function warn_config_absent()
return values of True and False are interchanged
difficulty/newcomer
| [
{
"content": "import os\nimport sys\nimport logging\n\nfrom coalib.collecting.Collectors import (\n collect_all_bears_from_sections, filter_section_bears_by_languages)\nfrom coalib.bearlib.languages.Language import Language, UnknownLanguageError\nfrom coalib.misc import Constants\nfrom coalib.output.ConfWrit... | [
{
"content": "import os\nimport sys\nimport logging\n\nfrom coalib.collecting.Collectors import (\n collect_all_bears_from_sections, filter_section_bears_by_languages)\nfrom coalib.bearlib.languages.Language import Language, UnknownLanguageError\nfrom coalib.misc import Constants\nfrom coalib.output.ConfWrit... | diff --git a/coalib/settings/ConfigurationGathering.py b/coalib/settings/ConfigurationGathering.py
index 53d1010c7b..2cd96bcef2 100644
--- a/coalib/settings/ConfigurationGathering.py
+++ b/coalib/settings/ConfigurationGathering.py
@@ -194,8 +194,8 @@ def warn_config_absent(sections, argument, log_printer=None):
:p... |
networkx__networkx-3356 | Error message
The file networkx/generators/directed.py, line 262, the debug message is Wrong
Error message
The file networkx/generators/directed.py, line 262, the debug message is Wrong
| [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2006-2018 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# Copyright (C) 2009 by Willem Ligtenberg <W.P.A.Ligtenberg@tue.nl>\n# All rights reserved.\n# BSD license.\n#\n# Authors: Aric Hagbe... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2006-2018 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# Copyright (C) 2009 by Willem Ligtenberg <W.P.A.Ligtenberg@tue.nl>\n# All rights reserved.\n# BSD license.\n#\n# Authors: Aric Hagbe... | diff --git a/networkx/generators/directed.py b/networkx/generators/directed.py
index 9c5e354a57d..4356255cf29 100644
--- a/networkx/generators/directed.py
+++ b/networkx/generators/directed.py
@@ -255,11 +255,11 @@ def _choose_node(G, distribution, delta, psum):
raise nx.NetworkXError("MultiDiGraph required in... |
electricitymaps__electricitymaps-contrib-1631 | FR: key coal has negative value -9.0
```
invalid point: {'zoneKey': 'FR', 'datetime': datetime.datetime(2018, 10, 9, 11, 15, tzinfo=tzoffset(None, 7200)), 'production': {'nuclear': 41740.0, 'coal': -9.0, 'gas': 4057.0, 'oil': 188.0, 'wind': 1158.0, 'solar': 2762.0, 'biomass': 861.0, 'hydro': 3366.0}, 'storage': {'hydr... | [
{
"content": "#!/usr/bin/env python3\n\nimport arrow\nimport json\nimport logging\nimport os\nimport math\n\nimport pandas as pd\nimport requests\nimport xml.etree.ElementTree as ET\n\nAPI_ENDPOINT = 'https://opendata.reseaux-energies.fr/api/records/1.0/search/'\n\nMAP_GENERATION = {\n 'nucleaire': 'nuclear'... | [
{
"content": "#!/usr/bin/env python3\n\nimport arrow\nimport json\nimport logging\nimport os\nimport math\n\nimport pandas as pd\nimport requests\nimport xml.etree.ElementTree as ET\n\nAPI_ENDPOINT = 'https://opendata.reseaux-energies.fr/api/records/1.0/search/'\n\nMAP_GENERATION = {\n 'nucleaire': 'nuclear'... | diff --git a/parsers/FR.py b/parsers/FR.py
index 36a3b9116e..6ee250722f 100644
--- a/parsers/FR.py
+++ b/parsers/FR.py
@@ -75,7 +75,12 @@ def fetch_production(zone_key='FR', session=None, target_datetime=None,
for row in df.iterrows():
production = dict()
for key, value in MAP_GENERATION.items():... |
urllib3__urllib3-2816 | Make our downstream integration tests re-runnable
Currently our downstream tests both clone a git repository into the venv created by nox. Due to how the setup is written the nox session will fail when run a second time due to the repository already existing. It would be nice to be able to run:
`$ nox -rs downstream... | [
{
"content": "import os\nimport shutil\nimport subprocess\nimport sys\n\nimport nox\n\nSOURCE_FILES = [\n \"docs/\",\n \"dummyserver/\",\n \"src/\",\n \"test/\",\n \"noxfile.py\",\n \"setup.py\",\n]\n\n\ndef tests_impl(\n session: nox.Session,\n extras: str = \"socks,secure,brotli,zstd\"... | [
{
"content": "import os\nimport shutil\nimport subprocess\nimport sys\n\nimport nox\n\nSOURCE_FILES = [\n \"docs/\",\n \"dummyserver/\",\n \"src/\",\n \"test/\",\n \"noxfile.py\",\n \"setup.py\",\n]\n\n\ndef tests_impl(\n session: nox.Session,\n extras: str = \"socks,secure,brotli,zstd\"... | diff --git a/noxfile.py b/noxfile.py
index 09bc18ffb6..6d51e83da3 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -89,7 +89,21 @@ def test_brotlipy(session: nox.Session) -> None:
def git_clone(session: nox.Session, git_url: str) -> None:
- session.run("git", "clone", "--depth", "1", git_url, external=True)
+ """... |
pyro-ppl__numpyro-1197 | Clarify that `sample(..., obs_mask)` is only used for SVI
to avoid confusion as in this [forum thread](https://forum.pyro.ai/t/bayesian-imputation/3443).
| [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom collections import namedtuple\nfrom contextlib import ExitStack, contextmanager\nimport functools\nimport warnings\n\nimport jax\nfrom jax import lax, random\nimport jax.numpy as jnp\n\nimport numpyro\nfro... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom collections import namedtuple\nfrom contextlib import ExitStack, contextmanager\nimport functools\nimport warnings\n\nimport jax\nfrom jax import lax, random\nimport jax.numpy as jnp\n\nimport numpyro\nfro... | diff --git a/numpyro/primitives.py b/numpyro/primitives.py
index adf014878..bb2e67d2c 100644
--- a/numpyro/primitives.py
+++ b/numpyro/primitives.py
@@ -128,7 +128,8 @@ def sample(
broadcastable with ``fn.batch_shape``. If provided, events with
mask=True will be conditioned on ``obs`` and remaining ev... |
Kinto__kinto-1196 | Crash in PostgreSQL when filtering with empty value (v6.0.5)
With querystring `?last_modified=`
Error
```
(psycopg2.DataError) invalid input syntax for type numeric: ""
```
From this `get_all()` query
```
AND (data->>%(filters_field_0_0)s)::numeric = %(filters_value_0)s
```
that becomes:
```
...
AND (dat... | [
{
"content": "import logging\nimport os\nimport warnings\nfrom collections import defaultdict\n\nfrom kinto.core.storage import (\n StorageBase, exceptions,\n DEFAULT_ID_FIELD, DEFAULT_MODIFIED_FIELD, DEFAULT_DELETED_FIELD)\nfrom kinto.core.storage.postgresql.client import create_from_config\nfrom kinto.c... | [
{
"content": "import logging\nimport os\nimport warnings\nfrom collections import defaultdict\n\nfrom kinto.core.storage import (\n StorageBase, exceptions,\n DEFAULT_ID_FIELD, DEFAULT_MODIFIED_FIELD, DEFAULT_DELETED_FIELD)\nfrom kinto.core.storage.postgresql.client import create_from_config\nfrom kinto.c... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 5cf0aaed8..4fb1d2eae 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -70,6 +70,7 @@ Protocol is now at version **1.16**. See `API changelog`_.
bucket (#1137)
- Removed Structlog binding and bottlenecks (fixes #603)
- Fixed Swagger output with subpath and regex in ... |
mlflow__mlflow-9044 | [BUG] input_example DataFrame type is always "split" no matter the format of the saved example
### Issues Policy acknowledgement
- [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)
### Willingness to contribute
Yes... | [
{
"content": "import decimal\nimport json\nimport logging\nimport os\nfrom typing import Any, Dict, List, Optional, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom mlflow.exceptions import INVALID_PARAMETER_VALUE, MlflowException\nfrom mlflow.models import Model\nfrom mlflow.store.artifact.utils.models... | [
{
"content": "import decimal\nimport json\nimport logging\nimport os\nfrom typing import Any, Dict, List, Optional, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom mlflow.exceptions import INVALID_PARAMETER_VALUE, MlflowException\nfrom mlflow.models import Model\nfrom mlflow.store.artifact.utils.models... | diff --git a/mlflow/models/utils.py b/mlflow/models/utils.py
index 59c56e5dbd4ec..1feeff42e2764 100644
--- a/mlflow/models/utils.py
+++ b/mlflow/models/utils.py
@@ -208,10 +208,11 @@ def _handle_dataframe_input(df):
f"but got '{type(input_example)}'",
)
self.data = _ha... |
ibis-project__ibis-4602 | bug: `.visualize(label_edges=True)` case ops.NodeList we get ValueError tuple.index(x): x not in tuple
Hi,
There's still one small thing that needs fixing in the great `.visualize(label_edges=True)` feature 😄 :
When running...
```py
import ibis
t = ibis.table((("a", "int32"), ("b", "string")))
expr = t[(t["a... | [
{
"content": "import sys\nimport tempfile\nfrom html import escape\n\nimport graphviz as gv\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.operations as ops\nfrom ibis.common.graph import Graph\n\n\ndef get_type(node):\n try:\n return str(node.output_dtype)\n except (Attribu... | [
{
"content": "import sys\nimport tempfile\nfrom html import escape\n\nimport graphviz as gv\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.operations as ops\nfrom ibis.common.graph import Graph\n\n\ndef get_type(node):\n try:\n return str(node.output_dtype)\n except (Attribu... | diff --git a/ibis/expr/visualize.py b/ibis/expr/visualize.py
index 90289aa191f4..2bab4486e173 100644
--- a/ibis/expr/visualize.py
+++ b/ibis/expr/visualize.py
@@ -114,10 +114,11 @@ def to_graph(expr, node_attr=None, edge_attr=None, label_edges: bool = False):
if not label_edges:
la... |
kymatio__kymatio-189 | [DOC] solving Sphinx issues
W.r.t.:
Issues: #97 #110 #135 #105 #106 #108 #111
PR: #144
We must find a way to remove the list of "ignore-patterns" here:
https://github.com/eickenberg/kymatio/blob/master/doc/source/conf.py#L61
At the moment we do this, and that the sphinx works, then we will be good with th... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------... | diff --git a/doc/source/conf.py b/doc/source/conf.py
index f5c3de2bd..1017d6f1b 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -58,7 +58,7 @@
# path where to save gallery generated examples
'gallery_dirs': ['gallery_1d','gallery_2d','gallery_3d'],
'ignore_pattern':
- '__init__.py|mnist.py... |
saulpw__visidata-967 | no loader for url scheme: postgresql
**Small description**
When attempting to start visidata with
```
vd postgresql:///localdb
```
it fails with
```
Error: no loader for url scheme: postgresql
```
**Expected result**
I would have expected it to work the same way
```
vd postgres:///localdb
```
works... | [
{
"content": "from visidata import *\n\n__all__ = ['openurl_postgres', 'openurl_rds', 'PgTable', 'PgTablesSheet']\n\noption('postgres_schema', 'public', 'The desired schema for the Postgres database')\n\ndef codeToType(type_code, colname):\n import psycopg2\n try:\n tname = psycopg2._psycopg.string... | [
{
"content": "from visidata import *\n\n__all__ = ['openurl_postgres', 'openurl_postgresql', 'openurl_rds', 'PgTable', 'PgTablesSheet']\n\noption('postgres_schema', 'public', 'The desired schema for the Postgres database')\n\ndef codeToType(type_code, colname):\n import psycopg2\n try:\n tname = ps... | diff --git a/visidata/loaders/postgres.py b/visidata/loaders/postgres.py
index e600c067a..53e4a9663 100644
--- a/visidata/loaders/postgres.py
+++ b/visidata/loaders/postgres.py
@@ -1,6 +1,6 @@
from visidata import *
-__all__ = ['openurl_postgres', 'openurl_rds', 'PgTable', 'PgTablesSheet']
+__all__ = ['openurl_postg... |
wagtail__wagtail-10209 | Tests fail against Django's `main` (5.0) branch
<!--
Found a bug? Please fill out the sections below. 👍
-->
### Issue Summary
Our tests seem to fail against Django's `main` branch with `AttributeError: 'IndexView' object has no attribute 'add_facets'` as of a few days ago.
Possible cause: https://github.com... | [
{
"content": "import warnings\nfrom collections import OrderedDict\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.admin import FieldListFilter\nfrom django.contrib.admin.options import IncorrectLookupParameters\nfrom django.contrib.admin.utils import (\n get_fields_from_pa... | [
{
"content": "import warnings\nfrom collections import OrderedDict\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.admin import FieldListFilter\nfrom django.contrib.admin.options import IncorrectLookupParameters\nfrom django.contrib.admin.utils import (\n get_fields_from_pa... | diff --git a/wagtail/contrib/modeladmin/views.py b/wagtail/contrib/modeladmin/views.py
index e43dbf8219c2..26afceb24e6a 100644
--- a/wagtail/contrib/modeladmin/views.py
+++ b/wagtail/contrib/modeladmin/views.py
@@ -316,6 +316,10 @@ class IndexView(SpreadsheetExportMixin, WMABaseView):
# template tag - see https://... |
translate__pootle-6742 | Pootle FS --overwrite doesn't work in default case
# Steps to reproduce:
Simple project with `one.po` file, changed in both Pootle and FS. Wanting to discard all of Pootle and keep the FS version.
```
(pootle)~/dev/pootle/pootle/translations $ pootle fs state pfs
Conflicts (1)
-------------
Both Pootle Store... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport logging... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport logging... | diff --git a/pootle/apps/pootle_fs/plugin.py b/pootle/apps/pootle_fs/plugin.py
index 72d0fab77cb..fc52a6408df 100644
--- a/pootle/apps/pootle_fs/plugin.py
+++ b/pootle/apps/pootle_fs/plugin.py
@@ -315,10 +315,10 @@ def resolve(self, state, response, fs_path=None, pootle_path=None,
kwargs = {}
if pootl... |
dask__distributed-3468 | `last_seen` in worker info page
When workers die or halted it can be useful to see when that worker was last seen by the scheduler. We should bubble this information up to the dashboard
> client.scheduler_info()
```
'tcp://172.17.0.2:43161': {'type': 'Worker',
'id': 'tcp://172.17.0.2:43161',
'host': '172.... | [
{
"content": "from datetime import datetime\nfrom functools import partial\nimport os\nimport os.path\nimport json\nimport logging\n\nimport dask\nfrom dask.utils import format_bytes\n\ntry:\n from cytoolz import merge, merge_with\nexcept ImportError:\n from toolz import merge, merge_with\n\nfrom tornado ... | [
{
"content": "from datetime import datetime\nfrom functools import partial\nimport os\nimport os.path\nimport json\nimport logging\n\nimport dask\nfrom dask.utils import format_bytes\n\ntry:\n from cytoolz import merge, merge_with\nexcept ImportError:\n from toolz import merge, merge_with\n\nfrom tornado ... | diff --git a/distributed/dashboard/scheduler.py b/distributed/dashboard/scheduler.py
index 17e150e8df9..836cefbbd6c 100644
--- a/distributed/dashboard/scheduler.py
+++ b/distributed/dashboard/scheduler.py
@@ -50,12 +50,14 @@
from .proxy import GlobalProxyHandler
from .utils import RequestHandler, redirect
from ..dia... |
pypa__virtualenv-2722 | zipapp virtual environment creation fails if zipapp path is symlinked
# Issue
On a fresh new system, trying to use the zipapp to setup a virtualenv when the pyz files is referenced by a symlink, it fails saying `KeyError: "There is no item named 'nv/create/via_global_ref/_virtualenv.py' in the archive"`
## But it... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport os\nimport zipfile\n\nfrom virtualenv.info import IS_WIN, ROOT\n\n\ndef read(full_path):\n sub_file = _get_path_within_zip(full_path)\n with zipfile.ZipFile(ROOT, \"r\") as zip_file, zip_file.open(sub_file) as file_handler:\n ... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport os\nimport zipfile\n\nfrom virtualenv.info import IS_WIN, ROOT\n\n\ndef read(full_path):\n sub_file = _get_path_within_zip(full_path)\n with zipfile.ZipFile(ROOT, \"r\") as zip_file, zip_file.open(sub_file) as file_handler:\n ... | diff --git a/docs/changelog/1949.bugfix.rst b/docs/changelog/1949.bugfix.rst
new file mode 100644
index 000000000..fa77dc9b9
--- /dev/null
+++ b/docs/changelog/1949.bugfix.rst
@@ -0,0 +1 @@
+``virtualenv.pyz`` no longer fails when zipapp path contains a symlink - by :user:`HandSonic` and :user:`petamas`.
diff --git a/s... |
opsdroid__opsdroid-184 | API.AI Error when network is disconnected
The following error should be caught and warned about cleanly.
```
ERROR asyncio: Task exception was never retrieved
future: <Task finished coro=<parse_apiai() done, defined at /Users/jacob/Projects/opsdroid/opsdroid/opsdroid/parsers/apiai.py:34> exception=ClientConnectorE... | [
{
"content": "\"\"\"A helper function for parsing and executing api.ai skills.\"\"\"\n\nimport logging\nimport json\n\nimport aiohttp\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nasync def call_apiai(message, config):\n \"\"\"Call the api.ai api and return the response.\"\"\"\n async with aiohttp.Clien... | [
{
"content": "\"\"\"A helper function for parsing and executing api.ai skills.\"\"\"\n\nimport logging\nimport json\n\nimport aiohttp\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nasync def call_apiai(message, config):\n \"\"\"Call the api.ai api and return the response.\"\"\"\n async with aiohttp.Clien... | diff --git a/opsdroid/parsers/apiai.py b/opsdroid/parsers/apiai.py
index 98f103037..13165b535 100644
--- a/opsdroid/parsers/apiai.py
+++ b/opsdroid/parsers/apiai.py
@@ -38,8 +38,11 @@ async def parse_apiai(opsdroid, message, config):
# halt the application. If a skill throws an exception it just doesn't
# giv... |
open-telemetry__opentelemetry-python-contrib-847 | Partial celery task time limit is not support
Python 3.8
**Steps to reproduce**
- Create celery task with only one of the time limit soft/hard
Or use this test to reproduce:
`instrumentation/opentelemetry-instrumentation-celery/tests/test_utils.py`
```python
def test_set_attributes_partial_timelimit_har... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 450c13f20b..93438f3b44 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-flask` Flask: Conditionally create SERVER spans
([#828](https://g... |
keras-team__autokeras-1382 | function _convert_to_dataset returned result is incorrect
### Bug Description
When validation_data is tf.data.Dataset, validation_data will be assigned to dataset (training data), the dataset returned is the same as validation_data.
The code below
[https://github.com/keras-team/autokeras/blob/68dffdb7abfc97696a256... | [
{
"content": "# Copyright 2020 The AutoKeras 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 ... | [
{
"content": "# Copyright 2020 The AutoKeras 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 ... | diff --git a/autokeras/auto_model.py b/autokeras/auto_model.py
index fddc4fae7..52afa9f74 100644
--- a/autokeras/auto_model.py
+++ b/autokeras/auto_model.py
@@ -375,9 +375,8 @@ def _convert_to_dataset(self, x, y, validation_data, batch_size):
if validation_data:
self._check_data_format(validation_... |
e2nIEE__pandapower-545 | Cryptic error if plotly is not installed
A call to `simple_plotly` (as in e.g. the tutorial notebook `plotly_built-in`) fails with
``` python
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in
----> 1 simp... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2019 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport math\n\nimport numpy as np\nimport pandas as pd\nfrom packaging import version\nfrom collection... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2019 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport math\n\nimport numpy as np\nimport pandas as pd\nfrom packaging import version\nfrom collection... | diff --git a/doc/estimation.rst b/doc/estimation.rst
index 561abf0a5..6bf0b7d71 100644
--- a/doc/estimation.rst
+++ b/doc/estimation.rst
@@ -37,7 +37,7 @@ For a more in-depth explanation of the internals of the state estimation method,
Defining Measurements
===========================
-Measurements are defined via ... |
saleor__saleor-5881 | Weight type should use WeightUnitsEnum
### What I'm trying to achieve
To have `Weight` type defined as
```graphql
type Weight {
unit: WeightUnitsEnum!
value: Float!
}
```
to maintain consistency with `Shop.defaultWeightUnit` field.
| [
{
"content": "import graphene\n\nfrom ....product.templatetags.product_images import get_thumbnail\nfrom ...translations.enums import LanguageCodeEnum\nfrom ..enums import (\n AccountErrorCode,\n AppErrorCode,\n CheckoutErrorCode,\n DiscountErrorCode,\n ExportErrorCode,\n GiftCardErrorCode,\n ... | [
{
"content": "import graphene\n\nfrom ....product.templatetags.product_images import get_thumbnail\nfrom ...translations.enums import LanguageCodeEnum\nfrom ..enums import (\n AccountErrorCode,\n AppErrorCode,\n CheckoutErrorCode,\n DiscountErrorCode,\n ExportErrorCode,\n GiftCardErrorCode,\n ... | diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index be827706cbb..9df4b731a76 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -26,6 +26,7 @@
TranslationErrorCode,
WarehouseErrorCode,
WebhookErrorCode,
+ WeightUnitsEn... |
fedora-infra__bodhi-4037 | Side tag updates are not automatically pushed to testing
When I create a side tag update for a stable Fedora, it sits in pending until I manually click "push to testing". This is inconsistent with regular updates and a tad confusing.
See also https://pagure.io/fedora-infrastructure/issue/8930
| [
{
"content": "# Copyright © 2016-2019 Red Hat, Inc.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at you... | [
{
"content": "# Copyright © 2016-2019 Red Hat, Inc.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at you... | diff --git a/bodhi/server/consumers/signed.py b/bodhi/server/consumers/signed.py
index abbbedefeb..3efd475f24 100644
--- a/bodhi/server/consumers/signed.py
+++ b/bodhi/server/consumers/signed.py
@@ -89,7 +89,9 @@ def __call__(self, message: fedora_messaging.api.Message):
log.info('Build is not assigned... |
kivy__kivy-6863 | HID input missing *_abs_* parameter documentation
**Is your feature request related to a problem? Please describe.**
The parameters:
* min_abs_x
* min_abs_y
* max_abs_x
* max_abs_y
are not documented: [HID input doc](https://kivy.org/doc/stable/api-kivy.input.providers.hidinput.html)
I found the parameters... | [
{
"content": "# coding utf-8\n'''\nNative support for HID input from the linux kernel\n==================================================\n\nSupport starts from 2.6.32-ubuntu, or 2.6.34.\n\nTo configure HIDInput, add this to your configuration::\n\n [input]\n # devicename = hidinput,/dev/input/eventXX\n ... | [
{
"content": "# coding utf-8\n'''\nNative support for HID input from the linux kernel\n==================================================\n\nSupport starts from 2.6.32-ubuntu, or 2.6.34.\n\nTo configure HIDInput, add this to your configuration::\n\n [input]\n # devicename = hidinput,/dev/input/eventXX\n ... | diff --git a/kivy/input/providers/hidinput.py b/kivy/input/providers/hidinput.py
index 7259d4d9f0..42435e27c7 100644
--- a/kivy/input/providers/hidinput.py
+++ b/kivy/input/providers/hidinput.py
@@ -21,10 +21,14 @@
* invert_x : 1 to invert X axis
* invert_y : 1 to invert Y axis
-* min_position_x : X minimum
-* max_... |
DataDog__integrations-core-268 | [couch] error "local variable 'db_stats' referenced before assignment"
I just started using datadog and have an issue getting the couch integration to run (on MacOS Sierra).
`/usr/local/bin/datadog-agent info` reports this:
````
Checks
======
ntp
---
- Collected 0 metrics, 0 events & 1 s... | [
{
"content": "# (C) Datadog, Inc. 2010-2016\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n# stdlib\nfrom urlparse import urljoin\n\n# 3rd party\nimport requests\n\n# project\nfrom checks import AgentCheck\nfrom util import headers\n\n\nclass CouchDb(AgentCheck):\n \"\"\"Ext... | [
{
"content": "# (C) Datadog, Inc. 2010-2016\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n# stdlib\nfrom urlparse import urljoin\nfrom urllib import quote\n\n# 3rd party\nimport requests\n\n# project\nfrom checks import AgentCheck\nfrom util import headers\n\n\nclass CouchDb(A... | diff --git a/couch/check.py b/couch/check.py
index 16b158f5893e6..472589b20f0b7 100644
--- a/couch/check.py
+++ b/couch/check.py
@@ -4,6 +4,7 @@
# stdlib
from urlparse import urljoin
+from urllib import quote
# 3rd party
import requests
@@ -119,7 +120,7 @@ def get_data(self, server, instance):
data... |
nautobot__nautobot-4260 | Set NAUTOBOT_INSTALLATION_METRICS_ENABLED=false in the dockerfile dev stage
<!--
NOTE: This template is for use by maintainers only. Please do not submit
an issue using this template unless you have been specifically asked to
do so.
-->
### Proposed Changes
This should propagate to all of the app de... | [
{
"content": "\"\"\"Nautobot development configuration file.\"\"\"\nimport os\n\nfrom nautobot.core.settings import * # noqa: F403\nfrom nautobot.core.settings_funcs import is_truthy\n\n#\n# Debugging defaults to True rather than False for the development environment\n#\nDEBUG = is_truthy(os.getenv(\"NAUTOBOT_... | [
{
"content": "\"\"\"Nautobot development configuration file.\"\"\"\nimport os\n\nfrom nautobot.core.settings import * # noqa: F403\nfrom nautobot.core.settings_funcs import is_truthy\n\n#\n# Debugging defaults to True rather than False for the development environment\n#\nDEBUG = is_truthy(os.getenv(\"NAUTOBOT_... | diff --git a/changes/4242.changed b/changes/4242.changed
new file mode 100644
index 00000000000..297fa31780c
--- /dev/null
+++ b/changes/4242.changed
@@ -0,0 +1,2 @@
+Changed `development/nautobot_config.py` to disable installation metrics for developer environments by default.
+Changed behavior of `dev` and `final-dev... |
Parsl__parsl-596 | Do not hardcode directory to `rundir` for globus tokens
Currently the token file is hardcoded to `TOKEN_FILE = 'runinfo/.globus.json'`. This will break if the user uses a non-default rundir. I vote not to couple it to the rundir so that it can be re-used between different scripts with different rundirs without requirin... | [
{
"content": "import logging\nimport json\nimport globus_sdk\n\n\nlogger = logging.getLogger(__name__)\n# Add StreamHandler to print error Globus events to stderr\nhandler = logging.StreamHandler()\nhandler.setLevel(logging.WARN)\nformat_string = \"%(asctime)s %(name)s:%(lineno)d [%(levelname)s] %(message)s\"\... | [
{
"content": "import logging\nimport json\nimport globus_sdk\nimport os\n\n\nlogger = logging.getLogger(__name__)\n# Add StreamHandler to print error Globus events to stderr\nhandler = logging.StreamHandler()\nhandler.setLevel(logging.WARN)\nformat_string = \"%(asctime)s %(name)s:%(lineno)d [%(levelname)s] %(m... | diff --git a/parsl/data_provider/globus.py b/parsl/data_provider/globus.py
index 94dc9bb2d8..fee8e61345 100644
--- a/parsl/data_provider/globus.py
+++ b/parsl/data_provider/globus.py
@@ -1,6 +1,7 @@
import logging
import json
import globus_sdk
+import os
logger = logging.getLogger(__name__)
@@ -22,8 +23,10 @@
... |
archlinux__archinstall-2196 | Logic error in `_fetch_lsblk_info()` loop
The loop in `disk._fetch_lsblk_info()` contains a logic error.
https://github.com/archlinux/archinstall/blob/2831c97338ca3b60dc1c697d158cd3f6281746d7/archinstall/lib/disk/device_model.py#L1109-L1112
When `retry` is:
- `0` then `1` attempt (initial)
- `1` then `1` atte... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nimport json\nimport math\nimport time\nimport uuid\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom enum import auto\nfrom pathlib import Path\nfrom typing import Optional, List, Dict, TYPE_CHECKING, Any\nfrom typing i... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nimport json\nimport math\nimport time\nimport uuid\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom enum import auto\nfrom pathlib import Path\nfrom typing import Optional, List, Dict, TYPE_CHECKING, Any\nfrom typing i... | diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index cd9558515f..15e681167a 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -1106,10 +1106,7 @@ def _fetch_lsblk_info(dev_path: Optional[Union[Path, str]] = None, retry: int =
if n... |
opsdroid__opsdroid-1648 | Migrate tests from unittest to pytest
Our existing test suite has been written with the Python [`unittest`](https://docs.python.org/3/library/unittest.html) framework. However, as the test suite has grown and opsdroid has become more complex we are running into issues with the tests. Mainly around setting up and tearin... | [
{
"content": "\"\"\"Pytest config for all opsdroid tests.\"\"\"\nfrom opsdroid.testing import opsdroid\n\nfrom opsdroid.cli.start import configure_lang\n\n__all__ = [\"opsdroid\"]\n\nconfigure_lang({})\n",
"path": "opsdroid/conftest.py"
}
] | [
{
"content": "\"\"\"Pytest config for all opsdroid tests.\"\"\"\nimport pytest\n\nimport asyncio\n\nfrom opsdroid.testing import opsdroid\nfrom opsdroid.connector import Connector\n\nfrom opsdroid.cli.start import configure_lang\n\n__all__ = [\"opsdroid\"]\n\nconfigure_lang({})\n\n\n@pytest.fixture(scope=\"sess... | diff --git a/opsdroid/conftest.py b/opsdroid/conftest.py
index 40bd9365f..fd75f9916 100644
--- a/opsdroid/conftest.py
+++ b/opsdroid/conftest.py
@@ -1,8 +1,29 @@
"""Pytest config for all opsdroid tests."""
+import pytest
+
+import asyncio
+
from opsdroid.testing import opsdroid
+from opsdroid.connector import Connect... |
celery__kombu-1009 | Kombu 4.3.0 Sentinel password error
Hi, I have problem with password in sentinel url after update to kombu 4.3.0.
In release was change method, witch set host and port to redis sentinel (https://github.com/celery/kombu/commit/a59b44e9fb8d00758dd6a3c560e2f158e672580d#diff-1fdc4d4a0fe8a800a42d1341599d8679R1106). If I us... | [
{
"content": "\"\"\"Redis transport.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport numbers\nimport socket\n\nfrom bisect import bisect\nfrom collections import namedtuple\nfrom contextlib import contextmanager\nfrom time import time\n\nfrom vine import promise\n\nfrom kombu.exception... | [
{
"content": "\"\"\"Redis transport.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport numbers\nimport socket\n\nfrom bisect import bisect\nfrom collections import namedtuple\nfrom contextlib import contextmanager\nfrom time import time\n\nfrom vine import promise\n\nfrom kombu.exception... | diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py
index 6831f510c..af44cdb8a 100644
--- a/kombu/transport/redis.py
+++ b/kombu/transport/redis.py
@@ -1102,8 +1102,9 @@ def _sentinel_managed_pool(self, asynchronous=False):
additional_params.pop('port', None)
connection_list = []
... |
fidals__shopelectro-342 | docker-compose.yml:93: Resurrect coala eslint.
The puzzle `322-dbccf9a1` from #322 has to be resolved:
https://github.com/fidals/shopelectro/blob/c827fa74e382579bf43fa368be3549cd108f6050/docker/docker-compose.yml#L93-L93
The puzzle was created by Artemiy on 08-Jun-18.
Estimate: 0 minutes,
If you have any tech... | [
{
"content": "from functools import partial\n\nfrom django.conf import settings\nfrom django.core.paginator import Paginator\nfrom django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden\nfrom django.shortcuts import render, get_object_or_404\nfrom django.views.decorators.http im... | [
{
"content": "from functools import partial\n\nfrom django.conf import settings\nfrom django.core.paginator import Paginator\nfrom django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden\nfrom django.shortcuts import render, get_object_or_404\nfrom django.views.decorators.http im... | diff --git a/.drone.yml b/.drone.yml
index 10f0da5b..1a762090 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -9,6 +9,9 @@ pipeline:
- mv /usr/local/lib/python3.6/site-packages /usr/app/deps
volumes:
- /tmp/cache/drone/shopelectro/site-packages/${DRONE_COMMIT_SHA}:/usr/app/deps
+ when:
+ event: [... |
jdb78__pytorch-forecasting-313 | MAPE metric issue
- PyTorch-Forecasting version: 0.8.2
- PyTorch version: 1.7.0+cu101
- Python version: 3.6.9
- Operating System: Windows
Just wanted to notify you that MAPE in the latest version might be calculated incorrectly.
Also wanted to point out in the docs & code comments, MAPE & MAE are Mean Absolu... | [
{
"content": "\"\"\"\nImplementation of metrics for (mulit-horizon) timeseries forecasting.\n\"\"\"\nfrom typing import Dict, List, Tuple, Union\nimport warnings\n\nfrom pandas.core.algorithms import isin\nfrom pytorch_lightning.metrics import Metric as LightningMetric\nimport scipy.stats\nfrom sklearn.base imp... | [
{
"content": "\"\"\"\nImplementation of metrics for (mulit-horizon) timeseries forecasting.\n\"\"\"\nfrom typing import Dict, List, Tuple, Union\nimport warnings\n\nfrom pandas.core.algorithms import isin\nfrom pytorch_lightning.metrics import Metric as LightningMetric\nimport scipy.stats\nfrom sklearn.base imp... | diff --git a/pytorch_forecasting/metrics.py b/pytorch_forecasting/metrics.py
index 9aa2f12f5..a00cba0ea 100644
--- a/pytorch_forecasting/metrics.py
+++ b/pytorch_forecasting/metrics.py
@@ -638,7 +638,7 @@ def loss(self, y_pred: torch.Tensor, target: torch.Tensor) -> torch.Tensor:
class SMAPE(MultiHorizonMetric):
... |
scikit-image__scikit-image-5271 | Question: Why is default structuring element of 1-connectivity used by ndimage.label for getting the default markers(labeled local minima) for watershed segmentation?
## Description
In the implemented watershed.py segmentation, one can pass a connectivity argument, when `local_minima` is called by watershed (when `m... | [
{
"content": "\"\"\"watershed.py - watershed algorithm\n\nThis module implements a watershed algorithm that apportions pixels into\nmarked basins. The algorithm uses a priority queue to hold the pixels\nwith the metric for the priority queue being pixel value, then the time\nof entry into the queue - this settl... | [
{
"content": "\"\"\"watershed.py - watershed algorithm\n\nThis module implements a watershed algorithm that apportions pixels into\nmarked basins. The algorithm uses a priority queue to hold the pixels\nwith the metric for the priority queue being pixel value, then the time\nof entry into the queue - this settl... | diff --git a/skimage/segmentation/_watershed.py b/skimage/segmentation/_watershed.py
index c21ff54ec97..e5d578d2042 100644
--- a/skimage/segmentation/_watershed.py
+++ b/skimage/segmentation/_watershed.py
@@ -73,7 +73,8 @@ def _validate_inputs(image, markers, mask, connectivity):
raise ValueError(message)
... |
prowler-cloud__prowler-2585 | [Bug]: Unbound local variable `checks_multi_account`
### Steps to Reproduce
1. What command are you running:
`prowler aws -M html json -f us-west-2 -w allowlist.yaml --ignore-exit-code-3`
2. Cloud provider you are launching: AWS
3. Environment you have: single account
4. See error
### Expected behavior
Prowler... | [
{
"content": "import re\nimport sys\n\nimport yaml\nfrom boto3.dynamodb.conditions import Attr\nfrom schema import Optional, Schema\n\nfrom prowler.lib.logger import logger\n\nallowlist_schema = Schema(\n {\n \"Accounts\": {\n str: {\n \"Checks\": {\n str: ... | [
{
"content": "import re\nimport sys\n\nimport yaml\nfrom boto3.dynamodb.conditions import Attr\nfrom schema import Optional, Schema\n\nfrom prowler.lib.logger import logger\n\nallowlist_schema = Schema(\n {\n \"Accounts\": {\n str: {\n \"Checks\": {\n str: ... | diff --git a/prowler/providers/aws/lib/allowlist/allowlist.py b/prowler/providers/aws/lib/allowlist/allowlist.py
index d6efc05522..00ffe4ccbe 100644
--- a/prowler/providers/aws/lib/allowlist/allowlist.py
+++ b/prowler/providers/aws/lib/allowlist/allowlist.py
@@ -126,8 +126,8 @@ def is_allowlisted(allowlist, audited_acc... |
google-research__text-to-text-transfer-transformer-39 | Do we support GPU distributed training?
Hi, thanks for the awesome project!
Does the code base support distributed training? If not, is it possible to support it after some code modifications?
By the way, what is the way to set batch size and gpu number if I want to use GPU to train the model?
Thank you for yo... | [
{
"content": "# Copyright 2019 The T5 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 appl... | [
{
"content": "# Copyright 2019 The T5 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 appl... | diff --git a/README.md b/README.md
index 941ebd01..a1815ad1 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ T5 can be used as a library for future model development by providing useful mod
* [Library](#library)
* [Usage](#usage)
+* [GPU Usage] (#gpu-usage)
* [Released Model Checkpoints](#released-model-ch... |
pytorch__text-426 | ascii vs. utf-8 in torchtext/datasets/translation.py
@nelson-liu: I incorrectly brought this up in pull #52, new issue here
When trying to load splits for IWSLT (in french, german, etc...), the loading process would fail with an ascii encoding/decoding error:
```
.data/iwslt/de-en/IWSLT16.TED.dev2010.de-en.en.xml
... | [
{
"content": "import os\nimport xml.etree.ElementTree as ET\nimport glob\nimport io\nimport codecs\n\nfrom .. import data\n\n\nclass TranslationDataset(data.Dataset):\n \"\"\"Defines a dataset for machine translation.\"\"\"\n\n @staticmethod\n def sort_key(ex):\n return data.interleave_keys(len(... | [
{
"content": "import os\nimport xml.etree.ElementTree as ET\nimport glob\nimport io\nimport codecs\n\nfrom .. import data\n\n\nclass TranslationDataset(data.Dataset):\n \"\"\"Defines a dataset for machine translation.\"\"\"\n\n @staticmethod\n def sort_key(ex):\n return data.interleave_keys(len(... | diff --git a/torchtext/datasets/translation.py b/torchtext/datasets/translation.py
index 256be21194..18bc571cf4 100644
--- a/torchtext/datasets/translation.py
+++ b/torchtext/datasets/translation.py
@@ -31,7 +31,8 @@ def __init__(self, path, exts, fields, **kwargs):
src_path, trg_path = tuple(os.path.expanduse... |
iterative__dvc-1981 | push: hangs after collecting information for a couple of minutes
version: `0.40.0+6408b5`
```
❯ dvc push -r ssh
Preparing to upload data to 'ssh://localhost/tmp/data-storage'
Preparing to collect status from ssh://localhost/tmp/data-storage
[##############################] 100% Collecting information
```
The... | [
{
"content": "from __future__ import unicode_literals\n\nfrom copy import copy\n\nfrom dvc.remote.local.slow_link_detection import slow_link_guard\nfrom dvc.utils.compat import str, makedirs\n\nimport os\nimport stat\nimport uuid\nimport ntpath\nimport shutil\nimport posixpath\nimport logging\n\nfrom dvc.system... | [
{
"content": "from __future__ import unicode_literals\n\nfrom copy import copy\n\nfrom dvc.remote.local.slow_link_detection import slow_link_guard\nfrom dvc.utils.compat import str, makedirs\n\nimport os\nimport stat\nimport uuid\nimport ntpath\nimport shutil\nimport posixpath\nimport logging\n\nfrom dvc.system... | diff --git a/dvc/remote/local/__init__.py b/dvc/remote/local/__init__.py
index 311309261b..45b1e4bbe6 100644
--- a/dvc/remote/local/__init__.py
+++ b/dvc/remote/local/__init__.py
@@ -383,8 +383,12 @@ def status(
return ret
def _fill_statuses(self, checksum_info_dir, local_exists, remote_exists):
+ ... |
DataDog__dd-trace-py-542 | Leaking sockets and connections
It looks like ddtrace writer is not closing the http connections it opens.
```
File "../lib/python3.7/threading.py", line 885, in _bootstrap
self._bootstrap_inner()
File "../lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "../lib/python3.... | [
{
"content": "# stdlib\nimport logging\nimport time\nimport ddtrace\nfrom json import loads\n\n# project\nfrom .encoding import get_encoder, JSONEncoder\nfrom .compat import httplib, PYTHON_VERSION, PYTHON_INTERPRETER, get_connection_response\n\n\nlog = logging.getLogger(__name__)\n\nTRACE_COUNT_HEADER = 'X-Dat... | [
{
"content": "# stdlib\nimport logging\nimport time\nimport ddtrace\nfrom json import loads\n\n# project\nfrom .encoding import get_encoder, JSONEncoder\nfrom .compat import httplib, PYTHON_VERSION, PYTHON_INTERPRETER, get_connection_response\n\n\nlog = logging.getLogger(__name__)\n\nTRACE_COUNT_HEADER = 'X-Dat... | diff --git a/ddtrace/api.py b/ddtrace/api.py
index 22133816135..5330632cf5e 100644
--- a/ddtrace/api.py
+++ b/ddtrace/api.py
@@ -133,11 +133,13 @@ def send_services(self, services):
def _put(self, endpoint, data, count=0):
conn = httplib.HTTPConnection(self.hostname, self.port)
-
- headers = self... |
sktime__sktime-1089 | [BUG] HampelFilter has side effects on arguments
`HampelFilter` has side effects on its arguments - see #1078 and test logs.
No estimator should have side effects, so this needs fixing.
| [
{
"content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n\n__author__ = [\"Martin Walter\"]\n__all__ = [\"HampelFilter\"]\n\nfrom sktime.transformations.base import _SeriesToSeriesTransformer\nfrom sktime.utils.validation.series import check_series\nfrom sktime.forecasting.model_selection import Slidin... | [
{
"content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n\n__author__ = [\"Martin Walter\"]\n__all__ = [\"HampelFilter\"]\n\nfrom sktime.transformations.base import _SeriesToSeriesTransformer\nfrom sktime.utils.validation.series import check_series\nfrom sktime.forecasting.model_selection import Slidin... | diff --git a/sktime/transformations/series/impute.py b/sktime/transformations/series/impute.py
index c72901623c9..a7306bd8ecf 100644
--- a/sktime/transformations/series/impute.py
+++ b/sktime/transformations/series/impute.py
@@ -92,6 +92,7 @@ def transform(self, Z, X=None):
self.check_is_fitted()
self... |
digitalfabrik__integreat-cms-295 | Enforce new SECRET_KEY in production environments
The server should refuse to start if the SECRET_KEY does not differ from the default value in our repository.
The importance of this issue depends on whether the Federated Cloud feature is using this key or not.
| [
{
"content": "\"\"\"\nDjango related class representing a config of an app\n\"\"\"\nfrom django.apps import AppConfig\n\n\nclass CmsConfig(AppConfig):\n \"\"\"\n Class inheriting the django AppConfig\n \"\"\"\n\n name = 'cms'\n",
"path": "backend/cms/apps.py"
}
] | [
{
"content": "\"\"\"\nDjango related class representing a config of an app\n\"\"\"\nimport logging\nimport sys\nfrom django.conf import settings\nfrom django.apps import AppConfig\n\nlogger = logging.getLogger(__name__)\n\nclass CmsConfig(AppConfig):\n \"\"\"\n Class inheriting the django AppConfig\n \... | diff --git a/backend/cms/apps.py b/backend/cms/apps.py
index 3c1abd7f3a..ad324df24d 100644
--- a/backend/cms/apps.py
+++ b/backend/cms/apps.py
@@ -1,8 +1,12 @@
"""
Django related class representing a config of an app
"""
+import logging
+import sys
+from django.conf import settings
from django.apps import AppConfig... |
conan-io__conan-15664 | Conan fails to detect the compiler although `CC` and `CXX` are set
### Environment details
* Operating System+version: ubuntu-22.04
* Compiler+version: 13.1.0
* Conan version: 2.0.9
* Python version: 3.11.4
### Steps to reproduce
I am creating a Conda package of my software, as part of a Github C/I workfl... | [
{
"content": "import os\nimport platform\nimport re\nimport tempfile\nimport textwrap\n\nfrom conan.api.output import ConanOutput\nfrom conans.model.version import Version\nfrom conans.util.files import save\nfrom conans.util.runners import check_output_runner, detect_runner\n\n\ndef detect_os():\n the_os = ... | [
{
"content": "import os\nimport platform\nimport re\nimport tempfile\nimport textwrap\n\nfrom conan.api.output import ConanOutput\nfrom conans.model.version import Version\nfrom conans.util.files import save\nfrom conans.util.runners import check_output_runner, detect_runner\n\n\ndef detect_os():\n the_os = ... | diff --git a/conan/internal/api/detect_api.py b/conan/internal/api/detect_api.py
index cc0fa762559..4600e769b1f 100644
--- a/conan/internal/api/detect_api.py
+++ b/conan/internal/api/detect_api.py
@@ -276,7 +276,7 @@ def detect_default_compiler():
command = cc or cxx
if "clang" in command.lower():
... |
dbt-labs__dbt-core-7320 | [CT-2391] [Bug] Following the Python API example.py example raises AttributeError
### Is this a new bug in dbt-core?
- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug
### Current Behavior
I'm trying to work with the py... | [
{
"content": "from dbt.cli.main import dbtRunner\nfrom dbt.config.runtime import load_profile, load_project\n\nif __name__ == \"__main__\":\n project_dir = \"/Users/chenyuli/git/jaffle_shop\"\n cli_args = [\"run\", \"--project-dir\", project_dir]\n\n # initialize the dbt runner\n dbt = dbtRunner()\n... | [
{
"content": null,
"path": "core/dbt/cli/example.py"
}
] | diff --git a/core/dbt/cli/example.py b/core/dbt/cli/example.py
deleted file mode 100644
index 71a99b646dd..00000000000
--- a/core/dbt/cli/example.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from dbt.cli.main import dbtRunner
-from dbt.config.runtime import load_profile, load_project
-
-if __name__ == "__main__":
- project_di... |
boto__botocore-2469 | get_object_lock_configuration computes wrong signature when using v2 authentication
**Describe the bug**
wrong StringToSign is produced by HmacV1Auth class when signing GetObjectLockConfiguration request
**Steps to reproduce**
```
import logging, botocore, botocore.session
session = botocore.session.get_session(... | [
{
"content": "# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L... | [
{
"content": "# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L... | diff --git a/botocore/auth.py b/botocore/auth.py
index 80f8e8bd30..9f5db94636 100644
--- a/botocore/auth.py
+++ b/botocore/auth.py
@@ -632,7 +632,7 @@ class HmacV1Auth(BaseSigner):
'response-content-encoding', 'delete', 'lifecycle',
'tagging', 'restore', 'storageClass', 'noti... |
lisa-lab__pylearn2-1119 | AttributeError: 'NoneType' object has no attribute 'continue_learning'
If no algorithm is set from the .yaml file (it is the case in kmeans, svm, and others), the training code will always fail with this error:
```
AttributeError: 'NoneType' object has no attribute 'continue_learning'
```
This is cause by [this code ... | [
{
"content": "\"\"\"Module containing the Train class and support functionality.\"\"\"\n__authors__ = \"Ian Goodfellow\"\n__copyright__ = \"Copyright 2010-2012, Universite de Montreal\"\n__credits__ = [\"Ian Goodfellow\"]\n__license__ = \"3-clause BSD\"\n__maintainer__ = \"LISA Lab\"\n__email__ = \"pylearn-dev@... | [
{
"content": "\"\"\"Module containing the Train class and support functionality.\"\"\"\n__authors__ = \"Ian Goodfellow\"\n__copyright__ = \"Copyright 2010-2012, Universite de Montreal\"\n__credits__ = [\"Ian Goodfellow\"]\n__license__ = \"3-clause BSD\"\n__maintainer__ = \"LISA Lab\"\n__email__ = \"pylearn-dev@... | diff --git a/pylearn2/models/tests/test_kmeans.py b/pylearn2/models/tests/test_kmeans.py
new file mode 100644
index 0000000000..c352e3b6a4
--- /dev/null
+++ b/pylearn2/models/tests/test_kmeans.py
@@ -0,0 +1,20 @@
+import numpy as np
+
+from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
+from pylearn2.m... |
cloudtools__troposphere-440 | Function Role property doesn't work with string value
The following results in a TypeError for the Role property type. I don't get a TypeError if I use GetAtt for Role's type, but I need to use a string. Looks like an issue in which the expected type is a list of possible types, but the validation on types then thinks ... | [
{
"content": "from . import AWSObject, AWSProperty, GetAtt\nfrom .validators import positive_integer\n\n\nclass Code(AWSProperty):\n props = {\n 'S3Bucket': (basestring, False),\n 'S3Key': (basestring, False),\n 'S3ObjectVersion': (basestring, False),\n 'ZipFile': (basestring, Fal... | [
{
"content": "from . import AWSObject, AWSProperty\nfrom .validators import positive_integer\n\n\nclass Code(AWSProperty):\n props = {\n 'S3Bucket': (basestring, False),\n 'S3Key': (basestring, False),\n 'S3ObjectVersion': (basestring, False),\n 'ZipFile': (basestring, False)\n ... | diff --git a/troposphere/awslambda.py b/troposphere/awslambda.py
index b30f6e730..ef3ec31ee 100644
--- a/troposphere/awslambda.py
+++ b/troposphere/awslambda.py
@@ -1,4 +1,4 @@
-from . import AWSObject, AWSProperty, GetAtt
+from . import AWSObject, AWSProperty
from .validators import positive_integer
@@ -51,7 +51,... |
spack__spack-37500 | Incorrect checksum for CRTM fix files @ version 2.4.0_emc
### Steps to reproduce
```console
% cat spack/var/spack/repos/builtin/packages/crtm-fix/package.py
[...]
class CrtmFix(Package):
"""CRTM coefficient files"""
homepage = "https://github.com/NOAA-EMC/crtm"
url = "ftp://ftp.ssec.wisc.edu/pub/s... | [
{
"content": "# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport os\n\nfrom spack.package import *\n\n\nclass CrtmFix(Package):\n \"\"\"CRTM coefficie... | [
{
"content": "# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport os\n\nfrom spack.package import *\n\n\nclass CrtmFix(Package):\n \"\"\"CRTM coefficie... | diff --git a/var/spack/repos/builtin/packages/crtm-fix/package.py b/var/spack/repos/builtin/packages/crtm-fix/package.py
index 1508ee81e214a3..627c724573d5b0 100644
--- a/var/spack/repos/builtin/packages/crtm-fix/package.py
+++ b/var/spack/repos/builtin/packages/crtm-fix/package.py
@@ -18,7 +18,7 @@ class CrtmFix(Packa... |
apache__airflow-12057 | Exception logging success function instead of failure
https://github.com/apache/airflow/blob/fdd9b6f65b608c516b8a062b058972d9a45ec9e3/airflow/sensors/sql_sensor.py#L97
| [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | diff --git a/airflow/sensors/sql_sensor.py b/airflow/sensors/sql_sensor.py
index aabff0d547c1c..c647ec737fd49 100644
--- a/airflow/sensors/sql_sensor.py
+++ b/airflow/sensors/sql_sensor.py
@@ -109,7 +109,7 @@ def poke(self, context):
if self.failure(first_cell):
raise AirflowExcept... |
aws-cloudformation__cfn-lint-1809 | AWS::ApiGateway::Authorizer - E3008 Property "RestApiId" has no valid Fn::GetAtt options
Given the following template:
```yaml
AWSTemplateFormatVersion: '2010-09-09'
Resources:
ProvisionedProduct:
Type: AWS::ServiceCatalog::CloudFormationProvisionedProduct
Properties:
ProductName: example
... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\nfrom cfnlint.helpers import RESOURCE_SPECS\nimport cfnlint.helpers\n\n\nclass Value... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\nfrom cfnlint.helpers import RESOURCE_SPECS\nimport cfnlint.helpers\n\n\nclass Value... | diff --git a/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py b/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py
index e19eabbf51..aab1bc4f07 100644
--- a/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py
+++ b/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py
@@ -129,7 +129,7 @@ def check... |
mlflow__mlflow-4043 | [BUG] TF2/Keras autologging failed to log model with default h5 save format
### Willingness to contribute
The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the MLflow code base?
- [ ] Yes. I can contribute a fix for... | [
{
"content": "\"\"\"\nThe ``mlflow.keras`` module provides an API for logging and loading Keras models. This module\nexports Keras models with the following flavors:\n\nKeras (native) format\n This is the main flavor that can be loaded back into Keras.\n:py:mod:`mlflow.pyfunc`\n Produced for use by generi... | [
{
"content": "\"\"\"\nThe ``mlflow.keras`` module provides an API for logging and loading Keras models. This module\nexports Keras models with the following flavors:\n\nKeras (native) format\n This is the main flavor that can be loaded back into Keras.\n:py:mod:`mlflow.pyfunc`\n Produced for use by generi... | diff --git a/.github/workflows/cross-version-tests.yml b/.github/workflows/cross-version-tests.yml
index aeee9d7fb893e..da828f0538baa 100644
--- a/.github/workflows/cross-version-tests.yml
+++ b/.github/workflows/cross-version-tests.yml
@@ -48,6 +48,11 @@ jobs:
matrix: ${{ fromJson(needs.set-matrix.outputs.matri... |
encode__django-rest-framework-804 | Module "oauth_provider.store.db" does not define an oauth store named "ModelStore"
After upgrading from 2.2.3 to 2.2.7, the following exception started occuring:
```
Traceback (most recent call last):
File "/home/danilo/.virtualenvs/studentenportal/lib/python2.7/site-packages/django/core/handlers/base.py", line 92, ... | [
{
"content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of django/python, and compatibility wrappers around optional packages.\n\"\"\"\n# flake8: noqa\nfrom __future__ import unicode_literals\n\nimport django\n\n# Try to import six from Django, fallback to inc... | [
{
"content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of django/python, and compatibility wrappers around optional packages.\n\"\"\"\n# flake8: noqa\nfrom __future__ import unicode_literals\n\nimport django\nfrom django.core.exceptions import ImproperlyConfi... | diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 067e901833..f8e4e7cab2 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -6,6 +6,7 @@
from __future__ import unicode_literals
import django
+from django.core.exceptions import ImproperlyConfigured
# Try to import six fro... |
kivy__kivy-5848 | The "data" parameter for add_panel_json() is undocumented
https://github.com/kivy/kivy/blob/fb8c0b9c5c367514f1c6949f86efbc0cae207c2c/kivy/uix/settings.py#L967
The "data" parameter can be used to provide JSON data, instead of using a file, which I figured out by reading the source. It should be documented in the met... | [
{
"content": "'''\nSettings\n========\n\n.. versionadded:: 1.0.7\n\nThis module provides a complete and extensible framework for adding a\nSettings interface to your application. By default, the interface uses\na :class:`SettingsWithSpinner`, which consists of a\n:class:`~kivy.uix.spinner.Spinner` (top) to swit... | [
{
"content": "'''\nSettings\n========\n\n.. versionadded:: 1.0.7\n\nThis module provides a complete and extensible framework for adding a\nSettings interface to your application. By default, the interface uses\na :class:`SettingsWithSpinner`, which consists of a\n:class:`~kivy.uix.spinner.Spinner` (top) to swit... | diff --git a/kivy/uix/settings.py b/kivy/uix/settings.py
index f98a4f1080..b1522e4f73 100644
--- a/kivy/uix/settings.py
+++ b/kivy/uix/settings.py
@@ -966,7 +966,8 @@ def on_config_change(self, config, section, key, value):
def add_json_panel(self, title, config, filename=None, data=None):
'''Create and... |
fidals__shopelectro-419 | /robots.txt url returns 301. stb2
Check this for example:
https://www.shopelectro.ru/robots.txt
| [
{
"content": "from collections import OrderedDict\n\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom django.conf.urls.static import static\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.views.decorators.cache import cache_page\n\nfrom pages.views import RobotsV... | [
{
"content": "from collections import OrderedDict\n\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom django.conf.urls.static import static\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.views.decorators.cache import cache_page\n\nfrom pages.views import RobotsV... | diff --git a/shopelectro/urls.py b/shopelectro/urls.py
index 982f0deb..ac7b9a04 100644
--- a/shopelectro/urls.py
+++ b/shopelectro/urls.py
@@ -92,7 +92,7 @@ def cache_page(arg): # Ignore PyFlakesBear
custom_pages = [
custom_page_url(r'^(?P<page>)$', cached_2h(views.IndexPage.as_view())),
- custom_page_url(r... |
boto__botocore-1256 | Error handler crashes when error_response doesn't contain Error key
https://github.com/boto/botocore/blob/f83648d38dff6584833f9c243d6ef83d0d9f5482/botocore/exceptions.py#L354-L355
These two lines can sometimes encounter an error_response which doesn't contain an `Error` key.
Example:
 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L... | [
{
"content": "# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L... | diff --git a/.changes/next-release/bugfix-Exceptions-23441.json b/.changes/next-release/bugfix-Exceptions-23441.json
new file mode 100644
index 0000000000..55498aa985
--- /dev/null
+++ b/.changes/next-release/bugfix-Exceptions-23441.json
@@ -0,0 +1,5 @@
+{
+ "category": "Exceptions",
+ "type": "bugfix",
+ "descrip... |
networkx__networkx-6675 | Improve test coverage for connected.py
There are a few red lines I want to work on in https://app.codecov.io/gh/networkx/networkx/blob/main/networkx/algorithms/approximation/connectivity.py.
My issue is I can't import the modified bidirectional_shortest_path function in the connectivity.py file. The one in the short... | [
{
"content": "\"\"\" Fast approximation for node connectivity\n\"\"\"\nimport itertools\nfrom operator import itemgetter\n\nimport networkx as nx\n\n__all__ = [\n \"local_node_connectivity\",\n \"node_connectivity\",\n \"all_pairs_node_connectivity\",\n]\n\n\ndef local_node_connectivity(G, source, targ... | [
{
"content": "\"\"\" Fast approximation for node connectivity\n\"\"\"\nimport itertools\nfrom operator import itemgetter\n\nimport networkx as nx\n\n__all__ = [\n \"local_node_connectivity\",\n \"node_connectivity\",\n \"all_pairs_node_connectivity\",\n]\n\n\ndef local_node_connectivity(G, source, targ... | diff --git a/networkx/algorithms/approximation/connectivity.py b/networkx/algorithms/approximation/connectivity.py
index a9190620a6c..626efba9303 100644
--- a/networkx/algorithms/approximation/connectivity.py
+++ b/networkx/algorithms/approximation/connectivity.py
@@ -357,12 +357,6 @@ def _bidirectional_shortest_path(G... |
Parsl__parsl-2735 | Globus data provider
**Describe the bug**
A clear and concise description of what the bug is.
Testing the Globus data_provide whenever I try to get results out of my @python_app on this line https://github.com/Parsl/parsl/blob/master/parsl/data_provider/globus.py#LL97C9-L97C55 it terminates because it gets the follow... | [
{
"content": "import logging\nimport json\nimport globus_sdk\nimport os\nimport parsl\nimport typeguard\n\nfrom functools import partial\nfrom typing import Optional\nfrom parsl.app.app import python_app\nfrom parsl.utils import RepresentationMixin\nfrom parsl.data_provider.staging import Staging\n\nlogger = lo... | [
{
"content": "import logging\nimport json\nimport globus_sdk\nimport os\nimport parsl\nimport typeguard\n\nfrom functools import partial\nfrom typing import Optional\nfrom parsl.app.app import python_app\nfrom parsl.utils import RepresentationMixin\nfrom parsl.data_provider.staging import Staging\n\nlogger = lo... | diff --git a/parsl/data_provider/globus.py b/parsl/data_provider/globus.py
index 69be6925b5..b950dc9088 100644
--- a/parsl/data_provider/globus.py
+++ b/parsl/data_provider/globus.py
@@ -94,7 +94,7 @@ def transfer_file(cls, src_ep, dst_ep, src_path, dst_path):
with 60 second timeout limit. If the task is ACTIV... |
beeware__toga-193 | ProgressBar doesn't appears in a Box [Core] [Cocoa]
Example code: https://gist.github.com/Dayof/528f9dc38f4178dbc25db6bab553e19a
When a progress bar is add inside of a box (bellow the label is the progress bar):
:\n def __init__(self, id=None, style=None, max=None, value=None):\n super().__init__(id=id, style=style, max=max... | [
{
"content": "from toga.interface import ProgressBar as ProgressBarInterface\n\nfrom ..libs import *\nfrom .base import WidgetMixin\n\n\nclass ProgressBar(ProgressBarInterface, WidgetMixin):\n def __init__(self, id=None, style=None, max=None, value=None):\n super().__init__(id=id, style=style, max=max... | diff --git a/src/cocoa/toga_cocoa/widgets/progressbar.py b/src/cocoa/toga_cocoa/widgets/progressbar.py
index 0410aba141..199f2c3f1b 100644
--- a/src/cocoa/toga_cocoa/widgets/progressbar.py
+++ b/src/cocoa/toga_cocoa/widgets/progressbar.py
@@ -16,6 +16,7 @@ def create(self):
# Add the layout constraints
... |
mozilla__bugbug-407 | Not all training tasks need commits DB
Indeed I think none of the ones we currently run as part of the data pipeline need the commits.
We should:
- Make the trainer script only download the DBs which are necessary;
- Remove the dependency on the commit retrieval task in the data-pipeline.yml.
| [
{
"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.component import ComponentModel\nfrom bugbug.models.defect_enhancement_task import DefectEnhancementTask... | [
{
"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.component import ComponentModel\nfrom bugbug.models.defect_enhancement_task import DefectEnhancementTask... | diff --git a/infra/data-pipeline.yml b/infra/data-pipeline.yml
index 6f68720d26..1a5cad91cd 100644
--- a/infra/data-pipeline.yml
+++ b/infra/data-pipeline.yml
@@ -92,7 +92,6 @@ tasks:
provisionerId: aws-provisioner-v1
workerType: releng-svc-compute
dependencies:
- - commit-retrieval
- bugs-re... |
qutebrowser__qutebrowser-3751 | Tooltips on pinned tabs are just numbers
Version: 1.2.1
Although this is the minorest of all issues, pinned tabs' tooltips don't seem to keep any information about what web page is actually loaded in the tab.
| [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py
index 72d3cff220b..fa8b9939ab6 100644
--- a/qutebrowser/mainwindow/tabwidget.py
+++ b/qutebrowser/mainwindow/tabwidget.py
@@ -148,9 +148,13 @@ def update_tab_title(self, idx, field=None):
title = '' if fmt is None else fmt.f... |
tensorflow__addons-1198 | Activations_tests.py is not run at all with bazel.
To reproduce: see #1196
**Describe the bug**
This file is not run by bazel, I hit this error when I was trying to make a proof of concept with pytest, and I couldn't get those tests to work. Even when executing them line by line in a new python script. At first I... | [
{
"content": "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/tensorflow_addons/activations/activations_test.py b/tensorflow_addons/activations/activations_test.py
index d7d318d84b..5eecb07f6b 100644
--- a/tensorflow_addons/activations/activations_test.py
+++ b/tensorflow_addons/activations/activations_test.py
@@ -34,7 +34,7 @@ class ActivationsTest(tf.test.TestCase)... |
pypi__warehouse-1181 | Errors in celery don't get sent to Sentry
| [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/test_celery.py b/tests/unit/test_celery.py
index 3db0db8d0a5c..65f6c02582b5 100644
--- a/tests/unit/test_celery.py
+++ b/tests/unit/test_celery.py
@@ -21,12 +21,27 @@
def test_configure_celery(monkeypatch):
- configure = pretend.call_recorder(lambda: None)
+ client = pretend.stub()
+ ... |
encode__uvicorn-623 | Duplicate logs when using root logger with 'gunicorn -k uvicorn.workers.UvicornWorker ...'
Here is a small test file with minimal gunicorn and uvicorn apps. But my real interest is the log statements at the top of the file.
```
import logging
logging.error('TEST 1 -- LOGGING ERROR')
logging.getLogger().error('... | [
{
"content": "import asyncio\nimport logging\n\nfrom gunicorn.workers.base import Worker\nfrom uvicorn.config import Config\nfrom uvicorn.main import Server\n\n\nclass UvicornWorker(Worker):\n \"\"\"\n A worker class for Gunicorn that interfaces with an ASGI consumer callable,\n rather than a WSGI call... | [
{
"content": "import asyncio\nimport logging\n\nfrom gunicorn.workers.base import Worker\nfrom uvicorn.config import Config\nfrom uvicorn.main import Server\n\n\nclass UvicornWorker(Worker):\n \"\"\"\n A worker class for Gunicorn that interfaces with an ASGI consumer callable,\n rather than a WSGI call... | diff --git a/uvicorn/workers.py b/uvicorn/workers.py
index 826b52b9c..7be7b6b5c 100644
--- a/uvicorn/workers.py
+++ b/uvicorn/workers.py
@@ -20,10 +20,12 @@ def __init__(self, *args, **kwargs):
logger = logging.getLogger("uvicorn.error")
logger.handlers = self.log.error_log.handlers
logger.se... |
hpcaitech__ColossalAI-4320 | [BUG]: Multi-rank on same device
### 🐛 Describe the bug
When I use colossalai CLI with 2 node, I got an error "rank 8 and rank 0 both on CUDA device d000"
I have examined my scripts and command. And torchrun works well.
The error msg is:
```
Error: failed to run torchrun --nproc_per_node=8 --nnodes=2 --node_ran... | [
{
"content": "import socket\nfrom typing import List\n\n\nclass HostInfo:\n \"\"\"\n A data class to store host connection-related data.\n\n Args:\n hostname (str): name or IP address of the host\n port (str): the port for ssh connection\n \"\"\"\n\n def __init__(\n self,\n ... | [
{
"content": "import socket\nfrom typing import List\n\n\nclass HostInfo:\n \"\"\"\n A data class to store host connection-related data.\n\n Args:\n hostname (str): name or IP address of the host\n port (str): the port for ssh connection\n \"\"\"\n\n def __init__(\n self,\n ... | diff --git a/colossalai/cli/launcher/hostinfo.py b/colossalai/cli/launcher/hostinfo.py
index d1b88b229fb8..2a6a111e4d72 100644
--- a/colossalai/cli/launcher/hostinfo.py
+++ b/colossalai/cli/launcher/hostinfo.py
@@ -46,11 +46,8 @@ def is_host_localhost(hostname: str, port: str = None) -> None:
localhost = socke... |
ansible-collections__community.general-6190 | openbsd_pkg: No progress meter: failed termcap lookup on xterm-kitty
### Summary
I run my playbooks under `kitty` terminal which exports the varaible `TERM=xterm-kitty`. Since `pkg_add` wants to look up the terminal on its own system to learn how to show the progress meter, it warns via stderr "No progress meter: fail... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2013, Patrik Lundin <patrik@sigterm.se>\n#\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom __future__ import absolu... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2013, Patrik Lundin <patrik@sigterm.se>\n#\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom __future__ import absolu... | diff --git a/changelogs/fragments/6149-openbsd_pkg-term.yml b/changelogs/fragments/6149-openbsd_pkg-term.yml
new file mode 100644
index 00000000000..5fe1e5a6db2
--- /dev/null
+++ b/changelogs/fragments/6149-openbsd_pkg-term.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - openbsd_pkg - set ``TERM`` to ``'dumb'`` in ``execute_c... |
getsentry__sentry-59857 | Jira deprecation of glance panels
Notice from Atlassian Support team about glance panel deprecation.
AC:
- Review the deprecation plan
- Build a recommendation based on how we're impacted. If minor development work is required, complete that with this ticket. If significant work is required, notify EM/PM to share... | [
{
"content": "from django.conf import settings\nfrom django.urls import reverse\nfrom rest_framework.request import Request\nfrom rest_framework.response import Response\n\nfrom sentry.api.api_publish_status import ApiPublishStatus\nfrom sentry.api.base import Endpoint, control_silo_endpoint\nfrom sentry.utils.... | [
{
"content": "from django.conf import settings\nfrom django.urls import reverse\nfrom rest_framework.request import Request\nfrom rest_framework.response import Response\n\nfrom sentry.api.api_publish_status import ApiPublishStatus\nfrom sentry.api.base import Endpoint, control_silo_endpoint\nfrom sentry.utils.... | diff --git a/src/sentry/integrations/jira/endpoints/descriptor.py b/src/sentry/integrations/jira/endpoints/descriptor.py
index 1a91be77c0ac75..efa09dc3c3c526 100644
--- a/src/sentry/integrations/jira/endpoints/descriptor.py
+++ b/src/sentry/integrations/jira/endpoints/descriptor.py
@@ -60,7 +60,7 @@ def get(self, reque... |
opendatacube__datacube-core-648 | `compute_reproject_roi` incorrect behaviour for non-overlapping geoboxes
### Expected behaviour
When `src` and `dst` do no overlap I expect both `src_roi` and `dst_roi` to be empty on output. Seems like in some cases one can get empty `src_roi` while `dst_roi` isn't empty.
See user report here: https://github.com... | [
{
"content": "import numpy as np\nimport collections\nfrom types import SimpleNamespace\nfrom typing import Tuple\nfrom affine import Affine\n\n# This is numeric code, short names make sense in this context, so disabling\n# \"invalid name\" checks for the whole file\n# pylint: disable=invalid-name\n\n\nclass Wi... | [
{
"content": "import numpy as np\nimport collections\nfrom types import SimpleNamespace\nfrom typing import Tuple\nfrom affine import Affine\n\n# This is numeric code, short names make sense in this context, so disabling\n# \"invalid name\" checks for the whole file\n# pylint: disable=invalid-name\n\n\nclass Wi... | diff --git a/datacube/utils/geometry/tools.py b/datacube/utils/geometry/tools.py
index f8ef638d03..7efb5a5adf 100644
--- a/datacube/utils/geometry/tools.py
+++ b/datacube/utils/geometry/tools.py
@@ -601,6 +601,9 @@ def compute_roi(src, dst, tr, pts_per_side, padding, align):
XY = np.vstack(tr.back(gbox_boundar... |
urllib3__urllib3-3127 | Undeprecate pyOpenSSL third-party module
@pquentin, @illia-v and I discussed the current state of the pyOpenSSL module:
- There hasn't been any community effort that we know of to pull the pyOpenSSL module out of urllib3 and support it elsewhere.
- There hasn't been any addition to Python to support in-memory certi... | [
{
"content": "\"\"\"\nModule for using pyOpenSSL as a TLS backend. This module was relevant before\nthe standard library ``ssl`` module supported SNI, but now that we've dropped\nsupport for Python 2.7 all relevant Python versions support SNI so\n**this module is no longer recommended**.\n\nThis needs the follo... | [
{
"content": "\"\"\"\nModule for using pyOpenSSL as a TLS backend. This module was relevant before\nthe standard library ``ssl`` module supported SNI, but now that we've dropped\nsupport for Python 2.7 all relevant Python versions support SNI so\n**this module is no longer recommended**.\n\nThis needs the follo... | diff --git a/changelog/3126.feature.rst b/changelog/3126.feature.rst
new file mode 100644
index 0000000000..112a0adec3
--- /dev/null
+++ b/changelog/3126.feature.rst
@@ -0,0 +1 @@
+Undeprecated pyOpenSSL third-party module.
diff --git a/docs/reference/contrib/pyopenssl.rst b/docs/reference/contrib/pyopenssl.rst
index a... |
Mailu__Mailu-1886 | connect to /tmp/podop.socket: Permission denied
Hi,
I build the docker images from Mailu/tests/build_arm.sh (commit 5d20f28).
Setting mailu.env log level to: `LOG_LEVEL=DEBUG`
I got this "Temporary lookup failure" when sending a test email to my domain.
Digging out the postfix's log is the best I can manage with my... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport glob\nimport shutil\nimport multiprocessing\nimport logging as log\nimport sys\n\nfrom podop import run_server\nfrom socrate import system, conf\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"WARNING\"))\n\ndef start_podop():\n... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport glob\nimport shutil\nimport multiprocessing\nimport logging as log\nimport sys\n\nfrom podop import run_server\nfrom pwd import getpwnam\nfrom socrate import system, conf\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"WARNING\"... | diff --git a/core/postfix/start.py b/core/postfix/start.py
index 701efec39..125404f65 100755
--- a/core/postfix/start.py
+++ b/core/postfix/start.py
@@ -8,12 +8,13 @@
import sys
from podop import run_server
+from pwd import getpwnam
from socrate import system, conf
log.basicConfig(stream=sys.stderr, level=os.... |
scikit-image__scikit-image-6534 | skimage segmentation flood docs
https://github.com/scikit-image/scikit-image/blob/b8ce4d0c2c65684b131870abfe60228136108d4e/skimage/morphology/_flood_fill.py#L138
I'm checking the docs on the flood function:
"Adjacent pixels whose squared distance from the center is **larger** or equal to connectivity are considered... | [
{
"content": "\"\"\"flood_fill.py - in place flood fill algorithm\n\nThis module provides a function to fill all equal (or within tolerance) values\nconnected to a given seed point with a different value.\n\"\"\"\n\nimport numpy as np\n\nfrom .._shared.utils import deprecate_kwarg\nfrom ..util import crop\nfrom... | [
{
"content": "\"\"\"flood_fill.py - in place flood fill algorithm\n\nThis module provides a function to fill all equal (or within tolerance) values\nconnected to a given seed point with a different value.\n\"\"\"\n\nimport numpy as np\n\nfrom .._shared.utils import deprecate_kwarg\nfrom ..util import crop\nfrom... | diff --git a/skimage/morphology/_flood_fill.py b/skimage/morphology/_flood_fill.py
index 803fe02b048..57671cd9500 100644
--- a/skimage/morphology/_flood_fill.py
+++ b/skimage/morphology/_flood_fill.py
@@ -135,7 +135,7 @@ def flood(image, seed_point, *, footprint=None, connectivity=None,
are considered as part ... |
feast-dev__feast-4026 | bug:postgres source invalid `pull_latest_from_table_or_query` query output
I would submit a PR but I'm on an M1 and had some issues getting the env running. Submitting a proposed solution for the sake of available time.
## Expected Behavior
When using `PostgreSQLSource`, you should be able to use a table successfu... | [
{
"content": "import contextlib\nfrom dataclasses import asdict\nfrom datetime import datetime\nfrom typing import (\n Any,\n Callable,\n ContextManager,\n Dict,\n Iterator,\n KeysView,\n List,\n Literal,\n Optional,\n Tuple,\n Union,\n)\n\nimport numpy as np\nimport pandas as p... | [
{
"content": "import contextlib\nfrom dataclasses import asdict\nfrom datetime import datetime\nfrom typing import (\n Any,\n Callable,\n ContextManager,\n Dict,\n Iterator,\n KeysView,\n List,\n Literal,\n Optional,\n Tuple,\n Union,\n)\n\nimport numpy as np\nimport pandas as p... | diff --git a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py b/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py
index 9b300d7bf46..17a8e20f788 100644
--- a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py
+++ b/sdk/python/f... |
ansible__molecule-2232 | ValueError: invalid literal for int() with base 10: 'post20190705'
It seems that code from setup.py is broken as it makes the wrong assumption that `setuptools.__version__.` will always return only integers:
https://github.com/ansible/molecule/blob/master/setup.py#L36
```
RUNTIME_SETUPTOOLS_VERSION = tup... | [
{
"content": "#! /usr/bin/env python\n# Copyright (c) 2019 Red Hat, Inc.\n# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software wi... | [
{
"content": "#! /usr/bin/env python\n# Copyright (c) 2019 Red Hat, Inc.\n# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software wi... | diff --git a/setup.py b/setup.py
index c9fbb3c900..3245f5d931 100644
--- a/setup.py
+++ b/setup.py
@@ -33,10 +33,11 @@
ALL_STRING_TYPES = tuple(map(type, ('', b'', u'')))
-MIN_NATIVE_SETUPTOOLS_VERSION = 34, 4, 0
+MIN_NATIVE_SETUPTOOLS_VERSION = 34, 4
"""Minimal setuptools having good read_configuration implement... |
pyqtgraph__pyqtgraph-954 | [CI-fail] GLScatterPlotItem failing on Windows Builds
```
Traceback (most recent call last):
File "c:\hostedtoolcache\windows\python\3.7.3\x64\lib\site-packages\OpenGL\latebind.py", line 41, in __call__
return self._finalCall( *args, **named )
TypeError: 'NoneType' object is not callable
During h... | [
{
"content": "from ..Qt import QtCore, QtGui, QtOpenGL\nfrom OpenGL.GL import *\napp = QtGui.QApplication([])\n\nclass GLTest(QtOpenGL.QGLWidget):\n def __init__(self):\n QtOpenGL.QGLWidget.__init__(self)\n self.makeCurrent()\n print(\"GL version:\" + glGetString(GL_VERSION))\n pr... | [
{
"content": "from ..Qt import QtCore, QtGui, QtOpenGL\nfrom OpenGL.GL import *\napp = QtGui.QApplication([])\n\nclass GLTest(QtOpenGL.QGLWidget):\n def __init__(self):\n QtOpenGL.QGLWidget.__init__(self)\n self.makeCurrent()\n print(\"GL version:\" + glGetString(GL_VERSION).decode(\"utf... | diff --git a/azure-test-template.yml b/azure-test-template.yml
index 8a68317b0d..496ec10b99 100644
--- a/azure-test-template.yml
+++ b/azure-test-template.yml
@@ -43,6 +43,23 @@ jobs:
height: '1080'
condition: eq(variables['agent.os'], 'Windows_NT' )
+ - script: |
+ curl -LJO https://github.com/pal1... |
Pycord-Development__pycord-745 | Setting embed.description to None instead sets it to "None"
### Summary
Setting embed.description to None instead sets it to "None"
### Reproduction Steps
embed.description = None
### Minimal Reproducible Code
```python
embed = discord.Embed()
embed.description = None
```
### Expected Results
Remove the embed ... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\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 r... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\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 r... | diff --git a/discord/embeds.py b/discord/embeds.py
index 80cc14ac13..6bd1a90416 100644
--- a/discord/embeds.py
+++ b/discord/embeds.py
@@ -193,13 +193,13 @@ def __init__(
self.url = url
self.description = description
- if self.title is not EmptyEmbed:
+ if self.title is not EmptyEmbed ... |
spack__spack-14414 | Spack is building a non-optimized CMake?
It would seem that the Spack cmake/package.py file is set up to build a **no optimized** version of CMake by default. I noticed this a few months ago when we were almost going to try to use the Spack-installed env but then noticed this that the Spack-installed cmake was about 2... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Cmake(Package):\n \"\"\"A cross-platform, open-source build s... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Cmake(Package):\n \"\"\"A cross-platform, open-source build s... | diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index d99cda2f8c1815..f2fa2290fb9787 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -168,8 +168,15 @@ def bootstrap_args(self):
... |
xonsh__xonsh-4337 | protect users from paste jacking
Xonsh together with prompt-toolkit is safe from pastejacking: pasting the malicious but harmless looking command [here](https://thejh.net/misc/website-terminal-copy-paste) in Bash will auto-execute, but on xonsh (w/ prompt-toolkit) I get to see the whole code and have to press Enter exp... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The readline based xonsh shell.\n\nPortions of this code related to initializing the readline library\nare included from the IPython project. The IPython project is:\n\n* Copyright (c) 2008-2014, IPython Development Team\n* Copyright (c) 2001-2007, Fernando Perez <f... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The readline based xonsh shell.\n\nPortions of this code related to initializing the readline library\nare included from the IPython project. The IPython project is:\n\n* Copyright (c) 2008-2014, IPython Development Team\n* Copyright (c) 2001-2007, Fernando Perez <f... | diff --git a/news/enable-bracketed-paste.rst b/news/enable-bracketed-paste.rst
new file mode 100644
index 0000000000..f334858a0a
--- /dev/null
+++ b/news/enable-bracketed-paste.rst
@@ -0,0 +1,23 @@
+**Added:**
+
+* <news item>
+
+**Changed:**
+
+* Enabled bracketed paste mode for readline to protect against paste jacki... |
doccano__doccano-1331 | After Quick Deploy on Heroku, App crash due to sqlalchemy
How to reproduce the behaviour
---------
Start the quick deploy to heroku
Wait for successful build and deploy
Open app and wait for crash.
**Logs**
`sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres`
`celery crashed`
... | [
{
"content": "\"\"\"\nDjango settings for app project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\nAny setting that is configured via an environmen... | [
{
"content": "\"\"\"\nDjango settings for app project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\nAny setting that is configured via an environmen... | diff --git a/backend/app/settings.py b/backend/app/settings.py
index 5df89e66c6..9c4d59f069 100644
--- a/backend/app/settings.py
+++ b/backend/app/settings.py
@@ -353,7 +353,12 @@
CELERY_BROKER_URL = env('CELERY_BROKER_URL')
except EnvError:
try:
- CELERY_BROKER_URL = 'sqla+{}'.format(env('DATABASE_UR... |
pypa__cibuildwheel-129 | MacOS travis-ci build stalls
I noticed today that our MacOS travis-CI build using cibuildwheel has started stalling at the following point of the cibuildwheel setup:
```bash
+ pip install --upgrade setuptools
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151... | [
{
"content": "from __future__ import print_function\nimport os, subprocess, shlex, sys, shutil\nfrom collections import namedtuple\nfrom glob import glob\ntry:\n from shlex import quote as shlex_quote\nexcept ImportError:\n from pipes import quote as shlex_quote\n\nfrom .util import prepare_command, get_b... | [
{
"content": "from __future__ import print_function\nimport os, subprocess, shlex, sys, shutil\nfrom collections import namedtuple\nfrom glob import glob\ntry:\n from shlex import quote as shlex_quote\nexcept ImportError:\n from pipes import quote as shlex_quote\n\nfrom .util import prepare_command, get_b... | diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py
index a62aadd08..5ef450a1d 100644
--- a/cibuildwheel/macos.py
+++ b/cibuildwheel/macos.py
@@ -86,8 +86,7 @@ def call(args, env=None, cwd=None, shell=False):
# install pip & wheel
call(['python', get_pip_script, '--no-setuptools', '--no-wheel']... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.