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 ⌀ |
|---|---|---|---|---|
wright-group__WrightTools-998 | mpl.color.ColorbarBase Deprecation warning
WrightTools v 3.3.1
mpl v 3.3.2
e.g.
```
import WrightTools as wt
import matplotlib as mpl
fig, gs = wt.artists.create_figure(cols=[1, "cbar"])
cax = fig.add_subplot(gs[1])
wt.artists.plot_colorbar(cax)
mpl.pyplot.show()
```
raises `MatplotlibDeprecationWarning`... | [
{
"content": "\"\"\"Base tools for visualizing data.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport numpy as np\n\nimport matplotlib\nfrom matplotlib.projections import register_projection\nimport matplotlib.pyplot as plt\nfrom mpl_tool... | [
{
"content": "\"\"\"Base tools for visualizing data.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport numpy as np\n\nimport matplotlib\nfrom matplotlib.projections import register_projection\nimport matplotlib.pyplot as plt\nfrom mpl_tool... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9334bf8eb..906b49ab6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
## [Unreleased]
+### Fixed
+- Avoid passing both `vmin/vmax` and `norm` to `pcolor*` methods
+
## [3.3.3]
### ... |
twisted__twisted-12103 | Avoid encode/decode in chat.py for better readablity
As discussed in [this comment](https://github.com/twisted/twisted/pull/12070#discussion_r1442784443), it's better to use byte concat as mentioned in order of better readability in [docs/core/howto/listings/servers/chat.py:35](https://github.com/twisted/twisted/pull/1... | [
{
"content": "from twisted.internet import reactor\nfrom twisted.internet.protocol import Factory\nfrom twisted.protocols.basic import LineReceiver\n\n\nclass Chat(LineReceiver):\n def __init__(self, users):\n self.users = users\n self.name = None\n self.state = \"GETNAME\"\n\n def co... | [
{
"content": "from twisted.internet import reactor\nfrom twisted.internet.protocol import Factory\nfrom twisted.protocols.basic import LineReceiver\n\n\nclass Chat(LineReceiver):\n def __init__(self, users):\n self.users = users\n self.name = None\n self.state = \"GETNAME\"\n\n def co... | diff --git a/docs/core/howto/listings/servers/chat.py b/docs/core/howto/listings/servers/chat.py
index 6fc4a5a5df5..30c5d1df3cf 100644
--- a/docs/core/howto/listings/servers/chat.py
+++ b/docs/core/howto/listings/servers/chat.py
@@ -32,9 +32,7 @@ def handle_GETNAME(self, name):
self.state = "CHAT"
def h... |
pypa__pip-5227 | Build isolation fails with system-wide pip<10 and user-site pip==10.0.0
* Pip version: 10.0.0
* Python version: 3.6.5
* Operating system: Linux/Fedora
### Description:
Apparently, the combination of system-wide installation of pip<10 and user-site installation of pip>=10 makes projects with `pyproject.toml` fai... | [
{
"content": "\"\"\"Prepares a distribution for installation\n\"\"\"\n\nimport itertools\nimport logging\nimport os\nimport sys\nfrom copy import copy\n\nfrom pip._vendor import pkg_resources, requests\n\nfrom pip._internal.build_env import NoOpBuildEnvironment\nfrom pip._internal.compat import expanduser\nfrom... | [
{
"content": "\"\"\"Prepares a distribution for installation\n\"\"\"\n\nimport itertools\nimport logging\nimport os\nimport sys\nfrom copy import copy\n\nfrom pip._vendor import pkg_resources, requests\n\nfrom pip._internal.build_env import NoOpBuildEnvironment\nfrom pip._internal.compat import expanduser\nfrom... | diff --git a/news/5524.bugfix b/news/5524.bugfix
new file mode 100644
index 00000000000..4d841e1877f
--- /dev/null
+++ b/news/5524.bugfix
@@ -0,0 +1 @@
+Fix PEP 518 support when pip is installed in the user site.
diff --git a/src/pip/_internal/operations/prepare.py b/src/pip/_internal/operations/prepare.py
index 7d1297... |
pytorch__ignite-768 | log_message() method fails `desc` is passed to contrib tqdm
## 🐛 Bug description
If I pass a `desc` argument when instantiating a `ignite.contrib.handlers.ProgressBar` the calls to its `log_message()` method fail with this exception:
```
TypeError: write() got an unexpected keyword argument 'desc'
```
## En... | [
{
"content": "# -*- coding: utf-8 -*-\nimport warnings\n\nimport torch\n\nfrom ignite.engine import Events\nfrom ignite.engine.engine import EventWithFilter\nfrom ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler\n\n\nclass ProgressBar(BaseLogger):\n \"\"\"\n TQDM progress bar handl... | [
{
"content": "# -*- coding: utf-8 -*-\nimport warnings\n\nimport torch\n\nfrom ignite.engine import Events\nfrom ignite.engine.engine import EventWithFilter\nfrom ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler\n\n\nclass ProgressBar(BaseLogger):\n \"\"\"\n TQDM progress bar handl... | diff --git a/ignite/contrib/handlers/tqdm_logger.py b/ignite/contrib/handlers/tqdm_logger.py
index bc921eb7131b..7568ab7b8705 100644
--- a/ignite/contrib/handlers/tqdm_logger.py
+++ b/ignite/contrib/handlers/tqdm_logger.py
@@ -146,7 +146,8 @@ def log_message(self, message):
message (str): string you wish t... |
cython__cython-4728 | [BUG] Compiler crash when adding @dataclass to extension types with public/readonly object fields
<!--
**PLEASE READ THIS FIRST:**
- DO NOT use the bug and feature tracker for general questions and support requests.
Use the `cython-users` mailing list instead.
It has a wider audience, so you get more and better... | [
{
"content": "# functions to transform a c class into a dataclass\n\nfrom collections import OrderedDict\nfrom textwrap import dedent\nimport operator\n\nfrom . import ExprNodes\nfrom . import Nodes\nfrom . import PyrexTypes\nfrom . import Builtin\nfrom . import Naming\nfrom .Errors import error, warning\nfrom ... | [
{
"content": "# functions to transform a c class into a dataclass\n\nfrom collections import OrderedDict\nfrom textwrap import dedent\nimport operator\n\nfrom . import ExprNodes\nfrom . import Nodes\nfrom . import PyrexTypes\nfrom . import Builtin\nfrom . import Naming\nfrom .Errors import error, warning\nfrom ... | diff --git a/Cython/Compiler/Dataclass.py b/Cython/Compiler/Dataclass.py
index 098dd900660..a4629812d3c 100644
--- a/Cython/Compiler/Dataclass.py
+++ b/Cython/Compiler/Dataclass.py
@@ -590,7 +590,7 @@ def get_field_type(pos, entry):
# try to return PyType_Type. This case should only happen with
# attr... |
pytorch__audio-579 | _audio_backends platform independent
## 🐛 Bug
The constant [_audio_backends](https://github.com/pytorch/audio/blob/c29598d54185d73b4ed04103330573e190bbdb69/torchaudio/_backend.py#L12) is referenced by [BACKENDS](https://github.com/pytorch/audio/blob/0e5581cb2a9616205a00cbabf4c9a30613a1037f/test/common_utils.py#L10)... | [
{
"content": "from functools import wraps\nfrom typing import Any, List, Union\n\nimport platform\nimport torch\nfrom torch import Tensor\n\nfrom . import _soundfile_backend, _sox_backend\n\n\n_audio_backend = \"soundfile\" if platform.system() == \"Windows\" else \"sox\"\n_audio_backends = {\"sox\": _sox_backe... | [
{
"content": "from functools import wraps\nfrom typing import Any, List, Union\n\nimport platform\nimport torch\nfrom torch import Tensor\n\nfrom . import _soundfile_backend, _sox_backend\n\n\nif platform.system() == \"Windows\":\n _audio_backend = \"soundfile\"\n _audio_backends = {\"soundfile\": _soundf... | diff --git a/torchaudio/_backend.py b/torchaudio/_backend.py
index 1c00fcd72f..f5646d7970 100644
--- a/torchaudio/_backend.py
+++ b/torchaudio/_backend.py
@@ -8,8 +8,12 @@
from . import _soundfile_backend, _sox_backend
-_audio_backend = "soundfile" if platform.system() == "Windows" else "sox"
-_audio_backends = {"... |
streamlit__streamlit-8741 | Streamlit unnecessarily runs the file watcher against every path in imported modules, even when watching is disabled
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided s... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)\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/LICE... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)\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/LICE... | diff --git a/lib/streamlit/runtime/app_session.py b/lib/streamlit/runtime/app_session.py
index dc9a13c17511..f68b216929db 100644
--- a/lib/streamlit/runtime/app_session.py
+++ b/lib/streamlit/runtime/app_session.py
@@ -144,7 +144,8 @@ def __init__(
self._stop_config_listener: Callable[[], bool] | None = None
... |
encode__starlette-1504 | Deprecate `WSGIMiddleware` in favor of `a2wsgi`
### Checklist
- [X] There are no similar issues or pull requests for this yet.
- [X] I discussed this idea on the [community chat](https://gitter.im/encode/community) and feedback is positive.
### Is your feature related to a problem? Please describe.
I want to depreca... | [
{
"content": "import io\nimport math\nimport sys\nimport typing\n\nimport anyio\n\nfrom starlette.types import Receive, Scope, Send\n\n\ndef build_environ(scope: Scope, body: bytes) -> dict:\n \"\"\"\n Builds a scope and request body into a WSGI environ object.\n \"\"\"\n environ = {\n \"REQU... | [
{
"content": "import io\nimport math\nimport sys\nimport typing\nimport warnings\n\nimport anyio\n\nfrom starlette.types import Receive, Scope, Send\n\nwarnings.warn(\n \"starlette.middleware.wsgi is deprecated and will be removed in a future release. \"\n \"Please refer to https://github.com/abersheeran/... | diff --git a/docs/middleware.md b/docs/middleware.md
index f053e97fa..b21914291 100644
--- a/docs/middleware.md
+++ b/docs/middleware.md
@@ -305,3 +305,7 @@ can be used to profile and monitor distributed applications.
A middleware class to emit timing information (cpu and wall time) for each request which
passes th... |
ultrabug__py3status-1977 | tztime not working with pango markup
I replaced i3status with py3status today.
Working except for **tztime** with pango markup. All other modules work as expected fine and output pango.
```
general {
colors = false
interval = 5
output_format = "i3bar"
markup = pango
c... | [
{
"content": "import sys\n\nfrom copy import deepcopy\nfrom json import loads\nfrom datetime import datetime, timedelta, tzinfo\nfrom subprocess import Popen\nfrom subprocess import PIPE\nfrom signal import SIGTSTP, SIGSTOP, SIGUSR1, SIG_IGN, signal\nfrom tempfile import NamedTemporaryFile\nfrom threading impor... | [
{
"content": "import sys\n\nfrom copy import deepcopy\nfrom json import loads\nfrom datetime import datetime, timedelta, tzinfo\nfrom subprocess import Popen\nfrom subprocess import PIPE\nfrom signal import SIGTSTP, SIGSTOP, SIGUSR1, SIG_IGN, signal\nfrom tempfile import NamedTemporaryFile\nfrom threading impor... | diff --git a/py3status/i3status.py b/py3status/i3status.py
index 1d85ce27b5..af4c6fb03a 100644
--- a/py3status/i3status.py
+++ b/py3status/i3status.py
@@ -78,6 +78,10 @@ def __init__(self, module_name, i3status):
self.i3status = i3status
py3_wrapper = i3status.py3_wrapper
+ markup = py3_wrapp... |
pyro-ppl__pyro-3325 | Bug in `CVAE` example
There is a bug in `CVAE` example. The `target` input to the `MaskedBCELoss` is not binary (it has values of -1, 0, 1). This was discovered by the PyTorch 2.1 update which started to validate the inputs of `F.binary_cross_entropy_loss`.
> FAILED tests/test_examples.py::test_cpu[cvae/main.py --nu... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nimport copy\nfrom pathlib import Path\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom tqdm import tqdm\n\n\nclass BaselineNet(nn.Module):\n def __init__(self... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nimport copy\nfrom pathlib import Path\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom tqdm import tqdm\n\n\nclass BaselineNet(nn.Module):\n def __init__(self... | diff --git a/examples/cvae/baseline.py b/examples/cvae/baseline.py
index 68695c6d5e..f901631806 100644
--- a/examples/cvae/baseline.py
+++ b/examples/cvae/baseline.py
@@ -34,8 +34,12 @@ def __init__(self, masked_with=-1):
def forward(self, input, target):
target = target.view(input.shape)
- loss ... |
sunpy__sunpy-2824 | show_colormaps() is not big enough to show the colormap names
See attached picture. This affects the gallery too - see http://docs.sunpy.org/en/stable/generated/gallery/plotting/sunpy_colormaps_reference.html#sphx-glr-generated-gallery-plotting-sunpy-colormaps-reference-py
 django 2.2
It throws `TypeError: 'module' object is not callable` now, PR with fix incoming.
| [
{
"content": "# -*- coding: utf-8 -*-\nimport six\nfrom six.moves import urllib\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\ntry:\n from django.templatetags import static\nexcept ImportError:\n # compatibility with ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport six\nfrom six.moves import urllib\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\ntry:\n from django.templatetags.static import static\nexcept ImportError:\n # compatibilit... | diff --git a/django_extensions/admin/widgets.py b/django_extensions/admin/widgets.py
index 1a344b281..e57638579 100644
--- a/django_extensions/admin/widgets.py
+++ b/django_extensions/admin/widgets.py
@@ -5,7 +5,7 @@
from django.contrib.admin.sites import site
from django.contrib.admin.widgets import ForeignKeyRawIdW... |
openstates__openstates-scrapers-2346 | MI failing since at least 2018-05-12
MI has been failing since 2018-05-12
Based on automated runs it appears that MI has not run successfully in 2 days (2018-05-12).
```
02:47:18 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2018-HJR-GG
02:47:19 INFO pupa: save bill HJR GG in 2017-2018 as bill_dcf34e60-... | [
{
"content": "import re\nimport requests\n\nimport lxml.html\nimport scrapelib\nfrom pupa.scrape import Person, Scraper\n\n\nabbr = {'D': 'Democratic', 'R': 'Republican'}\n\n\nclass MIPersonScraper(Scraper):\n def scrape(self, chamber=None, session=None):\n if chamber == 'upper':\n yield fr... | [
{
"content": "import re\nimport requests\n\nimport lxml.html\nimport scrapelib\nfrom pupa.scrape import Person, Scraper\n\n\nabbr = {'D': 'Democratic', 'R': 'Republican'}\n\n\nclass MIPersonScraper(Scraper):\n def scrape(self, chamber=None, session=None):\n if chamber == 'upper':\n yield fr... | diff --git a/openstates/mi/people.py b/openstates/mi/people.py
index 867b5e4851..4dd9618ab3 100644
--- a/openstates/mi/people.py
+++ b/openstates/mi/people.py
@@ -87,6 +87,7 @@ def scrape_upper(self, chamber):
url_to_append = 'http://www.senate.michigan.gov/_images/'
data = self.get(url).text
... |
wemake-services__wemake-python-styleguide-16 | Forbid `handler` as a variable name
We need to add `handler` to our variable blacklist.
| [
{
"content": "# -*- coding: utf-8 -*-\n\nBAD_FUNCTIONS = frozenset((\n # Code generation:\n 'eval',\n 'exec',\n 'compile',\n\n # Magic:\n 'globals',\n 'locals',\n 'vars',\n 'dir',\n\n # IO:\n 'input',\n 'help',\n\n # Attribute access:\n 'hasattr',\n 'delattr',\n))\n\... | [
{
"content": "# -*- coding: utf-8 -*-\n\nBAD_FUNCTIONS = frozenset((\n # Code generation:\n 'eval',\n 'exec',\n 'compile',\n\n # Magic:\n 'globals',\n 'locals',\n 'vars',\n 'dir',\n\n # IO:\n 'input',\n 'help',\n\n # Attribute access:\n 'hasattr',\n 'delattr',\n\n ... | diff --git a/wemake_python_styleguide/constants.py b/wemake_python_styleguide/constants.py
index 2029a05e6..f4cc63779 100644
--- a/wemake_python_styleguide/constants.py
+++ b/wemake_python_styleguide/constants.py
@@ -19,6 +19,10 @@
# Attribute access:
'hasattr',
'delattr',
+
+ # Too generic:
+ 'han... |
Parsl__parsl-1807 | Broken link to online documentation
In the [Quickstart Guide](https://parsl.readthedocs.io/en/stable/quickstart.html#installation-using-conda), the third option in the Tutorial list, "Read through the online tutorial documentation," contains a broken link: <https://parsl.readthedocs.io/en/stable/parsl-introduction> lea... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Parsl documentation build configuration file, created by\n# sphinx-quickstart on Mon Feb 20 16:35:17 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration va... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Parsl documentation build configuration file, created by\n# sphinx-quickstart on Mon Feb 20 16:35:17 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration va... | diff --git a/docs/conf.py b/docs/conf.py
index 093eb97242..6d99945f9b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -40,9 +40,9 @@
'sphinx.ext.napoleon'
]
-url = 'https://raw.githubusercontent.com/Parsl/parsl-tutorial/master/parsl-introduction.ipynb'
+url = 'https://raw.githubusercontent.com/Parsl/parsl-tutor... |
pytorch__pytorch-2956 | ONNX error converting torch.mean
I've been working to convert some models using sentence embeddings via ONNX and have run into the following error while running `torch.onnx._export`:
`RuntimeError: PythonOp doesn't define symbolic Mean`
I also had this error when trying to implement my own "mean" operation using a... | [
{
"content": "from functools import reduce\n\nfrom ..function import Function\nfrom ..variable import Variable\nimport torch\n\n\nclass Sum(Function):\n\n @staticmethod\n def forward(ctx, input, dim=None, keepdim=None):\n ctx.dim = dim\n ctx.keepdim = False if keepdim is None else keepdim\n ... | [
{
"content": "from functools import reduce\n\nfrom ..function import Function\nfrom ..variable import Variable\nimport torch\n\n\nclass Sum(Function):\n\n @staticmethod\n def forward(ctx, input, dim=None, keepdim=None):\n ctx.dim = dim\n ctx.keepdim = False if keepdim is None else keepdim\n ... | diff --git a/torch/autograd/_functions/reduce.py b/torch/autograd/_functions/reduce.py
index b5e5425f72657..125fabdc69df6 100644
--- a/torch/autograd/_functions/reduce.py
+++ b/torch/autograd/_functions/reduce.py
@@ -111,6 +111,15 @@ def reverse_dim(var, dim):
class Mean(Function):
+ @staticmethod
+ def symb... |
celery__celery-3669 | Specifying app/backend in GroupResult.restore is slightly awkward
In Celery 3.x I used `GroupResult.restore('some-id')` and it somehow found my app and figured out the backend (not sure how, but it worked).
In Celery 4.x this does not work (it does not find the backend and crashes). That makes sense to me (I like th... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Task results/state and results for groups of tasks.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport time\n\nfrom collections import OrderedDict, deque\nfrom contextlib import contextmanager\nfrom copy import copy\n\nfrom kombu.utils.objects ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Task results/state and results for groups of tasks.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport time\n\nfrom collections import OrderedDict, deque\nfrom contextlib import contextmanager\nfrom copy import copy\n\nfrom kombu.utils.objects ... | diff --git a/celery/result.py b/celery/result.py
index 8d8994a544e..8e42cbbc0dd 100644
--- a/celery/result.py
+++ b/celery/result.py
@@ -867,10 +867,13 @@ def children(self):
return self.results
@classmethod
- def restore(cls, id, backend=None):
+ def restore(cls, id, backend=None, app=None):
... |
saleor__saleor-4802 | Wrong AddressForm for Ireland
### What I'm trying to achieve
I tried to use address form validation for Ireland. Unfortunately, our API returns for that country that `country_area` is not required, but `AddressFormIE` requires it.
### Steps to reproduce the problem
1. Send `CheckoutShippingAddressUpdate` without ... | [
{
"content": "from collections import defaultdict\n\nimport i18naddress\nfrom django import forms\nfrom django.core.exceptions import ValidationError\nfrom django.forms.forms import BoundField\nfrom django.utils.translation import pgettext_lazy\nfrom django_countries import countries\n\nfrom .models import Addr... | [
{
"content": "from collections import defaultdict\n\nimport i18naddress\nfrom django import forms\nfrom django.core.exceptions import ValidationError\nfrom django.forms.forms import BoundField\nfrom django.utils.translation import pgettext_lazy\nfrom django_countries import countries\n\nfrom .models import Addr... | diff --git a/saleor/account/i18n.py b/saleor/account/i18n.py
index 1c516e0917c..47bff6bb3e1 100644
--- a/saleor/account/i18n.py
+++ b/saleor/account/i18n.py
@@ -236,8 +236,9 @@ def update_base_fields(form_class, i18n_rules):
field.placeholder = placeholder_value
if i18n_rules.country_area_choices:
+ ... |
readthedocs__readthedocs.org-10389 | Docs: Config file deprecation warnings
* [x] Upgrade v1 docs to clearly indicate that it's removed in September 2023 and link to the v2 version
* [x] Add warning banners in various places
References https://github.com/readthedocs/readthedocs.org/issues/10342
| [
{
"content": "\"\"\"\nShared Sphinx configuration using sphinx-multiproject.\n\nTo build each project, the ``PROJECT`` environment variable is used.\n\n.. code:: console\n\n $ make html # build default project\n $ PROJECT=dev make html # build the dev project\n\nfor more information read https://sphinx-mu... | [
{
"content": "\"\"\"\nShared Sphinx configuration using sphinx-multiproject.\n\nTo build each project, the ``PROJECT`` environment variable is used.\n\n.. code:: console\n\n $ make html # build default project\n $ PROJECT=dev make html # build the dev project\n\nfor more information read https://sphinx-mu... | diff --git a/docs/conf.py b/docs/conf.py
index 5730680b173..e2747e4c4ad 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -102,6 +102,7 @@
"rst-to-myst": ("https://rst-to-myst.readthedocs.io/en/stable/", None),
"rtd": ("https://docs.readthedocs.io/en/stable/", None),
"rtd-dev": ("https://dev.readthedocs.io... |
ivy-llc__ivy-15096 | torch.Tensor.fmod_
| [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
index 1d55b897ca768..aee86628fbfd0 100644
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -1090,3 +1090,8 @@ def sign(self):
@with_unsupported_dtypes({"1.11.0 and below"... |
ManimCommunity__manim-509 | ValueTracker must support increment also using +=
Just what the title says. Here's an example
```python
class Test(Scene):
def construct(self):
tracker = ValueTracker(0.0)
tracker.set_value(2.0)
print(tracker.get_value()) # -> 2.000
tracker.increment_value(3.0)
print... | [
{
"content": "\"\"\"Mobjects that dynamically show the change of a variable.\"\"\"\n\n__all__ = [\"ValueTracker\", \"ExponentialValueTracker\", \"ComplexValueTracker\"]\n\n\nimport numpy as np\n\nfrom ..utils.paths import straight_path\nfrom ..mobject.mobject import Mobject\n\n\nclass ValueTracker(Mobject):\n ... | [
{
"content": "\"\"\"Mobjects that dynamically show the change of a variable.\"\"\"\n\n__all__ = [\"ValueTracker\", \"ExponentialValueTracker\", \"ComplexValueTracker\"]\n\n\nimport numpy as np\n\nfrom ..utils.paths import straight_path\nfrom ..mobject.mobject import Mobject\n\n\nclass ValueTracker(Mobject):\n ... | diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 940c8efa89..6d410549c1 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -62,6 +62,7 @@ Mobjects, Scenes, and Animations
#. Add a :code:`Variable` class for displaying text that continuously updates to reflect the value of... |
electricitymaps__electricitymaps-contrib-1885 | Midnight glitch in UK-GB data
Reported wind generation drops to zero every day at midnight.
<img width="361" alt="Screenshot 2019-05-04 at 13 22 17" src="https://user-images.githubusercontent.com/13368547/57179023-fd811b00-6e70-11e9-99f7-814c0cfcd3cd.png">
Possibly related to #1779?
| [
{
"content": "#!/usr/bin/env python3\n# coding=utf-8\n\n\"\"\"\nParser that uses the ELEXON API to return the following data types.\n\nProduction\nExchanges\n\nDocumentation:\nhttps://www.elexon.co.uk/wp-content/uploads/2017/06/\nbmrs_api_data_push_user_guide_v1.1.pdf\n\"\"\"\n\nimport os\nimport arrow\nimport ... | [
{
"content": "#!/usr/bin/env python3\n# coding=utf-8\n\n\"\"\"\nParser that uses the ELEXON API to return the following data types.\n\nProduction\nExchanges\n\nDocumentation:\nhttps://www.elexon.co.uk/wp-content/uploads/2017/06/\nbmrs_api_data_push_user_guide_v1.1.pdf\n\"\"\"\n\nimport os\nimport arrow\nimport ... | diff --git a/parsers/ELEXON.py b/parsers/ELEXON.py
index 0d89a06dac..3fb8d7f97a 100644
--- a/parsers/ELEXON.py
+++ b/parsers/ELEXON.py
@@ -230,8 +230,7 @@ def _fetch_wind(target_datetime=None):
# line up with B1620 (main production report) search range
d = target_datetime.date()
- offset = 1 if target_da... |
liqd__a4-meinberlin-2151 | testing #1824 wrong wording
Dashboard/Newsletter: the Word "Empfänger*innen" is at the wrong place. Please delete it above and replace "Projekt" by "Empfänger*innen sind alle, die diesem Projekt folgen:"
| [
{
"content": "from django import forms\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.projects.models import Project\n\nfrom . import models\n\nOrganisation = apps.get_model(settings.A4_ORGANISATIONS_MODEL)\n\n\nclass N... | [
{
"content": "from django import forms\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.projects.models import Project\n\nfrom . import models\n\nOrganisation = apps.get_model(settings.A4_ORGANISATIONS_MODEL)\n\n\nclass N... | diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po
index 90b2adeff4..d93e9aaf04 100644
--- a/locale/de/LC_MESSAGES/django.po
+++ b/locale/de/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: a4-meinberlin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-... |
google__jax-11507 | tree_util deprecation warnings should set warning class and stacklevel
If I try using deprecated functions like `jax.tree_map` using the development version of JAX, I see messages like:
```
>>> jax.tree_map(lambda x: x, [1, 2, 3])
/usr/local/lib/python3.7/dist-packages/jax/_src/tree_util.py:529: UserWarning: jax.tre... | [
{
"content": "# Copyright 2018 Google 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2018 Google 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/jax/_src/tree_util.py b/jax/_src/tree_util.py
index 344edca8e235..353af2a129c8 100644
--- a/jax/_src/tree_util.py
+++ b/jax/_src/tree_util.py
@@ -527,7 +527,8 @@ def _deprecate(f):
@functools.wraps(f)
def wrapped(*args, **kwargs):
warnings.warn(f"jax.{f.__name__} is deprecated, and will be remov... |
pyinstaller__pyinstaller-7694 | Building with Python 3.11.4 fails
# Steps to repro
1. Upgrade to Python 3.11.4
2. Compile a sample app with PyInstaller 5.11.0
```
import urllib.parse
print('hello world')
```
# Expected result
Compiled app works
# Actual result
Script compiles but dies at runtime with:
```
./test
[20089] Module o... | [
{
"content": "# ----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | [
{
"content": "# ----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | diff --git a/PyInstaller/compat.py b/PyInstaller/compat.py
index 382104b9e4..626273357b 100644
--- a/PyInstaller/compat.py
+++ b/PyInstaller/compat.py
@@ -657,6 +657,10 @@ def importlib_load_source(name: str, pathname: str):
if not is_py310:
PY3_BASE_MODULES.add('_bootlocale')
+if sys.version_info >= (3, 11, 4)... |
learningequality__kolibri-3563 | Very long, CPU-intensive process after asking to import selected Khan Academy resources
### Observed behavior
Need more info on this, but this is the best I can produce right now.. observe the 566m of CPU usage:
```
top - 01:39:58 up 2 days, 11:30, 1 user, load average: 2.10, 2.17, 2.17
Tasks: 287 total, 1 ... | [
{
"content": "import logging as logger\nimport os\n\nfrom django.conf import settings\nfrom django.core.management.base import CommandError\nfrom requests.exceptions import HTTPError\n\nfrom ...utils import annotation\nfrom ...utils import import_export_content\nfrom ...utils import paths\nfrom ...utils import ... | [
{
"content": "import logging as logger\nimport os\n\nfrom django.conf import settings\nfrom django.core.management.base import CommandError\nfrom requests.exceptions import HTTPError\n\nfrom ...utils import annotation\nfrom ...utils import import_export_content\nfrom ...utils import paths\nfrom ...utils import ... | diff --git a/kolibri/content/management/commands/importcontent.py b/kolibri/content/management/commands/importcontent.py
index 8964fe70ae4..f5be4ab783d 100644
--- a/kolibri/content/management/commands/importcontent.py
+++ b/kolibri/content/management/commands/importcontent.py
@@ -67,7 +67,7 @@ def add_arguments(self, p... |
coala__coala-3888 | aspects/meta.py: Typo error
<!-- Hello! If you're filing a bug, please include every step so as to help us reproduce it on our machines. If you're unsure about how to file an issue, use the issue template. If you need any help regarding usage of coala, check out the documentation or hit us up on chat. You can ignore or... | [
{
"content": "from inspect import getmembers, signature\n\nfrom coala_utils.decorators import generate_repr\n\nfrom .base import aspectbase\nfrom .docs import Documentation\nfrom .taste import Taste\n\n\nclass aspectclass(type):\n \"\"\"\n Metaclass for aspectclasses.\n\n Root aspectclass is :class:`co... | [
{
"content": "from inspect import getmembers, signature\n\nfrom coala_utils.decorators import generate_repr\n\nfrom .base import aspectbase\nfrom .docs import Documentation\nfrom .taste import Taste\n\n\nclass aspectclass(type):\n \"\"\"\n Metaclass for aspectclasses.\n\n Root aspectclass is :class:`co... | diff --git a/coalib/bearlib/aspects/meta.py b/coalib/bearlib/aspects/meta.py
index a150ebb916..2d00633b7c 100644
--- a/coalib/bearlib/aspects/meta.py
+++ b/coalib/bearlib/aspects/meta.py
@@ -44,7 +44,7 @@ def subaspect(cls, subcls):
attr: getattr(docs, attr, '') for attr in
list(signature(Docu... |
pypa__pipenv-4776 | pipenv ignore environment variable `PIP_TARGET` when calculate dependancy delta.
### Issue description
Sometimes I use pipenv with environment variable `PIP_TARGET` for install libraries to specified directory.
But pipenv will skip install libraries if libraries already install to default location.
### E... | [
{
"content": "import contextlib\nimport importlib\nimport itertools\nimport json\nimport operator\nimport os\nimport site\nimport sys\nfrom pathlib import Path\nfrom sysconfig import get_paths, get_python_version\n\nimport pkg_resources\n\nimport pipenv\n\nfrom pipenv.environments import is_type_checking\nfrom ... | [
{
"content": "import contextlib\nimport importlib\nimport itertools\nimport json\nimport operator\nimport os\nimport site\nimport sys\nfrom pathlib import Path\nfrom sysconfig import get_paths, get_python_version\n\nimport pkg_resources\n\nimport pipenv\n\nfrom pipenv.environments import is_type_checking\nfrom ... | diff --git a/news/4775.bugfix.rst b/news/4775.bugfix.rst
new file mode 100644
index 0000000000..5c453923f1
--- /dev/null
+++ b/news/4775.bugfix.rst
@@ -0,0 +1 @@
+If `PIP_TARGET` is set to environment variables, Refer specified directory for calculate delta, instead default directory
diff --git a/pipenv/environment.py... |
networkx__networkx-3123 | Double import
I noticed that in `networkx/algorithms/__init__.py`the statement `from networkx.algorithms.triads import *` occurs twice. Is there any reason for this or is this just a blunder?
| [
{
"content": "from networkx.algorithms.assortativity import *\nfrom networkx.algorithms.boundary import *\nfrom networkx.algorithms.bridges import *\nfrom networkx.algorithms.chains import *\nfrom networkx.algorithms.centrality import *\nfrom networkx.algorithms.chordal import *\nfrom networkx.algorithms.cluste... | [
{
"content": "from networkx.algorithms.assortativity import *\nfrom networkx.algorithms.boundary import *\nfrom networkx.algorithms.bridges import *\nfrom networkx.algorithms.chains import *\nfrom networkx.algorithms.centrality import *\nfrom networkx.algorithms.chordal import *\nfrom networkx.algorithms.cluste... | diff --git a/networkx/algorithms/__init__.py b/networkx/algorithms/__init__.py
index 1ff35782922..b813a338ac9 100644
--- a/networkx/algorithms/__init__.py
+++ b/networkx/algorithms/__init__.py
@@ -40,7 +40,6 @@
from networkx.algorithms.smallworld import *
from networkx.algorithms.smetric import *
from networkx.algor... |
urllib3__urllib3-1866 | Established connections are replaced by None values
Hello!
When pool is in blocking mode, there is no connections in pool, and getting connection from pool is timed out.
https://github.com/urllib3/urllib3/pull/1759
| [
{
"content": "from __future__ import absolute_import\nimport errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\n\nfrom .exceptions import (\n ClosedPoolError,\n ProtocolError,\n EmptyPoolError,\n HeaderParsingErro... | [
{
"content": "from __future__ import absolute_import\nimport errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\n\nfrom .exceptions import (\n ClosedPoolError,\n ProtocolError,\n EmptyPoolError,\n HeaderParsingErro... | diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py
index b04259785f..492590fb9e 100644
--- a/src/urllib3/connectionpool.py
+++ b/src/urllib3/connectionpool.py
@@ -698,9 +698,11 @@ def urlopen(
# Everything went great!
clean_exit = True
- except queue.Empty:
- ... |
docker__docker-py-1721 | Regression in .dockerignore parsing with trailing '**'
docker==2.5.0
docker-compose==1.15.0
docker-pycreds==0.2.1
dockerpty==0.4.1
Having a line with trailing '**' in .dockerignore is causing an IndexError when calling docker-compose. Version 2.4.2 does not cause a crash. E.g. the following line causes the crash:... | [
{
"content": "\"\"\"Filename matching with shell patterns.\n\nfnmatch(FILENAME, PATTERN) matches according to the local convention.\nfnmatchcase(FILENAME, PATTERN) always takes case in account.\n\nThe functions operate by translating the pattern into a regular\nexpression. They cache the compiled regular expre... | [
{
"content": "\"\"\"Filename matching with shell patterns.\n\nfnmatch(FILENAME, PATTERN) matches according to the local convention.\nfnmatchcase(FILENAME, PATTERN) always takes case in account.\n\nThe functions operate by translating the pattern into a regular\nexpression. They cache the compiled regular expre... | diff --git a/docker/utils/fnmatch.py b/docker/utils/fnmatch.py
index e51bd8155..42461dd7d 100644
--- a/docker/utils/fnmatch.py
+++ b/docker/utils/fnmatch.py
@@ -75,7 +75,7 @@ def translate(pat):
# is some flavor of "**"
i = i + 1
# Treat **/ as ** so eat the "/"
- ... |
locustio__locust-1996 | locust:2.7.1 exits when clicking "Stop Tests" in the UI
### Describe the bug
When using the 2.7.1 docker image, locust exits with code 0 upon clicking "Stop Tests" in the UI.
We swapped in 2.7.0 with the same locustfile and config, and the problem was fixed.
### Expected behavior
Locust should continue running (... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport csv\nimport datetime\nimport logging\nimport os.path\nfrom functools import wraps\nfrom html import escape\nfrom io import StringIO\nfrom itertools import chain\nfrom time import time\n\nimport gevent\nfrom flask import Flask, make_response, jsonify, render_templa... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport csv\nimport datetime\nimport logging\nimport os.path\nfrom functools import wraps\nfrom html import escape\nfrom io import StringIO\nfrom itertools import chain\nfrom time import time\n\nimport gevent\nfrom flask import Flask, make_response, jsonify, render_templa... | diff --git a/locust/web.py b/locust/web.py
index 79fe9ac6bf..3e748b92b6 100644
--- a/locust/web.py
+++ b/locust/web.py
@@ -174,8 +174,6 @@ def stop():
self._swarm_greenlet.kill(block=True)
self._swarm_greenlet = None
environment.runner.stop()
- if self.greenlet ... |
pwr-Solaar__Solaar-804 | Main window is... weird on tiling WMs (or when resizing)
**Information**
- Solaar version (`git describe --tags` if cloned from Solaar repository): 1.0.2
- Distribution: ArchLinux
- Kernel version (ex. `uname -srmo`): `Linux 5.7.0-arch1-1 x86_64 GNU/Linux`
- Output of `solaar show`:
```
Unifying Receiver
Dev... | [
{
"content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the... | [
{
"content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the... | diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py
index d3e3e0c4e5..643bc0db01 100644
--- a/lib/solaar/ui/window.py
+++ b/lib/solaar/ui/window.py
@@ -346,9 +346,7 @@ def _create(delete_action):
geometry = Gdk.Geometry()
geometry.min_width = 600
geometry.min_height = 320
- geometry.max_width = 1000
- ... |
searx__searx-2295 | HTTP headers
searx includes contents from others websites. The contents are escaped, trimed and all, but there is always a risk. The security could be improve using HTTP headers.
Some headers that could be added :
`X-Frame-Options: SAMEORIGIN`
when there is the image proxy (break the included videos, in this case a... | [
{
"content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i... | [
{
"content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i... | diff --git a/searx/settings.yml b/searx/settings.yml
index 54352bbfc1..5cab0a1022 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -17,6 +17,12 @@ server:
image_proxy : False # Proxying image results through searx
http_protocol_version : "1.0" # 1.0 and 1.1 are supported
method: "POST" # POST... |
weni-ai__bothub-engine-229 | Wrong sentences counting in intents list
Reported by @johncordeiro in https://github.com/Ilhasoft/bothub/issues/43
| [
{
"content": "from rest_framework import serializers\n\nfrom bothub.common.models import Repository\nfrom bothub.common.models import RepositoryCategory\nfrom bothub.common.models import RepositoryEntityLabel\nfrom bothub.common.models import RepositoryAuthorization\nfrom bothub.common.models import RequestRepo... | [
{
"content": "from rest_framework import serializers\n\nfrom bothub.common.models import Repository\nfrom bothub.common.models import RepositoryCategory\nfrom bothub.common.models import RepositoryEntityLabel\nfrom bothub.common.models import RepositoryAuthorization\nfrom bothub.common.models import RequestRepo... | diff --git a/bothub/api/v2/repository/serializers.py b/bothub/api/v2/repository/serializers.py
index b8c04b9c..8ab46d3b 100644
--- a/bothub/api/v2/repository/serializers.py
+++ b/bothub/api/v2/repository/serializers.py
@@ -162,7 +162,7 @@ def get_intents(self, obj):
lambda intent: {
... |
great-expectations__great_expectations-7187 | When starting the data assistant: TypeError: __init__() missing 1 required positional argument: 'data_asset_name'
**Describe the bug**
I get an error message when I choose the data assistant:
`TypeError: __init__() missing 1 required positional argument: 'data_asset_name'`
**To Reproduce**
I run "great_expectat... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport logging\nimport os\nimport subprocess\nimport sys\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast\n\nimport click\n\nfrom great_expectation... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport logging\nimport os\nimport subprocess\nimport sys\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast\n\nimport click\n\nfrom great_expectation... | diff --git a/great_expectations/cli/toolkit.py b/great_expectations/cli/toolkit.py
index b290b1274284..13303449e818 100644
--- a/great_expectations/cli/toolkit.py
+++ b/great_expectations/cli/toolkit.py
@@ -1113,5 +1113,8 @@ def get_batch_request_using_datasource_name(
datasource=datasource, # type: ignore[ar... |
django-cms__django-filer-1077 | hide "Save as New" button
A click on "Save as New" will raise into PermissionDenied, because filer.admin.permissions.PrimitivePermissionAwareModelAdmin.has_add_permission() will always return False, see: https://github.com/divio/django-filer/blob/develop/filer/admin/permissions.py#L9
So, the "Save as New" button sho... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nfrom django import forms\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpResponseRedirect\nfrom django.utils.translation import ugettext as _\n\nfrom .. import settings\nfrom ..models import File\nfrom ..... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nfrom django import forms\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpResponseRedirect\nfrom django.utils.translation import ugettext as _\n\nfrom .. import settings\nfrom ..models import File\nfrom ..... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ab07391d1..22ccaaa2c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ CHANGELOG
* Enabled django-mptt 0.9
* Converted QueryDict to dict before manipulating in admin
+* Hide 'Save as new' button in file admin
1.3.2 (2018-04-23)
------------------
dif... |
flairNLP__flair-3491 | [Bug]: TextRegressor breaks due to unrelated labels
### Describe the bug
`TextRegressor._labels_to_tensor` iterates over every label on the sentence; not just the regression label specified by `self.label_name`. This leads to unexpected behavior.
For example, TextRegressor cannot be used as part of a multitask m... | [
{
"content": "import logging\nimport typing\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Tuple, Union\n\nimport torch\nfrom torch import nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\n\nimport flair\nimport flair.embeddings\nfrom flair.data import Corpus, Di... | [
{
"content": "import logging\nimport typing\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Tuple, Union\n\nimport torch\nfrom torch import nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\n\nimport flair\nimport flair.embeddings\nfrom flair.data import Corpus, Di... | diff --git a/flair/models/text_regression_model.py b/flair/models/text_regression_model.py
index 9b4cc12c3a..351dc9bed8 100644
--- a/flair/models/text_regression_model.py
+++ b/flair/models/text_regression_model.py
@@ -64,7 +64,8 @@ def forward_loss(self, sentences: List[Sentence]) -> Tuple[torch.Tensor, int]:
d... |
pytorch__vision-5425 | PascalVOC 2009 wrong hash
### 🐛 Describe the bug
There is a wrong checksum defined for PascalVOC year 2009
```bash
$ wget -q http://host.robots.ox.ac.uk/pascal/VOC/voc2009/VOCtrainval_11-May-2009.tar
$ md5sum VOCtrainval_11-May-2009.tar
a3e00b113cfcfebf17e343f59da3caa1 VOCtrainval_11-May-2009.tar
```
Howev... | [
{
"content": "import collections\nimport os\nfrom xml.etree.ElementTree import Element as ET_Element\n\nfrom .vision import VisionDataset\n\ntry:\n from defusedxml.ElementTree import parse as ET_parse\nexcept ImportError:\n from xml.etree.ElementTree import parse as ET_parse\nimport warnings\nfrom typing ... | [
{
"content": "import collections\nimport os\nfrom xml.etree.ElementTree import Element as ET_Element\n\nfrom .vision import VisionDataset\n\ntry:\n from defusedxml.ElementTree import parse as ET_parse\nexcept ImportError:\n from xml.etree.ElementTree import parse as ET_parse\nimport warnings\nfrom typing ... | diff --git a/torchvision/datasets/voc.py b/torchvision/datasets/voc.py
index 64437caed5b..3448d62702c 100644
--- a/torchvision/datasets/voc.py
+++ b/torchvision/datasets/voc.py
@@ -37,7 +37,7 @@
"2009": {
"url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2009/VOCtrainval_11-May-2009.tar",
"filena... |
openstates__openstates-scrapers-1627 | MI scraper failing since at least 2017-04-01
MI has been failing since 2017-04-01
Based on automated runs it appears that MI has not run successfully in 5 days (2017-04-01).
```
06:00:31 INFO billy: billy-update abbr=mi
actions=scrape,import,report
types=bills,legislators,votes,committees,alldata,events
... | [
{
"content": "import re\n\nfrom billy.scrape.legislators import LegislatorScraper, Legislator\nfrom openstates.utils import LXMLMixin\n\nabbr = {'D': 'Democratic', 'R': 'Republican'}\n\n\nclass MILegislatorScraper(LegislatorScraper, LXMLMixin):\n jurisdiction = 'mi'\n\n def scrape(self, chamber, term):\n ... | [
{
"content": "import re\n\nfrom billy.scrape.legislators import LegislatorScraper, Legislator\nfrom openstates.utils import LXMLMixin\n\nabbr = {'D': 'Democratic', 'R': 'Republican'}\n\n\nclass MILegislatorScraper(LegislatorScraper, LXMLMixin):\n jurisdiction = 'mi'\n\n def scrape(self, chamber, term):\n ... | diff --git a/openstates/mi/legislators.py b/openstates/mi/legislators.py
index 82a381e450..c6980ccc02 100644
--- a/openstates/mi/legislators.py
+++ b/openstates/mi/legislators.py
@@ -73,7 +73,7 @@ def scrape_lower(self, chamber, term):
self.save_legislator(leg)
def scrape_upper(self, chamber, term):... |
benoitc__gunicorn-1441 | Supporting newest version of python
Gunicorn currently doesn't run tests with python3.6.
Since 3.6 is release and some of us are preparing to use it in production it would be great if gunicorn had confirmed support.
Also `setup.py` classifiers doesn't include 3.5 or 3.6.
| [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\n\nfrom gunicorn import __version__\n\n... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\n\nfrom gunicorn import __version__\n\n... | diff --git a/.travis.yml b/.travis.yml
index 35bac5a5f..51a1cf720 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,24 @@
sudo: false
language: python
-python: 3.5
-env:
- - TOXENV=py26
- - TOXENV=py27
- - TOXENV=py34
- - TOXENV=py35
- - TOXENV=pypy
+matrix:
+ include:
+ - python: 2.6
+ env: TOXENV... |
mozilla__telemetry-analysis-service-228 | AttributeError: 'SparkJobProvisioner' object has no attribute 'stop'
While testing locally in a branch I bumped into this. I didn't test it on master but looking at the code this seems like it may also be a problem.
The `SparkJob.terminate` calls `self.provisioner.stop(self.current_run_jobflow_id)`, where `self.prov... | [
{
"content": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\nfrom datetime import timedelta\n\nfrom django.core.urlresolvers import reverse\nfrom django.db i... | [
{
"content": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\nfrom datetime import timedelta\n\nfrom django.core.urlresolvers import reverse\nfrom django.db i... | diff --git a/atmo/jobs/models.py b/atmo/jobs/models.py
index 59879883..3f07d6b1 100644
--- a/atmo/jobs/models.py
+++ b/atmo/jobs/models.py
@@ -210,8 +210,8 @@ def run(self):
def terminate(self):
"""Stop the currently running scheduled Spark job."""
- if self.current_run_jobflow_id:
- s... |
lutris__lutris-1132 | DXVK versions not updating when dxvk directory is missing
When `~/.local/share/lutris/runtime/dxvk/` is not present (because a user never used dxvk before), Lutris fails to create `dxvk_versions.json` because the parent directory does not exist, which leads to Lutris showing the (outdated) fallback DXVK versions. A wor... | [
{
"content": "\"\"\"DXVK helper module\"\"\"\nimport os\nimport json\nimport time\nimport shutil\nimport urllib.request\n\nfrom lutris.settings import RUNTIME_DIR\nfrom lutris.util.log import logger\nfrom lutris.util.extract import extract_archive\nfrom lutris.util.downloader import Downloader\n\n\nCACHE_MAX_AG... | [
{
"content": "\"\"\"DXVK helper module\"\"\"\nimport os\nimport json\nimport time\nimport shutil\nimport urllib.request\n\nfrom lutris.settings import RUNTIME_DIR\nfrom lutris.util.log import logger\nfrom lutris.util.extract import extract_archive\nfrom lutris.util.downloader import Downloader\n\n\nCACHE_MAX_AG... | diff --git a/lutris/util/dxvk.py b/lutris/util/dxvk.py
index a8822cbbf8..865620a443 100644
--- a/lutris/util/dxvk.py
+++ b/lutris/util/dxvk.py
@@ -17,7 +17,10 @@
def get_dxvk_versions():
"""Get DXVK versions from GitHub"""
- versions_path = os.path.join(RUNTIME_DIR, 'dxvk', 'dxvk_versions.json')
+ dxvk_pa... |
plone__Products.CMFPlone-3094 | sorting in control panel
The items of the control panel are completely unsorted (should be sorted in alphabetical order (depending on the current language in Plone).
:
a['title'] = translate(ti... |
chainer__chainer-2131 | `fs` attribute of CaffeFunction is missing
`CaffeFunction` should have `fs` attribute which is a `FunctionSet` that has a set of layers, according to its [document](https://github.com/pfnet/chainer/blob/master/chainer/links/caffe/caffe_function.py#L121). But it is missing. I think we should treat it as a document bug ... | [
{
"content": "import collections\nimport pkg_resources\nimport sys\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer import functions\nfrom chainer import link\nfrom chainer import links\n\n\ndef _protobuf3():\n ws = pkg_resources.WorkingSet()\n try:\n ws.require('protobuf>=3.0.0a')\n ... | [
{
"content": "import collections\nimport pkg_resources\nimport sys\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer import functions\nfrom chainer import link\nfrom chainer import links\n\n\ndef _protobuf3():\n ws = pkg_resources.WorkingSet()\n try:\n ws.require('protobuf>=3.0.0a')\n ... | diff --git a/chainer/links/caffe/caffe_function.py b/chainer/links/caffe/caffe_function.py
index b64c0dfac62f..f6ff4b90ef05 100644
--- a/chainer/links/caffe/caffe_function.py
+++ b/chainer/links/caffe/caffe_function.py
@@ -118,9 +118,6 @@ class CaffeFunction(link.Chain):
model_path (str): Path to the binary-pr... |
voicepaw__so-vits-svc-fork-331 | Use `version` parameter for TensorBoardLogger
**Is your feature request related to a problem? Please describe.**
Currently the TensorBoardLogger doesn't have a version parameter when initialized.
By default, it is `None`, and the documentation states:
> version ([Union](https://docs.python.org/3/library/typing.html#... | [
{
"content": "from __future__ import annotations\n\nimport warnings\nfrom logging import getLogger\nfrom multiprocessing import cpu_count\nfrom pathlib import Path\nfrom typing import Any\n\nimport lightning.pytorch as pl\nimport torch\nfrom lightning.pytorch.accelerators import TPUAccelerator\nfrom lightning.p... | [
{
"content": "from __future__ import annotations\n\nimport warnings\nfrom logging import getLogger\nfrom multiprocessing import cpu_count\nfrom pathlib import Path\nfrom typing import Any\n\nimport lightning.pytorch as pl\nimport torch\nfrom lightning.pytorch.accelerators import TPUAccelerator\nfrom lightning.p... | diff --git a/src/so_vits_svc_fork/preprocessing/config_templates/quickvc.json b/src/so_vits_svc_fork/preprocessing/config_templates/quickvc.json
index 7a8f42ed..db26f630 100644
--- a/src/so_vits_svc_fork/preprocessing/config_templates/quickvc.json
+++ b/src/so_vits_svc_fork/preprocessing/config_templates/quickvc.json
@... |
Kinto__kinto-848 | Accessing /buckets/default/collections/ raise a 500
Verified with Kinto 4.1.1 and 4.3.0
```
$ http https://kinto.dev.mozaws.net/v1/buckets/default/collections/ --auth toto:toot
File "~/venvs/kinto/local/lib/python2.7/site-packages/pyramid/tweens.py", line 22, in excview_tween
response = handler(request)
File "... | [
{
"content": "import uuid\n\nimport six\nfrom pyramid import httpexceptions\nfrom pyramid.settings import asbool\nfrom pyramid.security import NO_PERMISSION_REQUIRED, Authenticated\n\nfrom kinto.core.errors import raise_invalid\nfrom kinto.core.events import ACTIONS\nfrom kinto.core.utils import (\n build_re... | [
{
"content": "import uuid\n\nimport six\nfrom pyramid import httpexceptions\nfrom pyramid.settings import asbool\nfrom pyramid.security import NO_PERMISSION_REQUIRED, Authenticated\n\nfrom kinto.core.errors import raise_invalid\nfrom kinto.core.events import ACTIONS\nfrom kinto.core.utils import (\n build_re... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 6b274c821..2b7512c98 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,10 +3,12 @@ Changelog
This document describes changes between each past release.
-4.4.0 (unreleased)
+4.3.1 (unreleased)
------------------
-- Nothing changed yet.
+**Bug fixes**
+
+- Make ... |
pyro-ppl__pyro-3247 | Possible bug in poutine/trace_messenger.py, function identify_dense_edges
Hi,
I found some strange code pattern in function identify_dense_edges, in file [poutine/trace_messenger.py](https://github.com/pyro-ppl/pyro/blob/dev/pyro/poutine/trace_messenger.py#L21).
I notice two sequential instances of:
`if site_is_su... | [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport sys\n\nfrom .messenger import Messenger\nfrom .trace_struct import Trace\nfrom .util import site_is_subsample\n\n\ndef identify_dense_edges(trace):\n \"\"\"\n Modifies a trace in-place by addin... | [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport sys\n\nfrom .messenger import Messenger\nfrom .trace_struct import Trace\nfrom .util import site_is_subsample\n\n\ndef identify_dense_edges(trace):\n \"\"\"\n Modifies a trace in-place by addin... | diff --git a/pyro/poutine/trace_messenger.py b/pyro/poutine/trace_messenger.py
index fbbbe54e03..2e2790db8d 100644
--- a/pyro/poutine/trace_messenger.py
+++ b/pyro/poutine/trace_messenger.py
@@ -18,7 +18,7 @@ def identify_dense_edges(trace):
continue
if node["type"] == "sample":
for p... |
ivy-llc__ivy-14108 | float_power
| [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, integer_arrays_to_float\nimport ivy.functional.frontends.torch as torch_frontend\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef add(input, other, *, alpha=... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, integer_arrays_to_float\nimport ivy.functional.frontends.torch as torch_frontend\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef add(input, other, *, alpha=... | diff --git a/ivy/functional/frontends/torch/pointwise_ops.py b/ivy/functional/frontends/torch/pointwise_ops.py
index 4bf6efb8e0959..d5c2d4ce524ec 100644
--- a/ivy/functional/frontends/torch/pointwise_ops.py
+++ b/ivy/functional/frontends/torch/pointwise_ops.py
@@ -361,6 +361,12 @@ def pow(input, exponent, *, out=None):... |
RedHatInsights__insights-core-1468 | Mistake to recognize collected files as missing requirements
When I tried to reformat the output of missing requirements from "-m" option in insights-run, I found that insights-run would recognize collected soft link files from sosreport as missing. For example, when I executed insights-run with a sosreport collected f... | [
{
"content": "import itertools\nimport logging\nimport os\nimport re\nimport six\nimport traceback\n\nfrom collections import defaultdict\nfrom glob import glob\n\nfrom insights.core import blacklist, dr\nfrom insights.core.filters import get_filters\nfrom insights.core.context import ExecutionContext, FSRoots,... | [
{
"content": "import itertools\nimport logging\nimport os\nimport re\nimport six\nimport traceback\n\nfrom collections import defaultdict\nfrom glob import glob\n\nfrom insights.core import blacklist, dr\nfrom insights.core.filters import get_filters\nfrom insights.core.context import ExecutionContext, FSRoots,... | diff --git a/insights/core/spec_factory.py b/insights/core/spec_factory.py
index 1bac9022ff..377fded927 100644
--- a/insights/core/spec_factory.py
+++ b/insights/core/spec_factory.py
@@ -141,7 +141,7 @@ def validate(self):
if os.path.islink(self.path):
resolved = os.path.realpath(self.path)
- ... |
pydantic__pydantic-2711 | schema_json() fails for optional namedtuple fields with default value
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this ... | [
{
"content": "import re\nimport warnings\nfrom collections import defaultdict\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nfrom pathlib import Pat... | [
{
"content": "import re\nimport warnings\nfrom collections import defaultdict\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nfrom pathlib import Pat... | diff --git a/changes/2707-PrettyWood.md b/changes/2707-PrettyWood.md
new file mode 100644
index 00000000000..06d6db7d85e
--- /dev/null
+++ b/changes/2707-PrettyWood.md
@@ -0,0 +1 @@
+fix JSON schema generation when a field is of type `NamedTuple` and has a default value
diff --git a/pydantic/schema.py b/pydantic/schema... |
cobbler__cobbler-3175 | `grab_tree` is spamming the log file
### Describe the bug
The log file because unreasonable big because of `grab_tree` messages. They are important but not for normal day-by-day administration.
### Steps to reproduce
1. Look at the logfile
2. See spam
### Expected behavior
The logfile is not exploding.
... | [
{
"content": "\"\"\"\nCobbler module that contains the code for a generic Cobbler item.\n\"\"\"\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others\n# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>\n\nimport copy\nimport enum\n... | [
{
"content": "\"\"\"\nCobbler module that contains the code for a generic Cobbler item.\n\"\"\"\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others\n# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>\n\nimport copy\nimport enum\n... | diff --git a/cobbler/items/item.py b/cobbler/items/item.py
index 08d40565ac..4efad7ad1e 100644
--- a/cobbler/items/item.py
+++ b/cobbler/items/item.py
@@ -1010,7 +1010,7 @@ def grab_tree(self) -> list:
parent = parent.parent
# FIXME: Now get the object and check its existence
results.... |
OpenMined__PySyft-7200 | Fix ledger test brent method
## Description
FAILED tests/syft/core/adp/data_subject_ledger_test.py::test_cache_indexing_correctness - ValueError: Use of `bounds` is incompatible with 'method=Brent'.
FAILED tests/syft/core/adp/data_subject_ledger_test.py::test_cache_bypass - ValueError: Use of `bounds` is incompatible... | [
{
"content": "# future\nfrom __future__ import annotations\n\n# stdlib\nfrom functools import partial\nimport os\nfrom pathlib import Path\nimport time\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import Optional\nfrom typing import TYPE_CHECKING\nfrom typing import... | [
{
"content": "# future\nfrom __future__ import annotations\n\n# stdlib\nfrom functools import partial\nimport os\nfrom pathlib import Path\nimport time\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import Optional\nfrom typing import TYPE_CHECKING\nfrom typing import... | diff --git a/packages/syft/src/syft/core/adp/data_subject_ledger.py b/packages/syft/src/syft/core/adp/data_subject_ledger.py
index 721d1a5d9a7..e62f0786656 100644
--- a/packages/syft/src/syft/core/adp/data_subject_ledger.py
+++ b/packages/syft/src/syft/core/adp/data_subject_ledger.py
@@ -335,7 +335,7 @@ def _get_optima... |
jazzband__django-simple-history-115 | history_user error during usage of simple_history.middleware.HistoryRequestMiddleware
Hello!
I've written some automatic tests with WebTest. During execution of testsuite test data is generated automatically (some objects are created dynamically). If I don't use simple_history.middleware.HistoryRequestMiddleware, than ... | [
{
"content": "from __future__ import unicode_literals\n\nimport threading\nimport copy\ntry:\n from django.apps import apps # Django >= 1.7\nexcept ImportError:\n apps = None\nfrom django.db import models\nfrom django.db.models.fields.related import RelatedField\nfrom django.db.models.related import Rela... | [
{
"content": "from __future__ import unicode_literals\n\nimport threading\nimport copy\ntry:\n from django.apps import apps # Django >= 1.7\nexcept ImportError:\n apps = None\nfrom django.db import models\nfrom django.db.models.fields.related import RelatedField\nfrom django.db.models.related import Rela... | diff --git a/simple_history/models.py b/simple_history/models.py
index a37be90a8..d725c6148 100644
--- a/simple_history/models.py
+++ b/simple_history/models.py
@@ -233,9 +233,11 @@ def get_history_user(self, instance):
return instance._history_user
except AttributeError:
try:
- ... |
encode__django-rest-framework-4315 | SchemaGenerator: 'FooViewSet' object has no attribute 'format_kwarg'
## Checklist
- [x] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage question. (... | [
{
"content": "from importlib import import_module\n\nfrom django.conf import settings\nfrom django.contrib.admindocs.views import simplify_regex\nfrom django.core.urlresolvers import RegexURLPattern, RegexURLResolver\nfrom django.utils import six\n\nfrom rest_framework import exceptions, serializers\nfrom rest_... | [
{
"content": "from importlib import import_module\n\nfrom django.conf import settings\nfrom django.contrib.admindocs.views import simplify_regex\nfrom django.core.urlresolvers import RegexURLPattern, RegexURLResolver\nfrom django.utils import six\n\nfrom rest_framework import exceptions, serializers\nfrom rest_... | diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py
index cf84aca74c..4c97f9868a 100644
--- a/rest_framework/schemas.py
+++ b/rest_framework/schemas.py
@@ -84,6 +84,7 @@ def get_schema(self, request=None):
method = link.action.upper()
view = callback.cls()
... |
learningequality__kolibri-3759 | remove translations for user kinds on backend
### Observed behavior
In role kinds we use the string "Classroom Assignable Coach": https://github.com/learningequality/kolibri/blob/develop/kolibri/auth/constants/role_kinds.py#L15
This string is not something that should be user-facing
### Expected behavior
im... | [
{
"content": "\"\"\"\nThis module contains constants representing the kinds of \"roles\" that a user can have with respect to a Collection.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.utils.translation import ugettext_lazy as _\n\nADMIN = \"admin\"\nCOACH = \"coach\"\nASSIGNABLE_COACH = \"cl... | [
{
"content": "\"\"\"\nThis module contains constants representing the kinds of \"roles\" that a user can have with respect to a Collection.\n\"\"\"\nfrom __future__ import unicode_literals\n\nADMIN = \"admin\"\nCOACH = \"coach\"\nASSIGNABLE_COACH = \"classroom assignable coach\"\n\nchoices = (\n (ADMIN, \"Ad... | diff --git a/kolibri/auth/constants/role_kinds.py b/kolibri/auth/constants/role_kinds.py
index 37761f2e35b..2848233b4e0 100644
--- a/kolibri/auth/constants/role_kinds.py
+++ b/kolibri/auth/constants/role_kinds.py
@@ -3,14 +3,12 @@
"""
from __future__ import unicode_literals
-from django.utils.translation import uge... |
nerfstudio-project__nerfstudio-1094 | Training crashes if all cameras are deleted while in "Render View"
Steps to replicate:
1. Start train and open viewer
2. Add camera to scene
3. Switch to "RENDER VIEW"
4. Delete camera
Resulting error:
```
File "/projects/pyrad/scripts/train.py", line 234, in main
launch(
File "/projects/pyrad/script... | [
{
"content": "# Copyright 2022 The Nerfstudio 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 Nerfstudio 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/nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/CameraPanel.jsx b/nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/CameraPanel.jsx
index b71266d4a4..6a741d156c 100644
--- a/nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/CameraPanel.jsx
+++ b/nerfstudio/viewer/app/src/modules/SidePan... |
carpentries__amy-2324 | Bug: Internal Server Error: /fiscal/organizations/
Production issue.
```
FieldError at /fiscal/organizations/
Cannot resolve keyword 'membership' into field. Choices are: administered_events, affiliated_organizations, country, domain, fullname, hosted_events, id, latitude, longitude, member, memberships, selforgan... | [
{
"content": "from datetime import date\n\nfrom django.forms import widgets\nimport django_filters\n\nfrom workshops.fields import Select2MultipleWidget, Select2Widget\nfrom workshops.filters import AllCountriesFilter, AMYFilterSet\nfrom workshops.models import Membership, Organization\n\n\nclass OrganizationFi... | [
{
"content": "from datetime import date\n\nfrom django.forms import widgets\nimport django_filters\n\nfrom workshops.fields import Select2MultipleWidget, Select2Widget\nfrom workshops.filters import AllCountriesFilter, AMYFilterSet\nfrom workshops.models import Membership, Organization\n\n\nclass OrganizationFi... | diff --git a/amy/fiscal/filters.py b/amy/fiscal/filters.py
index 87aa15fa2..b62b2369f 100644
--- a/amy/fiscal/filters.py
+++ b/amy/fiscal/filters.py
@@ -11,7 +11,7 @@
class OrganizationFilter(AMYFilterSet):
country = AllCountriesFilter(widget=Select2Widget)
- membership__variant = django_filters.MultipleChoi... |
frappe__frappe-8232 | bug(API): TypeError, cannot create document
```bash
curl -X POST https://my.erpnext.com/api/resource/Lead \
-H 'Accept: application/json' \
-H 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX==' \
-H 'Content-Type: application/json' \
-d '{"lead_name": "Jon Doe"}'
```
Returns
```jso... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\nfrom __future__ import unicode_literals\n\nimport json\nimport frappe\nimport frappe.handler\nimport frappe.client\nfrom frappe.utils.response import build_response\nfrom frappe import _\nfrom six... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\nfrom __future__ import unicode_literals\n\nimport json\nimport frappe\nimport frappe.handler\nimport frappe.client\nfrom frappe.utils.response import build_response\nfrom frappe import _\nfrom six... | diff --git a/frappe/api.py b/frappe/api.py
index 84cadfc4569b..2ce490d68d4b 100644
--- a/frappe/api.py
+++ b/frappe/api.py
@@ -113,7 +113,10 @@ def handle():
doctype, **frappe.local.form_dict)})
if frappe.local.request.method=="POST":
- data = json.loads(frappe.local.form_dict.data)
+ if frappe.l... |
CTFd__CTFd-1963 | Add CSV examples for CSV Import
Add CSV examples for CSV Import
| [
{
"content": "import csv\nimport json\nfrom io import BytesIO, StringIO\n\nfrom CTFd.models import (\n Flags,\n Hints,\n Tags,\n TeamFields,\n Teams,\n UserFields,\n Users,\n db,\n get_class_by_tablename,\n)\nfrom CTFd.plugins.challenges import get_chal_class\nfrom CTFd.utils.config i... | [
{
"content": "import csv\nimport json\nfrom io import BytesIO, StringIO\n\nfrom CTFd.models import (\n Flags,\n Hints,\n Tags,\n TeamFields,\n Teams,\n UserFields,\n Users,\n db,\n get_class_by_tablename,\n)\nfrom CTFd.plugins.challenges import get_chal_class\nfrom CTFd.utils.config i... | diff --git a/CTFd/utils/csv/__init__.py b/CTFd/utils/csv/__init__.py
index d4f15a660..21e3f01b4 100644
--- a/CTFd/utils/csv/__init__.py
+++ b/CTFd/utils/csv/__init__.py
@@ -252,8 +252,8 @@ def load_challenges_csv(dict_reader):
hints = line.pop("hints", None)
challenge_type = line.pop("type", "standard... |
ansible__ansible-31996 | ansible-doc misses inventory plugins in user-defined search path
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
`ansible-doc` CLI
##### ANSIBLE VERSION
```
ansible --version
ansible 2.5.0
config file = None
configured module search path = [u'/Users/alancoding/.ansible/plugins/modules', u'/usr/shar... | [
{
"content": "# (c) 2014, James Tanner <tanner.jc@gmail.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n... | [
{
"content": "# (c) 2014, James Tanner <tanner.jc@gmail.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n... | diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py
index 1a98a19c7591ef..d8e4dec4f0cd2b 100644
--- a/lib/ansible/cli/doc.py
+++ b/lib/ansible/cli/doc.py
@@ -95,7 +95,7 @@ def run(self):
elif plugin_type == 'vars':
loader = vars_loader
elif plugin_type == 'inventory':
- ... |
OpenNMT__OpenNMT-tf-361 | Question about evaluation metrics
Hello,
I use opennmt-tf to train models for different tasks, and I want to evaluate the effectiveness of a model to know how long should I take for training. But I’m not sure in how to evaluate sequence tagging model or other sequence to sequence model using validation data to measure... | [
{
"content": "\"\"\"Sequence tagger.\"\"\"\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom opennmt import inputters\nfrom opennmt.models.model import Model\nfrom opennmt.utils.misc import print_bytes\nfrom opennmt.utils.losses import cross_entropy_sequence_loss\n\n\nclass SequenceTagger(Model):\n \"\"\"... | [
{
"content": "\"\"\"Sequence tagger.\"\"\"\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom opennmt import inputters\nfrom opennmt.models.model import Model\nfrom opennmt.utils.misc import print_bytes\nfrom opennmt.utils.losses import cross_entropy_sequence_loss\n\n\nclass SequenceTagger(Model):\n \"\"\"... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 183d3c4e2..a79b9a3dc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,8 @@ OpenNMT-tf follows [semantic versioning 2.0.0](https://semver.org/). The API cov
### Fixes and improvements
+* Allow configuring `tagging_scheme` in the data configuration
+
## [1.21.... |
bridgecrewio__checkov-107 | Checkov fails to start in Windows environments
**Describe the bug**
After you install Checkov on Windows, running Checkov does nothing.
**To Reproduce**
Steps to reproduce the behavior:
1. Open Powershell/cmd
2. Run cli command 'checkov'
3. Does nothing
**Expected behavior**
The tool running. Magic.
**... | [
{
"content": "#!/usr/bin/env python\nimport logging\nimport os\nfrom importlib import util\nfrom os import path\n\nimport setuptools\nfrom setuptools import setup\n\n# read the contents of your README file\nthis_directory = path.abspath(path.dirname(__file__))\nwith open(path.join(this_directory, \"README.md\")... | [
{
"content": "#!/usr/bin/env python\nimport logging\nimport os\nfrom importlib import util\nfrom os import path\n\nimport setuptools\nfrom setuptools import setup\n\n# read the contents of your README file\nthis_directory = path.abspath(path.dirname(__file__))\nwith open(path.join(this_directory, \"README.md\")... | diff --git a/bin/checkov.bat b/bin/checkov.bat
new file mode 100644
index 0000000000..355222a5dc
--- /dev/null
+++ b/bin/checkov.bat
@@ -0,0 +1,2 @@
+@ECHO OFF
+C:\Python37\python C:\Python37\Lib\site-packages\checkov\main.py %1 %2
diff --git a/setup.py b/setup.py
index 1a8a642720..36fb61b496 100644
--- a/setup.py
+++ ... |
ibis-project__ibis-5763 | ux: unexpected cryptic `IbisTypeError` on expression `ibis.greatest(t.value, ibis._.lagged_value)`
## Reproducer
Setup:
```python
>>> import ibis
... import pandas as pd
...
... t = ibis.memtable(
... pd.DataFrame(
... {
... "value": [1, 2, 3, 4, 5],
... "group": ["a",... | [
{
"content": "from __future__ import annotations\n\nimport enum\nimport operator\nfrom itertools import product, starmap\n\nfrom public import public\n\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.schema as sch\nimport ibis.expr.types as ir\nfrom ibis import util\nfr... | [
{
"content": "from __future__ import annotations\n\nimport enum\nimport operator\nfrom itertools import product, starmap\n\nfrom public import public\n\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.schema as sch\nimport ibis.expr.types as ir\nfrom ibis import util\nfr... | diff --git a/ibis/expr/rules.py b/ibis/expr/rules.py
index 94fbdc45bb9e..e95034e4401b 100644
--- a/ibis/expr/rules.py
+++ b/ibis/expr/rules.py
@@ -232,6 +232,12 @@ def value(dtype, arg, **kwargs):
"""
import ibis.expr.operations as ops
+ if isinstance(arg, Deferred):
+ raise com.IbisTypeError(
+ ... |
qutebrowser__qutebrowser-4120 | importer.py may fail on chrome bookmarks import
The importer.py failed on me at `assert 'type' in bm, bm` (currently line# 336). The reason being is there's an entry `"sync_transaction_version": "186"` in my chrome bookmarks, which is a string and doesn't have the `type` key.
I have a simple fix for it - adding `if ... | [
{
"content": "#!/usr/bin/env python3\n# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Claude (longneck) <longneck@scratchbook.ch>\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... | [
{
"content": "#!/usr/bin/env python3\n# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Claude (longneck) <longneck@scratchbook.ch>\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... | diff --git a/scripts/importer.py b/scripts/importer.py
index eb808a615cd..fd3e4ca0b26 100755
--- a/scripts/importer.py
+++ b/scripts/importer.py
@@ -333,6 +333,8 @@ def import_chrome(profile, bookmark_types, output_format):
def bm_tree_walk(bm, template):
"""Recursive function to walk through bo... |
uccser__cs-unplugged-1414 | No URL inside button when content not available
https://csunplugged.org/es/topics/binary-numbers/programming/binary-numbers-no-calculations/scratch-solution/

| [
{
"content": "\"\"\"Models for the topics application.\"\"\"\n\nfrom django.urls import reverse\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.postgres.fields import JSONField, IntegerRangeField\nfrom resources.models import Resource\nfrom utils.Trans... | [
{
"content": "\"\"\"Models for the topics application.\"\"\"\n\nfrom django.urls import reverse\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.postgres.fields import JSONField, IntegerRangeField\nfrom resources.models import Resource\nfrom utils.Trans... | diff --git a/csunplugged/topics/models.py b/csunplugged/topics/models.py
index fe23c9cdc..cc01dd571 100644
--- a/csunplugged/topics/models.py
+++ b/csunplugged/topics/models.py
@@ -284,6 +284,8 @@ def __str__(self):
class ProgrammingChallengeImplementation(TranslatableModel):
"""Model for programming challenge la... |
LibraryOfCongress__concordia-1202 | Restore update_task_status decorator to download asset task
I removed it when we needed to use the redownload images feature. It should be restored for troubleshooting regular imports. If we need to use the redownload feature again, we should create a data model for the redownload task so the update_task_status decorat... | [
{
"content": "\"\"\"\nSee the module-level docstring for implementation details\n\"\"\"\n\nimport os\nimport re\nfrom functools import wraps\nfrom logging import getLogger\nfrom tempfile import NamedTemporaryFile\nfrom urllib.parse import parse_qsl, urlencode, urljoin, urlparse, urlsplit, urlunsplit\n\nimport r... | [
{
"content": "\"\"\"\nSee the module-level docstring for implementation details\n\"\"\"\n\nimport os\nimport re\nfrom functools import wraps\nfrom logging import getLogger\nfrom tempfile import NamedTemporaryFile\nfrom urllib.parse import parse_qsl, urlencode, urljoin, urlparse, urlsplit, urlunsplit\n\nimport r... | diff --git a/concordia/templates/admin/redownload_images.html b/concordia/templates/admin/redownload_images.html
index a763a7e09..de3f12b39 100644
--- a/concordia/templates/admin/redownload_images.html
+++ b/concordia/templates/admin/redownload_images.html
@@ -64,12 +64,17 @@ <h2>Affected Assets</h2>
T... |
encode__starlette-1459 | Raising Exceptions in sub-applications routes
### Checklist
- [X] The bug is reproducible against the latest release or `master`.
- [X] There are no similar issues or pull requests to fix it yet.
### Describe the bug
Let's start with this PR: #1262
It's about preventing raise `anyio.ExceptionGroup` in view... | [
{
"content": "import typing\n\nimport anyio\n\nfrom starlette.requests import Request\nfrom starlette.responses import Response, StreamingResponse\nfrom starlette.types import ASGIApp, Receive, Scope, Send\n\nRequestResponseEndpoint = typing.Callable[[Request], typing.Awaitable[Response]]\nDispatchFunction = ty... | [
{
"content": "import typing\n\nimport anyio\n\nfrom starlette.requests import Request\nfrom starlette.responses import Response, StreamingResponse\nfrom starlette.types import ASGIApp, Receive, Scope, Send\n\nRequestResponseEndpoint = typing.Callable[[Request], typing.Awaitable[Response]]\nDispatchFunction = ty... | diff --git a/starlette/middleware/base.py b/starlette/middleware/base.py
index 423f40777..bfb4a54a4 100644
--- a/starlette/middleware/base.py
+++ b/starlette/middleware/base.py
@@ -52,6 +52,9 @@ async def body_stream() -> typing.AsyncGenerator[bytes, None]:
assert message["type"] == "http.respo... |
Pyomo__pyomo-1948 | Pyomo deferred import system causes nose to fail for any package that imports pyomo
## Summary
Importing pyomo causes several instances of `DeferredImportModule` to be put into `sys.modules`. If any of these modules are not available, then calling `hasattr` on them results in an exception. When running `nosetests` w... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin... | diff --git a/pyomo/common/dependencies.py b/pyomo/common/dependencies.py
index 8b65f321d2f..8cede6b51c6 100644
--- a/pyomo/common/dependencies.py
+++ b/pyomo/common/dependencies.py
@@ -109,6 +109,8 @@ class DeferredImportModule(object):
def __init__(self, indicator, deferred_submodules, submodule_name):
s... |
ARM-DOE__ACT-834 | GeographicPlotDisplay documentation missing description of return value
* ACT version: 2.1.1
* Python version: all
* Operating System: all
### Description
The GeographicPlotDisplay is missing a description of the returned matplotlib axes object. This proved to be a bit confusing on how to tell a student how to... | [
{
"content": "\"\"\"\nStores the class for GeographicPlotDisplay.\n\n\"\"\"\n\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\nfrom .plot import Display\n\ntry:\n import cartopy.crs as ccrs\n import cartopy.feature as cfeature\n from cartopy.io import im... | [
{
"content": "\"\"\"\nStores the class for GeographicPlotDisplay.\n\n\"\"\"\n\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\nfrom .plot import Display\n\ntry:\n import cartopy.crs as ccrs\n import cartopy.feature as cfeature\n from cartopy.io import im... | diff --git a/act/plotting/geodisplay.py b/act/plotting/geodisplay.py
index 451bbe1826..297689e2b4 100644
--- a/act/plotting/geodisplay.py
+++ b/act/plotting/geodisplay.py
@@ -121,6 +121,11 @@ def geoplot(
is made. See the matplotlib documentation for further details
on what keyword arguments a... |
biolab__orange3-text-80 | Preprocessor: Pressing Enter Turns ON/OFF Other Preprocessors' Modules
Clicking `Enter` with focus either inside the Regexp tokenizer's Pattern (lineEdit) or any where else in the widget causes strange behaviour of toggling either Transformation or Normalization widgets' ON/OFF buttons. I suspect the problem is in how ... | [
{
"content": "import os\n\nfrom PyQt4 import QtGui, QtCore\n\nfrom PyQt4.QtCore import (pyqtSignal as Signal, pyqtSlot as Slot)\nfrom PyQt4.QtGui import (QWidget, QLabel, QHBoxLayout, QVBoxLayout,\n QButtonGroup, QRadioButton, QSizePolicy, QFrame,\n QApplication, ... | [
{
"content": "import os\n\nfrom PyQt4 import QtGui, QtCore\n\nfrom PyQt4.QtCore import (pyqtSignal as Signal, pyqtSlot as Slot)\nfrom PyQt4.QtGui import (QWidget, QLabel, QHBoxLayout, QVBoxLayout,\n QButtonGroup, QRadioButton, QSizePolicy, QFrame,\n QApplication, ... | diff --git a/orangecontrib/text/widgets/owpreprocess.py b/orangecontrib/text/widgets/owpreprocess.py
index d64f5229f..e8edf7861 100644
--- a/orangecontrib/text/widgets/owpreprocess.py
+++ b/orangecontrib/text/widgets/owpreprocess.py
@@ -36,6 +36,7 @@ def __init__(self, enabled=True, on_button='on_button.png', off_butto... |
secdev__scapy-1873 | Dot11Beacon network_stats bugs with Python3
Getting network statistics from Dot11Beacon packets thanks to `network_stats` with Python3 raises an error.
#### Environment
- Scapy version: 2.4.2
- Python version: 3.7.2
- Operating system : Arch Linux
#### How to reproduce
Put your wireless card in monitor mo... | [
{
"content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Scapy is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 2 of the License, o... | [
{
"content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Scapy is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 2 of the License, o... | diff --git a/scapy/layers/dot11.py b/scapy/layers/dot11.py
index 60052a838b3..aadf97def88 100644
--- a/scapy/layers/dot11.py
+++ b/scapy/layers/dot11.py
@@ -427,7 +427,7 @@ def network_stats(self):
crypto.add("WPA2")
elif p.ID == 221:
if isinstance(p, Dot11EltMicrosoftWPA)... |
zigpy__zha-device-handlers-2320 | [BUG] Unhandled exception TypeError: ZCLCommandDef object is not subscriptable
**Describe the bug**
After upgrading Homeassistant Core to 2023.4.0 my TRADFRI open/close remote from IKEA stopped reacting to button press events. Battery level is still displayed.
Looking at the logs with `ha core logs` and searching ... | [
{
"content": "\"\"\"Device handler for IKEA of Sweden TRADFRI remote control.\"\"\"\nfrom typing import Any, List, Optional, Union\n\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl import foundation\nfrom zigpy.zcl.clusters.closures ... | [
{
"content": "\"\"\"Device handler for IKEA of Sweden TRADFRI remote control.\"\"\"\nfrom typing import Any, List, Optional, Union\n\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl import foundation\nfrom zigpy.zcl.clusters.closures ... | diff --git a/zhaquirks/ikea/opencloseremote.py b/zhaquirks/ikea/opencloseremote.py
index ba2da52123..a21f38d41f 100644
--- a/zhaquirks/ikea/opencloseremote.py
+++ b/zhaquirks/ikea/opencloseremote.py
@@ -65,7 +65,7 @@ def handle_cluster_request(
We just want to keep track of direction, to associate it with the ... |
python-discord__bot-492 | Unhandled Docs exception
There is some missing exception handling in the parsing logic of the `!docs get` command.
Here is one example, exact cause is still TBD:

| [
{
"content": "import asyncio\nimport functools\nimport logging\nimport re\nimport textwrap\nfrom collections import OrderedDict\nfrom typing import Any, Callable, Optional, Tuple\n\nimport discord\nfrom bs4 import BeautifulSoup\nfrom bs4.element import PageElement\nfrom discord.ext import commands\nfrom markdow... | [
{
"content": "import asyncio\nimport functools\nimport logging\nimport re\nimport textwrap\nfrom collections import OrderedDict\nfrom typing import Any, Callable, Optional, Tuple\n\nimport discord\nfrom bs4 import BeautifulSoup\nfrom bs4.element import PageElement\nfrom discord.ext import commands\nfrom markdow... | diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py
index c9e6b3b911..0c5a8fce33 100644
--- a/bot/cogs/doc.py
+++ b/bot/cogs/doc.py
@@ -207,6 +207,9 @@ async def get_symbol_html(self, symbol: str) -> Optional[Tuple[str, str]]:
symbol_heading = soup.find(id=symbol_id)
signature_buffer = []
+ if sym... |
kivy__kivy-3945 | Crash in multistroke demo on Python 3
When starting to draw a gesture in the multistroke demo, the following traceback occurs. Happened on Ubuntu 15.10 using Python 3.4.3+, both with the stable Kivy 1.9.0 and with the dev version on https://github.com/kivy/kivy/commit/9d07f45f310bf703088dd6e9c3aa832bacae0085.
[INFO ... | [
{
"content": "'''\nGesture Surface\n===============\n\n.. versionadded::\n 1.9.0\n\n.. warning::\n\n This is experimental and subject to change as long as this warning notice\n is present.\n\nSee :file:`kivy/examples/demo/multistroke/main.py` for a complete application\nexample.\n'''\n__all__ = ('Gestu... | [
{
"content": "'''\nGesture Surface\n===============\n\n.. versionadded::\n 1.9.0\n\n.. warning::\n\n This is experimental and subject to change as long as this warning notice\n is present.\n\nSee :file:`kivy/examples/demo/multistroke/main.py` for a complete application\nexample.\n'''\n__all__ = ('Gestu... | diff --git a/kivy/uix/gesturesurface.py b/kivy/uix/gesturesurface.py
index 77cb844e71..8cbe17082b 100644
--- a/kivy/uix/gesturesurface.py
+++ b/kivy/uix/gesturesurface.py
@@ -414,8 +414,7 @@ def init_gesture(self, touch):
if self.use_random_color is True:
col = hsv_to_rgb(random(), 1., 1.)
- ... |
pallets__click-2064 | mypy raises errors when using `click.prompt()` due to `type` argument having incompatible type
I have a project that uses the latest version of mypy (0.910) and click (8.0.1). I am attempting to use `click.prompt()` and pass in the `type` argument but this is always causing mypy (with default settings) to find errors.
... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport sys\nimport typing\nimport typing as t\nfrom gettext import gettext as _\n\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions import UsageError\nfrom... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport sys\nimport typing\nimport typing as t\nfrom gettext import gettext as _\n\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions import UsageError\nfrom... | diff --git a/CHANGES.rst b/CHANGES.rst
index 38ec5349d..77783c786 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -16,6 +16,8 @@ Unreleased
to be relative to the containing directory. :issue:`1921`
- Completion does not skip Python's resource cleanup when exiting,
avoiding some unexpected warning output. :is... |
apache__airflow-19668 | AzureContainerInstancesOperator is not working due to argument error
### Apache Airflow Provider(s)
microsoft-azure
### Versions of Apache Airflow Providers
3.1.0
### Apache Airflow version
2.1.3 (latest released)
### Operating System
Ubuntu
### Deployment
Docker-Compose
### Deployment details
_No response_
... | [
{
"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/providers/microsoft/azure/operators/container_instances.py b/airflow/providers/microsoft/azure/operators/container_instances.py
index da297c0a65462..2b317d81d7d71 100644
--- a/airflow/providers/microsoft/azure/operators/container_instances.py
+++ b/airflow/providers/microsoft/azure/operators/contai... |
pytorch__vision-5289 | Strange behavior in detection reference code
### 🐛 Describe the bug
Hi,
I am using your training procedure for object detection `https://github.com/pytorch/vision/blob/main/references/detection/train.py` with a custom dataset. When I evaluate my model, the output seems correct for the very first epoch but for the ... | [
{
"content": "import copy\nimport os\n\nimport torch\nimport torch.utils.data\nimport torchvision\nimport transforms as T\nfrom pycocotools import mask as coco_mask\nfrom pycocotools.coco import COCO\n\n\nclass FilterAndRemapCocoCategories:\n def __init__(self, categories, remap=True):\n self.categori... | [
{
"content": "import copy\nimport os\n\nimport torch\nimport torch.utils.data\nimport torchvision\nimport transforms as T\nfrom pycocotools import mask as coco_mask\nfrom pycocotools.coco import COCO\n\n\nclass FilterAndRemapCocoCategories:\n def __init__(self, categories, remap=True):\n self.categori... | diff --git a/references/detection/coco_utils.py b/references/detection/coco_utils.py
index a6566028659..b0f193135ee 100644
--- a/references/detection/coco_utils.py
+++ b/references/detection/coco_utils.py
@@ -156,7 +156,7 @@ def convert_to_coco_api(ds):
img_dict["height"] = img.shape[-2]
img_dict["wid... |
conan-io__conan-center-index-2011 | [bug] Some system packages fail to install (xorg/system, opengl/system)
<!--
Please don't forget to update the issue title.
Include all applicable information to help us reproduce your problem.
To help us debug your issue please explain:
--> When configuring a cmake project template that used conan i encoun... | [
{
"content": "from conans import ConanFile, tools\nfrom conans.errors import ConanException\nimport os\n\n\nclass SysConfigOpenGLConan(ConanFile):\n name = \"opengl\"\n version = \"system\"\n description = \"cross-platform virtual conan package for the OpenGL support\"\n topics = (\"conan\", \"openg... | [
{
"content": "from conans import ConanFile, tools\nfrom conans.errors import ConanException\nimport os\n\n\nclass SysConfigOpenGLConan(ConanFile):\n name = \"opengl\"\n version = \"system\"\n description = \"cross-platform virtual conan package for the OpenGL support\"\n topics = (\"conan\", \"openg... | diff --git a/recipes/opengl/all/conanfile.py b/recipes/opengl/all/conanfile.py
index 7e1950f0d1276..7ef94b1000c50 100644
--- a/recipes/opengl/all/conanfile.py
+++ b/recipes/opengl/all/conanfile.py
@@ -56,7 +56,7 @@ def system_requirements(self):
elif tools.os_info.with_zypper:
packages = [... |
Parsl__parsl-936 | Extreme Scale mpi workers do not register capacity fields
mpi_worker_pool.py does not register with the appropriate fields to get tasks issued, so registrations default to having 0 capacity and no tasks are issued to extreme scale workers.
Compare `create_reg_message` in `mpi_worker_pool.py` and in htex's `process_w... | [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport logging\nimport os\nimport sys\nimport platform\n# import random\nimport threading\nimport pickle\nimport time\nimport queue\nimport uuid\nimport zmq\nimport json\n\nfrom mpi4py import MPI\n\nfrom parsl.version import VERSION as PARSL_VERSION\nfrom... | [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport logging\nimport os\nimport sys\nimport platform\n# import random\nimport threading\nimport pickle\nimport time\nimport queue\nimport uuid\nimport zmq\nimport json\n\nfrom mpi4py import MPI\n\nfrom parsl.version import VERSION as PARSL_VERSION\nfrom... | diff --git a/.travis.yml b/.travis.yml
index b0947ca5de..2c85c7c24c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,8 +29,7 @@ before_install:
# command to install dependencies
install:
- pip install -r requirements.txt
- - pip install flake8
- - python setup.py install
+ - pip install .[extreme_scale... |
cloud-custodian__cloud-custodian-5600 | botocore.exceptions.ClientError: An error occurred (ThrottlingException) when calling the DescribeLogStreams operation (reached max retries: 4): Rate exceeded
**Describe the bug**
botocore.exceptions.ClientError: An error occurred (ThrottlingException) when calling the DescribeLogStreams operation (reached max retries... | [
{
"content": "# Copyright 2016-2017 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 requi... | [
{
"content": "# Copyright 2016-2017 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 requi... | diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py
index e9a8acd3586..4eec4016505 100644
--- a/c7n/resources/cw.py
+++ b/c7n/resources/cw.py
@@ -258,7 +258,8 @@ def process(self, resources, event=None):
return [r for r in resources if self.check_group(client, r)]
def check_group(self, client, group)... |
ansible__molecule-2160 | Molecule crash when defining environment variable for Ansible containes not string
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Please also check https://molecule.readthedocs.io/en/latest/faq.html --->
<!--- Please use https://groups.google.com/forum/#!forum/molecule-users for usage ... | [
{
"content": "# 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 without restriction, including without limitation the\n# rights... | [
{
"content": "# 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 without restriction, including without limitation the\n# rights... | diff --git a/molecule/provisioner/ansible.py b/molecule/provisioner/ansible.py
index 32584b1f77..24815e1420 100644
--- a/molecule/provisioner/ansible.py
+++ b/molecule/provisioner/ansible.py
@@ -492,6 +492,8 @@ def options(self):
def env(self):
default_env = self.default_env
env = self._config.co... |
pre-commit__pre-commit-949 | cspell hook install fails due pre-commit assumptions regarding npm packages
I am raising this bug here as cspell is still unusable as a pre-commit hook even after the author made additional changes and I am afraid that the root cause is no longer inside cspell package.
Mainly cspell is a typescript project that is p... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport os\nimport sys\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.languages.python import bin_dir\nf... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport os\nimport sys\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.languages.python import bin_dir\nf... | diff --git a/pre_commit/languages/node.py b/pre_commit/languages/node.py
index b313bf5b5..e7962cce1 100644
--- a/pre_commit/languages/node.py
+++ b/pre_commit/languages/node.py
@@ -62,10 +62,11 @@ def install_environment(prefix, version, additional_dependencies):
cmd.extend(['-n', version])
cmd_ou... |
PrefectHQ__prefect-348 | DotDict isn't JSON-serializable
`DotDicts` *feel* like dicts, until you try to ship them as JSON:
```python
In [1]: import json
In [2]: from prefect.utilities.collections import DotDict
In [3]: json.dumps(DotDict(x=1, y=2))
```
Results in the following error:
```
----------------------------------------... | [
{
"content": "# Licensed under LICENSE.md; also available at https://www.prefect.io/licenses/alpha-eula\nimport collections\nimport json\nfrom collections.abc import MutableMapping\nfrom typing import Any, Generator, Iterable, Iterator, Union\n\nDictLike = Union[dict, \"DotDict\"]\n\n\ndef flatten_seq(seq: Iter... | [
{
"content": "# Licensed under LICENSE.md; also available at https://www.prefect.io/licenses/alpha-eula\nimport collections\nimport json\nfrom collections.abc import MutableMapping\nfrom typing import Any, Generator, Iterable, Iterator, Union\n\nDictLike = Union[dict, \"DotDict\"]\n\n\ndef flatten_seq(seq: Iter... | diff --git a/src/prefect/utilities/collections.py b/src/prefect/utilities/collections.py
index fdd566c6b89c..17b805869208 100644
--- a/src/prefect/utilities/collections.py
+++ b/src/prefect/utilities/collections.py
@@ -92,8 +92,9 @@ def copy(self) -> "DotDict":
"""Creates and returns a shallow copy of the curr... |
holoviz__panel-449 | Problem with introduction.ipynb

```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-7-2... | [
{
"content": "\"\"\"\nDefines the Param pane which converts Parameterized classes into a\nset of widgets.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport os\nimport sys\nimport json\nimport types\nimport inspect\nimport itertools\n\nfrom collections import OrderedDict, name... | [
{
"content": "\"\"\"\nDefines the Param pane which converts Parameterized classes into a\nset of widgets.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport os\nimport sys\nimport json\nimport types\nimport inspect\nimport itertools\n\nfrom collections import OrderedDict, name... | diff --git a/panel/param.py b/panel/param.py
index 9480e80c43..fb92e07916 100644
--- a/panel/param.py
+++ b/panel/param.py
@@ -640,7 +640,7 @@ class ParamFunction(ParamMethod):
def _link_object_params(self):
deps = self.object._dinfo
- dep_params = list(deps['dependencies']) + list(deps['kw'].val... |
pytorch__vision-8227 | `CocoDetection` accepts `slice` as argument to its `__getitem__` and returns wrong result
Hi, although `CocoDetection` declares its `__getitem__` argument to be of type `int`, it actually accepts `slice` as well. However it returns a wrong result. As this might be confusing for some users, I suggest to add a type c... | [
{
"content": "import os.path\nfrom typing import Any, Callable, List, Optional, Tuple\n\nfrom PIL import Image\n\nfrom .vision import VisionDataset\n\n\nclass CocoDetection(VisionDataset):\n \"\"\"`MS Coco Detection <https://cocodataset.org/#detection-2016>`_ Dataset.\n\n It requires the `COCO API to be i... | [
{
"content": "import os.path\nfrom typing import Any, Callable, List, Optional, Tuple\n\nfrom PIL import Image\n\nfrom .vision import VisionDataset\n\n\nclass CocoDetection(VisionDataset):\n \"\"\"`MS Coco Detection <https://cocodataset.org/#detection-2016>`_ Dataset.\n\n It requires the `COCO API to be i... | diff --git a/test/test_datasets.py b/test/test_datasets.py
index 26064a11c71..aa100aa55c1 100644
--- a/test/test_datasets.py
+++ b/test/test_datasets.py
@@ -827,6 +827,11 @@ def test_transforms_v2_wrapper_spawn(self):
with self.create_dataset(transform=v2.Resize(size=expected_size)) as (dataset, _):
... |
microsoft__ptvsd-1438 | sys.stdin.read never returns when terminal set to raw mode
## Environment data
- PTVSD version: 4.2.9
- OS and version: Kubuntu Linux kernel 5.0
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
- Using VS Code or Visual Studio: VS Code
## Actual behavior
sys.stdin.read never returns, e... | [
{
"content": "import os\nimport sys\nimport traceback\nfrom _pydev_bundle.pydev_imports import xmlrpclib, _queue, Exec\nfrom _pydev_bundle._pydev_calltip_util import get_description\nfrom _pydev_imps._pydev_saved_modules import thread\nfrom _pydevd_bundle import pydevd_vars\nfrom _pydevd_bundle import pydevd_x... | [
{
"content": "import os\nimport sys\nimport traceback\nfrom _pydev_bundle.pydev_imports import xmlrpclib, _queue, Exec\nfrom _pydev_bundle._pydev_calltip_util import get_description\nfrom _pydev_imps._pydev_saved_modules import thread\nfrom _pydevd_bundle import pydevd_vars\nfrom _pydevd_bundle import pydevd_x... | diff --git a/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py b/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py
index b947e74ca..be58aba2a 100644
--- a/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py
+++ b/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py
@@ ... |
facebookresearch__ParlAI-2281 | projects/convai2/interactive.py not using new message force_set feature
**Bug description**
The code hasn't been updated for the force_set.
**Reproduction steps**
python projects/convai2/interactive.py -mf models:convai2/seq2seq/convai2_self_seq2seq_model -m legacy:seq2seq:0 --no_cuda
**Expected behavior**
to ... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nBasic script which allows local human keyboard input to talk to a trained model.\n\nEx... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nBasic script which allows local human keyboard input to talk to a trained model.\n\nEx... | diff --git a/projects/convai2/interactive.py b/projects/convai2/interactive.py
index 61ead742397..ff9ceda9438 100644
--- a/projects/convai2/interactive.py
+++ b/projects/convai2/interactive.py
@@ -102,7 +102,7 @@ def get_new_personas():
acts[0] = agents[0].act()
# add the persona on to the first messa... |
nilearn__nilearn-2916 | syntax error in glm
<!--Provide a brief description of the bug.-->
#2532 introduced a syntax error that is breaking the MNE-Python CIs. Specifically:
https://github.com/nilearn/nilearn/blob/f9deafe828dc21d5d4dd54b772da820ee1f4cac5/nilearn/glm/first_level/first_level.py#L147
leads to this in our documentation ... | [
{
"content": "\"\"\"\nThis module presents an interface to use the glm implemented in\nnistats.regression.\n\nIt contains the GLM and contrast classes that are meant to be the main objects\nof fMRI data analyses.\n\nAuthor: Bertrand Thirion, Martin Perez-Guevara, 2016\n\n\"\"\"\nimport glob\nimport json\nimport... | [
{
"content": "\"\"\"\nThis module presents an interface to use the glm implemented in\nnistats.regression.\n\nIt contains the GLM and contrast classes that are meant to be the main objects\nof fMRI data analyses.\n\nAuthor: Bertrand Thirion, Martin Perez-Guevara, 2016\n\n\"\"\"\nimport glob\nimport json\nimport... | diff --git a/nilearn/glm/first_level/first_level.py b/nilearn/glm/first_level/first_level.py
index ec89f1dbab..19ec1f73fa 100644
--- a/nilearn/glm/first_level/first_level.py
+++ b/nilearn/glm/first_level/first_level.py
@@ -144,7 +144,7 @@ def run_glm(Y, X, noise_model='ar1', bins=100, n_jobs=1, verbose=0):
"""
... |
mkdocs__mkdocs-2464 | GET /%E8%AE%A1%E7%AE%97/HTTP/1.1" code 404 does not support Chinese name md documents
Questions are as follows:
I have encountered a problem when using Chinese to set the navigation, click on the navigation bar to prompt the page to display: 404-Not found
The CLI error is as follows: "GET /%E8%AE%A1%E7%AE%97/ HTTP... | [
{
"content": "import functools\nimport io\nimport logging\nimport mimetypes\nimport os\nimport os.path\nimport pathlib\nimport re\nimport socketserver\nimport threading\nimport time\nimport warnings\nimport wsgiref.simple_server\n\nimport watchdog.events\nimport watchdog.observers\n\n\nclass _LoggerAdapter(logg... | [
{
"content": "import functools\nimport io\nimport logging\nimport mimetypes\nimport os\nimport os.path\nimport pathlib\nimport re\nimport socketserver\nimport threading\nimport time\nimport warnings\nimport wsgiref.simple_server\n\nimport watchdog.events\nimport watchdog.observers\n\n\nclass _LoggerAdapter(logg... | diff --git a/mkdocs/livereload/__init__.py b/mkdocs/livereload/__init__.py
index 5ac36e7343..02e83c7385 100644
--- a/mkdocs/livereload/__init__.py
+++ b/mkdocs/livereload/__init__.py
@@ -200,7 +200,9 @@ def serve_request(self, environ, start_response):
return [error_content]
def _serve_request(self, env... |
pyodide__pyodide-4705 | cmake -E capabilities is broken
## 🐛 Bug
The most recent version of scikit-build-core switched to using `cmake -E capabilities` instead of `cmake --version`, as that's the recommended way to get information about CMake. https://github.com/scikit-build/scikit-build-core/pull/675 However, https://github.com/pyodide/p... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"Helper for cross-compiling Python binary extensions.\n\nPython has never had a proper cross-compilation story. This is a hack, which\nmiraculously works, to get around that.\nThe gist is we compile the package replacing calls to the compiler and linker\nwith wrappers ... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"Helper for cross-compiling Python binary extensions.\n\nPython has never had a proper cross-compilation story. This is a hack, which\nmiraculously works, to get around that.\nThe gist is we compile the package replacing calls to the compiler and linker\nwith wrappers ... | diff --git a/docs/project/changelog.md b/docs/project/changelog.md
index 43f5508bcf4..4e8dfbee0b3 100644
--- a/docs/project/changelog.md
+++ b/docs/project/changelog.md
@@ -16,6 +16,8 @@ myst:
## Unreleased
+- {{ Fix }} Pass through `-E` (command mode) arguments in CMake wrapper {pr}`4705`.
+
- {{ Fix }} Fix exce... |
hi-primus__optimus-782 | Fix simple typo: ouput -> output
# Issue Type
[x] Bug (Typo)
# Steps to Replicate
1. Examine optimus/ml/encoding.py.
2. Search for ouput.
# Expected Behaviour
1. Should read output.
| [
{
"content": "from pyspark.ml import feature, Pipeline\nfrom pyspark.ml.feature import StringIndexer, IndexToString, OneHotEncoder, VectorAssembler, Normalizer\n\nfrom optimus.helpers.check import is_dataframe, is_, is_str\nfrom optimus.helpers.columns import parse_columns, name_col, get_output_cols\nfrom optim... | [
{
"content": "from pyspark.ml import feature, Pipeline\nfrom pyspark.ml.feature import StringIndexer, IndexToString, OneHotEncoder, VectorAssembler, Normalizer\n\nfrom optimus.helpers.check import is_dataframe, is_, is_str\nfrom optimus.helpers.columns import parse_columns, name_col, get_output_cols\nfrom optim... | diff --git a/optimus/ml/encoding.py b/optimus/ml/encoding.py
index 92b4249bf..a90e7a70d 100644
--- a/optimus/ml/encoding.py
+++ b/optimus/ml/encoding.py
@@ -35,7 +35,7 @@ def string_to_index(df, input_cols, output_cols=None, columns=None, **kargs):
numeric, we cast it to string and index the string values.
:p... |
mlcommons__GaNDLF-66 | U-Net style archs need a minimum patch size
**Is your feature request related to a problem? Please describe.**
Currently, if the patch size of U-Net variants is `16`, the final output is `[...,1]`, which does not make sense.
**Describe the solution you'd like**
Add a minimum patch size requirement, based on the nu... | [
{
"content": "import os, sys, math\nfrom datetime import datetime\nos.environ['TORCHIO_HIDE_CITATION_PROMPT'] = '1' # hides torchio citation request, see https://github.com/fepegar/torchio/issues/235\nimport numpy as np\nimport pandas as pd\nimport SimpleITK as sitk\nimport torch\nimport torch.nn as nn\nimport ... | [
{
"content": "import os, sys, math\nfrom datetime import datetime\nos.environ['TORCHIO_HIDE_CITATION_PROMPT'] = '1' # hides torchio citation request, see https://github.com/fepegar/torchio/issues/235\nimport numpy as np\nimport pandas as pd\nimport SimpleITK as sitk\nimport torch\nimport torch.nn as nn\nimport ... | diff --git a/GANDLF/utils.py b/GANDLF/utils.py
index 911616600..353ce78be 100644
--- a/GANDLF/utils.py
+++ b/GANDLF/utils.py
@@ -143,6 +143,12 @@ def checkPatchDivisibility(patch_size, number = 16):
patch_size_to_check = patch_size_to_check[1:]
if np.count_nonzero(np.remainder(patch_size_to_check, number)... |
dask__distributed-283 | Random serialization bug in scheduler's handle_messages
When working with a large number of dask.delay'd tasks (>= 5e3) and a large number of workers (3 procs x 32 cores or 5 procs x 32 cores) I sometimes (but quite rarely) get the following low level error:
```
Traceback (most recent call last):
File "/work/minico... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom datetime import timedelta\nimport logging\nimport six\nimport struct\nfrom time import time\nimport traceback\nimport uuid\n\nfrom toolz import assoc, first\n\ntry:\n import cPickle as pickle\nexcept ImportError:\n impo... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom datetime import timedelta\nimport logging\nimport six\nimport struct\nfrom time import time\nimport traceback\nimport uuid\n\nfrom toolz import assoc, first\n\ntry:\n import cPickle as pickle\nexcept ImportError:\n impo... | diff --git a/distributed/core.py b/distributed/core.py
index a600bb578c3..584d3a31b72 100644
--- a/distributed/core.py
+++ b/distributed/core.py
@@ -270,10 +270,12 @@ def write(stream, msg):
lengths = ([struct.pack('Q', len(frames))] +
[struct.pack('Q', len(frame)) for frame in frames])
-... |
rasterio__rasterio-1735 | Proposal: Add option in CRS.from_user_input to check if it has the to_wkt method
https://github.com/mapbox/rasterio/blob/b9f34ee559039239c7c0c97bd911b466701a39cd/rasterio/crs.py#L427-L456
It would be nice for interoperability between the rasterio, fiona, and pyproj CRS classes. Thoughts?
| [
{
"content": "\"\"\"Coordinate Reference Systems\n\nNotes\n-----\n\nIn Rasterio versions <= 1.0.13, coordinate reference system support was limited\nto the CRS that can be described by PROJ parameters. This limitation is gone in\nversions >= 1.0.14. Any CRS that can be defined using WKT (version 1) may be\nused... | [
{
"content": "\"\"\"Coordinate Reference Systems\n\nNotes\n-----\n\nIn Rasterio versions <= 1.0.13, coordinate reference system support was limited\nto the CRS that can be described by PROJ parameters. This limitation is gone in\nversions >= 1.0.14. Any CRS that can be defined using WKT (version 1) may be\nused... | diff --git a/CHANGES.txt b/CHANGES.txt
index add6c4146..d96f36bb9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Changes
- When a MemoryFile is opened in write mode, a TypeError will be raised if
integer width and height are not given, fixing #1748.
+- Support CRS.from_user_input with other CRS object... |
wright-group__WrightTools-559 | level only works for zeroth channel
[L663](https://github.com/wright-group/WrightTools/blob/development/WrightTools/data/_data.py#L663) is the culprit, I think.
`channel = self.channels[0]`
should instead be
`channel = self.channels[channel_index]`
| [
{
"content": "\"\"\"Central data class and associated.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport collections\nimport operator\nimport functools\nimport warnings\n\nimport numpy as np\n\nimport h5py\n\nimport scipy\nfrom scipy.inter... | [
{
"content": "\"\"\"Central data class and associated.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport collections\nimport operator\nimport functools\nimport warnings\n\nimport numpy as np\n\nimport h5py\n\nimport scipy\nfrom scipy.inter... | diff --git a/WrightTools/data/_data.py b/WrightTools/data/_data.py
index b89475510..27bcb95ba 100644
--- a/WrightTools/data/_data.py
+++ b/WrightTools/data/_data.py
@@ -660,7 +660,7 @@ def level(self, channel, axis, npts, *, verbose=True):
"""
warnings.warn('level', category=wt_exceptions.EntireDatase... |
zestedesavoir__zds-site-6363 | Notification persistante dans un cas complexe
**Description du bug**
Dans un cas très particulier, on peut avoir encore une notification persistante lié aux abonnements des forums privés. Cela ne se produit pas quand on ajoute ou retire un utilisateur d'un groupe ayant accès à un forum privé (ce soucis là a été corr... | [
{
"content": "import inspect\nimport logging\n\ntry:\n from functools import wraps\nexcept ImportError:\n from django.utils.functional import wraps\n\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import DatabaseError\nfrom django.d... | [
{
"content": "import inspect\nimport logging\n\ntry:\n from functools import wraps\nexcept ImportError:\n from django.utils.functional import wraps\n\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import DatabaseError\nfrom django.d... | diff --git a/zds/notification/receivers.py b/zds/notification/receivers.py
index 53d66c2959..4cfec65105 100644
--- a/zds/notification/receivers.py
+++ b/zds/notification/receivers.py
@@ -329,7 +329,7 @@ def new_topic_event(sender, *, instance, created=True, **__):
subscriptions = NewTopicSubscription.objects... |
PaddlePaddle__PaddleDetection-5911 | PicoFeat use_se 时 assert share_cls_reg == True
https://github.com/PaddlePaddle/PaddleDetection/blob/acaf10684d8e071e48098c660355d54981d93b7c/ppdet/modeling/heads/pico_head.py#L93
```
assert share_cls_reg == True, \
'In the case of using se, share_cls_reg is not supported'
```
后面的描述和 assert 不符合吧... | [
{
"content": "# Copyright (c) 2021 PaddlePaddle 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.... | [
{
"content": "# Copyright (c) 2021 PaddlePaddle 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.... | diff --git a/ppdet/modeling/heads/pico_head.py b/ppdet/modeling/heads/pico_head.py
index ecb4b976403..44f3a214cc8 100644
--- a/ppdet/modeling/heads/pico_head.py
+++ b/ppdet/modeling/heads/pico_head.py
@@ -91,7 +91,7 @@ def __init__(self,
self.reg_convs = []
if use_se:
assert share_cls_reg... |
openshift__openshift-ansible-8976 | installation of Logging fails on "Gather OpenShift Logging Facts"
#### Description
On a developer setup, using Fedora 25 as the OS and executing `cd ${GOPATH}/src/github.com/openshift/origin/_output/local/bin/linux/amd64 && sudo ./openshift start` for an OpenShift cluster, the Ansible Playbook for Logging fails duri... | [
{
"content": "'''\n---\nmodule: openshift_logging_facts\nversion_added: \"\"\nshort_description: Gather facts about the OpenShift logging stack\ndescription:\n - Determine the current facts about the OpenShift logging stack (e.g. cluster size)\noptions:\nauthor: Red Hat, Inc\n'''\n\nimport copy\nimport json\n\... | [
{
"content": "'''\n---\nmodule: openshift_logging_facts\nversion_added: \"\"\nshort_description: Gather facts about the OpenShift logging stack\ndescription:\n - Determine the current facts about the OpenShift logging stack (e.g. cluster size)\noptions:\nauthor: Red Hat, Inc\n'''\n\nimport copy\nimport json\n\... | diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py
index b535c800cb2..b3c434602b4 100644
--- a/roles/openshift_logging/library/openshift_logging_facts.py
+++ b/roles/openshift_logging/library/openshift_logging_facts.py
@@ -76,6 +76,7 @@ d... |
ansible__ansible-modules-core-1249 | synchronize adds extra to the --rsh argument and causes failure
failed: [MY_HOST -> 127.0.0.1] => {"cmd": "rsync --delay-updates -F --compress --delete-after --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no None' --exclude=logs --out-format='<<CHANGED>>%i %n%L' \"/src/file\" \"root@MY_HOST:/root/\"", "failed":... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012-2013, Timothy Appnel <tim@appnel.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the Lice... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012-2013, Timothy Appnel <tim@appnel.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the Lice... | diff --git a/files/synchronize.py b/files/synchronize.py
index f2dbf1b4961..2fb93e4cad3 100644
--- a/files/synchronize.py
+++ b/files/synchronize.py
@@ -316,7 +316,11 @@ def main():
else:
private_key = '-i '+ private_key
- ssh_opts = '-S none -o StrictHostKeyChecking=no %s' % ssh_args
+ if ssh_ar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.