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 ⌀ |
|---|---|---|---|---|
koxudaxi__datamodel-code-generator-1028 | Not `None` default values for arg_parse override settings in `pyproject.toml`
**Describe the bug**
`collapse-root-models = true` is ignored, when set via `pyproject.toml`
**To Reproduce**
Example schema:
[`error.schema`](https://raw.githubusercontent.com/folio-org/raml/69f6074f5f48fd58e379e9ae76c892aa68c115ea/... | [
{
"content": "#! /usr/bin/env python\n\n\"\"\"\nMain function.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport locale\nimport signal\nimport sys\nfrom argparse import ArgumentParser, FileType, Namespace\nfrom collections import defaultdict\nfrom enum import IntEnum\nfrom io import TextIOBas... | [
{
"content": "#! /usr/bin/env python\n\n\"\"\"\nMain function.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport locale\nimport signal\nimport sys\nfrom argparse import ArgumentParser, FileType, Namespace\nfrom collections import defaultdict\nfrom enum import IntEnum\nfrom io import TextIOBas... | diff --git a/datamodel_code_generator/__main__.py b/datamodel_code_generator/__main__.py
index c2b7569e2..df4d54e13 100644
--- a/datamodel_code_generator/__main__.py
+++ b/datamodel_code_generator/__main__.py
@@ -269,7 +269,7 @@ def sig_int_handler(_: int, __: Any) -> None: # pragma: no cover
arg_parser.add_argument(... |
pytorch__ignite-2547 | WeightsHistHandler should plot all weights (incl those without grad)
## 🚀 Feature
Currently, `WeightsHistHandler` do not log weights without grad:
https://github.com/pytorch/ignite/blob/a168476762061f74af64793bce1b2d5b6e9b3f15/ignite/contrib/handlers/tensorboard_logger.py#L434-L435
Let's put an option to enable... | [
{
"content": "\"\"\"TensorBoard logger and its helper handlers.\"\"\"\nfrom typing import Any, Callable, List, Optional, Union\n\nimport torch\nimport torch.nn as nn\nfrom torch.optim import Optimizer\n\nfrom ignite.contrib.handlers.base_logger import (\n BaseLogger,\n BaseOptimizerParamsHandler,\n Bas... | [
{
"content": "\"\"\"TensorBoard logger and its helper handlers.\"\"\"\nfrom typing import Any, Callable, List, Optional, Union\n\nimport torch\nimport torch.nn as nn\nfrom torch.optim import Optimizer\n\nfrom ignite.contrib.handlers.base_logger import (\n BaseLogger,\n BaseOptimizerParamsHandler,\n Bas... | diff --git a/ignite/contrib/handlers/tensorboard_logger.py b/ignite/contrib/handlers/tensorboard_logger.py
index 60d2c6295b16..93ada265499d 100644
--- a/ignite/contrib/handlers/tensorboard_logger.py
+++ b/ignite/contrib/handlers/tensorboard_logger.py
@@ -459,6 +459,9 @@ class WeightsHistHandler(BaseWeightsHistHandler):... |
deepset-ai__haystack-3070 | Crawler node doesn't close Webdriver connection
**Describe the bug**
Crawler is not closing the Webdriver. Result after N different instances, are N chrome zombie processes.
**Error message**
`ps -aux` check zombie processes
**Expected behavior**
Crawler should correctly close Webdriver and clean unused resour... | [
{
"content": "from typing import Callable, List, Optional, Dict, Tuple, Union, Any\n\nimport re\nimport sys\nimport json\nimport time\nimport logging\nfrom pathlib import Path\nfrom urllib.parse import urlparse\nimport hashlib\n\ntry:\n from webdriver_manager.chrome import ChromeDriverManager\n from selen... | [
{
"content": "from typing import Callable, List, Optional, Dict, Tuple, Union, Any\n\nimport re\nimport sys\nimport json\nimport time\nimport logging\nfrom pathlib import Path\nfrom urllib.parse import urlparse\nimport hashlib\n\ntry:\n from webdriver_manager.chrome import ChromeDriverManager\n from selen... | diff --git a/haystack/nodes/connector/crawler.py b/haystack/nodes/connector/crawler.py
index f89fad0beb..d45bd700f8 100644
--- a/haystack/nodes/connector/crawler.py
+++ b/haystack/nodes/connector/crawler.py
@@ -117,6 +117,9 @@ def __init__(
self.loading_wait_time = loading_wait_time
self.crawler_namin... |
cupy__cupy-2588 | Stream in the context-manager form is not used in `ElementwiseKernel` or `ReductionKernel`
This is actually a bug reported back in #1695 that unfortunately went unnoticed.
In `examples/stream/map_reduce.py`, a list of streams was created for executing `cupy.matmul()` in parallel, which is backed by a `ReductionKern... | [
{
"content": "import cupy\nimport time\n\ndevice = cupy.cuda.Device()\nmemory_pool = cupy.cuda.MemoryPool()\ncupy.cuda.set_allocator(memory_pool.malloc)\nrand = cupy.random.generator.RandomState(seed=1)\n\nn = 10\nzs = []\nmap_streams = []\nstop_events = []\nreduce_stream = cupy.cuda.stream.Stream()\nfor i in r... | [
{
"content": "import cupy\nimport time\n\ndevice = cupy.cuda.Device()\nmemory_pool = cupy.cuda.MemoryPool()\ncupy.cuda.set_allocator(memory_pool.malloc)\nrand = cupy.random.generator.RandomState(seed=1)\n\nn = 10\nzs = []\nmap_streams = []\nstop_events = []\nreduce_stream = cupy.cuda.stream.Stream()\nfor i in r... | diff --git a/examples/stream/map_reduce.py b/examples/stream/map_reduce.py
index 365b67cd052..2556e288aca 100644
--- a/examples/stream/map_reduce.py
+++ b/examples/stream/map_reduce.py
@@ -19,8 +19,8 @@
# Map
for stream in map_streams:
with stream:
- x = rand.normal(size=(1, 1024 * 256))
- y = rand... |
beetbox__beets-2196 | beetsplug/fromfilename.py python3 compatability
https://github.com/beetbox/beets/blob/e8afcbe7ec4bc37bb080f6f466b98807d020753b/beetsplug/fromfilename.py#L104
python2
``` python2
d.values()
```
for python 3 this should be
``` python3
list(d.values())
```
| [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Jan-Erik Dahlin\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Jan-Erik Dahlin\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | diff --git a/beetsplug/fromfilename.py b/beetsplug/fromfilename.py
index 648df62580..5e1b822c2b 100644
--- a/beetsplug/fromfilename.py
+++ b/beetsplug/fromfilename.py
@@ -101,7 +101,7 @@ def apply_matches(d):
"""Given a mapping from items to field dicts, apply the fields to
the objects.
"""
- some_map... |
svthalia__concrexit-1196 | Deleting of EventInformationFields does not work
Steps to reproduce:
1. Create a new event with fields
2. Try to delete a field
Sentry Issue: [CONCREXIT-3K](https://sentry.io/organizations/thalia/issues/1865653504/?referrer=github_integration)
```
KeyError: 'order'
(10 additional frame(s) were not display... | [
{
"content": "\"\"\"Registers admin interfaces for the events module\"\"\"\nfrom django.contrib import admin\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Max, Min\nfrom django.forms import Field\nfrom django.template.defaultfilters import date as _date\nfrom django.urls imp... | [
{
"content": "\"\"\"Registers admin interfaces for the events module\"\"\"\nfrom django.contrib import admin\nfrom django.core.exceptions import PermissionDenied\nfrom django.db.models import Max, Min\nfrom django.forms import Field\nfrom django.template.defaultfilters import date as _date\nfrom django.urls imp... | diff --git a/website/events/admin.py b/website/events/admin.py
index 3ebb69209..31f9583b4 100644
--- a/website/events/admin.py
+++ b/website/events/admin.py
@@ -214,6 +214,7 @@ def save_formset(self, request, form, formset, change):
x
for x in formset.forms
if isinstance(x, forms.... |
OpenEnergyPlatform__oeplatform-657 | Tutorials app: activate safe_mode
Html is not escaped as expected when creating a new tutorial using the markdown editor -> save tutorial.
| [
{
"content": "from django.shortcuts import render, redirect\nfrom django.views import View\nfrom django.views.generic.edit import CreateView, UpdateView, DeleteView\nfrom django.urls import exceptions, reverse_lazy\nfrom django.contrib.auth.mixins import LoginRequiredMixin\n\nfrom os.path import join\n\nfrom uu... | [
{
"content": "from django.shortcuts import render, redirect\nfrom django.views import View\nfrom django.views.generic.edit import CreateView, UpdateView, DeleteView\nfrom django.urls import exceptions, reverse_lazy\nfrom django.contrib.auth.mixins import LoginRequiredMixin\n\nfrom os.path import join\n\nfrom uu... | diff --git a/tutorials/views.py b/tutorials/views.py
index 53d6e65e9..1ef414d73 100644
--- a/tutorials/views.py
+++ b/tutorials/views.py
@@ -214,7 +214,11 @@ def formattedMarkdown(markdown):
:return:
"""
- markdowner = Markdown(safe_mode="escape")
+ # escapes html but also escapes html code blocks lke... |
mesonbuild__meson-12774 | Missing warning on use of `meson.add_dist_script()` with `meson_version: '>=0.40'`
**Describe the bug**
`meson setup build` does not seem to warn on use of `meson.add_dist_script()` with `meson_version: '>=0.40'`, even though `add_dist_script()` was only added in 0.48.0.
**To Reproduce**
```meson
project('no-... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n# Copyright 2012-2021 The Meson development team\n# Copyright © 2021 Intel Corporation\nfrom __future__ import annotations\n\nimport os\nimport typing as T\n\nfrom .. import mesonlib\nfrom .. import dependencies\nfrom .. import build\nfrom .. import mlog, cor... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n# Copyright 2012-2021 The Meson development team\n# Copyright © 2021 Intel Corporation\nfrom __future__ import annotations\n\nimport os\nimport typing as T\n\nfrom .. import mesonlib\nfrom .. import dependencies\nfrom .. import build\nfrom .. import mlog, cor... | diff --git a/mesonbuild/interpreter/mesonmain.py b/mesonbuild/interpreter/mesonmain.py
index 66029a01999c..4d1f427da210 100644
--- a/mesonbuild/interpreter/mesonmain.py
+++ b/mesonbuild/interpreter/mesonmain.py
@@ -188,6 +188,7 @@ def add_postconf_script_method(
varargs=(str, mesonlib.File, ExternalProgram)
... |
huggingface__dataset-viewer-479 | Use main instead of master to load the datasets
The main branch in https://github.com/huggingface/datasets is now `main`, not `master` anymore. Note that it's backward compatible, so no need to hurry
| [
{
"content": "from typing import Optional\n\nDEFAULT_ASSETS_BASE_URL: str = \"assets\"\nDEFAULT_ASSETS_DIRECTORY: None = None\nDEFAULT_DATASETS_REVISION: str = \"master\"\nDEFAULT_HF_TOKEN: Optional[str] = None\nDEFAULT_LOG_LEVEL: str = \"INFO\"\nDEFAULT_MAX_JOB_RETRIES: int = 3\nDEFAULT_MAX_JOBS_PER_DATASET: i... | [
{
"content": "from typing import Optional\n\nDEFAULT_ASSETS_BASE_URL: str = \"assets\"\nDEFAULT_ASSETS_DIRECTORY: None = None\nDEFAULT_DATASETS_REVISION: str = \"main\"\nDEFAULT_HF_TOKEN: Optional[str] = None\nDEFAULT_LOG_LEVEL: str = \"INFO\"\nDEFAULT_MAX_JOB_RETRIES: int = 3\nDEFAULT_MAX_JOBS_PER_DATASET: int... | diff --git a/chart/values.yaml b/chart/values.yaml
index c785a32dcb..1c2d7f86e2 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -114,7 +114,7 @@ worker:
# Directory of the "datasets" library cache (for the datasets, not the modules)
cacheDirectory: "/cache"
# Git reference for the canonical dat... |
docker__docker-py-1835 | Deleting a volume with volume name containing blanks failed using docker python sdk
Description:
Creating a volume with the volume name contains a blank successfully,but delete the volume failed. When deleting the volume that the name contains a blank, the blank is decoded to "+".
Steps to Reproduce:
1. Create a do... | [
{
"content": "import json\nimport struct\nimport warnings\nfrom functools import partial\n\nimport requests\nimport requests.exceptions\nimport six\nimport websocket\n\nfrom .build import BuildApiMixin\nfrom .config import ConfigApiMixin\nfrom .container import ContainerApiMixin\nfrom .daemon import DaemonApiMi... | [
{
"content": "import json\nimport struct\nimport warnings\nfrom functools import partial\n\nimport requests\nimport requests.exceptions\nimport six\nimport websocket\n\nfrom .build import BuildApiMixin\nfrom .config import ConfigApiMixin\nfrom .container import ContainerApiMixin\nfrom .daemon import DaemonApiMi... | diff --git a/docker/api/client.py b/docker/api/client.py
index cbe74b916..01a83ea49 100644
--- a/docker/api/client.py
+++ b/docker/api/client.py
@@ -206,7 +206,7 @@ def _url(self, pathfmt, *args, **kwargs):
'instead'.format(arg, type(arg))
)
- quote_f = partial(six.moves.u... |
cisagov__manage.get.gov-1804 | Use one error message for zip code validation or when a zip code field is empty
Let's use one error message for empty zip code fields and invalid zip codes. Currently, in the manage domain > org mailing address flow, we have one error message if the zip code is empty or invalid. In the new domain request > org mailing ... | [
{
"content": "from __future__ import annotations # allows forward references in annotations\nfrom itertools import zip_longest\nimport logging\nfrom typing import Callable\nfrom api.views import DOMAIN_API_MESSAGES\nfrom phonenumber_field.formfields import PhoneNumberField # type: ignore\n\nfrom django import... | [
{
"content": "from __future__ import annotations # allows forward references in annotations\nfrom itertools import zip_longest\nimport logging\nfrom typing import Callable\nfrom api.views import DOMAIN_API_MESSAGES\nfrom phonenumber_field.formfields import PhoneNumberField # type: ignore\n\nfrom django import... | diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
index 1ee7e0036..df5b195c6 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -284,6 +284,7 @@ class OrganizationContactForm(RegistrarForm):
message=... |
ckan__ckan-4084 | Specify max resource size in an env variable
### CKAN Version if known (or site URL)
2.7.2 (applies to head of master as well)
### Please describe the expected behaviour
When deploying CKAN through docker it is not ideal to have to edit the configuration file in order to set maximum resource upload size. This woul... | [
{
"content": "# encoding: utf-8\n\n'''CKAN environment configuration'''\nimport os\nimport logging\nimport warnings\nfrom urlparse import urlparse\nimport pytz\n\nimport sqlalchemy\nfrom pylons import config as pylons_config\nimport formencode\n\nimport ckan.config.routing as routing\nimport ckan.model as model... | [
{
"content": "# encoding: utf-8\n\n'''CKAN environment configuration'''\nimport os\nimport logging\nimport warnings\nfrom urlparse import urlparse\nimport pytz\n\nimport sqlalchemy\nfrom pylons import config as pylons_config\nimport formencode\n\nimport ckan.config.routing as routing\nimport ckan.model as model... | diff --git a/ckan/config/environment.py b/ckan/config/environment.py
index 878b4ee8e1d..396e522d1dd 100644
--- a/ckan/config/environment.py
+++ b/ckan/config/environment.py
@@ -143,7 +143,8 @@ def find_controller(self, controller):
'smtp.starttls': 'CKAN_SMTP_STARTTLS',
'smtp.user': 'CKAN_SMTP_USER',
'sm... |
aio-libs__aiohttp-6727 | Don't cancel web handler on disconnection
Raise an error on reading/writing instead.
CancelledError
### Describe the bug
Using the aiohttp web server, I struggle with `asyncio.CancelledError()` when a client disconnect for some time.
I shielded what needed to be but it has its limits.
Today I found this old PR:
h... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport dataclasses\nimport traceback\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awa... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport dataclasses\nimport traceback\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awa... | diff --git a/CHANGES/6719.bugfix b/CHANGES/6719.bugfix
new file mode 100644
index 00000000000..b42ccca255d
--- /dev/null
+++ b/CHANGES/6719.bugfix
@@ -0,0 +1 @@
+Fix regression where ``asyncio.CancelledError`` occurs on client disconnection.
diff --git a/aiohttp/web_protocol.py b/aiohttp/web_protocol.py
index 122ae33b3... |
ultrabug__py3status-1893 | mpd_status: self.current_status dosen't return (text, state)
self.current_status command returns a tuple of (text, dict_of_mpd_state) but the mpd_status method expects the second value of the tuple to be `play`, `pause` or `stop`. this results in the module not coloring the output
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplay song currently playing in mpd.\n\nConfiguration parameters:\n cache_timeout: how often we refresh this module in seconds (default 2)\n format: template string (see below)\n (default '{state} [[[{artist}] - {title}]|[{file}]]')\n hide_on_erro... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplay song currently playing in mpd.\n\nConfiguration parameters:\n cache_timeout: how often we refresh this module in seconds (default 2)\n format: template string (see below)\n (default '{state} [[[{artist}] - {title}]|[{file}]]')\n hide_on_erro... | diff --git a/py3status/modules/mpd_status.py b/py3status/modules/mpd_status.py
index cc40c106c4..aed0563444 100644
--- a/py3status/modules/mpd_status.py
+++ b/py3status/modules/mpd_status.py
@@ -237,7 +237,7 @@ def attr_getter(attr):
if isinstance(text, Composite):
text = t... |
python-pillow__Pillow-3341 | WebPImagePlugin.py - ResourceWarning: unclosed file
### What did you do?
```console
> python -Wd
Python 3.7.0 (default, Jul 15 2018, 10:44:58)
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>> with Image.open('tshirt.webp') as img... | [
{
"content": "from . import Image, ImageFile, _webp\nfrom io import BytesIO\n\n\n_VALID_WEBP_MODES = {\n \"RGBX\": True,\n \"RGBA\": True,\n }\n\n_VALID_WEBP_LEGACY_MODES = {\n \"RGB\": True,\n \"RGBA\": True,\n }\n\n_VP8_MODES_BY_IDENTIFIER = {\n b\"VP8 \": \"RGB\",\n b\"VP8X\": \"RGBA\... | [
{
"content": "from . import Image, ImageFile, _webp\nfrom io import BytesIO\n\n\n_VALID_WEBP_MODES = {\n \"RGBX\": True,\n \"RGBA\": True,\n }\n\n_VALID_WEBP_LEGACY_MODES = {\n \"RGB\": True,\n \"RGBA\": True,\n }\n\n_VP8_MODES_BY_IDENTIFIER = {\n b\"VP8 \": \"RGB\",\n b\"VP8X\": \"RGBA\... | diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py
index 06e274d0a1e..202836f4cf8 100644
--- a/Tests/test_file_webp.py
+++ b/Tests/test_file_webp.py
@@ -135,6 +135,13 @@ def test_WebPDecode_with_invalid_args(self):
self.assertRaises(TypeError, _webp.WebPAnimDecoder)
self.assertRaises(T... |
pypi__warehouse-12405 | Warehouse logo usage guidelines page with links to SVGs
**What's the problem this feature will solve?**
<!-- A clear and concise description of what the problem is. -->
People will know how to properly use the Warehouse logos.
**Describe the solution you'd like**
<!-- A clear and concise description of what you w... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/test_routes.py b/tests/unit/test_routes.py
index 4236a04f4987..bb0cfd1dca2d 100644
--- a/tests/unit/test_routes.py
+++ b/tests/unit/test_routes.py
@@ -588,6 +588,12 @@ def add_policy(name, filename):
"pages/sponsors.html",
view_kw={"has_translations": True},
),... |
xorbitsai__inference-907 | 自定义模型Launch后无法在控制台删除,命令行也无法删除
### Describe the bug
自定义模型Launch后无法在控制台删除,命令行也无法删除且报错
### To Reproduce
To help us to reproduce this bug, please provide information below:
1. Python 3.10.12
2. xinference, version 0.7.5
3.命令行执行xinference list命令信息如下:
root@ai-gpu:/opt/devlop# xinference list
UID Type... | [
{
"content": "# Copyright 2022-2023 XProbe Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2022-2023 XProbe Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/xinference/model/llm/tests/test_utils.py b/xinference/model/llm/tests/test_utils.py
index 7f878ab8e4..d5e40d7561 100644
--- a/xinference/model/llm/tests/test_utils.py
+++ b/xinference/model/llm/tests/test_utils.py
@@ -415,8 +415,9 @@ def test_is_valid_model_name():
assert is_valid_model_name("foo_bar"... |
netbox-community__netbox-8735 | Search tags by their description
### NetBox version
v3.1.7
### Feature type
Change to existing functionality
### Proposed functionality
Allow the search bar at the Tags page to also search through the Description column.
### Use case
One use case for tags is for identifying VLANs and, in our use case, they are a... | [
{
"content": "import django_filters\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db.models import Q\n\nfrom dcim.models import DeviceRole, DeviceType, Platform, Region, Site, SiteGroup\nfrom netbox.filtersets import BaseFilterSet, ChangeLo... | [
{
"content": "import django_filters\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db.models import Q\n\nfrom dcim.models import DeviceRole, DeviceType, Platform, Region, Site, SiteGroup\nfrom netbox.filtersets import BaseFilterSet, ChangeLo... | diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md
index f6b1292b841..eab76836b8a 100644
--- a/docs/release-notes/version-3.1.md
+++ b/docs/release-notes/version-3.1.md
@@ -2,6 +2,10 @@
## v3.1.9 (FUTURE)
+### Enhancements
+
+* [#8629](https://github.com/netbox-community/netbox/issu... |
spotify__luigi-1561 | send_email doesn't trim recipient's email address
The send_email function simply split email address list by comma, and this leads to email address like " john.doe@example.com" (a space before the address).
The problem line is [here](https://github.com/spotify/luigi/blob/master/luigi/notifications.py#L260)
Suggest fi... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | diff --git a/luigi/notifications.py b/luigi/notifications.py
index df409453bb..2867ca8c2d 100644
--- a/luigi/notifications.py
+++ b/luigi/notifications.py
@@ -257,7 +257,7 @@ def send_email(subject, message, sender, recipients, image_png=None):
# separated in luigi.cfg
recipients_tmp = []
for r in recipi... |
ipython__ipython-7560 | Displaying a widget using displayhook produces misaligned Out[N] prompt

This doesn't look right. @jdfreder, can you investigate?
| [
{
"content": "\"\"\"Replacements for sys.displayhook that publish over ZMQ.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport sys\n\nfrom IPython.core.displayhook import DisplayHook\nfrom IPython.kernel.inprocess.socket import SocketABC\nfro... | [
{
"content": "\"\"\"Replacements for sys.displayhook that publish over ZMQ.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport sys\n\nfrom IPython.core.displayhook import DisplayHook\nfrom IPython.kernel.inprocess.socket import SocketABC\nfro... | diff --git a/IPython/kernel/zmq/displayhook.py b/IPython/kernel/zmq/displayhook.py
index 651d03c3ed4..9776ef44b36 100644
--- a/IPython/kernel/zmq/displayhook.py
+++ b/IPython/kernel/zmq/displayhook.py
@@ -68,6 +68,7 @@ def finish_displayhook(self):
"""Finish up all displayhook activities."""
sys.stdou... |
aio-libs__aiohttp-6741 | Don't cancel web handler on disconnection
Raise an error on reading/writing instead.
CancelledError
### Describe the bug
Using the aiohttp web server, I struggle with `asyncio.CancelledError()` when a client disconnect for some time.
I shielded what needed to be but it has its limits.
Today I found this old PR:
h... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport traceback\nimport warnings\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaita... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport traceback\nimport warnings\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaita... | diff --git a/CHANGES/6719.bugfix b/CHANGES/6719.bugfix
new file mode 100644
index 00000000000..b42ccca255d
--- /dev/null
+++ b/CHANGES/6719.bugfix
@@ -0,0 +1 @@
+Fix regression where ``asyncio.CancelledError`` occurs on client disconnection.
diff --git a/aiohttp/web_protocol.py b/aiohttp/web_protocol.py
index f103b1672... |
mantl__mantl-1652 | Unblocking Neutron ports fails when public_url is unset (or Neutron is named differently)
I am trying to install mantl on openstack and am using the sample.yml playbook. When I run the playbook, it fails here
```
TASK: [calico | unlock neutron ports to allow calico traffic] *****************
failed: [mantl-worker-001]... | [
{
"content": "#!/usr/bin/env python\n# This script updates the allowed address pairs in Neutron with the\n# 'neutron port-update' command. This is required by Calico in OpenStack,\n# otherwise BGP will not be working. We query OpenStack API directly to prevent\n# installing any dependencies such as python-neutr... | [
{
"content": "#!/usr/bin/env python\n# This script updates the allowed address pairs in Neutron with the\n# 'neutron port-update' command. This is required by Calico in OpenStack,\n# otherwise BGP will not be working. We query OpenStack API directly to prevent\n# installing any dependencies such as python-neutr... | diff --git a/roles/calico/files/neutron_port_update.py b/roles/calico/files/neutron_port_update.py
index 672f856b9..e7dd6c997 100755
--- a/roles/calico/files/neutron_port_update.py
+++ b/roles/calico/files/neutron_port_update.py
@@ -71,7 +71,7 @@ def neutron_public_url(catalog):
"""Get Neutron publicURL"""
... |
statsmodels__statsmodels-4505 | Bug fix for summary_col on summary2.py
The following returns an error with the master code:
```python
import statsmodels.formula.api as smf
import pandas as pd
ids = [1,1,1,1,1,2,2,2,2,3,3,3,3,3,3]
x = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
y = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
d = {'Y':y,'X':x,'IDS':ids}... | [
{
"content": "from statsmodels.compat.python import (lrange, iterkeys, iteritems, lzip,\n reduce, itervalues, zip, string_types,\n range)\n\nfrom collections import OrderedDict\nimport datetime\nimport re\nimport textwrap\n\nimport nump... | [
{
"content": "from statsmodels.compat.python import (lrange, iterkeys, iteritems, lzip,\n reduce, itervalues, zip, string_types,\n range)\n\nfrom collections import OrderedDict\nimport datetime\nimport re\nimport textwrap\n\nimport nump... | diff --git a/statsmodels/iolib/summary2.py b/statsmodels/iolib/summary2.py
index 27eabfa8711..40630746da4 100644
--- a/statsmodels/iolib/summary2.py
+++ b/statsmodels/iolib/summary2.py
@@ -360,7 +360,10 @@ def summary_params(results, yname=None, xname=None, alpha=.05, use_t=True,
'[' + str(alph... |
searx__searx-438 | Error page not valid with format param provided
hello,
when you call the the search api with a bad parameter, the landing page html is return without error message.
If you provide format like json or rss, you receive an html page, not great to provided revelant error message.
By example : https://searx.me/search?q=s... | [
{
"content": "'''\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 in the hope that it will b... | [
{
"content": "'''\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 in the hope that it will b... | diff --git a/searx/search.py b/searx/search.py
index f2b5235b8a..54c22c1902 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -358,7 +358,7 @@ def __init__(self, request):
# set pagenumber
pageno_param = self.request_data.get('pageno', '1')
if not pageno_param.isdigit() or int(pageno_para... |
python__mypy-15306 | Match statement ignores redefinition
The following code fails to type check with `error: "str" has no attribute "bit_length"` on the match statement, but not on the print statement:
```python
def redefinition(a: str):
a = int(a)
print(a.bit_length())
match a.bit_length():
case _:
... | [
{
"content": "from __future__ import annotations\n\nfrom contextlib import contextmanager\nfrom typing import Iterator\nfrom typing_extensions import Final\n\nfrom mypy.nodes import (\n AssignmentStmt,\n Block,\n BreakStmt,\n ClassDef,\n ContinueStmt,\n ForStmt,\n FuncDef,\n Import,\n ... | [
{
"content": "from __future__ import annotations\n\nfrom contextlib import contextmanager\nfrom typing import Iterator\nfrom typing_extensions import Final\n\nfrom mypy.nodes import (\n AssignmentStmt,\n Block,\n BreakStmt,\n ClassDef,\n ContinueStmt,\n ForStmt,\n FuncDef,\n Import,\n ... | diff --git a/mypy/renaming.py b/mypy/renaming.py
index 05b67f41ab85..2fa3ef168a66 100644
--- a/mypy/renaming.py
+++ b/mypy/renaming.py
@@ -182,6 +182,7 @@ def visit_assignment_stmt(self, s: AssignmentStmt) -> None:
self.analyze_lvalue(lvalue)
def visit_match_stmt(self, s: MatchStmt) -> None:
+ ... |
googleapis__google-cloud-python-5021 | Pub/Sub 0.32.0 | Exception "google.api_core.exceptions.Unknown: None Stream removed"
- Context
```shell
google-cloud-pubsub (0.32.0)
Python 2.7.13
Win10
```
- Subscriber console | Fails w/ exception after a random time (from 15 min to 3 h)
```shell
> python pubsub_subscribe.py
Subscribed to m... | [
{
"content": "# Copyright 2017, Google LLC All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2017, Google LLC All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/policy/base.py b/pubsub/google/cloud/pubsub_v1/subscriber/policy/base.py
index be098c5eeea8..8844016a35df 100644
--- a/pubsub/google/cloud/pubsub_v1/subscriber/policy/base.py
+++ b/pubsub/google/cloud/pubsub_v1/subscriber/policy/base.py
@@ -97,6 +97,9 @@ class BaseP... |
biopython__biopython-2326 | Python 3.8 now throws an exception when modifying a dictionary while iterating
Python 3.8 now throws an exception when modifying a dictionary while iterating
```
--- a/Bio/SubsMat/__init__.py
+++ b/Bio/SubsMat/__init__.py
@@ -207,7 +207,7 @@ class SeqMat(dict):
def _correct_matrix(self):
"""Sor... | [
{
"content": "# Copyright 2000-2009 by Iddo Friedberg. All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n#\n# Iddo Friedberg idoerg@cc.huji.ac.il\n\n\"\"\"Substitution ... | [
{
"content": "# Copyright 2000-2009 by Iddo Friedberg. All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n#\n# Iddo Friedberg idoerg@cc.huji.ac.il\n\n\"\"\"Substitution ... | diff --git a/.travis-tox.ini b/.travis-tox.ini
index a0d17e16740..f13179f9dd3 100644
--- a/.travis-tox.ini
+++ b/.travis-tox.ini
@@ -71,7 +71,7 @@ deps =
py27,py35,pypy: rdflib
pypy,pypy3: numpy==1.12.1
pypy,pypy3: mysqlclient
- py27,py35,py37: numpy
+ py27,py35,py37,py38: numpy
py37: scipy
... |
numpy__numpy-4344 | Make unique behave like sort when the argument is a list
The sort and unique functions do not handle lists in a consistent manner.
``` python
>>> a = [complex(1,0), complex(1,-1), 1]
>>> np.sort(a)
array([ 1.-1.j, 1.+0.j, 1.+0.j]) # OK
>>> np.sort(np.array(a))
array([ 1.-1.j, 1.+0.j, 1.+0.j]) # OK
>>> np.unique(np... | [
{
"content": "\"\"\"\nSet operations for 1D numeric arrays based on sorting.\n\n:Contains:\n ediff1d,\n unique,\n intersect1d,\n setxor1d,\n in1d,\n union1d,\n setdiff1d\n\n:Notes:\n\nFor floating point arrays, inaccurate results may appear due to usual round-off\nand floating point comparison issues.\n\... | [
{
"content": "\"\"\"\nSet operations for 1D numeric arrays based on sorting.\n\n:Contains:\n ediff1d,\n unique,\n intersect1d,\n setxor1d,\n in1d,\n union1d,\n setdiff1d\n\n:Notes:\n\nFor floating point arrays, inaccurate results may appear due to usual round-off\nand floating point comparison issues.\n\... | diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index 5cd535703690..691550579a1d 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -163,8 +163,7 @@ def unique(ar, return_index=False, return_inverse=False):
ar = ar.flatten()
except AttributeError:
if not retu... |
aio-libs__aiohttp-6742 | Don't cancel web handler on disconnection
Raise an error on reading/writing instead.
CancelledError
### Describe the bug
Using the aiohttp web server, I struggle with `asyncio.CancelledError()` when a client disconnect for some time.
I shielded what needed to be but it has its limits.
Today I found this old PR:
h... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport traceback\nimport warnings\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaita... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport traceback\nimport warnings\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaita... | diff --git a/CHANGES/6719.bugfix b/CHANGES/6719.bugfix
new file mode 100644
index 00000000000..b42ccca255d
--- /dev/null
+++ b/CHANGES/6719.bugfix
@@ -0,0 +1 @@
+Fix regression where ``asyncio.CancelledError`` occurs on client disconnection.
diff --git a/aiohttp/web_protocol.py b/aiohttp/web_protocol.py
index 0e59928b2... |
beetbox__beets-2644 | Calculating album replaygain with gstreamer causes error
### Problem
I tried calculating replaygain values for all albums in my collection and encountered a very weird problem. I tried figuring out myself what's going on, but I'm pretty much stumped. Maybe someone else can point me in a good direction...
```
bee... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Fabrice Laporte, Yevgeny Bezman, and Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Fabrice Laporte, Yevgeny Bezman, and Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in... | diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py
index 8b4172a5a5..a70f9384b8 100644
--- a/beetsplug/replaygain.py
+++ b/beetsplug/replaygain.py
@@ -606,6 +606,10 @@ def _set_file(self):
self._decbin.sync_state_with_parent()
self._decbin.get_state(self.Gst.CLOCK_TIME_NONE)
+ sel... |
svthalia__concrexit-1743 | Cannot enter float number as contribution during benefactor renewal
### Describe the bug
Cannot enter float number as contribution during benefactor renewal
### How to reproduce
Steps to reproduce the behaviour:
1. Go to http://localhost:8000/user/membership/
2. Add a benefactor membership renewal
3. The form ... | [
{
"content": "\"\"\"The forms defined by the registrations package.\"\"\"\nfrom django import forms\nfrom django.core.exceptions import NON_FIELD_ERRORS, ValidationError\nfrom django.forms import TypedChoiceField\nfrom django.urls import reverse_lazy\nfrom django.utils import timezone\nfrom django.utils.safestr... | [
{
"content": "\"\"\"The forms defined by the registrations package.\"\"\"\nfrom django import forms\nfrom django.core.exceptions import NON_FIELD_ERRORS, ValidationError\nfrom django.forms import TypedChoiceField\nfrom django.urls import reverse_lazy\nfrom django.utils import timezone\nfrom django.utils.safestr... | diff --git a/website/registrations/forms.py b/website/registrations/forms.py
index 616666f38..84e66a2c1 100644
--- a/website/registrations/forms.py
+++ b/website/registrations/forms.py
@@ -139,7 +139,7 @@ class RenewalForm(forms.ModelForm):
required=False, label=_("I am an employee of iCIS")
)
- cont... |
napalm-automation__napalm-1985 | Linting issue with napalm/base/validate.py:165:10 E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` [pycodestyle]
Last working build
```
Collecting pycodestyle (from flake8-import-order==0.18.2->-r requirements-dev.txt (line 4))
Downloading pycodestyle-2.10.0-p... | [
{
"content": "\"\"\"\nValidation methods for the NAPALM base.\n\nSee: https://napalm.readthedocs.io/en/latest/validate.html\n\"\"\"\nimport yaml\nimport copy\nimport re\nfrom typing import Dict, List, Union, TypeVar, Optional, TYPE_CHECKING\n\nif TYPE_CHECKING:\n from napalm.base import NetworkDriver\nfrom n... | [
{
"content": "\"\"\"\nValidation methods for the NAPALM base.\n\nSee: https://napalm.readthedocs.io/en/latest/validate.html\n\"\"\"\nimport yaml\nimport copy\nimport re\nfrom typing import Dict, List, Union, TypeVar, Optional, TYPE_CHECKING\n\nif TYPE_CHECKING:\n from napalm.base import NetworkDriver\nfrom n... | diff --git a/napalm/base/validate.py b/napalm/base/validate.py
index db5bbc257..21b4fc888 100644
--- a/napalm/base/validate.py
+++ b/napalm/base/validate.py
@@ -162,7 +162,7 @@ def compare(
else:
return src == dst
- elif type(src) == type(dst) == list:
+ elif isinstance(src, list) ... |
mathesar-foundation__mathesar-1157 | URI type does not allow NULL value to be set.
## Description
A column with the `URI` type does not allow `null` value to be set after creation even though the column `nullable` option is enabled
## Expected behaviour
Allow setting a null value to a nullable `URI` type column without throwing up an error
## To ... | [
{
"content": "from enum import Enum\nimport os\nfrom sqlalchemy import text, Text, Table, Column, String, MetaData\nfrom sqlalchemy.sql import quoted_name\nfrom sqlalchemy.sql.functions import GenericFunction\nfrom sqlalchemy.types import UserDefinedType\n\nfrom db.functions import hints\nfrom db.functions.base... | [
{
"content": "from enum import Enum\nimport os\nfrom sqlalchemy import text, Text, Table, Column, String, MetaData\nfrom sqlalchemy.sql import quoted_name\nfrom sqlalchemy.sql.functions import GenericFunction\nfrom sqlalchemy.types import UserDefinedType\n\nfrom db.functions import hints\nfrom db.functions.base... | diff --git a/db/tests/types/test_uri.py b/db/tests/types/test_uri.py
index 3393890f52..074dac9ae4 100644
--- a/db/tests/types/test_uri.py
+++ b/db/tests/types/test_uri.py
@@ -160,6 +160,24 @@ def test_uri_type_column_creation(engine_email_type):
test_table.create()
+test_data = ('https://centerofci.org', N... |
pre-commit__pre-commit-1614 | Can't use ruby 2.7.1 on MacOS
Hi,
Bumping my ruby hooks to version 2.7.1 worked fine for me on Ubuntu but doesn't work for my colleagues using MacOS, is there something to do about bumping rbenv archives ?
Thanks
| [
{
"content": "import argparse\nimport os.path\nimport tarfile\nfrom typing import Optional\nfrom typing import Sequence\n\nfrom pre_commit import output\nfrom pre_commit.util import cmd_output_b\nfrom pre_commit.util import rmtree\nfrom pre_commit.util import tmpdir\n\n\n# This is a script for generating the ta... | [
{
"content": "import argparse\nimport os.path\nimport tarfile\nfrom typing import Optional\nfrom typing import Sequence\n\nfrom pre_commit import output\nfrom pre_commit.util import cmd_output_b\nfrom pre_commit.util import rmtree\nfrom pre_commit.util import tmpdir\n\n\n# This is a script for generating the ta... | diff --git a/pre_commit/make_archives.py b/pre_commit/make_archives.py
index c31bcd714..d320b830d 100644
--- a/pre_commit/make_archives.py
+++ b/pre_commit/make_archives.py
@@ -15,8 +15,8 @@
REPOS = (
- ('rbenv', 'git://github.com/rbenv/rbenv', 'a3fa9b7'),
- ('ruby-build', 'git://github.com/rbenv/ruby-build'... |
inventree__InvenTree-1537 | Embed information on 3rd-party libraries
I would like to create a place (I suggest the "about" modal) where all the great used libraries get mentioned and their licenses linked. The legal depts. in bigger organisations like to see something like that to be sure there is nothing bad going on licensing wise ([like this](... | [
{
"content": "\"\"\" This module provides template tags for extra functionality\nover and above the built-in Django tags.\n\"\"\"\nimport os\n\nfrom django import template\nfrom django.urls import reverse\nfrom django.utils.safestring import mark_safe\nfrom django.templatetags.static import StaticNode\nfrom Inv... | [
{
"content": "\"\"\" This module provides template tags for extra functionality\nover and above the built-in Django tags.\n\"\"\"\nimport os\n\nfrom django import template\nfrom django.urls import reverse\nfrom django.utils.safestring import mark_safe\nfrom django.templatetags.static import StaticNode\nfrom Inv... | diff --git a/InvenTree/part/templatetags/inventree_extras.py b/InvenTree/part/templatetags/inventree_extras.py
index a92d95c76638..536f25cb5b32 100644
--- a/InvenTree/part/templatetags/inventree_extras.py
+++ b/InvenTree/part/templatetags/inventree_extras.py
@@ -116,6 +116,12 @@ def inventree_docs_url(*args, **kwargs):... |
ansible-collections__community.general-3586 | DNSimple does not return records
### Summary
According to dnsimple docs [1] it should be possible to list all records of a given domain but it actually is not.
### Issue Type
Bug Report
### Component Name
dnsimple
### Ansible Version
```console (paste below)
$ ansible --version
ansible 2.9.6
```
### Co... | [
{
"content": "#!/usr/bin/python\n#\n# Copyright: Ansible Project\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: dnsimple\nshort_descr... | [
{
"content": "#!/usr/bin/python\n#\n# Copyright: Ansible Project\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: dnsimple\nshort_descr... | diff --git a/plugins/modules/net_tools/dnsimple.py b/plugins/modules/net_tools/dnsimple.py
index c4314b65394..f7653c9b2cf 100644
--- a/plugins/modules/net_tools/dnsimple.py
+++ b/plugins/modules/net_tools/dnsimple.py
@@ -84,13 +84,6 @@
account_api_token: dummyapitoken
delegate_to: localhost
-- name: Fetch my.... |
Cog-Creators__Red-DiscordBot-2957 | [Utils] Creating backup on Windows results in 0 bytes file.
# Other bugs
#### What were you trying to do?
Create backup on Windows.
#### What were you expecting to happen?
Get backup file for my bot in the location it told me.
#### What actually happened?
I got 0 bytes file with non-full name (issue i... | [
{
"content": "import asyncio\nimport json\nimport logging\nimport os\nimport shutil\nimport tarfile\nfrom asyncio import AbstractEventLoop, as_completed, Semaphore\nfrom asyncio.futures import isfuture\nfrom itertools import chain\nfrom pathlib import Path\nfrom typing import (\n Any,\n AsyncIterator,\n ... | [
{
"content": "import asyncio\nimport json\nimport logging\nimport os\nimport shutil\nimport tarfile\nfrom asyncio import AbstractEventLoop, as_completed, Semaphore\nfrom asyncio.futures import isfuture\nfrom itertools import chain\nfrom pathlib import Path\nfrom typing import (\n Any,\n AsyncIterator,\n ... | diff --git a/changelog.d/2954.bugfix.rst b/changelog.d/2954.bugfix.rst
new file mode 100644
index 00000000000..e5e1c53ccce
--- /dev/null
+++ b/changelog.d/2954.bugfix.rst
@@ -0,0 +1 @@
+Stop using `:` character in backup's filename - Windows doesn't accept it
\ No newline at end of file
diff --git a/redbot/core/utils/_... |
e-valuation__EvaP-1810 | Replace reward point redemption dropdown with number input field
If a user selects an option, a new line is added and the selection spans two rows. This looks wrong.
A user can insert custom options. If the user inputs something invalid like "abcdef" or an empty string, only parts of "Please select"-placeholder is v... | [
{
"content": "from datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import BadRequest, SuspiciousOperation\nfrom django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.utils.translation import get_language\nfrom ... | [
{
"content": "from datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import BadRequest, SuspiciousOperation\nfrom django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.utils.translation import get_language\nfrom ... | diff --git a/evap/rewards/templates/rewards_index.html b/evap/rewards/templates/rewards_index.html
index acd828c9d0..5ef4c06d35 100644
--- a/evap/rewards/templates/rewards_index.html
+++ b/evap/rewards/templates/rewards_index.html
@@ -28,7 +28,7 @@
<th style="width: 20%">{% trans 'D... |
googleapis__python-spanner-django-125 | django-test-suite: constraints failure due to CHECK CONSTRAINT being added yet unsupported by Cloud Spanner
When I run the constraints test suite for Django, I encountered this error
```shell
django.db.utils.ProgrammingError: 400 Errors parsing Spanner DDL statement:
CREATE TABLE constraints_product (id INT64 NOT NU... | [
{
"content": "from django.db.backends.base.features import BaseDatabaseFeatures\n\n\nclass DatabaseFeatures(BaseDatabaseFeatures):\n supports_foreign_keys = False\n supports_transactions = False\n\n # Django tests that aren't supported by Spanner.\n skip_tests = (\n # No Django transaction ma... | [
{
"content": "from django.db.backends.base.features import BaseDatabaseFeatures\n\n\nclass DatabaseFeatures(BaseDatabaseFeatures):\n supports_foreign_keys = False\n supports_transactions = False\n supports_column_check_constraints = False\n supports_table_check_constraints = False\n\n # Django te... | diff --git a/spanner/django/features.py b/spanner/django/features.py
index 89fef89133..646fd6c3f8 100644
--- a/spanner/django/features.py
+++ b/spanner/django/features.py
@@ -4,6 +4,8 @@
class DatabaseFeatures(BaseDatabaseFeatures):
supports_foreign_keys = False
supports_transactions = False
+ supports_co... |
keras-team__keras-13378 | CSVLogger leaks file handles on interuption
**Describe the current behavior**
If an interruption occurs after training starts and before training ends, a file handle will be leaked, such as a Ctrl+C KeyboardInterupt.
**Describe the expected behavior**
A destructor should implement the required behavior. Then ... | [
{
"content": "\"\"\"Callbacks: utilities called at certain points during model training.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport csv\nimport six\n\nimport numpy as np\nimport time\nimport json\nimport warnings\n... | [
{
"content": "\"\"\"Callbacks: utilities called at certain points during model training.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport csv\nimport six\n\nimport numpy as np\nimport time\nimport json\nimport warnings\n... | diff --git a/keras/callbacks/callbacks.py b/keras/callbacks/callbacks.py
index f92011ecc333..dabd27791e08 100644
--- a/keras/callbacks/callbacks.py
+++ b/keras/callbacks/callbacks.py
@@ -1155,6 +1155,10 @@ def on_train_end(self, logs=None):
self.csv_file.close()
self.writer = None
+ def __del__(s... |
buildbot__buildbot-1419 | use latest version of automat instead of trunk
trying to fix unit tests for 3.6
| [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/steps/python_twisted.py b/master/buildbot/steps/python_twisted.py
index 0c0d9a2e451b..35b523921c3b 100644
--- a/master/buildbot/steps/python_twisted.py
+++ b/master/buildbot/steps/python_twisted.py
@@ -374,6 +374,9 @@ def __init__(self, reactor=UNSPECIFIED, python=None, trial=None,
... |
translate__pootle-6456 | Terminology is not updated when term units are updated
the terminology stemmer listens to `submission.post_save` - but submissions are always `bulk_created` so it doesn't seem to get triggered
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.db... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.db... | diff --git a/pootle/apps/pootle_terminology/receivers.py b/pootle/apps/pootle_terminology/receivers.py
index 9e61edf2cdb..86e4d4a1bfe 100644
--- a/pootle/apps/pootle_terminology/receivers.py
+++ b/pootle/apps/pootle_terminology/receivers.py
@@ -34,7 +34,7 @@ def handle_unit_save(**kwargs):
@receiver(post_save, sender=... |
ivy-llc__ivy-16319 | __rshift__
| [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.numpy as np_frontend\nfrom ivy.functional.frontends.numpy.func_wrapper import _to_ivy_array\n\n\nclass ndarray:\n def __init__(self, shape, dtype=\"float32\", order=None, _init_overload=False):\n if isinstance(dtype, np_fro... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.numpy as np_frontend\nfrom ivy.functional.frontends.numpy.func_wrapper import _to_ivy_array\n\n\nclass ndarray:\n def __init__(self, shape, dtype=\"float32\", order=None, _init_overload=False):\n if isinstance(dtype, np_fro... | diff --git a/ivy/functional/frontends/numpy/ndarray/ndarray.py b/ivy/functional/frontends/numpy/ndarray/ndarray.py
index 2f88f0bf98fc7..bc2f030986f96 100644
--- a/ivy/functional/frontends/numpy/ndarray/ndarray.py
+++ b/ivy/functional/frontends/numpy/ndarray/ndarray.py
@@ -523,3 +523,6 @@ def ptp(self, *, axis=None, out... |
mlflow__mlflow-8499 | [BUG] Missing `basic_auth.ini` in PyPI package
### Issues Policy acknowledgement
- [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)
### Willingness to contribute
Yes. I can contribute a fix for this bug independen... | [
{
"content": "import os\nimport logging\nfrom importlib.machinery import SourceFileLoader\nfrom setuptools import setup, find_packages, Command\n\n_MLFLOW_SKINNY_ENV_VAR = \"MLFLOW_SKINNY\"\n\nversion = (\n SourceFileLoader(\"mlflow.version\", os.path.join(\"mlflow\", \"version.py\")).load_module().VERSION\n... | [
{
"content": "import os\nimport logging\nfrom importlib.machinery import SourceFileLoader\nfrom setuptools import setup, find_packages, Command\n\n_MLFLOW_SKINNY_ENV_VAR = \"MLFLOW_SKINNY\"\n\nversion = (\n SourceFileLoader(\"mlflow.version\", os.path.join(\"mlflow\", \"version.py\")).load_module().VERSION\n... | diff --git a/setup.py b/setup.py
index feca8bfc07c90..c78a393da4ff1 100644
--- a/setup.py
+++ b/setup.py
@@ -39,6 +39,7 @@ def remove_comments_and_empty_lines(lines):
extra_files = [
"pypi_package_index.json",
"pyspark/ml/log_model_allowlist.txt",
+ "server/auth/basic_auth.ini",
]
recipes_template_files... |
plotly__dash-17 | Do not encourage Flask.run in production
I'm not entirely clear if this is even meant for deployed applications, since the docs don't get into that. The Werkzeug dev server is not guaranteed to be efficient, stable, or secure. Your guide should mention that `Dash.run_server` should only be used during development.
A... | [
{
"content": "import flask\nimport json\nimport plotly\nfrom flask import Flask, url_for, send_from_directory, Response\nfrom flask_compress import Compress\nfrom flask_seasurf import SeaSurf\nimport os\nimport importlib\nimport requests\nimport pkgutil\nfrom functools import wraps\nimport datetime\nimport coll... | [
{
"content": "import flask\nimport json\nimport plotly\nfrom flask import Flask, url_for, send_from_directory, Response\nfrom flask_compress import Compress\nfrom flask_seasurf import SeaSurf\nimport os\nimport importlib\nimport requests\nimport pkgutil\nfrom functools import wraps\nimport datetime\nimport coll... | diff --git a/dash/dash.py b/dash/dash.py
index fe0abe7085..350e37dad4 100644
--- a/dash/dash.py
+++ b/dash/dash.py
@@ -603,7 +603,7 @@ def _setup_server(self):
def run_server(self,
port=8050,
- debug=True,
+ debug=False,
threaded=True,
... |
pytorch__pytorch-60743 | `--dry-run` flag doesn't print anything (`tools/linter/clang_tidy.py`)
## Bug
Running `tools/linter/clang_tidy.py` with the `--dry-run` option doesn't print anything.
## To Reproduce
Run the following command
```
python3 tools/linter/clang_tidy.py --paths torch/csrc/fx --dry-run
```
Output:
```
```
Ex... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"\nA driver script to run clang-tidy on changes detected via git.\n\nBy default, clang-tidy runs on all files you point it at. This means that even\nif you changed only parts of that file, you will get warnings for the whole\nfile. This script has the ability to ask gi... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"\nA driver script to run clang-tidy on changes detected via git.\n\nBy default, clang-tidy runs on all files you point it at. This means that even\nif you changed only parts of that file, you will get warnings for the whole\nfile. This script has the ability to ask gi... | diff --git a/tools/linter/clang_tidy.py b/tools/linter/clang_tidy.py
index 673a2b80ac419a..bb9e2e0b2d2855 100755
--- a/tools/linter/clang_tidy.py
+++ b/tools/linter/clang_tidy.py
@@ -377,6 +377,8 @@ def main() -> None:
shutil.copyfile(fname, mapped_fname)
pwd = os.getcwd() + "/"
+ if options.... |
Gallopsled__pwntools-1629 | Pull Request #1608 is not Python2-compatible
The pull request in #1608 introduced a change that is not backward compatible.
This should be resolved in `stable`
```
[*] running in new terminal: /usr/local/bin/gdb -q "./challenge" -x /tmp/pwntools/pwnn9EWNB.gdb
Traceback (most recent call last):
File "exploit... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport ctypes\nimport errno\nimport logging\nimport os\nimport platform\nimport select\nimport signal\nimport six\nimport stat\nimport subprocess\nimport sys\nimport time\n\nif sys.platform != 'win3... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport ctypes\nimport errno\nimport logging\nimport os\nimport platform\nimport select\nimport signal\nimport six\nimport stat\nimport subprocess\nimport sys\nimport time\n\nif sys.platform != 'win3... | diff --git a/pwnlib/tubes/process.py b/pwnlib/tubes/process.py
index 8f1fc9937..a13cc0169 100644
--- a/pwnlib/tubes/process.py
+++ b/pwnlib/tubes/process.py
@@ -752,7 +752,7 @@ def can_recv_raw(self, timeout):
# ValueError: I/O operation on closed file
raise EOFError
except select.err... |
Textualize__textual-4331 | Button doesn't render Rich Markup correctly
If I'm reading the docs correctly, the `Button` widget *should* accept Rich Markup for its `label`, but in 0.53.1, it doesn't seem to do this.
Here's my test app:
```python3
from textual.app import App
from textual.widgets import Button, SelectionList
import sys
c... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom typing import TYPE_CHECKING, cast\n\nimport rich.repr\nfrom rich.console import ConsoleRenderable, RenderableType\nfrom rich.text import Text, TextType\nfrom typing_extensions import Literal, Self\n\nfrom .. import events\n\... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom typing import TYPE_CHECKING, cast\n\nimport rich.repr\nfrom rich.console import ConsoleRenderable, RenderableType\nfrom rich.text import Text, TextType\nfrom typing_extensions import Literal, Self\n\nfrom .. import events\n\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a7ee5979d..c97d434f6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Exceptions inside `Widget.compose` or workers weren't bubbling up in tests https://github.com/Textua... |
conan-io__conan-center-index-9682 | [package] Tesseract/5.0.0: GCC Requirement too restrictive
I am working to compile the tesseract library into binaries for deployment on various Linux distros (with Ubuntu 18.04+ as my primary target right now).
The tesseract package (versions >=5.0.0) uses too restrictive of a GCC version (9+) to support C++17, whe... | [
{
"content": "from conans import ConanFile, CMake, tools\nfrom conans.errors import ConanInvalidConfiguration\nimport os\nimport textwrap\n\nrequired_conan_version = \">=1.43.0\"\n\n\nclass TesseractConan(ConanFile):\n name = \"tesseract\"\n description = \"Tesseract Open Source OCR Engine\"\n url = \"... | [
{
"content": "from conans import ConanFile, CMake, tools\nfrom conans.errors import ConanInvalidConfiguration\nimport os\nimport textwrap\n\nrequired_conan_version = \">=1.43.0\"\n\n\nclass TesseractConan(ConanFile):\n name = \"tesseract\"\n description = \"Tesseract Open Source OCR Engine\"\n url = \"... | diff --git a/recipes/tesseract/all/conanfile.py b/recipes/tesseract/all/conanfile.py
index 807247d68b1e6..19a257d2dbc92 100644
--- a/recipes/tesseract/all/conanfile.py
+++ b/recipes/tesseract/all/conanfile.py
@@ -82,7 +82,7 @@ def validate(self):
# 5.0.0 requires C++-17 compiler
minimal_versio... |
Zeroto521__my-data-toolkit-395 | EHN: let `register_*_method` support alias feature
<!--
Thanks for contributing a pull request!
Please follow these standard acronyms to start the commit message:
- ENH: enhancement
- BUG: bug fix
- DOC: documentation
- TYP: type annotations
- TST: addition or modification of tests
- MAINT: maintenance comm... | [
{
"content": "from __future__ import annotations\n\nfrom textwrap import dedent\nfrom typing import TYPE_CHECKING\n\nimport pandas as pd\nfrom pandas.util._decorators import doc\nfrom pandas.util._validators import validate_bool_kwarg\n\nfrom dtoolkit.accessor.register import register_series_method\n\nif TYPE_C... | [
{
"content": "from __future__ import annotations\n\nfrom textwrap import dedent\nfrom typing import TYPE_CHECKING\n\nimport pandas as pd\nfrom pandas.util._decorators import doc\nfrom pandas.util._validators import validate_bool_kwarg\n\nfrom dtoolkit.accessor.register import register_series_method\n\nif TYPE_C... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef0909231..81975adb8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,14 +1,22 @@
# Changelog
-## [Version 0.0.9] (2022-1-7)
+## [Version 0.0.9] (2022-1-10)
Use `squash merge` to keep a cleaning git commit history ({issue}`386`).
+Highlights of this release:
+
+-... |
django-helpdesk__django-helpdesk-330 | Header cuts off body
We have several deployments of django-helpdesk for clients that need a basic ticket system. Most of them have custom graphical tweaks, so I thought the 'header cuts off body' issue was something I did.
After a recent setup that had no customization, I noticed it was still cutting off the body. S... | [
{
"content": "import os\nimport sys\nimport argparse\n\nimport django\nfrom django.conf import settings\n\n\nclass QuickDjangoTest(object):\n \"\"\"\n A quick way to run the Django test suite without a fully-configured project.\n\n Example usage:\n\n >>> QuickDjangoTest('app1', 'app2')\n\n Ba... | [
{
"content": "import os\nimport sys\nimport argparse\n\nimport django\nfrom django.conf import settings\n\n\nclass QuickDjangoTest(object):\n \"\"\"\n A quick way to run the Django test suite without a fully-configured project.\n\n Example usage:\n\n >>> QuickDjangoTest('app1', 'app2')\n\n Ba... | diff --git a/helpdesk/templates/helpdesk/base.html b/helpdesk/templates/helpdesk/base.html
index 9f9e1eb70..433c825ce 100644
--- a/helpdesk/templates/helpdesk/base.html
+++ b/helpdesk/templates/helpdesk/base.html
@@ -1,6 +1,7 @@
{% load i18n %}
{% load saved_queries %}
{% load load_helpdesk_settings %}
+{% load stat... |
google__flax-1511 | nn.Embed cannot be hashed -> doesn't work with jax.jit static_argnums
### Problem you have encountered:
There is some issue with hashing of `nn.Embed` which means it cannot be used as input to methods annotated with `jax.jit`. An example situation is when one wishes to have a `train_step` function which is generic ove... | [
{
"content": "# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/flax/linen/linear.py b/flax/linen/linear.py
index 4c9c12c39..3dc71eb70 100644
--- a/flax/linen/linear.py
+++ b/flax/linen/linear.py
@@ -399,7 +399,7 @@ class Embed(Module):
dtype: Dtype = jnp.float32
embedding_init: Callable[[PRNGKey, Shape, Dtype], Array] = default_embed_init
- embedding: Array =... |
weecology__retriever-663 | Stop bad scripts from causing errors
Currently when `compile_json` gets run if something goes wrong the retriever errors out even on commands not running the script (e.g., `retriever ls`). What it should do is ignore the bad script and possibly report back that there is an issue with the script but keep running normall... | [
{
"content": "from builtins import str\nimport json\nimport sys\nif sys.version_info[0] < 3:\n from codecs import open\n\nscript_templates = {\n \"default\": \"\"\"#retriever\nfrom retriever.lib.templates import BasicTextTemplate\nfrom retriever.lib.models import Table, Cleanup, correct_invalid_value\n\nS... | [
{
"content": "from builtins import str\nimport json\nimport sys\nif sys.version_info[0] < 3:\n from codecs import open\n\nscript_templates = {\n \"default\": \"\"\"#retriever\nfrom retriever.lib.templates import BasicTextTemplate\nfrom retriever.lib.models import Table, Cleanup, correct_invalid_value\n\nS... | diff --git a/lib/compile.py b/lib/compile.py
index 8c8aee76a..b7c61eb0c 100644
--- a/lib/compile.py
+++ b/lib/compile.py
@@ -238,7 +238,7 @@ def compile_json(json_file):
values["tags"] = value
elif key == "retriever_minimum_version":
- values["retriever_minimum_version"] = "\"" + valu... |
mkdocs__mkdocs-2359 | Update Lunr dependency to 0.5.9
Please consider updating Lunr to the latest version, [0.5.9](https://github.com/yeraydiazdiaz/lunr.py/releases/tag/0.5.9). This avoids the following error without he need to downgrade Lunr:
```python
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/pkg_res... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n\nwith open('README.md') as f:\n long_description = f.read()\n\n\ndef get_version(package):\n \"\"\"Return package version as listed in `__version__` in `init.py`.\"\"\"\n init_py = open(os.path.joi... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n\nwith open('README.md') as f:\n long_description = f.read()\n\n\ndef get_version(package):\n \"\"\"Return package version as listed in `__version__` in `init.py`.\"\"\"\n init_py = open(os.path.joi... | diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index aab9f0b414..160cda27fc 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -120,6 +120,8 @@ instance of the configuration is unique (#2289).
* Restore styling of tables in the `readthedocs` theme (#2028).
* Ensure `... |
arviz-devs__arviz-1552 | plot_posterior and plot_density give a mode outside of the hdi
## Short Description
I am plotting densities and I ask for a point estimate as 'mode'. The value of the mode is outside of the HDI.
## Code Example or link
az.plot_posterior(inference_data, point_estimate = 'mode', hdi_prob = 0.9, var_names = ('a',... | [
{
"content": "\"\"\"Utilities for plotting.\"\"\"\nimport importlib\nimport warnings\nfrom itertools import product, tee\nfrom typing import Any, Dict\n\nimport matplotlib as mpl\nimport numpy as np\nimport packaging\nimport xarray as xr\nfrom matplotlib.colors import to_hex\nfrom scipy.stats import mode, rankd... | [
{
"content": "\"\"\"Utilities for plotting.\"\"\"\nimport importlib\nimport warnings\nfrom itertools import product, tee\nfrom typing import Any, Dict\n\nimport matplotlib as mpl\nimport numpy as np\nimport packaging\nimport xarray as xr\nfrom matplotlib.colors import to_hex\nfrom scipy.stats import mode, rankd... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e8956ad4d6..a41456f2e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,15 +2,15 @@
## v0.x.x Unreleased
### New features
-* Added `to_zarr` method to InferenceData
-* Added `from_zarr` method to InferenceData
-* Added confidence interval band to auto-correlation plo... |
django-oscar__django-oscar-3145 | Upgrade django-phonenumber-field dependency
``django-oscar 2.0.1 has requirement django-phonenumber-field<2.1,>=2.0.``
django-oscar supports Django 2.2, but support for Django 2.2 did not land until django-phonenumber-field 2.3.0
| [
{
"content": "#!/usr/bin/env python\n\"\"\"\nInstallation script:\n\nTo release a new version to PyPi:\n- Ensure the version is correctly set in oscar.__init__.py\n- Run: make release\n\"\"\"\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_DIR = os.path.dirname(__file... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nInstallation script:\n\nTo release a new version to PyPi:\n- Ensure the version is correctly set in oscar.__init__.py\n- Run: make release\n\"\"\"\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_DIR = os.path.dirname(__file... | diff --git a/docs/source/releases/v2.1.rst b/docs/source/releases/v2.1.rst
index da6950b0a39..1481f82babe 100644
--- a/docs/source/releases/v2.1.rst
+++ b/docs/source/releases/v2.1.rst
@@ -34,7 +34,7 @@ Removal of deprecated features
Dependency changes
~~~~~~~~~~~~~~~~~~
-
+- Upgraded ``django-phonenumber-field`` t... |
canonical__microk8s-3055 | latest/edge: skip-verify flag not honoured as expected
```
❯ microk8s join 10.126.166.1:25000/25a8af1d57e5b04e558a929cce4c0ed3/6b2e92ea203f --skip-verify
Contacting cluster at 10.126.166.1
Joining cluster failed. Could not verify the identity of 10.126.166.1. Use '--skip-verify' to skip server certificate check.... | [
{
"content": "#!/usr/bin/python3\nimport base64\nimport random\nimport string\nimport subprocess\nimport os\nimport ssl\nimport sys\nimport time\nimport hashlib\nimport http\n\nimport click\nimport requests\nimport socket\nimport shutil\nimport urllib3\nimport yaml\nimport json\n\nfrom common.utils import (\n ... | [
{
"content": "#!/usr/bin/python3\nimport base64\nimport random\nimport string\nimport subprocess\nimport os\nimport ssl\nimport sys\nimport time\nimport hashlib\nimport http\n\nimport click\nimport requests\nimport socket\nimport shutil\nimport urllib3\nimport yaml\nimport json\n\nfrom common.utils import (\n ... | diff --git a/scripts/cluster/join.py b/scripts/cluster/join.py
index 16a8391b9c..930055e0c8 100755
--- a/scripts/cluster/join.py
+++ b/scripts/cluster/join.py
@@ -723,7 +723,9 @@ def join_dqlite(connection_parts, verify=False, worker=False):
fingerprint = None
if len(connection_parts) > 2:
fingerprin... |
hartwork__jawanndenn-225 | missing rapid-json dependency for pip
installing via pip3 does not also install the rapid-json dependency.
missing rapid-json dependency for pip
installing via pip3 does not also install the rapid-json dependency.
| [
{
"content": "#! /usr/bin/env python3\n# Copyright (C) 2016 Sebastian Pipping <sebastian@pipping.org>\n# Licensed under GNU Affero GPL v3 or later\n\nimport os\n\nfrom setuptools import find_packages, setup\n\nfrom jawanndenn.metadata import APP_NAME, VERSION_STR\n\n\ndef _read(filename):\n with open(filenam... | [
{
"content": "#! /usr/bin/env python3\n# Copyright (C) 2016 Sebastian Pipping <sebastian@pipping.org>\n# Licensed under GNU Affero GPL v3 or later\n\nimport os\n\nfrom setuptools import find_packages, setup\n\nfrom jawanndenn.metadata import APP_NAME, VERSION_STR\n\n\ndef _read(filename):\n with open(filenam... | diff --git a/setup.py b/setup.py
index d09bda7e..fe8270f9 100755
--- a/setup.py
+++ b/setup.py
@@ -52,6 +52,8 @@ def _collect_package_data(top_directory):
'djangorestframework>=3.11.0',
'gunicorn>=20.0.4',
'gunicorn-color>=0.1.0',
+ 'python-dateutil>=2.8.1',
+ ... |
MycroftAI__mycroft-core-1521 | skill config parameter could be more user friendly
Currently the skill config parameter is defaulted to `None` if the skill has no entry in the configuration. This makes configuration checks a bit more complicated than necessary since the skill creator always need to check that
```
if self.config is not None:
... | [
{
"content": "# Copyright 2017 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
{
"content": "# Copyright 2017 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | diff --git a/mycroft/skills/core.py b/mycroft/skills/core.py
index 2805d307476a..26a6b072101c 100644
--- a/mycroft/skills/core.py
+++ b/mycroft/skills/core.py
@@ -210,7 +210,7 @@ def __init__(self, name=None, emitter=None):
self.bind(emitter)
self.config_core = Configuration.get()
- self.conf... |
huggingface__accelerate-227 | Should `get_linear_schedule_with_warmup` consider `gradient_accumulation_steps`?
I think `num_training_steps` should be `len(train_dataloader) * num_epochs // gradient_accumulation_steps`
| [
{
"content": "# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. 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/li... | [
{
"content": "# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. 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/li... | diff --git a/examples/nlp_example.py b/examples/nlp_example.py
index aad2b8b6560..a1f310271ce 100644
--- a/examples/nlp_example.py
+++ b/examples/nlp_example.py
@@ -125,7 +125,7 @@ def collate_fn(examples):
lr_scheduler = get_linear_schedule_with_warmup(
optimizer=optimizer,
num_warmup_steps=100,... |
kivy__kivy-8274 | ScrollView and RecycleView difference
Hello, could you put a disclaimer on the page with ScrollView that it is not optimized for big data and point to RecycleView (**I spent about 10 hours to figure out why my application in .apk had 4 fps**)
I hope this helps someone
| [
{
"content": "'''\nScrollView\n==========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n\nScrolling Behavior\n------------------\n\nThe ScrollView accepts only one child and applies a viewport/window to\... | [
{
"content": "'''\nScrollView\n==========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n.. note::\n Use :class:`~kivy.uix.recycleview.RecycleView` for generating large\n numbers of widgets in order... | diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py
index efd8572df1..bb37c9ff7a 100644
--- a/kivy/uix/scrollview.py
+++ b/kivy/uix/scrollview.py
@@ -7,6 +7,10 @@
The :class:`ScrollView` widget provides a scrollable/pannable viewport that is
clipped at the scrollview's bounding box.
+.. note::
+ Use :cl... |
django-cms__django-cms-1970 | add template field back to advanced settings
add template field back to advanced settings
add template field back to advanced settings
| [
{
"content": "# -*- coding: utf-8 -*-\nimport sys\nfrom cms.apphook_pool import apphook_pool\nfrom cms.forms.widgets import UserSelectAdminWidget\nfrom cms.models import Page, PagePermission, PageUser, ACCESS_PAGE, PageUserGroup, titlemodels, Title\nfrom cms.utils.conf import get_cms_setting\nfrom cms.utils.i18... | [
{
"content": "# -*- coding: utf-8 -*-\nimport sys\nfrom cms.apphook_pool import apphook_pool\nfrom cms.forms.widgets import UserSelectAdminWidget\nfrom cms.models import Page, PagePermission, PageUser, ACCESS_PAGE, PageUserGroup, titlemodels, Title\nfrom cms.utils.conf import get_cms_setting\nfrom cms.utils.i18... | diff --git a/cms/admin/forms.py b/cms/admin/forms.py
index 30f8d657fc7..69d52860ed4 100644
--- a/cms/admin/forms.py
+++ b/cms/admin/forms.py
@@ -217,7 +217,7 @@ def clean_overwrite_url(self):
class Meta:
model = Page
fields = [
- 'site', 'reverse_id', 'overwrite_url', 'redirect', 'soft... |
gratipay__gratipay.com-2503 | New tip created by orphaned account
[_check_orphans_no_tips](https://github.com/gittip/www.gittip.com/blob/7890451ac2c86f2eee647a446f706d891cb8961f/gittip/models/__init__.py#L114) now finds two problems instead of just the one already known. See also [sentry](https://app.getsentry.com/gittip/gittip/group/14299085/).
I... | [
{
"content": "\"\"\"*Participant* is the name Gittip gives to people and groups that are known\nto Gittip. We've got a ``participants`` table in the database, and a\n:py:class:`Participant` class that we define here. We distinguish several kinds\nof participant, based on certain properties.\n\n - *Stub* partici... | [
{
"content": "\"\"\"*Participant* is the name Gittip gives to people and groups that are known\nto Gittip. We've got a ``participants`` table in the database, and a\n:py:class:`Participant` class that we define here. We distinguish several kinds\nof participant, based on certain properties.\n\n - *Stub* partici... | diff --git a/gittip/models/participant.py b/gittip/models/participant.py
index 440f7a23de..f29e6870d6 100644
--- a/gittip/models/participant.py
+++ b/gittip/models/participant.py
@@ -643,6 +643,8 @@ def set_tip_to(self, tippee, amount, update_self=True, update_tippee=True, curso
that as part of our conversion ... |
nautobot__nautobot-3717 | 2.0: AttributeError on editing user through admin
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please start a
discussion instead: h... | [
{
"content": "from django import forms\nfrom django.contrib import admin\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.admin import UserAdmin as UserAdmin_\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exce... | [
{
"content": "from django import forms\nfrom django.contrib import admin\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.admin import UserAdmin as UserAdmin_\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exce... | diff --git a/changes/3716.fixed b/changes/3716.fixed
new file mode 100644
index 00000000000..ed302370146
--- /dev/null
+++ b/changes/3716.fixed
@@ -0,0 +1 @@
+Fixed an error when attempting to edit a user via the Nautobot admin UI.
diff --git a/nautobot/users/admin.py b/nautobot/users/admin.py
index cedd39ec437..ccaa55... |
pyjanitor-devs__pyjanitor-337 | [DOC] Remove example.py in examples directory
The code in the example.py file currently reads some data frame from a file called 'dirty_data.xls'.
We can change this to include a concrete example.
| [
{
"content": "import pandas as pd\n\nimport janitor as jn\n\ndf = (\n pd.read_excel(\"dirty_data.xlsx\")\n .clean_names()\n .remove_empty()\n .rename_column(\"%_allocated\", \"percent_allocated\")\n .rename_column(\"full_time_\", \"full_time\")\n .coalesce([\"certification\", \"certification_1... | [
{
"content": null,
"path": "examples/example.py"
}
] | diff --git a/examples/example.py b/examples/example.py
deleted file mode 100644
index dc9562349..000000000
--- a/examples/example.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import pandas as pd
-
-import janitor as jn
-
-df = (
- pd.read_excel("dirty_data.xlsx")
- .clean_names()
- .remove_empty()
- .rename_column("%... |
hylang__hy-2190 | Add `project_urls` to `setup.py`
This would allow us to provide links to our GitHub repository etc. in a sidebar on PyPI.
| [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import find_packages, setup\nimport fastentrypoints # Monkey-patches setuptools.\n\nfrom get_version import __version__\n\nos.chdir(os.path.split(os.path.abspath(__file__))[0])\n\nPKG = \"hy\"\n\nlong_description = \"\"\"Hy is a Python <--> Lisp layer. It... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import find_packages, setup\nimport fastentrypoints # Monkey-patches setuptools.\n\nfrom get_version import __version__\n\nos.chdir(os.path.split(os.path.abspath(__file__))[0])\n\nPKG = \"hy\"\n\nlong_description = \"\"\"Hy is a Python <--> Lisp layer. It... | diff --git a/setup.py b/setup.py
index 23584b92b..4eb0ef084 100755
--- a/setup.py
+++ b/setup.py
@@ -66,5 +66,9 @@
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Libraries",
- ]
+ ],
+ project_urls={... |
dmlc__gluon-nlp-678 | clip_grad_global_norm doc needs notice on usage (was: clip_grad_global_norm produces problematic results)
I tried to use mulitple gpus to train the language model (e.g., AWD-LSTM), but the behaviour is not expected. I paste the training logs in the first 2 epochs as follows. I set hyper-parameters `alpha` and `beta` to... | [
{
"content": "# coding: utf-8\n\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,... | [
{
"content": "# coding: utf-8\n\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,... | diff --git a/src/gluonnlp/utils/parameter.py b/src/gluonnlp/utils/parameter.py
index a3b717b968..c7f0eb7a85 100644
--- a/src/gluonnlp/utils/parameter.py
+++ b/src/gluonnlp/utils/parameter.py
@@ -34,6 +34,9 @@ def clip_grad_global_norm(parameters, max_norm, check_isfinite=True):
.. note::
This function i... |
e-valuation__EvaP-648 | Allow to exclude courses from grader view
It should be possible to exclude courses from the semester overview on the grading page.
Single results should never be listed on the page and there should be a new attribute for each course defining whether the course is shown for graders or not.
This must also include a symbo... | [
{
"content": "from django.shortcuts import get_object_or_404, render, redirect\nfrom django.db.models import Prefetch\nfrom django.contrib import messages\nfrom django.utils.translation import ugettext as _\nfrom django.http import HttpResponseBadRequest, HttpResponseForbidden\n\nfrom sendfile import sendfile\n... | [
{
"content": "from django.shortcuts import get_object_or_404, render, redirect\nfrom django.db.models import Prefetch\nfrom django.contrib import messages\nfrom django.utils.translation import ugettext as _\nfrom django.http import HttpResponseBadRequest, HttpResponseForbidden\n\nfrom sendfile import sendfile\n... | diff --git a/evap/grades/templates/grades_semester_view.html b/evap/grades/templates/grades_semester_view.html
index 77ed9b36db..eb705ebc55 100644
--- a/evap/grades/templates/grades_semester_view.html
+++ b/evap/grades/templates/grades_semester_view.html
@@ -41,7 +41,6 @@ <h3 class="panel-title">{% trans "Courses" %}</... |
nipy__nipype-2841 | Nilearn 0.5.0 breaks tests
### Summary
The latest release of nilearn broke master.
| [
{
"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\n\n# nipype version information\n# Remove -dev for release\n__v... | [
{
"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\n\n# nipype version information\n# Remove -dev for release\n__v... | diff --git a/nipype/info.py b/nipype/info.py
index 1cedaa94f4..0e7fd0f70b 100644
--- a/nipype/info.py
+++ b/nipype/info.py
@@ -175,7 +175,7 @@ def get_nipype_gitversion():
"sphinxcontrib-napoleon",
],
"duecredit": ["duecredit"],
- "nipy": ["nitime", "nilearn<0.5.0", "dipy", "nipy", "matplotlib"],
... |
googleapis__google-cloud-python-2537 | `from_service_account_json` throws error
Currently, I'm getting the following error while using gcloud in a python 3.4.3 virtualenv:
```
Traceback (most recent call last):
File "/usr/lib/python3.4/configparser.py", line 762, in get
value = d[option]
File "/var/lib/jenkins/workspace/d-files-with-client-library-... | [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/core/google/cloud/_helpers.py b/core/google/cloud/_helpers.py
index 64e2e7b9fc1e..0b515cc5ce9d 100644
--- a/core/google/cloud/_helpers.py
+++ b/core/google/cloud/_helpers.py
@@ -240,7 +240,10 @@ def _default_service_project_id():
config.read(search_paths)
if config.has_section(_GCLOUD_CONFIG_SE... |
pwr-Solaar__Solaar-546 | DPI and smart shift values are not stored in the config file (MX Master 2s)
I've set the DPI and the Smart Shift values but when you close solaar and then check `~/.config/solaar/config.json` the values are not written to the config file.
Version: 1.0.1
https://build.opensuse.org/request/show/719864 (I've updated t... | [
{
"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/logitech_receiver/settings.py b/lib/logitech_receiver/settings.py
index df91ccc7fc..ff9f7f9d20 100644
--- a/lib/logitech_receiver/settings.py
+++ b/lib/logitech_receiver/settings.py
@@ -356,6 +356,8 @@ def prepare_write(self, new_value, current_value=None):
else:
if isinstance(new_value, int):
... |
mozilla__bugbug-3718 | MEI: Shift indicator from ratio to % and remove the artificial +1 from the division
Based on [this doc](https://docs.google.com/document/d/1nWP3DtSWneYT8ietXuBa6uPszMKMgICXf3b2dwMVXYk/edit#heading=h.9joq5dbpnw41).
```
If WeighedOpenedDefects(TimeInterval) > 0:
ME% := (WeighedClosedDefects(TimeInterval) * 100%)... | [
{
"content": "# -*- coding: utf-8 -*-\n# 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 file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport collections\nimport csv\nimport re\nfrom datetime import datet... | [
{
"content": "# -*- coding: utf-8 -*-\n# 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 file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport collections\nimport csv\nimport re\nfrom datetime import datet... | diff --git a/bugbug/bugzilla.py b/bugbug/bugzilla.py
index 82bf23457c..2fc49c4e2d 100644
--- a/bugbug/bugzilla.py
+++ b/bugbug/bugzilla.py
@@ -514,4 +514,9 @@ def calculate_maintenance_effectiveness_indicator(
print("After applying weights:")
print(data)
- return (1 + sum(data["closed"].values())) / (1 +... |
twisted__twisted-452 | flattenEvent() fails with "'ascii' codec can't encode character" in Python 2.7
|[<img alt="znerol's avatar" src="https://avatars.githubusercontent.com/u/23288?s=50" width="50" height="50">](https://github.com/znerol)| @znerol reported|
|-|-|
|Trac ID|trac#8699|
|Type|defect|
|Created|2016-07-28 05:59:35Z|
backtrace en... | [
{
"content": "# -*- test-case-name: twisted.logger.test.test_flatten -*-\n# Copyright (c) Twisted Matrix Laboratories.\n# See LICENSE for details.\n\n\"\"\"\nCode related to \"flattening\" events; that is, extracting a description of all\nrelevant fields from the format string and persisting them for later\nexa... | [
{
"content": "# -*- test-case-name: twisted.logger.test.test_flatten -*-\n# Copyright (c) Twisted Matrix Laboratories.\n# See LICENSE for details.\n\n\"\"\"\nCode related to \"flattening\" events; that is, extracting a description of all\nrelevant fields from the format string and persisting them for later\nexa... | diff --git a/twisted/logger/_flatten.py b/twisted/logger/_flatten.py
index 0f4597dd399..bb7ef8c1e22 100644
--- a/twisted/logger/_flatten.py
+++ b/twisted/logger/_flatten.py
@@ -111,7 +111,7 @@ def flattenEvent(event):
if conversion == "r":
conversionFunction = repr
else: # Above: if conv... |
ray-project__ray-10443 | [rllib] _get_torch_exploration_action doesn't support tuple action dist
<!--Please include [tune], [rllib], [autoscaler] etc. in the issue title if relevant-->
### System information
* **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Mac OS 10.15.4
* **Ray installed from (source or binary)**: binary ... | [
{
"content": "import tree\nfrom typing import Union\n\nfrom ray.rllib.models.action_dist import ActionDistribution\nfrom ray.rllib.models.modelv2 import ModelV2\nfrom ray.rllib.utils.annotations import override\nfrom ray.rllib.utils.exploration.exploration import Exploration\nfrom ray.rllib.utils.framework impo... | [
{
"content": "import tree\nfrom typing import Union\n\nfrom ray.rllib.models.action_dist import ActionDistribution\nfrom ray.rllib.models.modelv2 import ModelV2\nfrom ray.rllib.utils.annotations import override\nfrom ray.rllib.utils.exploration.exploration import Exploration\nfrom ray.rllib.utils.framework impo... | diff --git a/rllib/utils/exploration/stochastic_sampling.py b/rllib/utils/exploration/stochastic_sampling.py
index 8d188a73586e6..9ec27bd68bd1f 100644
--- a/rllib/utils/exploration/stochastic_sampling.py
+++ b/rllib/utils/exploration/stochastic_sampling.py
@@ -72,5 +72,5 @@ def _get_torch_exploration_action(action_dist... |
xonsh__xonsh-428 | Can't type literal tab with prompt_toolkit
In bash or zsh I would typically type `Ctl-V TAB` to insert a literal tab, however, when using prompt_tookitas my shell type this simply tries to do tab completion and there doesn't seem to be a way to create a literal tab.
| [
{
"content": "\"\"\"Key bindings for prompt_toolkit xonsh shell.\"\"\"\nimport builtins\n\nfrom prompt_toolkit.filters import Filter\nfrom prompt_toolkit.keys import Keys\n\n\nclass TabShouldInsertIndentFilter(Filter):\n \"\"\"\n Filter that is intended to check if <Tab> should insert indent instead of\n ... | [
{
"content": "\"\"\"Key bindings for prompt_toolkit xonsh shell.\"\"\"\nimport builtins\n\nfrom prompt_toolkit.filters import Filter\nfrom prompt_toolkit.keys import Keys\n\n\nclass TabShouldInsertIndentFilter(Filter):\n \"\"\"\n Filter that is intended to check if <Tab> should insert indent instead of\n ... | diff --git a/xonsh/prompt_toolkit_key_bindings.py b/xonsh/prompt_toolkit_key_bindings.py
index 7d132b6fdd..dcc0620fa0 100644
--- a/xonsh/prompt_toolkit_key_bindings.py
+++ b/xonsh/prompt_toolkit_key_bindings.py
@@ -32,3 +32,11 @@ def _(event):
indent instead of autocompleting.
"""
event.cli.c... |
scikit-image__scikit-image-6007 | installation issues with setuptools 58.5.x
## Description
I observed some failures on CI in a recent PR that appear to be related to use of setuptools >= 58.5.0. Example: https://github.com/scikit-image/scikit-image/runs/4104921276?check_suite_focus=true
I was able to reproduce the issue locally with 58.5.0, but ... | [
{
"content": "#! /usr/bin/env python\n\nimport os\nimport sys\nimport tempfile\nimport shutil\nimport builtins\nimport textwrap\n\nimport setuptools\nfrom distutils.command.build_py import build_py\nfrom distutils.command.sdist import sdist\nfrom distutils.errors import CompileError, LinkError\nfrom numpy.distu... | [
{
"content": "#! /usr/bin/env python\n\nimport os\nimport sys\nimport tempfile\nimport shutil\nimport builtins\nimport textwrap\n\nimport setuptools\nfrom setuptools.command.build_py import build_py\nfrom setuptools.command.sdist import sdist\nfrom distutils.errors import CompileError, LinkError\nfrom numpy.dis... | diff --git a/setup.py b/setup.py
index 9672d833bd9..d39444d892e 100755
--- a/setup.py
+++ b/setup.py
@@ -8,8 +8,8 @@
import textwrap
import setuptools
-from distutils.command.build_py import build_py
-from distutils.command.sdist import sdist
+from setuptools.command.build_py import build_py
+from setuptools.comman... |
conda__conda-build-937 | conda-build no longer prints upload instructions
At the end of `conda build`, the user typically sees a helpful message explaining how to upload the package, like this:
```
# If you want to upload this package to anaconda.org later, type:
#
# $ anaconda upload /miniconda/conda-bld/osx-64/my-package-1.0-0.tar.bz2
#
# T... | [
{
"content": "# (c) Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport ... | [
{
"content": "# (c) Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport ... | diff --git a/conda_build/main_build.py b/conda_build/main_build.py
index 93d55e8566..1d1b51afd8 100644
--- a/conda_build/main_build.py
+++ b/conda_build/main_build.py
@@ -338,8 +338,8 @@ def execute(args, parser):
if need_cleanup:
shutil.rmtree(recipe_dir)
- if args.binstar_upload:
- ... |
vllm-project__vllm-193 | ValueError: The precision of the fractional quantity of resource
## Description
I tried the demo code, but got an error like this:
```
File "/opt/miniconda3/lib/python3.8/site-packages/vllm/entrypoints/llm.py", line 55, in __init__
self.llm_engine = LLMEngine.from_engine_args(engine_args)
File "/opt/mi... | [
{
"content": "import time\nfrom typing import Any, List, Optional\n\nfrom vllm.config import (CacheConfig, ModelConfig, ParallelConfig,\n SchedulerConfig)\nfrom vllm.core.scheduler import Scheduler\nfrom vllm.engine.arg_utils import EngineArgs\nfrom vllm.engine.ray_utils import DeviceID,... | [
{
"content": "import time\nfrom typing import Any, List, Optional\n\nfrom vllm.config import (CacheConfig, ModelConfig, ParallelConfig,\n SchedulerConfig)\nfrom vllm.core.scheduler import Scheduler\nfrom vllm.engine.arg_utils import EngineArgs\nfrom vllm.engine.ray_utils import DeviceID,... | diff --git a/vllm/engine/llm_engine.py b/vllm/engine/llm_engine.py
index 94c835b786d..3668dd7ee37 100644
--- a/vllm/engine/llm_engine.py
+++ b/vllm/engine/llm_engine.py
@@ -87,7 +87,7 @@ def __init__(
worker_cls = ray.remote(
num_cpus=0,
num_gpus=1,
- ... |
python-discord__bot-733 | Write unit tests for `bot/rules/newlines.py`
Write unit tests for [`bot/rules/newlines.py`](../blob/master/bot/rules/newlines.py).
## Implementation details
Please make sure to read the general information in the [meta issue](553) and the [testing README](../blob/master/tests/README.md). We are aiming for a 100% [bran... | [
{
"content": "from typing import Dict, Iterable, List, Optional, Tuple\n\nfrom discord import Member, Message\n\n\nasync def apply(\n last_message: Message, recent_messages: List[Message], config: Dict[str, int]\n) -> Optional[Tuple[str, Iterable[Member], Iterable[Message]]]:\n \"\"\"Detects total attachm... | [
{
"content": "from typing import Dict, Iterable, List, Optional, Tuple\n\nfrom discord import Member, Message\n\n\nasync def apply(\n last_message: Message, recent_messages: List[Message], config: Dict[str, int]\n) -> Optional[Tuple[str, Iterable[Member], Iterable[Message]]]:\n \"\"\"Detects total attachm... | diff --git a/bot/rules/attachments.py b/bot/rules/attachments.py
index 00bb2a9493..8903c385cb 100644
--- a/bot/rules/attachments.py
+++ b/bot/rules/attachments.py
@@ -19,7 +19,7 @@ async def apply(
if total_recent_attachments > config['max']:
return (
- f"sent {total_recent_attachments} attac... |
ray-project__ray-6475 | Inconsistency in Diagonal Gaussian between log probability and entropy
In the DiagonalGaussian action distribution the logp is calculated like so:
` return (-0.5 * tf.reduce_sum(
tf.square((x - self.mean) / self.std), reduction_indices=[1]) -
0.5 * np.log(2.0 * np.pi) * tf.to_flo... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\n\nfrom ray.rllib.models.action_dist import ActionDistribution\nfrom ray.rllib.policy.policy import TupleActions\nfrom ray.rllib.utils.annotations import override, D... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\n\nfrom ray.rllib.models.action_dist import ActionDistribution\nfrom ray.rllib.policy.policy import TupleActions\nfrom ray.rllib.utils.annotations import override, D... | diff --git a/rllib/models/tf/tf_action_dist.py b/rllib/models/tf/tf_action_dist.py
index 9474d278543cd..27b171c6c0252 100644
--- a/rllib/models/tf/tf_action_dist.py
+++ b/rllib/models/tf/tf_action_dist.py
@@ -166,7 +166,7 @@ def kl(self, other):
@override(ActionDistribution)
def entropy(self):
return... |
huggingface__text-generation-inference-851 | Watermarking bug
### System Info
using singularity with the container `text-generation-inference:1.0.0` .
i get this error:
```
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/flash_causal_lm.py", line 727, in warmup
_, batch = self.generate_... | [
{
"content": "# coding=utf-8\n# Copyright 2023 Authors of \"A Watermark for Large Language Models\"\n# available at https://arxiv.org/abs/2301.10226\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 cop... | [
{
"content": "# coding=utf-8\n# Copyright 2023 Authors of \"A Watermark for Large Language Models\"\n# available at https://arxiv.org/abs/2301.10226\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 cop... | diff --git a/server/text_generation_server/utils/watermark.py b/server/text_generation_server/utils/watermark.py
index df7b90e399e..5d8f531234f 100644
--- a/server/text_generation_server/utils/watermark.py
+++ b/server/text_generation_server/utils/watermark.py
@@ -19,8 +19,8 @@
from transformers import LogitsProcessor... |
translate__pootle-6745 | Init from templates doesnt create directories correctly
### Steps to reproduce:
- create a new project which has subdirectories
- load templates from fs
- init a new tp from admin ui
### Results (Expected/Actual):
- new dirs/stores are created, but the dirs dont have the correct link to their tp
### Envir... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport logging... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport logging... | diff --git a/pootle/apps/pootle_translationproject/models.py b/pootle/apps/pootle_translationproject/models.py
index 4533c32e709..05e75cca0ab 100644
--- a/pootle/apps/pootle_translationproject/models.py
+++ b/pootle/apps/pootle_translationproject/models.py
@@ -238,6 +238,7 @@ def create_parent_dirs(self, pootle_path):
... |
localstack__localstack-4502 | bug: Error tagging kinesis stream (invalid characters) after upgrade to 0.12.16
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
This worked using version 0.12.13. No configuration changes were made other than bumping the image version to 0.12.16, and the ... | [
{
"content": "#!/usr/bin/env python\nimport glob\nimport logging\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport time\nfrom pathlib import Path\n\nimport requests\n\nfrom localstack import config\nfrom localstack.config import KINESIS_PROVIDER, is_env_true\nfrom locals... | [
{
"content": "#!/usr/bin/env python\nimport glob\nimport logging\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport time\nfrom pathlib import Path\n\nimport requests\n\nfrom localstack import config\nfrom localstack.config import KINESIS_PROVIDER, is_env_true\nfrom locals... | diff --git a/localstack/services/install.py b/localstack/services/install.py
index 19130bfb546f0..79c0ba835f70b 100644
--- a/localstack/services/install.py
+++ b/localstack/services/install.py
@@ -89,7 +89,7 @@
)
# kinesis-mock version
-KINESIS_MOCK_VERSION = os.environ.get("KINESIS_MOCK_VERSION") or "0.1.8"
+KINES... |
localstack__localstack-4573 | bug: kinesis register-stream-consumer returns error StreamARN not found
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
I cannot register a consumer using `register-stream-consumer`.
### Expected Behavior
I should be able to register a stream consumer without... | [
{
"content": "#!/usr/bin/env python\nimport glob\nimport logging\nimport os\nimport platform\nimport re\nimport shutil\nimport stat\nimport sys\nimport tempfile\nimport time\nimport zipfile\nfrom pathlib import Path\n\nimport requests\n\nfrom localstack import config\nfrom localstack.config import is_env_true\n... | [
{
"content": "#!/usr/bin/env python\nimport glob\nimport logging\nimport os\nimport platform\nimport re\nimport shutil\nimport stat\nimport sys\nimport tempfile\nimport time\nimport zipfile\nfrom pathlib import Path\n\nimport requests\n\nfrom localstack import config\nfrom localstack.config import is_env_true\n... | diff --git a/README.md b/README.md
index 7b0c057195c14..246095bd753da 100644
--- a/README.md
+++ b/README.md
@@ -263,7 +263,7 @@ SERVICES=kinesis,lambda,sqs,dynamodb DEBUG=1 localstack start
inject `ProvisionedThroughputExceededException` errors into Kinesis API responses.
* `KINESIS_SHARD_LIMIT`: Integer value (de... |
spack__spack-1961 | `spack uninstall -f` is broken
@alalazo It looks like PR #670 might have broken "spack uninstall -f". Can you please look into it?
```
[me@ankeli icebin]$ spack uninstall -f openblas
==> The following packages will be uninstalled :
==> Do you want to proceed ? [y/n]
y
[me@ankeli icebin]$ ls /home/rpfische/spack/o... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index 8957d1c908d596..e42c5776b5b799 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -99,7 +99,7 @@ def concretize_specs(specs, allow_multiple_matches=False, force=False):
has_errors = T... |
pyinstaller__pyinstaller-6763 | PyInstaller docs wrong links to issues in Change Log
https://pyinstaller.org/en/v5.0/CHANGES.html
On this page, the github issues link are wrongly set as `https://github.com/%7Bgroup%7D/%7Bproject%7D/issues/#6089` instead of `https://github.com/pyinstaller/pyinstaller/issues/6089`.
| [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# PyInstaller documentation build configuration file, created by\n# sphinx-quickstart on Sun Mar 27 16:53:34 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configurat... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# PyInstaller documentation build configuration file, created by\n# sphinx-quickstart on Sun Mar 27 16:53:34 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configurat... | diff --git a/doc/CHANGES-3.rst b/doc/CHANGES-3.rst
index 8c4506420c..b2aa547c61 100644
--- a/doc/CHANGES-3.rst
+++ b/doc/CHANGES-3.rst
@@ -27,98 +27,98 @@ Features
* (Windows): Applications built in windowed mode have their debug messages
sent to any attached debugger or DebugView instead of message boxes.
- (:i... |
searx__searx-2454 | Input turns language to Chinese
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
**Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx**
0.17.0-17b48ff6e858b0c74116068cf6444bd578bbb747
<!-- If you are running on master branch using git exec... | [
{
"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/query.py b/searx/query.py
index e61e24f2c4..38cb03ffea 100644
--- a/searx/query.py
+++ b/searx/query.py
@@ -77,7 +77,7 @@ def _parse_query(self):
pass
# this force a language
- if query_part[0] == ':':
+ if query_part[0] == ':' and len(query_p... |
Mailu__Mailu-684 | 'User' object has no attribute 'self'
I've been getting the following error recently for emails that are sent to forwarded addresses:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/us... | [
{
"content": "from mailu import app, db, dkim, login_manager\n\nfrom sqlalchemy.ext import declarative\nfrom passlib import context, hash\nfrom datetime import datetime, date\nfrom email.mime import text\n\nimport sqlalchemy\nimport re\nimport time\nimport os\nimport glob\nimport smtplib\nimport idna\nimport dn... | [
{
"content": "from mailu import app, db, dkim, login_manager\n\nfrom sqlalchemy.ext import declarative\nfrom passlib import context, hash\nfrom datetime import datetime, date\nfrom email.mime import text\n\nimport sqlalchemy\nimport re\nimport time\nimport os\nimport glob\nimport smtplib\nimport idna\nimport dn... | diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py
index 3653011fa..62c25c811 100644
--- a/core/admin/mailu/models.py
+++ b/core/admin/mailu/models.py
@@ -271,7 +271,7 @@ def get_id(self):
@property
def destination(self):
if self.forward_enabled:
- result = self.self.forw... |
pypa__setuptools-3321 | [BUG] namespace_packages deprecation warning: TypeError: expected string or bytes-like object
### setuptools version
62.3.0
### Python version
3.10
### OS
macOS
### Additional environment information
_No response_
### Description
Calling the `setup` function of a package using the `namespace_packages` paramete... | [
{
"content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nimport distutils.command\nfrom distutils.util import strtobool\nfrom distut... | [
{
"content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nimport distutils.command\nfrom distutils.util import strtobool\nfrom distut... | diff --git a/setuptools/dist.py b/setuptools/dist.py
index 37021ac7a1..c1ad30080b 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -282,7 +282,7 @@ def check_nsp(dist, attr, value):
)
msg = (
"The namespace_packages parameter is deprecated, "
- "consider using im... |
conan-io__conan-center-index-352 | [spdlog] spdlog/1.4.2: header_only=True is broken.
This configuration was never tested for 1.4.2, neither here nor in the previous bincrafters edition.
1. (This is the error seen in the attached log.) Not an expert on how conandata.yml trick-shots work, but I think on conanfile.py:77 `tools.patch(tools.get(**self.co... | [
{
"content": "import os\nfrom conans import CMake, ConanFile, tools\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass SpdlogConan(ConanFile):\n name = \"spdlog\"\n description = \"Fast C++ logging library\"\n url = \"https://github.com/conan-io/conan-center-index\"\n homepage = \"https... | [
{
"content": "import os\nfrom conans import CMake, ConanFile, tools\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass SpdlogConan(ConanFile):\n name = \"spdlog\"\n description = \"Fast C++ logging library\"\n url = \"https://github.com/conan-io/conan-center-index\"\n homepage = \"https... | diff --git a/recipes/spdlog/1.4.x/conandata.yml b/recipes/spdlog/1.4.x/conandata.yml
index ad6de0c0dce7f..7366c7b9e213d 100644
--- a/recipes/spdlog/1.4.x/conandata.yml
+++ b/recipes/spdlog/1.4.x/conandata.yml
@@ -4,5 +4,5 @@ sources:
url: https://github.com/gabime/spdlog/archive/v1.4.2.tar.gz
patches:
"1.4.2":... |
googleapis__python-bigquery-1682 | `AccessEntry` incorrectly parsed from API Representation
Thanks for stopping by to let us know something could be better!
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a tim... | [
{
"content": "# Copyright 2015 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2015 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/google/cloud/bigquery/dataset.py b/google/cloud/bigquery/dataset.py
index b7fed61c7..0f1a0f3cc 100644
--- a/google/cloud/bigquery/dataset.py
+++ b/google/cloud/bigquery/dataset.py
@@ -501,9 +501,7 @@ def from_api_repr(cls, resource: dict) -> "AccessEntry":
if len(entry) != 0:
raise Va... |
matrix-org__synapse-4305 | synapse_admin_mau:current metric is not updated when not limiting usage
It's just a constant reading of zero.
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\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.or... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\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.or... | diff --git a/changelog.d/4305.bugfix b/changelog.d/4305.bugfix
new file mode 100644
index 000000000000..499fb8207766
--- /dev/null
+++ b/changelog.d/4305.bugfix
@@ -0,0 +1 @@
+The metric synapse_admin_mau:current previously did not update when config.mau_stats_only was set to True
diff --git a/synapse/app/homeserver.py... |
CTFd__CTFd-2371 | Test Translations & Support Spanish
We need to test translations before release and make sure we support Spanish
| [
{
"content": "from CTFd.constants import RawEnum\n\n\nclass Languages(str, RawEnum):\n ENGLISH = \"en\"\n GERMAN = \"de\"\n POLISH = \"pl\"\n\n\nLANGUAGE_NAMES = {\n \"en\": \"English\",\n \"de\": \"Deutsch\",\n \"pl\": \"Polski\",\n}\n\nSELECT_LANGUAGE_LIST = [(\"\", \"\")] + [\n (str(lang... | [
{
"content": "from CTFd.constants import RawEnum\n\n\nclass Languages(str, RawEnum):\n ENGLISH = \"en\"\n GERMAN = \"de\"\n POLISH = \"pl\"\n SPANISH = \"es\"\n CHINESE = \"zh\"\n\n\nLANGUAGE_NAMES = {\n \"en\": \"English\",\n \"de\": \"Deutsch\",\n \"pl\": \"Polski\",\n \"es\": \"Esp... | diff --git a/.gitignore b/.gitignore
index cbe21c30d..2ccc42bfa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,7 +44,8 @@ nosetests.xml
coverage.xml
# Translations
-*.mo
+# TODO: CTFd 4.0 We should consider generating .mo files in a Docker image instead of saving them in git
+# *.mo
# Django stuff:
*.log
diff ... |
Flexget__Flexget-1526 | archives plugin crashes when encountering a directory
### Expected behaviour:
Plugin should correctly reject directories
### Actual behaviour:
Crash!
### Steps to reproduce:
- Pass a directory entry to the archive plugin
#### Config:
```
paste relevant config
use paste service if config is too long
```
... | [
{
"content": "\"\"\"\nUtilities for handling RAR and ZIP archives\n\nProvides wrapper archive and exception classes to simplify\narchive extraction\n\"\"\"\nfrom __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\n\nimpo... | [
{
"content": "\"\"\"\nUtilities for handling RAR and ZIP archives\n\nProvides wrapper archive and exception classes to simplify\narchive extraction\n\"\"\"\nfrom __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\n\nimpo... | diff --git a/flexget/utils/archive.py b/flexget/utils/archive.py
index 370a1ec04e..802ca758a0 100644
--- a/flexget/utils/archive.py
+++ b/flexget/utils/archive.py
@@ -208,8 +208,7 @@ def is_archive(path):
if archive:
archive.close()
return True
- except ArchiveError as error:
- ... |
encode__django-rest-framework-5348 | Unrelated assert error message when there is an error in get_queryset
In a view, I have define a `get_queryset` method in a `APIView` derived class. For some (not important) reasons, I have made a mistake in my code, but the error message I get is unrelated to the actual mistake: it is an `AssertError`, complaining the... | [
{
"content": "\"\"\"\nProvides a set of pluggable permission policies.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.http import Http404\n\nfrom rest_framework import exceptions\nfrom rest_framework.compat import is_authenticated\n\nSAFE_METHODS = ('GET', 'HEAD', 'OPTIONS')\n\n\nclass BasePerm... | [
{
"content": "\"\"\"\nProvides a set of pluggable permission policies.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.http import Http404\n\nfrom rest_framework import exceptions\nfrom rest_framework.compat import is_authenticated\n\nSAFE_METHODS = ('GET', 'HEAD', 'OPTIONS')\n\n\nclass BasePerm... | diff --git a/rest_framework/permissions.py b/rest_framework/permissions.py
index f247752782..57de3a35cb 100644
--- a/rest_framework/permissions.py
+++ b/rest_framework/permissions.py
@@ -122,6 +122,9 @@ def has_permission(self, request, view):
if hasattr(view, 'get_queryset'):
queryset = view.ge... |
scikit-image__scikit-image-2784 | Deprecate and remove `skimage.novice`
`skimage.novice` was built by and for Software Carpentry. I've recently learned that it is no longer being used, so I don't see much use for it remaining in the package.
If someone feels excited about turning it into a new package, please do so.
| [
{
"content": "\"\"\"\nskimage.novice\n==============\nA special Python image submodule for beginners.\n\nDescription\n-----------\n``skimage.novice`` provides a simple image manipulation interface for\nbeginners. It allows for easy loading, manipulating, and saving of image\nfiles.\n\nThis module is primarily ... | [
{
"content": "\"\"\"\nskimage.novice\n==============\nA special Python image submodule for beginners.\n\nDescription\n-----------\n``skimage.novice`` provides a simple image manipulation interface for\nbeginners. It allows for easy loading, manipulating, and saving of image\nfiles.\n\nThis module is primarily ... | diff --git a/TODO.txt b/TODO.txt
index 7379e2eaef0..aff1aa78bb4 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -38,3 +38,4 @@ Version 0.16
in ``skimage.transform.tests.test_pyramids.py`` and
``skimage.transform.tests.test_warps.py``.
* Remove deprecated argument ``visualise`` from function skimage.feature.hog
+* Remove... |
ibis-project__ibis-4167 | feat(sqlalchemy): allow non-primitive arrays
SQLAlchemy type inference fails on arrays where the value type is not a primitive or string prevent use cases like `array<array<int>>` from working.
| [
{
"content": "from __future__ import annotations\n\nimport functools\nfrom typing import Iterable\n\nimport sqlalchemy as sa\nfrom sqlalchemy.dialects import mysql, postgresql, sqlite\nfrom sqlalchemy.dialects.mysql.base import MySQLDialect\nfrom sqlalchemy.dialects.postgresql.base import PGDialect\nfrom sqlalc... | [
{
"content": "from __future__ import annotations\n\nimport functools\nfrom typing import Iterable\n\nimport sqlalchemy as sa\nfrom sqlalchemy.dialects import mysql, postgresql, sqlite\nfrom sqlalchemy.dialects.mysql.base import MySQLDialect\nfrom sqlalchemy.dialects.postgresql.base import PGDialect\nfrom sqlalc... | diff --git a/ibis/backends/base/sql/alchemy/datatypes.py b/ibis/backends/base/sql/alchemy/datatypes.py
index 2cfd66bfec2e..c3b4f01e91f3 100644
--- a/ibis/backends/base/sql/alchemy/datatypes.py
+++ b/ibis/backends/base/sql/alchemy/datatypes.py
@@ -96,8 +96,6 @@ def _(itype, **kwargs):
@to_sqla_type.register(dt.Array)
... |
pwr-Solaar__Solaar-1640 | Tray Icons don't appear under Wayland when using libappindicator-gtk3
**Information**
<!-- Make sure that your issue is not one of the known issues in the Solaar documentation at https://pwr-solaar.github.io/Solaar/ -->
<!-- Do not bother opening an issue for a version older than 1.1.0. Upgrade to the latest versio... | [
{
"content": "# -*- python-mode -*-\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 License, or\n## (at your... | [
{
"content": "# -*- python-mode -*-\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 License, or\n## (at your... | diff --git a/docs/installation.md b/docs/installation.md
index de457c2c5a..b98f118caf 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -42,14 +42,18 @@ which requires installation of the X11 development package.
Solaar will run under Wayland but some parts of Solaar rules will not work.
For more inform... |
dask__distributed-3466 | processes=False breaks Client dashboard
Hi, I'm on Windows 10 with JupyterLab in Chrome. Was just going through the official sites tutorials and noticed that half of the Client dashboards wouldn't open(empty localhost page):
```
`from dask.distributed import Client, progress
client = Client(processes=False, thre... | [
{
"content": "import asyncio\nimport logging\nimport threading\n\nfrom dask.utils import format_bytes\n\nfrom .adaptive import Adaptive\n\nfrom ..utils import (\n PeriodicCallback,\n log_errors,\n ignoring,\n sync,\n Log,\n Logs,\n thread_state,\n format_dashboard_link,\n)\n\n\nlogger = ... | [
{
"content": "import asyncio\nimport logging\nimport threading\n\nfrom dask.utils import format_bytes\n\nfrom .adaptive import Adaptive\n\nfrom ..utils import (\n PeriodicCallback,\n log_errors,\n ignoring,\n sync,\n Log,\n Logs,\n thread_state,\n format_dashboard_link,\n)\n\n\nlogger = ... | diff --git a/distributed/deploy/cluster.py b/distributed/deploy/cluster.py
index ad071a214be..c616f13c826 100644
--- a/distributed/deploy/cluster.py
+++ b/distributed/deploy/cluster.py
@@ -199,7 +199,7 @@ def dashboard_link(self):
except KeyError:
return ""
else:
- host = self.... |
mitmproxy__mitmproxy-4932 | Event type error says mitmproxy has crashed without actually crashing
#### Problem Description
Some sort of event type error...? This happened when I was testing `modify_body` and `modify_headers` options (see reproduction steps) and it results in repeated error messages with really long tracebacks.
The error messa... | [
{
"content": "import time\nfrom dataclasses import dataclass\nfrom typing import Iterator, List\n\nimport wsproto\nimport wsproto.extensions\nimport wsproto.frame_protocol\nimport wsproto.utilities\nfrom mitmproxy import connection, http, websocket\nfrom mitmproxy.proxy import commands, events, layer\nfrom mitm... | [
{
"content": "import time\nfrom dataclasses import dataclass\nfrom typing import Iterator, List\n\nimport wsproto\nimport wsproto.extensions\nimport wsproto.frame_protocol\nimport wsproto.utilities\nfrom mitmproxy import connection, http, websocket\nfrom mitmproxy.proxy import commands, events, layer\nfrom mitm... | diff --git a/mitmproxy/proxy/layers/websocket.py b/mitmproxy/proxy/layers/websocket.py
index b616eb9408..16cbf657fe 100644
--- a/mitmproxy/proxy/layers/websocket.py
+++ b/mitmproxy/proxy/layers/websocket.py
@@ -86,7 +86,6 @@ class WebsocketLayer(layer.Layer):
def __init__(self, context: Context, flow: http.HTTPFlo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.